/* try.babystrong.app: the ad landing page. Same palette and type as the app and www (3 Nov 2026):
   warm white by day, neutral near-black at night, one coral button per screen, no red. Every step
   fits one phone screen (the Instagram/Facebook in-app browser); only the game sheet scrolls. */

@font-face { font-family: 'Baloo 2'; font-weight: 600; font-display: swap; src: url('fonts/baloo2-600.woff2') format('woff2'); }
@font-face { font-family: 'Baloo 2'; font-weight: 700; font-display: swap; src: url('fonts/baloo2-700.woff2') format('woff2'); }
@font-face { font-family: 'Mukta'; font-weight: 400; font-display: swap; src: url('fonts/mukta-400.woff2') format('woff2'); }
@font-face { font-family: 'Mukta'; font-weight: 500; font-display: swap; src: url('fonts/mukta-500.woff2') format('woff2'); }
@font-face { font-family: 'Mukta'; font-weight: 600; font-display: swap; src: url('fonts/mukta-600.woff2') format('woff2'); }

:root {
  color-scheme: light dark;
  --surface: #f7f4ef;
  --surface-raised: #ffffff;
  --surface-sunken: #efeae3;
  --line: #e6dfd6;
  --line-strong: #8f8478;
  --ink: #2b2420;
  --ink-muted: #675c53;
  --coral: #e8673d;
  --on-coral: #ffffff;
  --coral-ink: #b4472a;
  --coral-soft: #fbe5dc;
  --butter-soft: #fdf3d3;
  --butter-deep: #87600e;
  --sage: #47733a;
  --sage-soft: #e6f2df;
  --sea: #22706a;
  --sea-soft: #ddf1ee;
  --sky-soft: #e2effa;
  --lavender-soft: #eee8fa;
  --shadow-card: 0 1px 2px #2b24200f, 0 4px 12px #2b24200f;
  --shadow-float: 0 -2px 8px #2b24200a, 0 12px 32px #2b242026;
  --scrim: #2b242066;

  --font-heading: 'Baloo 2', ui-rounded, system-ui, sans-serif;
  --font-body: 'Mukta', system-ui, 'Segoe UI', sans-serif;
  --pad: 20px;
  --radius-card: 16px;
  --radius-chip: 12px;
  --tap: 44px;
  --btn-h: 56px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #0f0f10;
    --surface-raised: #1c1c1e;
    --surface-sunken: #08080a;
    --line: #2e2e31;
    --line-strong: #85858c;
    --ink: #f2f2f3;
    --ink-muted: #adadb3;
    --coral-ink: #f4a285;
    --coral-soft: #1f1b1b;
    --butter-soft: #29251a;
    --butter-deep: #f2c14e;
    --sage: #9ccb8a;
    --sage-soft: #1c2719;
    --sea: #7ccbc1;
    --sea-soft: #13272a;
    --sky-soft: #172430;
    --lavender-soft: #232030;
    --shadow-card: 0 1px 2px #00000066;
    --shadow-float: 0 12px 32px #000000b3;
    --scrim: #000000a6;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--surface-sunken);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }

/* One phone-sized column; the dynamic viewport keeps the button above the in-app browser's bars. */
.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-width: 440px;
  margin: 0 auto;
  background: var(--surface);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}
@media (min-width: 480px) { .app { box-shadow: var(--shadow-card); } }

/* Top bar: back (when there is one) and the logo, left-aligned like an app. */
.bar { display: flex; align-items: center; gap: 2px; height: 56px; padding: 0 8px 0 4px; flex: none; }
.bar .icon-btn[hidden] + .logo { padding-left: 16px; }
.logo img { height: 24px; width: auto; }

.icon-btn {
  width: var(--tap); height: var(--tap);
  display: grid; place-items: center;
  border: 0; background: none; border-radius: 50%; cursor: pointer; color: var(--ink);
}
.icon-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:focus-visible, .btn:focus-visible, .btn-link:focus-visible, .card-btn:focus-visible, .field:focus-visible {
  outline: 3px solid var(--sea); outline-offset: 2px;
}

.view { flex: 1; min-height: 0; position: relative; }
.screen, .screen-form { display: flex; flex-direction: column; height: 100%; }
.screen-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px var(--pad) 12px; }
/* Body as a column: the hero panel takes the spare height, so short and tall phones both look composed. */
.screen-body.stack { display: flex; flex-direction: column; }
.hero-panel {
  position: relative; flex: 1 1 auto; min-height: 132px; max-height: 300px;
  margin: 0 0 20px; border-radius: 24px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
}
.hero-panel.small { max-height: 200px; min-height: 112px; }
.tint-sky { background: var(--sky-soft); }
.tint-lavender { background: var(--lavender-soft); }
/* The art is wide (21:9) with room at the sides: fill the panel and let the sides crop. */
.hero-panel-art { flex: 1; min-height: 0; width: 100%; object-fit: cover; object-position: center 70%; }
.facts { position: absolute; top: 0; left: 0; right: 0; z-index: 1; }
.facts { list-style: none; margin: 0; padding: 14px 14px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.facts li { padding: 3px 10px; border-radius: 999px; background: var(--surface-raised); font-size: 13.5px; font-weight: 600; line-height: 1.5; }
.pill { display: inline-block; margin: 0 0 6px; padding: 3px 12px; border-radius: 999px; background: var(--coral-soft); color: var(--coral-ink); font-weight: 600; font-size: 14px; }
.screen-body.center { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.screen-foot { flex: none; padding: 8px var(--pad) 12px; display: flex; flex-direction: column; align-items: stretch; gap: 6px; }

.h1 { font-family: var(--font-heading); font-weight: 700; font-size: 28px; line-height: 1.15; margin: 4px 0 12px; letter-spacing: -0.01em; }
.h2 { font-family: var(--font-heading); font-weight: 700; font-size: 24px; line-height: 1.2; margin: 12px 0 2px; }
.h3 { font-family: var(--font-heading); font-weight: 600; font-size: 18px; margin: 18px 0 6px; }
.lead { color: var(--ink-muted); font-size: 18px; margin: 0 0 12px; }
.lead.small { font-size: 16px; margin-top: -4px; }
.eyebrow { color: var(--coral-ink); font-weight: 600; font-size: 15px; margin: 4px 0 0; }
.echo { margin: 0 0 4px; color: var(--ink-muted); font-size: 15px; }
.note { color: var(--ink-muted); font-size: 15px; margin: -4px 0 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fine { color: var(--ink-muted); font-size: 13.5px; line-height: 1.4; margin: 12px 0 0; }
.center-text { text-align: center; }
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.privacy-line { display: flex; gap: 6px; align-items: flex-start; }
.privacy-line .i { width: 15px; height: 15px; margin-top: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons: one coral primary per screen; its label is the only text on coral (large and bold). */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--btn-h); width: 100%; padding: 0 20px;
  border-radius: 999px; border: 0; cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: 700; font-size: 19px; line-height: 1;
}
.btn-primary { background: var(--coral); color: var(--on-coral); }
.btn-primary:disabled { background: var(--line); color: var(--ink-muted); cursor: default; }
.btn-primary:not(:disabled):active { transform: translateY(1px); }
.btn-secondary { background: var(--surface-raised); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); font-size: 17px; min-height: 48px; }
.btn-link {
  align-self: center; min-height: var(--tap); padding: 0 8px;
  background: none; border: 0; cursor: pointer;
  color: var(--coral-ink); font-weight: 600; font-size: 15px; text-decoration: none;
  display: inline-flex; align-items: center;
}

/* Birth date: one field; the phone's native picker opens on tap (the input sits on top, invisible). */
.date-field {
  position: relative; z-index: 12; display: flex; flex-direction: column; justify-content: center;
  min-height: 68px; margin: 4px 0 0; padding: 10px 52px 10px 16px;
  background: var(--surface-raised); border: 1.5px solid var(--line-strong); border-radius: var(--radius-card);
  cursor: pointer;
}
.date-field:focus-within { outline: 3px solid var(--sea); outline-offset: 2px; }
.date-field-label { font-size: 13px; color: var(--ink-muted); }
.date-field-value { font-family: var(--font-heading); font-weight: 600; font-size: 22px; line-height: 1.2; }
.date-field-value.empty { color: var(--coral-ink); }
.date-field-icon { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; color: var(--ink-muted); }
.date-input {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;
  border: 0; margin: 0; padding: 0; font-size: 16px; -webkit-appearance: none; appearance: none;
}
.date-input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

/* Game cards: compact, three fit one screen. */
.cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.card { background: var(--surface-raised); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.card-btn {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px 10px 10px;
  border: 0; background: none; text-align: left; cursor: pointer; border-radius: var(--radius-card);
}
.card-art { width: 76px; height: 76px; flex: none; border-radius: 12px; overflow: hidden; position: relative; }
.card-art img { width: 100%; height: 100%; object-fit: cover; }
.cards li:nth-child(3n+1) .card-art { background: var(--sky-soft); }
.cards li:nth-child(3n+2) .card-art { background: var(--butter-soft); }
.cards li:nth-child(3n) .card-art { background: var(--sage-soft); }
.card-text { flex: 1; min-width: 0; }
.card-title { font-family: var(--font-heading); font-weight: 600; font-size: 18px; line-height: 1.2; margin: 0; }
.card-meta { color: var(--ink-muted); font-size: 14px; line-height: 1.35; margin: 2px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-chev { width: 20px; height: 20px; flex: none; color: var(--ink-muted); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Next week: pictures softly blurred, a lock on each. */
.card.locked { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 10px; }
.card.locked .card-art img { filter: blur(6px) saturate(.9); transform: scale(1.15); opacity: .85; }
.card-lock { position: absolute; inset: 0; display: grid; place-items: center; }
.card-lock span { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-raised); color: var(--ink); box-shadow: var(--shadow-card); }
.card-lock svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card.locked .card-meta { -webkit-line-clamp: 1; }

.offer {
  display: flex; gap: 8px; align-items: center; margin: 14px 0 6px; padding: 10px 14px;
  background: var(--butter-soft); border-radius: var(--radius-chip); font-weight: 600; font-size: 16px; line-height: 1.3;
}
.offer .i { color: var(--butter-deep); }

.badges { display: flex; justify-content: center; align-items: center; gap: 12px; min-height: var(--btn-h); }
.badges img { height: 44px; width: auto; }
.foot-links { display: flex; justify-content: center; align-items: center; gap: 2px; color: var(--ink-muted); }

/* Calm information: sea, never red. */
.banner {
  display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; padding: 12px 14px;
  background: var(--sea-soft); color: var(--ink); border-radius: var(--radius-chip);
}
.banner .i { color: var(--sea); margin-top: 3px; }
.banner p { margin: 0; font-size: 15.5px; }

.field-label { display: block; font-weight: 600; font-size: 15px; margin: 16px 0 6px; }
.field {
  width: 100%; min-height: 52px; padding: 0 14px; font-size: 17px;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-chip); background: var(--surface-raised);
}
.field::placeholder { color: var(--ink-muted); opacity: .7; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.intro-panel { width: 100%; flex: 0 1 300px; }
.hero-art { width: min(220px, 52vw); height: auto; border-radius: 24px; margin-bottom: 16px; background: var(--butter-soft); }
.done-mark { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--sage-soft); color: var(--sage); margin-bottom: 12px; }
.done-mark svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

.mini-foot {
  flex: none; display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap;
  padding: 2px var(--pad) calc(8px + env(safe-area-inset-bottom)); font-size: 12px; color: var(--ink-muted); text-align: center; line-height: 1.3;
}
.mini-foot a { color: var(--coral-ink); font-weight: 600; }

/* Loading */
.skeleton, .skeleton-card, .skeleton-text { background: var(--line); border-radius: 8px; }
.skeleton-text { width: 40%; height: 18px; }
.skeleton-title { width: 75%; height: 30px; margin: 10px 0 16px; }
.skeleton-card { height: 96px; border-radius: var(--radius-card); box-shadow: none; }
@media (prefers-reduced-motion: no-preference) {
  .skeleton, .skeleton-card, .skeleton-text { animation: pulse 1.2s ease-in-out infinite; }
  @keyframes pulse { 50% { opacity: .55; } }
  .screen:not([hidden]) { animation: enter .22s ease-out; }
  @keyframes enter { from { opacity: 0; transform: translateX(12px); } }
  .sheet:not([hidden]) { animation: rise .25s ease-out; }
  @keyframes rise { from { transform: translateY(40px); opacity: 0; } }
}

/* The game sheet: the only place that scrolls. */
.sheet-backdrop { position: fixed; inset: 0; background: var(--scrim); z-index: 10; }
.sheet {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 11;
  width: 100%; max-width: 440px; max-height: 88dvh; max-height: 88vh;
  display: flex; flex-direction: column;
  background: var(--surface-raised); border-radius: 24px 24px 0 0; box-shadow: var(--shadow-float);
  padding-bottom: env(safe-area-inset-bottom);
}
@supports (height: 1dvh) { .sheet { max-height: 88dvh; } }
.sheet-handle { width: 40px; height: 4px; border-radius: 2px; background: var(--line-strong); opacity: .5; margin: 8px auto 0; flex: none; }
.sheet-close { position: absolute; top: 8px; right: 8px; z-index: 1; background: var(--surface-raised); }
.sheet-body { overflow-y: auto; padding: 8px var(--pad) 24px; overscroll-behavior: contain; }
.sheet-art { border-radius: 16px; overflow: hidden; background: var(--sky-soft); aspect-ratio: 16 / 10; margin-top: 28px; }
.sheet-art img { width: 100%; height: 100%; object-fit: cover; }
.meta { color: var(--ink-muted); margin: 0; font-size: 15px; }
.needs { margin: 0; padding-left: 20px; }
.steps { margin: 0; padding-left: 22px; }
.steps li, .needs li { margin: 4px 0; }
.sheet-body p { margin: 0; }
.safety { display: flex; gap: 8px; align-items: flex-start; margin-top: 16px !important; padding: 12px 14px; background: var(--sea-soft); border-radius: var(--radius-chip); font-size: 15.5px; }
.safety .i { color: var(--sea); margin-top: 3px; }

/* iPhone's date popover has no backdrop of its own: dim the page while it's open, as the game sheet does. */
.picker-scrim { position: fixed; inset: 0; z-index: 11; background: var(--scrim); }

/* Short phones (and big text): tighten so each step still fits. */
@media (max-height: 700px) {
  .h1 { font-size: 24px; margin-bottom: 8px; }
  .card-art { width: 64px; height: 64px; }
  .card-btn, .card.locked { padding-top: 8px; padding-bottom: 8px; }
  .fine { margin-top: 8px; }
}

/* Headings take focus on each step (for TalkBack), without a visible ring. */
h1[tabindex="-1"]:focus { outline: none; }

/* Tall phones: bigger cards, so the games fill the screen rather than leaving a gap above the button. */
@media (min-height: 780px) {
  .card-art { width: 96px; height: 96px; }
  .card-btn, .card.locked { padding: 12px 14px 12px 12px; gap: 14px; }
  .cards { gap: 12px; }
  .card-title { font-size: 19px; }
}

/* ---- v5: calmer question and next-week screens ---- */
.ask-panel { max-height: 220px; }
.date-field { flex-direction: row; justify-content: flex-start; align-items: center; gap: 14px; min-height: 76px; padding: 12px 16px; border: 2px solid var(--sea); }
.date-field-icon { position: static; transform: none; width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--sea-soft); color: var(--sea); }
.date-field-icon .i { width: 24px; height: 24px; }
.date-field-text { display: flex; flex-direction: column; }
.date-field-value.empty { color: var(--ink); }
.privacy-line { justify-content: center; text-align: center; margin-top: 10px; }

/* Next week: a quiet locked list; the offer sits on the button. */
.locked-list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.locked-list li { display: flex; align-items: center; gap: 14px; }
.locked-list .card-art { width: 64px; height: 64px; border-radius: 14px; }
.locked-list li:nth-child(1) .card-art { background: var(--sky-soft); }
.locked-list li:nth-child(2) .card-art { background: var(--butter-soft); }
.locked-list li:nth-child(3) .card-art { background: var(--sage-soft); }
.locked-list .card-art img { filter: blur(5px); transform: scale(1.15); opacity: .85; }
.locked-list .card-title { font-size: 18px; }
.cta-foot { gap: 10px; padding-top: 16px; }
.cta-foot .offer { justify-content: center; margin: 0; padding: 0; background: none; font-size: 15px; color: var(--butter-deep); }
.btn-cta { min-height: 60px; font-size: 20px; box-shadow: 0 6px 18px #e8673d55; }
.btn-cta .i { width: 22px; height: 22px; stroke-width: 2.4; }
@media (min-height: 780px) { .locked-list .card-art { width: 76px; height: 76px; } .locked-list { gap: 14px; } }

/* ---- v6: official store badges are the call to action ---- */
.cta-foot .badges { gap: 12px; flex-wrap: wrap; }
.cta-foot .badges a { display: block; border-radius: 10px; }
.cta-foot .badges a:focus-visible { outline: 3px solid var(--sea); outline-offset: 2px; }
.cta-foot .badges img { height: 56px; width: auto; }
.cta-foot .badges.single img { height: 64px; }
.screen[data-screen="ask"] .screen-foot { padding-bottom: 4px; }

/* ---- v7: week heading, first game open, sheet order, perks ---- */
.echo { margin: 0 0 2px; font-size: 15px; font-weight: 500; }
.note { -webkit-line-clamp: 2; margin: -6px 0 14px; }
.note b { color: var(--ink); font-weight: 600; }

/* The first game opens inline: picture and title, then its steps, then "All the details". */
.card.open .card-btn { padding-bottom: 6px; }
.card-steps { margin: 0; padding: 0 14px 4px 38px; font-size: 15px; line-height: 1.4; color: var(--ink); }
.card-steps li { margin: 3px 0; }
.card-more { display: flex; justify-content: flex-start; padding: 0 14px 8px 30px; }
.card-more .btn-link { align-self: auto; font-size: 14.5px; }

/* Safety right under the title in the sheet; a way on at the end. */
.sheet-body .safety { margin-top: 12px !important; }
.sheet-next { margin-top: 20px; padding: 16px; border-radius: var(--radius-card); background: var(--surface); text-align: center; }
.sheet-next p { margin: 0 0 10px !important; font-weight: 600; }

/* Next week: what else the app does, filling the space above the badges. */
.perks { list-style: none; margin: 20px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.perks li { display: flex; align-items: center; gap: 12px; font-size: 15.5px; font-weight: 500; }
.perk-icon { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; }
.perk-icon .i { width: 20px; height: 20px; }
.tint-butter { background: var(--butter-soft); color: var(--butter-deep); }
.tint-sage { background: var(--sage-soft); color: var(--sage); }
.perk-icon.tint-lavender { color: var(--ink); }
@media (max-height: 700px) { .perks { margin-top: 12px; padding-top: 10px; gap: 6px; } .perk-icon { width: 30px; height: 30px; } }
.card-safety { display: flex; gap: 8px; align-items: flex-start; margin: 6px 12px 0; padding: 8px 10px; border-radius: 10px; background: var(--sea-soft); font-size: 14px; line-height: 1.35; }
.card-safety .i { width: 16px; height: 16px; color: var(--sea); margin-top: 2px; }

/* Week screen fits one screen: compact cards (one line of detail), whatever the phone's height. */
[data-week-cards] .card-art { width: 60px; height: 60px; }
[data-week-cards] .card-btn { padding: 8px 12px 8px 8px; }
[data-week-cards] .card-meta { -webkit-line-clamp: 1; }
[data-week-cards].cards { gap: 8px; }
.note { -webkit-line-clamp: 1; }
.card-steps { padding-top: 2px; }
@media (min-height: 780px) {
  [data-week-cards] .card-art { width: 68px; height: 68px; }
  .note { -webkit-line-clamp: 2; }
}
@media (max-height: 700px) {
  .note { display: none; }
  .card-more { display: none; }
  .card-steps { font-size: 14px; }
  .card-steps li { margin: 1px 0; }
  .card-safety { font-size: 13px; padding: 6px 8px; }
}
