:root {
  --ink: #302d2a;
  --ink-soft: #554f49;
  --taupe: #8c8175;
  --taupe-deep: #6b6259;
  --mushroom: #aaa096;
  --stone: #d7d0c7;
  --stone-soft: #e8e3dc;
  --paper: #faf8f4;
  --paper-deep: #f1ede7;
  --paper-warm: #ebe5dc;
  --line: #d8d1c9;
  --white: #fffefb;
  --shadow: rgba(64, 55, 48, .16);
  font-family: "Nunito", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #dfdad3;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: #dfdad3; }

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 18% 8%, rgba(255,255,255,.72), transparent 34%),
    radial-gradient(circle at 82% 88%, rgba(126,115,103,.12), transparent 32%),
    #dfdad3;
}

button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(108, 99, 89, .24);
  outline-offset: 2px;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--taupe-deep);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
}

.button {
  min-height: 46px;
  border: 0;
  border-radius: 13px;
  padding: 12px 18px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .025em;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }

.button.primary {
  color: var(--white);
  background: var(--ink);
  box-shadow: 0 8px 18px rgba(48, 45, 42, .14);
}

.button.primary.completed { background: var(--taupe-deep); }
.button.secondary { border: 1px solid var(--line); background: var(--paper-deep); }
.full-width { width: 100%; }

.text-button, .tiny-button, .icon-button, .delete-button {
  border: 0;
  cursor: pointer;
  background: transparent;
}

.text-button {
  padding: 8px;
  color: var(--taupe-deep);
  font-size: 11px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Activation */
.activation-shell {
  width: min(calc(100% - 32px), 900px);
  min-height: min(720px, calc(100vh - 48px));
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  margin: 24px auto;
  overflow: hidden;
  border: 1px solid rgba(81, 73, 66, .18);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 24px 70px rgba(63, 54, 47, .2);
}

.activation-cover {
  min-height: 620px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 42px;
  color: #f8f5f0;
  text-align: center;
  background:
    repeating-linear-gradient(78deg, rgba(255,255,255,.025) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(8deg, rgba(50,44,39,.025) 0 1px, transparent 1px 5px),
    var(--taupe);
}

.activation-cover::before {
  content: "";
  width: 78%;
  aspect-ratio: 1;
  position: absolute;
  top: 17%;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 47% 53% 58% 42% / 40% 55% 45% 60%;
  transform: rotate(-8deg);
}

.activation-cover::after {
  content: "";
  width: 7px;
  position: absolute;
  inset: 0 auto 0 18px;
  background: rgba(52,46,41,.17);
  box-shadow: 5px 0 10px rgba(255,255,255,.07);
}

.activation-brand-lockup { width: 174px; aspect-ratio: 1; position: relative; z-index: 2; flex: 0 0 auto; margin-bottom: 4px; overflow: hidden; border-radius: 50%; background: #a6a099; box-shadow: 0 12px 28px rgba(48,42,37,.2); }
.activation-brand-lockup img { width: 332.28%; max-width: none; height: auto; position: absolute; left: -192.09%; top: -44.94%; }
.raccoon { display: block; object-fit: contain; }
.activation-flou { width: 205px; position: relative; z-index: 2; margin: 14px 0 3px; }

.activation-cover > p {
  position: relative;
  z-index: 2;
  margin: 0;
  font: 700 21px/1.25 "Caveat", cursive;
}

.activation-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(34px, 7vw, 72px);
}

.activation-panel h1 {
  max-width: 410px;
  margin: 0 0 12px;
  font-size: clamp(31px, 4vw, 46px);
  line-height: 1.04;
  letter-spacing: -.035em;
}

.activation-panel > p:not(.eyebrow) {
  max-width: 450px;
  margin: 0 0 28px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.65;
}

.activation-form { display: grid; gap: 9px; }
.activation-form label { color: var(--ink-soft); font-size: 11px; font-weight: 900; }

.activation-form input {
  width: 100%;
  min-height: 50px;
  border: 1px solid #aaa197;
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--white);
  font-size: 14px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.activation-form + .text-button { align-self: center; margin-top: 13px; }

/* App frame */
.app-shell {
  width: min(100%, 480px);
  min-height: 100dvh;
  position: relative;
  margin: 0 auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 30%, rgba(124,114,104,.035) 0 1px, transparent 1.5px) 0 0 / 16px 16px,
    var(--paper);
  box-shadow: 0 0 65px rgba(64, 55, 48, .17);
}

.topbar {
  min-height: 102px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  overflow: hidden;
  padding: 15px 24px 20px;
  color: #f8f5f0;
  text-align: center;
  background:
    repeating-linear-gradient(82deg, rgba(255,255,255,.025) 0 2px, transparent 2px 8px),
    var(--taupe);
  border-radius: 0 0 46% 11% / 0 0 25% 13%;
}

.topbar::after {
  content: "";
  width: 120%;
  height: 26px;
  position: absolute;
  left: -10%;
  bottom: -16px;
  border-radius: 50%;
  background: rgba(255,255,255,.13);
}

.app-brand-lockup { width: 70px; aspect-ratio: 1; position: relative; z-index: 2; flex: 0 0 auto; overflow: hidden; border-radius: 50%; background: #a6a099; box-shadow: 0 8px 20px rgba(48,42,37,.18); }
.app-brand-lockup img { width: 332.28%; max-width: none; height: auto; position: absolute; left: -192.09%; top: -44.94%; }
.topbar p { max-width: 150px; position: relative; z-index: 2; margin: 0; font-size: 9px; line-height: 1.35; opacity: .86; text-align: right; }

.screen { padding: 26px 22px 112px; animation: enter .22s ease both; }

.bottom-nav {
  width: min(100%, 480px);
  min-height: 78px;
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 8px 22px max(8px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(250,248,244,.96);
  backdrop-filter: blur(12px);
}

.nav-button {
  min-height: 55px;
  display: grid;
  place-items: center;
  gap: 1px;
  border: 0;
  border-radius: 13px;
  cursor: pointer;
  color: var(--ink-soft);
  background: transparent;
  font-size: 9px;
  font-weight: 800;
}

.nav-button svg { width: 22px; height: 22px; }
.nav-button.active { color: var(--white); background: var(--taupe-deep); box-shadow: 0 7px 16px rgba(79,70,62,.18); }

/* Shared cards and typography */
.home-intro, .page-header { text-align: center; }
.home-intro { margin: 3px auto 18px; }
.home-intro h1, .page-header h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: -.035em;
}

.home-intro > p:last-child, .page-header > p:last-child {
  max-width: 370px;
  margin: 8px auto 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.5;
}

.page-header { margin: 1px 0 20px; }
.page-header.compact { margin-bottom: 15px; }

.section-card, .next-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,254,251,.9);
  box-shadow: 0 8px 22px rgba(74,66,59,.055);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.section-heading.simple { align-items: center; }
.section-heading h2, .reminder-form h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
}

.token-pill, .permission-on {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 6px 10px;
  color: var(--taupe-deep);
  background: var(--paper-deep);
  font-size: 10px;
  font-weight: 900;
}

/* Home */
.open-diary-card {
  min-height: 285px;
  position: relative;
  overflow: hidden;
  padding: 24px 21px 20px;
  border: 1px solid #c7beb4;
  border-radius: 22px 16px 24px 14px;
  background:
    linear-gradient(90deg, transparent 49.7%, rgba(96,86,77,.08) 50%, transparent 50.3%),
    repeating-linear-gradient(0deg, transparent 0 25px, rgba(120,111,102,.10) 25px 26px),
    #f4f0e9;
  box-shadow: 0 13px 30px rgba(65,57,50,.12);
}

.paper-tape {
  width: 74px;
  height: 19px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  background: rgba(179,169,156,.38);
}

.open-copy { width: 59%; position: relative; z-index: 3; }
.open-copy h2 { margin: 0; font-size: 26px; line-height: 1.08; }
.open-copy > p:not(.eyebrow) { margin: 8px 0 18px; color: var(--ink-soft); font-size: 11px; line-height: 1.45; }
.open-copy .button { width: 100%; }

.hero-flou { width: 155px; position: absolute; z-index: 2; right: 5px; bottom: 3px; }
.small-flou { width: 100%; }

.page-marker {
  min-width: 73px;
  position: absolute;
  z-index: 4;
  right: 35px;
  top: 31px;
  display: grid;
  place-items: center;
  padding: 9px 10px 8px;
  border: 1px solid #c4bbb1;
  border-radius: 11px 8px 13px 9px;
  background: rgba(255,254,251,.91);
  transform: rotate(1.5deg);
}

.page-marker svg { width: 20px; height: 20px; margin-bottom: 4px; }
.page-marker span { font-size: 7px; font-weight: 900; letter-spacing: .12em; }
.page-marker strong { margin-top: -1px; font: 900 27px/1 "Nunito", sans-serif; }

.streak-strip {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 15px 0;
  padding: 11px 14px;
  border-radius: 14px;
  color: var(--ink-soft);
  background: var(--stone-soft);
}

.streak-strip > span { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--taupe); border-radius: 50%; font-size: 22px; }
.streak-strip strong, .streak-strip small { display: block; }
.streak-strip strong { font-size: 11px; }
.streak-strip small { margin-top: 2px; font-size: 8px; }

.steps-card { margin-top: 15px; padding: 17px; }

.flow-step {
  width: 100%;
  min-height: 57px;
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 7px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  cursor: pointer;
  text-align: left;
  background: var(--paper);
}

.flow-step i {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--mushroom);
  border-radius: 50%;
  font-style: normal;
  font-size: 12px;
}

.flow-step span { min-width: 0; }
.flow-step strong, .flow-step small { display: block; }
.flow-step strong { font-size: 11px; }
.flow-step small { margin-top: 2px; color: var(--ink-soft); font-size: 8px; line-height: 1.35; }
.flow-step.done { border-color: #9d958b; background: #ebe7e1; }
.flow-step.done i { color: var(--white); border-color: var(--taupe-deep); background: var(--taupe-deep); }

.next-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 15px;
  padding: 14px;
}

.next-dot, .area-swatch { border-radius: 50%; background: var(--area-color); }
.next-dot { width: 15px; height: 15px; flex: 0 0 auto; }
.next-copy { flex: 1; min-width: 0; }
.next-copy h2 { margin: 0; font-size: 15px; }
.next-copy > p:last-child { margin: 3px 0 0; color: var(--ink-soft); font-size: 9px; }
.icon-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; font-size: 23px; }
.empty-state { flex-wrap: wrap; }
.empty-state > div:nth-child(2) { flex: 1; }
.empty-state h2 { margin: 0; font-size: 15px; }
.empty-state p:not(.eyebrow) { margin: 3px 0 0; color: var(--ink-soft); font-size: 9px; }
.empty-state .button { width: 100%; }
.round-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--stone-soft); }
.round-icon svg { width: 20px; height: 20px; }

/* Reminders */
.reminder-form { padding: 18px; }
.form-note { margin: 7px 0 16px; color: var(--ink-soft); font-size: 10px; line-height: 1.45; }
.form-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 9px; }
.field { display: grid; gap: 5px; margin-bottom: 11px; }
.field label { color: var(--ink-soft); font-size: 9px; font-weight: 900; letter-spacing: .03em; }

.field input, .field select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid #b6ada3;
  border-radius: 10px;
  padding: 9px 11px;
  color: var(--ink);
  background: var(--white);
  font-size: 11px;
}

.page-field > div { position: relative; }
.page-field svg { width: 20px; height: 20px; position: absolute; z-index: 2; left: 12px; top: 12px; }
.page-field input { padding-left: 42px; }

.reminders-section { margin-top: 22px; }
.tiny-button { border: 1px solid var(--line); border-radius: 99px; padding: 7px 9px; color: var(--taupe-deep); background: var(--paper-deep); font-size: 8px; font-weight: 900; }

.reminder-list { display: grid; gap: 8px; }
.reminder-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--white);
}

.area-swatch { width: 15px; height: 15px; flex: 0 0 auto; }
.reminder-item > div { flex: 1; min-width: 0; }
.reminder-item strong, .reminder-item small { display: block; }
.reminder-item strong { font-size: 11px; }
.reminder-item small { margin-top: 2px; color: var(--ink-soft); font-size: 8px; }
.delete-button { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-soft); }
.delete-button:hover { background: var(--stone-soft); }
.delete-button svg { width: 17px; height: 17px; }

.list-empty { padding: 22px; border: 1px dashed #bdb5ab; border-radius: 15px; text-align: center; }
.list-flou { width: 90px; margin: -10px auto -8px; }
.list-empty h3 { margin: 0; font-size: 14px; }
.list-empty p { max-width: 310px; margin: 5px auto 0; color: var(--ink-soft); font-size: 9px; line-height: 1.45; }

/* Flou */
.hideout {
  min-height: 270px;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: end center;
  border: 1px solid #9e9489;
  border-radius: 48% 48% 20px 20px / 27% 27% 20px 20px;
  background:
    repeating-linear-gradient(95deg, #c3b9ae 0 33px, #bbb0a5 34px 36px),
    var(--mushroom);
  box-shadow: inset 0 18px 35px rgba(72,62,54,.11);
}

.hideout-arch { width: 76%; height: 58%; position: absolute; bottom: 0; border-radius: 50% 50% 0 0; background: rgba(94,84,75,.34); }
.hideout::after { content: ""; width: 73%; height: 18px; position: absolute; bottom: 13px; border-radius: 50%; background: rgba(60,53,47,.14); }
.hideout-flou { width: 205px; position: relative; z-index: 3; margin-bottom: 5px; }
.hideout > strong { position: absolute; z-index: 5; bottom: 11px; padding: 2px 12px; border-radius: 99px; background: var(--paper); font: 700 15px "Caveat", cursive; }
.speech-bubble { max-width: 150px; position: absolute; z-index: 6; top: 37px; right: 19px; padding: 9px 11px; border: 1px solid var(--ink); border-radius: 13px 13px 3px 13px; background: var(--white); font: 700 14px/1.12 "Caveat", cursive; }
.decor { position: absolute; z-index: 4; color: var(--ink-soft); font-size: 35px; }
.decor-plant { left: 24px; bottom: 22px; }
.decor-lamp { left: 28px; top: 45px; }
.decor-pillow { right: 27px; bottom: 22px; transform: rotate(-8deg); }

.rewards-section { margin-top: 22px; }
.reward-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.reward-card { min-width: 0; padding: 13px 7px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; background: var(--white); }
.reward-card:disabled { cursor: default; opacity: .48; }
.reward-card.owned { opacity: 1; background: var(--stone-soft); }
.reward-card i, .reward-card strong, .reward-card small { display: block; }
.reward-card i { margin-bottom: 4px; font-style: normal; font-size: 29px; }
.reward-card strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.reward-card small { margin-top: 2px; color: var(--ink-soft); font-size: 8px; }

/* Feedback */
.toast {
  width: max-content;
  max-width: min(88%, 420px);
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: 92px;
  transform: translateX(-50%);
  padding: 10px 15px;
  border-radius: 99px;
  color: var(--white);
  text-align: center;
  background: var(--ink);
  box-shadow: 0 10px 25px rgba(48,45,42,.24);
  font-size: 10px;
  animation: toast-in .2s ease both;
}

@keyframes enter { from { opacity: 0; transform: translateY(5px); } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 7px); } }

@media (min-width: 700px) {
  body { padding: 22px 0; }
  .app-shell { min-height: calc(100vh - 44px); border: 1px solid rgba(91,82,74,.18); border-radius: 28px; }
  .topbar { border-radius: 28px 28px 46% 11% / 28px 28px 25% 13%; }
  .bottom-nav { bottom: 22px; border-radius: 0 0 28px 28px; }
}

@media (max-width: 699px) {
  .activation-shell { width: 100%; min-height: 100vh; grid-template-columns: 1fr; margin: 0; border: 0; border-radius: 0; }
  .activation-cover { min-height: 320px; padding: 28px; }
  .activation-cover::before { width: 270px; top: 4%; }
  .activation-brand-lockup { width: 142px; }
  .activation-flou { width: 135px; margin: 2px 0 -2px; }
  .activation-cover > p { font-size: 17px; }
  .activation-panel { justify-content: flex-start; padding: 32px 24px 40px; }
}

@media (max-width: 370px) {
  .screen { padding-left: 16px; padding-right: 16px; }
  .open-diary-card { min-height: 300px; padding-left: 16px; }
  .open-copy { width: 62%; }
  .open-copy h2 { font-size: 22px; }
  .hero-flou { width: 135px; right: -2px; }
  .page-marker { right: 22px; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
}
