/* pooppy.health - the day-to-night home page and the sub pages, English
   and Hungarian.

   One idea runs the page: a fixed sky behind everything follows one dog's
   day as you scroll (js/sky.js). Scenes declare their hour with data-time;
   the sky, the sun, the moon and the header clock follow. Text colour is
   switched by sky.js on <html data-ink="dark|light"> from the sky's
   luminance, so every token below has a day and a night value.

   Sections: 1 tokens  2 base  3 sky  4 header  5 controls  6 layout
             7 app kit (phone, lock screen, watch, app UI)  8 hero
             9 mascot  10 closing sections  11 motion  12 launch switch
   Scene-specific styles live in css/scenes/<scene>.css. */

@font-face {
  font-family: 'Chewy';
  src: url('/fonts/Chewy-Regular.woff2') format('woff2');
  font-display: swap;
}

/* ------------------------------------------------------------------ */
/* 1 Tokens                                                            */
/* ------------------------------------------------------------------ */

:root {
  color-scheme: light;
  --font-display: 'Chewy', ui-rounded, 'SF Pro Rounded', system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-round: ui-rounded, 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  /* Page ink and surfaces (day). */
  --ink: #1D1046;
  --ink-2: rgba(29, 16, 70, 0.74);
  --ink-3: rgba(29, 16, 70, 0.64);
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --surface-line: rgba(29, 16, 70, 0.08);
  --glass: rgba(255, 255, 255, 0.5);
  --glass-strong: rgba(255, 255, 255, 0.72);
  --glass-line: rgba(255, 255, 255, 0.75);
  --shadow-1: 0 1px 2px rgba(29, 16, 70, 0.05), 0 8px 26px rgba(29, 16, 70, 0.08);
  --shadow-2: 0 2px 8px rgba(29, 16, 70, 0.08), 0 30px 70px rgba(29, 16, 70, 0.18);
  --link: #4A2BD0;

  /* Brand (the app's identities). */
  --violet-a: #C44DF0;
  --violet-b: #5B2EE8;
  --cta: linear-gradient(135deg, #C44DF0 0%, #7A3CEB 52%, #5B2EE8 100%);
  --walk: linear-gradient(135deg, #52E8A0, #D8DE3A);
  --sunset: linear-gradient(135deg, #E8489B, #F2A93B);
  --pro-ink: #4A48C8;
  --pro-fill: rgba(88, 86, 214, 0.14);
  --pro-glow: linear-gradient(135deg, #8B6CFF, #C44DF0);

  /* Verdict colours (the app's). *-ink are AA text weights. */
  --ok: #34C759;  --ok-ink: #1F7A3A;  --ok-tint: rgba(52, 199, 89, 0.14);
  --amber: #FF9F0A; --amber-ink: #8A5200; --amber-tint: rgba(255, 159, 10, 0.16);
  --red: #FF3B30; --red-ink: #B3261E; --red-tint: rgba(255, 59, 48, 0.12);
  --indigo: #5856D6;

  /* Stool scale colours 1-7 (StoolConsistency). */
  --s1: #8B5E3C; --s2: #C99A5B; --s3: #4CAF50; --s4: #8BC34A; --s5: #FFC107; --s6: #FF9800; --s7: #F44336;

  /* Corner language (the app's: 28 container, 16 card). */
  --r-container: 28px;
  --r-card: 16px;
  --r-pill: 999px;

  /* Motion tokens: the app's SwiftUI springs as CSS linear() curves
     (duration, bounce): enter (0.4, 0), land (0.45, 0.2), pop (0.35, 0.3),
     flight (0.6, 0.1), wobble (0.5, 0.5). Timing curves for opacity only. */
  --spring-enter: linear(0, 0.024, 0.081, 0.157, 0.242, 0.328, 0.411, 0.489, 0.56, 0.624, 0.68, 0.729, 0.772, 0.808, 0.84, 0.866, 0.889, 0.908, 0.924, 0.937, 0.948, 0.957, 0.965, 0.971, 0.976, 0.981, 0.984, 0.987, 0.989, 0.991, 0.993, 0.994, 0.995, 0.996, 0.997, 0.998, 1);
  --spring-enter-ms: 540ms;
  --spring-land: linear(0, 0.022, 0.078, 0.156, 0.245, 0.339, 0.432, 0.521, 0.603, 0.677, 0.742, 0.799, 0.847, 0.886, 0.919, 0.945, 0.966, 0.982, 0.994, 1.002, 1.008, 1.012, 1.014, 1.015, 1.015, 1.014, 1.013, 1.012, 1.011, 1.009, 1.008, 1.007, 1.005, 1.004, 1.003, 1.003, 1);
  --spring-land-ms: 575ms;
  --spring-pop: linear(0, 0.029, 0.101, 0.201, 0.314, 0.43, 0.542, 0.646, 0.737, 0.816, 0.881, 0.933, 0.973, 1.002, 1.023, 1.036, 1.043, 1.046, 1.045, 1.042, 1.038, 1.033, 1.028, 1.023, 1.018, 1.013, 1.009, 1.006, 1.004, 1.002, 1, 0.999, 0.999, 0.998, 0.998, 0.998, 1);
  --spring-pop-ms: 510ms;
  --spring-flight: linear(0, 0.012, 0.043, 0.087, 0.141, 0.201, 0.263, 0.327, 0.389, 0.45, 0.507, 0.561, 0.612, 0.658, 0.701, 0.739, 0.774, 0.805, 0.832, 0.857, 0.878, 0.897, 0.913, 0.928, 0.94, 0.95, 0.959, 0.967, 0.974, 0.979, 0.983, 0.987, 0.99, 0.993, 0.995, 0.997, 1);
  --spring-flight-ms: 700ms;
  --spring-wobble: linear(0, 0.051, 0.18, 0.351, 0.536, 0.712, 0.866, 0.988, 1.077, 1.132, 1.158, 1.162, 1.149, 1.125, 1.096, 1.066, 1.038, 1.015, 0.997, 0.984, 0.977, 0.974, 0.974, 0.977, 0.981, 0.986, 0.991, 0.995, 0.999, 1.001, 1.003, 1.004, 1.004, 1.004, 1.004, 1.003, 1);
  --spring-wobble-ms: 975ms;
  --ease-exit: cubic-bezier(0.4, 0, 1, 1);
  --ease-fade: cubic-bezier(0.42, 0, 0.58, 1);
  --exit-ms: 180ms;
  --fade-ms: 250ms;

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1180px;
  --topbar-h: 64px;
}

/* Night ink: set by sky.js once the sky is dark behind the reader. */
html[data-ink="light"] {
  color-scheme: dark;
  --ink: #F7F3FF;
  --ink-2: rgba(247, 243, 255, 0.8);
  --ink-3: rgba(247, 243, 255, 0.72);
  --surface: rgba(30, 20, 82, 0.58);
  --surface-strong: rgba(36, 26, 82, 0.86);
  --surface-line: rgba(255, 255, 255, 0.14);
  --glass: rgba(24, 16, 64, 0.42);
  --glass-strong: rgba(24, 16, 64, 0.66);
  --glass-line: rgba(255, 255, 255, 0.16);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.2), 0 10px 30px rgba(0, 0, 0, 0.25);
  --shadow-2: 0 2px 8px rgba(0, 0, 0, 0.25), 0 30px 80px rgba(0, 0, 0, 0.45);
  --link: #C9B8FF;
  --pro-ink: #B9B7FF;
  --pro-fill: rgba(163, 161, 255, 0.18);
  --ok-ink: #6FE08E;
  --amber-ink: #FFC56B;
  --red-ink: #FF8A80;
}
/* Dark appearance before (or without) sky.js: the DARK sky is always dark,
   so the night ink is right from the first paint, scripts or not. */
@media (prefers-color-scheme: dark) {
  html:not([data-ink="dark"]) {
  color-scheme: dark;
  --ink: #F7F3FF;
  --ink-2: rgba(247, 243, 255, 0.8);
  --ink-3: rgba(247, 243, 255, 0.72);
  --surface: rgba(30, 20, 82, 0.58);
  --surface-strong: rgba(36, 26, 82, 0.86);
  --surface-line: rgba(255, 255, 255, 0.14);
  --glass: rgba(24, 16, 64, 0.42);
  --glass-strong: rgba(24, 16, 64, 0.66);
  --glass-line: rgba(255, 255, 255, 0.16);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.2), 0 10px 30px rgba(0, 0, 0, 0.25);
  --shadow-2: 0 2px 8px rgba(0, 0, 0, 0.25), 0 30px 80px rgba(0, 0, 0, 0.45);
  --link: #C9B8FF;
  --pro-ink: #B9B7FF;
  --pro-fill: rgba(163, 161, 255, 0.18);
  --ok-ink: #6FE08E;
  --amber-ink: #FFC56B;
  --red-ink: #FF8A80;
  }
}

/* The app UI inside the device frames follows the visitor's appearance,
   like the real app, not the sky. Sizes inside a screen are authored in
   iOS points: calc(17 * var(--pt)) is 17 pt on a 390 pt wide iPhone. */
.screen, .watch-screen {
  --pt: calc(100cqw / 390);
  --scr-bg: #F8F5FB;
  --scr-bg-2: #FCF2F6;
  --scr-card: #FFFFFF;
  --scr-card-2: #F2F1F6;
  --scr-ink: #000000;
  --scr-ink-2: rgba(60, 60, 67, 0.62);
  --scr-ink-3: rgba(60, 60, 67, 0.32);
  --scr-sep: rgba(60, 60, 67, 0.14);
  --scr-fill: rgba(120, 120, 128, 0.12);
  --scr-glass: rgba(255, 255, 255, 0.62);
  --scr-glass-line: rgba(255, 255, 255, 0.85);
  --scr-tint: #5856D6;
  --scr-ok: #34C759; --scr-ok-ink: #248A3D;
  --scr-amber: #FF9F0A; --scr-amber-ink: #B25E00;
  --scr-red: #FF3B30; --scr-red-ink: #D70015;
  --scr-shadow: 0 calc(1 * var(--pt)) calc(3 * var(--pt)) rgba(0, 0, 0, 0.06), 0 calc(8 * var(--pt)) calc(24 * var(--pt)) rgba(0, 0, 0, 0.06);
}
@media (prefers-color-scheme: dark) {
  .screen, .watch-screen {
    --scr-bg: #0E0B16;
    --scr-bg-2: #160E1C;
    --scr-card: #1C1A24;
    --scr-card-2: #24212E;
    --scr-ink: #FFFFFF;
    --scr-ink-2: rgba(235, 235, 245, 0.62);
    --scr-ink-3: rgba(235, 235, 245, 0.3);
    --scr-sep: rgba(84, 84, 88, 0.6);
    --scr-fill: rgba(120, 120, 128, 0.28);
    --scr-glass: rgba(40, 36, 52, 0.66);
    --scr-glass-line: rgba(255, 255, 255, 0.12);
    --scr-tint: #7D7AFF;
    --scr-ok-ink: #30D158; --scr-amber-ink: #FFB340; --scr-red-ink: #FF6961;
    --scr-shadow: 0 calc(8 * var(--pt)) calc(24 * var(--pt)) rgba(0, 0, 0, 0.4);
  }
}
.watch-screen { --pt: calc(100cqw / 184); }

/* The hidden attribute must beat every author display rule. */
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ */
/* 2 Base                                                              */
/* ------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--topbar-h) + 24px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  min-height: 100vh;
  background: #FFF1E6;               /* under the sky, and the no-JS sky */
  color: var(--ink);
  font: 400 17px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
  transition: color 0.5s var(--ease-fade);
}
@media (prefers-color-scheme: dark) { body { background: #17123A; } }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { text-decoration-thickness: 0.14em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #8B6CFF; outline-offset: 3px; border-radius: 8px; }
html[data-ink="light"] :focus-visible { outline-color: #FFFFFF; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; top: 10px; left: 10px; z-index: 100;
  padding: 10px 16px; border-radius: var(--r-pill);
  background: #fff; color: #1D1046; font-weight: 600;
  translate: 0 -200px;
}
.skip:focus { translate: 0 0; }
.tnum { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ */
/* 3 Sky                                                               */
/* ------------------------------------------------------------------ */
/* sky.js builds one full-screen gradient layer per keyframe and
   cross-fades the two around the current hour by opacity (composited,
   no repaint per scroll frame). Without JS the static dawn gradient on
   .sky shows. */

.sky {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: linear-gradient(180deg, #F6C9C0 0%, #FBE2D2 45%, #FFF3E8 100%);
  pointer-events: none;
}
@media (prefers-color-scheme: dark) {
  .sky { background: linear-gradient(180deg, #221B4E 0%, #3A2C64 50%, #5A3E6A 100%); }
}
.sky-layer {
  position: absolute; inset: 0;
}
.sky-layer + .sky-layer { will-change: opacity; }   /* only the cross-fading top layer */
.sky-sun, .sky-moon {
  position: absolute; left: 0; top: 0;
  width: 46vmax; height: 46vmax;
  margin: -23vmax 0 0 -23vmax;
  border-radius: 50%;
  opacity: 0;
}
.sky-sun {
  background: radial-gradient(circle, rgba(255, 246, 214, 0.95) 0 5%, rgba(255, 214, 150, 0.55) 9%, rgba(255, 190, 140, 0.18) 28%, transparent 62%);
}
.sky-moon {
  width: 20vmax; height: 20vmax; margin: -10vmax 0 0 -10vmax;
  background:
    radial-gradient(circle at 46% 44%, #FFFDF4 0 3.6%, transparent 3.9%),
    radial-gradient(circle, rgba(230, 222, 255, 0.42) 0 5%, rgba(170, 150, 255, 0.12) 18%, transparent 52%);
}
.sky-stars {
  position: absolute; inset: 0; opacity: 0;
}
.sky-stars-b { position: absolute; inset: 0; }
.sky-stars i {
  position: absolute; width: 2px; height: 2px; border-radius: 50%;
  background: #fff; opacity: var(--a, 0.8);
}
.sky-stars i.big { width: 3px; height: 3px; box-shadow: 0 0 6px rgba(255, 255, 255, 0.8); }
.sky-cloud {
  position: absolute; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.28) 55%, transparent);
  opacity: 0;
}

/* ------------------------------------------------------------------ */
/* 4 Header                                                            */
/* ------------------------------------------------------------------ */

.topbar {
  position: fixed; z-index: 50;
  top: 10px; left: 50%;
  width: min(var(--max), calc(100% - 20px));
  height: 56px;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  padding: 0 8px 0 10px;
  border-radius: var(--r-pill);
  background: var(--glass-strong);
  border: 1px solid var(--glass-line);
  box-shadow: var(--shadow-1);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  backdrop-filter: blur(20px) saturate(1.6);
  transition: background 0.5s var(--ease-fade), border-color 0.5s var(--ease-fade);
}
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink); text-decoration: none;
  font: 400 27px/1 var(--font-display);
  letter-spacing: 0.01em;
  padding: 4px 6px 4px 2px;
  border-radius: var(--r-pill);
}
.brand { flex: none; }
.brand img { flex: none; width: 34px; height: 34px; aspect-ratio: 1; object-fit: cover; border-radius: 9px; box-shadow: 0 2px 8px rgba(80, 40, 10, 0.25); }
.nav { display: none; gap: 2px; margin-left: 10px; }
.nav a {
  color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 8px 12px; border-radius: var(--r-pill);
}
.nav a:hover { color: var(--ink); background: var(--surface); }
.topbar .spacer { flex: 1; }
.clock {
  display: inline-flex; align-items: center; gap: 7px;
  height: 40px; padding: 0 12px 0 10px;
  border: 1px solid var(--surface-line);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink);
  font: 700 15px/1 var(--font-round);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.clock-icon { width: 18px; height: 18px; position: relative; flex: none; }
.clock-icon::before, .clock-icon::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  transition: opacity 0.4s, transform 0.5s var(--spring-pop);
}
.clock-icon::before {               /* sun */
  background: radial-gradient(circle, #FFC94D 0 42%, transparent 44%),
              conic-gradient(from 0deg, #FFB43B 0 6%, transparent 6% 12.5%, #FFB43B 12.5% 18.5%, transparent 18.5% 25%, #FFB43B 25% 31%, transparent 31% 37.5%, #FFB43B 37.5% 43.5%, transparent 43.5% 50%, #FFB43B 50% 56%, transparent 56% 62.5%, #FFB43B 62.5% 68.5%, transparent 68.5% 75%, #FFB43B 75% 81%, transparent 81% 87.5%, #FFB43B 87.5% 93.5%, transparent 93.5%);
}
.clock-icon::after {                /* moon */
  background: radial-gradient(circle at 68% 34%, transparent 0 34%, #E8E2FF 36% 58%, transparent 60%);
  opacity: 0; transform: rotate(-40deg) scale(0.6);
}
html[data-phase="night"] .clock-icon::before { opacity: 0; transform: rotate(60deg) scale(0.6); }
html[data-phase="night"] .clock-icon::after { opacity: 1; transform: none; }
.clock-time { min-width: 3.1em; text-align: left; }
html:not(.js) .clock { display: none; }
.topbar .btn { flex: none; height: 40px; padding: 0 16px; font-size: 15px; }
.clock { flex: none; }

/* The day menu: the clock opens a list of the day's scenes. */
.daymenu {
  position: fixed; z-index: 49;
  top: 74px; right: max(10px, calc((100vw - var(--max)) / 2));
  width: min(320px, calc(100vw - 20px));
  padding: 8px;
  border-radius: 24px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-line);
  box-shadow: var(--shadow-2);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(24px) saturate(1.6);
  transform-origin: top right;
}
.daymenu { max-height: calc(100dvh - 86px); overflow-y: auto; overscroll-behavior: contain; }
.daymenu ol { list-style: none; margin: 0; padding: 0; }
@media (max-height: 560px) { .daymenu a { padding-block: 7px; } }
.daymenu-motion {
  display: flex; align-items: center; gap: 8px; width: 100%;
  margin: 0 0 6px; padding: 10px 12px; border: 0; border-radius: 14px;
  background: var(--surface); color: var(--ink); font: 650 15px/1.2 var(--font-body);
  cursor: pointer; text-align: left;
}
.daymenu-motion svg { width: 18px; height: 18px; flex: none; }
.daymenu-motion[aria-pressed="true"] .ic-pause, .daymenu-motion[aria-pressed="false"] .ic-play { display: none; }
.daymenu a {
  display: grid; grid-template-columns: 54px 1fr; align-items: baseline; gap: 6px;
  padding: 9px 12px; border-radius: 14px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px;
}
.daymenu a span { font: 700 14px/1 var(--font-round); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.daymenu a:hover, .daymenu a[aria-current="true"] { background: var(--surface); }
.daymenu a[aria-current="true"] span { color: var(--ink); }

@media (min-width: 900px) {
  .nav { display: flex; }
  .topbar { padding-left: 12px; }
}
@media (max-width: 420px) {
  .brand span { display: none; }
  .topbar { gap: 8px; }
  .topbar .btn { padding: 0 clamp(10px, 3.4vw, 14px); font-size: clamp(13px, 3.8vw, 15px); }
  .clock { padding: 0 10px 0 8px; gap: 5px; font-size: clamp(13px, 3.8vw, 15px); }
}
@media (max-width: 330px) {
  .clock-icon { display: none; }
  .clock { padding: 0 9px; }
  .brand img { width: 30px; height: 30px; }
}

/* ------------------------------------------------------------------ */
/* 5 Controls: buttons, chips, badges                                  */
/* ------------------------------------------------------------------ */

.btn {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 54px; padding: 0 28px;
  border: 0; border-radius: var(--r-pill);
  font: 650 17px/1 var(--font-body);
  white-space: nowrap;
  text-decoration: none; cursor: pointer;
  transition: transform 0.45s var(--spring-pop), box-shadow 0.3s, filter 0.3s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-1px) scale(1.025); }
.btn:active { transform: scale(0.97); transition-duration: 0.12s; }
.btn-primary {
  color: #fff;
  background: var(--cta);
  box-shadow: 0 10px 28px rgba(91, 46, 232, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-primary::after {           /* the glass sheen over the gradient */
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 52%);
  pointer-events: none;
}
.btn-primary:hover { box-shadow: 0 14px 36px rgba(91, 46, 232, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.btn-ghost {
  color: var(--ink);
  background: var(--glass-strong);
  border: 1px solid var(--glass-line);
  box-shadow: var(--shadow-1);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.btn .arrow { transition: transform 0.4s var(--spring-pop); }
.btn:hover .arrow { transform: translateY(2px); }
.btn-store svg { width: 20px; height: 20px; }

.pro {
  display: inline-flex; align-items: center;
  padding: 3px 7px 2px; border-radius: var(--r-pill);
  background: var(--pro-fill); color: var(--pro-ink);
  font: 750 11px/1.2 var(--font-body); letter-spacing: 0.03em;
  vertical-align: 0.15em; white-space: nowrap;
}
.pro-lg {
  padding: 6px 12px 5px; font-size: 13px; color: #fff;
  background: var(--pro-glow);
  box-shadow: 0 6px 18px rgba(139, 108, 255, 0.4);
}
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 10px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--surface-line);
  color: var(--ink); font-weight: 600; font-size: 15px;
}
.chip img { width: 22px; height: 22px; }

/* ------------------------------------------------------------------ */
/* 6 Layout                                                            */
/* ------------------------------------------------------------------ */

.wrap { width: min(var(--max), calc(100% - 2 * var(--gutter))); margin-inline: auto; }

.scene {
  position: relative;
  padding-block: clamp(64px, 9vh, 120px);
}
/* Decorations (glows, sound rings, a watch crown) may reach past the
   viewport's side; clip them per section so the page never scrolls
   sideways (clip, unlike hidden, leaves the vertical axis alone). */
.scene, .hero, .site-foot { overflow-x: clip; }
.scene-grid {
  display: grid; gap: clamp(36px, 5vw, 72px);
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}
@media (min-width: 960px) {
  .scene-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .scene--flip .scene-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
  .scene--flip .scene-copy { order: 2; }
}
.scene-copy { max-width: 560px; }
.scene-time {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 8px; margin-bottom: 18px;
  border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--surface-line);
  font-weight: 650; font-size: 14px; color: var(--ink-2);
}
.scene-time b {
  font: 750 14px/1 var(--font-round); color: var(--ink);
  font-variant-numeric: tabular-nums;
  padding: 5px 8px; border-radius: var(--r-pill); background: var(--surface-strong);
}
.scene-title {
  font: 400 clamp(38px, 5.4vw, 66px)/1.02 var(--font-display);
  letter-spacing: 0.005em;
  color: var(--ink);
  text-wrap: balance;
}
.scene-body {
  margin-top: 18px;
  font-size: clamp(17px, 1.45vw, 20px); line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}
.scene-body strong { color: var(--ink); font-weight: 650; }
.scene-note { margin-top: 14px; font-size: 15px; color: var(--ink-3); }

/* Feature points under the copy. */
.points {
  list-style: none; margin: 28px 0 0; padding: 0;
  display: grid; gap: 10px;
}
@media (min-width: 560px) { .points { grid-template-columns: 1fr 1fr; } }
.points li {
  display: grid; grid-template-columns: 34px 1fr; gap: 2px 12px; align-items: start; align-content: start;
  padding: 14px 16px; border-radius: var(--r-card);
  background: var(--surface); border: 1px solid var(--surface-line);
  font-size: 15px; line-height: 1.45; color: var(--ink-2);
}
.points li > img, .points li > .glyph { grid-row: span 2; width: 34px; height: 34px; }
.points li strong { color: var(--ink); font-weight: 650; display: block; }
/* One icon language in every list (the app's rule): a flat glyph on a
   tinted tile. */
.pt-ic {
  grid-row: span 2;
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--pt-bg, rgba(91, 46, 232, 0.1)); color: var(--pt-ink, #5B2EE8);
}
.pt-ic .glyph { width: 20px; height: 20px; }
html[data-ink="light"] { --pt-bg: rgba(201, 184, 255, 0.16); --pt-ink: #DCD0FF; }
@media (prefers-color-scheme: dark) { html:not([data-ink="dark"]) { --pt-bg: rgba(201, 184, 255, 0.16); --pt-ink: #DCD0FF; } }

/* Pro cards beside a scene. */
.pro-row {
  display: grid; gap: 10px; margin-top: 18px;
}
@media (min-width: 560px) { .pro-row { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }
.pro-card {
  position: relative;
  padding: 16px 16px 15px; border-radius: var(--r-card);
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
              linear-gradient(135deg, rgba(139, 108, 255, 0.55), rgba(196, 77, 240, 0.35)) border-box;
  border: 1px solid transparent;
  font-size: 15px; line-height: 1.45; color: var(--ink-2);
}
.pro-card h3 { display: flex; align-items: center; gap: 8px; font: 650 16px/1.3 var(--font-body); color: var(--ink); margin-bottom: 4px; }

/* The demo stage: owns its height so nothing jumps while it plays. */
.stage {
  position: relative;
  min-height: var(--stage-h, 520px);
  display: grid; place-items: center;
}
.stage-caption { text-align: center; font-size: 14px; color: var(--ink-3); margin-top: 12px; }

/* Glyphs from the app's template SVGs, tinted by currentColor. */
.glyph {
  display: inline-block; width: 1em; height: 1em;
  background: currentColor;
  -webkit-mask: var(--g) center / contain no-repeat;
  mask: var(--g) center / contain no-repeat;
}
.g-walk { --g: url('/img/glyphs/walking-with-dog.svg'); }
.g-run { --g: url('/img/glyphs/running-with-dog.svg'); aspect-ratio: 1.3; width: 1.3em; }
.g-bowl { --g: url('/img/glyphs/dog-bowl.svg'); }
.g-poo { --g: url('/img/glyphs/dog-poo.svg'); }
.g-house { --g: url('/img/glyphs/house-training.svg'); }
.g-switch { --g: url('/img/glyphs/food-switch.svg'); }
.g-cam { --g: url('/img/glyphs/ui-camera.svg'); }
.g-widgets { --g: url('/img/glyphs/ui-widgets.svg'); }
.g-watch { --g: url('/img/glyphs/ui-watch.svg'); }
.g-sparkles { --g: url('/img/glyphs/ui-sparkles.svg'); }
.g-gauge { --g: url('/img/glyphs/ui-gauge.svg'); }
.g-calendar { --g: url('/img/glyphs/ui-calendar.svg'); }
.g-alert { --g: url('/img/glyphs/ui-alert.svg'); }
.g-wayback { --g: url('/img/glyphs/ui-wayback.svg'); }
.g-share { --g: url('/img/glyphs/ui-share.svg'); }
.g-heart { --g: url('/img/glyphs/ui-heart.svg'); }
.g-pill { --g: url('/img/glyphs/ui-pill.svg'); }
.g-pulse { --g: url('/img/glyphs/ui-pulse.svg'); }
.g-bandage { --g: url('/img/glyphs/ui-bandage.svg'); }
.g-suitcase { --g: url('/img/glyphs/ui-suitcase.svg'); }
.g-doc { --g: url('/img/glyphs/ui-doc.svg'); }
.g-photo { --g: url('/img/glyphs/ui-photo.svg'); }
.g-list { --g: url('/img/glyphs/ui-list.svg'); }
.g-phone { --g: url('/img/glyphs/ui-phone.svg'); }
.g-people { --g: url('/img/glyphs/ui-people.svg'); }
.g-export { --g: url('/img/glyphs/ui-export.svg'); }

/* ------------------------------------------------------------------ */
/* 7 App kit: device frames and the app's own UI                       */
/* ------------------------------------------------------------------ */
/* Recreations, not screenshots: every part is HTML so it can move, be
   tapped, and be translated. Inside a .screen, size things in iOS points
   with var(--pt) (see the tokens). .phone and .watch are the size
   containers that make var(--pt) work; .appframe does the same for a
   free-floating piece of app UI (a notification, a widget). */

.phone {
  --w: var(--phone-w, 300px);
  position: relative; flex: none;
  container-type: inline-size;
  width: var(--w);
  aspect-ratio: 393 / 852;
  padding: calc(var(--w) * 0.03);
  border-radius: calc(var(--w) * 0.165);
  background: linear-gradient(150deg, #4A4950 0%, #1B1A1F 38%, #2B2A30 100%);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.14),
    inset 0 0 0 calc(var(--w) * 0.012) #0A0A0C,
    0 2px 6px rgba(0, 0, 0, 0.16),
    0 42px 90px rgba(29, 16, 70, 0.3);
}
.phone::before, .phone::after {        /* side buttons */
  content: ""; position: absolute; width: 3px; border-radius: 2px;
  background: linear-gradient(90deg, #2B2A30, #55545B);
}
.phone::before { left: -2px; top: 22%; height: 7%; box-shadow: 0 calc(var(--w) * 0.13) 0 #3a393f; }
.phone::after { right: -2px; top: 30%; height: 11%; }
.appframe { container-type: inline-size; }

.screen {
  position: relative; isolation: isolate;
  height: 100%;
  overflow: hidden;
  border-radius: calc(var(--w, 300px) * 0.135);
  background: linear-gradient(180deg, var(--scr-bg) 0%, var(--scr-bg-2) 100%);
  color: var(--scr-ink);
  font: 400 calc(15 * var(--pt))/1.3 var(--font-body);
  letter-spacing: -0.01em;
  -webkit-user-select: none; user-select: none;
}
.appframe > .screen { height: auto; border-radius: 0; background: none; overflow: visible; }
.status {
  position: absolute; z-index: 20; inset: 0 0 auto;
  height: calc(54 * var(--pt));
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(4 * var(--pt)) calc(32 * var(--pt)) 0 calc(48 * var(--pt));
  font: 600 calc(17 * var(--pt))/1 var(--font-body);
  font-variant-numeric: tabular-nums;
  color: var(--scr-ink);
  pointer-events: none;
}
.status.on-dark { color: #fff; }
.status svg { width: calc(76 * var(--pt)); height: auto; }
.island {
  position: absolute; z-index: 21;
  top: calc(11 * var(--pt)); left: 50%;
  width: calc(124 * var(--pt)); height: calc(36 * var(--pt));
  transform: translateX(-50%);
  background: #000; border-radius: var(--r-pill);
}
.home-ind {                              /* the home indicator */
  position: absolute; z-index: 20; left: 50%; bottom: calc(8 * var(--pt));
  width: calc(140 * var(--pt)); height: calc(5 * var(--pt));
  transform: translateX(-50%); border-radius: var(--r-pill);
  background: var(--scr-ink); opacity: 0.85;
}
.home-ind.on-dark { background: #fff; }

/* Lock Screen. */
.lock {
  position: absolute; inset: 0;
  background: var(--wall, linear-gradient(165deg, #7E62F2 0%, #B66BD6 45%, #F2A07B 100%));
  color: #fff;
}
.lock-date {
  position: absolute; top: calc(78 * var(--pt)); width: 100%;
  text-align: center; font: 600 calc(20 * var(--pt))/1 var(--font-body); opacity: 0.9;
}
.lock-time {
  position: absolute; top: calc(102 * var(--pt)); width: 100%;
  text-align: center; font: 700 calc(98 * var(--pt))/1 var(--font-round);
  letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.lock-stack {
  position: absolute; left: calc(10 * var(--pt)); right: calc(10 * var(--pt));
  bottom: calc(96 * var(--pt));
  display: grid; gap: calc(8 * var(--pt));
}

/* A notification banner, on a Lock Screen or floating in a scene. */
.notif {
  display: grid; grid-template-columns: calc(38 * var(--pt)) 1fr;
  column-gap: calc(11 * var(--pt)); align-items: start;
  padding: calc(12 * var(--pt)) calc(14 * var(--pt)) calc(13 * var(--pt));
  border-radius: calc(24 * var(--pt));
  background: rgba(246, 246, 250, 0.74);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  backdrop-filter: blur(24px) saturate(1.8);
  color: #000; text-align: left;
  box-shadow: 0 calc(6 * var(--pt)) calc(24 * var(--pt)) rgba(0, 0, 0, 0.14);
  font-size: max(11px, calc(15 * var(--pt))); line-height: 1.32;
}
.notif-icon {
  grid-row: span 2;
  width: calc(38 * var(--pt)); height: calc(38 * var(--pt));
  border-radius: calc(9 * var(--pt));
  background: url('/img/app/pooppy-logo-160.webp') center / cover;
}
.notif-head { display: flex; align-items: baseline; justify-content: space-between; gap: calc(8 * var(--pt)); font-weight: 600; }
.notif-head time { flex: none; font-weight: 400; font-size: max(10px, calc(13 * var(--pt))); color: rgba(0, 0, 0, 0.48); }
.notif-body { color: rgba(0, 0, 0, 0.9); }
.notif-actions {
  grid-column: 1 / -1; margin-top: calc(11 * var(--pt));
  display: grid; gap: 1px; border-radius: calc(14 * var(--pt)); overflow: hidden;
}
.notif-actions button {
  border: 0; padding: calc(12 * var(--pt)) calc(10 * var(--pt));
  background: rgba(255, 255, 255, 0.6);
  font: 400 max(11px, calc(16 * var(--pt)))/1.1 var(--font-body); color: #000;
  cursor: pointer;
}
.notif-actions button:hover { background: rgba(255, 255, 255, 0.85); }
@media (prefers-color-scheme: dark) {
  .notif { background: rgba(38, 36, 46, 0.72); color: #fff; }
  .notif-head time { color: rgba(255, 255, 255, 0.5); }
  .notif-body { color: rgba(255, 255, 255, 0.92); }
  .notif-actions button { background: rgba(255, 255, 255, 0.1); color: #fff; }
  .notif-actions button:hover { background: rgba(255, 255, 255, 0.18); }
}

/* Apple Watch. The screen is black on watchOS; sizes in points of a
   184 pt wide (46 mm) screen. */
.watch {
  --w: var(--watch-w, 170px);
  position: relative; flex: none;
  container-type: inline-size;
  width: var(--w); aspect-ratio: 208 / 248;
  padding: calc(var(--w) * 0.07);
  border-radius: calc(var(--w) * 0.3);
  background: linear-gradient(150deg, #4A4950, #17161B 45%, #2A292E);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.14), 0 30px 64px rgba(29, 16, 70, 0.3);
}
.watch::after {                          /* the Digital Crown */
  content: ""; position: absolute; right: calc(var(--w) * -0.04); top: 24%;
  width: calc(var(--w) * 0.065); height: calc(var(--w) * 0.17);
  border-radius: calc(var(--w) * 0.02);
  background: repeating-linear-gradient(0deg, #6A6970 0 2px, #3A393F 2px 4px);
}
.watch-screen {
  position: relative; height: 100%; overflow: hidden;
  border-radius: calc(var(--w) * 0.22);
  background: #000; color: #fff;
  font: 500 calc(15 * var(--pt))/1.2 var(--font-round);
}

/* App surfaces. */
.app-pad { position: absolute; inset: calc(56 * var(--pt)) 0 0; overflow: hidden; }
.app-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(4 * var(--pt)) calc(16 * var(--pt)) calc(10 * var(--pt));
}
.gbtn {                                  /* a glass toolbar capsule */
  display: inline-flex; align-items: center; gap: calc(14 * var(--pt));
  height: calc(44 * var(--pt)); padding: 0 calc(12 * var(--pt));
  border-radius: var(--r-pill);
  background: var(--scr-glass); border: 1px solid var(--scr-glass-line);
  box-shadow: var(--scr-shadow);
  color: var(--scr-ink);
}
.gbtn svg { width: calc(22 * var(--pt)); height: calc(22 * var(--pt)); }
.wordmark {
  font: 400 calc(30 * var(--pt))/1 var(--font-display);
  color: var(--scr-ink);
  display: inline-flex; align-items: center; gap: calc(6 * var(--pt));
}
.wordmark img { width: calc(22 * var(--pt)); height: calc(22 * var(--pt)); border-radius: calc(5 * var(--pt)); }
.app-top .wordmark { font-size: calc(24 * var(--pt)); margin-left: auto; margin-right: auto; }
.gbtn-round { width: calc(44 * var(--pt)); padding: 0; justify-content: center; margin-left: calc(8 * var(--pt)); }
/* Today's care on a dog card (a tracked schedule): one row per dose. */
.todaycare {
  display: grid; grid-template-columns: calc(22 * var(--pt)) 1fr auto; align-items: center;
  column-gap: calc(8 * var(--pt)); row-gap: calc(6 * var(--pt));
  padding: calc(10 * var(--pt)) calc(12 * var(--pt));
  border-radius: calc(16 * var(--pt)); background: var(--scr-card); border: 1px solid var(--scr-sep);
}
.todaycare img { width: calc(20 * var(--pt)); height: calc(20 * var(--pt)); }
.tc-t { grid-column: 2 / -1; font-weight: 650; font-size: calc(15 * var(--pt)); }
.tc-dose { grid-column: 1 / 3; display: flex; align-items: center; gap: calc(8 * var(--pt)); font-size: calc(15 * var(--pt)); font-variant-numeric: tabular-nums; }
.tc-ring { width: calc(18 * var(--pt)); height: calc(18 * var(--pt)); border-radius: 50%; border: calc(1.6 * var(--pt)) dashed var(--scr-ink-3); flex: none; }
.tc-btn { padding: calc(6 * var(--pt)) calc(12 * var(--pt)); border-radius: var(--r-pill); background: color-mix(in srgb, var(--scr-tint) 16%, transparent); color: var(--scr-tint); font-weight: 600; font-size: calc(14 * var(--pt)); }

.dogcard {
  margin: 0 calc(14 * var(--pt));
  padding: calc(14 * var(--pt));
  border-radius: calc(34 * var(--pt));
  background: color-mix(in srgb, var(--scr-card-2) 82%, transparent);
  border: 1px solid var(--scr-glass-line);
  display: grid; gap: calc(10 * var(--pt));
}
.dc-head { display: grid; grid-template-columns: auto 1fr auto; gap: calc(12 * var(--pt)); align-items: center; }
.avatar {
  width: calc(58 * var(--pt)); height: calc(58 * var(--pt));
  border-radius: 50%;
  background: url('/img/app/pooppy-logo-160.webp') center / 118% no-repeat, #E6DCCB;
  box-shadow: 0 0 0 calc(2 * var(--pt)) var(--scr-card);
}
.dc-name { font: 700 calc(26 * var(--pt))/1.05 var(--font-body); letter-spacing: -0.02em; }
.dc-breed { font-size: calc(15 * var(--pt)); color: var(--scr-ink-2); margin-top: calc(2 * var(--pt)); }
.dc-weight { font-size: calc(15 * var(--pt)); color: var(--scr-ink-2); align-self: start; padding-top: calc(6 * var(--pt)); }

.verdict {
  display: flex; align-items: center; gap: calc(7 * var(--pt));
  height: calc(32 * var(--pt)); padding: 0 calc(12 * var(--pt)) 0 calc(9 * var(--pt));
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--scr-ok) 16%, transparent);
  color: var(--scr-ok-ink); font-weight: 600; font-size: calc(15 * var(--pt));
}
.verdict::before {
  content: ""; width: calc(16 * var(--pt)); height: calc(16 * var(--pt)); border-radius: 50%;
  background: var(--scr-ok) url('/img/ui/check.svg') center / 100%;
  flex: none;
}
.verdict span:last-child { margin-left: auto; color: var(--scr-ink-2); font-weight: 400; font-size: calc(13 * var(--pt)); }
.verdict.amber { background: color-mix(in srgb, var(--scr-amber) 18%, transparent); color: var(--scr-amber-ink); }
.verdict.amber::before { background-color: var(--scr-amber); }

.strip {
  display: grid; grid-template-columns: 1fr 1fr;
  border-radius: calc(18 * var(--pt));
  background: var(--scr-card);
  border: 1px solid var(--scr-sep);
  overflow: hidden;
}
.cell {
  position: relative;
  display: grid; grid-template-columns: calc(24 * var(--pt)) 1fr; column-gap: calc(8 * var(--pt));
  padding: calc(10 * var(--pt)) calc(10 * var(--pt)) calc(11 * var(--pt));
}
.cell:nth-child(odd)::after { content: ""; position: absolute; right: 0; top: 18%; bottom: 18%; width: 1px; background: var(--scr-sep); }
.cell:nth-child(n+3) { border-top: 1px solid var(--scr-sep); }
.cell img { width: calc(22 * var(--pt)); height: calc(22 * var(--pt)); grid-row: span 3; object-fit: contain; }
.cell-k { font-size: calc(12.5 * var(--pt)); color: var(--scr-ink-2); }
.cell-v { font-weight: 600; font-size: calc(16 * var(--pt)); font-variant-numeric: tabular-nums; }
.cell-s { font-size: calc(12.5 * var(--pt)); color: var(--scr-ink-2); }
.cell-s.ok { color: var(--scr-ok-ink); }

.predrow {
  display: flex; align-items: center; gap: calc(8 * var(--pt));
  padding: calc(9 * var(--pt)) calc(12 * var(--pt));
  border-radius: calc(16 * var(--pt));
  background: color-mix(in srgb, var(--scr-tint) 11%, transparent);
  color: var(--scr-tint); font-weight: 600; font-size: calc(13.5 * var(--pt));
  white-space: nowrap;
}
.predrow img { width: calc(20 * var(--pt)); height: calc(20 * var(--pt)); }
.predrow .now {
  margin-left: auto; padding: calc(3 * var(--pt)) calc(7 * var(--pt));
  border-radius: var(--r-pill); background: #fff; color: #4A48C8;
  font-size: calc(11 * var(--pt)); font-weight: 750;
}

/* The app's prediction block on a full-diary dog card: indigo, two
   columns (Next poop | Next pee) and, for a Free account whose
   notification choice is still open, "Get a heads-up -> PRO".
   Markup: .predict > .pr-col*2 (img + .pr-k + .pr-v [+ .pr-now]) + .pr-cta */
.predict {
  display: grid; grid-template-columns: 1fr 1fr;
  padding: calc(12 * var(--pt)) calc(14 * var(--pt)) calc(11 * var(--pt));
  border-radius: calc(18 * var(--pt));
  background: #4F46E5; color: #fff;
  box-shadow: 0 calc(6 * var(--pt)) calc(18 * var(--pt)) rgba(79, 70, 229, 0.28);
}
.pr-col { display: grid; grid-template-columns: calc(26 * var(--pt)) 1fr; column-gap: calc(8 * var(--pt)); align-items: center; }
.pr-col + .pr-col { border-left: 1px solid rgba(255, 255, 255, 0.28); padding-left: calc(12 * var(--pt)); }
.pr-col img { width: calc(26 * var(--pt)); height: calc(26 * var(--pt)); object-fit: contain; grid-row: span 2; }
.pr-k { font-size: calc(13 * var(--pt)); display: flex; align-items: center; gap: calc(5 * var(--pt)); color: rgba(255, 255, 255, 0.85); }
.pr-v { font: 600 calc(17 * var(--pt))/1.15 var(--font-body); font-variant-numeric: tabular-nums; white-space: nowrap; display: flex; align-items: center; gap: calc(5 * var(--pt)); }
.pr-now {
  padding: calc(2 * var(--pt)) calc(6 * var(--pt)); border-radius: var(--r-pill);
  background: #fff; color: #4A48C8; font-size: calc(10 * var(--pt)); font-weight: 750;
}
.pr-cta {
  grid-column: 1 / -1; display: flex; align-items: center; gap: calc(6 * var(--pt));
  margin-top: calc(9 * var(--pt)); font-weight: 600; font-size: calc(14 * var(--pt));
}
.pr-cta svg { width: calc(15 * var(--pt)); height: calc(15 * var(--pt)); }
.pr-pro { padding: calc(2 * var(--pt)) calc(7 * var(--pt)); border-radius: var(--r-pill); background: #fff; color: #4A48C8; font-size: calc(11 * var(--pt)); font-weight: 750; }
@media (prefers-color-scheme: dark) { .predict { background: #5B54F0; } }

.caps { display: grid; grid-template-columns: 1.55fr 1fr; gap: calc(10 * var(--pt)); }
.cap {
  display: flex; align-items: center; justify-content: center; gap: calc(9 * var(--pt));
  height: calc(56 * var(--pt)); border-radius: var(--r-pill);
  border: 1px solid var(--scr-glass-line);
  box-shadow: var(--scr-shadow);
  font-size: calc(26 * var(--pt)); font-weight: 300; color: var(--scr-ink);
}
.cap img { width: calc(28 * var(--pt)); height: calc(28 * var(--pt)); object-fit: contain; }
.cap-log { background: linear-gradient(120deg, #F7B4F2 0%, #D7B2FA 55%, #C5B4FB 100%); color: #2B0F57; }
.cap-care { background: var(--scr-glass); }
@media (prefers-color-scheme: dark) { .cap-log { background: linear-gradient(120deg, #8E3FB0, #5E3CC0); color: #fff; } }

.tabbar {
  position: absolute; z-index: 15;
  left: calc(14 * var(--pt)); right: calc(14 * var(--pt)); bottom: calc(22 * var(--pt));
  height: calc(64 * var(--pt));
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  padding: 0 calc(6 * var(--pt));
  border-radius: var(--r-pill);
  background: var(--scr-glass); border: 1px solid var(--scr-glass-line);
  box-shadow: var(--scr-shadow);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  backdrop-filter: blur(16px) saturate(1.6);
}
.tab {
  display: grid; justify-items: center; gap: calc(3 * var(--pt));
  font-size: calc(10.5 * var(--pt)); font-weight: 600; color: var(--scr-ink);
}
.tab svg, .tab .glyph { width: calc(24 * var(--pt)); height: calc(24 * var(--pt)); }
.tab.on {
  color: #2E7CF6;
  background: color-mix(in srgb, var(--scr-ink) 7%, transparent);
  border-radius: var(--r-pill);
  padding: calc(6 * var(--pt)) 0;
}

/* A bottom sheet over the app (New Entry, the check-in, the scanner). */
.sheet {
  position: absolute; z-index: 30; left: 0; right: 0; bottom: 0; top: calc(64 * var(--pt));
  border-radius: calc(38 * var(--pt)) calc(38 * var(--pt)) 0 0;
  background: var(--scr-bg);
  box-shadow: 0 calc(-8 * var(--pt)) calc(40 * var(--pt)) rgba(0, 0, 0, 0.16);
  padding: calc(14 * var(--pt)) calc(16 * var(--pt));
}
.sheet-grab { width: calc(36 * var(--pt)); height: calc(5 * var(--pt)); border-radius: 3px; background: var(--scr-ink-3); margin: 0 auto calc(10 * var(--pt)); }
.sheet-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: calc(12 * var(--pt)); font-weight: 600; font-size: calc(17 * var(--pt)); }
.sheet-bar .gbtn { height: calc(38 * var(--pt)); padding: 0 calc(14 * var(--pt)); font-size: calc(15 * var(--pt)); font-weight: 600; }
.sheet-bar .gbtn.primary { background: #5B2EE8; color: #fff; border-color: transparent; }
.group { background: var(--scr-card); border-radius: calc(16 * var(--pt)); padding: calc(12 * var(--pt)); margin-bottom: calc(12 * var(--pt)); }
.group-k { font-size: calc(13 * var(--pt)); color: var(--scr-ink-2); text-transform: none; margin: 0 0 calc(6 * var(--pt)) calc(4 * var(--pt)); }

/* The glass choice picker: icon over word, a lens on the choice. */
.gpick {
  position: relative;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: calc(4 * var(--pt));
  border-radius: var(--r-pill);
  background: var(--scr-fill);
}
.gpick button {
  position: relative; z-index: 1;
  display: grid; justify-items: center; gap: calc(2 * var(--pt));
  padding: calc(6 * var(--pt)) 0 calc(5 * var(--pt));
  border: 0; background: none; cursor: pointer;
  font: 600 calc(12 * var(--pt))/1 var(--font-body); color: var(--scr-ink);
}
.gpick img { width: calc(30 * var(--pt)); height: calc(30 * var(--pt)); object-fit: contain; }
.gpick-lens {
  position: absolute; z-index: 0; top: calc(4 * var(--pt)); bottom: calc(4 * var(--pt));
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--lens, #8B5E3C) 16%, var(--scr-card));
  box-shadow: 0 calc(2 * var(--pt)) calc(8 * var(--pt)) rgba(0, 0, 0, 0.1), inset 0 0 0 1px var(--scr-glass-line);
  transition: left 0.5s var(--spring-land), width 0.5s var(--spring-land), background 0.3s;
}

/* Segmented control and list rows. */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: calc(2 * var(--pt)); border-radius: calc(9 * var(--pt)); background: var(--scr-fill); }
.seg span { text-align: center; padding: calc(6 * var(--pt)) 0; border-radius: calc(7 * var(--pt)); font-size: calc(13 * var(--pt)); font-weight: 500; }
.seg span.on { background: var(--scr-card); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); font-weight: 600; }
.row { display: flex; align-items: center; justify-content: space-between; gap: calc(8 * var(--pt)); padding: calc(11 * var(--pt)) 0; border-bottom: 1px solid var(--scr-sep); font-size: calc(16 * var(--pt)); }
.row:last-child { border-bottom: 0; }
.row .v { color: var(--scr-ink-2); }

/* The 7-day rhythm chart (DogRhythmChart), drawn by Pooppy.rhythm(). */
.rhythm { display: grid; gap: calc(3 * var(--pt)); }
.rh-row { display: grid; grid-template-columns: calc(40 * var(--pt)) 1fr; align-items: center; height: calc(15 * var(--pt)); }
.rh-day { font-size: calc(10.5 * var(--pt)); color: var(--scr-ink-2); font-weight: 600; }
.rh-track { position: relative; height: 100%; border-radius: 4px; }
.rh-track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--scr-sep); opacity: 0.6; }
.rh-row:nth-child(even) .rh-track { background: color-mix(in srgb, var(--scr-ink) 4%, transparent); }
.rh-band {
  position: absolute; top: calc(-2 * var(--pt)); bottom: calc(-2 * var(--pt));
  border-radius: calc(5 * var(--pt));
  background: color-mix(in srgb, var(--scr-tint) 18%, transparent);
  outline: 1px solid color-mix(in srgb, var(--scr-tint) 40%, transparent);
}
.rh-mark {
  position: absolute; top: 50%;
  width: calc(14 * var(--pt)); height: calc(14 * var(--pt));
  margin: calc(-7 * var(--pt)) 0 0 calc(-7 * var(--pt));
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: calc(9.5 * var(--pt)); line-height: 1;
}
.rh-mark.poop { background: var(--c, var(--s3)); box-shadow: 0 0 0 calc(1 * var(--pt)) var(--scr-card); }
.rh-mark.pee { font-size: calc(9 * var(--pt)); }
.rh-mark.meal { opacity: 0.45; }
.rh-now { position: absolute; top: calc(-3 * var(--pt)); bottom: calc(-3 * var(--pt)); width: 1.5px; background: var(--scr-tint); border-radius: 1px; }
.rh-now::before { content: ""; position: absolute; left: 50%; top: calc(-3 * var(--pt)); width: calc(6 * var(--pt)); height: calc(6 * var(--pt)); margin-left: calc(-3 * var(--pt)); border-radius: 50%; background: var(--scr-tint); }
.rh-axis { display: grid; grid-template-columns: calc(40 * var(--pt)) 1fr; font-size: calc(9.5 * var(--pt)); color: var(--scr-ink-3); }
.rh-axis div { display: flex; justify-content: space-between; }

/* ------------------------------------------------------------------ */
/* 8 Hero                                                              */
/* ------------------------------------------------------------------ */

.hero {
  padding-top: calc(var(--topbar-h) + clamp(36px, 7vh, 84px));
  padding-bottom: clamp(56px, 9vh, 110px);
  min-height: min(100svh, 1000px);
  display: grid; align-items: center;
}
.hero-grid { display: grid; gap: clamp(24px, 4vw, 56px); grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); } }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 6px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--surface-line);
  font-weight: 650; font-size: 14px; color: var(--ink-2);
}
.eyebrow img { width: 26px; height: 26px; border-radius: 7px; }
.hero h1 {
  margin-top: 20px;
  font: 400 clamp(56px, 9.2vw, 118px)/0.94 var(--font-display);
  letter-spacing: 0.002em;
  color: var(--ink);
  text-wrap: balance;
}
.hero h1 .w { display: inline-block; }
.hero-lead {
  margin-top: 22px; max-width: 31em;
  font-size: clamp(18px, 1.7vw, 22px); line-height: 1.5; color: var(--ink-2);
  text-wrap: pretty;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 22px;
  font-size: 14px; color: var(--ink-3); font-weight: 550;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta span + span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: 0.5; margin-right: 6px; }
@media (max-width: 600px) {
  .hero h1 { font-size: clamp(48px, 14vw, 64px); margin-top: 14px; }
  .hero-lead { margin-top: 16px; }
  .hero-ctas { margin-top: 22px; }
  .eyebrow .long { display: none; }
}
@media (min-width: 601px) { .eyebrow .short { display: none; } }
.hero-meta .glyph { width: 16px; height: 16px; color: var(--ink-2); }

.hero-visual {
  position: relative;
  height: clamp(540px, 74vh, 720px);
  display: grid; place-items: center;
}
.hero-visual { --phone-w: clamp(244px, 24vw, 312px); }
.hero-visual .phone { z-index: 2; }
.hero-mascot {
  position: absolute; z-index: 3;
  place-self: normal;
  left: max(0px, calc(50% - var(--phone-w, 280px) / 2 - 118px)); top: -1%;
  width: clamp(104px, 10.5vw, 150px);
  rotate: -9deg;
}
.fl {                                     /* floating clay icons */
  position: absolute; z-index: 1;
  place-self: normal;               /* the grid's centring must not move absolute children */
  width: clamp(64px, 7vw, 96px); height: auto;
  filter: drop-shadow(0 16px 22px rgba(80, 40, 20, 0.22));
  translate: 0 var(--py, 0px);
}
.fl-poop { right: max(0px, calc(50% - 250px)); top: 14%; rotate: 10deg; }
.fl-pee { left: max(0px, calc(50% - 250px)); bottom: 18%; rotate: -12deg; }
.fl-food { right: max(4px, calc(50% - 270px)); bottom: 10%; rotate: 6deg; width: clamp(60px, 6vw, 84px); }
.fl-walk { right: max(0px, calc(50% - 300px)); top: 46%; width: clamp(80px, 8vw, 116px); z-index: 3; }
@media (min-width: 960px) and (max-height: 900px) {
  .hero-visual { --phone-w: max(236px, calc((clamp(540px, 74vh, 720px) - 24px) / 2.17)); }
}
@media (max-width: 600px) {
  /* The phone sits at the bottom of the visual, so the mascot gets the
     space above its corner instead of covering the status bar. */
  .hero-visual { height: 610px; --phone-w: 244px; }
  .hero-visual .phone { align-self: end; margin-bottom: 8px; }
  .hero-mascot { left: 4px; top: 0; width: 90px; }
  .fl-poop { right: 4px; top: 8%; }
  .fl-pee { left: 0; bottom: 14%; }
  .fl-walk { right: -4px; top: 52%; width: 84px; }
  .fl-food { right: 6px; bottom: 4%; }
}

/* ------------------------------------------------------------------ */
/* 9 Mascot                                                            */
/* ------------------------------------------------------------------ */
/* The app icon's face as vector layers (js/mascot.js gives it life:
   blinks, glances, ear perks, the tongue; a pat makes it happy). */

.mascot-btn {
  display: block; padding: 0; border: 0; background: none;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  border-radius: 22%;
  filter: drop-shadow(0 18px 28px rgba(80, 40, 10, 0.28));
  transition: transform 0.5s var(--spring-pop);
}
.mascot-btn:hover { transform: scale(1.04) rotate(2deg); }
.mascot-btn:active { transform: scale(0.96); transition-duration: 0.12s; }
.mascot { width: 100%; height: auto; overflow: visible; }
.mascot-heart {
  position: absolute; left: 50%; top: -6%;
  width: 28%; height: auto; pointer-events: none;
  opacity: 0;
}
.mascot-holder { position: relative; }
.hero-mascot.mascot-holder { position: absolute; }

.zzz { position: absolute; right: -14%; top: -12%; pointer-events: none; font: 400 30px/1 var(--font-display); color: var(--ink-2); }
.zzz span { position: absolute; opacity: 0; }
.zzz .z-still { opacity: 0.9; position: static; }
.js-motion .zzz .z-still { display: none; }

/* ------------------------------------------------------------------ */
/* 10 Closing sections: Pro, privacy, beta, FAQ, footer, cookies       */
/* ------------------------------------------------------------------ */

.section-head { text-align: center; max-width: 760px; margin: 0 auto clamp(36px, 5vw, 56px); }
.section-head .scene-title { font-size: clamp(40px, 5.6vw, 70px); }
.section-head .scene-body { margin-inline: auto; max-width: 36em; }

.plans { display: grid; gap: 18px; align-items: stretch; }
@media (min-width: 900px) { .plans { grid-template-columns: 1fr 1.08fr; } }
.plan {
  position: relative;
  padding: clamp(24px, 3vw, 34px);
  border-radius: var(--r-container);
  background: var(--surface);
  border: 1px solid var(--surface-line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.plan { display: flex; flex-direction: column; }
.plan h3 { font: 400 clamp(32px, 3.4vw, 42px)/1 var(--font-display); color: var(--ink); display: flex; align-items: center; gap: 12px; }
.plan-sub { margin-top: 8px; color: var(--ink-2); font-size: 16px; }
.plan--pro {
  background: linear-gradient(var(--surface-strong), var(--surface-strong)) padding-box,
              linear-gradient(140deg, #8B6CFF, #C44DF0 50%, rgba(255, 180, 120, 0.9)) border-box;
  border: 1.5px solid transparent;
  box-shadow: 0 30px 80px rgba(139, 108, 255, 0.3);
}
.plan-groups { display: grid; gap: 18px; margin: 22px 0 24px; }
.plan-groups h4 { margin: 0 0 6px; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 32px; font-size: 15.5px; line-height: 1.45; color: var(--ink-2); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 1px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--ok) url('/img/ui/check.svg') center / 100%;
}
.ticks strong { color: var(--ink); font-weight: 650; }
.plan--pro .ticks li::before { background-color: #8B6CFF; }
.plan-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--surface-line); display: grid; gap: 6px; font-size: 14.5px; color: var(--ink-2); }

.privacy-grid { display: grid; gap: 12px; }
@media (min-width: 700px) { .privacy-grid { grid-template-columns: repeat(3, 1fr); } }
.pcard {
  padding: 22px; border-radius: var(--r-card);
  background: var(--surface); border: 1px solid var(--surface-line);
  color: var(--ink-2); font-size: 15.5px; line-height: 1.5;
}
.pcard h3 { font: 650 17px/1.3 var(--font-body); color: var(--ink); margin: 12px 0 6px; }
.pcard .pi { width: 42px; height: 42px; border-radius: 12px; }
.pcard .pi .glyph { width: 22px; height: 22px; }

/* Beta block: removable as one piece (see the launch switch). The IDs and
   data-* attributes are js/beta.js's and js/counter.js's contract. */
.beta {
  position: relative; overflow: hidden;
  max-width: 820px; margin: 0 auto;
  padding: clamp(28px, 5vw, 56px);
  border-radius: 36px;
  text-align: center;
  background: linear-gradient(var(--surface-strong), var(--surface-strong)) padding-box,
              linear-gradient(140deg, #FFB37A, #E8489B 40%, #8B6CFF) border-box;
  border: 1.5px solid transparent;
  box-shadow: 0 30px 90px rgba(232, 72, 155, 0.25);
}
.beta h2 { font: 400 clamp(36px, 5vw, 58px)/1.02 var(--font-display); color: var(--ink); text-wrap: balance; }
.beta .body { margin: 14px auto 0; max-width: 34em; color: var(--ink-2); font-size: 18px; }
.beta .counter { margin-top: 16px; font: 750 16px/1.3 var(--font-round); color: var(--ink); }
.beta .counter .n { display: inline-block; min-width: 1.6em; padding: 2px 8px; border-radius: 8px; background: var(--sunset); color: #fff; font-variant-numeric: tabular-nums; }
.beta .nudge { margin: 10px auto 0; max-width: 36em; font-size: 15px; color: var(--ink-3); }
.beta form { display: grid; gap: 10px; margin: 26px auto 0; max-width: 620px; }
@media (min-width: 640px) { .beta form { grid-template-columns: 1fr 1fr; } .beta form input[type="email"], .beta form button { grid-column: span 1; } }
.beta input {
  height: 54px; padding: 0 18px; border-radius: 16px;
  border: 1px solid var(--surface-line); background: var(--surface);
  color: var(--ink); font: 400 17px var(--font-body);
}
.beta input::placeholder { color: var(--ink-3); }
.beta input:focus { outline: 3px solid #8B6CFF; outline-offset: 1px; }
.beta .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.beta .msgline { min-height: 1.5em; margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 600; }
.beta #beta-msg.error { color: var(--red-ink); }
.beta #beta-msg.ok { color: var(--ok-ink); }
.beta .dropicon { width: 44px; height: 44px; }
.beta .fine, .beta .consent { margin-top: 10px; font-size: 13.5px; color: var(--ink-3); }
.beta.exhausted .counter, .beta.exhausted .nudge, .beta.exhausted .fine { display: none; }

.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 10px; }
.faq details {
  border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--surface-line);
  padding: 0 20px;
}
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 0; font-weight: 650; font-size: 17px; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 12px; height: 12px;
  border-right: 2.5px solid var(--ink-3); border-bottom: 2.5px solid var(--ink-3);
  transform: rotate(45deg) translate(-3px, -3px);
  transition: transform 0.4s var(--spring-pop);
}
.faq details[open] summary::after { transform: rotate(225deg) translate(-3px, -3px); }
.faq details p { padding: 0 0 18px; color: var(--ink-2); font-size: 16px; line-height: 1.55; }

.site-foot { padding: clamp(80px, 12vh, 140px) 0 48px; text-align: center; color: var(--ink-3); font-size: 14.5px; }
.foot-mascot { position: relative; width: 120px; margin: 0 auto 18px; }
.foot-line { font: 400 clamp(26px, 3vw, 34px)/1.1 var(--font-display); color: var(--ink); margin-bottom: 26px; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 14px; }
.foot-links a, .foot-links button { color: var(--ink-2); text-decoration: none; font-weight: 600; padding-block: 11px; }
.foot-links button { border: 0; background: none; font: inherit; cursor: pointer; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; }

.cookie-bar {
  position: fixed; z-index: 60; left: 50%; bottom: 12px;
  width: min(560px, calc(100% - 20px)); transform: translateX(-50%);
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
  padding: 14px 16px 14px 20px; border-radius: 22px;
  background: rgba(255, 255, 255, 0.86); color: #1D1046;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 20px 50px rgba(29, 16, 70, 0.22);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  backdrop-filter: blur(20px) saturate(1.6);
  font-size: 14.5px; line-height: 1.45;
}
.cookie-bar p { flex: 1 1 260px; }
.cookie-bar a { color: #4A2BD0; }
.cookie-actions { display: flex; gap: 8px; margin-left: auto; }
.cookie-actions button {
  height: 40px; padding: 0 16px; border-radius: var(--r-pill); cursor: pointer;
  border: 1px solid rgba(29, 16, 70, 0.14); background: #fff; color: #1D1046; font-weight: 650;
}
.cookie-actions button[data-consent="granted"] { background: #5B2EE8; color: #fff; border-color: transparent; }
@media (prefers-color-scheme: dark) {
  .cookie-bar { background: rgba(30, 22, 66, 0.88); color: #F7F3FF; border-color: rgba(255, 255, 255, 0.14); }
  .cookie-bar a { color: #C9B8FF; }
  .cookie-actions button { background: rgba(255, 255, 255, 0.1); color: #fff; border-color: rgba(255, 255, 255, 0.2); }
}

/* ------------------------------------------------------------------ */
/* 11 Motion                                                           */
/* ------------------------------------------------------------------ */
/* boot.js stamps js-motion before first paint only when motion is
   allowed and IntersectionObserver exists; without it everything shows
   in its final state. --i staggers siblings by 70 ms. */

.js-motion .reveal {
  opacity: 0;
  translate: 0 26px;
  transition:
    opacity 0.5s var(--ease-fade) calc(var(--i, 0) * 70ms),
    translate var(--spring-enter-ms) var(--spring-enter) calc(var(--i, 0) * 70ms);
}
.js-motion .reveal.in { opacity: 1; translate: 0 0; }
.js-motion .reveal-pop { opacity: 0; scale: 0.86; transition: opacity 0.35s var(--ease-fade) calc(var(--i, 0) * 70ms), scale var(--spring-pop-ms) var(--spring-pop) calc(var(--i, 0) * 70ms); }
.js-motion .reveal-pop.in { opacity: 1; scale: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  .btn, .mascot-btn { transition: none; }
}

/* ------------------------------------------------------------------ */
/* 12 Launch switch                                                    */
/* ------------------------------------------------------------------ */
/* <html data-launch="beta"> today. On App Store day: set it to "live",
   put the App Store URL on the .when-live links (and Apple's badge art),
   then delete the #beta section and its two scripts at leisure. */

html[data-launch="beta"] .when-live,
html[data-launch="live"] .when-beta { display: none !important; }

/* The landing beat's ring (hero and any scene that lands a log). */
.land-ring {
  position: absolute; left: calc(10 * var(--pt)); top: calc(10 * var(--pt));
  width: calc(24 * var(--pt)); height: calc(24 * var(--pt));
  border-radius: 50%; border: calc(2 * var(--pt)) solid #8B6CFF;
  opacity: 0; pointer-events: none;
}
.run-block { margin-top: clamp(40px, 6vw, 72px); }
.run-grid { display: grid; gap: clamp(28px, 4vw, 56px); align-items: center; }
@media (min-width: 960px) { .run-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.run-copy { max-width: 640px; }
.run-title { display: flex; align-items: center; gap: 10px; font: 400 clamp(28px, 3vw, 38px)/1.1 var(--font-display); color: var(--ink); }
.run-title .glyph { width: 1.3em; height: 1em; }
.run-copy p { margin-top: 10px; color: var(--ink-2); font-size: 17px; }
/* Pro features planned but not in the app yet carry data-planned="food" or
   "run"; <html data-hide-planned="run food"> hides the listed groups. */
html[data-hide-planned~="run"] [data-planned="run"],
html[data-hide-planned~="food"] [data-planned="food"],
html[data-hide-planned~="programs"] [data-planned="programs"],
html[data-hide-planned~="run"] .pro-row:not(:has(> :not([data-planned="run"]))),
html[data-hide-planned~="food"] .pro-row:not(:has(> :not([data-planned="food"]))) { display: none !important; }

/* ------------------------------------------------------------------ */
/* 13 Documents: privacy, terms, invite (English tree)                 */
/* ------------------------------------------------------------------ */
/* A calm, static midday sky; no scroll story. Dark appearance gets the
   night ink (the home page sets it through sky.js instead). */

@media (prefers-color-scheme: dark) {
  html.doc-root {
    color-scheme: dark;
    --ink: #F7F3FF; --ink-2: rgba(247, 243, 255, 0.8); --ink-3: rgba(247, 243, 255, 0.58);
    --surface: rgba(255, 255, 255, 0.08); --surface-strong: rgba(36, 26, 82, 0.86);
    --surface-line: rgba(255, 255, 255, 0.14);
    --glass: rgba(24, 16, 64, 0.42); --glass-strong: rgba(24, 16, 64, 0.66); --glass-line: rgba(255, 255, 255, 0.16);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.2), 0 10px 30px rgba(0, 0, 0, 0.25);
    --link: #C9B8FF; --ok-ink: #6FE08E; --red-ink: #FF8A80;
  }
}
.doc-sky {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vmax 40vmax at 85% -10%, rgba(255, 236, 200, 0.7), transparent 60%),
    linear-gradient(180deg, #D5DDFF 0%, #ECEBFE 45%, #FFF5EC 100%);
}
@media (prefers-color-scheme: dark) {
  .doc-sky {
    background:
      radial-gradient(50vmax 34vmax at 85% -10%, rgba(170, 150, 255, 0.25), transparent 60%),
      linear-gradient(180deg, #140D3E 0%, #22165A 55%, #2F1D60 100%);
  }
}
.topbar .lang {
  color: var(--ink-2); font-weight: 650; font-size: 15px; text-decoration: none;
  padding: 8px 12px; border-radius: var(--r-pill);
}
.topbar .lang:hover { color: var(--ink); background: var(--surface); }
.doc {
  width: min(800px, calc(100% - 2 * var(--gutter)));
  margin: calc(var(--topbar-h) + clamp(28px, 6vh, 64px)) auto 40px;
  padding: clamp(24px, 5vw, 56px);
  border-radius: var(--r-container);
  background: var(--surface-strong);
  border: 1px solid var(--surface-line);
  box-shadow: var(--shadow-1);
}
.doc-mark { width: 64px; height: 64px; border-radius: 15px; margin-bottom: 18px; box-shadow: 0 8px 20px rgba(80, 40, 10, 0.25); }
.doc h1 { font: 400 clamp(36px, 5vw, 54px)/1.05 var(--font-display); color: var(--ink); text-wrap: balance; }
.doc h2 { font: 700 21px/1.3 var(--font-body); color: var(--ink); margin: 36px 0 10px; letter-spacing: -0.01em; }
.doc p, .doc li { color: var(--ink-2); font-size: 17px; line-height: 1.62; }
.doc p + p { margin-top: 12px; }
.doc ul, .doc ol { margin: 10px 0; padding-left: 1.25em; display: grid; gap: 8px; }
.doc strong { color: var(--ink); font-weight: 650; }
.doc .muted { color: var(--ink-3); font-size: 15px; margin-top: 12px; }
.doc code { font: 500 0.9em ui-monospace, SFMono-Regular, Menlo, monospace; padding: 2px 6px; border-radius: 6px; background: var(--surface); }
.doc .lead { font-size: 19px; color: var(--ink-2); margin-top: 12px; }
.doc-steps { list-style: none; padding: 0 !important; margin: 26px 0 !important; display: grid; gap: 12px !important; counter-reset: step; }
.doc-steps li {
  position: relative; counter-increment: step;
  padding: 16px 18px 16px 62px; border-radius: var(--r-card);
  background: var(--surface); border: 1px solid var(--surface-line);
}
.doc-steps li::before {
  content: counter(step);
  position: absolute; left: 16px; top: 15px;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--cta); color: #fff; font: 750 16px/1 var(--font-round);
}
.doc-foot { text-align: center; color: var(--ink-3); font-size: 14.5px; padding: 8px 0 44px; }
.doc-foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 10px; }
.doc-foot a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.doc-foot a:hover { color: var(--ink); text-decoration: underline; }

/* Chromium only (boot.js): no glass blur anywhere; the translucent fills
   carry the glass. Backdrop-filter surfaces made Chrome drop layers for
   single frames (the hero blinked, then the header). Safari keeps them. */
html.chromium * {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
/* The fixed header blinked too while it kept its blur: an almost opaque
   fill instead (Safari keeps the glass). */
html.chromium .topbar, html.chromium .daymenu { background: rgba(255, 255, 255, 0.92); }
html.chromium[data-ink="light"] .topbar, html.chromium[data-ink="light"] .daymenu { background: rgba(30, 20, 76, 0.9); }
@media (prefers-color-scheme: dark) {
  html.chromium:not([data-ink="dark"]) .topbar, html.chromium:not([data-ink="dark"]) .daymenu { background: rgba(30, 20, 76, 0.9); }
}
html.chromium .btn-ghost { background: var(--surface-strong); }
html.chromium .notif { background: rgba(246, 246, 250, 0.92); }
html.chromium .tabbar { background: color-mix(in srgb, var(--scr-card) 88%, transparent); }
@media (prefers-color-scheme: dark) {
  html.chromium .notif { background: rgba(38, 36, 46, 0.94); }
}

/* ------------------------------------------------------------------ */
/* 14 Language menu (header, every page)                               */
/* ------------------------------------------------------------------ */
/* A <details> menu so it works without script; js/lang.js closes it on
   an outside click. New languages are new list items. */
.langpick { position: relative; flex: none; }
.langpick > summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 12px 0 10px;
  border: 1px solid var(--surface-line); border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink);
  font: 700 14px/1 var(--font-round); letter-spacing: 0.02em;
}
.langpick > summary::-webkit-details-marker { display: none; }
.langpick > summary svg { width: 17px; height: 17px; }
.langmenu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  min-width: 170px; margin: 0; padding: 6px; list-style: none;
  border-radius: 18px;
  background: var(--glass-strong); border: 1px solid var(--glass-line);
  box-shadow: var(--shadow-2);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(24px) saturate(1.6);
}
.langmenu a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px;
}
.langmenu a:hover { background: var(--surface); }
.langmenu a[aria-current="true"]::after {
  content: ""; width: 16px; height: 16px; border-radius: 50%; flex: none;
  background: #8B6CFF url('/img/ui/check.svg') center / 100%;
}
html.chromium .langmenu { background: rgba(255, 255, 255, 0.96); }
html.chromium[data-ink="light"] .langmenu { background: rgba(30, 20, 76, 0.96); }
@media (prefers-color-scheme: dark) { html.chromium:not([data-ink="dark"]) .langmenu { background: rgba(30, 20, 76, 0.96); } }
@media (max-width: 420px) {
  .langpick > summary { padding: 0 9px; gap: 4px; }
  .langpick > summary svg { display: none; }
}

/* ------------------------------------------------------------------ */
/* 15 Phone menu (under 900 px): sections, language, pause             */
/* ------------------------------------------------------------------ */
.navmenu { position: static; flex: none; }
.navmenu > summary {
  list-style: none; cursor: pointer;
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--surface-line); border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink);
}
.navmenu > summary::-webkit-details-marker { display: none; }
.nm-bars { position: relative; width: 16px; height: 12px; }
.nm-bars i {
  position: absolute; left: 0; width: 16px; height: 2px; border-radius: 1px; background: currentColor;
  transition: transform 0.35s var(--spring-pop), opacity 0.2s;
}
.nm-bars i:nth-child(1) { top: 0; } .nm-bars i:nth-child(2) { top: 5px; } .nm-bars i:nth-child(3) { top: 10px; }
.navmenu[open] .nm-bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.navmenu[open] .nm-bars i:nth-child(2) { opacity: 0; }
.navmenu[open] .nm-bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
.navpanel {
  position: fixed; z-index: 49; top: 74px; left: 10px; right: 10px;
  max-height: calc(100dvh - 90px); overflow-y: auto;
  padding: 8px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.95); border: 1px solid var(--glass-line);
  box-shadow: var(--shadow-2);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(24px) saturate(1.6);
}
html[data-ink="light"] .navpanel { background: rgba(30, 20, 76, 0.95); }
@media (prefers-color-scheme: dark) { html:not([data-ink="dark"]) .navpanel { background: rgba(30, 20, 76, 0.95); } }
.np-links { display: grid; }
.np-links a, .np-langs a {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 48px; padding: 0 14px; border-radius: 14px;
  color: var(--ink); text-decoration: none; font-weight: 650; font-size: 17px;
}
.np-links a:hover, .np-langs a:hover { background: var(--surface); }
.np-k { margin: 8px 14px 2px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.np-langs { list-style: none; margin: 0; padding: 0; }
.np-langs a[aria-current="true"]::after {
  content: ""; width: 18px; height: 18px; border-radius: 50%; flex: none;
  background: #8B6CFF url('/img/ui/check.svg') center / 100%;
}
.np-motion {
  width: 100%; min-height: 48px; margin-top: 6px; padding: 0 14px;
  border: 0; border-radius: 14px; background: var(--surface); color: var(--ink);
  font: 650 16px/1.2 var(--font-body); text-align: left; cursor: pointer;
}
@media (min-width: 900px) { .navmenu { display: none; } }
@media (max-width: 899px) { .topbar .langpick { display: none; } }
/* Pro builds on Free: the card says so before its list. */
.plan-plus {
  display: flex; align-items: center; gap: 10px;
  margin-top: 18px; padding: 10px 14px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(139, 108, 255, 0.16), rgba(196, 77, 240, 0.12));
  color: var(--ink); font-weight: 750; font-size: 16px;
}
.plan-plus span {
  width: 24px; height: 24px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--pro-glow); color: #fff; font-size: 17px; line-height: 1;
}
.plan--pro .plan-groups { margin-top: 16px; }
