/* Life - visual language. This follows Rob Performance (design reference: Rob Performance origin/main 2e2cca0, the "Quiet V3" skin:
   near-black ground, navy cards, off-white type, one calm signal colour, role colours for sports, a floating glass tab bar).
   Tokens first; everything else refers to them. Fonts are self-hosted (Archivo, SIL OFL). No frameworks. */
@font-face { font-family: 'Archivo'; src: url('/fonts/archivo-var.woff2') format('woff2'); font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap; }
:root {
  /* surfaces */
  --void: #07090E; --card: #111824; --raised: #182231; --line: #243042; --hair: rgba(160, 171, 185, .09); --edge: rgba(160, 171, 185, .12); --edge-hi: rgba(160, 171, 185, .2);
  /* type */
  --ink: #EDF0F4; --ink-2: #A0ABB9; --muted: #A0ABB9; --faint: #7d8898;
  /* one calm signal colour (Rob: teal), used for selection, focus and small cues */
  --signal: #63AFB5; --signal-ink: #8fc7cc; --on-signal: #07090E;
  /* role colours, same hues as Rob; a sport owns its colour everywhere */
  --cobalt: #3b8cff; --cobalt-lt: #93bbff; --orange: #ff8a3d; --teal: #2fe0b0; --slate: #6f7c96; --gold: #ffd23f; --pink: #ff5c9a;
  --violet: #a78bfa; --green: #b6f23e; --magenta: #c77dff; --amber: #ffad33; --coral: #ff6b62; --cyan: #2ee6ff;
  /* shape, rhythm, motion */
  --r: 18px; --r-sm: 12px; --r-lg: 24px; --tap: 44px; --gut: 16px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --m-press: 80ms; --m-ack: 140ms; --m-content: 220ms; --m-sheet: 300ms;
  --ease-out: cubic-bezier(.2, .8, .2, 1); --ease-in-out: cubic-bezier(.4, 0, .2, 1); --e-settle: cubic-bezier(.22, 1.08, .36, 1);
  --spring: linear(0, .009, .035 2.1%, .141, .281 6.7%, .723 12.9%, .938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, .991, .977 51%, .974 53.8%, .975 57.1%, .997 69.8%, 1.003 76.9%, 1);
  --shadow: 0 12px 30px -12px rgba(0, 0, 0, .7);
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; --disp: var(--font); --fig-stretch: 78%;
  --navh: 64px;
  /* names used by older rules, mapped onto the tokens above */
  --bg: var(--void); --bg-2: #0f1a33; --surface: var(--card); --surface-2: var(--raised); --text: var(--ink); --accent: var(--signal); --accent-ink: var(--on-signal); --focus: var(--signal-ink);
  --ok: var(--green); --warn: var(--amber); --bad: var(--coral); --radius: var(--r); --radius-sm: var(--r-sm);
  --gold-300: #ffe27a; --gold-400: var(--gold); --gold-500: var(--gold); --gold-600: #c9a52b; --gold-grad: var(--ink); --ember-1: var(--ink); --ember-2: var(--ink-2);
  --glow-a: #24414a; --glow-b: #263449;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text); font: 400 16px/1.5 var(--font); overflow-x: hidden;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
h1, h2, h3 { font-weight: 750; letter-spacing: -.02em; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(1.9rem, 7vw, 2.4rem); } h2 { font-size: 1.35rem; } h3 { font-size: 1.05rem; }
p { margin: 0; } a { color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }   /* headings take programmatic focus on navigation; they are not controls */
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.noscript { padding: 24px; text-align: center; }
.muted { color: var(--muted); } .small { font-size: .875rem; } .center { text-align: center; }

/* ---- ambient background ---- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(120% 80% at 50% 0%, var(--bg-2), var(--bg)); }
.bg-glow { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; filter: blur(70px); opacity: .30; will-change: transform; }
.bg-glow.g1 { background: radial-gradient(circle, var(--glow-a), transparent 62%); left: -25vmax; top: -30vmax; animation: drift 22s var(--ease-in-out) infinite alternate; }
.bg-glow.g2 { background: radial-gradient(circle, var(--glow-b), transparent 62%); right: -30vmax; bottom: -35vmax; animation: drift 28s var(--ease-in-out) infinite alternate-reverse; }
@keyframes drift { to { transform: translate3d(6vmax, 4vmax, 0) scale(1.08); } }

/* ---- layout ---- */
main { width: 100%; max-width: 30rem; margin: 0 auto; padding: 20px var(--gut) 40px; min-height: 100dvh; display: flex; flex-direction: column; outline: none; }
.view { flex: 1; display: flex; flex-direction: column; gap: 22px; view-transition-name: view; }
.view.enter { animation: enter .5s var(--ease-out) backwards; }      /* backwards, not both: a view left holding a transform would become the containing block of the fixed tab bar (off-centre and overflowing on tablets) */
.view > header { display: flex; flex-direction: column; gap: 8px; }
.stack { display: flex; flex-direction: column; gap: 14px; } .row { display: flex; gap: 10px; align-items: center; } .grow { flex: 1; } .between { justify-content: space-between; }
.spacer { flex: 1; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.03em; font-size: 1.25rem; }
.brand img { width: 34px; height: 34px; display: block; }
.card { background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.card.pad-lg { padding: 22px; }

/* ---- view transitions (shared-axis slide + fade) ---- */
::view-transition-old(view), ::view-transition-new(view) { animation-duration: .42s; animation-timing-function: var(--ease-out); animation-fill-mode: both; }
html[data-nav="forward"]::view-transition-old(view) { animation-name: out-left; }  html[data-nav="forward"]::view-transition-new(view) { animation-name: in-right; }
html[data-nav="back"]::view-transition-old(view) { animation-name: out-right; }    html[data-nav="back"]::view-transition-new(view) { animation-name: in-left; }
html[data-nav="fade"]::view-transition-old(view) { animation-name: fade-out; }     html[data-nav="fade"]::view-transition-new(view) { animation-name: fade-in; }
@keyframes out-left { to { opacity: 0; transform: translateX(-28px) scale(.985); } } @keyframes in-right { from { opacity: 0; transform: translateX(32px) scale(.985); } }
@keyframes out-right { to { opacity: 0; transform: translateX(28px) scale(.985); } } @keyframes in-left { from { opacity: 0; transform: translateX(-32px) scale(.985); } }
@keyframes fade-out { to { opacity: 0; } } @keyframes fade-in { from { opacity: 0; } }
@keyframes enter { from { opacity: 0; transform: translateY(14px); } }

/* ---- buttons ---- */
.btn { appearance: none; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: 650 1rem/1 var(--font); min-height: 52px; padding: 0 22px; border-radius: 16px;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; transition: transform .35s var(--spring), background-color .2s, border-color .2s, opacity .2s; -webkit-tap-highlight-color: transparent; position: relative; }
.btn:active { transform: scale(.96); transition-duration: .08s; }
.btn.primary { background: var(--gold-grad); color: var(--accent-ink); border-color: transparent; box-shadow: 0 8px 24px rgba(233, 185, 73, .24); }
.btn.primary:not([disabled]):hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; } .btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); background: transparent; }
.btn.block { width: 100%; } .btn.small { min-height: 40px; padding: 0 14px; font-size: .9rem; border-radius: 12px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.loading { color: transparent !important; pointer-events: none; }
.btn.loading::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid color-mix(in srgb, var(--accent-ink) 35%, transparent); border-top-color: var(--accent-ink); animation: spin .7s linear infinite; }
.btn:not(.primary).loading::after { border-color: var(--line); border-top-color: var(--text); }
@keyframes spin { to { transform: rotate(360deg); } }
.link { background: none; border: 0; color: var(--accent); font: inherit; padding: 8px 4px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---- fields (floating labels) ---- */
.field { position: relative; display: block; }
.field input, .field select, .field textarea { width: 100%; min-height: 58px; padding: 24px 16px 8px; background: var(--surface); color: var(--text); border: 1.5px solid var(--line); border-radius: 16px; font: 500 1rem/1.3 var(--font);
  transition: border-color .2s, box-shadow .3s var(--ease-out); appearance: none; }
.field textarea { min-height: 110px; resize: vertical; padding-top: 28px; }
.field label { position: absolute; left: 17px; top: 18px; color: var(--muted); pointer-events: none; transform-origin: left top; transition: transform .28s var(--ease-out), color .2s; }
.field input:focus ~ label, .field input:not(:placeholder-shown) ~ label, .field textarea:focus ~ label, .field textarea:not(:placeholder-shown) ~ label, .field select ~ label { transform: translateY(-11px) scale(.76); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.field input:focus ~ label { color: var(--accent); }
.field.invalid input, .field.invalid select { border-color: var(--bad); } .field .toggle-pw { position: absolute; right: 8px; top: 9px; }
.hint { font-size: .85rem; color: var(--muted); padding: 6px 4px 0; min-height: 1.4em; }
.error { color: var(--bad); font-size: .92rem; min-height: 1.4em; } .error:empty { display: none; }
.shake { animation: shake .45s var(--ease-out); }
@keyframes shake { 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }
.meter { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 8px; }
.meter > i { display: block; height: 100%; width: 0; background: var(--bad); border-radius: inherit; transition: width .45s var(--ease-out), background-color .3s; }

/* ---- choices, chips, segmented, switches ---- */
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .choices.one { grid-template-columns: 1fr; }
.choice { text-align: left; background: var(--surface); border: 1.5px solid var(--line); border-radius: 16px; padding: 14px; color: var(--text); font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-height: 76px;
  transition: transform .4s var(--spring), border-color .2s, background-color .2s, box-shadow .3s; -webkit-tap-highlight-color: transparent; }
.choice:active { transform: scale(.97); } .choice b { font-weight: 700; } .choice span { color: var(--muted); font-size: .88rem; }
.choice[aria-pressed="true"], .choice[aria-checked="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); animation: pop .45s var(--spring); }
@keyframes pop { 0% { transform: scale(.94); } 100% { transform: scale(1); } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font: 600 .95rem var(--font); min-height: 44px; padding: 0 16px; border-radius: 99px; cursor: pointer; transition: transform .35s var(--spring), background-color .2s, border-color .2s; }
.chip:active { transform: scale(.94); } .chip[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); border-color: var(--accent); }
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; padding: 4px; gap: 4px; position: relative; }
.segmented button { border: 0; background: none; color: var(--muted); font: 650 .9rem var(--font); min-height: 40px; border-radius: 10px; cursor: pointer; transition: background-color .25s, color .25s; }
.segmented button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); box-shadow: 0 1px 0 var(--line); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 16px; }
.switch-row .t { display: flex; flex-direction: column; gap: 2px; } .switch-row .t span { color: var(--muted); font-size: .88rem; }
.switch { appearance: none; position: relative; flex: none; width: 52px; height: 32px; border-radius: 99px; background: var(--line); border: 0; cursor: pointer; transition: background-color .25s; }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .4s var(--spring); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.switch:checked { background: var(--gold-grad); } .switch:checked::after { transform: translateX(20px); }
.days { display: flex; gap: 6px; } .days .chip { min-width: 0; flex: 1; padding: 0; font-size: .82rem; min-height: 42px; }

/* ---- onboarding progress ---- */
.progress { display: flex; align-items: center; gap: 14px; }
.ring { width: 46px; height: 46px; flex: none; } .ring circle { fill: none; stroke-width: 5; } .ring .track { stroke: var(--line); }
.ring .bar { stroke: url(#ringGrad); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset .8s var(--spring); }
.bar-steps { flex: 1; display: flex; gap: 5px; } .bar-steps i { flex: 1; height: 5px; border-radius: 9px; background: var(--line); overflow: hidden; position: relative; }
.bar-steps i::after { content: ""; position: absolute; inset: 0; background: var(--gold-grad); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease-out); }
.bar-steps i.done::after { transform: scaleX(1); } .bar-steps i.now::after { transform: scaleX(.45); }
.nav-row { display: flex; gap: 10px; margin-top: auto; padding-top: 8px; position: sticky; bottom: 0; padding-bottom: 6px; }

/* ---- success / illustrations ---- */
svg.check { width: 72px; height: 72px; } svg.check circle { fill: none; stroke: var(--ok); stroke-width: 4; stroke-dasharray: 190; stroke-dashoffset: 190; animation: draw .6s var(--ease-out) forwards; }
svg.check path { fill: none; stroke: var(--ok); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 50; stroke-dashoffset: 50; animation: draw .45s .4s var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.envelope { width: 96px; height: 96px; animation: float 3.4s var(--ease-in-out) infinite; } @keyframes float { 50% { transform: translateY(-8px); } }
.mascot { display: block; } .mascot svg { width: 100%; height: 100%; overflow: visible; }
.mascot .bob { animation: bob 3.2s var(--ease-in-out) infinite; transform-origin: 50% 90%; } .mascot .blink { animation: blink 5s infinite; transform-origin: center; transform-box: fill-box; }
.mascot.celebrate .bob { animation: jump .9s var(--spring) 2; }
@keyframes bob { 50% { transform: translateY(-4px) scale(1.01); } } @keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@keyframes jump { 35% { transform: translateY(-26px) scale(1.05, .96); } 70% { transform: translateY(0) scale(.97, 1.04); } }
.mascot.sm { width: 56px; height: 56px; } .mascot.md { width: 110px; height: 110px; } .mascot.lg { width: 168px; height: 168px; }

/* ---- lists, sheets, toasts, badges ---- */
.list { display: flex; flex-direction: column; } .item { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line); } .item:last-child { border-bottom: 0; }
.item .t { flex: 1; min-width: 0; } .item .t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .item .t span { color: var(--muted); font-size: .86rem; }
.badge { font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); white-space: nowrap; }
.badge.ok { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); } .badge.bad { background: color-mix(in srgb, var(--bad) 18%, transparent); color: var(--bad); }
#toasts { position: fixed; left: 0; right: 0; bottom: calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; z-index: 30; }
.toast { background: var(--surface-2); border: 1px solid var(--line); color: var(--text); padding: 12px 18px; border-radius: 14px; box-shadow: var(--shadow); max-width: 90vw; animation: toast-in .5s var(--spring) both; }
.toast.out { animation: toast-out .25s var(--ease-in-out) forwards; } .toast.bad { border-color: var(--bad); }
@keyframes toast-in { from { opacity: 0; transform: translateY(18px) scale(.95); } } @keyframes toast-out { to { opacity: 0; transform: translateY(10px); } }
.chat { display: flex; flex-direction: column; gap: 10px; max-height: 48dvh; overflow: auto; padding: 4px 2px; }
.bubble { max-width: 86%; padding: 11px 14px; border-radius: 18px; background: var(--surface-2); animation: enter .35s var(--ease-out) both; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.me { align-self: flex-end; background: var(--gold-grad); color: var(--accent-ink); border-bottom-right-radius: 6px; } .bubble.coach { border-bottom-left-radius: 6px; }
.typing { display: inline-flex; gap: 4px; } .typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: dot 1s infinite; } .typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 40% { transform: translateY(-5px); opacity: .5; } }
.qr { width: 180px; height: 180px; background: #fff; border-radius: 12px; padding: 8px; align-self: center; } code.secret { word-break: break-all; font-size: .85rem; background: var(--surface-2); padding: 6px 8px; border-radius: 8px; }
.tabbar { display: flex; gap: 6px; } .tabbar .btn { flex: 1; min-height: 44px; }

/* ---- reduced motion: keep meaning (state changes still happen), drop movement ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .bg-glow { animation: none; }
  ::view-transition-old(view), ::view-transition-new(view) { animation: none !important; }
}
@media (min-width: 720px) { main { padding-top: 56px; } }

.big { font-size: 1.6rem; font-weight: 800; min-width: 2ch; text-align: center; }

/* ---- boot splash: the brand shows while the app loads, then fades away ---- */
.boot { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: #000;   /* matches the launch image and icon */
  transition: opacity .5s var(--ease-out), visibility .5s; }
.boot.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.boot img { width: 84px; height: 84px; animation: boot-in .9s var(--spring) both; }
.boot span { color: #fff; font: 800 2rem/1 var(--font); letter-spacing: -.03em; animation: boot-in .9s .12s var(--spring) both; }
@keyframes boot-in { from { opacity: 0; transform: translateY(10px) scale(.92); } }
.wordmark { color: var(--text); }
/* ---- activity tracking picker ---- */
.notice { display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--gold-500) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--gold-500) 35%, var(--line)); color: var(--text); font-size: .92rem; }
.notice b { color: var(--accent); }
.method { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: start; text-align: left; }
.method .tag { grid-row: 1; grid-column: 2; } .method b { grid-column: 1; } .method span { grid-column: 1 / -1; }
.provider { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1.5px dashed var(--line); border-radius: 16px; background: transparent; }
.provider .logo-dot { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-weight: 800; flex: none; }
.provider .t { flex: 1; min-width: 0; } .provider .t b { display: block; } .provider .t span { color: var(--muted); font-size: .85rem; }
.tag { font-size: .72rem; font-weight: 750; padding: 3px 9px; border-radius: 99px; white-space: nowrap; letter-spacing: .01em; }
.tag.next { background: color-mix(in srgb, var(--gold-500) 20%, transparent); color: var(--accent); }
.tag.later { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.tag.live { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.choice .tag { align-self: flex-start; margin-top: 6px; }
.provider .t b { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }

.row-btn { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); color: inherit; font: inherit; text-align: left; cursor: pointer; min-height: 60px; }
.row-btn:last-child { border-bottom: 0; } .row-btn:active { background: var(--surface-2); } .chev { color: var(--muted); font-size: 1.6rem; line-height: 1; }

/* ---- bottom tab bar ---- */
.view.has-tabs { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center; gap: 4px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--navy-900) 88%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.tab { flex: 1; max-width: 120px; background: none; border: 0; color: var(--muted); font: 650 .72rem var(--font); display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; border-radius: 14px; cursor: pointer; transition: color .2s, transform .35s var(--spring); -webkit-tap-highlight-color: transparent; }
.tab svg { width: 24px; height: 24px; } .tab:active { transform: scale(.92); } .tab.on { color: var(--accent); }
.tab.on svg { animation: pop .45s var(--spring); }
/* ---- training screens ---- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; } .stat { background: var(--surface-2); border-radius: 14px; padding: 12px; min-width: 0; } .stat b { display: block; font-size: 1.1rem; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .stat span { color: var(--muted); font-size: .78rem; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 84px; } .bars .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; font-size: .66rem; color: var(--faint); }
.bars i { display: block; width: 100%; min-height: 3px; height: calc(var(--h, 0) * 1%); border-radius: 6px 6px 3px 3px; background: var(--gold-grad); transform-origin: bottom; animation: grow .7s var(--ease-out) both; } .bars .col.now i { box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold-500) 40%, transparent); }
@keyframes grow { from { transform: scaleY(0); } }
.act { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); color: inherit; font: inherit; padding: 14px 2px; cursor: pointer; min-height: 64px; }
.act:last-child { border-bottom: 0; } .act:active { background: var(--surface-2); }
.act .dot { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--surface-2); flex: none; font-weight: 800; color: var(--accent); }
.act .t { flex: 1; min-width: 0; } .act .t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .act .t span { color: var(--muted); font-size: .84rem; }
.act .r { text-align: right; font-weight: 700; font-size: .92rem; white-space: nowrap; } .act .r span { display: block; color: var(--muted); font-weight: 500; font-size: .78rem; }
.day-h { color: var(--muted); font: 700 .78rem var(--font); letter-spacing: .06em; text-transform: uppercase; margin: 14px 2px 2px; }
.range { width: 100%; accent-color: var(--gold-500); } .rpe-val { font-weight: 800; min-width: 3ch; text-align: right; }
.dropzone { border: 2px dashed var(--line); border-radius: 18px; padding: 28px 16px; text-align: center; transition: border-color .2s, background-color .2s; cursor: pointer; } .dropzone.over { border-color: var(--accent); background: color-mix(in srgb, var(--gold-500) 10%, transparent); }
.preview { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface); animation: enter .4s var(--ease-out) both; }
.map { width: 100%; height: 180px; border-radius: 14px; background: var(--surface-2); } .map polyline { fill: none; stroke: var(--gold-500); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.week-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sess { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface); }
.sess.done { opacity: .75; border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); } .sess.skipped { opacity: .55; text-decoration: line-through; }
.sess .t { flex: 1; min-width: 0; } .sess .t span { color: var(--muted); font-size: .85rem; display: block; }
.tpl { text-align: left; } .tpl .tag { margin-top: 6px; align-self: flex-start; }
.sheet-back { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .55); display: flex; align-items: flex-end; justify-content: center; animation: fade-in .25s both; }
.sheet { width: 100%; max-width: 30rem; max-height: 88dvh; overflow: auto; background: var(--bg-2); border: 1px solid var(--line); border-radius: 24px 24px 0 0; padding: 20px var(--gut) calc(24px + env(safe-area-inset-bottom)); animation: sheet-in .45s var(--spring) both; }
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }
.exercise { padding: 12px; border: 1.5px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; gap: 8px; } .setrow { display: grid; grid-template-columns: 24px 1fr 1fr auto; gap: 8px; align-items: center; } .setrow input { min-height: 44px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); padding: 0 10px; font: inherit; width: 100%; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ex-name { flex: 1; min-width: 0; min-height: 44px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); padding: 0 12px; font: inherit; }
.dropzone:focus-within { border-color: var(--accent); }

.view.has-tabs ~ #toasts, body:has(.tabs) #toasts { bottom: calc(92px + env(safe-area-inset-bottom)); }

/* ======================================================================================================
   Rob Performance layer: the app bar, page titles, scene header, floating glass tab bar, tiles, rows, chips,
   sheets and primary buttons, taken from Rob Performance's render.py (see docs/VISUAL-MIGRATION.md).
   ====================================================================================================== */
body { background: var(--void); color: var(--ink); font: 400 15px/1.55 var(--font); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
body::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 420px; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, #0f2042 0%, #0b1731 45%, var(--void) 100%); -webkit-mask-image: linear-gradient(180deg, #000 52%, transparent 96%); mask-image: linear-gradient(180deg, #000 52%, transparent 96%); }
body[data-view="today"]::before { background: linear-gradient(180deg, #123035 0%, #0d1d26 45%, var(--void) 100%); }
body[data-view="plan"]::before { background: linear-gradient(135deg, #2a2347 0%, #121626 40%, var(--void) 100%); }
body[data-view="coach"]::before, body[data-view="settings"]::before { background: linear-gradient(180deg, #0f1a33 0%, #0b1428 45%, var(--void) 100%); }
.bg { display: none; }
h1, h2, h3 { font-family: var(--font); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 11vw, 3.1rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.05; }
h3 { font-size: 15px; font-weight: 600; letter-spacing: 0; }
.num, .stat b, .fact b, .row-mx, .tile .v, .wk b, .date-blk b { font-stretch: var(--fig-stretch); font-variant-numeric: tabular-nums; }
button, [role="tab"], summary { min-height: var(--tap); }
input, textarea, select { font-size: 16px; }
main { padding-top: 0; }
.view { gap: var(--s5); }
.view.has-tabs { padding-bottom: calc(var(--navh) + env(safe-area-inset-bottom) + 36px); }
.view.has-tabs::after { content: ''; position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--navh) + env(safe-area-inset-bottom) + 22px); background: linear-gradient(180deg, transparent, var(--void) 42%); pointer-events: none; z-index: 19; }

/* app bar: date at the left, the person at the right */
.appbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0 0; min-height: 56px; }
.appbar .when { display: flex; align-items: center; gap: 10px; min-width: 0; font: 700 20px/1.2 var(--font); font-stretch: var(--fig-stretch); letter-spacing: -.01em; }
.appbar .when img { width: 26px; height: 26px; flex: none; } .appbar .when small { font: 500 13px var(--font); color: var(--ink-2); }
.avatar { width: var(--tap); height: var(--tap); flex: none; border-radius: 50%; border: 1px solid var(--edge-hi); background: rgba(17, 24, 36, .8); color: var(--ink); font: 700 16px var(--font); cursor: pointer; display: grid; place-items: center; padding: 0; }
.avatar:active { transform: scale(.94); }
.greet { color: var(--ink-2); font-size: 20px; font-weight: 500; line-height: 1.2; }
.ptitle { display: flex; flex-direction: column; gap: 4px; }
.view.has-tabs h1::after { content: ''; display: block; width: 34px; height: 4px; border-radius: 4px; margin-top: 14px; background: linear-gradient(90deg, var(--cobalt), var(--violet)); }
body[data-view="plan"] .view.has-tabs h1::after { background: linear-gradient(90deg, var(--violet), var(--orange)); }
body[data-view="today"] .view.has-tabs h1::after { background: linear-gradient(90deg, var(--cobalt), var(--teal)); }
.view > header { gap: 4px; }

/* surfaces: sections divided by hairlines, grouped things on one calm navy surface */
.card { background: var(--card); border: 1px solid var(--edge); border-radius: var(--r); padding: var(--s4); box-shadow: inset 0 1px 0 rgba(237, 240, 244, .05); backdrop-filter: none; }
.card.stack, .stack { gap: var(--s3); }
.panel { background: var(--card); border-radius: var(--r); padding: var(--s4); border: 1px solid var(--edge); }

/* buttons: one calm filled primary (off-white), quiet secondary */
.btn { min-height: 46px; padding: 0 20px; border-radius: 16px; background: rgba(255, 255, 255, .04); border: 1px solid var(--edge-hi); color: var(--ink); font: 600 16px/1 var(--font); box-shadow: inset 0 1px 0 rgba(237, 240, 244, .05); transition: background-color var(--m-ack) var(--ease-in-out), transform var(--m-press) var(--ease-in-out), border-color var(--m-ack); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--ink); color: var(--void); border-color: transparent; box-shadow: none; }
.btn.primary:not([disabled]):hover { filter: none; background: #fff; }
.btn.small { min-height: 40px; border-radius: 13px; font-size: 14.5px; padding: 0 14px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.danger { color: var(--coral); border-color: color-mix(in srgb, var(--coral) 40%, var(--edge)); background: transparent; }
.btn.loading::after { border-color: color-mix(in srgb, var(--void) 35%, transparent); border-top-color: var(--void); }
.btn:not(.primary).loading::after { border-color: var(--edge-hi); border-top-color: var(--ink); }
.link { color: var(--signal-ink); }
.switch:checked { background: var(--signal); } .bar-steps i::after { background: var(--signal); }
.badge { background: color-mix(in srgb, var(--signal) 18%, transparent); color: var(--signal-ink); }
.tag.next { background: color-mix(in srgb, var(--gold) 16%, transparent); color: var(--gold); }
.notice { background: color-mix(in srgb, var(--amber) 10%, var(--card)); }

/* selected = dark raised surface with a thin signal edge (never a big filled pill) */
.choice[aria-pressed="true"], .choice[aria-checked="true"], .chip-btn[aria-pressed="true"] { background: var(--raised); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--signal) 60%, transparent); border-color: transparent; color: var(--ink); }
.chiprow { display: flex; gap: var(--s2); overflow-x: auto; padding: 2px 0 var(--s2); scrollbar-width: none; margin: 0 calc(var(--gut) * -1); padding-inline: var(--gut); }
.chiprow::-webkit-scrollbar { display: none; }
.chip-btn { flex: none; min-height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(157, 170, 189, .22); background: transparent; color: var(--ink); font: 600 14px/1 var(--font); cursor: pointer; }
.chip-btn .n { color: var(--signal); margin-left: 6px; font-weight: 600; }

/* floating glass tab bar */
.tabs { left: 10px; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom)); max-width: 680px; margin: 0 auto; padding: 4px; gap: 2px; justify-content: space-between; border-radius: 22px; border: 1px solid rgba(160, 171, 185, .16); border-top: 1px solid rgba(160, 171, 185, .16);
  background: rgba(17, 24, 36, .8); -webkit-backdrop-filter: blur(14px) saturate(120%); backdrop-filter: blur(14px) saturate(120%); box-shadow: inset 0 1px 0 rgba(237, 240, 244, .06), 0 12px 30px -12px rgba(0, 0, 0, .7); z-index: 30; }
.tab { flex: 1 1 0; min-width: 0; max-width: none; min-height: var(--tap); border-radius: 18px; padding: 8px 1px 7px; font: 600 11px/1 var(--font); color: var(--ink-2); gap: 3px; }
.tab svg { opacity: .75; } .tab.on { color: var(--ink); background: var(--raised); box-shadow: inset 0 0 0 1px rgba(160, 171, 185, .14); } .tab.on svg { opacity: 1; color: var(--signal); animation: none; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .tabs { background: var(--card); } }
@media (prefers-reduced-transparency: reduce) { .tabs, .sheet, .toast { background: var(--card) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; } }
@media (min-width: 720px) { .tabs { width: 680px; } }

/* tiles: a tinted card with an icon + label, one big condensed figure, one quiet line */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.tile { --tint: var(--cobalt); position: relative; padding: var(--s4); border-radius: var(--r); border: 1px solid color-mix(in srgb, var(--tint) 34%, transparent); min-height: 128px; display: flex; flex-direction: column; gap: 2px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--tint) 22%, var(--card)), var(--card) 72%); text-align: left; color: var(--ink); font: inherit; cursor: default; }
button.tile { cursor: pointer; } button.tile:active { transform: scale(.98); }
.tile .k { display: flex; align-items: center; gap: 8px; color: color-mix(in srgb, var(--tint) 78%, var(--ink)); font: 600 15px var(--font); } .tile .k svg { width: 18px; height: 18px; flex: none; }
.tile .v { font-size: clamp(34px, 11vw, 44px); font-weight: 800; letter-spacing: -.02em; line-height: 1.05; margin-top: auto; } .tile .v small { font-size: 18px; font-weight: 700; color: var(--ink-2); margin-left: 4px; }
.tile .s { color: var(--ink-2); font-size: 14px; }
.tile.violet { --tint: var(--violet); } .tile.pink { --tint: var(--pink); } .tile.gold { --tint: var(--gold); } .tile.teal { --tint: var(--teal); } .tile.orange { --tint: var(--orange); }

/* stats inside a panel: figures separated by hairlines, no boxes */
.stats { gap: 0; } .stat { background: none; border-radius: 0; padding: 4px 12px; border-left: 1px solid var(--hair); min-width: 0; } .stat:first-child { border-left: 0; padding-left: 0; }
.stat b { font-size: clamp(22px, 7vw, 28px); font-weight: 800; letter-spacing: -.01em; } .stat span { color: var(--ink-2); font-size: 12.5px; }
.bars i { background: var(--cobalt); box-shadow: none; } .bars .col.now i { background: var(--cobalt-lt); box-shadow: none; } .bars .col { color: var(--ink-2); }

/* the week strip: a coloured square per day, what was done below it */
.wk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; text-align: center; }
.wk .d { color: var(--ink-2); font: 600 14px var(--font); } .wk .sq { height: 44px; border-radius: 12px; background: var(--card); border: 1px solid var(--edge); }
.wk .sq.rest { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .04) 0 4px, transparent 4px 8px), var(--card); }
.wk .sq.today { box-shadow: 0 0 0 2px var(--ink); } .wk b { font-size: 15px; font-weight: 700; color: var(--ink); } .wk .sq.has { border-color: transparent; }

/* rows: each session its own card, with a date block */
.act { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px; margin: 0 0 var(--s2); border-radius: var(--r); border: 1px solid var(--edge); background: var(--card); min-height: 0;
  box-shadow: inset 0 1px 0 rgba(237, 240, 244, .05); transition: transform var(--m-press) var(--ease-in-out), border-color var(--m-ack); }
.act:last-child { border-bottom: 1px solid var(--edge); margin-bottom: 0; } .act:active { transform: scale(.985); background: var(--card); } .act:hover { border-color: var(--edge-hi); }
.date-blk { --tint: var(--cobalt); display: grid; place-items: center; align-content: center; min-height: 58px; border-radius: 12px; background: color-mix(in srgb, var(--tint) 20%, var(--card)); border: 1px solid color-mix(in srgb, var(--tint) 34%, transparent); color: var(--ink); line-height: 1.05; }
.date-blk b { font-size: 24px; font-weight: 800; } .date-blk small { font-size: 11.5px; font-weight: 600; color: color-mix(in srgb, var(--tint) 70%, var(--ink)); letter-spacing: .04em; text-transform: uppercase; }
.act .dot { display: none; }
.act .t b { font-size: 16px; } .act .t span { color: var(--ink-2); font-size: 13px; }
.row-mx { display: flex; gap: 2px 14px; flex-wrap: wrap; margin-top: 4px; font-size: 16px; font-weight: 700; } .row-mx small { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-left: 2px; }
.act .r { font-weight: 600; color: var(--ink-2); font-size: 12.5px; align-self: start; }
.day-h { margin: var(--s4) 2px var(--s2); color: var(--ink-2); font-size: 13px; letter-spacing: .08em; }
.sess { border-radius: var(--r); border: 1px solid var(--edge); background: var(--card); box-shadow: inset 0 1px 0 rgba(237, 240, 244, .05); }
.sess.done { border-color: color-mix(in srgb, var(--green) 40%, var(--edge)); }

/* header controls */
.week-nav { display: grid; grid-template-columns: var(--tap) 1fr var(--tap); align-items: center; gap: var(--s2); text-align: center; }
.week-nav .btn { width: var(--tap); min-height: var(--tap); padding: 0; border-radius: 50%; font-size: 22px; } .week-nav b { font: 700 18px var(--font); }

/* bottom sheet: glass, a grabber, a proper rise */
.sheet-back { background: rgba(3, 5, 9, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.sheet { background: linear-gradient(180deg, rgba(30, 37, 54, .92), rgba(16, 20, 30, .96)); border: 1px solid var(--edge-hi); border-bottom: 0; border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: 0 -20px 50px -20px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .08);
  animation: sheet-in var(--m-sheet) var(--e-settle) both; -webkit-backdrop-filter: blur(24px) saturate(150%); backdrop-filter: blur(24px) saturate(150%); }
.sheet::before { content: ''; display: block; width: 38px; height: 4px; border-radius: 4px; margin: -6px auto 6px; background: rgba(255, 255, 255, .22); flex: none; }

/* fields in the same surfaces */
.field input, .field select, .field textarea { background: var(--card); border: 1px solid var(--edge-hi); border-radius: 14px; min-height: 56px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--signal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--signal) 24%, transparent); }
.field input:focus ~ label { color: var(--signal-ink); }
.setrow input, .ex-name { background: var(--card); border: 1px solid var(--edge-hi); }
.range { accent-color: var(--signal); }
.dropzone { border-color: var(--edge-hi); } .dropzone.over { border-color: var(--signal); background: color-mix(in srgb, var(--signal) 10%, transparent); }
.preview, .exercise { background: var(--card); border: 1px solid var(--edge); }
.map { background: var(--card); border: 1px solid var(--edge); } .map polyline { stroke: var(--cobalt-lt); }

/* Coach, in Rob's shape: a context card, then the conversation above a floating ask bar */
.bubble.me { background: #1b3136; color: var(--ink); } .bubble.coach { background: var(--card); border: 1px solid var(--edge); }
.ask { position: sticky; bottom: calc(var(--navh) + env(safe-area-inset-bottom) + 20px); z-index: 25; padding: 6px; border-radius: 22px; background: rgba(17, 24, 36, .85); border: 1px solid var(--edge-hi); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .7); }
.ask .field input { border: 0; background: transparent; }
.ask .btn.primary { background: var(--signal); color: var(--void); }

/* toasts: one calm glass pill, clear of the tab bar */
#toasts { bottom: calc(var(--navh) + env(safe-area-inset-bottom) + 24px); }
body:not(:has(.tabs)) #toasts { bottom: calc(18px + env(safe-area-inset-bottom)); }
.toast { background: rgba(24, 34, 49, .94); border: 1px solid var(--edge-hi); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); font-weight: 600; }

@media (prefers-reduced-motion: reduce) { .tab:active, .btn:active, .act:active, .avatar:active, button.tile:active { transform: none; } }

.hero { align-items: flex-end; gap: var(--s3); } .hero .stack { gap: 2px; }
.wkc { gap: 6px; align-items: stretch; } .acts { gap: 0; }
.coach-box { gap: var(--s3); } .chat { display: flex; flex-direction: column; gap: var(--s2); }
.stat b small { font-size: 14px; font-weight: 700; color: var(--ink-2); }

.hint:empty { display: none; } .hint { min-height: 0; margin: 4px 4px 0; }
.sess { flex-direction: column; } .sess > .stack { flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--s2); width: 100%; }
.tiles.compact .tile { min-height: 0; } .chat > * { scroll-margin-bottom: 240px; }
.stack > div > .field + .hint, .stack > div:has(> .field) { margin: 0; }
.ring .bar { stroke: var(--signal); }

/* ---- trends ---- */
.chartbox { position: relative; } .chart, .heat { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--hair); stroke-width: 1; } .chart .axis { stroke: var(--line); stroke-width: 1; } .chart .tick { fill: var(--ink-2); font: 500 10px var(--font); }
.chart .bar { fill: var(--cobalt); transition: fill var(--m-ack); } .chart .bar.now { fill: var(--cobalt-lt); opacity: .75; } .bar-g { outline: none; } .bar-g:hover .bar, .bar-g:focus .bar { fill: var(--cobalt-lt); opacity: 1; }
.chart .hit { fill: transparent; } .bar-g:focus-visible .hit { stroke: var(--signal); stroke-width: 1.5; rx: 4; } .chart .direct { fill: var(--ink); font: 700 11px var(--font); }
.hm0 { fill: var(--raised); background: var(--raised); } .hm1 { fill: color-mix(in srgb, var(--cobalt) 30%, var(--card)); background: color-mix(in srgb, var(--cobalt) 30%, var(--card)); }
.hm2 { fill: color-mix(in srgb, var(--cobalt) 52%, var(--card)); background: color-mix(in srgb, var(--cobalt) 52%, var(--card)); } .hm3 { fill: color-mix(in srgb, var(--cobalt) 76%, var(--card)); background: color-mix(in srgb, var(--cobalt) 76%, var(--card)); } .hm4 { fill: var(--cobalt-lt); background: var(--cobalt-lt); }
.legend { display: flex; align-items: center; gap: 4px; color: var(--ink-2); font-size: 12px; } .legend i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; } .legend span:first-child { margin-right: 4px; } .legend span:last-child { margin-left: 4px; }
.tip { position: absolute; left: var(--x, 50%); top: var(--y, 0); transform: translate(-50%, calc(-100% - 8px)); z-index: 5; pointer-events: none; display: grid; gap: 1px; min-width: 120px; padding: 8px 10px; border-radius: 10px; background: var(--raised); border: 1px solid var(--edge-hi); box-shadow: var(--shadow); font-size: 12.5px; }
.tip.flip { transform: translate(-85%, calc(-100% - 8px)); } .tip b { font-size: 13px; } .tip span { color: var(--ink-2); }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 16px; background: rgba(17, 24, 36, .82); border: 1px solid var(--edge-hi); }
.seg-b { flex: 1; min-height: 40px; border-radius: 12px; border: 0; background: none; color: var(--ink-2); font: 600 14px var(--font); cursor: pointer; transition: background-color var(--m-ack), color var(--m-ack); }
.seg-b[aria-selected="true"] { background: var(--raised); color: var(--ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--signal) 55%, transparent); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4) var(--s3); } .facts b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.01em; font-stretch: var(--fig-stretch); } .facts span { color: var(--ink-2); font-size: 13px; line-height: 1.3; display: block; }
.mix { display: flex; flex-direction: column; gap: var(--s3); } .mix-row { display: flex; flex-direction: column; gap: 6px; } .mixbar { height: 8px; border-radius: 4px; background: var(--raised); overflow: hidden; } .mixbar i { display: block; height: 100%; width: var(--w); background: var(--c); border-radius: 4px; }
.dtable { width: 100%; border-collapse: collapse; font-size: 14px; } .dtable th, .dtable td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--hair); font-weight: 500; } .dtable thead th { color: var(--ink-2); font-size: 12px; } .dtable td { font-variant-numeric: tabular-nums; }
.tile.compact { min-height: 0; } .trends .tiles { grid-template-columns: 1fr 1fr; }

/* ---- brief, proposals ---- */
.brief-item { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-top: 1px solid var(--hair); align-items: flex-start; } .brief-item:first-of-type { border-top: 0; padding-top: 0; }
.brief-item > .row { width: 100%; } .sev { font: 700 11.5px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); } .brief-item.attention .sev { color: var(--amber); } .brief-item.suggest .sev { color: var(--signal-ink); }
.why { margin: 0; } .link.small { font-size: .85rem; padding: 4px; min-height: 0; }
.proposal { border: 1px solid color-mix(in srgb, var(--signal) 45%, var(--edge)); background: color-mix(in srgb, var(--signal) 8%, var(--card)); border-radius: var(--r-sm); padding: var(--s3); display: flex; flex-direction: column; gap: var(--s2); }
body[data-view="coach"] #toasts { bottom: calc(var(--navh) + env(safe-area-inset-bottom) + 112px); }
.sess.rest { opacity: .8; border-style: dashed; } .sess .why { color: var(--amber); font-size: .85rem; }

.wk .sq.restp { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .07) 0 4px, transparent 4px 8px), var(--card); }
.wk .sq.planned { background: transparent; border: 1.5px dashed var(--edge-hi); } .wk .sq.unconf { background: transparent; border: 1.5px dashed var(--amber); } .wk .sq.skip { opacity: .45; }
.wk .sq.rest { background: var(--card); }

/* ---- companion: motion stage and effects (engine: companion/engine.js) ---- */
.cstage { position: relative; height: 112px; margin-top: -6px; overflow: visible; touch-action: manipulation; }
.cstage.tall { height: 150px; margin-top: 0; }
.companion { position: absolute; left: 0; bottom: 0; will-change: transform; touch-action: manipulation; }
.companion svg { width: 100%; height: 100%; overflow: visible; display: block; }
.fx-z { opacity: 0; animation: fxz 2.8s ease-in-out infinite; }
@keyframes fxz { 0% { opacity: 0; transform: translate(0, 4px); } 20% { opacity: .95; } 100% { opacity: 0; transform: translate(8px, -22px); } }
.fx-conf { animation: fxconf 1.5s cubic-bezier(.2, .7, .3, 1) both; }
@keyframes fxconf { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--r)); } }
.fx-sweat { opacity: 0; animation: fxsweat 2.4s ease-in infinite; }
@keyframes fxsweat { 0% { opacity: 0; transform: translateY(-4px); } 25% { opacity: .9; } 100% { opacity: 0; transform: translateY(14px); } }
.fx-bang { animation: fxbang .9s var(--spring) both; transform-box: fill-box; transform-origin: center; }
@keyframes fxbang { 0% { opacity: 0; transform: scale(.3); } 30% { opacity: 1; transform: scale(1.25); } 100% { opacity: 0; transform: scale(1) translateY(-6px); } }
.m-star { animation: twinkle 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes twinkle { 50% { transform: scale(1.25) rotate(12deg); } }
@media (prefers-reduced-motion: reduce) { .m-star, .fx-z, .fx-sweat, .fx-conf { animation: none; } }
.mascot-preview { padding: 6px 12px 0; overflow: visible; } .mascot-preview .cstage { height: 120px; }
.mascot .scene-icon { width: 100%; height: 100%; object-fit: contain; display: block; }
.companion.scene { pointer-events: auto; } .scene-img { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; object-fit: contain; max-width: none; object-position: center bottom; transform-origin: 50% 100%; will-change: transform, opacity; user-select: none; -webkit-user-drag: none; }
.coach-mode { margin: 0; font-size: 13px; line-height: 1.4; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line, #243042); color: var(--ink-2, #A0ABB9); } .coach-mode.test { border-style: dashed; } .coach-mode b { color: var(--ink, #EDF0F4); }

/* ---- custom pictures ---- */
.sticker-mgr { gap: 10px; }
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.sticker-item { display: grid; gap: 6px; justify-items: center; padding: 8px; min-height: 0; }
.sticker-item b { font-size: 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sticker-thumb { width: 64px; height: 64px; object-fit: contain; border-radius: 12px; background: rgba(255, 255, 255, .04); }
.sticker-mgr .input { width: 100%; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line, #243042); background: var(--card, #111824); color: inherit; font: inherit; }

/* ---- plan: calendar, legend, coming-up cards (Rob layout) ---- */
/* session kinds (web/sessiontypes.js): easy teal, intervals blue, tempo orange, gym purple, race gold, rest slate, mobility mint, physio coral;
   each is at least 3:1 on the card navy and always appears with its name, so colour is never the only cue */
:root { --t-easy: #2fd0b0; --t-intervals: #4f8dff; --t-tempo: #ff8a3d; --t-long: #5fcf6f; --t-hard: #6f7dff; --t-steady: #e0a85a; --t-gym: #a98bff;
  --t-race: #f2c443; --t-rest: #7d8aa3; --t-mobility: #8ff0cf; --t-physio: #ff7a6b; --t-other: #a9b4c6; --t-strength: var(--t-gym); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 999px; border: 1px solid var(--line, #243042); background: rgba(255, 255, 255, .03); }
.seg-b { min-height: 44px; border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--ink-2, #A0ABB9); font: inherit; font-weight: 700; cursor: pointer; }
.seg-b[aria-selected="true"] { color: var(--ink, #EDF0F4); background: var(--raised, #182231); border-color: var(--signal, #63AFB5); }
.cal { display: grid; gap: 10px; }
.cal-h { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; text-align: center; font-size: 18px; }
.btn.round { width: 48px; min-width: 48px; height: 48px; padding: 0; border-radius: 999px; font-size: 22px; }
.cal-w, .cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-w span { text-align: center; font-size: 12px; font-weight: 700; color: var(--ink-2, #A0ABB9); }
.cal-d { position: relative; min-height: 48px; border-radius: 12px; border: 1px solid transparent; background: var(--card, #111824); color: var(--ink, #EDF0F4); font: inherit; display: grid; place-items: center; align-content: center; gap: 4px; padding: 4px 0; cursor: pointer; }
.cal-d .n { font-size: 15px; font-weight: 700; line-height: 1; }
.cal-d.out { opacity: .38; }
.cal-d.today { border-color: var(--signal, #63AFB5); box-shadow: 0 0 0 1px var(--signal, #63AFB5) inset; }
.cal-d.sel { background: var(--raised, #182231); border-color: var(--ink, #EDF0F4); }
.cal-d.did::after { content: ''; position: absolute; left: 30%; right: 30%; bottom: 3px; height: 3px; border-radius: 2px; background: var(--ink-2, #A0ABB9); opacity: .9; }
.dot { display: block; width: 8px; height: 8px; border-radius: 2px; background: var(--ink-2, #A0ABB9); } .dot.none { background: transparent; }
.dot.t-rest { background: var(--t-rest); } .dot.t-hard { background: var(--t-hard); } .dot.t-steady { background: var(--t-steady); } .dot.t-easy { background: var(--t-easy); } .dot.t-strength { background: var(--t-strength); } .dot.t-long { background: var(--t-long); } .dot.t-race { background: var(--t-race); } .dot.t-other { background: var(--t-other); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13px; color: var(--ink-2, #A0ABB9); align-items: center; } .cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sec { margin: 8px 0 -2px; font-size: 22px; }
.upc { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: start; }
.upc-b { display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 56px; border-radius: 14px; background: color-mix(in srgb, var(--tc, #6f7c96) 22%, var(--card, #111824)); border: 1px solid color-mix(in srgb, var(--tc, #6f7c96) 55%, transparent); }
.upc-b b { font-size: 22px; line-height: 1; } .upc-b span { font-size: 12px; opacity: .8; }
.upc.t-rest { --tc: var(--t-rest); } .upc.t-hard { --tc: var(--t-hard); } .upc.t-steady { --tc: var(--t-steady); } .upc.t-easy { --tc: var(--t-easy); } .upc.t-strength { --tc: var(--t-strength); } .upc.t-long { --tc: var(--t-long); } .upc.t-other { --tc: var(--t-other); }
.upc-t { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chip { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; color: var(--tc, #A0ABB9); border: 1px solid color-mix(in srgb, var(--tc, #6f7c96) 60%, transparent); }
.upc.t-rest .chip { --tc: var(--t-rest); }
.day-chip { align-self: flex-start; font-size: 13px; font-weight: 700; padding: 4px 11px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--tc, #6f7c96) 60%, transparent); color: var(--tc, #A0ABB9); background: color-mix(in srgb, var(--tc, #6f7c96) 14%, transparent); }
.day-chip.t-rest { --tc: var(--t-rest); } .day-chip.t-hard { --tc: var(--t-hard); } .day-chip.t-easy { --tc: var(--t-easy); } .day-chip.t-race { --tc: var(--t-race); }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: var(--ink-2, #A0ABB9); }
/* Life for Android (download page): the published APK's facts */
.dl-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; } .dl-facts dt { color: var(--ink-2, #A0ABB9); } .dl-facts dd { margin: 0; overflow-wrap: anywhere; }
.download-view code.secret { overflow-wrap: anywhere; word-break: break-all; } .download-view .tag { align-self: flex-start; }

/* ---- structured session blocks (warm-up, main set, recovery) ---- */
.blocks { display: grid; gap: 10px; margin-top: 6px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line, #243042); background: rgba(255, 255, 255, .03); }
.blk { display: grid; gap: 2px; }
.blk b { font-size: 13px; color: var(--tc, #ff8a3d); letter-spacing: .02em; }
.blk span { color: var(--ink, #EDF0F4); font-size: 15px; line-height: 1.35; }

/* ---- today's timeline ---- */
.tl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.tl-r, .tl-now { display: grid; grid-template-columns: 52px 14px 1fr; gap: 10px; align-items: start; position: relative; padding: 8px 0; }
.tl-r::before, .tl-now::before { content: ''; position: absolute; left: 61px; top: 0; bottom: 0; width: 2px; background: var(--line, #243042); }
.tl-r:first-child::before { top: 18px; } .tl-list > :last-child::before { bottom: calc(100% - 18px); }
.tl-t { font-size: 13px; color: var(--ink-2, #A0ABB9); font-variant-numeric: tabular-nums; padding-top: 2px; }
.tl-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--tc, #6f7c96); border: 3px solid var(--card, #111824); box-sizing: border-box; margin-top: 3px; position: relative; z-index: 1; }
.tl-dot.now { background: var(--signal, #63AFB5); box-shadow: 0 0 0 3px color-mix(in srgb, var(--signal, #63AFB5) 30%, transparent); }
.tl-b { display: grid; gap: 2px; } .tl-b b { font-size: 16px; } .tl-b span { font-size: 13px; color: var(--ink-2, #A0ABB9); }
.tl-r.k-school, .tl-r.k-work { --tc: var(--t-steady); } .tl-r.k-free { --tc: var(--t-easy); } .tl-r.k-train, .tl-r.k-training { --tc: var(--t-hard); } .tl-r.k-race { --tc: var(--t-race); } .tl-r.k-habit { --tc: var(--t-other); }
.tl-r.cur .tl-b { padding: 8px 10px; margin: -6px 0; border-radius: 12px; background: color-mix(in srgb, var(--tc) 14%, transparent); border: 1px solid color-mix(in srgb, var(--tc) 40%, transparent); }
.tl-now b { color: var(--signal, #63AFB5); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; } .tl-now { padding: 2px 0; }

/* ---- coach: hero scene, quick questions, docked ask bar ---- */
.coach-hero { position: relative; overflow: hidden; border-radius: 22px; min-height: 176px; border: 1px solid var(--line, #243042); background: linear-gradient(180deg, #14202f 0%, #0d1622 62%, #1a1410 62.5%, #120e0b 100%); display: grid; align-items: end; padding: 0 12px; }
.coach-hero.bare { min-height: 84px; }
.coach-hero .cstage { position: relative; z-index: 2; height: 150px; margin: 0; }
.coach-hero.bare .cstage { display: none; }
.ch-window { position: absolute; left: 14px; top: 14px; width: 64px; height: 50px; border-radius: 6px; border: 2px solid rgba(147, 187, 255, .35); background: linear-gradient(180deg, rgba(59, 140, 255, .16), rgba(47, 224, 176, .06)); }
.ch-window::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 49%, rgba(147, 187, 255, .35) 49% 51%, transparent 51%), linear-gradient(0deg, transparent 49%, rgba(147, 187, 255, .35) 49% 51%, transparent 51%); }
.ch-board { position: absolute; right: 18px; top: 16px; width: 74px; height: 52px; border-radius: 6px; background: rgba(255, 210, 63, .08); border: 2px solid rgba(255, 210, 63, .28); }
.ch-board::before { content: ''; position: absolute; left: 10px; right: 10px; top: 12px; height: 3px; border-radius: 2px; background: rgba(255, 210, 63, .45); box-shadow: 0 10px 0 rgba(255, 210, 63, .3), 0 20px 0 rgba(255, 210, 63, .2); }
.ch-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 10px; background: rgba(0, 0, 0, .25); }
.quick { display: grid; gap: 8px; }
.quick-b { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 10px 16px; border-radius: 16px; border: 1px solid var(--line, #243042); background: var(--card, #111824); color: var(--ink, #EDF0F4); font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.quick-b .chev { font-style: normal; font-size: 22px; color: var(--ink-2, #A0ABB9); }
.coach-box .ask { position: sticky; bottom: 98px; z-index: 5; padding: 8px; border-radius: 20px; background: color-mix(in srgb, var(--raised, #182231) 88%, transparent); backdrop-filter: blur(14px); border: 1px solid var(--line, #243042); align-items: center; }
.coach-box .ask .field { margin: 0; }

/* ---- trends: load comparison and easy/hard bar ---- */
.load-line { margin: 0; line-height: 1.35; }
.cmp { display: grid; gap: 8px; } .cmp-row { display: grid; grid-template-columns: 112px 1fr 64px; gap: 10px; align-items: center; font-size: 13px; color: var(--ink-2, #A0ABB9); } .cmp-row b { color: var(--ink, #EDF0F4); text-align: right; font-variant-numeric: tabular-nums; }
.cmp-track { height: 12px; border-radius: 6px; background: rgba(255, 255, 255, .06); overflow: hidden; } .cmp-track i { display: block; height: 100%; width: var(--w); border-radius: 6px; background: var(--t-steady); }
.cmp-track i.u { background: var(--t-rest); } .cmp-track i.c { background: var(--t-easy); }
.stackbar { display: flex; height: 18px; border-radius: 9px; overflow: hidden; gap: 2px; background: rgba(255, 255, 255, .05); } .stackbar i { display: block; width: var(--w); } 
i.e { background: var(--t-easy); } i.m { background: var(--t-steady); } i.d { background: var(--t-hard); }
.legend2 { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink-2, #A0ABB9); } .legend2 span { display: inline-flex; align-items: center; gap: 6px; } .legend2 i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* Coach: the docked ask bar floats above the tab bar, so the conversation keeps room beneath it and never slides under it */
.coach-box { padding-bottom: 12px; }
.coach-box .chat { padding-bottom: 72px; max-height: none; overflow: visible; }
.coach-box .ask { bottom: calc(var(--navh, 72px) + env(safe-area-inset-bottom) + 14px); }
.coach-box .chat:empty { padding: 0; }

/* ---- School and Work ------------------------------------------------------------------------------------------------------------------- */
.dp { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.dp-b { min-height: 44px; border-radius: 12px; border: 1px solid var(--line, #243042); background: var(--raised, #182231); color: var(--ink-2, #A0ABB9); font: 600 13px var(--font); cursor: pointer; }
.dp-b[aria-pressed="true"] { color: var(--ink); border-color: var(--signal); background: color-mix(in srgb, var(--signal) 18%, var(--raised, #182231)); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .row2 > * { min-width: 0; }
.more > summary { cursor: pointer; font: 600 14px var(--font); color: var(--ink-2, #A0ABB9); min-height: 40px; display: flex; align-items: center; }
.sw-day { display: grid; grid-template-columns: 54px 1fr; gap: 12px; padding: 12px; border-radius: 18px; background: var(--raised, #182231); border: 1px solid var(--line, #243042); }
.sw-day.today { border-color: color-mix(in srgb, var(--signal) 60%, transparent); }
.sw-date { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; } .sw-date b { font: 700 15px var(--font); } .sw-date span { font-size: 12px; color: var(--ink-2, #A0ABB9); }
.sw-body { gap: 6px; min-width: 0; }
.sw-chip { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; padding: 7px 10px; border-radius: 12px; background: color-mix(in srgb, var(--cobalt, #5B8CFF) 16%, transparent); font-size: 14px; overflow-wrap: anywhere; }
.sw-chip.work { background: color-mix(in srgb, var(--amber, #F2B84B) 16%, transparent); } .sw-chip b { font-variant-numeric: tabular-nums; }
.sw-off { padding: 7px 10px; border-radius: 12px; background: color-mix(in srgb, var(--ok, #3DD6A6) 16%, transparent); font-size: 14px; } .sw-allday { font-size: 14px; color: var(--ink-2, #A0ABB9); }
.sw-free { font-size: 13px; color: var(--signal-ink, #7FD6D2); } .sw-free.muted { color: var(--ink-2, #A0ABB9); }
.tick { width: 28px; height: 28px; min-width: 28px; border-radius: 50%; border: 2px solid var(--ink-2, #A0ABB9); background: none; cursor: pointer; position: relative; padding: 0; }
.tick[aria-checked="true"] { background: var(--ok, #3DD6A6); border-color: var(--ok, #3DD6A6); } .tick[aria-checked="true"]::after { content: ''; position: absolute; left: 8px; top: 3px; width: 6px; height: 12px; border: solid var(--void, #0b1220); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.item.done .t b { text-decoration: line-through; opacity: .7; } .late { color: var(--bad, #FF6B6B); }
.stat { display: flex; flex-direction: column; } .stat b { font: 700 28px var(--font); } .stat span { font-size: 13px; color: var(--ink-2, #A0ABB9); }
.bar-row { display: grid; grid-template-columns: minmax(70px, 30%) 1fr auto; gap: 10px; align-items: center; font-size: 14px; } .bar-track { height: 10px; border-radius: 99px; background: var(--raised, #182231); overflow: hidden; }
.bar { height: 100%; width: var(--w, 0); border-radius: 99px; background: var(--signal); }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--cobalt, #5B8CFF); flex: none; } .dot.teal { background: #3DD6C6; } .dot.violet { background: #A78BFA; } .dot.amber { background: #F2B84B; } .dot.rose { background: #FB7185; } .dot.green { background: #4ADE80; }
.tabs.dense { gap: 0; padding-left: 6px; padding-right: 6px; } .tabs.dense .tab { padding-left: 2px; padding-right: 2px; min-width: 0; } .tabs.dense .tab span { font-size: 10px; letter-spacing: -.01em; }
.sheet.wide { max-height: 92dvh; overflow: auto; }
.ics-list { display: flex; flex-direction: column; gap: 10px; max-height: 46dvh; overflow: auto; padding-right: 2px; }
.ics-row { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 16px; background: var(--raised, #182231); border: 1px solid var(--line, #243042); } .ics-row.known { opacity: .75; }
.ics-pick { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; } .ics-pick input { width: 22px; height: 22px; margin-top: 2px; flex: none; } .ics-pick .t { display: flex; flex-direction: column; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.sw-tab > .btn.primary { align-self: stretch; }
.seg.sw-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; } .sw-seg .seg-b { min-width: 0; padding: 0 4px; font-size: 13px; white-space: nowrap; }

/* ---- the companion's speech bubble ---------------------------------------------------------------------------------------------------- */
.cbubble { position: absolute; top: 2px; left: 0; z-index: 4; width: max-content; padding: 8px 12px; border-radius: 16px; background: var(--raised, #182231); border: 1px solid var(--edge-hi, #2c3a50); color: var(--ink); font: 500 14px/1.35 var(--font); box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .7); pointer-events: none; opacity: 0; transform: translateY(4px) scale(.98); transition: opacity .25s ease, transform .25s ease; overflow-wrap: anywhere; }
.cbubble.on { opacity: 1; transform: none; }
.cbubble::before { content: ''; position: absolute; top: 22px; width: 10px; height: 10px; background: inherit; border: inherit; border-width: 0 0 1px 1px; transform: rotate(45deg); }
.cbubble.r::before { left: -6px; } .cbubble.l::before { right: -6px; transform: rotate(-135deg); }
.mascot-preview .cbubble { top: 8px; }
.sw-tab .item { flex-wrap: wrap; } .sw-tab .item .t { flex: 1 1 140px; min-width: 0; } .sw-tab .item .t b { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }

/* ---- pasted timetable preview ---------------------------------------------------------------------------------------------------------- */
.pt-text { width: 100%; min-height: 150px; font: 500 14px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical; border-radius: 14px; padding: 12px; background: var(--raised, #182231); color: var(--ink); border: 1px solid var(--line, #243042); }
.pt-warn { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 12px; background: color-mix(in srgb, var(--amber, #F2B84B) 16%, transparent); font-size: 13px; }
.pt-skip { display: flex; flex-direction: column; gap: 2px; padding: 4px 0; overflow-wrap: anywhere; }
.ics-row input.input { width: 100%; min-height: 44px; border-radius: 12px; padding: 0 12px; background: var(--void, #0b1220); color: var(--ink); border: 1px solid var(--line, #243042); font: 500 15px var(--font); }
.dp.small .dp-b { min-height: 38px; font-size: 12px; }
.usual-hours { margin: 0; font-size: 20px; }
.usual.unchecked { border-color: var(--amber, #F2B84B); }
.hours-sum { margin: 0; font-size: 15px; }
.sw-chip.train, .sw-chip.training, .sw-chip.event, .sw-chip.due, .sw-chip.rest, .sw-chip.activity { background: color-mix(in srgb, var(--signal) 14%, transparent); }
.sw-chip.event { background: color-mix(in srgb, var(--rose, #F27D9B) 18%, transparent); } .sw-chip.due { background: color-mix(in srgb, var(--amber, #F2B84B) 22%, transparent); }
.sw-chip.rest { background: color-mix(in srgb, var(--ink-2, #A0ABB9) 14%, transparent); } .sw-chip.unconfirmed { outline: 1px dashed var(--ink-2, #A0ABB9); outline-offset: -1px; } .sw-chip.skipped b { text-decoration: line-through; }
.sw-chip .sub { color: var(--ink-2, #A0ABB9); font-size: 13px; } .wk-sum { font-size: 14px; margin: 0; } .wk-links { display: flex; gap: 8px; flex-wrap: wrap; }
.sw-chip.linkrow { width: 100%; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; min-height: 40px; } .sw-chip.linkrow:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }

.time-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 16px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 16px; }
.time-row input { font: inherit; color: inherit; background: transparent; border: 0; text-align: right; min-height: 32px; }

/* Tab travel (companion/travel.js): the runner's lane is a fixed copy of the destination stage, above the page and below the tab bar; it never takes a tap */
.cstage.ctravel { z-index: 18; pointer-events: none; }
.cstage.ctravel .companion { pointer-events: none; }
.cstage.page { height: 76px; margin: -2px 0 0; }
.cstage.page .companion { bottom: 2px; }
::view-transition-group(ctravel), ::view-transition-old(ctravel), ::view-transition-new(ctravel) { animation: none; }

/* Profile: my running journey and meditation */
.pj-hero { display: flex; align-items: baseline; gap: 8px; }
.pj-km { font-size: clamp(2.4rem, 13vw, 3.4rem); font-weight: 800; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.pj-unit { font-size: 1.1rem; font-weight: 700; color: var(--muted); }
.pj-prov { margin: 0; }
.pj-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3) var(--s4); }
.pj-stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pj-stat b { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.pj-stat span { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.pj-stat small { font-size: .72rem; color: var(--muted); }
.pj-years { display: grid; gap: 6px; }
.pj-year { display: grid; grid-template-columns: 3.2rem 1fr 4.6rem; align-items: center; gap: 8px; font-size: .85rem; }
.pj-bar { height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--edge) 70%, transparent); overflow: hidden; }
.pj-bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent, #6ea8ff); }
.pj-yk { text-align: right; font-variant-numeric: tabular-nums; }
.md-top { display: flex; gap: var(--s5); }
.md-dots { display: flex; gap: 5px; flex-wrap: wrap; }
.md-dots i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--edge); }
.md-dots i.on { background: var(--accent, #6ea8ff); border-color: transparent; }
.md-dots i.skip { opacity: .3; }
.md-dots i.today { outline: 2px solid color-mix(in srgb, var(--ink) 55%, transparent); outline-offset: 1px; }
.pf-who .avatar.big { width: 72px; height: 72px; font-size: 1.8rem; }

/* Bring my Rob data: the import report (a stacked list, so it reads at 320px with no sideways scroll) */
.ir-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.ir-item { display: grid; gap: 4px; padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.ir-label { font-weight: 600; }
.ir-stats { display: flex; flex-wrap: wrap; gap: 4px var(--s4); font-size: .85rem; color: var(--muted, inherit); }
.ir-stat b { color: var(--text); font-variant-numeric: tabular-nums; }
.ir-item.bad .ir-label, .ir-item.bad .ir-stat b { color: var(--bad); }
.ok { color: var(--ok); }

/* profile picture */
.avatar { overflow: hidden; }
.avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.pf-photo-actions { gap: var(--s3); flex-wrap: wrap; margin-top: var(--s3); }

/* Garmin connection */
.gk-key { display: block; overflow-wrap: anywhere; user-select: all; padding: var(--s3); border-radius: 10px; background: color-mix(in srgb, var(--surface-2) 90%, transparent); font-size: .8rem; }
.gk-row { justify-content: space-between; gap: var(--s3); align-items: center; }
.rob-profile .pf-who .row { display: flex; align-items: center; gap: 14px; }
.rob-profile .pf-who .stack { gap: 2px; }
/* Blue's walking step is drawn by the vector rig (companion/rig); the painted pictures step aside while it is up */
.rig-walker { position: absolute; z-index: 2; opacity: 0; transition: opacity .18s linear; pointer-events: none; transform-origin: 50% 100%; }
.companion.rig-on .rig-walker { opacity: 1; }
.companion.rig-on .scene-img { opacity: 0 !important; }
.rig-player { position: absolute; z-index: 2; pointer-events: none; }

/* Account pages (15 Oct): the same quiet navy depth as Rob's Profile behind Settings, Admin, Profile and the importer - deep blue at
   the top, a faint teal glow lower down - instead of flat black; no motion, text contrast unchanged. */
body[data-surface="account"] { background-color: #070b14;
  background-image: radial-gradient(130% 55% at 50% -8%, rgba(46, 92, 160, .30), transparent 62%),
    radial-gradient(90% 38% at 100% 46%, rgba(38, 150, 160, .09), transparent 70%),
    radial-gradient(90% 40% at 0% 88%, rgba(60, 80, 170, .09), transparent 70%),
    linear-gradient(180deg, #0c1424 0%, #090e1a 48%, #070a12 100%); background-attachment: scroll; }
body[data-surface="account"] .card { background: linear-gradient(180deg, rgba(25, 36, 60, .78), rgba(14, 21, 36, .78));
  border-color: rgba(132, 168, 214, .15); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 10px 30px rgba(0, 0, 0, .25); }
/* Settings -> Connections (15 Oct) */
.conn { padding-top: 10px; border-top: 1px solid rgba(132, 168, 214, .14); }
.conn:first-of-type { border-top: 0; }
.conn .row.wrap { flex-wrap: wrap; gap: 8px; }
.conn-cal { gap: 10px; min-height: 40px; }
.conn-cal select { min-height: 36px; max-width: 46%; }
.conn .strava-link { color: #fc5200; white-space: nowrap; }
/* Admin → Beta controls: the optional pause reason, quiet and full width under the feature's line */
#beta-controls .t input { width: 100%; margin-top: 8px; min-height: 40px; padding: 8px 12px; background: var(--card); color: var(--text); border: 1px solid var(--edge-hi); border-radius: 12px; font: 500 .9rem/1.3 var(--font); }
#beta-controls .t input:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--signal) 24%, transparent); }
#beta-controls h4 { margin: 8px 0 0; }

/* Route on a satellite map (train-ui.js routeMap): tiles positioned by script (CSSOM), the route drawn over them */
.rmap-tiles { position: relative; width: 100%; aspect-ratio: 300 / 180; overflow: hidden; border-radius: 14px; background: #1b1f1c; border: 1px solid var(--edge); }
.rmap-tile { position: absolute; display: block; max-width: none; user-select: none; pointer-events: none; }
.rmap-line { position: absolute; inset: 0; width: 100%; height: 100%; }
.rmap-line polyline { fill: none; stroke: #ffd166; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 2px rgba(0, 0, 0, .7)); }
.rmap-attr { position: absolute; right: 6px; bottom: 4px; font-size: 10px; color: #fff; background: rgba(0, 0, 0, .55); padding: 1px 6px; border-radius: 6px; }

/* Blue's hero icon (companion/bluehero.js): his drawn rig inside the icon box; the rig positions itself from the box's bottom */
.mascot.blue-icon { position: relative; overflow: visible; }
.mascot.blue-icon .rig-host { position: absolute; pointer-events: none; }
.blue-hello { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.blue-hello-stage { position: relative; width: 150px; height: 120px; }
.blue-hello-say { margin: 0; max-width: 300px; padding: 10px 14px; border-radius: 16px; background: var(--card, #141b26); border: 1px solid var(--edge, rgba(255,255,255,.12)); text-align: center; animation: blue-say-in .32s ease-out both .9s; }
@keyframes blue-say-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .blue-hello-say { animation: none; } }

/* Profile -> Connections */
.conn-src .conn-kinds { color: var(--muted); }
.conn-dev { border-top: 1px solid var(--line, rgba(255,255,255,.08)); padding-top: 10px; }
.conn-pair input[type=text], .conn-pair select, .conn-pref select { min-height: 40px; border-radius: 10px; background: var(--surface-2, #0f1520); color: inherit; border: 1px solid var(--line, rgba(255,255,255,.12)); padding: 0 10px; }
.conn-kinds-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 6px 12px; }
.conn-code { font: 800 28px/1.1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; text-align: center; margin: 4px 0; }
.conn-pref { gap: 12px; } .conn-pref select { max-width: 55%; }
.conn-match { border-top: 1px solid var(--line, rgba(255,255,255,.08)); padding-top: 10px; }
.small.warn { color: var(--warn, #f0b35a); }

/* Continue with Google (views-auth.js) and Settings -> Sign-in methods */
.gsi { margin-top: 14px; }
.gsi-btn { display: flex; align-items: center; justify-content: center; gap: 10px; background: #fff; color: #1f1f1f; border: 1px solid #dadce0; font-weight: 600; }
.gsi-btn:hover { background: #f7f8f8; }
.or-line { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.or-line::before, .or-line::after { content: ''; flex: 1; height: 1px; background: var(--line, rgba(255,255,255,.12)); }

/* Onboarding entrance (views-onboarding.js stagger): first visit of a screen only, never under reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .ob-enter .ob-in { animation: ob-rise .28s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 45ms); }
  .choice { transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease, transform .15s ease; }
}
@keyframes ob-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
/* Your colours */
.cat-chip { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.cat-chip .cat-name { color: var(--text); }
.look-row select { min-height: 38px; border-radius: 10px; background: var(--surface-2, #0f1520); color: inherit; border: 1px solid var(--line, rgba(255,255,255,.12)); padding: 0 8px; }
.swatch { display: inline-block; width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255,255,255,.7); }
.swatch[data-swatch="gold"] { background: #e7b84b; } .swatch[data-swatch="teal"] { background: #2fc4b2; } .swatch[data-swatch="violet"] { background: #a98bff; } .swatch[data-swatch="coral"] { background: #ff8a7a; }
:root[data-accent="teal"] { --accent: #2fc4b2; --gold-500: #2fc4b2; }
:root[data-accent="violet"] { --accent: #a98bff; --gold-500: #a98bff; }
:root[data-accent="coral"] { --accent: #ff8a7a; --gold-500: #ff8a7a; }
/* Today's check-in (views-app.js checkinCard): collapsed once answered, chips wrap at phone width */
.checkin summary { font-weight: 700; cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.checkin .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

/* Profile -> Connections -> Activity sources: each choice's radio sits beside its title */
.conn-mode { align-items: flex-start; gap: 12px; } .conn-mode input[type=radio] { margin-top: 3px; flex: 0 0 auto; } .conn-mode .stack { gap: 2px; }

/* =====================================================================================================================================
   Soft premium layer (16 Oct 2026, owner's brief: softer background and surfaces, eye-friendly spacing, restrained colour, subtle motion).
   One set of tokens over the rules above; Rob's page gets the same palette through web/rob-loader/polish.css. Nothing here moves the
   mascot, maps, charts or the tab bar.
   ===================================================================================================================================== */
:root {
  --void: #0b1220; --bg-2: #13223b; --card: #141f31; --raised: #19283d; --well: #101a29;
  --line: rgba(180, 203, 240, .13); --edge: rgba(180, 203, 240, .10); --edge-hi: rgba(183, 207, 239, .20); --hair: rgba(180, 203, 240, .08);
  --ink: #f0f5fb; --ink-2: #b7c6da; --muted: #b0bfd4; --faint: #8796ad;
  --life-ok: #a7ddab; --life-warn: #f1c885; --life-bad: #f0a7ae; --life-insight: #c4a4ee; --life-ring: #bde5fd;
  --r: 20px; --r-sm: 12px; --r-lg: 24px;
  --life-shadow: 0 10px 30px rgba(0, 0, 0, .14), inset 0 1px 0 rgba(238, 247, 255, .04);
  --life-ease: cubic-bezier(.22, 1, .36, 1); --life-fast: 130ms; --life-normal: 210ms; --life-slow: 260ms;
  --glow-a: #1c3556; --glow-b: #1d2c4a;
}
/* the ground: calm navy, lit softly from the top; the light no longer drifts (no animated blurred shapes) */
.bg { background: radial-gradient(ellipse 85% 50% at 15% -10%, rgba(53, 97, 157, .20), transparent 70%), linear-gradient(180deg, #0e1a2e 0%, #0b1220 62%, #0d1522 100%); }
.bg-glow { animation: none !important; opacity: .18; }
/* surfaces: one card language, soft depth, a faint top highlight; never neon */
.card, body[data-surface="account"] .card { background: linear-gradient(165deg, rgba(27, 40, 60, .92), rgba(19, 30, 46, .94)); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--life-shadow); padding: 20px 18px; }
.card .card { background: rgba(255, 255, 255, .025); box-shadow: none; padding: 16px; }
.view { gap: 24px; }
.card > h3, .card > .row > h3, .card > h2 { letter-spacing: -.01em; }
.muted, .muted.small { color: var(--muted); }
p.small, .small { line-height: 1.5; }
/* controls: 44 px targets, one radius, clear focus, quiet press */
.btn { min-height: 46px; border-radius: 14px; }
.btn.small { min-height: 44px; border-radius: 12px; padding: 0 16px; }
.btn.ghost { color: var(--ink-2); }
.btn.danger.ghost, .btn.ghost.danger { color: var(--life-bad); }
.btn:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--life-ring); outline-offset: 3px; }
.card select, .conn select, .conn-cal select { appearance: none; -webkit-appearance: none; min-height: 44px; padding: 0 34px 0 12px; border-radius: 12px;
  background: var(--raised) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23b7c6da' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--ink); border: 1px solid var(--edge-hi); font: 500 15px/1.2 var(--font); color-scheme: dark; }
input[type=checkbox]:not(.switch), input[type=radio] { width: 22px; height: 22px; accent-color: #78b7dc; flex: 0 0 auto; }
label.row:has(> input[type=checkbox]), label.row:has(> input[type=radio]) { min-height: 44px; }
/* consent and option labels: the box stays on the first line and the text wraps beside it at any width */
label.row.check { align-items: flex-start; } label.row.check > input { margin-top: 1px; } label.row.check > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
/* status pills: a word always, colour only as support */
.tag { padding: 4px 10px; font-size: .74rem; border: 1px solid transparent; }
.tag.live { background: rgba(167, 221, 171, .13); color: var(--life-ok); border-color: rgba(167, 221, 171, .22); }
.tag.next { background: rgba(120, 183, 220, .12); color: #a9d3ec; border-color: rgba(120, 183, 220, .22); }
.tag.later { background: rgba(241, 200, 133, .10); color: var(--life-warn); border-color: rgba(241, 200, 133, .2); }
/* Connections: each provider its own soft panel; actions grouped; the destructive one quiet until meant */
.conn { background: var(--well); border: 1px solid var(--edge); border-radius: 16px; padding: 16px; margin-top: 4px; border-top: 1px solid var(--edge); }
.conn:first-of-type { border-top: 1px solid var(--edge); }
.conn > .row.between > b { font-size: 1.02rem; }
.conn .row.wrap { gap: 10px; }
.conn-cal { min-height: 52px; padding: 4px 10px; margin: 0 -10px; border-radius: 12px; transition: background-color var(--life-normal) var(--life-ease); }
.conn-cal.on { background: rgba(120, 183, 220, .08); }
.conn-cal select { max-width: 48%; min-width: 128px; }
.conn-cal-hint { color: var(--life-warn); background: rgba(241, 200, 133, .08); border: 1px solid rgba(241, 200, 133, .18); border-radius: 12px; padding: 10px 12px; }
.conn-cal-status { color: var(--life-warn); min-height: 1.2em; }
.conn-modes { gap: 8px; }
.conn-mode { padding: 12px 14px; border: 1px solid var(--edge); border-radius: 14px; background: var(--well); transition: border-color var(--life-normal) var(--life-ease), background-color var(--life-normal) var(--life-ease); }
.conn-mode:has(input:checked) { border-color: rgba(120, 183, 220, .45); background: rgba(120, 183, 220, .08); }
.conn-srcstat { padding: 12px 14px; border-radius: 14px; background: var(--well); border: 1px solid var(--edge); gap: 4px; }
.conn-counts { padding: 14px; border-radius: 14px; background: rgba(167, 221, 171, .05); border: 1px solid rgba(167, 221, 171, .14); }
details.conn-more > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--signal-ink); font-size: .9rem; list-style: none; }
details.conn-more > summary::-webkit-details-marker { display: none; }
details.conn-more > summary::after { content: '›'; margin-left: 6px; transition: transform var(--life-normal) var(--life-ease); }
details.conn-more[open] > summary::after { transform: rotate(90deg); }
/* switch rows, fields and sheets in the same material */
.switch-row { background: var(--well); border: 1px solid var(--edge); border-radius: 16px; }
.switch:checked { background: #5aa7cf; }
.sheet { background: linear-gradient(180deg, #17243a, #111b2c); border-color: var(--edge-hi); }
.toast { background: #1a283e; border-color: var(--edge-hi); }

/* ---- purposeful motion: the first few cards settle in once when a page opens; presses and state changes ease; nothing loops ---- */
@media (prefers-reduced-motion: no-preference) {
  .view.enter > .card, .view.enter > section > .card { animation: life-rise var(--life-slow) var(--life-ease) both; }
  .view.enter > :nth-child(2) { animation-delay: 30ms; } .view.enter > :nth-child(3) { animation-delay: 60ms; } .view.enter > :nth-child(4) { animation-delay: 90ms; }
  .view.enter > :nth-child(n+5) { animation-delay: 110ms; }
  .btn { transition: background-color var(--life-fast) var(--life-ease), border-color var(--life-fast) var(--life-ease), transform 110ms var(--life-ease); }
  .btn:active:not([disabled]) { transform: scale(.985); }
  .tag { transition: background-color var(--life-normal) var(--life-ease), color var(--life-normal) var(--life-ease); }
  details[open] > :not(summary) { animation: life-fade var(--life-normal) var(--life-ease) both; }
  .sheet { animation: life-sheet var(--life-slow) var(--life-ease) both; }
}
@keyframes life-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes life-fade { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
@keyframes life-sheet { from { opacity: .6; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .view.enter > *, .sheet, details[open] > :not(summary) { animation: none !important; }
  .btn:active, .conn-cal, .conn-mode { transition: none !important; transform: none !important; }
}
/* a wider reading column on large screens (the phone layout is unchanged) */
@media (min-width: 1024px) { main { max-width: 34rem; } .sheet { max-width: 34rem; } }

/* ---- the Life Brain (16 Oct 2026): what Life noticed, "Tell Life", to-do, What Life knows, session analysis ---- */
.brain-card .ins { display: flex; flex-direction: column; gap: 6px; padding: 12px 0 12px 12px; border-top: 1px solid var(--line); border-left: 3px solid var(--ins-c, var(--signal-ink)); }
.brain-card .ins:first-of-type { border-top: 0; }
.ins-fitness { --ins-c: #6fb6ff; } .ins-school { --ins-c: #a99bff; } .ins-work { --ins-c: #f2b96b; } .ins-personal { --ins-c: #7fd8b6; } .ins-system { --ins-c: #ff9b8a; }
.ins-tag { background: color-mix(in srgb, var(--ins-c) 16%, transparent); color: var(--ins-c); border: 1px solid color-mix(in srgb, var(--ins-c) 34%, transparent); }
.ins-title { font-size: 15.5px; line-height: 1.3; } .ins p { margin: 0; line-height: 1.5; }
.ins-act { gap: 8px; } .ins-act .btn { min-height: 40px; } .ins-sum { font-size: 12.5px; }
.ins-ev { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13.5px; } .ins-ev b { font-weight: 650; }
.ins-why { padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .03); }
.ins-out { opacity: 0; transform: translateY(-4px); transition: opacity 200ms ease, transform 200ms ease; }
.say .row input { flex: 1; min-width: 0; min-height: 44px; } .say-out p { margin: 0; }
.tasks-card .task { padding: 8px 0; border-top: 1px solid var(--line); gap: 10px; } .tasks-card .task:first-child { border-top: 0; }
.tasks-card .task.late span > span { color: var(--amber); } .tasks-card .check { gap: 10px; align-items: center; min-height: 44px; }
.task-add input[type=text] { flex: 1 1 160px; min-width: 0; min-height: 44px; } .task-add input[type=date] { flex: 0 1 150px; min-height: 44px; }
.knows-row { padding: 8px 0; border-top: 1px solid var(--line); } .knows-row:first-of-type { border-top: 0; } .knows-row p { margin: 2px 0; }
.fresh-fresh { color: #7fd8b6; } .fresh-stale { color: var(--amber); } .fresh-missing { color: var(--ink-2); }
.analysis .reps { display: flex; flex-wrap: wrap; gap: 6px; } .analysis .rep { display: flex; flex-direction: column; padding: 6px 9px; border-radius: 10px; background: rgba(111, 182, 255, .1); border: 1px solid rgba(111, 182, 255, .22); font-size: 13px; }
.analysis .zones { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px; }
.analysis .z { flex-basis: 0; min-width: 2px; } .z1 { background: #6f8db0; } .z2 { background: #6fb6ff; } .z3 { background: #7fd8b6; } .z4 { background: #f2b96b; } .z5 { background: #ff8b7a; }
.analysis .tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; } .analysis .tbl th, .analysis .tbl td { text-align: left; padding: 6px 4px; border-top: 1px solid var(--line); } .analysis .tbl th { color: var(--ink-2); font-weight: 600; }
.tag.good { color: #7fd8b6; }
@media (prefers-reduced-motion: reduce) { .ins-out { transition: none; } }

/* ---- one switch for all of Life (16 Oct 2026). Root cause of the "disconnected circles": the soft layer's 22 px checkbox rule also hit
   switches (they are checkboxes), shrinking the 52 px track to a circle with its 24 px thumb outside it. Switches are now excluded from that
   rule and defined once here: a 52 x 32 track, a 24 px thumb centred in it, a clear on/off difference, a 44 px tap area, focus ring. ---- */
.switch { appearance: none; -webkit-appearance: none; position: relative; box-sizing: border-box; flex: 0 0 auto; width: 52px; height: 32px; margin: 6px 0;
  padding: 0; border-radius: 999px; border: 1px solid rgba(180, 203, 240, .22); background: rgba(150, 170, 200, .22); cursor: pointer; vertical-align: middle;
  transition: background-color 180ms ease, border-color 180ms ease; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 26px; height: 26px; border-radius: 50%; background: #e9eef6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .35); transition: transform 180ms cubic-bezier(.22, 1, .36, 1); }
.switch:checked { background: #4f9fcb; border-color: #6fb3da; } .switch:checked::after { transform: translateX(20px); background: #fff; }
.switch:focus-visible { outline: 2px solid #9fd0f0; outline-offset: 3px; }
.switch:disabled { opacity: .5; cursor: not-allowed; }
.switch-row { min-height: 56px; align-items: center; } .switch-row .t { min-width: 0; }
@media (prefers-reduced-motion: reduce) { .switch, .switch::after { transition: none; } }

/* ---- Admin -> People: one stacked card per account; actions never share a line with the text (16 Oct 2026) ---- */
.people { display: grid; gap: 10px; }
.person { display: grid; gap: 8px; padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); min-width: 0; }
.person-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.person-id { flex: 1 1 100%; min-width: 0; overflow-wrap: anywhere; font-size: 15px; line-height: 1.35; }
.person-mods { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-s { display: inline-flex; align-items: center; min-height: 26px; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; color: var(--ink-2); background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.chip-s.on { color: #9fd7f5; border-color: rgba(120, 183, 220, .35); background: rgba(120, 183, 220, .1); }
.person-use { margin: 0; }
.person-acts { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.person-acts .btn { flex: 1 1 140px; min-height: 44px; }

/* ---- Google Calendar settings: every calendar row the same grid (16 Oct 2026) ---- */
.conn-cal { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 12px; row-gap: 8px; align-items: center; padding: 12px; margin: 0;
  border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); min-height: 0; }
.conn-cal + .conn-cal { margin-top: 8px; }
.conn-cal.on { background: rgba(120, 183, 220, .08); border-color: rgba(120, 183, 220, .3); }
.conn-cal > input[type=checkbox] { margin: 0; align-self: center; }
.conn-cal-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; cursor: pointer; }
.conn-cal-name span { overflow-wrap: anywhere; line-height: 1.35; font-weight: 600; }
.conn-cal-name small { font-size: 12.5px; }
.conn-cal-dest { grid-column: 2; display: flex; align-items: center; gap: 10px; min-width: 0; }
.conn-cal-dest > span { flex: none; }
.conn-cal .conn-cal-dest select { flex: 1 1 auto; width: 100%; max-width: 220px; min-width: 0; }
@media (min-width: 520px) {
  .conn-cal { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .conn-cal-dest { grid-column: 3; } .conn-cal .conn-cal-dest select { width: 170px; }
}
.conn-cal:not(.on) .conn-cal-dest { opacity: .62; }
.conn-cal-status:not(:empty) { padding: 8px 12px; border-radius: 12px; background: rgba(241, 200, 133, .08); border: 1px solid rgba(241, 200, 133, .2); }

/* Welcome tour: one card at a time inside the sheet; dots show where you are; Skip is always there and never covers anything */
.sheet.tour { gap: 14px; }
.tour .tour-title { margin: 0; font-size: 22px; }
.tour .tour-body { min-height: 150px; }
.tour-dots { display: flex; gap: 6px; justify-content: center; }
.tour-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line, #2c3a50); transition: background .2s ease, transform .2s ease; }
.tour-dots i.on { background: var(--accent, #78b7dc); transform: scale(1.25); }
.tour-nav .btn { min-height: 44px; }
.tour-skip { align-self: center; min-height: 44px; }
@media (prefers-reduced-motion: reduce) { .tour-dots i { transition: none; } }

/* one rule per session kind for every place a kind is shown: the month dot, the date block, the chip, the session card's edge */
.dot.t-intervals { background: var(--t-intervals); } .dot.t-tempo { background: var(--t-tempo); } .dot.t-gym { background: var(--t-gym); } .dot.t-mobility { background: var(--t-mobility); } .dot.t-physio { background: var(--t-physio); }
.upc.t-intervals, .sess.t-intervals { --tc: var(--t-intervals); } .upc.t-tempo, .sess.t-tempo { --tc: var(--t-tempo); } .upc.t-gym, .sess.t-gym { --tc: var(--t-gym); }
.upc.t-mobility, .sess.t-mobility { --tc: var(--t-mobility); } .upc.t-physio, .sess.t-physio { --tc: var(--t-physio); } .upc.t-race, .sess.t-race { --tc: var(--t-race); }
.sess.t-easy { --tc: var(--t-easy); } .sess.t-long { --tc: var(--t-long); } .sess.t-hard { --tc: var(--t-hard); } .sess.t-steady { --tc: var(--t-steady); } .sess.t-other { --tc: var(--t-other); }
.sess[class*=" t-"] { border-left: 4px solid var(--tc, transparent); }
.sess .orig { font-size: 13px; color: var(--ink-2, #a0abb9); } .sess .orig b { color: var(--ink, #e8edf5); font-weight: 600; }
.row.wrap { flex-wrap: wrap; }
/* Programmes: the name and dates take the full width on a phone; status and actions sit underneath instead of squeezing the name */
.prog-item { flex-wrap: wrap; gap: 8px; } .prog-item > .t { flex: 1 1 100%; min-width: 0; }
/* Plan month: one mark per kind planned that day (up to three), side by side under the date */
.cal-d .dots { display: flex; gap: 3px; justify-content: center; min-height: 8px; }

/* Google Calendar overlay (gcaloverlay.js): a gold diamond marks a Google event; the view's own entries keep their colours */
.gov-mark { display: inline-block; width: 8px; height: 8px; background: var(--t-race, #f2c443); transform: rotate(45deg); border-radius: 1px; flex: none; }
.gov-own { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent, #78b7dc); flex: none; }
.gov-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink-2, #a0abb9); } .gov-legend span { display: inline-flex; align-items: center; gap: 6px; }
.gov-row { display: grid; grid-template-columns: auto auto 1fr; gap: 4px 10px; align-items: center; padding: 6px 0; } .gov-row small { grid-column: 3; }
.gov-row span { overflow-wrap: anywhere; }
.sw-chip.gov { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border: 1px dashed color-mix(in srgb, var(--t-race, #f2c443) 45%, transparent); background: color-mix(in srgb, var(--t-race, #f2c443) 7%, var(--card, #111824)); }
.sw-allday.gov { border: 1px dashed color-mix(in srgb, var(--t-race, #f2c443) 45%, transparent); }
.cal-d .cal-gov { position: absolute; top: 5px; right: 6px; width: 6px; height: 6px; }
/* Admin invites: the new code large and easy to copy; each invite's status in words with its date */
.invite-code { display: block; font-size: 15px; letter-spacing: .01em; padding: 12px; border-radius: 12px; background: var(--well, #0f1724); overflow-wrap: anywhere; user-select: all; }
.invite-row { flex-wrap: wrap; } .invite-row > .t { flex: 1 1 60%; min-width: 0; }
/* ---- Today's dashboard: the person's widgets on the left, their companion's own column on the right (homedash.js) ----------------------------- */
.hero .he-open { flex: none; align-self: flex-start; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; border: 1px solid var(--edge-hi); background: color-mix(in srgb, var(--raised) 70%, transparent); color: var(--ink-2); cursor: pointer; }
.he-open svg { width: 22px; height: 22px; } .he-open:active { transform: scale(.96); }
.home-dash { display: flex; flex-direction: column; gap: 12px; margin-top: -8px; }
.home-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: stretch; }
.home-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.home-side { position: relative; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; min-width: 0; min-height: calc(var(--csize, 84px) + 200px); overflow: visible; }      /* no card: the figure stands on the page, its visible middle at the column's middle (director.js settleSide) */
/* the floor under the figure: a faint pool of light at its own feet (follows the measured --art-feet), never a box */
.cstage.side::after { content: ''; position: absolute; left: -12px; right: -12px; bottom: calc(var(--art-feet, 0px) - 11px); height: 22px; pointer-events: none; z-index: -1; background: radial-gradient(50% 50% at 50% 50%, rgba(99, 175, 181, .13), transparent 72%); }
.home-dash.solo .home-top, .home-dash:not(:has(.home-col)) .home-top { grid-template-columns: minmax(0, 1fr); }
.home-dash:not(:has(.home-col)) .home-side { align-items: flex-end; min-height: 0; }
.cstage.side { isolation: isolate; --csize: 84px; width: calc(var(--csize) + 48px); height: calc(var(--csize) + 26px); margin: 0; flex: none; }
.cbubble.above { top: auto; bottom: calc(var(--art-head, 100%) + 10px); max-width: none; font-size: 13px; line-height: 1.35; padding: 8px 10px; text-align: center; }
.cbubble.above::before { top: auto; bottom: -6px; left: calc(var(--tail, 50%) - 5px); right: auto; transform: rotate(-45deg); }
/* a soft contact shadow under painted companions and pictures (the drawn ones carry their own in their artwork) */
.cstage.side .companion.scene::before { content: ''; position: absolute; left: 14%; right: 14%; bottom: calc(var(--art-feet, 0px) - 4px); height: 10px; border-radius: 50%; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0)); }
/* a widget */
.hw { --acc: #7cb6ff; display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 12px 12px 6px; border-radius: 20px; border: 1px solid color-mix(in srgb, var(--acc) 26%, var(--edge));
  background: linear-gradient(165deg, color-mix(in srgb, var(--acc) 13%, var(--card)), var(--card) 68%); animation: enter .35s var(--ease-out) both; }
.hw-head { display: flex; align-items: center; gap: 8px; min-width: 0; color: color-mix(in srgb, var(--acc) 80%, var(--ink)); }
.hw-head svg { width: 18px; height: 18px; flex: none; } .hw-head h3 { font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hw-list { display: flex; flex-direction: column; }
.hw-row { display: flex; align-items: center; gap: 4px; min-height: 44px; min-width: 0; border-top: 1px solid var(--hair); }
.hw-row:first-child { border-top: 0; }
.hw-t { display: flex; flex-direction: column; min-width: 0; flex: 1; padding: 4px 0; }
.hw-title { font-size: 14px; line-height: 1.3; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hw.big .hw-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hw-t small { font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hw-row.late small, .hw-row.warn small { color: var(--amber); } .hw-row.ok small { color: color-mix(in srgb, var(--teal) 70%, var(--ink)); }
.hw-row.warn .hw-title::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--amber); vertical-align: 1px; }
.hw-row.quote .hw-title { font-style: italic; color: var(--ink-2); white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hw-time { flex: none; min-width: 42px; font: 650 13px var(--font); font-stretch: var(--fig-stretch); font-variant-numeric: tabular-nums; color: color-mix(in srgb, var(--acc) 75%, var(--ink)); }
.hw-tick { flex: none; width: 40px; height: 44px; margin-left: -10px; display: grid; place-items: center; border: 0; background: none; cursor: pointer; }
.hw-ring { width: 18px; height: 18px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--acc) 70%, var(--ink-2)); transition: background-color var(--m-ack), transform var(--m-ack); }
.hw-tick:active .hw-ring { transform: scale(.88); } .hw-row.done .hw-ring, .hw-tick[aria-pressed="true"] .hw-ring { background: var(--acc); box-shadow: inset 0 0 0 3px var(--card); }
.hw-row.done .hw-title { color: var(--ink-2); }
.hw-empty { font-size: 13px; color: var(--faint); padding: 2px 0 8px; }
.hw-all, .hw-write { align-self: flex-start; min-height: 36px; padding: 0 2px; border: 0; background: none; color: color-mix(in srgb, var(--acc) 72%, var(--ink)); font: 600 13px var(--font); cursor: pointer; }
.hw-write { min-height: 44px; }
.home-more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.home-more > .hw.big, .home-more > .hw:last-child:nth-child(odd) { grid-column: 1 / -1; }
.home-dash.bare .home-more { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* small phones: the companion's row first (still on the right, what it says to its left), then the widgets full width */
@media (max-width: 369px) {
  .home-top { grid-template-columns: minmax(0, 1fr); } .home-side { order: -1; min-height: 0; padding-top: 4px; }
  .home-more { grid-template-columns: minmax(0, 1fr); } .home-more > .hw { grid-column: auto; }
}
@media (min-width: 720px) { .cstage.side { --csize: 104px; } }
/* Edit home */
.he-sheet { max-height: 86dvh; overflow-y: auto; }
.he-list { display: flex; flex-direction: column; gap: 8px; }
.he-row { --acc: #7cb6ff; border-radius: 16px; border: 1px solid var(--edge); background: var(--card); padding: 8px 8px 8px 12px; }
.he-row.on { border-color: color-mix(in srgb, var(--acc) 40%, var(--edge)); background: linear-gradient(165deg, color-mix(in srgb, var(--acc) 10%, var(--card)), var(--card) 70%); }
.he-main { display: flex; align-items: center; gap: 8px; } .he-name { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; cursor: pointer; }
.he-name .stack { gap: 0; min-width: 0; } .he-name b { font-size: 15px; } .he-name small { font-size: 12.5px; line-height: 1.3; }
.he-moves { display: flex; gap: 2px; flex: none; }
.he-move { width: 40px; height: 44px; border-radius: 12px; border: 1px solid var(--edge); background: var(--raised); color: var(--ink); font: 600 16px var(--font); cursor: pointer; }
.he-move:disabled { opacity: .35; cursor: default; }
.he-style { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.he-seg { display: flex; gap: 4px; padding: 3px; border-radius: 14px; background: var(--void); border: 1px solid var(--edge); }
.he-seg button { min-height: 38px; padding: 0 12px; border-radius: 11px; border: 0; background: none; color: var(--ink-2); font: 600 13px var(--font); cursor: pointer; }
.he-seg button[aria-pressed="true"] { background: var(--raised); color: var(--ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 60%, transparent); }
.he-swatches { display: flex; gap: 4px; }
.he-sw { width: 36px; height: 40px; border: 0; background: none; display: grid; place-items: center; cursor: pointer; padding: 0; }
.he-sw::before { content: ''; width: 22px; height: 22px; border-radius: 50%; background: var(--sw); box-shadow: 0 0 0 2px var(--card); }
.he-sw[aria-checked="true"]::before { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--sw); }
@media (prefers-reduced-motion: reduce) { .hw { animation: none; } }
.tiles > .tile:only-child { grid-column: 1 / -1; min-height: 0; }
/* profile picture: the crop sheet (a circle you drag and zoom) */
.crop-frame { position: relative; width: 240px; height: 240px; margin: 4px auto; border-radius: 50%; overflow: hidden; touch-action: none; cursor: grab; background: var(--void); box-shadow: 0 0 0 1px var(--edge-hi); }
.crop-frame:active { cursor: grabbing; } .crop-frame:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.crop-img { position: absolute; left: 0; top: 0; max-width: none; user-select: none; -webkit-user-drag: none; pointer-events: none; transform-origin: 0 0; }
.crop-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5); pointer-events: none; }
.crop-zoom { display: flex; align-items: center; gap: 12px; } .crop-zoom input { flex: 1; min-height: 44px; accent-color: var(--signal); }
.photo-picker .avatar.big { flex: none; width: 72px; height: 72px; font-size: 1.8rem; } .ob-photo { gap: 8px; }
.tag.warn { background: color-mix(in srgb, var(--amber) 16%, transparent); color: var(--amber); border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent); }

/* a session marked done with no recording: the person's own report (Plan and Log) */
.act.confirmed { cursor: default; align-items: flex-start; }
.act.confirmed:active { background: none; }
.act.confirmed .t > span { display: block; margin-top: 2px; }
.act.confirmed .t > .row { margin-top: 8px; gap: 8px; flex-wrap: wrap; }
.act.confirmed .r.tag { align-self: flex-start; }
.sess .confirmed-note { display: block; font-size: .8rem; color: var(--good, var(--accent)); font-weight: 600; }

/* sign-in / invite: the other way in sits right under the card, never pushed to the bottom of a tall screen */
.invite-entry { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px; text-align: center; margin-top: calc(-1 * var(--s2, 8px)); }
.invite-entry p { margin: 0; }
.invite-entry .btn { min-height: 44px; }
/* on a tall phone the sign-in stack sits in the middle, not stuck to the top above an empty screen; when the keyboard or large text
   makes it taller than the screen it simply scrolls from the top (safe centring never hides the heading) */
@media (min-height: 700px) { .view.auth { justify-content: safe center; padding-bottom: 4vh; } }

/* setup: "Connect your apps" (web/views-onboarding.js, connect) */
.conn-uses { display: flex; flex-wrap: wrap; gap: var(--s2); }
.conn-advice { gap: var(--s2); }
.conn-tip { gap: 6px; }
.conn-tip.later { opacity: .82; }
.conn-tip .btn { align-self: flex-start; min-height: 44px; }
.conn-setup-all > summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.conn-flash { outline: 2px solid var(--accent); outline-offset: 3px; transition: outline-color .6s ease; }
@media (prefers-reduced-motion: reduce) { .conn-flash { transition: none; } }

/* Your watch and scale (web/gear.js) */
.gear-panel .row.gap { gap: 8px; align-items: center; }
.gear-panel .row.wrap.gap { flex-wrap: wrap; }
.gear-form select, .gear-form input, .gear-weight-form input { min-height: 44px; max-width: 100%; }
.gear-form .row select { flex: 1 1 140px; min-width: 0; }
.gear-weight-form input { width: 8.5em; }
.gear-item .gear-own { font-style: italic; }
.gear-typed { gap: 8px; }

/* setup: step-by-step guides under each suggestion */
.conn-guide summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; }
.conn-guide ol { margin: 4px 0 0; padding-left: 22px; display: grid; gap: 6px; }

/* School -> Study -> Add topics (web/views-topicimport.js) */
.topic-step1 textarea { width: 100%; min-height: 9em; font: inherit; }
.topic-step1 select, .topic-step1 input[type=text] { min-height: 44px; max-width: 100%; }
.topic-review { padding-left: 0; list-style: none; max-height: 55vh; overflow: auto; }
.topic-row .row.gap { gap: 10px; align-items: center; }
.topic-row input[type=text] { flex: 1 1 auto; min-width: 0; min-height: 44px; }
.topic-row input[type=checkbox] { width: 22px; height: 22px; flex: none; }
.topic-howto.warn { color: var(--warn, #f0b54a); }
