/* ===== BRAND: Lyft'd Left Solutions =====
   Carbon #17191D · Bone #F2ECE1 · Vermilion #F0543F · Cobalt #465CEB · Signal #E2E84A
   Bebas Neue (display) + Archivo (body). Fonts are bundled for offline use. */
@font-face { font-family: 'Bebas Neue'; src: url('../fonts/bebas-neue.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('../fonts/archivo.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --carbon: #17191D; --bone: #F2ECE1; --verm: #F0543F; --cobalt: #465CEB; --signal: #E2E84A;
  --display: 'Bebas Neue', Impact, 'Arial Narrow', sans-serif;
  --body: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* Dark ("Lifted Dark") is the default: easy on the eyes under gym lights */
  --bg: #111316; --paper: #17191D; --card: #1D2025; --card2: #24272E; --fg: #F2ECE1; --muted: #A9A398; --line: #2E3138;
  --cobaltText: #8E9BF5; --vermText: #FF7A68; --ok: #E2E84A; --dot: rgba(242, 236, 225, .05);
  --tap: 52px; --radius: 14px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F2ECE1; --paper: #FBF8F2; --card: #FFFFFF; --card2: #F7F2E8; --fg: #17191D; --muted: #5D5A55; --line: #D9D1C3;
  --cobaltText: #3346C9; --vermText: #C93A27; --ok: #3346C9; --dot: rgba(70, 92, 235, .08);
  color-scheme: light;
}
@media (prefers-color-scheme: light) { :root[data-theme="auto"] {
  --bg: #F2ECE1; --paper: #FBF8F2; --card: #FFFFFF; --card2: #F7F2E8; --fg: #17191D; --muted: #5D5A55; --line: #D9D1C3;
  --cobaltText: #3346C9; --vermText: #C93A27; --ok: #3346C9; --dot: rgba(70, 92, 235, .08); color-scheme: light; } }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--fg); font: 17px/1.45 var(--body);
  background-image: radial-gradient(var(--dot) 1px, transparent 1.3px); background-size: 7px 7px;
  min-height: 100dvh; overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: .02em; line-height: .95; margin: 0; }
a { color: var(--cobaltText); }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- masthead ---------- */
.mast { background: var(--carbon); color: var(--bone); position: sticky; top: 0; z-index: 20; padding-top: env(safe-area-inset-top); }
.mast::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(242, 236, 225, .08) 1px, transparent 1.3px); background-size: 6px 6px; pointer-events: none; }
.mast .in { position: relative; max-width: 640px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 10px; min-height: 54px; }
.mark { width: 30px; height: 30px; flex: none; }
.mast b { font-family: var(--display); font-size: 26px; letter-spacing: .06em; font-weight: 400; }
.mast .ticks { margin-left: auto; font: 600 11px var(--body); letter-spacing: .18em; text-transform: uppercase; opacity: .75; text-align: right; }
.rule { height: 5px; background: linear-gradient(90deg, var(--verm) 0 46%, var(--signal) 46% 54%, var(--cobalt) 54% 100%); }

main { max-width: 640px; margin: 0 auto; padding: 16px 16px calc(100px + env(safe-area-inset-bottom)); }
main.workout { padding-bottom: calc(170px + env(safe-area-inset-bottom)); }

/* ---------- section heads ---------- */
.sh { display: flex; align-items: center; gap: 10px; margin: 26px 0 12px; }
.sh::before { content: ""; width: 12px; height: 12px; background: var(--verm); flex: none; }
.sh h2 { font-size: 30px; }
.sh::after { content: ""; flex: 1; height: 8px; background: repeating-linear-gradient(90deg, var(--line) 0 2px, transparent 2px 9px); }
.eyebrow { font: 800 12px var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--vermText); }

/* ---------- pass card (today hero) ---------- */
.pass { background: var(--cobalt); color: #fff; border-radius: var(--radius); position: relative; overflow: hidden; }
.pass::before, .pass::after { content: ""; position: absolute; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); bottom: 74px; }
.pass::before { left: -12px; } .pass::after { right: -12px; }
.pass .main { padding: 18px 20px 16px; }
.pass .lbl { font: 700 11px var(--body); letter-spacing: .18em; text-transform: uppercase; opacity: .85; }
.pass h1 { font-size: clamp(54px, 15vw, 76px); margin-top: 4px; }
.pass .focus { font-weight: 600; opacity: .92; }
.pass .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.pass .stats b { display: block; font-family: var(--display); font-size: 30px; font-weight: 400; line-height: 1; }
.pass .stats span { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.pass .stub { border-top: 2px dashed rgba(255, 255, 255, .45); padding: 12px 16px; display: flex; gap: 10px; }
.pass .wm { position: absolute; right: -24px; top: -10px; width: 150px; opacity: .12; pointer-events: none; }
.pass.bike { background: var(--signal); color: var(--carbon); }
.pass.bike .stub { border-top-color: rgba(23, 25, 29, .35); }
.pass.rest { background: var(--card); color: var(--fg); border: 1px solid var(--line); }
.pass.rest .stub { border-top-color: var(--line); }
.pass.done { background: var(--carbon); color: var(--bone); border: 1px solid var(--line); }

/* ---------- buttons ---------- */
.btn { min-height: var(--tap); border-radius: 999px; border: 2px solid transparent; padding: 0 20px; font-weight: 800; font-size: 16px; letter-spacing: .02em;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; background: var(--card2); color: var(--fg); text-decoration: none; }
.btn.primary { background: var(--verm); color: #fff; }
.btn.cobalt { background: var(--cobalt); color: #fff; }
.btn.ghost { background: transparent; border-color: currentColor; }
.btn.onpass { background: #fff; color: var(--cobalt); }
.pass.bike .btn.onpass { background: var(--carbon); color: var(--signal); }
.btn.big { min-height: 60px; font-size: 18px; flex: 1; }
.btn.wide { width: 100%; }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn:disabled { opacity: .45; }
.btn:active { transform: translateY(1px); }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.stack { display: grid; gap: 10px; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--card2); display: inline-grid; place-items: center; cursor: pointer; font-size: 18px; font-weight: 800; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card + .card { margin-top: 10px; }
.notice { border-left: 6px solid var(--signal); background: var(--card); border-radius: 0 12px 12px 0; padding: 14px 16px; margin: 14px 0; }
.notice.warn { border-left-color: var(--verm); }
.notice h3 { font-size: 24px; margin-bottom: 4px; }
.notice p { margin: 4px 0 10px; }

/* exercise list */
.ex { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; }
.ex summary { list-style: none; cursor: pointer; padding: 14px 14px 14px 12px; display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; }
.ex summary::-webkit-details-marker { display: none; }
.ex .n { width: 34px; height: 34px; background: var(--verm); color: #fff; display: grid; place-items: center; font-family: var(--display); font-size: 22px; }
.ex .nm { font-weight: 800; font-size: 18px; line-height: 1.2; }
.ex .meta { font-size: 14px; color: var(--muted); margin-top: 2px; }
.ex .sr { text-align: right; font-family: var(--display); font-size: 28px; line-height: 1; white-space: nowrap; }
.ex .sr small { display: block; font: 600 11px var(--body); letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.ex .body { padding: 0 16px 16px 56px; }
.ex ol { margin: 6px 0 10px; padding-left: 18px; }
.ex li { margin-bottom: 4px; }
.tag { display: inline-block; font: 700 11px var(--body); letter-spacing: .1em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.tag.swap { border-color: var(--signal); color: var(--fg); }
.tag.iftime { border-style: dashed; }
.equip { font-size: 14px; color: var(--muted); }
.equip b { color: var(--fg); }

/* ---------- workout mode ---------- */
.wo-head { display: flex; align-items: baseline; gap: 10px; justify-content: space-between; }
.wo-head h1 { font-size: 44px; }
.progressbar { height: 8px; background: var(--card2); border-radius: 4px; overflow: hidden; margin: 10px 0 16px; }
.progressbar i { display: block; height: 100%; background: var(--signal); transition: width .3s; }
.wex { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; padding: 14px; }
.wex.current { border-color: var(--cobalt); box-shadow: 0 0 0 2px var(--cobalt) inset; }
.wex.complete { opacity: .7; }
.wex.skipped { opacity: .5; }
.wex h3 { font-family: var(--body); font-weight: 800; font-size: 20px; letter-spacing: 0; line-height: 1.2; }
.wex .target { font-size: 15px; color: var(--muted); margin: 2px 0 8px; }
.sugg { font-size: 14px; background: var(--card2); border-radius: 10px; padding: 8px 10px; margin: 8px 0; }
.sugg.up { border-left: 4px solid var(--signal); }
.sets { display: grid; gap: 8px; margin-top: 8px; }
.set { display: grid; grid-template-columns: 24px 1.25fr 1fr 52px; gap: 6px; align-items: center; }
.set .k { font-family: var(--display); font-size: 22px; color: var(--muted); text-align: center; }
.stepper { display: grid; grid-template-columns: 32px minmax(0,1fr) 32px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--paper); height: var(--tap); }
.stepper button { border: 0; background: var(--card2); font-size: 22px; font-weight: 800; cursor: pointer; }
.stepper input { width: 100%; min-width: 0; border: 0; background: transparent; text-align: center; font-size: 19px; font-weight: 800; padding: 0; letter-spacing: -.02em; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper .u { display: none; }
.setlbl { display: grid; grid-template-columns: 24px 1.25fr 1fr 52px; gap: 6px; font: 700 11px var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.setlbl span { text-align: center; }
.check { width: 52px; height: var(--tap); border-radius: 12px; border: 2px solid var(--line); background: var(--card2); font-size: 24px; font-weight: 900; cursor: pointer; color: var(--muted); }
.check.on { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.wex .tools { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.wex textarea, .field textarea { width: 100%; min-height: 64px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); padding: 10px; }

/* rest timer dock */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--carbon); color: var(--bone); border-top: 1px solid #2E3138; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
.dock .in { max-width: 640px; margin: 0 auto; }
.timer { display: flex; align-items: center; gap: 10px; }
.timer .t { font-family: var(--display); font-size: 52px; line-height: 1; min-width: 110px; font-variant-numeric: tabular-nums; }
.timer .t.go { color: var(--signal); }
.timer .lab { font: 700 11px var(--body); letter-spacing: .16em; text-transform: uppercase; opacity: .75; }
.timer .bar { height: 6px; background: #2E3138; border-radius: 3px; overflow: hidden; margin-top: 6px; }
.timer .bar i { display: block; height: 100%; background: var(--signal); }
.dock .btn { background: #2E3138; color: var(--bone); }
.dock .btn.primary { background: var(--verm); color: #fff; }

/* bike timer */
.bike-clock { text-align: center; padding: 18px 0 8px; }
.bike-clock .phase { font: 800 14px var(--body); letter-spacing: .2em; text-transform: uppercase; }
.bike-clock .t { font-family: var(--display); font-size: 120px; line-height: .9; font-variant-numeric: tabular-nums; }
.bike-clock.ph-work .phase { color: var(--vermText); }
.bike-clock.ph-easy .phase { color: var(--cobaltText); }
.rounds { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 8px 0 16px; }
.rounds i { width: 22px; height: 10px; background: var(--card2); border-radius: 3px; }
.rounds i.on { background: var(--signal); }

/* ---------- tabs ---------- */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--carbon); border-top: 1px solid #2E3138; padding-bottom: env(safe-area-inset-bottom); }
.tabs .in { max-width: 640px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.tabs a { color: #A9A398; text-decoration: none; display: grid; justify-items: center; gap: 2px; padding: 9px 0 8px; font: 700 12px var(--body); letter-spacing: .08em; text-transform: uppercase; min-height: 60px; }
.tabs a svg { width: 24px; height: 24px; }
.tabs a.on { color: var(--bone); box-shadow: inset 0 3px 0 var(--verm); }

/* ---------- plan ---------- */
.seg { display: inline-grid; grid-auto-flow: column; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--card); }
.seg button { border: 0; background: transparent; padding: 0 18px; min-height: 44px; font-weight: 800; cursor: pointer; }
.seg button.on { background: var(--fg); color: var(--bg); }
.navrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0; }
.navrow h2 { font-size: 28px; text-align: center; flex: 1; }
.day { display: grid; grid-template-columns: 58px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: start; }
.day.today .dn b { color: var(--vermText); }
.dn { text-align: center; padding-top: 4px; }
.dn b { display: block; font-family: var(--display); font-size: 34px; line-height: .9; font-weight: 400; }
.dn span { font: 700 11px var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.chips { display: grid; gap: 8px; }
.sess { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 12px; min-height: var(--tap); padding: 8px 12px; cursor: pointer; }
.sess .sw { width: 10px; align-self: stretch; border-radius: 3px; flex: none; }
.sess .t { font-weight: 800; }
.sess .s { font-size: 13px; color: var(--muted); }
.sess .st { margin-left: auto; font: 700 11px var(--body); letter-spacing: .1em; text-transform: uppercase; }
.sess.done { background: var(--card2); }
.sess.skipped .t { text-decoration: line-through; opacity: .6; }
.sess.missed { border-color: var(--verm); }
.sess.optional { border-style: dashed; }
.restday { color: var(--muted); font-size: 15px; padding: 10px 4px; display: flex; justify-content: space-between; align-items: center; }
.sw.cobalt { background: var(--cobalt); } .sw.verm { background: var(--verm); } .sw.signal { background: var(--signal); }

.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .h { font: 700 11px var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-align: center; padding: 4px 0; }
.cal button { aspect-ratio: 1 / 1.15; border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 4px; display: grid; grid-template-rows: auto 1fr; justify-items: center; cursor: pointer; min-height: 48px; }
.cal button.out { opacity: .35; }
.cal button.today { border-color: var(--verm); box-shadow: inset 0 0 0 1px var(--verm); }
.cal button b { font-size: 14px; font-weight: 800; }
.cal .dots { display: flex; gap: 3px; align-items: center; flex-wrap: wrap; justify-content: center; }
.cal .dots i { width: 9px; height: 9px; border-radius: 2px; }
.cal .dots i.cobalt { background: var(--cobalt); } .cal .dots i.verm { background: var(--verm); } .cal .dots i.signal { background: var(--signal); }
.cal .dots i.done { outline: 2px solid var(--fg); outline-offset: 1px; }
.cal .dots i.skipped { opacity: .3; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

/* ---------- progress ---------- */
.goalcard { background: var(--carbon); color: var(--bone); border-radius: var(--radius); padding: 18px; position: relative; overflow: hidden; }
.goalcard .big { font-family: var(--display); font-size: 84px; line-height: .85; color: var(--signal); }
.goalcard .big span { color: var(--bone); font-size: 34px; }
.goalcard .bar { height: 12px; border-radius: 6px; background: #2E3138; margin-top: 14px; overflow: hidden; }
.goalcard .bar i { display: block; height: 100%; background: var(--verm); }
.goalcard .ends { display: flex; justify-content: space-between; font-size: 13px; opacity: .8; margin-top: 6px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.tile b { display: block; font-family: var(--display); font-size: 34px; font-weight: 400; line-height: 1; }
.tile span { font-size: 12px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; font-weight: 700; }
.chart { width: 100%; height: auto; display: block; touch-action: pan-y; }
.chart text { fill: var(--muted); font: 11px var(--body); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.tip { font-size: 14px; min-height: 22px; margin-top: 6px; }
.ms { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ms .sq { width: 18px; height: 18px; border: 2px solid var(--line); }
.ms.hit .sq { background: var(--signal); border-color: var(--signal); }
.ms.hit b { font-weight: 800; }
.ms.next .sq { border-color: var(--verm); }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > label, .field > .lab { font-weight: 800; font-size: 15px; }
.field .hint { font-size: 13px; color: var(--muted); }
.field input[type=text], .field input[type=number], .field input[type=date], .field select, .inp {
  min-height: var(--tap); border-radius: 12px; border: 1px solid var(--line); background: var(--paper); padding: 0 12px; font-size: 18px; width: 100%; }
.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dayspick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.dayspick button, .opt { min-height: var(--tap); border-radius: 12px; border: 2px solid var(--line); background: var(--card); font-weight: 800; cursor: pointer; }
.dayspick button.on { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.dayspick.bike button.on { background: var(--signal); border-color: var(--signal); color: var(--carbon); }
.opts { display: grid; gap: 8px; }
.opt { text-align: left; padding: 12px 14px; display: block; width: 100%; }
.opt small { display: block; font-weight: 500; color: var(--muted); font-size: 14px; }
.opt.on { border-color: var(--cobalt); box-shadow: inset 0 0 0 2px var(--cobalt); }
.checklist label { display: flex; gap: 12px; align-items: center; min-height: var(--tap); padding: 6px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.checklist input { width: 24px; height: 24px; accent-color: var(--cobalt); flex: none; }
.checklist .why { margin-left: auto; font-size: 12px; color: var(--vermText); font-weight: 700; text-align: right; }

/* onboarding */
.ob-top { display: flex; gap: 6px; margin: 4px 0 18px; }
.ob-top i { flex: 1; height: 6px; border-radius: 3px; background: var(--card2); }
.ob-top i.on { background: var(--verm); }
.ob h1 { font-size: 52px; margin-bottom: 6px; }
.ob .lede { color: var(--muted); margin: 0 0 18px; }
.ob-nav { position: fixed; left: 0; right: 0; bottom: 0; background: var(--bg); border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); z-index: 20; }
.ob-nav .in { max-width: 640px; margin: 0 auto; display: flex; gap: 10px; }
.disclaimer { font-size: 13px; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; }

/* ---------- sheet ---------- */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { background: var(--paper); color: var(--fg); width: 100%; max-width: 640px; max-height: 88dvh; overflow: auto; border-radius: 20px 20px 0 0; padding: 10px 16px calc(18px + env(safe-area-inset-bottom)); animation: up .2s ease-out; }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
.sheet h2 { font-size: 34px; margin-bottom: 6px; }
.sheet .stack { margin-top: 12px; }
.alt { text-align: left; width: 100%; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 12px 14px; cursor: pointer; min-height: var(--tap); }
.alt b { display: block; }
.alt small { color: var(--muted); }
.alt.flag { border-style: dashed; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(86px + env(safe-area-inset-bottom)); background: var(--fg); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-weight: 700; z-index: 60; max-width: 92vw; text-align: center; animation: up .2s; }

.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.tbl td.r, .tbl th.r { text-align: right; font-variant-numeric: tabular-nums; }

.edit-item { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.edit-item .nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.edit-item .nums label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: grid; gap: 4px; }
.edit-item .nums input { min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); text-align: center; font-size: 17px; font-weight: 700; width: 100%; }

@media (min-width: 560px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.addlink { justify-self: start; background: none; border: 0; color: var(--muted); font-weight: 700; font-size: 14px; padding: 6px 2px; min-height: 36px; cursor: pointer; }

/* ===================== v2 ===================== */
/* motion */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes popk { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(240, 84, 63, .7); } 100% { box-shadow: 0 0 0 12px rgba(240, 84, 63, 0); } }
@keyframes slideL { from { opacity: 0; transform: translateX(40px); } }
@keyframes slideR { from { opacity: 0; transform: translateX(-40px); } }
@keyframes growW { from { width: 0; } }
@keyframes drawP { from { stroke-dashoffset: 1; } }
[data-anim] main > * { animation: rise .45s cubic-bezier(.2, .8, .2, 1) both; }
[data-anim] main > *:nth-child(2) { animation-delay: .04s; } [data-anim] main > *:nth-child(3) { animation-delay: .08s; } [data-anim] main > *:nth-child(4) { animation-delay: .12s; } [data-anim] main > *:nth-child(5) { animation-delay: .16s; } [data-anim] main > *:nth-child(n+6) { animation-delay: .2s; }
.btn, .check, .sess, .alt, .opt, .coachcard, .badge { transition: transform .12s ease, background-color .2s, box-shadow .2s; }
.btn:active, .sess:active, .alt:active, .opt:active { transform: scale(.97); }
.check.pop { animation: popk .35s ease; }
.grow { animation: growW 1.1s cubic-bezier(.2, .8, .2, 1) both; width: var(--w) !important; }
.chart path.draw { stroke-dasharray: 1; stroke-dashoffset: 0; animation: drawP 1.2s ease-out both; }
.ring-fill { transition: stroke-dashoffset 1.3s cubic-bezier(.2, .8, .2, 1); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }

/* hello + rings */
.hello { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; }
.hello-l { flex: 1; min-width: 0; }
.hello-name { font-size: 50px; margin: 2px 0 8px; }
.ringbtn { background: none; border: 0; padding: 0; cursor: pointer; flex: none; }
.rings { display: block; }
.ringkey { display: grid; gap: 4px; }
.ringkey div { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.ringkey i { width: 10px; height: 10px; border-radius: 50%; }
.ringkey b { font-size: 16px; min-width: 34px; }
.ringkey span { color: var(--muted); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 11px; }
.streak { margin-top: 8px; display: inline-block; font: 800 12px var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--carbon); background: var(--signal); padding: 4px 10px; border-radius: 999px; }

/* coach carousel */
.coach { display: grid; grid-auto-flow: column; grid-auto-columns: 88%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px 6px; padding: 2px 16px 4px; scrollbar-width: none; }
.coach::-webkit-scrollbar { display: none; }
.coachcard { scroll-snap-align: start; display: grid; grid-template-columns: 40px 1fr; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; position: relative; overflow: hidden; }
.coachcard::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3px; }
.coachcard.tone-signal::after { background: var(--signal); } .coachcard.tone-verm::after { background: var(--verm); } .coachcard.tone-cobalt::after { background: var(--cobalt); }
.coachcard .ci { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 900; font-size: 18px; background: var(--card2); }
.tone-signal .ci { color: var(--signal); } .tone-verm .ci { color: var(--vermText); } .tone-cobalt .ci { color: var(--cobaltText); }
.coachcard .ct { font-weight: 800; font-size: 17px; line-height: 1.2; }
.coachcard p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.dots { display: flex; justify-content: center; gap: 6px; margin: 4px 0 16px; }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: width .2s, background .2s; }
.dots i.on { width: 18px; background: var(--fg); }

.notice.live h3 { display: flex; align-items: center; gap: 10px; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--verm); animation: pulse 1.4s infinite; }

/* body map */
.body { width: 100%; max-width: 360px; display: block; margin: 0 auto; }
.body text { fill: var(--muted); font: 700 9px var(--body); letter-spacing: .1em; text-transform: uppercase; }
.body rect[data-g] { transition: opacity .4s; }

/* fuel */
.fuel { padding: 8px 0 12px; border-bottom: 1px solid var(--line); }
.fuel:last-of-type { border-bottom: 0; }
.fl { display: flex; justify-content: space-between; align-items: baseline; }
.fl b { font-size: 17px; } .fl span { color: var(--muted); font-size: 14px; }
.fbar { height: 8px; border-radius: 4px; background: var(--card2); overflow: hidden; margin: 8px 0; }
.fbar i { display: block; height: 100%; background: var(--cobalt); border-radius: 4px; transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.fbtns { display: flex; gap: 8px; }
.fbtns .btn { flex: 1; }
.fbtns .btn.ghost { flex: 0 0 48px; padding: 0; }

.recapteaser { display: grid; gap: 4px; width: 100%; text-align: left; margin-top: 22px; padding: 16px; border-radius: var(--radius); border: 0; cursor: pointer; background: var(--cobalt); color: #fff; position: relative; overflow: hidden; }
.recapteaser .eyebrow { color: rgba(255, 255, 255, .8); }
.recapteaser b { font-size: 18px; }
.recapteaser .go { font-weight: 800; font-size: 14px; opacity: .9; }

/* ---------- player ---------- */
.player { min-height: 100dvh; background: var(--bg); }
.ptop { position: sticky; top: 0; z-index: 20; background: var(--carbon); color: var(--bone); display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 10px 8px; }
.pclose { width: 44px; height: 44px; border-radius: 12px; border: 0; background: #24272E; color: var(--bone); font-size: 22px; font-weight: 800; cursor: pointer; }
.ptitle { flex: 1; text-align: center; display: grid; line-height: 1.1; }
.ptitle b { font-family: var(--display); font-weight: 400; font-size: 24px; letter-spacing: .04em; }
.ptitle span { font-size: 13px; opacity: .75; font-weight: 700; }
.segs { position: sticky; top: calc(60px + env(safe-area-inset-top)); z-index: 19; display: flex; gap: 4px; padding: 8px 12px 10px; background: var(--carbon); }
.seg-i { flex: 1; height: 6px; border: 0; padding: 0; border-radius: 3px; background: #2E3138; overflow: hidden; cursor: pointer; position: relative; }
.seg-i i { position: absolute; inset: 0 auto 0 0; background: var(--signal); transition: width .3s; }
.seg-i.cur { outline: 2px solid var(--bone); outline-offset: 1px; }
.pmain { padding-top: 18px; padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
.pmain.slide-l .pcard { animation: slideL .28s ease both; } .pmain.slide-r .pcard { animation: slideR .28s ease both; }
.pname { font-size: clamp(46px, 13vw, 66px); margin: 6px 0 6px; }
.ptarget { color: var(--muted); font-size: 15px; }
.pequip { color: var(--muted); font-size: 14px; margin: 2px 0 12px; }
.pnav .pfin { font-size: 14px; padding: 0 14px; }
.ptarget b { color: var(--fg); font-family: var(--display); font-weight: 400; font-size: 26px; letter-spacing: .02em; }
.ptarget span { opacity: .5; }
.pcard .sugg { font-size: 15px; }
.warm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--line); }
.warm .eyebrow { width: 100%; color: var(--muted); }
.chip { font-weight: 800; background: var(--card2); border-radius: 999px; padding: 6px 12px; font-variant-numeric: tabular-nums; }
.set { transition: opacity .2s; }
.set.is-done .stepper { opacity: .55; }
.pcard .tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--carbon); border-top: 1px solid #2E3138; max-width: 100%; }
.pnav .btn { background: #24272E; color: var(--bone); min-width: 56px; }
.pnav .btn.primary { background: var(--verm); color: #fff; }
.pnav .pnext { flex: 1; justify-content: space-between; text-align: left; padding: 0 18px; }
.pnext span { display: grid; line-height: 1.15; overflow: hidden; }
.pnext small { font: 700 10px var(--body); letter-spacing: .16em; text-transform: uppercase; opacity: .65; }

/* rest overlay */
.restov { position: fixed; inset: 0; z-index: 40; background: rgba(17, 19, 22, .97); color: var(--bone); display: grid; place-items: center; animation: fade .2s; padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom); }
.restov::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(242, 236, 225, .06) 1px, transparent 1.3px); background-size: 7px 7px; pointer-events: none; }
.rest-in { position: relative; width: 100%; max-width: 420px; text-align: center; }
.restov .lab { font: 800 12px var(--body); letter-spacing: .22em; text-transform: uppercase; opacity: .7; }
.ringwrap { position: relative; width: min(72vw, 300px); margin: 14px auto 18px; }
.bigring { width: 100%; height: auto; display: block; }
#bigRingFill, #bphase { transition: stroke-dashoffset .25s linear, stroke .3s; }
.rt { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: clamp(72px, 22vw, 104px); }
.rt.go { color: var(--signal); }
.restov.done #bigRingFill { stroke: var(--verm); }
.upnext { background: #1D2025; border: 1px solid #2E3138; border-radius: 14px; padding: 12px 14px; margin-bottom: 16px; display: grid; gap: 2px; }
.upnext b { font-size: 20px; }
.restov .btn { background: #24272E; color: var(--bone); }
.restov .btn.primary { background: var(--verm); color: #fff; width: 100%; }
.restmin { margin-top: 14px; background: none; border: 0; color: var(--bone); opacity: .7; font-weight: 700; text-decoration: underline; cursor: pointer; min-height: 44px; }
.restpill { position: fixed; right: 14px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 30; border: 0; border-radius: 999px; padding: 10px 18px; background: var(--signal); color: var(--carbon); display: flex; gap: 8px; align-items: baseline; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); cursor: pointer; }
.restpill .lab { font: 800 11px var(--body); letter-spacing: .14em; text-transform: uppercase; }
.restpill b { font-family: var(--display); font-size: 28px; font-weight: 400; }
.restpill.go { background: var(--verm); color: #fff; }

.bikecard { text-align: center; }
.ringwrap.bike .bike-clock { position: absolute; inset: 0; display: grid; place-content: center; padding: 0; }
.ringwrap.bike .bike-clock .t { font-size: clamp(64px, 19vw, 92px); }
.ringwrap.bike #bphase { stroke: var(--signal); }

/* recap */
.recap { background: var(--carbon); color: var(--bone); border-radius: 18px; padding: 22px 20px; position: relative; overflow: hidden; }
.recap::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(242, 236, 225, .07) 1px, transparent 1.3px); background-size: 6px 6px; pointer-events: none; }
.recap .wm { position: absolute; right: -30px; top: auto; bottom: -30px; width: 200px; color: var(--bone); opacity: .07; pointer-events: none; }
.recap-t { font-size: clamp(64px, 18vw, 96px); margin: 6px 0 14px; position: relative; }
.recap-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; position: relative; }
.recap-stats.six { row-gap: 16px; }
.recap-stats b { display: block; font-family: var(--display); font-weight: 400; font-size: 46px; line-height: 1; color: var(--signal); }
.recap-stats span { font: 700 11px var(--body); letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.recap-line { position: relative; margin: 14px 0 0; font-weight: 600; opacity: .9; }
.prrow { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; animation: rise .4s both; animation-delay: calc(var(--i, 0) * .08s + .2s); }
.prb { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--signal); color: var(--carbon); display: grid; place-items: center; font-family: var(--display); font-size: 22px; }

/* badges */
.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.badge { text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 8px; opacity: .55; }
.badge.on { opacity: 1; }
.badge .bh { width: 58px; height: 58px; margin: 0 auto 8px; display: grid; place-items: center; clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0 50%); background: var(--card2); }
.badge.on .bh { background: linear-gradient(135deg, var(--verm), var(--cobalt)); }
.badge .bh span { font-family: var(--display); font-size: 22px; color: var(--muted); }
.badge.on .bh span { color: #fff; }
.badge b { display: block; font-size: 13px; line-height: 1.2; }
.badge small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.25; }

.quicklinks { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.prboard .pb { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.prboard .pb:last-child { border-bottom: 0; }
.prboard .rank { font-family: var(--display); font-size: 24px; color: var(--vermText); }
.prboard b { display: block; } .prboard small { color: var(--muted); font-size: 13px; }
.prboard .est { font-family: var(--display); font-size: 30px; text-align: right; line-height: 1; }
.prboard .est small { display: block; font: 700 10px var(--body); letter-spacing: .1em; text-transform: uppercase; }

/* photos */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.compare.one { grid-template-columns: 1fr; max-width: 260px; }
.compare figure { margin: 0; }
.compare img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; display: block; background: var(--card2); }
.compare figcaption { font-size: 13px; color: var(--muted); margin-top: 4px; font-weight: 700; }
.thumbs { display: flex; gap: 6px; overflow-x: auto; margin-top: 10px; }
.thumbs button { border: 0; padding: 0; background: none; cursor: pointer; flex: none; }
.thumbs img { width: 56px; height: 72px; object-fit: cover; border-radius: 8px; display: block; }
@media (prefers-reduced-motion: reduce) { [data-anim] main > * { animation: none; } .ring-fill { transition: none; } }

/* ---------- Sarge: the AI coach ---------- */
.sarge-fab { position: fixed; right: 14px; bottom: calc(74px + env(safe-area-inset-bottom)); z-index: 26; width: 64px; height: 64px; border-radius: 50%; padding: 0; border: 3px solid var(--carbon); background: var(--cobalt); overflow: hidden; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.45), 0 0 0 2px var(--bone); animation: fabIn .5s cubic-bezier(.2,1.4,.4,1); }
.sarge-fab svg { width: 100%; height: auto; display: block; transform: translateY(-2px) scale(1.06); }
.sarge-fab:active { transform: scale(.94); }
.sarge-fab.in-player { bottom: calc(96px + env(safe-area-inset-bottom)); }
@keyframes fabIn { from { transform: scale(.3) rotate(-20deg); opacity: 0; } }

.sarge-ci { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: start; margin-top: 12px; border-left: 4px solid var(--cobalt); }
.sarge-ci.done { border-left-color: var(--signal); }
.sarge-ci p { margin: 4px 0 10px; }
.ci-av { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: var(--cobalt); }
.ci-av svg { width: 100%; height: auto; display: block; }

.huddle { position: fixed; inset: 0; z-index: 60; }
.hud-scrim { position: absolute; inset: 0; background: rgba(10,11,13,.6); opacity: 0; transition: opacity .25s; }
.huddle.in .hud-scrim { opacity: 1; }
.hud { position: absolute; left: 0; right: 0; bottom: 0; max-width: 640px; margin: 0 auto; max-height: 92dvh; display: flex; flex-direction: column; background: var(--paper); color: var(--fg); border-radius: 24px 24px 0 0; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); transform: translateY(105%); transition: transform .38s cubic-bezier(.2,1.25,.35,1); box-shadow: 0 -10px 40px rgba(0,0,0,.5); border-top: 4px solid var(--verm); }
.huddle.in .hud { transform: none; }
.hud-x { position: absolute; top: 8px; right: 10px; width: 44px; height: 44px; border: 0; background: transparent; color: var(--muted); font-size: 30px; cursor: pointer; }
.hud-top { display: flex; gap: 14px; align-items: center; }
.hud-meta b { display: block; font: 400 40px/1 var(--display); letter-spacing: .02em; }
.hud-av { position: relative; width: 150px; flex: none; margin-top: -60px; filter: drop-shadow(0 8px 16px rgba(0,0,0,.4)); }
.hud-av svg { display: block; width: 150px; height: auto; }
.hud-av .av-head { transform-origin: 100px 140px; transform-box: view-box; }
.hud-av.state-idle .av-head { animation: breathe 3.2s ease-in-out infinite; }
.hud-av.state-talking .av-head { animation: talkbob .5s ease-in-out infinite alternate; }
.hud-av.state-listening .av-head { transform: rotate(-4deg) translateY(2px); transition: transform .25s; }
.hud-av.state-listening .av-bg { fill: var(--verm); transition: fill .2s; }
.hud-av.state-thinking .pupil { transform: translate(3px,-2px); transition: transform .2s; }
.hud-av.state-thinking .brows { transform: translateY(-3px); transition: transform .2s; }
.hud-av .eyes { transform-origin: 100px 95px; transform-box: view-box; transition: transform .08s; }
.hud-av .eyes.blink { transform: scaleY(.1); }
.hud-dots { position: absolute; right: -4px; top: 18px; display: none; gap: 4px; background: var(--bone); border: 2px solid var(--carbon); border-radius: 14px; padding: 6px 8px; }
.hud-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--carbon); animation: dot 1s infinite; }
.hud-dots i:nth-child(2) { animation-delay: .15s; } .hud-dots i:nth-child(3) { animation-delay: .3s; }
.state-thinking .hud-dots { display: flex; }
@keyframes breathe { 50% { transform: translateY(-2px) scale(1.01); } }
@keyframes talkbob { from { transform: rotate(-1.5deg); } to { transform: rotate(1.5deg) translateY(-1px); } }
@keyframes dot { 50% { transform: translateY(-4px); opacity: .5; } }
.hud-log { overflow-y: auto; flex: 1 1 auto; min-height: 60px; max-height: 34dvh; margin: 12px 0 8px; display: flex; flex-direction: column; gap: 8px; }
.hl { margin: 0; padding: 10px 14px; border-radius: 16px; max-width: 88%; line-height: 1.4; }
.hl.sarge { background: var(--card2); border-top-left-radius: 4px; font-weight: 600; }
.hl.you { align-self: flex-end; background: var(--cobalt); color: #fff; border-top-right-radius: 4px; }
.hl.sys { align-self: center; background: transparent; color: var(--muted); font-size: 13px; font-weight: 700; padding: 2px 8px; }
.hl.sys::before { content: '✓ '; color: var(--signal); }
.hl.err { align-self: center; color: var(--vermText); font-size: 14px; font-weight: 700; }
.hud-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; }
.hud-card ol { margin: 6px 0; padding-left: 20px; } .hud-card li { margin-bottom: 4px; }
.hud-ctl { display: grid; justify-items: center; gap: 6px; margin: 6px 0 10px; }
.hud-mic { position: relative; width: 84px; height: 84px; border-radius: 50%; border: 0; background: var(--verm); color: #fff; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; box-shadow: 0 6px 18px rgba(240,84,63,.45); transition: transform .12s; }
.hud-mic svg { width: 36px; height: 36px; pointer-events: none; }
.hud-mic.on { transform: scale(1.12); background: #D63F2B; }
.hud-mic .ring { position: absolute; inset: -8px; border-radius: 50%; border: 3px solid var(--verm); opacity: 0; pointer-events: none; }
.hud-mic.on .ring { animation: ping 1s ease-out infinite; }
@keyframes ping { from { transform: scale(.9); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }
.hud-hint { font-weight: 800; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); min-height: 18px; text-align: center; }
.hud-hint.warn { color: var(--vermText); text-transform: none; letter-spacing: 0; }
.hud-type { display: flex; gap: 8px; }
.hud-type input { flex: 1; min-height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--fg); padding: 0 16px; font: inherit; }
.hud-setup { padding: 8px 0 4px; }

.look-prev { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; margin-bottom: 14px; }
.look-prev svg { width: 120px; height: auto; display: block; }
.seg5 button { padding: 0 13px; }
.seg.wrap { display: flex; flex-wrap: wrap; border-radius: 14px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--line); cursor: pointer; }
.swatch.on { border-color: var(--fg); box-shadow: 0 0 0 3px var(--cobalt); }
.gearlist { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.gearlist .chip { opacity: .55; font-size: 13px; } .gearlist .chip.on { opacity: 1; background: var(--cobalt); color: #fff; }
.memlist { display: grid; gap: 4px; margin: 8px 0 12px; }
.mem { display: flex; gap: 8px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 6px 0; }
@media (prefers-reduced-motion: reduce) { .hud, .sarge-fab { transition: none; animation: none; } .hud-av .av-head { animation: none !important; } }

.photo-look { margin: 4px 0 16px; padding-bottom: 14px; border-bottom: 1px dashed var(--line); }
.photo-look p { margin: 8px 0 0; }

/* Painted Sarge (art pack) */
.sarge-art { position: relative; line-height: 0; background: #16181C; }
.sarge-art img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
.sarge-art .a-talk { position: absolute; inset: 0; opacity: 0; }
.sarge-art.open .a-talk { opacity: 1; }
.sarge-art.head img { width: 100%; height: 100%; object-fit: cover; }
.sarge-fab .sarge-art, .ci-av .sarge-art { width: 100%; height: 100%; }
.hud-av .sarge-art { width: 150px; height: 196px; overflow: hidden; border-radius: 20px; border: 3px solid var(--carbon); box-shadow: 0 0 0 2px var(--cobalt); }
.hud-av .sarge-art img { height: 100%; object-fit: cover; object-position: 50% 0; }
.hud-av.state-idle .sarge-art .a-base { animation: artBreathe 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
.hud-av.state-talking .sarge-art { animation: talkbob .5s ease-in-out infinite alternate; }
.hud-av.state-listening .sarge-art { box-shadow: 0 0 0 3px var(--verm); }
@keyframes artBreathe { 50% { transform: scale(1.012); } }
.look-prev .sarge-art { width: 120px; border-radius: 14px; overflow: hidden; }
.sarge-pose { display: flex; justify-content: center; margin: 12px 0 0; }
.sarge-pose .sarge-art { width: min(190px, 52vw); border-radius: 18px; overflow: hidden; }
.pass.rest .sarge-pose .sarge-art { width: 120px; }
.art-toggle { display: flex; gap: 10px; align-items: flex-start; padding: 12px; margin-bottom: 12px; border: 1px dashed var(--line, rgba(242,236,225,.25)); border-radius: 12px; cursor: pointer; }
.art-toggle input { margin-top: 4px; accent-color: var(--cobalt); width: 18px; height: 18px; }
@media (prefers-reduced-motion: reduce) { .hud-av .sarge-art, .hud-av .sarge-art .a-base { animation: none !important; } }
details.adv { margin-top: 14px; border-top: 1px dashed var(--line, rgba(242,236,225,.2)); padding-top: 10px; }
details.adv summary { cursor: pointer; color: var(--muted, #9a978f); }

/* ---- v6 live video Sarge (FaceTime-style) ---- */
.hud-call { position: relative; width: 100%; aspect-ratio: 1 / 1; max-height: 52dvh; margin: 6px auto 10px; border-radius: 22px; overflow: hidden; background: var(--carbon); border: 3px solid var(--carbon); box-shadow: 0 0 0 2px var(--cobalt), 0 12px 30px rgba(0,0,0,.45); }
.hud-call video, .hud-call .call-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hud-call video { opacity: 0; transition: opacity .4s; }
.hud-call[data-state="live"] video { opacity: 1; }
.hud-call[data-state="connecting"] .call-poster { animation: callPulse 1.6s ease-in-out infinite alternate; }
@keyframes callPulse { from { filter: brightness(.7); } to { filter: brightness(.95); } }
.call-bar { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; background: rgba(23,25,29,.72); color: var(--bone, #F2ECE1); font-size: 13px; backdrop-filter: blur(6px); }
.call-bar b { font-family: 'Bebas Neue', sans-serif; letter-spacing: .06em; font-size: 17px; }
.call-status { margin-left: auto; opacity: .85; }
.call-dot { width: 9px; height: 9px; border-radius: 50%; background: #E2E84A; }
.hud-call[data-state="live"] .call-dot { background: #3ddc84; box-shadow: 0 0 0 4px rgba(61,220,132,.25); }
.hud-call[data-state="failed"] .call-dot, .hud-call[data-state="ended"] .call-dot { background: var(--verm); }
.hud-top.is-call .hud-av { display: none; }
.hud-top.is-call { margin-top: -2px; }
.hud:has(.hud-call[data-state="failed"]) .hud-call { display: none; }
.hud:has(.hud-call[data-state="failed"]) .hud-top.is-call .hud-av { display: block; }
.hud-call:has(+ .hud-top) ~ .hud-log { max-height: 22dvh; }
.hud-call .call-poster { object-fit: cover; object-position: 50% 0; transform: scale(2.1); transform-origin: 50% 4%; }
