:root {
  --cream: #f6f0e6;
  --paper: #fffaf4;
  --paper-2: #fbf5ed;
  --ink: #27302f;
  --muted: #6d7471;
  --sage: #9eaf9a;
  --sage-dark: #687d68;
  --clay: #bd765f;
  --clay-soft: #ead1c5;
  --blue: #9bafbf;
  --blue-soft: #dce6ec;
  --mustard: #c7a34b;
  --mustard-soft: #eee0ae;
  --line: rgba(39, 48, 47, .12);
  --shadow: 0 24px 70px rgba(43, 46, 43, .14);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--cream);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--cream); }
body { min-height: 100svh; }
button { font: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }

.page-shell {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  padding: max(16px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
}

.ambient { position: fixed; pointer-events: none; filter: blur(2px); opacity: .8; z-index: 0; }
.ambient-one {
  width: 260px; height: 260px; right: -110px; top: 18%;
  background: radial-gradient(circle at 30% 30%, rgba(189,118,95,.35), transparent 58%),
              radial-gradient(circle at 70% 70%, rgba(199,163,75,.25), transparent 55%);
  border-radius: 58% 42% 48% 52% / 42% 58% 42% 58%; transform: rotate(13deg);
}
.ambient-two {
  width: 240px; height: 240px; left: -120px; bottom: 5%;
  background: radial-gradient(circle at 60% 30%, rgba(155,175,191,.42), transparent 55%),
              radial-gradient(circle at 40% 75%, rgba(158,175,154,.33), transparent 58%);
  border-radius: 42% 58% 64% 36% / 55% 38% 62% 45%; transform: rotate(-20deg);
}

.topbar, .site-footer, .app-card { position: relative; z-index: 1; }
.topbar { width: min(680px, 100%); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.brand-lockup { border: 0; background: transparent; color: var(--ink); padding: 6px; display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer; }
.brand-mark { width: 38px; height: 38px; border-radius: 50%; background: var(--clay); color: white; display: grid; place-items: center; font-size: 22px; box-shadow: 0 8px 20px rgba(189,118,95,.24); }
.brand-lockup strong { display: block; font-size: 14px; line-height: 1.1; }
.brand-lockup small { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; letter-spacing: .02em; }
.icon-button { border: 1px solid var(--line); background: rgba(255,250,244,.75); color: var(--ink); width: 42px; height: 42px; border-radius: 50%; cursor: pointer; font-size: 22px; display: grid; place-items: center; box-shadow: 0 8px 25px rgba(43,46,43,.07); }

.app-card {
  width: min(680px, 100%);
  margin: auto;
  background: rgba(255, 250, 244, .92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.8);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
  padding: clamp(24px, 5vw, 42px);
  min-height: min(700px, calc(100svh - 150px));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.screen { animation: rise .28s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .screen { animation: none; } * { scroll-behavior: auto !important; } }

.eyebrow { margin: 0 0 10px; text-transform: uppercase; letter-spacing: .16em; font-weight: 800; color: var(--sage-dark); font-size: 11px; }
h1, h2 { margin: 0; letter-spacing: -.035em; font-family: Georgia, "Times New Roman", serif; font-weight: 700; }
h1 { font-size: clamp(38px, 8vw, 58px); line-height: .98; }
h2 { font-size: clamp(30px, 6vw, 42px); line-height: 1.03; }
.lede { color: var(--muted); font-size: clamp(16px, 3.4vw, 19px); line-height: 1.55; margin: 16px 0 28px; max-width: 31rem; }
.progress-row { display: flex; align-items: center; gap: 8px; margin: 0 0 22px; }
.progress-dot { height: 5px; flex: 1; border-radius: 999px; background: #e6dfd4; }
.progress-dot.active { background: var(--clay); }

.choice-grid { display: grid; gap: 12px; }
.choice-button {
  width: 100%; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 20px;
  padding: 17px 18px; text-align: left; cursor: pointer; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.choice-button:hover { transform: translateY(-1px); border-color: rgba(39,48,47,.25); box-shadow: 0 10px 24px rgba(43,46,43,.07); }
.choice-button:active { transform: scale(.99); }
.choice-icon { width: 42px; height: 42px; border-radius: 15px; display: grid; place-items: center; background: var(--blue-soft); font-size: 20px; }
.choice-button:nth-child(2) .choice-icon { background: var(--sage); }
.choice-button:nth-child(3) .choice-icon { background: var(--clay-soft); }
.choice-button:nth-child(4) .choice-icon { background: var(--mustard-soft); }
.choice-label { font-weight: 750; font-size: 16px; }
.choice-sub { display: block; color: var(--muted); font-size: 12px; font-weight: 500; margin-top: 3px; }
.choice-arrow { color: var(--muted); font-size: 18px; }

.pill-row { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.pill-row.four { grid-template-columns: repeat(2, minmax(0,1fr)); }
.pill-button { border: 1px solid var(--line); background: var(--paper); border-radius: 18px; padding: 18px 10px; cursor: pointer; color: var(--ink); font-weight: 750; min-height: 76px; }
.pill-button small { display: block; color: var(--muted); font-weight: 500; font-size: 11px; margin-top: 5px; }
.pill-button:hover { border-color: rgba(39,48,47,.26); }

.back-button { border: 0; background: transparent; color: var(--muted); padding: 0 0 18px; cursor: pointer; font-weight: 700; }

.action-card { border-radius: 28px; background: linear-gradient(145deg, #e4ebe0, #f3e6d9); padding: clamp(22px, 4vw, 32px); border: 1px solid rgba(39,48,47,.08); }
.action-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; color: var(--muted); font-size: 12px; font-weight: 750; }
.action-kicker { color: var(--sage-dark); text-transform: uppercase; letter-spacing: .11em; font-size: 10px; }
.action-title { font-size: clamp(28px, 6vw, 40px); margin: 0 0 14px; }
.action-copy { font-size: clamp(17px, 3.6vw, 20px); line-height: 1.5; margin: 0; }
.action-note { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid rgba(39,48,47,.1); color: var(--muted); font-size: 13px; line-height: 1.5; }

.primary-button, .secondary-button, .ghost-button { border-radius: 18px; min-height: 54px; padding: 13px 18px; cursor: pointer; font-weight: 800; }
.primary-button { background: var(--ink); color: white; border: 1px solid var(--ink); }
.secondary-button { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.ghost-button { background: transparent; color: var(--muted); border: 0; }
.full { width: 100%; }
.action-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.action-buttons .primary-button { grid-column: 1 / -1; }

.timer-box { margin-top: 14px; border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: rgba(255,250,244,.58); }
.timer-display { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 23px; font-weight: 800; letter-spacing: -.03em; }
.timer-actions { display: flex; gap: 8px; }
.mini-button { border: 1px solid var(--line); background: var(--paper); border-radius: 12px; padding: 9px 12px; color: var(--ink); cursor: pointer; font-weight: 750; font-size: 12px; }

.success-orb { width: 86px; height: 86px; display: grid; place-items: center; border-radius: 50%; background: var(--sage); font-size: 40px; margin-bottom: 24px; box-shadow: 0 16px 36px rgba(104,125,104,.2); }
.success-copy { font-size: 18px; line-height: 1.5; color: var(--muted); margin: 14px 0 26px; }
.success-actions { display: grid; gap: 10px; }

.site-footer { width: min(680px,100%); margin: 0 auto; display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

.sheet-backdrop { position: fixed; inset: 0; background: rgba(39,48,47,.25); backdrop-filter: blur(4px); z-index: 20; }
.settings-sheet { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(680px,100%); z-index: 21; background: var(--paper); border-radius: 28px 28px 0 0; padding: 12px 22px max(28px, env(safe-area-inset-bottom)); box-shadow: 0 -24px 60px rgba(39,48,47,.18); }
.sheet-handle { width: 44px; height: 5px; border-radius: 999px; background: #d8d0c5; margin: 0 auto 18px; }
.sheet-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.sheet-head h2 { font-size: 28px; }
.tone-options { display: grid; gap: 9px; margin: 22px 0; }
.tone-option { border: 1px solid var(--line); background: var(--paper-2); color: var(--ink); border-radius: 16px; padding: 14px 15px; cursor: pointer; text-align: left; }
.tone-option.active { border-color: var(--clay); box-shadow: inset 0 0 0 1px var(--clay); }
.tone-option strong { display: block; }
.tone-option small { display: block; color: var(--muted); margin-top: 4px; }
.setting-note { border-top: 1px solid var(--line); padding: 18px 0; color: var(--muted); line-height: 1.5; font-size: 13px; }
.setting-note strong { color: var(--ink); }
.setting-note p { margin: 5px 0 0; }
.hidden { display: none !important; }

.install-card { margin-top: 18px; padding: 14px 16px; border-radius: 16px; background: var(--blue-soft); font-size: 13px; line-height: 1.45; color: var(--ink); }

@media (max-width: 520px) {
  .page-shell { padding-left: 12px; padding-right: 12px; }
  .app-card { border-radius: 28px; min-height: calc(100svh - 142px); }
  .pill-row { grid-template-columns: 1fr; }
  .pill-row.four { grid-template-columns: 1fr 1fr; }
  .choice-button { grid-template-columns: 38px 1fr auto; padding: 15px; }
  .choice-icon { width: 38px; height: 38px; border-radius: 13px; }
}


/* V2: broader adaptive entry without adding setup */
.pick-button { width:100%; margin-top:14px; border:1px solid rgba(199,163,75,.36); background:linear-gradient(135deg,var(--mustard-soft),#f4e8c3); color:var(--ink); border-radius:22px; min-height:68px; padding:14px 18px; display:grid; grid-template-columns:38px 1fr; align-items:center; column-gap:10px; text-align:left; cursor:pointer; }
.pick-button > span { grid-row:1 / span 2; width:38px; height:38px; border-radius:14px; background:rgba(255,255,255,.58); display:grid; place-items:center; font-size:20px; }
.pick-button strong { font-size:16px; align-self:end; }.pick-button small { color:var(--muted); align-self:start; margin-top:2px; }
.rescue-link { width:100%; border:0; background:transparent; color:var(--sage-dark); padding:16px 6px 0; font-weight:800; cursor:pointer; }
.choice-grid.compact { gap:9px; }.choice-grid.compact .choice-button { padding:14px 15px; }.rescue-grid { max-height:52svh; overflow:auto; padding-right:3px; }
@media (max-width:520px){ .rescue-grid{max-height:48svh;} }

/* One-time Gumroad activation */
.license-label{display:block;margin:22px 0 8px;font-size:.85rem;font-weight:800;color:var(--ink);}
.license-input{width:100%;min-height:56px;border:1px solid var(--line);border-radius:16px;background:var(--paper);color:var(--ink);padding:14px 16px;font:inherit;font-weight:700;letter-spacing:.03em;margin-bottom:12px;box-sizing:border-box;}
.license-input:focus{outline:3px solid rgba(199,131,107,.18);border-color:var(--clay);}
