/* Aura Workout — sharp, clean, mobile-first */
@font-face {
  font-family: 'Archivo';
  src: url('fonts/archivo.woff2') format('woff2-variations'), url('fonts/archivo.woff2') format('woff2');
  font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
}

:root {
  --bg: #0A0A0B; --bg2: #121214; --bg3: #19191C; --line: #242428; --line2: #34343A;
  --ink: #F3F0E9; --ink2: #A9A59D; --ink3: #6B6862;
  --acc: #D4FF3A; --on-acc: #0A0A0B; --acc-text: #D4FF3A; --warn: #FF5A36;
  --fig: var(--acc); --fig-far: var(--acc);
  --glow: rgba(212, 255, 58, .16);
  --tab-h: 64px;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --f: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F1EFEA; --bg2: #E9E6DF; --bg3: #DFDBD2; --line: #D5D1C8; --line2: #C2BDB2;
    --ink: #0C0C0D; --ink2: #56534D; --ink3: #8E8A82;
    --acc-text: #3E5900; --fig: #0C0C0D; --fig-far: #0C0C0D; --glow: rgba(160, 205, 0, .22);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #F1EFEA; --bg2: #E9E6DF; --bg3: #DFDBD2; --line: #D5D1C8; --line2: #C2BDB2;
  --ink: #0C0C0D; --ink2: #56534D; --ink3: #8E8A82;
  --acc-text: #3E5900; --fig: #0C0C0D; --fig-far: #0C0C0D; --glow: rgba(160, 205, 0, .22);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; border-radius: 0 !important; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--f); font-size: 15px; line-height: 1.4;
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; font-variant-numeric: tabular-nums;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: -2px; }

/* type */
.wide { font-stretch: 125%; font-weight: 800; text-transform: uppercase; letter-spacing: -.015em; line-height: .95; }
.cond { font-stretch: 62%; }
.lbl { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink3); }
.lbl.ink { color: var(--ink2); }
.muted { color: var(--ink2); }
.acc-t { color: var(--acc-text); }

/* shell */
#app { max-width: 540px; margin: 0 auto; min-height: 100%; position: relative; }
#view { padding: calc(var(--safe-t) + 14px) 0 calc(var(--tab-h) + var(--safe-b) + 24px); animation: vin .28s ease both; }
@keyframes vin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.pad { padding-left: 20px; padding-right: 20px; }
.sec { margin-top: 34px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; padding: 0 20px 12px; }
.hair { border-top: 1px solid var(--line); }

/* top bar */
.top { display: flex; align-items: center; justify-content: space-between; padding: 0 20px; height: 44px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand b { font-stretch: 125%; font-weight: 900; letter-spacing: .02em; font-size: 15px; }
.sq-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line2); }
.sq-btn:active { background: var(--ink); color: var(--bg); }
.chip-stat { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line2); height: 32px; padding: 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.chip-stat i { width: 8px; height: 8px; background: var(--acc); display: block; }

/* headline */
.hero-h { font-size: clamp(44px, 13vw, 64px); margin: 18px 0 6px; }
.hero-h span { color: var(--acc-text); }

/* week strip */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 22px; }
.week div { text-align: center; }
.week i { display: block; aspect-ratio: 1; border: 1px solid var(--line2); margin-bottom: 6px; }
.week .on i { background: var(--acc); border-color: var(--acc); }
.week .today i { border: 2px solid var(--ink); }
.week span { font-size: 10px; font-weight: 700; letter-spacing: .1em; color: var(--ink3); }
.week .today span { color: var(--ink); }

/* challenge block */
.ch { margin: 26px 20px 0; background: var(--acc); color: var(--on-acc); position: relative; overflow: hidden; }
.ch-in { padding: 18px 18px 0; display: block; width: 100%; text-align: left; }
.ch .lbl { color: rgba(10,10,11,.6); }
.ch-row { display: flex; justify-content: space-between; align-items: baseline; }
.ch-day { font-size: 64px; margin: 14px 0 4px; }
.ch-sub { font-size: 14px; font-weight: 500; }
.ch-bar { display: grid; grid-template-columns: repeat(30, 1fr); gap: 2px; margin: 18px 0 18px; }
.ch-bar i { height: 10px; background: rgba(10,10,11,.14); }
.ch-bar i.d { background: var(--on-acc); }
.ch-bar i.n { background: transparent; outline: 2px solid var(--on-acc); outline-offset: -2px; }
.ch-go { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; width: calc(100% - 36px); margin: 0 18px 18px; background: var(--on-acc); color: var(--acc); height: 56px; padding: 0 18px; font-stretch: 125%; font-weight: 800; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; }
.ch-go:active { opacity: .85; }
.ch-art { position: absolute; right: -10px; top: 8px; width: 170px; height: 134px; opacity: .2; pointer-events: none; }
.ch-in { position: relative; z-index: 1; }
.ch-art .fig-limb polyline, .ch-art .fig-far polyline { stroke: var(--on-acc); }
.ch-art .fig-head { fill: var(--on-acc); }
.ch-art .fig-ground { stroke: transparent; }

/* resume */
.resume { margin: 14px 20px 0; display: flex; align-items: center; gap: 14px; width: calc(100% - 40px); border: 1px solid var(--acc); padding: 14px 16px; text-align: left; }
.resume .dot { width: 10px; height: 10px; background: var(--acc); animation: blink 1.2s steps(2) infinite; flex: none; }
@keyframes blink { 50% { opacity: .2; } }
.resume .t { flex: 1; min-width: 0; }
.resume .t b { display: block; font-weight: 700; }

/* list rows */
.rows { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; min-height: 76px; }
.row:active { background: var(--bg2); }
.row .ix { font-stretch: 62%; font-weight: 300; font-size: 30px; width: 30px; color: var(--ink3); line-height: 1; }
.row .tx { flex: 1; min-width: 0; }
.row .tx b { display: block; font-stretch: 125%; font-weight: 800; text-transform: uppercase; font-size: 16px; letter-spacing: -.01em; line-height: 1.1; }
.row .tx small { display: block; margin-top: 5px; font-size: 12px; color: var(--ink2); }
.row .th { width: 72px; height: 56px; background: var(--bg2); flex: none; }
.row .th svg { width: 100%; height: 100%; }
.row .val { font-stretch: 62%; font-weight: 500; font-size: 22px; color: var(--ink); }
.arrow { width: 18px; height: 18px; flex: none; color: var(--ink3); }

/* figure */
.fig { overflow: visible; }
.fig-ground { stroke: var(--line2); stroke-width: .8; }
.fig-limb polyline, .fig-far polyline { fill: none; stroke: var(--fig); stroke-width: 4.2; stroke-linecap: square; stroke-linejoin: miter; }
.fig-far polyline { stroke: var(--fig-far); }
.fig-far { opacity: .32; }
.fig-head { fill: var(--fig); }

/* detail */
.stage { position: relative; background: var(--bg2); margin: 0 20px; aspect-ratio: 14 / 10; overflow: hidden; }
.stage::before { content: ''; position: absolute; inset: 18% 22%; background: radial-gradient(closest-side, var(--glow), transparent); filter: blur(10px); }
.stage svg { position: relative; width: 100%; height: 100%; }
.stage .fig-limb polyline, .stage .fig-far polyline, .pl-stage .fig-limb polyline, .pl-stage .fig-far polyline { stroke-width: 3.4; }
.stage .corner { position: absolute; left: 12px; top: 10px; }
.d-title { font-size: clamp(34px, 10vw, 46px); margin: 22px 0 8px; }
.d-desc { color: var(--ink2); margin: 10px 0 0; max-width: 40ch; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--line2); margin-top: 22px; }
.seg button { height: 46px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; border-left: 1px solid var(--line2); color: var(--ink2); }
.seg button:first-child { border-left: 0; }
.seg button.on { background: var(--ink); color: var(--bg); }
.stats { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 22px; }
.stats div { padding: 14px 0 14px 20px; border-left: 1px solid var(--line); }
.stats div:first-child { border-left: 0; }
.stats b { display: block; font-stretch: 62%; font-weight: 400; font-size: 34px; line-height: 1; margin-top: 6px; }
.stats b small { font-size: 14px; color: var(--ink2); font-stretch: 100%; margin-left: 2px; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; border-top: 1px solid var(--line); }
.steps li { display: flex; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.steps li::before { counter-increment: s; content: '0' counter(s); font-stretch: 62%; font-size: 22px; color: var(--acc-text); line-height: 1.1; width: 24px; flex: none; }

/* sticky cta */
.cta-wrap { position: sticky; bottom: calc(var(--tab-h) + var(--safe-b)); padding: 16px 20px; background: linear-gradient(transparent, var(--bg) 30%); z-index: 5; }
.cta { display: flex; justify-content: space-between; align-items: center; width: 100%; height: 60px; background: var(--acc); color: var(--on-acc); padding: 0 20px; font-stretch: 125%; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; font-size: 15px; }
.cta:active { transform: translateY(1px); filter: brightness(.95); }
.cta.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line2); }
.cta.danger { background: var(--warn); color: #0A0A0B; }

/* chips */
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 0 20px 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { height: 34px; padding: 0 14px; border: 1px solid var(--line2); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink2); flex: none; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* grid tiles */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tile { background: var(--bg); padding: 12px 14px 16px; text-align: left; }
.tile:active { background: var(--bg2); }
.tile .th { aspect-ratio: 14/10; background: var(--bg2); margin-bottom: 12px; }
.tile .th svg { width: 100%; height: 100%; }
.tile b { display: block; font-stretch: 112%; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .01em; line-height: 1.15; }
.tile small { display: block; margin-top: 4px; font-size: 11px; color: var(--ink3); }

/* challenge grid */
.cgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 0 20px; }
.cday { aspect-ratio: 1; border: 1px solid var(--line2); display: flex; flex-direction: column; justify-content: space-between; padding: 7px 8px; text-align: left; color: var(--ink3); }
.cday b { font-stretch: 62%; font-weight: 400; font-size: 26px; line-height: 1; }
.cday small { font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.cday.done { background: var(--acc); border-color: var(--acc); color: var(--on-acc); }
.cday.next { border: 2px solid var(--acc); color: var(--ink); }
.cday.open { color: var(--ink); }
.cday.lock { opacity: .55; }

/* progress */
.sgrid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.sgrid div { padding: 16px 20px 18px; border-bottom: 1px solid var(--line); }
.sgrid div:nth-child(odd) { border-right: 1px solid var(--line); }
.sgrid b { display: block; font-stretch: 62%; font-weight: 300; font-size: 54px; line-height: 1; margin-top: 8px; }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 150px; align-items: end; padding: 0 20px; }
.bars div { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; text-align: center; }
.bars i { display: block; background: var(--line2); min-height: 2px; }
.bars .t i { background: var(--acc); }
.bars em { font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .08em; color: var(--ink3); margin-top: 8px; }
.bars u { text-decoration: none; font-size: 11px; color: var(--ink2); margin-bottom: 4px; font-stretch: 62%; font-size: 14px; }
.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); gap: 3px; padding: 0 20px; }
.heat i { aspect-ratio: 1; background: var(--bg3); }
.heat i.l1 { background: color-mix(in srgb, var(--acc) 45%, var(--bg3)); }
.heat i.l2 { background: var(--acc); }
.heat i.fut { background: transparent; }
.empty { padding: 26px 20px; color: var(--ink3); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* settings */
.set { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 20px; min-height: 62px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.set > span { font-weight: 500; }
.set small { display: block; color: var(--ink3); font-size: 12px; font-weight: 400; }
.set:active:not(.static) { background: var(--bg2); }
.sw { width: 50px; height: 28px; border: 1px solid var(--line2); position: relative; flex: none; background: var(--bg2); transition: background .15s; }
.sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: var(--ink3); transition: transform .18s, background .18s; }
.sw.on { background: var(--acc); border-color: var(--acc); }
.sw.on::after { transform: translateX(22px); background: var(--on-acc); }
.mini-seg { display: flex; border: 1px solid var(--line2); flex: none; }
.mini-seg button { min-width: 42px; height: 32px; padding: 0 9px; font-size: 11px; font-weight: 700; letter-spacing: .06em; border-left: 1px solid var(--line2); color: var(--ink2); }
.mini-seg button:first-child { border-left: 0; }
.mini-seg button.on { background: var(--ink); color: var(--bg); }
.stepper { display: flex; align-items: center; border: 1px solid var(--line2); }
.stepper button { width: 36px; height: 32px; font-size: 18px; }
.stepper span { min-width: 54px; text-align: center; font-weight: 700; font-size: 13px; border-left: 1px solid var(--line2); border-right: 1px solid var(--line2); line-height: 32px; }

/* tab bar */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.tabs nav { max-width: 540px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); height: var(--tab-h); }
.tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: var(--ink3); font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; position: relative; }
.tabs a.on { color: var(--ink); }
.tabs a.on::before { content: ''; position: absolute; top: -1px; left: 30%; right: 30%; height: 2px; background: var(--acc); }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: square; stroke-linejoin: miter; }

/* ===== player ===== */
#player { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: none; flex-direction: column; overflow: hidden; }
#player.show { display: flex; animation: pin .25s ease both; }
@keyframes pin { from { opacity: 0; transform: scale(1.02); } to { opacity: 1; transform: none; } }
.pl { max-width: 540px; width: 100%; margin: 0 auto; flex: 1; display: flex; flex-direction: column; padding: calc(var(--safe-t) + 10px) 0 calc(var(--safe-b) + 16px); min-height: 0; }
.pl-top { display: flex; align-items: center; gap: 12px; padding: 0 16px; }
.pl-segs { flex: 1; display: flex; gap: 3px; height: 4px; }
.pl-segs i { flex: 1; background: var(--line2); position: relative; overflow: hidden; }
.pl-segs i.d { background: var(--ink); }
.pl-segs i.c::after { content: ''; position: absolute; inset: 0; background: var(--acc); transform-origin: left; transform: scaleX(var(--p, 0)); }
.pl-count { font-stretch: 62%; font-size: 18px; font-weight: 500; min-width: 44px; text-align: right; }
.pl-meta { display: flex; justify-content: space-between; padding: 18px 20px 10px; }
.pl-stage { position: relative; margin: 0 20px; flex: 1 1 auto; min-height: 150px; background: var(--bg2); overflow: hidden; }
.pl-stage::before { content: ''; position: absolute; inset: 10% 18%; background: radial-gradient(closest-side, var(--glow), transparent); filter: blur(14px); animation: aura 2.6s ease-in-out infinite; }
@keyframes aura { 50% { transform: scale(1.12); opacity: .7; } }
.pl-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pl-name { padding: 20px 20px 0; font-size: clamp(26px, 8vw, 36px); }
.pl-sub { padding: 8px 20px 0; color: var(--ink2); font-size: 13px; display: flex; gap: 10px; flex-wrap: wrap; }
.pl-sub .tag { color: var(--on-acc); background: var(--acc); padding: 1px 6px; font-weight: 700; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.pl-big { display: flex; align-items: flex-end; justify-content: space-between; padding: 6px 20px 0; }
.pl-num { font-stretch: 62%; font-weight: 200; font-size: clamp(96px, 30vw, 150px); line-height: .9; letter-spacing: -.02em; }
.pl-num small { font-size: .4em; font-weight: 400; margin-left: 4px; color: var(--ink2); }
.pl-aside { text-align: right; padding-bottom: 14px; }
.pl-aside b { display: block; font-stretch: 62%; font-weight: 500; font-size: 22px; }
.pl-line { height: 3px; margin: 14px 20px 0; background: var(--line); position: relative; }
.pl-line i { position: absolute; inset: 0; background: var(--acc); transform-origin: left; transform: scaleX(0); }
.pl-ctrl { display: grid; grid-template-columns: 64px 1fr 64px; gap: 8px; padding: 16px 20px 0; }
.pl-ctrl button { height: 64px; display: grid; place-items: center; border: 1px solid var(--line2); }
.pl-ctrl button:active { background: var(--ink); color: var(--bg); }
.pl-ctrl .main { background: var(--acc); color: var(--on-acc); border-color: var(--acc); font-stretch: 125%; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; font-size: 15px; display: flex; gap: 10px; justify-content: center; align-items: center; }
.pl-ctrl .main:active { background: var(--ink); color: var(--bg); }

/* rest mode: whole screen flips to accent */
#player.rest { background: var(--acc); color: var(--on-acc); }
#player.rest .pl-segs i { background: rgba(10,10,11,.18); }
#player.rest .pl-segs i.d { background: var(--on-acc); }
#player.rest .pl-segs i.c::after { background: var(--on-acc); }
#player.rest .lbl, #player.rest .pl-sub, #player.rest .pl-num small { color: rgba(10,10,11,.6); }
#player.rest .pl-ctrl button { border-color: rgba(10,10,11,.3); }
#player.rest .pl-ctrl .main { background: var(--on-acc); color: var(--acc); border-color: var(--on-acc); }
#player.rest .pl-line { background: rgba(10,10,11,.15); }
#player.rest .pl-line i { background: var(--on-acc); }
#player.rest .sq-btn { border-color: rgba(10,10,11,.3); }
.rest-word { padding: 8px 20px 0; font-size: clamp(64px, 21vw, 118px); line-height: .82; }
.rest-next { margin: 20px 20px 0; flex: 1; min-height: 0; display: flex; flex-direction: column; border-top: 1px solid rgba(10,10,11,.25); padding-top: 14px; }
.rest-next .rn-h { display: flex; justify-content: space-between; }
.rest-next .th { flex: 1; min-height: 90px; margin-top: 12px; background: rgba(10,10,11,.07); }
.rest-next .th svg { width: 100%; height: 100%; }
.rest-next .fig-limb polyline, .rest-next .fig-far polyline { stroke: var(--on-acc); }
.rest-next .fig-head { fill: var(--on-acc); }
.rest-next .fig-ground { stroke: rgba(10,10,11,.25); }
.rest-next b { display: block; font-stretch: 125%; font-weight: 800; text-transform: uppercase; font-size: 24px; line-height: 1.05; margin-top: 8px; }

/* pause + modal */
.ovl { position: fixed; inset: 0; z-index: 80; background: rgba(5,5,6,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s ease both; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-width: 540px; background: var(--bg); color: var(--ink); border-top: 2px solid var(--acc); padding: 22px 20px calc(var(--safe-b) + 20px); animation: up .24s cubic-bezier(.2,.9,.3,1) both; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.sheet h3 { margin: 6px 0 10px; font-size: 30px; }
.sheet p { color: var(--ink2); margin: 0 0 18px; }
.sheet .cta { margin-top: 8px; }

/* done screen */
.done-wrap { flex: 1; display: flex; flex-direction: column; padding: 0 20px; position: relative; }
.done-h { font-size: clamp(42px, 12.5vw, 76px); margin: 28px 0 10px; }
.done-h span { color: var(--acc-text); }
.done-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 22px -20px 0; }
.done-stats div { padding: 16px 0 16px 20px; border-left: 1px solid var(--line); }
.done-stats div:first-child { border-left: 0; }
.done-stats b { display: block; font-stretch: 62%; font-weight: 300; font-size: 44px; line-height: 1; margin-top: 6px; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 9px; height: 9px; background: var(--acc); animation: fall linear forwards; }
.confetti i:nth-child(3n) { background: var(--ink); width: 6px; height: 6px; }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); } }

/* toast */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + var(--safe-b) + 14px); z-index: 90; background: var(--acc); color: var(--on-acc); padding: 12px 16px; font-size: 13px; font-weight: 600; display: flex; gap: 14px; align-items: center; max-width: calc(100% - 32px); width: max-content; animation: up .2s ease both; }
.toast button { font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; border-left: 1px solid rgba(10,10,11,.3); padding-left: 14px; }


/* ===== 3D avatar ===== */
.av-wrap { position: relative; margin: 12px 20px 0; }
.av-stage { position: relative; height: min(64vh, 520px); background: radial-gradient(60% 55% at 50% 45%, var(--glow), transparent 70%), var(--bg2); overflow: hidden; touch-action: pan-y; }
.av-stage.short { height: min(46vh, 380px); }
.av-stage.tall { height: min(52vh, 440px); }
.av-stage canvas, .pl-stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
.av-stage.loading::after, .pl-stage.is3d:empty::after { content: 'LOADING 3D'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 700; letter-spacing: .14em; color: var(--ink3); }
.av-off { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; }
.av-tags { position: absolute; left: 12px; top: 12px; display: flex; gap: 6px; pointer-events: none; }
.tag { background: var(--acc); color: var(--on-acc); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 4px 7px; }
.tag.ghost { background: color-mix(in srgb, var(--bg) 70%, transparent); color: var(--ink); border: 1px solid var(--line2); }
.av-poses { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; gap: 0; border: 1px solid var(--line2); background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.av-poses button { flex: 1; height: 38px; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink2); border-left: 1px solid var(--line2); }
.av-poses button:first-child { border-left: 0; }
.av-poses button.on { background: var(--ink); color: var(--bg); }
.pl-stage.is3d svg { display: none; }
.pl-stage.is3d::before { display: none; }
.sq-btn.sm { width: 36px; height: 36px; border-color: var(--line); color: var(--ink3); }
.sq-btn.sm .ico { width: 16px; height: 16px; }
.note { color: var(--ink3); font-size: 12.5px; line-height: 1.5; margin: 12px 0 0; }
.note b { color: var(--ink2); }
.sgrid-4 b small { font-size: 16px; color: var(--ink2); font-stretch: 100%; margin-left: 3px; font-weight: 500; }
.sgrid em { display: block; font-style: normal; font-size: 11px; font-weight: 700; color: var(--acc-text); margin-top: 4px; letter-spacing: .04em; }
.sgrid-4 b { font-size: 46px; }

/* chart */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .ch-grid { stroke: var(--line); stroke-width: 1; }
.chart .ch-ax { fill: var(--ink3); font: 600 9px var(--f); letter-spacing: .04em; }
.chart .ch-line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: miter; }
.chart .ch-pt { fill: var(--bg); stroke: var(--ink); stroke-width: 1.5; }
.chart .ch-pt.last { fill: var(--acc); stroke: var(--acc); }
.chart .ch-val { fill: var(--ink); font: 800 12px var(--f); font-stretch: 112%; }
.chart .band-ok { fill: color-mix(in srgb, var(--acc) 16%, transparent); }
.chart .band-warn { fill: color-mix(in srgb, var(--warn) 9%, transparent); }

/* recovery rows */
.rec-row { min-height: 64px; }
.rbar, .rec-meter { position: relative; height: 6px; background: var(--line); }
.rbar { width: 26%; flex: none; }
.rbar i, .rec-meter i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--acc); }
.rbar i.warm, .rec-meter i.warm { background: #FFB020; }
.rbar i.hot, .rec-meter i.hot { background: var(--warn); }
.rec-meter { height: 8px; margin: 18px 0 0; }
.rec-facts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 16px -20px 0; }
.rec-facts div { padding: 12px 0 12px 20px; border-left: 1px solid var(--line); }
.rec-facts div:first-child { border-left: 0; }
.rec-facts b { display: block; font-stretch: 62%; font-weight: 400; font-size: 28px; line-height: 1.05; margin-top: 4px; }
.tissue { position: relative; margin: 0 20px; height: 210px; background: #100607; }
.tissue canvas { width: 100%; height: 100%; display: block; }
.tissue .tz { position: absolute; left: 10px; top: 8px; color: rgba(243,240,233,.7); }
.phases { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 20px; border: 1px solid var(--line2); border-top: 0; }
.phases button { text-align: left; padding: 10px 8px 12px; border-left: 1px solid var(--line2); position: relative; min-height: 64px; }
.phases button:first-child { border-left: 0; }
.phases button b { display: block; font-stretch: 112%; font-weight: 800; font-size: 11.5px; text-transform: uppercase; margin-top: 4px; letter-spacing: .01em; }
.phases button.on { background: var(--ink); color: var(--bg); }
.phases button.on .lbl { color: color-mix(in srgb, var(--bg) 60%, var(--ink)); }
.phases em { position: absolute; right: 6px; bottom: 8px; font-style: normal; font-size: 8.5px; font-weight: 800; letter-spacing: .1em; background: var(--acc); color: var(--on-acc); padding: 1px 4px; }

/* customize */
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatches button { width: 34px; height: 34px; background: var(--c); border: 1px solid var(--line2); position: relative; }
.swatches button.on { outline: 2px solid var(--ink); outline-offset: 2px; }
.set.col { flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 14px; padding-bottom: 14px; }
.mini-seg.wrap { flex-wrap: wrap; }
.sliders { border-top: 1px solid var(--line); }
.slide { display: block; padding: 12px 20px 8px; border-bottom: 1px solid var(--line); }
.slide > span { display: flex; justify-content: space-between; align-items: baseline; }
.slide b { font-weight: 600; }
.slide em { font-style: normal; font-stretch: 62%; font-size: 18px; color: var(--ink2); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; background: transparent; margin: 4px 0 0; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; background: linear-gradient(90deg, var(--line2), var(--line2) 49.5%, var(--ink3) 49.5%, var(--ink3) 50.5%, var(--line2) 50.5%); }
input[type=range]::-moz-range-track { height: 4px; background: var(--line2); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; background: var(--acc); border: 2px solid var(--on-acc); margin-top: -9px; }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; background: var(--acc); border: 2px solid var(--on-acc); }

/* forms */
.sheet.form { max-height: 92vh; overflow: auto; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 4px; }
.fld { display: block; }
.fi { display: flex; align-items: center; border: 1px solid var(--line2); margin-top: 6px; background: var(--bg2); }
.fi input { flex: 1; min-width: 0; height: 48px; border: 0; background: transparent; padding: 0 12px; font-size: 20px; font-stretch: 62%; outline: none; }
.fi:focus-within { border-color: var(--acc); }
.fi em { font-style: normal; color: var(--ink3); font-size: 12px; font-weight: 700; padding-right: 12px; }
.navy { margin: 12px 0 0; border-top: 1px solid var(--line); padding-top: 10px; }
.navy summary { cursor: pointer; list-style: none; }
.navy summary::-webkit-details-marker { display: none; }
.navy summary::before { content: '+ '; color: var(--acc-text); }
.navy[open] summary::before { content: '– '; }

/* fuel */
.fuel-row { min-height: 70px; gap: 12px; }
.fuel-row .tx b { font-size: 14px; font-stretch: 110%; margin-top: 2px; }
.fuel-row .tx small.lbl { margin-top: 0; font-size: 10px; }
.ck { width: 30px; height: 30px; border: 1.5px solid var(--line2); display: grid; place-items: center; flex: none; color: transparent; }
.ck .ico { width: 18px; height: 18px; }
.fuel-row.done .ck { background: var(--acc); border-color: var(--acc); color: var(--on-acc); }
.fuel-row.done .tx b { text-decoration: line-through; color: var(--ink3); }
.arrow-l { width: 40px; height: 40px; display: grid; place-items: center; color: var(--ink3); flex: none; }
.export3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 14px 20px 0; }
.export3 button { border: 1px solid var(--line2); padding: 10px 12px; text-align: left; }
.export3 button:active { background: var(--ink); color: var(--bg); }
.export3 b { display: block; font-stretch: 112%; font-weight: 800; font-size: 13px; text-transform: uppercase; }
.export3 small { display: block; font-size: 11px; color: var(--ink3); margin-top: 2px; }

/* kitchen */
.rcards { display: flex; gap: 8px; overflow-x: auto; padding: 0 20px 4px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.rcards::-webkit-scrollbar { display: none; }
.rcard { flex: none; width: 196px; min-height: 168px; border: 1px solid var(--line2); padding: 14px; display: flex; flex-direction: column; scroll-snap-align: start; background: var(--bg2); }
.rcard:first-child { background: var(--acc); color: var(--on-acc); border-color: var(--acc); }
.rcard:first-child .lbl { color: rgba(10,10,11,.6); }
.rcard b { display: block; font-stretch: 115%; font-weight: 800; text-transform: uppercase; font-size: 15px; line-height: 1.1; margin-top: 10px; }
.rcard .mac { margin-top: auto; display: flex; gap: 16px; padding-top: 12px; }
.rcard em { font-style: normal; font-stretch: 62%; font-size: 30px; line-height: 1; }
.rcard em small { font-size: 11px; font-stretch: 100%; margin-left: 2px; font-weight: 600; opacity: .7; }
.pantry { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pantry > div { background: var(--bg); padding: 14px 16px 16px 20px; }
.pantry b { display: block; font-stretch: 115%; font-weight: 800; text-transform: uppercase; font-size: 13px; margin-bottom: 8px; }
.pantry ul, .ing { list-style: none; margin: 0; padding: 0; }
.pantry li { font-size: 13px; padding: 3px 0 3px 14px; position: relative; color: var(--ink2); }
.pantry li::before, .ing li::before { content: ''; position: absolute; left: 0; top: 10px; width: 6px; height: 6px; background: var(--acc); }
.ing { border-top: 1px solid var(--line); }
.ing li { position: relative; padding: 13px 20px 13px 40px; border-bottom: 1px solid var(--line); }
.ing li::before { left: 20px; top: 20px; }
.stats .acc-cell { background: var(--acc); color: var(--on-acc); }
.stats .acc-cell .lbl { color: rgba(10,10,11,.6); }

@media (min-width: 600px) {
  #app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}
@media (max-height: 700px) {
  .pl-num { font-size: 92px; }
  .pl-name { padding-top: 14px; }
  .pl-ctrl button { height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition: none !important; }
}

/* ===== food preferences ===== */
.fchips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 20px; }
.fchip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 10px; border: 1px solid var(--line2); font-size: 13px; font-weight: 600; color: var(--ink2); }
.fchip .ico { width: 16px; height: 16px; }
.fchip.on { background: var(--acc); border-color: var(--acc); color: var(--on-acc); }
.fchip.warn.on { background: var(--warn); border-color: var(--warn); color: #0A0A0B; }
.match { text-align: center; margin-bottom: 8px; color: var(--ink2); }
.cta[disabled] { opacity: .4; pointer-events: none; }
.chip.dim { opacity: .45; }
.chips a.chip { display: inline-flex; align-items: center; }

/* ===== Curaçao credit ===== */
.credit { display: flex; align-items: center; gap: 14px; margin: 0 20px; padding: 16px; border: 1px solid var(--line2); }
.credit:active { background: var(--bg2); }
.flag-cw { width: 48px; height: 32px; flex: none; display: block; }
.credit .ct { flex: 1; min-width: 0; }
.credit .ct b { display: block; font-stretch: 125%; font-weight: 800; text-transform: uppercase; font-size: 15px; letter-spacing: .01em; margin-top: 3px; }
.credit-logo { height: 34px; width: auto; max-width: 110px; object-fit: contain; flex: none; }
.seg.sm button { font-size: 10px; letter-spacing: .03em; padding: 0 2px; }
.credit .ct b { white-space: nowrap; font-size: 14px; }
.credit .ct .lbl { white-space: nowrap; }
.credit-logo { height: 30px; max-width: 84px; }
