/* Fenix Studio: brand system from the Fenix Auto logo (charcoal, chrome, one gold accent). */
:root {
  --bg: #0E0E10;
  --surface: #17171A;
  --raised: #1F1F23;
  --track: #26262B;
  --line: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.1);
  --text: #F2F2F3;
  --text-2: #A1A1A8;
  --text-3: #8E8E96;
  --gold: #E9B949;
  --gold-hover: #F3CF77;
  --gold-ink: #141416;
  --gold-tint: rgba(233, 185, 73, 0.12);
  --gold-panel: #1A1810;
  --ok: #5BC88A;
  --ok-text: #6FD49A;
  --ok-tint: rgba(91, 200, 138, 0.12);
  --err: #F26B5B;
  --err-text: #F58A7D;
  --err-tint: rgba(242, 107, 91, 0.12);
  --warn-text: #F0C66E;
  --sans: 'Geist', 'Noto Sans Georgian', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.5, 1);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
  overscroll-behavior-y: none;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hover); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.noscript { padding: 24px; color: var(--text-2); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- layout ---------- */
.screen { max-width: 520px; margin: 0 auto; padding: 0 20px calc(116px + var(--safe-bottom)); }
.screen.has-footer { padding-bottom: calc(150px + var(--safe-bottom)); }
.stack { display: flex; flex-direction: column; }
.gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }

.brandbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 18px; }
.logo { height: 38px; width: 124px; object-fit: contain; mix-blend-mode: screen; margin-left: -4px; }
.swoosh { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.swoosh span { display: block; border-radius: 1px; }
.swoosh span:first-child { height: 2px; background: var(--gold); }
.swoosh span:last-child { height: 1px; width: 62%; margin-left: 12%; background: rgba(233, 185, 73, 0.55); }

.pagehead { padding-top: 26px; display: flex; flex-direction: column; gap: 6px; }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--gold); text-transform: uppercase; }
.h1 { margin: 0; font-size: 30px; line-height: 32px; font-weight: 700; letter-spacing: -0.03em; }
.lede { margin: 2px 0 0; font-size: 14px; line-height: 20px; color: var(--text-2); max-width: 34ch; }
.label { margin: 0; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.14em; color: var(--text-3); text-transform: uppercase; }
.mono { font-family: var(--mono); }
.muted { color: var(--text-2); } .faint { color: var(--text-3); }
.small { font-size: 13px; line-height: 18px; } .tiny { font-size: 12px; line-height: 16px; }

.topbar { height: 56px; display: grid; grid-template-columns: 80px 1fr 80px; align-items: center; }
.topbar h1 { margin: 0; text-align: center; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.topbar .side { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--text-3); text-align: right; }
.backlink { display: inline-flex; align-items: center; gap: 4px; height: 44px; font-size: 16px; font-weight: 500; }

/* ---------- Resolve status pill (Apple-style: sentence case, glyph, material, popover) ---------- */
.status { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 6px; border: 0; border-radius: 16px;
  background: rgba(255, 255, 255, 0.07); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.2), 0 1px 3px rgba(0, 0, 0, 0.35);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', var(--sans); font-size: 13px; line-height: 18px; letter-spacing: -0.003em;
  color: var(--text); white-space: nowrap; transition: transform 100ms ease-out, background-color 120ms ease-out; }
.status:active { transform: scale(0.96); background: rgba(255, 255, 255, 0.12); }
.status[aria-expanded="true"] { background: rgba(255, 255, 255, 0.13); }
.status .g { width: 20px; height: 20px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.status .name { color: var(--text-2); font-weight: 500; }
.status .word { font-weight: 600; }
.status.ok .g { background: rgba(91, 200, 138, 0.18); color: #6FD49A; } .status.ok .word { color: #6FD49A; }
.status.busy .g { background: rgba(233, 185, 73, 0.18); color: var(--gold); } .status.busy .word { color: var(--gold); }
.status.err .g { background: rgba(242, 107, 91, 0.2); color: var(--err-text); } .status.err .word { color: var(--err-text); }
.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.popover { position: fixed; z-index: 50; width: 268px; padding: 14px; border-radius: 18px; transform-origin: top right;
  background: rgba(32, 32, 36, 0.86); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.2), 0 0 0 0.5px rgba(255, 255, 255, 0.08), 0 18px 48px -12px rgba(0, 0, 0, 0.75);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', var(--sans);
  animation: materialize 340ms cubic-bezier(0.32, 0.72, 0, 1) both; }
.popover.closing { animation: dematerialize 200ms cubic-bezier(0.32, 0, 0.67, 0) both; }
@keyframes materialize { from { opacity: 0; transform: scale(0.82); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes dematerialize { from { opacity: 1; transform: none; filter: none; } to { opacity: 0; transform: scale(0.82); filter: blur(8px); } }
.popover .head { display: flex; align-items: center; gap: 10px; }
.popover .head .g { width: 28px; height: 28px; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.popover .title { font-size: 15px; line-height: 20px; font-weight: 600; letter-spacing: -0.01em; }
.popover .state { font-size: 13px; line-height: 18px; font-weight: 600; }
.popover p { margin: 10px 0 12px; font-size: 13px; line-height: 18px; color: #C7C7CC; }
.popover .link { display: flex; align-items: center; justify-content: space-between; height: 44px; margin: 0 -14px -14px; padding: 0 14px;
  border-top: 0.5px solid rgba(255, 255, 255, 0.12); border-radius: 0 0 18px 18px; color: var(--text); font-size: 15px; }
.popover .link:active { background: rgba(255, 255, 255, 0.08); }
.popover.ok .g { background: rgba(91, 200, 138, 0.18); color: #6FD49A; } .popover.ok .state { color: #6FD49A; }
.popover.busy .g { background: rgba(233, 185, 73, 0.18); color: var(--gold); } .popover.busy .state { color: var(--gold); }
.popover.err .g { background: rgba(242, 107, 91, 0.2); color: var(--err-text); } .popover.err .state { color: var(--err-text); }

/* ---------- status chip (legacy) ---------- */
.chip { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--text-2); white-space: nowrap; }
.dot { width: 7px; height: 7px; border-radius: 4px; background: var(--text-3); }
.dot.ok { background: var(--ok); } .dot.err { background: var(--err); } .dot.busy { background: var(--gold); }
.breathe { animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.75); } }

/* ---------- cards ---------- */
.card { background: var(--surface); border-radius: 28px; border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 24px 40px -24px rgba(0, 0, 0, 0.6); padding: 20px; }
.card.gold { background: var(--gold-panel); border: 1.5px solid var(--gold); box-shadow: inset 0 1px 0 rgba(233, 185, 73, 0.15); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 8px; align-items: end; }
.hero-title { font-size: 26px; line-height: 28px; font-weight: 700; letter-spacing: -0.03em; }
.gauge-wrap { display: flex; flex-direction: column; align-items: center; }
.gauge-num { display: flex; align-items: baseline; gap: 2px; margin-top: 2px; font-family: var(--mono); }
.gauge-num b { font-size: 28px; line-height: 30px; font-weight: 600; letter-spacing: -0.03em; }
.gauge-num span { font-size: 13px; color: var(--text-2); }
.needle { transform-box: view-box; transform-origin: 75px 80px; animation: sweep 1.2s var(--ease-out) both; }
@keyframes sweep { from { transform: rotate(var(--from, 0deg)); } to { transform: none; } }

.segments { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
.seg { height: 4px; border-radius: 2px; background: var(--track); position: relative; overflow: hidden; }
.seg.done { background: var(--gold); }
.seg .fill { position: absolute; inset: 0 auto 0 0; background: var(--gold); transition: width 600ms var(--ease-out); }
.seg .glint { position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  background-size: 200% 100%; animation: glint 1.6s linear infinite; }
@keyframes glint { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.steprow { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.steprow strong { font-size: 15px; line-height: 20px; font-weight: 600; }

/* ---------- buttons ---------- */
.btn { height: 46px; border-radius: 14px; border: 1px solid var(--line); background: var(--raised); color: var(--text);
  font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 16px; transition: transform 220ms var(--ease-out), background-color 180ms ease, opacity 180ms ease; }
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.45; cursor: default; transform: none; }
.btn.gold { height: 54px; border: 0; border-radius: 16px; background: var(--gold); color: var(--gold-ink); font-size: 17px;
  font-weight: 700; letter-spacing: -0.01em; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35); width: 100%; }
.btn.gold:hover { background: var(--gold-hover); color: var(--gold-ink); }
.btn.danger { background: transparent; border-color: rgba(242, 107, 91, 0.35); color: var(--err-text); }
.btn.small { height: 34px; padding: 0 12px; border-radius: 10px; font-size: 13px; }
.btn.tint { background: var(--gold-tint); border: 0; color: var(--gold); }
.btn-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px; }
.btn-row.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- lists ---------- */
.rule { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 14px; padding: 8px 0; border-radius: 12px; color: var(--text); }
a.row:active { background: var(--raised); }
.row-main { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.row-title { font-size: 16px; line-height: 21px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { font-family: var(--mono); font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.02em; }
.row-error { font-size: 13px; line-height: 17px; color: var(--err-text); }
.thumb { width: 36px; height: 62px; border-radius: 9px; background: var(--raised); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.err { background: rgba(242, 107, 91, 0.1); border-color: rgba(242, 107, 91, 0.25); }
.pill { padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.gold { background: var(--gold-tint); color: var(--gold); }
.pill.ok { background: var(--ok-tint); color: var(--ok-text); }
.pill.err { background: var(--err-tint); color: var(--err-text); }
.pill.neutral { background: rgba(255, 255, 255, 0.06); color: var(--text-2); }
.divided > * { border-bottom: 1px solid var(--line); }
.svc { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.svc-name { flex: 1; font-size: 15px; font-weight: 500; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.svc-detail { font-family: var(--mono); font-size: 11px; color: var(--text-2); text-align: right; max-width: 52%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: uppercase; }
.svc-detail.err { color: var(--err-text); } .svc-detail.warn { color: var(--gold); }

.empty { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.empty-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.empty-text strong { font-size: 15px; line-height: 20px; font-weight: 500; }

.banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; background: var(--gold-panel);
  border: 1px solid rgba(233, 185, 73, 0.45); color: var(--text); }
.banner strong { flex: 1; font-size: 15px; font-weight: 600; }
.banner.neutral { background: var(--raised); border-color: var(--line-strong); flex-direction: column; align-items: flex-start; gap: 2px; }
.note { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 18px; color: var(--warn-text); }

/* ---------- dock ---------- */
.dock { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + var(--safe-bottom));
  width: min(488px, calc(100% - 32px)); height: 64px; padding: 6px; border-radius: 22px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; z-index: 20;
  background: rgba(23, 23, 26, 0.74); backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.08); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 20px 40px -12px rgba(0, 0, 0, 0.7); }
.dock a { border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--text-2); font-size: 11px; font-weight: 600; transition: transform 220ms var(--ease-out); position: relative; }
.dock a:active { transform: scale(0.96); }
.dock a[aria-current="page"] { background: rgba(233, 185, 73, 0.14); color: var(--gold); }
.dock .badge { position: absolute; top: 4px; right: calc(50% - 22px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--gold); color: var(--gold-ink); font-family: var(--mono); font-size: 10px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; }

/* ---------- footer CTA ---------- */
.footer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 14px 20px calc(20px + var(--safe-bottom));
  background: rgba(14, 14, 16, 0.84); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-top: 1px solid var(--line); }
.footer-inner { max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.footer-note { text-align: center; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--text-3); text-transform: uppercase; }

/* ---------- forms ---------- */
.field-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--text-3); text-transform: uppercase; }
.input, .textarea { width: 100%; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); }
.input { height: 48px; padding: 0 14px; font-size: 17px; }
.textarea { padding: 12px 14px; font-size: 16px; line-height: 21px; resize: none; }
.input::placeholder, .textarea::placeholder { color: #75757D; }
.input.invalid { border-color: rgba(242, 107, 91, 0.6); }
.helper { display: flex; justify-content: space-between; font-size: 12px; line-height: 16px; color: var(--text-3); }
.helper.err { color: var(--err-text); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; border-bottom: 1px solid var(--line); }
.toggle-text { display: flex; flex-direction: column; gap: 2px; }
.toggle-text strong { font-size: 16px; font-weight: 500; }
.switch { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; border-radius: 15px; background: #2A2A2F;
  position: relative; margin: 0; cursor: pointer; transition: background-color 220ms ease; flex-shrink: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 12px; background: var(--text);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); transition: transform 320ms var(--ease-spring); }
.switch:checked { background: var(--gold); }
.switch:checked::after { transform: translateX(20px); background: var(--gold-ink); }

/* ---------- new edit ---------- */
.clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.clip { height: 128px; border-radius: 14px; background: var(--raised); border: 1px solid var(--line); position: relative; overflow: hidden; padding: 0; }
.clip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.clip .dur { position: absolute; left: 7px; bottom: 7px; font-family: var(--mono); font-size: 10px; background: rgba(14, 14, 16, 0.72); padding: 2px 5px; border-radius: 5px; }
.clip .tick { position: absolute; top: 7px; right: 7px; width: 22px; height: 22px; border-radius: 11px; border: 1.5px solid rgba(255, 255, 255, 0.7);
  background: rgba(14, 14, 16, 0.4); display: flex; align-items: center; justify-content: center; }
.clip[aria-pressed="true"] { border: 1.5px solid var(--gold); }
.clip[aria-pressed="true"] .tick { background: var(--gold); border-color: var(--gold); }
.clip[aria-pressed="false"] img { opacity: 0.45; }
.styles-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.style-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; border-radius: 18px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); transition: transform 220ms var(--ease-out); }
.style-card:active { transform: scale(0.98); }
.style-card.selected { grid-column: span 2; background: var(--gold-panel); border: 1.5px solid var(--gold); box-shadow: inset 0 1px 0 rgba(233, 185, 73, 0.15); }
.style-card .top { display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 8px; }
.style-card .name { font-size: 15px; line-height: 20px; font-weight: 600; letter-spacing: -0.01em; }
.style-card .frame { font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; color: var(--text-3); }
.style-card.selected .frame { color: var(--gold); }
.style-card .desc { font-size: 13px; line-height: 18px; color: var(--text-2); }

/* ---------- styles screen ---------- */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) 76px; gap: 16px; align-items: center; }
.frame-box { height: 110px; border-radius: 16px; background: var(--bg); border: 1px solid rgba(233, 185, 73, 0.25);
  display: flex; align-items: center; justify-content: center; }
.glyph { border: 2px solid var(--gold); border-radius: 6px; }
.glyph.v-lg { width: 40px; height: 72px; } .glyph.h-lg { width: 56px; height: 32px; }
.glyph.v-sm { width: 18px; height: 32px; } .glyph.h-sm { width: 32px; height: 18px; }
.style-row { display: flex; align-items: center; gap: 14px; padding: 16px 0; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; text-align: left; width: 100%; color: var(--text); }
.style-row .mini { width: 44px; height: 56px; flex-shrink: 0; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; }

/* ---------- setup ---------- */
.ready { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 16px; align-items: center; }
.ring-wrap { position: relative; width: 84px; height: 84px; }
.ring-wrap span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 18px; font-weight: 600; }
.ring { animation: ring 1.1s var(--ease-out) both; }
@keyframes ring { from { stroke-dashoffset: 150.8; } }

/* ---------- review ---------- */
.review-top { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 18px; margin-top: 6px; }
.phone { height: 234px; border-radius: 16px; background: var(--raised); border: 1px solid rgba(255, 255, 255, 0.08); position: relative; overflow: hidden; }
.phone .cap { position: absolute; left: 6px; right: 6px; top: 140px; display: flex; justify-content: center; }
.phone .cap span { padding: 3px 6px; border-radius: 5px; background: rgba(14, 14, 16, 0.78); color: #fff; font-size: 9.5px; line-height: 12px;
  font-weight: 700; text-align: center; white-space: pre-line; }
.phone .ui-zone { position: absolute; left: 0; right: 0; bottom: 0; height: 46px; border-top: 1px dashed rgba(242, 107, 91, 0.45);
  background: repeating-linear-gradient(135deg, rgba(242, 107, 91, 0.1) 0 6px, transparent 6px 12px); }
.meter { height: 4px; border-radius: 2px; background: var(--track); overflow: hidden; }
.meter span { display: block; height: 4px; }
.cue { width: 100%; border: 0; padding: 12px 4px; display: flex; gap: 12px; align-items: flex-start; text-align: left; color: var(--text);
  border-radius: 12px; background: transparent; transition: background-color 180ms ease; }
.cue.selected { background: rgba(233, 185, 73, 0.07); }
.cue .n { width: 22px; flex-shrink: 0; font-family: var(--mono); font-size: 12px; line-height: 22px; color: var(--text-3); }
.cue.selected .n { color: var(--gold); }
.cue .t { font-size: 16px; line-height: 22px; white-space: pre-line; }
.cue .meta { display: flex; gap: 10px; font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.cue .meta .warn { color: #F0B65A; }
.edited { color: var(--gold); }
ol.cuelist, ul.divided { list-style: none; padding-left: 0; margin-left: 0; margin-bottom: 0; }
.cuelist > li { border-bottom: 1px solid var(--line); }
.cue-edit { padding: 0 4px 14px 36px; }
.t.big { font-size: 18px; line-height: 24px; font-weight: 600; white-space: pre-line; }
.meter span { transition: width 300ms var(--ease-out); }
.noshrink { flex-shrink: 0; margin-top: 1px; }
.thumb.mono { font-size: 13px; }
.ready strong { font-size: 17px; line-height: 22px; font-weight: 600; }

/* ---------- result ---------- */
.result-top { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 18px; }
.player { width: 160px; height: 284px; border-radius: 20px; background: var(--raised); border: 1px solid rgba(255, 255, 255, 0.08);
  object-fit: cover; box-shadow: 0 30px 50px -30px rgba(0, 0, 0, 0.9); }
.player.landscape { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.result-top.landscape { grid-template-columns: 1fr; }
.checks { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.checks > div { padding: 12px 0 12px 14px; display: flex; flex-direction: column; gap: 4px; border-left: 1px solid var(--line); min-width: 0; }
.checks > div:first-child { padding-left: 0; border-left: 0; }
.checks dt { font-size: 12px; color: var(--text-3); }
.checks dd { margin: 0; }
.checks .v { font-family: var(--mono); font-size: 15px; font-weight: 500; }
.checks .s { font-size: 12px; display: flex; align-items: center; gap: 4px; }
.checks .s.ok { color: var(--ok-text); } .checks .s.bad { color: var(--warn-text); }

/* ---------- sheet ---------- */
.scrim { position: fixed; inset: 0; background: rgba(5, 5, 6, 0.6); z-index: 40; animation: fade 260ms ease-out both; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; border-radius: 28px 28px 0 0; padding: 10px 20px calc(22px + var(--safe-bottom));
  display: flex; flex-direction: column; gap: 14px; max-width: 560px; margin: 0 auto;
  background: rgba(28, 28, 32, 0.92); backdrop-filter: blur(30px) saturate(150%); -webkit-backdrop-filter: blur(30px) saturate(150%);
  border-top: 1px solid rgba(255, 255, 255, 0.1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 -20px 60px rgba(0, 0, 0, 0.6);
  animation: sheetIn 460ms cubic-bezier(0.32, 0.72, 0, 1) both; }
.grabber { align-self: center; width: 38px; height: 5px; border-radius: 3px; background: #3A3A40; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chipbtn { min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: #D4D4D8; font-size: 14px; }
@keyframes sheetIn { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- motion helpers ---------- */
.rise { animation: rise 560ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.skeleton { border-radius: 14px; background: linear-gradient(100deg, var(--raised) 30%, #2C2C31 50%, var(--raised) 70%);
  background-size: 220% 100%; animation: shimmer 1.5s linear infinite; }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }

.toast { position: fixed; left: 50%; transform: translateX(-50%); top: calc(12px + env(safe-area-inset-top, 0px)); z-index: 60;
  max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 14px; background: rgba(31, 31, 35, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1); font-size: 14px; line-height: 19px; box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.7);
  animation: rise 360ms var(--ease-out) both; }
.toast.err { border-color: rgba(242, 107, 91, 0.5); }

@media (prefers-reduced-motion: reduce) {
  .breathe, .rise, .needle, .glint, .skeleton, .ring, .sheet, .scrim, .toast, .spin { animation: none !important; }
  .popover { animation: fade 160ms ease both !important; }
  .popover.closing { animation: fade 120ms ease reverse both !important; }
  .status { transition: none !important; }
  .btn, .switch, .switch::after, .style-card, .cue, .seg .fill, .dock a { transition: none !important; }
}
@media (prefers-contrast: more) {
  :root { --line: rgba(255, 255, 255, 0.2); --text-3: #B0B0B8; }
  .dock, .footer, .sheet { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .dock, .footer, .sheet, .popover, .status { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* Boot screen (index.html): visible until app.js paints; boot.js lists the reason if it never does. */
.boot .h1 { animation: boot-pulse 1.6s ease-in-out infinite; }
.boot.failed .h1 { animation: none; color: var(--err-text); }
.boot-detail { margin: 0; padding-left: 18px; color: var(--text-2); font-family: var(--mono); font-size: 12px; line-height: 18px; word-break: break-word; }
.boot-detail li + li { margin-top: 6px; }
@keyframes boot-pulse { 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .boot .h1 { animation: none; } }
