/* Salt Track: small doses of salt, all day long. PlusPouch colors (navy and sky) with the tin's lemon and lime. Phone first. */

:root {
  --sky-0: #f7fbff;
  --sky-1: #eef5ff;
  --sky-2: #e3eefc;
  --sky-3: #cfe0f6;
  --line: #dde8f6;
  --paper: #ffffff;
  --navy: #173b68;
  --navy-2: #1f4f88;
  --navy-3: #2d63a3;
  --ink: #10233d;
  --ink-2: #26394f;
  --ink-soft: #4d6079;
  --muted: #7f91a9;
  --plus: #3d9be0;
  --lemon: #ffd43b;
  --lemon-2: #ffe680;
  --lemon-deep: #e2a300;
  --lemon-ink: #8a6400;
  --lime: #8cc63f;
  --lime-deep: #4f9a2c;
  --lime-tint: #eaf6dc;
  --alert: #c2543a;
  --alert-tint: #fbe9e3;

  --display: "Unbounded", "Arial Rounded MT Bold", "Helvetica Neue", Arial, sans-serif;
  --sans: "Assistant", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;

  --r: 24px;
  --r-sm: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --top-h: 58px;
  --tab-h: 66px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --pad: 16px;
  --shadow: 0 1px 0 rgba(23, 59, 104, .04), 0 10px 28px -16px rgba(23, 59, 104, .28);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--sky-1); }
body {
  font-family: var(--sans); font-weight: 400; font-size: 16.5px; line-height: 1.5;
  color: var(--ink-2); background: linear-gradient(180deg, var(--sky-0) 0, var(--sky-1) 420px, var(--sky-1) 100%);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  min-height: 100dvh; overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--lemon-2); color: var(--ink); }
:focus-visible { outline: 2.5px solid var(--plus); outline-offset: 3px; border-radius: 10px; }

h1, h2, h3, .display { font-family: var(--display); color: var(--ink); letter-spacing: -.01em; font-weight: 600; }
.h1 { font-size: 26px; line-height: 1.15; }
.h2 { font-size: 21px; line-height: 1.2; }
.h3 { font-size: 16px; line-height: 1.3; }
.label { font-family: var(--sans); font-weight: 800; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.lede { font-size: 17.5px; color: var(--ink-soft); }
.meta { font-size: 15px; color: var(--ink-soft); }
.small { font-size: 14px; color: var(--muted); }
.center { text-align: center; }
.link { color: var(--navy-2); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack > * + * { margin-top: 12px; }

/* ───────── chrome */
.top {
  position: sticky; top: 0; z-index: 30;
  height: calc(var(--top-h) + var(--safe-t)); padding: var(--safe-t) var(--pad) 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: rgba(247, 251, 255, .86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
body.scrolled .top { border-bottom-color: var(--line); }
.wordmark { display: inline-flex; align-items: center; gap: 9px; font-family: var(--display); font-weight: 700; font-size: 17px; color: var(--navy); text-decoration: none; letter-spacing: -.01em; }
.wm-mark { width: 26px; height: auto; margin-top: -4px; }
.wm-dot { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6b8, var(--lemon) 45%, var(--lemon-deep)); box-shadow: inset 0 0 0 2px rgba(226, 163, 0, .55); position: relative; }
.wm-dot::after { content: ""; position: absolute; width: 11px; height: 6px; border-radius: 0 100% 0 100%; background: var(--lime); top: -3px; right: -4px; transform: rotate(-18deg); }
.top-tabs { display: none; gap: 6px; align-items: center; }
.top-tabs a { font-weight: 700; font-size: 15px; text-decoration: none; color: var(--ink-soft); padding: 8px 14px; border-radius: 999px; }
.top-tabs a.on { color: var(--navy); background: var(--sky-2); }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--tab-h) + var(--safe-b)); padding: 0 8px var(--safe-b);
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(1.4) blur(16px); backdrop-filter: saturate(1.4) blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 700; position: relative; }
.tabbar a svg { width: 27px; height: 27px; }
.tabbar a.on { color: var(--navy); }
.tabbar a.on .ti { background: var(--sky-2); }
.tabbar .ti { display: grid; place-items: center; width: 54px; height: 32px; border-radius: 999px; transition: background .25s; }
@media (min-width: 860px) {
  .top-tabs { display: flex; }
  .tabbar { display: none; }
}

/* ───────── page frame */
main { display: block; }
.view { max-width: 560px; margin: 0 auto; padding: 14px var(--pad) calc(var(--tab-h) + var(--safe-b) + 40px); animation: rise .38s var(--ease); }
body.bare .view { padding-bottom: calc(var(--safe-b) + 40px); }
@media (min-width: 860px) { .view { padding-bottom: 80px; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.section { margin-top: 26px; }
.section > .label { display: block; margin: 0 4px 10px; }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.card + .card { margin-top: 12px; }
.card-link { display: block; text-decoration: none; color: inherit; transition: transform .2s var(--ease); }
.card-link:active { transform: scale(.99); }

/* ───────── buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  background: var(--navy); color: #fff; font-weight: 800; font-size: 16.5px; letter-spacing: .01em; text-decoration: none;
  transition: transform .18s var(--ease), background .2s, box-shadow .2s; box-shadow: 0 8px 18px -10px rgba(23, 59, 104, .7);
}
.btn:hover { background: var(--navy-2); }
.btn:active { transform: scale(.97); }
.btn.ghost { background: var(--paper); color: var(--navy); border: 1.5px solid var(--sky-3); box-shadow: none; }
.btn.ghost:hover { background: var(--sky-0); }
.btn.lemon { background: var(--lemon); color: var(--ink); box-shadow: 0 8px 18px -10px rgba(226, 163, 0, .9); }
.btn.lemon:hover { background: #ffdc5c; }
.btn.small { min-height: 42px; padding: 0 18px; font-size: 15px; }
.btn.block { display: flex; width: 100%; }
.btn.busy { pointer-events: none; opacity: .8; }
.btn svg { width: 20px; height: 20px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.spin { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.x-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); flex: none; font-size: 24px; line-height: 1; }
.x-btn:hover { background: var(--sky-1); }

/* ───────── segmented control */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--sky-2); border-radius: 999px; padding: 4px; gap: 2px; }
.seg a, .seg button { text-align: center; text-decoration: none; font-weight: 800; font-size: 15px; color: var(--ink-soft); padding: 9px 10px; border-radius: 999px; transition: background .2s, color .2s; }
.seg .on { background: var(--paper); color: var(--navy); box-shadow: 0 2px 8px -3px rgba(23, 59, 104, .3); }

/* ───────── Zest the lemon */
.zest { position: relative; width: var(--zs); flex: none; }
.center .zest, .center > .zest { margin-left: auto; margin-right: auto; }
.row-between > svg { width: 22px; height: 22px; flex: none; color: var(--muted); }
.zest svg { overflow: visible; width: 100%; height: auto; }
.zest .z-bob { transform-box: fill-box; transform-origin: 50% 100%; animation: bob 3.2s ease-in-out infinite; }
.zest .z-shadow { transform-box: fill-box; transform-origin: 50% 50%; animation: shadow 3.2s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes shadow { 0%, 100% { transform: scaleX(1); opacity: .13; } 50% { transform: scaleX(.86); opacity: .09; } }
.zest .z-blink { transform-box: fill-box; transform-origin: 50% 55%; animation: blink 4.6s infinite; }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.08); } }
.zest .z-arm { transform-box: view-box; transition: transform .35s var(--spring); }
.zest .z-arm-l { transform-origin: 31px 104px; }
.zest .z-arm-r { transform-origin: 129px 104px; }
.zest .z-leaf { transform-box: view-box; transform-origin: 80px 27px; animation: leaf 3.2s ease-in-out infinite; }
@keyframes leaf { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-6deg); } }
.zest .z-wink, .zest .z-joy, .zest .z-sleep, .zest .z-brows, .zest .z-shades, .zest .z-open, .zest .z-oh, .zest .z-zz { display: none; }
.zest[data-mood="cheer"] .z-eyes { display: none; }
.zest[data-mood="cheer"] .z-joy, .zest[data-mood="cheer"] .z-open { display: inline; }
.zest[data-mood="cheer"] .z-smile { display: none; }
.zest[data-mood="cheer"] .z-arm-l { transform: rotate(96deg); }
.zest[data-mood="cheer"] .z-arm-r { transform: rotate(-96deg); }
.zest[data-mood="wink"] .z-eyes { display: none; }
.zest[data-mood="wink"] .z-wink { display: inline; }
.zest[data-mood="talk"] .z-smile { animation: talkA .36s steps(1) infinite; }
.zest[data-mood="talk"] .z-open { display: inline; animation: talkB .36s steps(1) infinite; }
@keyframes talkA { 0% { opacity: 1; } 50% { opacity: 0; } }
@keyframes talkB { 0% { opacity: 0; } 50% { opacity: 1; } }
.zest[data-mood="talk"] .z-arm-r { animation: wave 1.1s ease-in-out infinite; }
@keyframes wave { 0%, 100% { transform: rotate(-60deg); } 50% { transform: rotate(-100deg); } }
.zest[data-mood="worried"] .z-brows, .zest[data-mood="worried"] .z-oh { display: inline; }
.zest[data-mood="worried"] .z-smile { display: none; }
.zest[data-mood="worried"] .z-arm-l { transform: rotate(40deg); }
.zest[data-mood="worried"] .z-arm-r { transform: rotate(-40deg); }
.zest[data-mood="sleepy"] .z-eyes { display: none; }
.zest[data-mood="sleepy"] .z-sleep, .zest[data-mood="sleepy"] .z-zz { display: inline; }
.zest[data-mood="sleepy"] .z-bob { animation-duration: 5s; }
.zest[data-mood="sleepy"] .z-zz { animation: zz 2.4s ease-in-out infinite; }
@keyframes zz { 0%, 100% { opacity: .35; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-4px); } }
.zest[data-mood="cool"] .z-eyes { display: none; }
.zest[data-mood="cool"] .z-shades { display: inline; }
.zest.jump .z-bob { animation: jump .8s var(--ease) 1, bob 3.2s ease-in-out .8s infinite; }
@keyframes jump {
  0% { transform: translateY(0) scale(1, 1); }
  14% { transform: translateY(0) scale(1.1, .88); }
  38% { transform: translateY(-26px) scale(.94, 1.08); }
  62% { transform: translateY(0) scale(1.08, .92); }
  80% { transform: translateY(-5px) scale(.98, 1.02); }
  100% { transform: translateY(0) scale(1, 1); }
}
.zest.tap .z-bob { animation: tapw .5s var(--ease) 1, bob 3.2s ease-in-out .5s infinite; }
@keyframes tapw { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-7deg); } 60% { transform: rotate(6deg); } }
.sparkles { position: absolute; inset: 0; pointer-events: none; }
.sparkles i { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px; border-radius: 3px; transform: rotate(45deg) scale(0); animation: spark 1.1s var(--ease) var(--d) forwards; }
.sparkles i.lemon { background: var(--lemon); }
.sparkles i.lime { background: var(--lime); border-radius: 50%; }
.sparkles i.sky { background: #8ec9f0; width: 9px; height: 9px; }
@keyframes spark {
  0% { transform: translate(0, 0) rotate(45deg) scale(0); opacity: 1; }
  45% { opacity: 1; transform: translate(var(--x), var(--y)) rotate(160deg) scale(1.1); }
  100% { transform: translate(calc(var(--x) * 1.25), calc(var(--y) * 1.25 + 18px)) rotate(260deg) scale(0); opacity: 0; }
}

/* speech bubble */
.bubble { position: relative; background: var(--paper); color: var(--ink); border-radius: 20px; padding: 12px 15px; font-weight: 600; font-size: 16px; line-height: 1.38; box-shadow: 0 6px 18px -10px rgba(16, 35, 61, .45); }
.bubble::before { content: ""; position: absolute; left: -7px; bottom: 18px; width: 16px; height: 16px; background: inherit; border-radius: 3px; transform: rotate(45deg); }
.bubble .typed { white-space: pre-wrap; }

/* ───────── Today: the hero */
.hero {
  margin-top: 14px; border-radius: 28px; padding: 18px 18px 16px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(120% 90% at 0% 0%, rgba(255, 212, 59, .22), transparent 55%), linear-gradient(160deg, var(--navy-2) 0%, var(--navy) 60%, #12305a 100%);
  box-shadow: 0 18px 40px -22px rgba(23, 59, 104, .9);
}
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(140, 198, 63, .25), transparent 70%); pointer-events: none; }
.hero-top { display: flex; align-items: flex-end; gap: 12px; position: relative; z-index: 1; }
.hero-top .zest { margin: -6px -4px -8px -6px; cursor: pointer; }
.hero-top .bubble { flex: 1; margin-bottom: 18px; min-height: 48px; }
.hero-count { display: flex; align-items: baseline; gap: 10px; margin-top: 16px; position: relative; z-index: 1; }
.hero-count b { font-family: var(--display); font-weight: 700; font-size: 54px; line-height: 1; color: #fff; letter-spacing: -.03em; }
.hero-count b.pop { animation: pop .5s var(--spring); }
@keyframes pop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }
.hero-count span { font-size: 18px; font-weight: 700; color: #cfe0f6; }
.hero-count .streak { margin-left: auto; align-self: center; }
.reasons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; position: relative; z-index: 1; }
.reasons span { font-size: 13px; font-weight: 800; color: var(--ink); background: var(--lemon); padding: 4px 10px; border-radius: 999px; }
.reasons span.lime { background: var(--lime); }
.reasons span.sky { background: #bfe0f7; }
.next { margin-top: 8px; font-size: 15px; color: #cfe0f6; font-weight: 600; position: relative; z-index: 1; }
.next b { color: #fff; }

/* the day as a line: hollow rings where doses are due, lemons where they landed */
.rhythm { position: relative; height: 54px; margin: 16px 6px 0; z-index: 1; }
.rhythm .track { position: absolute; left: 0; right: 0; top: 20px; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .16); }
.rhythm .done-track { position: absolute; left: 0; top: 20px; height: 6px; border-radius: 6px; background: linear-gradient(90deg, rgba(255, 212, 59, .25), rgba(255, 212, 59, .55)); }
.rhythm .slot { position: absolute; top: 14px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; border: 2.5px dashed rgba(255, 255, 255, .5); }
.rhythm .slot.due { border-color: var(--lemon); border-style: solid; animation: due 1.6s ease-in-out infinite; }
@keyframes due { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 212, 59, .5); } 50% { box-shadow: 0 0 0 7px rgba(255, 212, 59, 0); } }
.rhythm .dose { position: absolute; top: 11px; width: 24px; height: 24px; margin-left: -12px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6b8, var(--lemon) 45%, var(--lemon-deep)); box-shadow: 0 0 0 2.5px var(--navy), 0 4px 10px -2px rgba(0, 0, 0, .4); }
.rhythm .dose.big { width: 30px; height: 30px; margin-left: -15px; top: 8px; box-shadow: 0 0 0 2.5px var(--navy), 0 0 0 5px var(--alert); }
.rhythm .dose.new { animation: drop .6s var(--spring); }
@keyframes drop { 0% { transform: translateY(-30px) scale(.4); opacity: 0; } 100% { transform: none; opacity: 1; } }
.rhythm .now { position: absolute; top: 4px; bottom: 12px; width: 2px; margin-left: -1px; background: #fff; border-radius: 2px; opacity: .85; }
.rhythm .now::after { content: "now"; position: absolute; top: -2px; left: 6px; font-size: 11px; font-weight: 800; letter-spacing: .04em; color: #fff; }
.rhythm .ends { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: #a9c1df; }

/* ───────── Today: logging */
.quick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.q {
  display: flex; align-items: center; gap: 11px; padding: 12px 12px; min-height: 66px; border-radius: 20px;
  background: var(--paper); border: 1.5px solid var(--line); text-align: left; box-shadow: var(--shadow);
  transition: transform .15s var(--ease), border-color .2s;
}
.q:active { transform: scale(.96); }
.q.usual { border-color: var(--lemon); background: linear-gradient(135deg, #fffbe6, #fff); }
.q .qi { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--sky-1); overflow: hidden; }
.q .qi img { width: 100%; height: 100%; object-fit: cover; }
.q .qi svg { width: 40px; height: 40px; }
.q b { display: block; font-weight: 800; font-size: 15.5px; color: var(--ink); line-height: 1.2; }
.q small { display: block; font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 1px; }
.q.more { justify-content: center; color: var(--navy); font-weight: 800; border-style: dashed; background: transparent; box-shadow: none; }
.q.more svg { width: 22px; height: 22px; }
.tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.tool { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 20px; background: var(--sky-2); color: var(--navy); font-weight: 800; font-size: 14px; transition: transform .15s var(--ease), background .2s; }
.tool:active { transform: scale(.95); }
.tool:hover { background: var(--sky-3); }
.tool svg { width: 26px; height: 26px; }
.tool.mic { background: var(--lemon); color: var(--ink); }

/* extras: water, bathroom trips, sweat, tummy, period */
.extras { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ex { border-radius: 20px; background: var(--paper); border: 1.5px solid var(--line); padding: 12px 12px 10px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; min-height: 92px; text-align: left; }
.ex .ex-h { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14.5px; color: var(--ink); }
.ex .ex-h svg { width: 22px; height: 22px; color: var(--navy-3); flex: none; }
.ex .ex-v { font-family: var(--display); font-weight: 600; font-size: 24px; color: var(--navy); line-height: 1; }
.ex .ex-v small { font-family: var(--sans); font-size: 14px; color: var(--muted); font-weight: 700; margin-left: 4px; }
.ex .pm { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.ex .pm button { width: 38px; height: 38px; border-radius: 50%; background: var(--sky-1); color: var(--navy); font-size: 22px; font-weight: 700; display: grid; place-items: center; }
.ex .pm button:active { transform: scale(.9); }
.ex.toggle { cursor: pointer; transition: border-color .2s, background .2s; }
.ex.toggle .ex-s { font-size: 13.5px; color: var(--muted); font-weight: 600; margin-top: auto; }
.ex.toggle.on { border-color: var(--lime); background: var(--lime-tint); }
.ex.toggle.on .ex-s { color: var(--lime-deep); font-weight: 800; }
.ex.hot { border-color: #ffb36b; background: #fff4e8; }

/* insights: Zest's tips */
.tip { display: flex; gap: 12px; align-items: flex-start; border-radius: 20px; padding: 14px 14px 14px 12px; background: #fffbe8; border: 1.5px solid #fbe6a2; }
.tip + .tip { margin-top: 10px; }
.tip .zest { margin-top: -4px; }
.tip p { font-size: 15.5px; color: var(--ink-2); }
.tip p b { color: var(--ink); }
.tip .btn-row { margin-top: 10px; }
.tip.warn { background: var(--alert-tint); border-color: #f3c8b8; }
.tip.cool { background: var(--sky-0); border-color: var(--sky-3); }

/* the day's log */
.log { list-style: none; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.log li + li { border-top: 1px solid var(--line); }
.log button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 16px; text-align: left; }
.log .t { width: 64px; flex: none; font-weight: 800; color: var(--navy); font-size: 14.5px; }
.log .n { flex: 1; min-width: 0; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log .mg { font-size: 13.5px; color: var(--muted); font-weight: 600; flex: none; }
.log .empty { padding: 16px; color: var(--muted); font-size: 15px; }

/* streak + week */
.streak { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; font-size: 13.5px; padding: 5px 11px 5px 8px; border-radius: 999px; background: rgba(255, 212, 59, .18); color: var(--lemon); }
.streak svg { width: 16px; height: 16px; }
.streak.off { background: rgba(255, 255, 255, .12); color: #cfe0f6; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 14px; }
.week div { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.week i { width: 34px; height: 34px; border-radius: 50%; background: var(--sky-1); border: 2px solid var(--line); display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 13px; color: var(--muted); }
.week i.some { background: #fff3c4; border-color: var(--lemon); color: var(--lemon-ink); }
.week i.full { background: radial-gradient(circle at 35% 30%, #fff6b8, var(--lemon) 45%, var(--lemon-deep)); border-color: var(--lemon-deep); color: var(--ink); }
.week i.today { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--navy); }
.week span { font-size: 12px; font-weight: 800; color: var(--muted); }

/* ───────── Trends */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 12px; box-shadow: var(--shadow); }
.stat b { display: block; font-family: var(--display); font-weight: 600; font-size: 22px; color: var(--navy); line-height: 1.1; }
.stat span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 700; margin-top: 4px; line-height: 1.25; }
.chart { width: 100%; height: auto; margin-top: 12px; overflow: visible; }
.chart text { font-family: var(--sans); font-size: 11px; font-weight: 700; fill: var(--muted); }
.chart .bar { fill: var(--sky-3); }
.chart .bar.met { fill: var(--lemon); }
.chart .bar.today { fill: var(--navy-3); }
.chart .goal { stroke: var(--lime-deep); stroke-width: 1.6; stroke-dasharray: 4 4; }
.chart .goal-l { fill: var(--lime-deep); font-weight: 800; paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.dotmap { margin-top: 12px; }
.dotmap .row { display: grid; grid-template-columns: 34px 1fr; align-items: center; height: 22px; }
.dotmap .row span { font-size: 11.5px; font-weight: 800; color: var(--muted); }
.dotmap .line { position: relative; height: 22px; }
.dotmap .line::before { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 2px; background: var(--sky-2); border-radius: 2px; }
.dotmap .line i { position: absolute; top: 4px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--lemon); box-shadow: 0 0 0 1.5px var(--lemon-deep); }
.dotmap .line i.big { background: #ff9c7a; box-shadow: 0 0 0 1.5px var(--alert); }
.dotmap .axis { display: flex; justify-content: space-between; margin-left: 34px; font-size: 11.5px; font-weight: 700; color: var(--muted); margin-top: 4px; }
.write-up p { font-size: 16.5px; color: var(--ink-2); }
.write-up p + p { margin-top: 10px; }
.mini-rows { display: grid; gap: 8px; margin-top: 10px; }
.mini-rows div { display: flex; justify-content: space-between; font-size: 15px; }
.mini-rows b { color: var(--ink); }

/* ───────── +Pouch */
.product { overflow: hidden; padding: 0; }
.product .pimg { aspect-ratio: 1 / 1; background: linear-gradient(180deg, #eef5ff, #dfeafa); display: grid; place-items: center; overflow: hidden; }
.product .pimg img { width: 100%; height: 100%; object-fit: cover; }
.product .pbody { padding: 16px 18px 18px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.facts span { font-size: 13.5px; font-weight: 800; color: var(--navy); background: var(--sky-1); padding: 5px 11px; border-radius: 999px; }
.opts { display: grid; gap: 10px; margin-top: 14px; }
.opt { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; border: 2px solid var(--line); background: var(--paper); text-align: left; transition: border-color .2s, background .2s; }
.opt .rd { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--sky-3); flex: none; display: grid; place-items: center; }
.opt.on { border-color: var(--navy); background: var(--sky-0); }
.opt.on .rd { border-color: var(--navy); }
.opt.on .rd::after { content: ""; width: 11px; height: 11px; border-radius: 50%; background: var(--navy); }
.opt .ot { flex: 1; }
.opt .ot b { display: block; font-weight: 800; color: var(--ink); }
.opt .ot small { display: block; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.opt .op { font-family: var(--display); font-weight: 600; color: var(--navy); font-size: 17px; text-align: right; }
.opt .op s { display: block; font-family: var(--sans); font-size: 13px; color: var(--muted); font-weight: 600; }
.save { font-size: 12px; font-weight: 800; color: var(--ink); background: var(--lemon); padding: 2px 8px; border-radius: 999px; margin-left: 6px; vertical-align: 1px; }
.qty { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button { width: 46px; height: 44px; font-size: 22px; font-weight: 700; color: var(--navy); }
.qty b { min-width: 34px; text-align: center; font-weight: 800; font-size: 17px; color: var(--ink); }
.supply .meter { height: 12px; border-radius: 12px; background: var(--sky-2); overflow: hidden; margin-top: 10px; }
.supply .meter i { display: block; height: 100%; border-radius: 12px; background: linear-gradient(90deg, var(--lime), var(--lemon)); transition: width .6s var(--ease); }
.supply .meter i.low { background: linear-gradient(90deg, #ff9c7a, var(--lemon)); }
.big-n { font-family: var(--display); font-weight: 700; font-size: 34px; color: var(--navy); line-height: 1; }

/* ───────── forms */
.field { display: grid; gap: 6px; }
.field + .field { margin-top: 12px; }
.field > span { font-weight: 800; font-size: 14px; color: var(--ink-soft); }
.input { width: 100%; min-height: 50px; border-radius: 14px; border: 1.5px solid var(--sky-3); background: var(--paper); padding: 0 14px; font-size: 17px; color: var(--ink); appearance: none; -webkit-appearance: none; }
.input:focus { outline: none; border-color: var(--plus); box-shadow: 0 0 0 4px rgba(61, 155, 224, .15); }
select.input { background-image: linear-gradient(45deg, transparent 50%, var(--navy) 50%), linear-gradient(135deg, var(--navy) 50%, transparent 50%); background-position: calc(100% - 20px) 22px, calc(100% - 14px) 22px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 38px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.form-error { color: var(--alert); font-weight: 700; font-size: 15px; margin-top: 10px; }
.stepper { display: inline-flex; align-items: center; gap: 14px; }
.stepper button { width: 46px; height: 46px; border-radius: 50%; background: var(--sky-2); color: var(--navy); font-size: 24px; font-weight: 700; display: grid; place-items: center; }
.stepper button:active { transform: scale(.92); }
.stepper b { font-family: var(--display); font-weight: 700; font-size: 34px; color: var(--navy); min-width: 44px; text-align: center; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; cursor: pointer; }
.switch + .switch { border-top: 1px solid var(--line); }
.switch .sw-t b { display: block; font-weight: 800; color: var(--ink); }
.switch .sw-t small { display: block; color: var(--muted); font-size: 14px; font-weight: 600; }
.switch input { appearance: none; -webkit-appearance: none; width: 52px; height: 32px; border-radius: 999px; background: var(--sky-3); position: relative; flex: none; transition: background .25s; cursor: pointer; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(16, 35, 61, .25); transition: transform .25s var(--spring); }
.switch input:checked { background: var(--lime-deep); }
.switch input:checked::after { transform: translateX(20px); }
.list-rows { list-style: none; }
.list-rows li { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.list-rows li + li { border-top: 1px solid var(--line); }
.list-rows .grow { flex: 1; min-width: 0; }
.list-rows b { display: block; color: var(--ink); font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-rows small { display: block; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.code-box { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 22px; font-weight: 700; letter-spacing: .06em; color: var(--navy); background: var(--sky-1); border: 2px dashed var(--sky-3); border-radius: 16px; padding: 16px; text-align: center; user-select: all; }

/* ───────── sheets, toasts, confetti */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(16, 35, 61, .42); display: flex; align-items: flex-end; justify-content: center; animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  width: 100%; max-width: 560px; max-height: calc(100dvh - var(--safe-t) - 24px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--sky-0); border-radius: 28px 28px 0 0; padding: 10px 18px calc(22px + var(--safe-b));
  animation: up .38s var(--ease); box-shadow: 0 -10px 40px -10px rgba(16, 35, 61, .4);
}
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
@media (min-width: 700px) { .scrim { align-items: center; } .sheet { border-radius: 28px; padding-bottom: 24px; } }
.grab { width: 44px; height: 5px; border-radius: 5px; background: var(--sky-3); margin: 2px auto 12px; }
.sheet-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.sheet .pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pick button { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; border-radius: 18px; background: var(--paper); border: 1.5px solid var(--line); text-align: left; box-shadow: var(--shadow); }
.pick button svg { width: 28px; height: 28px; color: var(--navy-3); }
.pick button b { font-weight: 800; color: var(--ink); font-size: 15.5px; line-height: 1.2; }
.pick button small { font-size: 13px; color: var(--muted); font-weight: 600; line-height: 1.25; }
.pick button:active { transform: scale(.97); }
.salt-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.salt-row button { padding: 10px 4px; border-radius: 16px; background: var(--paper); border: 1.5px solid var(--line); font-weight: 800; color: var(--ink); font-size: 14px; line-height: 1.15; }
.salt-row button small { display: block; font-size: 12px; color: var(--muted); font-weight: 700; margin-top: 3px; }
.when-row { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 10px 14px; border-radius: 16px; background: var(--paper); border: 1.5px solid var(--line); }
.when-row input { border: 0; background: transparent; font-weight: 800; color: var(--navy); font-size: 16px; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 18px); z-index: 80; transform: translateX(-50%);
  max-width: calc(100% - 32px); width: max-content; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px;
  font-weight: 700; font-size: 15.5px; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); animation: toastIn .4s var(--spring);
}
body.bare .toast { bottom: calc(var(--safe-b) + 24px); }
.toast.out { animation: toastOut .5s var(--ease) forwards; }
@keyframes toastIn { from { transform: translate(-50%, 16px); opacity: 0; } }
@keyframes toastOut { to { transform: translate(-50%, 20px); opacity: 0; } }
@media (min-width: 860px) { .toast { bottom: 28px; } }
canvas.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 90; }

/* scanner + mic */
.scanner { position: relative; border-radius: 22px; overflow: hidden; background: #0c1a2c; aspect-ratio: 3 / 4; max-height: 52dvh; margin: 0 auto; width: 100%; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scanner .aim { position: absolute; left: 12%; right: 12%; top: 38%; height: 24%; border-radius: 16px; box-shadow: 0 0 0 999px rgba(12, 26, 44, .45); border: 3px solid var(--lemon); }
.scanner .aim::after { content: ""; position: absolute; left: 6%; right: 6%; top: 50%; height: 2px; background: var(--lemon); box-shadow: 0 0 12px var(--lemon); animation: scanline 1.8s ease-in-out infinite; }
@keyframes scanline { 0%, 100% { transform: translateY(-26px); } 50% { transform: translateY(26px); } }
.scanner .hint { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; color: #fff; font-weight: 700; font-size: 15px; }
.mic-big { width: 120px; height: 120px; border-radius: 50%; background: var(--lemon); color: var(--ink); display: grid; place-items: center; margin: 8px auto 0; position: relative; box-shadow: 0 14px 30px -14px rgba(226, 163, 0, .9); transition: transform .2s var(--spring), background .2s; touch-action: none; user-select: none; -webkit-user-select: none; }
.mic-big svg { width: 46px; height: 46px; }
.mic-big.rec { background: var(--alert); color: #fff; transform: scale(1.06); }
.mic-big.rec::before, .mic-big.rec::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--alert); animation: ring 1.4s ease-out infinite; }
.mic-big.rec::after { animation-delay: .7s; }
@keyframes ring { from { transform: scale(1); opacity: .7; } to { transform: scale(1.6); opacity: 0; } }
.level { height: 34px; display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 14px; }
.level i { width: 5px; border-radius: 4px; background: var(--navy-3); height: 6px; transition: height .08s; }
.heard { background: var(--paper); border: 1.5px solid var(--line); border-radius: 18px; padding: 12px 14px; font-size: 16px; color: var(--ink); font-style: italic; }
.check-rows { list-style: none; margin-top: 12px; display: grid; gap: 8px; }
.check-rows label { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--paper); border: 1.5px solid var(--line); cursor: pointer; }
.check-rows input { width: 22px; height: 22px; accent-color: var(--navy); flex: none; }
.check-rows .grow { flex: 1; }
.check-rows b { display: block; color: var(--ink); font-weight: 800; }
.check-rows small { color: var(--muted); font-weight: 600; font-size: 13.5px; }

/* login + onboarding */
.auth { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: calc(var(--safe-t) + 30px) 22px calc(var(--safe-b) + 30px); text-align: center; background: radial-gradient(120% 60% at 50% 0%, #fff8d6 0%, transparent 55%), linear-gradient(180deg, var(--sky-0), var(--sky-2)); }
.auth .zest { margin: 0 auto; }
.auth h1 { font-size: 34px; margin-top: 14px; color: var(--navy); }
.auth .lede { margin-top: 8px; max-width: 340px; }
.auth .btns { display: grid; gap: 10px; width: 100%; max-width: 340px; margin-top: 30px; }
.auth .fine { margin-top: 20px; font-size: 14px; color: var(--muted); max-width: 340px; }
.ob { max-width: 440px; width: 100%; }
.ob .bubble { margin: 0 0 6px; text-align: left; }
.ob .bubble::before { left: 50%; bottom: -7px; margin-left: -8px; }
.ob-step { display: grid; gap: 14px; margin-top: 18px; text-align: left; }
.dots { display: flex; gap: 6px; justify-content: center; margin-top: 22px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--sky-3); }
.dots i.on { background: var(--navy); width: 22px; border-radius: 8px; }

.sk { background: linear-gradient(90deg, var(--sky-1), var(--sky-2), var(--sky-1)); background-size: 200% 100%; border-radius: 16px; animation: sk 1.3s linear infinite; }
@keyframes sk { to { background-position: -200% 0; } }
.pill-new { position: fixed; top: calc(var(--safe-t) + 66px); left: 50%; transform: translateX(-50%); z-index: 70; background: var(--navy); color: #fff; font-weight: 800; font-size: 14.5px; padding: 9px 16px; border-radius: 999px; box-shadow: var(--shadow); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* home-screen install steps */
.steps { list-style: none; display: grid; gap: 12px; }
.steps li { display: flex; align-items: center; gap: 14px; }
.steps .si { width: 48px; height: 48px; border-radius: 14px; background: var(--sky-1); color: var(--plus); display: grid; place-items: center; flex: none; }
.steps .si svg { width: 26px; height: 26px; }
.steps .st { font-size: 15.5px; color: var(--ink-2); line-height: 1.4; }
.steps .st > b:first-child { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 12.5px; margin-right: 8px; vertical-align: 1px; }
.btn img { border-radius: 7px; }
.install-card { border-color: var(--lemon); background: linear-gradient(135deg, #fffbe6, #fff 60%); }

/* +Pouch: photo, pitch, one buy card */
.pouch .p-photo { position: relative; margin: 6px 0 0; aspect-ratio: 1 / 1; border-radius: 28px; overflow: hidden; background: #fff; box-shadow: var(--shadow); display: grid; place-items: center; }
.pouch .p-photo img { width: 100%; height: 100%; object-fit: cover; }
.pouch .p-h { font-size: 27px; line-height: 1.15; margin-top: 20px; color: var(--navy); }
.pouch .p-sub { font-size: 17px; color: var(--ink-soft); margin-top: 10px; line-height: 1.45; }
.pouch .buy { margin-top: 18px; }
.pouch .buy .seg button { display: flex; flex-direction: column; align-items: center; line-height: 1.2; padding: 8px 10px; }
.pouch .buy .seg small { font-size: 12px; font-weight: 700; color: var(--muted); }
.pouch .buy .opts { margin-top: 12px; }
.freq { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.freq span { font-size: 13px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--sky-1); color: var(--ink-soft); }
.freq span.on { background: var(--navy); color: #fff; }
.buy-row { display: flex; gap: 10px; align-items: center; margin-top: 14px; }
.buy-row .btn { flex: 1; }
.supply-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.supply-row .label { display: block; }
.supply-row b { font-family: var(--display); font-weight: 700; font-size: 24px; color: var(--navy); margin-right: 8px; }
.supply-row small { font-size: 14px; color: var(--muted); font-weight: 600; }
.supply-row .btn { white-space: nowrap; flex: none; }

/* the tutorial card and player */
.tut-card { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 12px; }
.tut-card .tut-thumb { position: relative; width: 64px; height: 92px; border-radius: 12px; overflow: hidden; flex: none; background: var(--navy); }
.tut-card .tut-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tut-card .tut-thumb i { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(16, 35, 61, .25); }
.tut-card .tut-thumb i svg { width: 30px; height: 30px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .4)); }
.tut-card .tut-txt b { display: block; font-family: var(--display); font-weight: 600; font-size: 16px; color: var(--ink); }
.tut-card .tut-txt small { display: block; font-size: 14.5px; color: var(--ink-soft); font-weight: 600; margin-top: 3px; }
.tut-card.glow { border-color: var(--lemon); animation: glow 2.2s ease-in-out infinite; }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 212, 59, .55), var(--shadow); } 50% { box-shadow: 0 0 0 9px rgba(255, 212, 59, 0), 0 0 28px 4px rgba(255, 212, 59, .45); } }
.player-full { position: fixed; inset: 0; z-index: 95; background: #0b1626; display: grid; place-items: center; padding: var(--safe-t) 0 var(--safe-b); animation: fade .25s; }
.player-full video { width: 100%; height: 100%; max-width: calc(100dvh * 9 / 16); object-fit: contain; background: #0b1626; }
.player-full .x-btn { position: absolute; top: calc(var(--safe-t) + 12px); right: 12px; color: #fff; background: rgba(255, 255, 255, .14); font-size: 26px; }
.hero-count { flex-wrap: wrap; row-gap: 8px; }
.hero-count span, .streak { white-space: nowrap; }
