/* BPD State Check — styles
   Calm, warm palette. Light by default, dark via system or toggle. */

:root {
  --bg: #f5f1ea;
  --surface: #fffdf9;
  --surface-2: #efe9df;
  --line: #e3dbcf;
  --ink: #26231f;
  --ink-2: #5b554c;
  --ink-3: #857d71;

  --emotion: #c4603f;   /* terracotta */
  --reason: #4f6fa3;    /* slate blue */
  --wise: #3f8a6b;      /* sage */
  --warn: #b0802a;      /* ochre */
  --dissoc: #8b867d;    /* stone */

  --tone-ok: #3f8a6b;
  --tone-mid: #a8761d;
  --tone-high: #b8502f;

  --focus: #3f8a6b;
  --shadow: 0 1px 2px rgba(38, 35, 31, .04), 0 8px 24px rgba(38, 35, 31, .06);
  --radius: 18px;
  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1a18; --surface: #242220; --surface-2: #2d2a27; --line: #37332f;
    --ink: #eeeae3; --ink-2: #bdb6ab; --ink-3: #8f887d;
    --emotion: #e0876a; --reason: #86a2d4; --wise: #6fbf98; --warn: #d6a94f; --dissoc: #a19c93;
    --tone-ok: #6fbf98; --tone-mid: #d6a94f; --tone-high: #e0876a; --focus: #6fbf98;
    --shadow: 0 1px 2px rgba(0,0,0,.2), 0 8px 24px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1b1a18; --surface: #242220; --surface-2: #2d2a27; --line: #37332f;
  --ink: #eeeae3; --ink-2: #bdb6ab; --ink-3: #8f887d;
  --emotion: #e0876a; --reason: #86a2d4; --wise: #6fbf98; --warn: #d6a94f; --dissoc: #a19c93;
  --tone-ok: #6fbf98; --tone-mid: #d6a94f; --tone-high: #e0876a; --focus: #6fbf98;
  --shadow: 0 1px 2px rgba(0,0,0,.2), 0 8px 24px rgba(0,0,0,.25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 120px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--ink-3); text-transform: none; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ── Top bar ─────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { max-width: 1120px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand-mark { width: 30px; height: 30px; flex-shrink: 0; }
.bm-e { fill: var(--emotion); opacity: .55; }
.bm-r { fill: var(--reason); opacity: .55; }
.bm-w { fill: var(--wise); }
.brand-name { font-weight: 600; font-size: 17px; letter-spacing: -.01em; white-space: nowrap; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.lang { display: flex; background: var(--surface-2); border-radius: 10px; padding: 3px; }
.lang button {
  border: 0; background: transparent; padding: 5px 9px; border-radius: 8px;
  font-size: 13px; font-weight: 600; color: var(--ink-3); cursor: pointer; min-height: 32px;
}
.lang button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); display: grid; place-items: center; cursor: pointer;
}
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: var(--ink-2); stroke-width: 1.8; stroke-linejoin: round; }

.help-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px;
  border-radius: 999px; border: 1.5px solid var(--emotion); background: transparent;
  color: var(--emotion); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.help-btn:hover { background: color-mix(in srgb, var(--emotion) 10%, transparent); }
.help-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--emotion); }

.nav-in { max-width: 1120px; margin: 0 auto; padding: 0 16px; display: flex; gap: 4px; }
.nav a {
  text-decoration: none; padding: 10px 12px 11px; font-size: 15px; font-weight: 500; color: var(--ink-3);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

/* ── Layout ───────────────────────────────── */
.view { padding: 28px 0 56px; }
.layout { display: grid; gap: 16px; }
.col-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr) 420px; gap: 28px; align-items: start; }
  .col-side { position: sticky; top: 124px; }
}

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
@media (max-width: 480px) { .card { padding: 18px; border-radius: 16px; } }

/* ── Intro ─────────────────────────────── */
.intro { padding: 4px 2px 8px; }
.intro h1 { font-size: clamp(28px, 5vw, 40px); line-height: 1.12; letter-spacing: -.025em; font-weight: 700; margin-bottom: 10px; }
.intro p { font-size: 18px; color: var(--ink-2); max-width: 36em; }
.intro-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 14px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px 5px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--wise) 12%, transparent); color: var(--wise); font-size: 14px; font-weight: 500;
}
.pill svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ── Steps ─────────────────────────────── */
.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.step-n {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 600;
}
.step h2 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.step-hint { margin: -10px 0 14px 40px; }

/* sliders */
.sliders { display: flex; flex-direction: column; gap: 24px; }
.sl-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 2px; }
.sl-name { font-weight: 600; font-size: 16px; }
.sl-val { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 18px; min-width: 2ch; text-align: right; color: var(--c); }
.sl.unset .sl-val { color: var(--ink-3); font-weight: 500; font-size: 14px; }
.sl-ends { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.sl-ends span:last-child { text-align: right; }

input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 36px; background: transparent; cursor: pointer; margin: 0;
  --p: 50%;
}
input[type=range]::-webkit-slider-runnable-track {
  height: 8px; border-radius: 8px;
  background: linear-gradient(to right, var(--c) var(--p), var(--surface-2) var(--p));
}
input[type=range]::-moz-range-track { height: 8px; border-radius: 8px; background: var(--surface-2); }
input[type=range]::-moz-range-progress { height: 8px; border-radius: 8px; background: var(--c); }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; margin-top: -9px;
  background: var(--surface); border: 3px solid var(--c); box-shadow: 0 1px 4px rgba(0,0,0,.18); transition: transform .12s;
}
input[type=range]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%; background: var(--surface); border: 3px solid var(--c); box-shadow: 0 1px 4px rgba(0,0,0,.18);
}
input[type=range]:active::-webkit-slider-thumb { transform: scale(1.12); }
.sl.unset input[type=range] { --c: var(--ink-3); }
.sl.unset input[type=range]::-webkit-slider-runnable-track { background: var(--surface-2); }
.sl.unset input[type=range]::-moz-range-progress { background: transparent; }
.sl-e { --c: var(--emotion); } .sl-t { --c: var(--warn); } .sl-r { --c: var(--reason); } .sl-c { --c: var(--wise); }

/* chips */
.chips { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 560px) { .chips { grid-template-columns: 1fr 1fr; } }
.chip {
  display: flex; align-items: center; gap: 12px; text-align: left; width: 100%;
  padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface);
  cursor: pointer; transition: border-color .15s, background .15s; min-height: 60px;
}
.chip:hover { border-color: var(--ink-3); }
.chip-box {
  width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--ink-3); flex-shrink: 0;
  display: grid; place-items: center; transition: all .15s;
}
.chip-box svg { width: 14px; height: 14px; fill: none; stroke: var(--surface); stroke-width: 3; opacity: 0; }
.chip-txt { display: flex; flex-direction: column; line-height: 1.3; }
.chip-txt strong { font-weight: 600; font-size: 15px; }
.chip-txt span { font-size: 13px; color: var(--ink-3); }
.chip[aria-pressed="true"] { border-color: var(--k); background: color-mix(in srgb, var(--k) 8%, var(--surface)); }
.chip[aria-pressed="true"] .chip-box { background: var(--k); border-color: var(--k); }
.chip[aria-pressed="true"] .chip-box svg { opacity: 1; }

/* ── Result ─────────────────────────────── */
.result { display: flex; flex-direction: column; gap: 18px; }
.result-top { display: flex; justify-content: space-between; align-items: baseline; }
.result-empty { text-align: center; padding: 8px 8px 12px; }
.viz-empty {
  width: 150px; height: 96px; margin: 8px auto 16px; position: relative;
  background:
    radial-gradient(circle at 34% 50%, color-mix(in srgb, var(--emotion) 22%, transparent) 0 44px, transparent 45px),
    radial-gradient(circle at 66% 50%, color-mix(in srgb, var(--reason) 22%, transparent) 0 44px, transparent 45px),
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--wise) 35%, transparent) 0 20px, transparent 21px);
}
.empty-title { font-weight: 600; font-size: 18px; margin-bottom: 4px; }

.result-body { display: flex; flex-direction: column; gap: 18px; }
.state { display: flex; gap: 14px; align-items: flex-start; }
.state-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--sc, var(--ink-3)); flex-shrink: 0; margin-top: 10px; box-shadow: 0 0 0 5px color-mix(in srgb, var(--sc, var(--ink-3)) 18%, transparent); transition: background .4s; }
.state-name { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; color: var(--sc, var(--ink)); transition: color .4s; }
.state-desc { font-size: 16px; margin-top: 2px; }

.action {
  border-radius: 14px; padding: 16px 16px 14px;
  background: color-mix(in srgb, var(--sc, var(--ink-3)) 9%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--sc, var(--ink-3)) 22%, transparent);
}
.action .eyebrow { margin-bottom: 6px; }
.action-text { font-size: 18px; line-height: 1.5; font-weight: 500; }
.action-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: 12px; font-size: 15px; font-weight: 600; cursor: pointer; border: 1.5px solid transparent;
  text-decoration: none;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { opacity: .9; }
.btn-ghost { background: var(--surface); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-3); }
.btn.wide { width: 100%; }
.link-btn { background: none; border: 0; padding: 4px 0; color: var(--ink-3); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; align-self: flex-start; }

.viz { margin: 0; }
.viz svg { width: 100%; height: auto; max-height: 220px; }
.vz-e { fill: var(--emotion); fill-opacity: .2; stroke: var(--emotion); stroke-opacity: .55; stroke-width: 1.2; }
.vz-r { fill: var(--reason); fill-opacity: .18; stroke: var(--reason); stroke-opacity: .5; stroke-width: 1.2; }
.vz-w { fill: var(--wise); fill-opacity: .38; stroke: var(--wise); stroke-width: 1.6; }
.vz-check { fill: none; stroke: var(--wise); stroke-width: 1.2; stroke-dasharray: 3 5; }
.vz-split { stroke: var(--emotion); stroke-width: 1.5; stroke-dasharray: 4 6; opacity: 0; transition: opacity .4s; }
.vz-dissoc circle { fill: none; stroke: var(--dissoc); stroke-width: 1; stroke-dasharray: 2 6; }
.vz-dissoc { opacity: 0; transition: opacity .5s; }
.legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.lg-e { background: var(--emotion); } .lg-r { background: var(--reason); } .lg-w { background: var(--wise); }

.metrics { border-top: 1px solid var(--line); padding-top: 12px; }
.metrics summary { cursor: pointer; font-weight: 600; font-size: 15px; color: var(--ink-2); list-style: none; display: flex; align-items: center; gap: 8px; min-height: 32px; }
.metrics summary::-webkit-details-marker { display: none; }
.metrics summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg) translateY(-2px); transition: transform .2s; margin-left: 2px; }
.metrics[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.metric-list { display: grid; gap: 14px; margin-top: 12px; }
.m-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.m-name { font-size: 15px; font-weight: 500; }
.m-name small { display: block; font-size: 12px; color: var(--ink-3); font-weight: 400; }
.m-val { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 15px; white-space: nowrap; }
.m-val em { font-style: normal; font-weight: 500; margin-left: 6px; color: var(--tc); }
.m-bar { height: 6px; background: var(--surface-2); border-radius: 6px; overflow: hidden; margin-top: 6px; }
.m-bar i { display: block; height: 100%; border-radius: 6px; background: var(--tc); width: 0; transition: width .4s ease, background .4s; }

/* ── Skills ─────────────────────────────── */
.skills-sec { margin-top: 56px; }
.skills-sec h2 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.skills-sec > p { margin: 4px 0 18px; }
.skills { display: grid; gap: 12px; }
@media (min-width: 760px) { .skills { grid-template-columns: 1fr 1fr; align-items: start; } }
.skill { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: box-shadow .2s, border-color .2s; }
.skill.flash { border-color: var(--k); box-shadow: 0 0 0 4px color-mix(in srgb, var(--k) 20%, transparent); }
.skill summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 16px 18px; min-height: 60px; }
.skill summary::-webkit-details-marker { display: none; }
.sk-tag { font-size: 12px; font-weight: 700; letter-spacing: .03em; padding: 4px 9px; border-radius: 7px; color: var(--k); background: color-mix(in srgb, var(--k) 13%, transparent); white-space: nowrap; }
.sk-title { font-weight: 600; font-size: 16px; flex: 1; }
.skill summary::after { content: ''; width: 9px; height: 9px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); transition: transform .2s; flex-shrink: 0; margin-right: 4px; }
.skill[open] summary::after { transform: rotate(-135deg); }
.sk-body { padding: 0 18px 16px; }
.sk-step { display: flex; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.sk-key { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; font-weight: 700; font-size: 14px; color: var(--k); background: color-mix(in srgb, var(--k) 12%, transparent); }
.sk-val { font-size: 15.5px; color: var(--ink-2); padding-top: 3px; }
.sk-val strong { color: var(--ink); font-weight: 600; }
.sk-val em { color: var(--wise); }
.k-wise { --k: var(--wise); } .k-rc { --k: var(--reason); } .k-gr { --k: var(--warn); } .k-tipp { --k: var(--emotion); } .k-stop { --k: var(--wise); }

/* ── About ─────────────────────────────── */
.about { max-width: 720px; }
.about h1 { font-size: clamp(28px, 5vw, 38px); font-weight: 700; letter-spacing: -.025em; margin: 8px 0 10px; }
.about .lead { font-size: 18px; color: var(--ink-2); margin-bottom: 24px; }
.about h2 { font-size: 20px; font-weight: 600; margin: 32px 0 10px; }
.about p { color: var(--ink-2); margin-bottom: 10px; }
.about .back { display: inline-block; margin-bottom: 8px; color: var(--ink-3); text-decoration: none; font-size: 15px; }
.about .back:hover { color: var(--ink); }
.note { border-radius: 14px; padding: 14px 16px; background: color-mix(in srgb, var(--warn) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }
.note strong { display: block; margin-bottom: 4px; }
.note p { margin: 0; color: var(--ink); }
.modes-grid { display: grid; gap: 10px; }
@media (min-width: 560px) { .modes-grid { grid-template-columns: 1fr 1fr; } }
.mode-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; gap: 12px; }
.mode-card .state-dot { margin-top: 6px; width: 10px; height: 10px; box-shadow: none; }
.mode-card strong { display: block; }
.mode-card span { font-size: 14px; color: var(--ink-2); }
.formula { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 6px 16px; }
.formula div { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--ink-2); }
.formula div:last-child { border-bottom: 0; }
.formula strong { color: var(--ink); display: block; }
.formula code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 13.5px; }

/* ── Footer ─────────────────────────────── */
.footer { border-top: 1px solid var(--line); padding: 22px 0 calc(22px + env(safe-area-inset-bottom)); font-size: 14px; color: var(--ink-3); }
.footer-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; }
.footer a { color: var(--ink-2); text-underline-offset: 3px; }
.footer-right { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.coffee {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-weight: 500; color: var(--ink-2);
}
.footer .coffee { text-decoration: none; }
.coffee:hover { border-color: var(--warn); color: var(--ink); }
.coffee svg { width: 17px; height: 17px; fill: none; stroke: var(--warn); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.coffee-btn { text-decoration: none; }

/* ── Sticky mini-result (mobile) ───────────── */
.sticky-state {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 15;
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; text-decoration: none;
  background: var(--ink); color: var(--bg); box-shadow: 0 8px 30px rgba(0,0,0,.25);
}
.sticky-state .state-dot { margin: 0; box-shadow: 0 0 0 4px color-mix(in srgb, var(--sc) 35%, transparent); }
.sticky-name { font-weight: 600; flex: 1; }
.sticky-cta { font-size: 14px; opacity: .75; }
@media (min-width: 900px) { .sticky-state { display: none !important; } }

/* ── Dialogs ─────────────────────────────── */
.dlg { border: 0; padding: 0; background: var(--surface); color: var(--ink); border-radius: 22px; width: min(480px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.dlg::backdrop { background: rgba(20, 18, 16, .55); backdrop-filter: blur(3px); }
.dlg-in { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.dlg h2 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.emergency {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 16px; text-decoration: none;
  background: var(--emotion); color: #fff; font-weight: 600;
}
.em-num { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.line {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--line); text-decoration: none; background: var(--surface);
}
.line:hover { border-color: var(--ink-3); }
.line { flex-wrap: wrap; }
.line-name { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; flex: 1 1 180px; overflow-wrap: anywhere; }
.line-name strong { font-weight: 600; font-size: 15px; }
.line-num { margin-left: auto; flex-shrink: 0; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 15px; }
.line .flag { font-size: 12px; font-weight: 700; color: var(--ink-3); letter-spacing: .04em; }

.breathe-dlg { width: min(440px, calc(100vw - 24px)); }
.breathe-in { padding: 32px 24px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.orb-wrap { width: 220px; height: 220px; display: grid; place-items: center; margin-bottom: 8px; }
.orb {
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--wise) 55%, transparent), color-mix(in srgb, var(--wise) 18%, transparent) 70%);
  border: 2px solid color-mix(in srgb, var(--wise) 60%, transparent);
  transform: scale(.5); transition: transform 4s ease-in-out;
}
.breathe-word { font-size: 26px; font-weight: 600; min-height: 1.4em; }
.breathe-count { min-height: 1.5em; }
.breathe-btns { display: flex; gap: 8px; margin-top: 8px; }

/* ── Small screens ───────────────────────── */
@media (max-width: 560px) {
  .brand-name { font-size: 15px; }
  .help-btn { padding: 0 11px; }
}
@media (max-width: 440px) {
  .brand-name { display: none; }
  .view { padding-top: 20px; }
  .intro p { font-size: 17px; }
  .state-name { font-size: 24px; }
  .action-text { font-size: 17px; }
  .action-btns .btn { flex: 1 1 100%; }
  .step-hint { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}
