/* Calm Coach — styles. Mobile first. No external fonts, works offline. */
:root {
  --bg: #F7F2EA;
  --bg-deep: #EFE6D7;
  --surface: #FFFDF9;
  --surface-2: #F3ECE1;
  --line: #E3D8C6;
  --ink: #183B38;
  --ink-soft: #3E5653;
  --muted: #566A66;
  --teal: #2A6B65;
  --teal-strong: #1F5550;
  --teal-soft: #D6E9E4;
  --teal-wash: #EAF4F1;
  --sage: #7E9E86;
  --sage-soft: #E2EBDF;
  --sand: #E8DBC5;
  --clay: #A4523A;
  --clay-strong: #8C4430;
  --clay-soft: #F5E3DA;
  --not: #8A5A4A;
  --focus: #1F6FD1;
  --shadow-sm: 0 1px 2px rgba(24, 59, 56, .06), 0 2px 8px rgba(24, 59, 56, .05);
  --shadow-md: 0 4px 14px rgba(24, 59, 56, .08), 0 12px 32px rgba(24, 59, 56, .07);
  --radius: 20px;
  --radius-sm: 14px;
  --tap: 52px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.22, .8, .3, 1);
  --top-h: 60px;
  --tab-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1C1B;
    --bg-deep: #0B1615;
    --surface: #162826;
    --surface-2: #1C3230;
    --line: #2A4340;
    --ink: #E9F1EF;
    --ink-soft: #C9D8D5;
    --muted: #A6BAB6;
    --teal: #3E8A82;
    --teal-strong: #2F7770;
    --teal-soft: #21403C;
    --teal-wash: #183331;
    --sage: #8FB298;
    --sage-soft: #1F3530;
    --sand: #3A3528;
    --clay: #A4523A;
    --clay-strong: #8C4430;
    --clay-soft: #3A2620;
    --not: #E2AE9C;
    --focus: #7FB4FF;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
    --shadow-md: 0 6px 22px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg-deep);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--teal); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 10px; }
[tabindex="-1"]:focus { outline: none; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--teal); color: #fff; padding: 10px 16px; border-radius: 12px; text-decoration: none;
}
.skip:focus { top: calc(8px + var(--safe-t)); }

/* ---------- App shell ---------- */
.app {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
}
@media (min-width: 600px) {
  .app { box-shadow: 0 0 0 1px var(--line), var(--shadow-md); }
}

.topbar {
  position: sticky; top: 0; z-index: 20;
  height: calc(var(--top-h) + var(--safe-t));
  padding: var(--safe-t) 12px 0;
  display: flex; align-items: center; gap: 8px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
  font-family: var(--font-round); font-weight: 700; font-size: 19px; letter-spacing: -.01em;
  min-height: 44px; padding-right: 6px;
}
.brand img { width: 34px; height: 34px; border-radius: 10px; }
.topbar .spacer { flex: 1; }
.icon-btn {
  min-width: 44px; height: 44px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 14px; background: transparent; color: var(--ink);
  transition: background .15s;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 24px; height: 24px; }
.back-btn { margin-left: -6px; font-weight: 600; padding-right: 12px; }
.lang-btn {
  height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface);
  font-weight: 700; font-size: 15px; letter-spacing: .02em; color: var(--teal-strong);
}
@media (prefers-color-scheme: dark) { .lang-btn { color: var(--ink); } }
.lang-btn:hover { background: var(--surface-2); }

.view {
  padding: 8px 18px calc(var(--tab-h) + var(--safe-b) + 28px);
  outline: none;
}
.view.enter { animation: viewIn .32s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed; z-index: 30; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 560px;
  height: calc(var(--tab-h) + var(--safe-b));
  padding: 0 6px var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: stretch;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  backdrop-filter: saturate(1.4) blur(16px);
  border-top: 1px solid var(--line);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: var(--muted);
  font-size: 12px; font-weight: 600; letter-spacing: .01em;
  min-height: var(--tap);
  transition: color .15s;
}
.tab svg { width: 25px; height: 25px; transition: transform .2s var(--ease); }
.tab[aria-current="page"] { color: var(--teal); }
@media (prefers-color-scheme: dark) { .tab[aria-current="page"] { color: #8FD0C6; } }
.tab[aria-current="page"] svg { transform: translateY(-1px); }
.tab-now { position: relative; color: var(--ink); }
.tab-now .now-dot {
  width: 58px; height: 58px; margin-top: -26px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--clay); color: #fff;
  box-shadow: 0 0 0 5px var(--bg), 0 6px 16px rgba(164, 82, 58, .35);
  transition: transform .2s var(--ease), background .2s;
}
.tab-now:hover .now-dot { background: var(--clay-strong); }
.tab-now:active .now-dot { transform: scale(.95); }
.tab-now .now-dot svg { width: 28px; height: 28px; }
body.mode-now .tabbar, body.mode-now .topbar { display: none; }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--font-round); letter-spacing: -.015em; line-height: 1.2; margin: 0; }
h1 { font-size: 30px; font-weight: 800; }
h2 { font-size: 21px; font-weight: 750; }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0; }
.lead { color: var(--ink-soft); font-size: 17px; margin-top: 6px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.page-head { padding: 10px 2px 18px; }
.section { margin-top: 26px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 2px 12px; }
.section-head a { font-weight: 600; text-decoration: none; font-size: 15px; padding: 8px 0; }
.stack > * + * { margin-top: 12px; }

/* ---------- Cards & buttons ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.card.soft { background: var(--teal-wash); border-color: transparent; box-shadow: none; }
.card.sage { background: var(--sage-soft); border-color: transparent; box-shadow: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--tap); padding: 0 22px; border-radius: 16px; border: 0;
  font-weight: 700; font-size: 17px; text-decoration: none; text-align: center;
  background: var(--teal); color: #fff;
  transition: transform .15s var(--ease), background .15s, box-shadow .15s;
}
.btn:hover { background: var(--teal-strong); }
.btn:active { transform: scale(.98); }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn.block { display: flex; width: 100%; }
.btn.ghost { background: transparent; color: var(--teal-strong); border: 1.5px solid var(--line); }
@media (prefers-color-scheme: dark) { .btn.ghost { color: var(--ink); } }
.btn.ghost:hover { background: var(--surface-2); }
.btn.quiet { background: var(--surface-2); color: var(--ink); }
.btn.quiet:hover { background: var(--sand); }
.btn.danger { background: transparent; color: var(--clay); border: 1.5px solid var(--clay-soft); }
@media (prefers-color-scheme: dark) { .btn.danger { color: var(--not); } }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row > .btn { flex: 1 1 auto; }

/* ---------- Home ---------- */
.hello { padding: 14px 2px 16px; }
.hello h1 { font-size: 28px; }
.help-now {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; gap: 16px;
  width: 100%; min-height: 112px; padding: 20px 20px;
  border: 0; border-radius: 26px; text-align: left; text-decoration: none;
  color: #fff; background: linear-gradient(135deg, #B05A40 0%, var(--clay) 45%, #8F4631 100%);
  box-shadow: 0 10px 26px rgba(164, 82, 58, .30);
  transition: transform .18s var(--ease), box-shadow .18s;
}
.help-now:active { transform: scale(.985); }
.help-now .hn-orb {
  position: relative; flex: none; width: 66px; height: 66px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255,255,255,.18);
}
.help-now .hn-orb::before, .help-now .hn-orb::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.45);
  animation: ripple 3.6s var(--ease) infinite;
}
.help-now .hn-orb::after { animation-delay: 1.8s; }
@keyframes ripple { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.7); opacity: 0; } }
.help-now .hn-orb span { width: 26px; height: 26px; border-radius: 50%; background: #fff; }
.help-now strong { display: block; font-family: var(--font-round); font-size: 25px; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; }
.help-now small { display: block; margin-top: 4px; font-size: 16px; opacity: .95; }
.core {
  margin-top: 16px; padding: 18px 18px 18px 20px; border-radius: var(--radius);
  background: var(--teal-wash); position: relative;
}
.core::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 4px; border-radius: 4px; background: var(--sage); }
.core h2 { font-size: 19px; }
.core p { margin-top: 6px; color: var(--ink-soft); font-size: 16px; }

.moment-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.moment-tile {
  display: flex; flex-direction: column; justify-content: space-between; gap: 12px;
  min-height: 104px; padding: 14px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  text-decoration: none; color: var(--ink); font-weight: 650; font-size: 16px; line-height: 1.25;
  transition: transform .15s var(--ease), border-color .15s;
}
.moment-tile:active { transform: scale(.98); }
.moment-tile:hover { border-color: var(--sage); }
.m-icon {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  background: var(--teal-soft); color: var(--teal-strong);
}
@media (prefers-color-scheme: dark) { .m-icon { color: #A6DCD3; } }
.m-icon svg { width: 24px; height: 24px; }
.moment-tile:nth-child(3n+2) .m-icon { background: var(--sage-soft); }
.moment-tile:nth-child(3n) .m-icon { background: var(--sand); }

.row-link {
  display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 14px 16px;
  border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  text-decoration: none; color: var(--ink);
}
.row-link .m-icon { flex: none; }
.row-link .txt { flex: 1; min-width: 0; }
.row-link strong { display: block; font-size: 17px; }
.row-link span.sub { display: block; color: var(--muted); font-size: 15px; line-height: 1.35; margin-top: 1px; }
.row-link .chev { width: 20px; height: 20px; color: var(--muted); flex: none; }

/* ---------- Help NOW ---------- */
.now {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center;
  padding: calc(14px + var(--safe-t)) 22px calc(22px + var(--safe-b));
  background: radial-gradient(120% 70% at 50% 30%, var(--teal-wash) 0%, var(--bg) 70%);
  text-align: center;
}
.now-top { width: 100%; display: flex; align-items: center; justify-content: space-between; }
.now-top .eyebrow { color: var(--ink-soft); }
.close-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--surface);
  box-shadow: var(--shadow-sm); display: grid; place-items: center; color: var(--ink);
}
.close-btn svg { width: 22px; height: 22px; }
.now-intro { margin-top: 6px; color: var(--ink-soft); font-size: 16px; }
.breath-wrap { position: relative; width: min(76vw, 300px); aspect-ratio: 1; margin: 22px auto 14px; flex: none; }
.breath-ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.breath-ring circle { fill: none; stroke-width: 6; }
.breath-ring .track { stroke: var(--line); }
.breath-ring .prog { stroke: var(--sage); stroke-linecap: round; transition: stroke-dashoffset .3s linear; }
.breath-circle {
  position: absolute; inset: 12%; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #8CC5BC 0%, var(--teal) 70%);
  box-shadow: 0 18px 40px rgba(42, 107, 101, .28), inset 0 -8px 24px rgba(0,0,0,.08);
  transform: scale(.7);
  transition-property: transform, opacity;
  transition-timing-function: cubic-bezier(.45, .05, .35, 1);
  will-change: transform;
}
.breath-circle.in { transform: scale(1); transition-duration: 4s; }
.breath-circle.out { transform: scale(.7); transition-duration: 6s; }
.breath-halo {
  position: absolute; inset: 12%; border-radius: 50%; background: var(--teal-soft); opacity: .7;
  transform: scale(.7); transition: transform 4s cubic-bezier(.45,.05,.35,1);
}
.breath-halo.in { transform: scale(1.12); transition-duration: 4s; }
.breath-halo.out { transform: scale(.7); transition-duration: 6s; }
.breath-label {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font-round); font-weight: 800; font-size: 23px; letter-spacing: -.01em;
  text-shadow: 0 1px 8px rgba(0,0,0,.18); pointer-events: none;
}
.breath-label small { font-family: var(--font); font-size: 14px; font-weight: 600; opacity: .9; margin-top: 2px; letter-spacing: 0; }
.now-step { min-height: 128px; max-width: 420px; }
.now-step h2 { font-size: 27px; font-weight: 800; }
.now-step p { margin-top: 8px; font-size: 18px; color: var(--ink-soft); }
.now-step.swap { animation: stepIn .5s var(--ease) both; }
@keyframes stepIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.dots { display: flex; gap: 8px; justify-content: center; margin: 10px 0 18px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); transition: background .3s, transform .3s; }
.dots i.on { background: var(--teal); transform: scale(1.25); }
.dots i.done { background: var(--sage); }
.now-actions { width: 100%; max-width: 420px; margin-top: auto; display: grid; gap: 10px; }
.now-done { display: none; }
.now.finished .now-done { display: block; animation: stepIn .5s var(--ease) both; }
.now.finished .now-run { display: none; }
.now .disclaimer { margin-top: 16px; padding: 0; border: 0; }

/* ---------- Situation detail ---------- */
.sit-hero { display: flex; gap: 14px; align-items: center; padding: 6px 2px 4px; }
.sit-hero .m-icon { width: 56px; height: 56px; border-radius: 18px; }
.sit-hero .m-icon svg { width: 30px; height: 30px; }
.sit-hero h1 { font-size: 26px; }
.sit-intro { margin: 12px 2px 0; color: var(--ink-soft); font-size: 17px; }
.first-you {
  margin-top: 16px; display: flex; align-items: center; gap: 12px;
  padding: 12px 12px 12px 16px; border-radius: 18px; background: var(--clay-soft);
}
.first-you p { flex: 1; font-weight: 650; font-size: 16px; line-height: 1.35; }
.first-you a {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 14px; border-radius: 12px; background: var(--clay); color: #fff;
  font-weight: 700; font-size: 14px; text-decoration: none; text-align: center; max-width: 46%;
  line-height: 1.2;
}
.jump { display: flex; gap: 8px; margin: 18px 0 4px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.jump::-webkit-scrollbar { display: none; }
.jump a {
  flex: none; min-height: 40px; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center;
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink);
  font-weight: 650; font-size: 14px;
}
.coach-card { margin-top: 14px; scroll-margin-top: calc(var(--top-h) + var(--safe-t) + 10px); }
.coach-card header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.num {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--teal); color: #fff; font-weight: 800; font-family: var(--font-round);
}
.coach-card header p { color: var(--muted); font-size: 14px; margin-top: 1px; }
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding: 10px 0 10px 32px; border-top: 1px solid var(--line); font-size: 17px; }
.ticks li:first-child { border-top: 0; padding-top: 2px; }
.ticks li::before {
  content: ""; position: absolute; left: 4px; top: 16px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--sage-soft); box-shadow: inset 0 0 0 3px var(--sage);
}
.ticks li:first-child::before { top: 8px; }
.pairs { display: grid; gap: 10px; }
.pair { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.pair .say, .pair .not { display: flex; gap: 10px; padding: 12px 14px; align-items: flex-start; }
.pair .say { background: var(--teal-wash); font-weight: 650; font-size: 17px; }
.pair .not { background: var(--surface); color: var(--not); font-size: 15px; }
.pair .not span.txt { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--not) 55%, transparent); text-decoration-thickness: 1.5px; }
.pair svg { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.pair .say svg { color: var(--teal); }
@media (prefers-color-scheme: dark) { .pair .say svg { color: #8FD0C6; } }
.pair-key { display: flex; gap: 16px; font-size: 13px; color: var(--muted); font-weight: 600; margin: -4px 0 10px; }
.pair-key span { display: inline-flex; gap: 6px; align-items: center; }
.pair-key i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.pair-key .k-say { background: var(--teal); }
.pair-key .k-not { background: var(--not); }
.chip-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.chip-scroll::-webkit-scrollbar { display: none; }

/* ---------- Forms, chips, sliders ---------- */
.field { margin-top: 20px; }
.field > label, .field > .label { display: block; font-weight: 700; margin-bottom: 8px; font-size: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 8px 14px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .15s, border-color .15s, color .15s, transform .12s;
}
.chip:active { transform: scale(.97); }
.chip[aria-pressed="true"], .chip[aria-checked="true"] {
  background: var(--teal); border-color: var(--teal); color: #fff;
}
.input {
  width: 100%; min-height: var(--tap); padding: 12px 14px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--surface); font-size: 17px;
}
.input:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px var(--teal-soft); }

.slider { padding: 14px 16px 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.slider + .slider { margin-top: 10px; }
.slider .top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.slider label { font-weight: 700; font-size: 16px; }
.slider output { font-size: 14px; font-weight: 700; color: var(--teal-strong); white-space: nowrap; }
@media (prefers-color-scheme: dark) { .slider output { color: #8FD0C6; } }
.slider .ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 2px; }
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 36px; margin: 6px 0 0; background: transparent;
  --val: 0%;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 10px; border-radius: 10px;
  background: linear-gradient(to right, var(--sage) 0 var(--val), var(--surface-2) var(--val) 100%);
}
input[type="range"]::-moz-range-track { height: 10px; border-radius: 10px; background: var(--surface-2); }
input[type="range"]::-moz-range-progress { height: 10px; border-radius: 10px; background: var(--sage); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 30px; height: 30px; margin-top: -10px; border-radius: 50%;
  background: #fff; border: 3px solid var(--teal); box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
input[type="range"]::-moz-range-thumb {
  width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 3px solid var(--teal);
}
.tip-card { margin-top: 18px; border-radius: 22px; padding: 20px; background: var(--teal); color: #fff; box-shadow: var(--shadow-md); }
.tip-card.show { animation: stepIn .45s var(--ease) both; }
.tip-card .eyebrow { color: rgba(255,255,255,.85); }
.tip-card .pull { margin-top: 10px; display: inline-block; padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.16); font-size: 14px; font-weight: 650; }
.tip-card p.tip { margin-top: 12px; font-size: 19px; line-height: 1.45; font-weight: 600; }
.tip-card p.heavy { margin-top: 10px; font-size: 16px; opacity: .95; }
.tip-card .style-tip { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.22); font-size: 16px; }
.tip-card .style-tip b { display: block; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; opacity: .85; margin-bottom: 4px; }
.tip-card .btn { background: #fff; color: var(--teal-strong); margin-top: 16px; }
.tip-card .btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }

/* ---------- Log & patterns ---------- */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 16px; background: var(--surface-2); }
.seg a {
  min-height: 44px; display: grid; place-items: center; border-radius: 12px;
  text-decoration: none; color: var(--ink-soft); font-weight: 700; font-size: 15px;
}
.seg a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
details.new-entry > summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: var(--tap); cursor: pointer; font-family: var(--font-round); font-weight: 750; font-size: 19px;
}
details.new-entry > summary::-webkit-details-marker { display: none; }
details.new-entry > summary .plus {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--teal); color: #fff;
  transition: transform .25s var(--ease);
}
details.new-entry[open] > summary .plus { transform: rotate(45deg); }
details.new-entry > summary .plus svg { width: 20px; height: 20px; }
.entry { padding: 14px 16px; }
.entry .e-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.entry .e-sit { font-weight: 750; font-size: 17px; }
.entry .e-when { font-size: 14px; color: var(--muted); }
.entry .e-help { margin-top: 6px; font-size: 15px; color: var(--ink-soft); }
.entry .e-feel { display: inline-block; margin-top: 8px; padding: 3px 12px; border-radius: 999px; background: var(--sage-soft); font-size: 14px; font-weight: 650; }
.entry .del { color: var(--muted); min-width: 44px; height: 44px; margin: -8px -10px 0 0; }
.entry .del svg { width: 20px; height: 20px; }
.empty { text-align: center; padding: 30px 18px; color: var(--ink-soft); }
.empty .m-icon { margin: 0 auto 12px; width: 56px; height: 56px; border-radius: 18px; }
.bars { display: grid; gap: 10px; }
.bar .b-top { display: flex; justify-content: space-between; font-size: 15px; font-weight: 650; gap: 10px; }
.bar .b-top span:last-child { color: var(--muted); font-weight: 700; }
.bar .track { margin-top: 5px; height: 12px; border-radius: 12px; background: var(--surface-2); overflow: hidden; }
.bar .fill { height: 100%; border-radius: 12px; background: linear-gradient(90deg, var(--sage), var(--teal)); width: 0; transition: width .7s var(--ease); }
.cols { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 130px; }
.cols.four { grid-template-columns: repeat(4, 1fr); }
.col { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.col .c-bar { width: 100%; max-width: 44px; border-radius: 10px 10px 4px 4px; background: linear-gradient(180deg, var(--teal), var(--sage)); min-height: 4px; height: 0; transition: height .7s var(--ease); }
.col .c-bar.zero { background: var(--surface-2); }
.col .c-lab { font-size: 12px; font-weight: 650; color: var(--muted); }
.col .c-n { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.summary { font-size: 18px; font-weight: 650; }
.words { display: flex; flex-wrap: wrap; gap: 8px; }
.words span { padding: 6px 12px; border-radius: 999px; background: var(--sage-soft); font-weight: 650; }
.words span b { color: var(--muted); font-weight: 700; margin-left: 4px; font-size: 13px; }

/* ---------- Learn & about ---------- */
.link-card { display: block; text-decoration: none; color: var(--ink); }
.link-card .lc-top { display: flex; gap: 14px; align-items: center; }
.link-card .m-icon { width: 50px; height: 50px; border-radius: 15px; flex: none; }
.link-card .by { font-size: 14px; color: var(--muted); font-weight: 600; }
.link-card p.body { margin-top: 10px; color: var(--ink-soft); font-size: 16px; }
.link-card .go { margin-top: 12px; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--teal-strong); }
@media (prefers-color-scheme: dark) { .link-card .go { color: #8FD0C6; } }
.link-card .go svg { width: 18px; height: 18px; }
.book-cover {
  width: 50px; height: 66px; border-radius: 6px 10px 10px 6px; flex: none;
  background: linear-gradient(160deg, var(--teal) 0%, var(--teal-strong) 100%);
  box-shadow: inset 4px 0 0 rgba(0,0,0,.15), var(--shadow-sm);
  display: grid; place-items: center; color: #fff;
}
.book-cover svg { width: 26px; height: 26px; }
.crisis { background: var(--clay-soft); border: 0; box-shadow: none; }
.crisis a:not(.btn) { color: inherit; font-weight: 800; }
.note { font-size: 14px; color: var(--muted); margin: 12px 2px 0; }
.about-hero { text-align: center; padding: 18px 8px 8px; }
.about-hero img { width: 88px; height: 88px; border-radius: 24px; margin: 0 auto 14px; box-shadow: var(--shadow-md); }
.about-hero p { font-size: 18px; font-weight: 650; color: var(--ink-soft); margin-top: 6px; }
.prose p + p { margin-top: 12px; }
.prose p { font-size: 17px; }
.kv { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); margin-top: 16px; padding: 0 4px; }

/* ---------- Footer, toast ---------- */
.disclaimer {
  margin-top: 30px; padding: 16px 4px 0; border-top: 1px solid var(--line);
  font-size: 13px; line-height: 1.5; color: var(--muted);
}
.disclaimer a { color: inherit; font-weight: 700; }
.toast {
  position: fixed; z-index: 50; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 14px);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 32px); width: max-content;
  padding: 12px 18px; border-radius: 14px; background: var(--ink); color: var(--bg);
  font-weight: 650; font-size: 15px; box-shadow: var(--shadow-md);
  transition: opacity .25s, transform .25s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.mode-now .toast { bottom: calc(24px + var(--safe-b)); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .view.enter, .now-step.swap, .tip-card.show { animation: none; }
  .help-now .hn-orb::before, .help-now .hn-orb::after { animation: none; opacity: .5; }
  .breath-circle, .breath-circle.in, .breath-circle.out { transform: scale(.85); transition: opacity 1.2s ease; }
  .breath-circle.out { opacity: .72; }
  .breath-halo, .breath-halo.in { transform: scale(1); transition: none; }
  .bar .fill, .col .c-bar { transition: none; }
}

@media (max-width: 360px) {
  body { font-size: 16px; }
  h1 { font-size: 26px; }
  .help-now strong { font-size: 22px; }
  .moment-tile { font-size: 15px; }
}
