:root {
  --bg-top: #ffb5cf;
  --bg-bottom: #ff7cb1;
  --paper: rgba(255, 246, 250, 0.94);
  --paper-strong: rgba(255, 252, 247, 0.98);
  --ink: #552848;
  --muted: #7f5d78;
  --line: rgba(85, 40, 72, 0.12);
  --orange: #ff8a7a;
  --orange-deep: #ff5f8f;
  --pink: #ff5fa2;
  --yellow: #ffd7eb;
  --teal: #49c7b1;
  --blue: #8bb7ff;
  --lime: #c9f3d8;
  --danger-soft: #ffe4df;
  --danger-text: #c64a5d;
  --success-soft: #e6fbf3;
  --success-text: #1f9f84;
  --info-soft: #eef3ff;
  --info-text: #5d76d6;
  --shadow-lg: 0 24px 60px rgba(103, 38, 76, 0.18);
  --shadow-md: 0 16px 30px rgba(103, 38, 76, 0.12);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  background: linear-gradient(180deg, #ffd6e8, #ff8fbd);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% 8%, rgba(255, 235, 246, 0.9), transparent 18%),
    radial-gradient(circle at 88% 10%, rgba(255, 95, 162, 0.46), transparent 19%),
    radial-gradient(circle at 20% 92%, rgba(255, 170, 206, 0.32), transparent 20%),
    linear-gradient(180deg, #ffd6e8 0%, #ffb2d1 38%, #ff8fbd 100%);
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 22px 22px;
}

button,
input {
  font: inherit;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
}

.page {
  width: min(100% - 14px, 1180px);
  margin: 0 auto;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 0 calc(28px + env(safe-area-inset-bottom, 0px));
  position: relative;
  z-index: 1;
}

.hero,
.panel,
.banner,
.overview-card {
  border-radius: var(--radius-lg);
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 24px 18px 22px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top right, rgba(255, 231, 243, 0.42), transparent 24%),
    linear-gradient(135deg, rgba(255, 154, 188, 0.98), rgba(255, 95, 162, 0.92) 52%, rgba(214, 113, 177, 0.96));
  color: #fff7f2;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  opacity: 0.28;
}

.hero::before {
  width: 180px;
  height: 180px;
  top: -70px;
  right: -40px;
  background: rgba(255, 255, 255, 0.28);
}

.hero::after {
  width: 120px;
  height: 120px;
  left: -28px;
  bottom: -30px;
  background: rgba(255, 255, 255, 0.18);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: white;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.24);
}

h1 {
  margin: 16px 0 10px;
  font-size: clamp(2.35rem, 11vw, 4.9rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.hero-copy {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 247, 242, 0.92);
  font-size: 1rem;
  line-height: 1.6;
}

.hero-meta,
.overview-grid,
.dashboard-grid,
.side-grid,
.stats-strip,
.task-list,
.tracker-list,
.shopping-list,
.banner-actions {
  display: grid;
  gap: 14px;
}

.hero-meta,
.overview-grid,
.banner,
.dashboard-grid {
  margin-top: 16px;
}

.meta-pill {
  padding: 13px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.18);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-weight: 800;
  line-height: 1.4;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.overview-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
}

.overview-card::before {
  content: "";
  position: absolute;
  inset: auto -18px -18px auto;
  width: 86px;
  height: 86px;
  border-radius: 22px;
  opacity: 0.16;
  transform: rotate(18deg);
}

.overview-card:nth-child(1) {
  background: linear-gradient(145deg, #fff3f8, #ffdce9);
}

.overview-card:nth-child(1)::before {
  background: #ff7fb2;
}

.overview-card:nth-child(2) {
  background: linear-gradient(145deg, #f4fffb, #dbf7ef);
}

.overview-card:nth-child(2)::before {
  background: var(--teal);
}

.overview-card:nth-child(3) {
  background: linear-gradient(145deg, #fff2f7, #ffe0ec);
}

.overview-card:nth-child(3)::before {
  background: #d86aac;
}

.overview-label,
.mini-stat-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.overview-value {
  margin: 0;
  font-size: 2.05rem;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.overview-note,
.panel-subtle,
.banner-note,
.task-status,
.footer-note,
.tracker-note,
.shopping-meta {
  color: var(--muted);
}

.overview-note,
.panel-subtle,
.banner-note,
.footer-note {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.52;
}

.banner {
  padding: 16px 18px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.24), transparent 22%),
    linear-gradient(135deg, rgba(255, 181, 207, 0.98), rgba(255, 111, 174, 0.96) 48%, rgba(216, 106, 172, 0.95));
  color: #fff8f5;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.banner-copy {
  display: grid;
  gap: 6px;
}

.banner-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 900;
  color: white;
}

.banner-note {
  color: rgba(255, 249, 244, 0.88);
}

.banner-actions {
  grid-template-columns: minmax(94px, 110px) minmax(0, 1fr);
  align-items: stretch;
}

.banner-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 10px 16px;
  border-radius: 20px;
  background: rgba(103, 38, 76, 0.18);
  color: white;
  font-size: clamp(1.55rem, 6vw, 2.1rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.panel {
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.98), rgba(255, 245, 236, 0.92)),
    var(--paper);
}

.panel-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-header h2 {
  margin: 0;
  font-size: 1.32rem;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stats-strip {
  margin-bottom: 24px;
}

.stats-strip + .task-list {
  margin-top: 6px;
}

.mini-stat {
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 251, 254, 0.92);
  box-shadow: var(--shadow-md);
}

.mini-stat[style*="soft-green"] {
  background: var(--success-soft) !important;
}

.mini-stat[style*="soft-red"] {
  background: var(--danger-soft) !important;
}

.mini-stat[style*="soft-blue"] {
  background: var(--info-soft) !important;
}

.mini-stat-value {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.task-card,
.tracker-card,
.shopping-item {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.task-card {
  padding: 16px;
  background: linear-gradient(145deg, #fffdfd, #fff0f6);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.task-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(16, 43, 65, 0.14);
}

.task-card.done {
  border-color: rgba(73, 199, 177, 0.3);
  background: linear-gradient(145deg, #f1fff9, #dcf8ee);
}

.task-top,
.task-body,
.shopping-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-person {
  margin: 0 0 6px;
  font-size: 1.2rem;
  font-weight: 900;
}

.task-name,
.shopping-text {
  margin: 0;
  font-weight: 800;
}

.task-name {
  font-size: 1.04rem;
}

.task-badge {
  align-self: flex-start;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(73, 199, 177, 0.14);
  color: var(--success-text);
  font-size: 0.84rem;
  font-weight: 900;
}

.task-status {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.check-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(85, 40, 72, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 244, 248, 0.92));
  cursor: pointer;
  font-weight: 900;
  user-select: none;
}

.check-label input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.fake-check {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  border: 2px solid rgba(85, 40, 72, 0.18);
  background: white;
  transition: all 160ms ease;
}

.fake-check::after {
  content: "\2713";
  transform: scale(0);
  transition: transform 160ms ease;
  color: white;
  font-weight: 900;
}

.check-label input:checked + .fake-check {
  border-color: var(--teal);
  background: linear-gradient(180deg, var(--teal), #2eb197);
  box-shadow: 0 8px 16px rgba(73, 199, 177, 0.26);
}

.check-label input:checked + .fake-check::after {
  transform: scale(1);
}

.tracker-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 15px 16px;
  background: linear-gradient(145deg, #fffaf6, #fff0ea);
}

.tracker-name {
  font-size: 1.08rem;
  font-weight: 900;
}

.tracker-note {
  margin-top: 4px;
  font-size: 0.92rem;
}

.tracker-count {
  width: 100%;
  padding: 12px 10px;
  text-align: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 138, 122, 0.2), rgba(255, 205, 153, 0.22));
  color: var(--danger-text);
  font-size: 1.25rem;
  font-weight: 900;
}

.shopping-form {
  margin-bottom: 16px;
}

.shopping-input {
  width: 100%;
  min-height: 56px;
  padding: 15px 16px;
  font-size: 16px;
  border-radius: 18px;
  border: 1px solid rgba(85, 40, 72, 0.1);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.shopping-list {
  min-height: 60px;
}

.shopping-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(145deg, #fffdfc, #fff6ef);
}

.shopping-bullet {
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffd58f, #ff9a7a);
}

.shopping-text {
  line-height: 1.4;
}

.shopping-meta {
  margin: 4px 0 0;
  font-size: 0.86rem;
}

.shopping-empty {
  display: grid;
  place-items: center;
  padding: 18px;
  text-align: center;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(255, 255, 255, 0.28);
  color: rgba(255, 248, 243, 0.9);
  background: linear-gradient(145deg, rgba(176, 73, 122, 0.72), rgba(137, 54, 118, 0.78));
  line-height: 1.5;
}

.button,
.ghost-button {
  border: 0;
  min-height: 54px;
  padding: 12px 16px;
  border-radius: 18px;
  cursor: pointer;
  font-weight: 900;
}

.button {
  background: linear-gradient(135deg, #ff8cbf, var(--pink));
  color: white;
  box-shadow: 0 16px 28px rgba(255, 95, 162, 0.28);
}

.button:disabled,
.ghost-button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.button:active,
.ghost-button:active {
  transform: translateY(1px) scale(0.995);
}

.button:focus-visible,
.ghost-button:focus-visible,
.shopping-input:focus-visible,
.check-label:focus-within {
  outline: 3px solid rgba(86, 184, 255, 0.35);
  outline-offset: 2px;
}

.ghost-button {
  background: linear-gradient(135deg, rgba(255, 206, 227, 0.72), rgba(255, 233, 242, 0.82));
  color: var(--ink);
}

.footer-note,
.error {
  margin-top: 16px;
  font-size: 0.92rem;
  line-height: 1.5;
}

.error {
  color: #a12637;
  font-weight: 800;
}

.loading {
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 699px) {
  .page {
    width: min(100% - 12px, 1180px);
  }

  .hero,
  .panel,
  .banner,
  .overview-card {
    border-radius: 20px;
  }

  .overview-grid,
  .dashboard-grid,
  .side-grid {
    gap: 14px;
  }

  .panel-actions,
  .banner-actions {
    width: 100%;
  }

  .panel-actions .ghost-button,
  .banner-actions .button {
    width: 100%;
  }
}

@media (min-width: 700px) {
  .banner {
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.95fr);
    align-items: center;
  }

  .banner-actions {
    justify-content: end;
  }
}

@media (min-width: 861px) {
  .page {
    width: min(100% - 32px, 1180px);
    padding: 34px 0 56px;
  }

  .hero {
    padding: 36px 30px 30px;
  }

  .hero-meta,
  .overview-grid,
  .stats-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .banner-actions {
    grid-template-columns: minmax(110px, 130px) minmax(180px, 220px);
    justify-content: end;
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.92fr);
    align-items: start;
  }

  .panel {
    padding: 24px;
  }

  .stats-strip {
    margin-bottom: 28px;
  }

  .panel-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: end;
  }

  .task-top,
  .task-body,
  .shopping-form {
    flex-direction: row;
  }

  .task-top,
  .task-body {
    justify-content: space-between;
    align-items: center;
  }

  .shopping-form .shopping-input {
    flex: 1;
  }

  .check-label {
    display: inline-flex;
    width: auto;
  }

  .tracker-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .tracker-count {
    width: auto;
    min-width: 92px;
  }
}
