/* ==========================================================================
   BuildMog app styles. Reads only src/tokens.css variables.
   Layout: top bar (desktop) or bottom tab bar (phone), screens, sheets.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 400 15px/1.45 var(--font-ui);
  -webkit-font-smoothing: antialiased; overscroll-behavior: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img, svg, video, canvas { display: block; max-width: 100%; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.app { min-height: 100%; display: flex; flex-direction: column; }
.serif { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); }
.mono { font-family: var(--font-mono); }
.muted { color: var(--text-2); }
.eyebrow { font: 600 11px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.hide { display: none !important; }

/* ---------- boot ---------- */
.boot { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; background: var(--bg); z-index: 50; }
.boot-mark { width: 54px; height: 54px; border-radius: 50%; border: 3px solid var(--accent-soft); border-top-color: var(--accent); animation: spin 900ms linear infinite; }
.boot-text { font-family: var(--font-display); font-size: 28px; letter-spacing: -0.02em; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- icons ---------- */
.ic { width: 1em; height: 1em; font-size: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.sm { font-size: 18px; } .ic.xs { font-size: 15px; } .ic.lg { font-size: 28px; }
.ic.fill { fill: currentColor; stroke: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: var(--radius-pill); border: 1px solid var(--border-strong); background: var(--surface-solid); color: var(--text); font-weight: 600; font-size: 15px; text-decoration: none; transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background var(--dur-fast); white-space: nowrap; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-1); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn[disabled] { opacity: 0.5; cursor: default; transform: none; box-shadow: none; }
.btn-primary { background: var(--accent-grad); color: var(--accent-ink); border-color: transparent; box-shadow: 0 8px 22px var(--glow); }
.btn-primary:hover { box-shadow: 0 12px 28px var(--glow); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); box-shadow: none; }
.btn-soft { background: var(--accent-soft); border-color: transparent; color: var(--text); }
.btn-danger { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.btn-big { min-height: 56px; padding: 14px 26px; font-size: 17px; border-radius: 999px; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.btn-icon { width: 44px; height: 44px; padding: 0; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur)); }
.btn-icon.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn-icon.solid { background: var(--surface-solid); }
.btn-block { width: 100%; }

/* ---------- chips, pills ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-solid); font-weight: 500; font-size: 14px; white-space: nowrap; }
.chip.on { background: var(--text); color: var(--bg); border-color: transparent; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font: 500 12px/1.3 var(--font-ui); background: var(--surface-2); border: 1px solid var(--border); }
.pill.mono { font-family: var(--font-mono); font-size: 11.5px; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font: 600 11px/1.2 var(--font-ui); background: var(--accent); color: var(--accent-ink); }
.badge.soft { background: var(--accent-soft); color: var(--text); }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--text-2); min-height: 36px; }
.seg button.on { background: var(--surface-solid); color: var(--text); box-shadow: var(--shadow-1); }

/* ---------- layout ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: none; align-items: center; gap: 14px; padding: 10px 20px; padding-top: calc(10px + env(safe-area-inset-top)); background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur)); border-bottom: 1px solid var(--border); }
.topbar .wordmark { font-family: var(--font-display); font-size: 26px; letter-spacing: -0.02em; text-decoration: none; display: inline-flex; align-items: baseline; gap: 2px; }
.wordmark i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; margin-left: 2px; box-shadow: 0 0 0 3px var(--accent-soft); }
.topbar nav { display: flex; gap: 4px; margin-left: 10px; }
.topbar nav a { text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 600; color: var(--text-2); }
.topbar nav a.on, .topbar nav a:hover { color: var(--text); background: var(--surface-2); }
.topbar .grow { flex: 1; }
/* reminders due: the badge on the Garage tab */
.count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 700 11px/1 var(--font-ui); vertical-align: 2px; }
.tabbar a .tab-ic { position: relative; display: inline-grid; }
.tabbar a .tab-ic .count { position: absolute; top: -6px; right: -12px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: end; padding: 6px 10px calc(8px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur)); border-top: 1px solid var(--border); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--text-3); font: 600 11px/1 var(--font-ui); padding: 6px 0 2px; min-height: 48px; justify-content: flex-end; }
.tabbar a.on { color: var(--text); }
.tabbar a.center .orb { width: 58px; height: 58px; border-radius: 50%; background: var(--accent-grad); color: var(--accent-ink); display: grid; place-items: center; margin-top: -26px; box-shadow: 0 10px 26px var(--glow); border: 4px solid var(--bg); }
.screen { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding-block: 16px 96px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 900px) {
  .topbar { display: flex; }
  .tabbar { display: none; }
  .screen { padding-block: 24px 60px; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
  .hide-desktop { display: none !important; }
  .home-head .wordmark { display: none; } /* the top bar already says it */
  .home-head { justify-content: flex-end; }
}
/* phones: room under the list for the tab bar and the Ask button */
@media (max-width: 899px) { .screen { padding-bottom: 150px; } }

/* ---------- home ---------- */
.home-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.home-head .wordmark { font-family: var(--font-display); font-size: 30px; letter-spacing: -0.02em; }
.search { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 6px 8px 6px 16px; border-radius: 999px; background: var(--surface-solid); border: 1px solid var(--border-strong); box-shadow: var(--shadow-1); margin-bottom: 14px; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 16px; outline: none; }
.search input::placeholder { color: var(--text-3); }
.search .btn-icon { background: transparent; color: var(--text-2); border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; } /* the hero's button is the one warm thing */
.section { margin: 22px 0 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.section h2 { margin: 0; font: 400 24px/1.1 var(--font-display); letter-spacing: -0.02em; }
.section a { font-weight: 600; color: var(--text-2); text-decoration: none; font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; } }
.manual-card { display: flex; flex-direction: column; text-align: left; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface-solid); overflow: hidden; box-shadow: var(--shadow-1); transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast); text-decoration: none; }
.manual-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.manual-card .thumb { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(160deg, var(--blueprint-paper), var(--bg-2)); border-bottom: 1px solid var(--border); overflow: hidden; }
.manual-card .thumb svg { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); }
.manual-card .thumb .badge { position: absolute; top: 10px; left: 10px; }
.manual-card .thumb .ring { position: absolute; right: 10px; bottom: 10px; }
.manual-card .body { padding: 12px 14px 14px; }
.manual-card h3 { margin: 0 0 4px; font: 400 19px/1.15 var(--font-display); letter-spacing: -0.01em; }
.manual-card .meta { font: 500 12px/1.3 var(--font-mono); color: var(--text-2); display: flex; gap: 8px; flex-wrap: wrap; }
.ring { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 600 10px var(--font-mono); background: conic-gradient(var(--accent) var(--p, 0%), var(--meter-track) 0); color: var(--text); }
.ring::before { content: ''; position: absolute; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-solid); }
.ring span { position: relative; }
.continue { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--radius-m); background: var(--text); color: var(--bg); text-decoration: none; margin-bottom: 8px; box-shadow: var(--shadow-2); }
.continue .thumb { width: 72px; height: 54px; border-radius: 10px; background: var(--bg); flex: none; overflow: hidden; }
.continue .thumb svg { width: 100%; height: 100%; }
.continue b { display: block; font: 400 20px/1.1 var(--font-display); }
.continue small { color: color-mix(in srgb, var(--bg) 70%, transparent); font-weight: 500; }
.continue .btn { margin-left: auto; background: var(--accent-grad); color: var(--accent-ink); border: 0; }
.continue .btn.btn-sm { background: var(--bg); color: var(--text); } /* a row under a warm hero stays quiet */
.due-card { display: grid; gap: 8px; padding: 12px 14px; border-radius: var(--radius-m); border: 1px solid var(--accent); background: var(--surface-solid); margin: 4px 0 8px; box-shadow: var(--shadow-1); }
.due-card .due-head { display: flex; align-items: center; gap: 8px; }
.due-card .due-head .ic { color: var(--accent); }
.due-card .due-head b { font-family: var(--font-display); font-weight: 400; font-size: 19px; flex: 1; }
.due-card .due-head a { font-weight: 600; color: var(--text-2); text-decoration: none; font-size: 14px; }
.due-card .reminder { background: var(--accent-soft); }
.mode-card { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 16px; border-radius: var(--radius-m); border: 1px dashed var(--border-strong); background: var(--surface); margin: 12px 0; }
@media (max-width: 599px) { .mode-card { grid-template-columns: 1fr; } }
.mode-card h3 { margin: 0 0 4px; font: 400 21px/1.1 var(--font-display); }
.mode-card p { margin: 0; color: var(--text-2); font-size: 14px; }
.mog-note { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--radius-m); background: var(--accent-soft); margin: 12px 0; }
.mog-note .glasses { width: 44px; height: 44px; border-radius: 50%; background: var(--surface-solid); display: grid; place-items: center; flex: none; box-shadow: var(--shadow-1); }
.mog-note p { margin: 0; font-size: 14px; }
.mog-note b { font-family: var(--font-display); font-weight: 400; font-size: 17px; }

/* ---------- player ---------- */
.player { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--stage-bg); z-index: 15; }
.stage { position: relative; flex: 1; min-height: 0; background: var(--stage-bg); overflow: hidden; }
.stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: var(--stage-vignette); }
.hud { position: absolute; left: 0; right: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 12px; padding-top: calc(12px + env(safe-area-inset-top)); z-index: 3; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hud-title .titlepill h1 { margin: 0; font: inherit; font-size: inherit; }
.hud-title .titlepill { display: grid; gap: 1px; padding: 6px 14px 7px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur)); min-width: 0; }
.hud-title .name { font: 400 18px/1.15 var(--font-display); letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 48vw; }
.hud-title .eyebrow { margin-top: 2px; color: var(--text-2); }
.hud-right { display: flex; gap: 8px; }
.live-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px; border-radius: 999px; background: var(--text); color: var(--bg); border: 0; font-weight: 600; box-shadow: var(--shadow-2); white-space: nowrap; }
.live-btn.on { background: var(--accent-grad); color: var(--accent-ink); }
/* the dot pulses only while live: pulse means watching, not "tap me" */
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); }
.live-btn.on .live-dot { background: var(--accent-ink); animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--glow); } 100% { box-shadow: 0 0 0 10px transparent; } }

.bm-callout { position: absolute; left: 0; top: 0; pointer-events: none; transition: opacity 300ms var(--ease-out); z-index: 2; }
.bm-callout-dot { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); left: -5px; top: -5px; box-shadow: 0 0 0 3px var(--accent-soft), 0 2px 6px rgba(0,0,0,0.2); }
.bm-callout-pill { position: absolute; left: 12px; top: -32px; white-space: nowrap; background: var(--surface-solid); border: 1px solid var(--border-strong); border-radius: 999px; padding: 5px 11px; font: 500 12.5px/1.2 var(--font-ui); box-shadow: var(--shadow-1); color: var(--text); }
.bm-callout.is-hw .bm-callout-pill { font-family: var(--font-mono); font-size: 11.5px; }
.bm-callout.is-below .bm-callout-pill { top: 12px; }
.bm-callout-glyph { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: 1px; }
.bm-callouts.is-narrow .bm-callout-pill { font-size: 11px; padding: 3px 8px; top: -26px; left: 9px; }
.bm-callouts.is-narrow .bm-callout-dot { width: 8px; height: 8px; left: -4px; top: -4px; }
.bm-callout.is-dim .bm-callout-dot { background: var(--blueprint); box-shadow: 0 0 0 3px rgba(36,87,214,0.15); }
.bm-callout.is-dim .bm-callout-pill { font-family: var(--font-mono); font-size: 11.5px; color: var(--blueprint); background: var(--blueprint-paper); border-color: rgba(36,87,214,0.3); }

/* parts drawer */
.parts-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.parts-list { display: grid; gap: 6px; max-height: 52vh; overflow: auto; }
.part-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 9px 10px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-solid); }
.part-row:hover { border-color: var(--accent); }
.part-row .sw { width: 34px; height: 26px; border-radius: 8px; border: 1px solid var(--border-strong); }
.part-row b { display: block; font-weight: 600; font-size: 14px; }
.part-row small { display: block; font: 500 12px var(--font-mono); color: var(--text-2); }
.part-row .step { font: 600 11px var(--font-mono); color: var(--text-2); white-space: nowrap; }
.part-row .glyph { width: 34px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font: 700 11px var(--font-ui); }
/* the PDF a library manual was built from (D16) */
.parts-source { margin: 12px 2px 0; font-size: 12.5px; line-height: 1.45; color: var(--text-2); }
.parts-source a { text-decoration: underline; text-underline-offset: 2px; font-weight: 600; color: var(--text); }

/* hardware check-off in the layout step */
.hw-pill.check { cursor: pointer; min-height: 44px; border-color: var(--border-strong); background: var(--surface-solid); }
/* a ticked bag is a tick on orange, like the bar: green stays for "seen on camera" */
.hw-pill.check.on { background: var(--accent-soft); color: var(--text); border-color: var(--accent); }
.hw-pill.check.on .glyph { background: var(--accent); color: var(--accent-ink); }
.hw-pill.check.on i { color: var(--text-2); }
.count-line { font: 600 12px var(--font-mono); color: var(--text-2); margin-top: 2px; }

/* cards: save heart */
.manual-card .heart { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--text-2); display: grid; place-items: center; }
.manual-card .heart::before { content: ''; position: absolute; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-solid); box-shadow: var(--shadow-1); }
.manual-card .heart .ic { position: relative; }
.manual-card .heart.on { color: var(--danger); }
.manual-card .heart .ic { font-size: 16px; }

/* care guides */
.guide-card { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; text-align: left; padding: 12px 14px; border-radius: var(--radius-m); border: 1px solid var(--border); background: var(--surface-solid); width: 100%; }
.guide-card b { display: block; font: 400 18px/1.15 var(--font-display); }
.guide-card small { color: var(--text-2); font-size: 12.5px; }
.guide-steps { margin: 0; padding-left: 22px; display: grid; gap: 8px; font-size: 15px; }
.guide-meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; }
.due { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font: 600 11px var(--font-mono); background: var(--accent-soft); color: var(--text); }
.due.late { background: var(--danger-soft); color: var(--danger); }
.due.ok { background: color-mix(in srgb, var(--live) 16%, transparent); color: var(--live); }
.add-item { display: grid; gap: 8px; grid-template-columns: 1fr auto auto; align-items: center; }
.add-item select { min-height: 44px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--bg); padding: 0 14px; }
@media (max-width: 599px) { .add-item { grid-template-columns: 1fr; } }
.rate { display: flex; gap: 8px; justify-content: center; }

/* Ask Mog floating button, memory list, paused state */
.mog-fab { position: fixed; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 18; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px 0 12px; border-radius: 999px; border: 0; background: var(--text); color: var(--bg); font-weight: 600; box-shadow: var(--shadow-2); }
.mog-fab .ic { color: var(--accent); }
@media (min-width: 900px) { .mog-fab { bottom: 24px; right: 24px; } }
.mem-list .row small { white-space: normal; }
.copilot.paused .cam .rec { background: rgba(255,138,31,0.85); color: var(--accent-ink); }
.copilot.paused .cam .rec i { background: var(--accent-ink); }
.copilot.paused .cam video { opacity: 0.45; }
.sheet .copilot { position: relative; left: auto; right: auto; bottom: auto; width: 100%; box-shadow: none; animation: none; }
.rate button.on { background: var(--accent-soft); border-color: var(--accent); }

.dock { position: relative; z-index: 4; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur)); border-top: 1px solid var(--border); }
/* behind the safety gate, the finish line or a recording clip the controls are inert, and look it */
.dock[inert] .controls, .dock[inert] .progress, .dock[inert] > .finish { opacity: 0.5; }
.step-card { position: relative; display: flex; flex-direction: column; gap: 8px; border-radius: var(--radius-m); background: var(--surface-solid); border: 1px solid var(--border); padding: 12px 14px; box-shadow: var(--shadow-1); min-height: 0; }
.step-card .handle { position: absolute; top: 6px; left: 50%; width: 36px; height: 4px; border-radius: 2px; background: var(--border-strong); transform: translateX(-50%); }
.step-card .head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; cursor: pointer; padding: 4px 0 0; margin: 0; border: 0; background: transparent; text-align: left; width: 100%; flex: none; }
.step-card .head > div { min-width: 0; }
.step-card .eyebrow { color: var(--text-2); }
.step-card h2 { margin: 2px 0 0; font: 400 20px/1.15 var(--font-display); letter-spacing: -0.015em; text-wrap: balance; }
.step-card .body { display: grid; gap: 10px; min-height: 0; }
.step-card .body.collapsed { display: none; }
.step-card .warn { flex: none; }
.step-card.collapsed .warn { padding: 6px 10px; font-size: 13px; }
.step-card p { margin: 0; font-size: 15px; line-height: 1.45; }
.warn { display: flex; gap: 8px; align-items: flex-start; padding: 9px 12px; border-radius: 12px; background: var(--danger-soft); color: var(--text); font-size: 14px; border-left: 3px solid var(--danger); }
.warn .ic { color: var(--danger); margin-top: 1px; }
.tip { display: flex; gap: 8px; align-items: flex-start; padding: 8px 12px; border-radius: 12px; background: var(--accent-soft); font-size: 14px; }
.tip .ic { color: var(--accent); margin-top: 1px; }
.hw-row { display: flex; gap: 6px; flex-wrap: wrap; }
.hw-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 7px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-2); font: 500 12.5px/1.2 var(--font-ui); max-width: 100%; }
.hw-pill .glyph { width: 16px; height: 16px; border-radius: 4px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font: 700 9px var(--font-ui); flex: none; }
.hw-pill .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hw-pill i { font: 500 11px var(--font-mono); font-style: normal; color: var(--text-3); }
.hw-pill.tool { font-weight: 600; }
.hw-pill.tool .glyph { background: var(--text); color: var(--bg); }
.hw-pill b { font-weight: 600; font-family: var(--font-mono); font-size: 12px; }

.controls { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; flex: none; }
.controls .main { display: flex; align-items: center; gap: 6px; }
/* the last step: Finish takes the full width above the bar, the scrubber keeps its room */
.dock > .finish { flex: none; min-height: 48px; }
.play { width: 56px; height: 56px; border-radius: 50%; background: var(--accent-grad); color: var(--accent-ink); border: 0; display: grid; place-items: center; box-shadow: 0 8px 22px var(--glow); }
.play .ic { font-size: 26px; }
.scrub { position: relative; height: 44px; display: flex; align-items: center; min-width: 0; }
.scrub input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.scrub .track { position: relative; width: 100%; height: 6px; border-radius: 3px; background: var(--meter-track); }
.scrub .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--accent); transition: width 80ms linear; }
.scrub .knob { position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%; background: var(--surface-solid); border: 3px solid var(--accent); transform: translate(-50%, -50%); box-shadow: var(--shadow-1); transition: left 80ms linear; }
/* step dots: a 10 px dot inside a 24 px hit area */
.dots { display: flex; gap: 0; justify-content: center; align-items: center; flex-wrap: wrap; padding: 0; flex: none; }
.dots button { width: 24px; height: 24px; padding: 0; border: 0; background: transparent; display: grid; place-items: center; }
.dots button i { display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--meter-track); transition: transform var(--dur-fast) var(--ease-spring), background var(--dur-fast); }
.dots button.done i { background: color-mix(in srgb, var(--accent) 55%, var(--meter-track)); }
.dots button.on i { background: var(--accent); transform: scale(1.5); }
.dots button:hover i { transform: scale(1.35); }
.speed { min-width: 48px; font-family: var(--font-mono); font-weight: 600; font-size: 13px; }
.side-tools { position: absolute; right: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 8px; z-index: 3; }
.side-tools .view-toggle { display: none; }
/* a tool that is on is outlined, not solid orange: Play stays the one warm thing */
.side-tools .btn-icon.on { background: var(--accent-soft); color: var(--text); border-color: transparent; box-shadow: inset 0 0 0 1.5px var(--accent); }
.diagram-card { position: absolute; left: 12px; bottom: 12px; width: 200px; border-radius: var(--radius-s); background: var(--blueprint-paper); border: 1px solid var(--border); box-shadow: var(--shadow-1); overflow: hidden; z-index: 3; }
.diagram-card svg { width: 100%; height: auto; display: block; }
.diagram-card .cap { font: 600 10px/1.2 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--blueprint); padding: 6px 10px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; }
.diagram-inline { border-radius: var(--radius-s); background: var(--blueprint-paper); border: 1px solid var(--border); overflow: hidden; }
.diagram-inline svg { width: 100%; height: auto; }

@media (min-width: 900px) {
  .player { flex-direction: row; }
  .player .stage { flex: 1; }
  /* the step card scrolls inside the dock; the controls stay put at the bottom */
  .dock { width: 380px; border-top: 0; border-left: 1px solid var(--border); padding: 14px; overflow: hidden; }
  .step-card { overflow: auto; }
  .step-card .handle, .step-card .head .ic { display: none; }
  .step-card .head { cursor: default; }
  .step-card .body.collapsed { display: grid; }
  .controls { margin-top: auto; }
  .hud-title .name { max-width: 40vw; }
}
@media (max-width: 899px) {
  .diagram-card { display: none; }
  .player .stage { min-height: 38vh; }
  /* the dock never grows past 62vh: the step text scrolls inside its card, the title and the
     warning stay put above it, and the controls never leave the screen */
  .dock { max-height: 62vh; overflow: hidden; }
  .step-card { flex: 0 1 auto; }
  .step-card .body { flex: 0 1 auto; overflow: auto; overscroll-behavior: contain; }
  .side-tools { top: calc(76px + env(safe-area-inset-top)); bottom: auto; right: 10px; }
  .side-tools .btn-icon { width: 44px; height: 44px; }
  /* seven tools fold behind one View button; open, they sit in two columns so the whole set stays
     inside a short stage when the step card is expanded */
  .side-tools .view-toggle { display: grid; place-items: center; }
  .side-tools:not(.open) > .btn-icon:not(.view-toggle) { display: none; }
  .side-tools.open { display: grid; grid-template-columns: 44px 44px; padding: 6px; border-radius: 28px; background: color-mix(in srgb, var(--surface-solid) 88%, transparent); backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur)); box-shadow: var(--shadow-2); }
  .hud-title .name { font-size: 16px; max-width: 44vw; }
  .live-btn { min-height: 40px; padding: 0 14px 0 10px; font-size: 14px; }
  .hud-right .btn-icon { width: 40px; height: 40px; }
  .scrub .track { margin: 0 12px; }
  .diagram-inline svg { max-height: 150px; }
  /* Built it. on a phone: the dock goes, the stage takes the height, the overlay scrolls under the HUD */
  .player:has(.done-overlay:not(.recording)) .dock { display: none; }
  .done-overlay:not(.recording) { place-content: start center; align-content: start; overflow: auto; padding-top: calc(74px + env(safe-area-inset-top)); }
}

/* done overlay */
.done-overlay { position: absolute; inset: 0; z-index: 6; display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center; padding: 24px; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: fadein var(--dur-med) var(--ease-out); }
.done-overlay h1 { margin: 0; font: 400 46px/1 var(--font-display); letter-spacing: -0.02em; }
.done-overlay p { margin: 0; color: var(--text-2); max-width: 36ch; }
.done-overlay .row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; border: 0; padding: 0; }
/* Built it.: the three ways to share on one line, the ways out quieter on the next, so no button is left alone */
.done-overlay .row.done-nav { margin-top: 0; gap: 4px; }
.done-overlay .row.done-nav .btn { color: var(--text-2); }
@media (max-width: 599px) {
  .done-overlay .row.done-share { width: 100%; }
  .done-overlay .row.done-share > .btn { flex: 1 1 0; min-width: 0; padding-inline: 12px; }
  .done-overlay .row.done-share > .btn-primary { flex-basis: 100%; }
  .done-overlay .row.done-nav { flex-wrap: nowrap; }
  .done-overlay .row.done-nav .btn { padding-inline: 8px; gap: 5px; }
}
.done-overlay > small { font-size: 12.5px; }
.confetti { position: absolute; inset: 0; pointer-events: none; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
/* the build clip: while it records the overlay turns clear and shows one pill under the HUD; the
   dock is inert and the stage swallows taps, so nothing can change the step mid-clip */
.done-overlay.recording { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; place-content: start center; align-content: start; padding-top: calc(74px + env(safe-area-inset-top)); animation: none; }
.clip-pill { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 6px 4px 14px; border-radius: 999px; background: var(--surface-solid); border: 1px solid var(--border-strong); box-shadow: var(--shadow-2); font: 600 13.5px/1 var(--font-ui); white-space: nowrap; }
.clip-pill i { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: recpulse 1.2s ease-out infinite; }
.clip-pill b { font: 600 13px var(--font-mono); }
.clip-pill small { font: 500 11px var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-2); }
.clip-pill .btn { min-height: 34px; }
@keyframes recpulse { 0% { box-shadow: 0 0 0 0 var(--danger-soft); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.clip-ready { display: grid; gap: 4px; justify-items: center; padding: 10px 14px 12px; border-radius: var(--radius-m); background: var(--surface-solid); border: 1px solid var(--border); box-shadow: var(--shadow-1); max-width: 100%; }
.clip-ready .row { margin-top: 4px; }
/* the build card (docs/14 section 5): the PNG large in place of the overlay's text, as wide as the
   space left once its line and buttons are counted, so it fits a short desktop stage and a phone */
.done-overlay.card-view { container-type: size; gap: 10px; }
.build-card { display: block; width: min(300px, 100%); width: min(calc((100cqh - 96px) * 0.8), 100cqw, 480px); height: auto; border-radius: var(--radius-s); background: var(--bg); box-shadow: var(--shadow-2), 0 0 0 1px var(--border); }
.done-overlay.card-view .row { margin-top: 2px; }

/* ---------- co-pilot dock ---------- */
.copilot { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 5; display: grid; grid-template-columns: 112px 1fr; gap: 10px; padding: 10px; border-radius: var(--radius-m); background: color-mix(in srgb, var(--surface-solid) 92%, transparent); border: 1px solid var(--border-strong); box-shadow: var(--shadow-2); backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur)); animation: rise var(--dur-med) var(--ease-out); }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.copilot .cam { position: relative; width: 112px; height: 150px; border-radius: 12px; background: var(--text); overflow: hidden; }
.copilot .cam video { width: 100%; height: 100%; object-fit: cover; }
/* no picture: the face on a warm tile with one short line, not a dark error box */
.copilot .cam:has(.off) { background: var(--accent-soft); }
.copilot .cam .off { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: var(--text); font-size: 11px; padding: 22px 6px 6px; gap: 6px; justify-items: center; }
/* the layout and flip buttons live on the picture, out of the header's way */
.copilot .cam .cam-tools { position: absolute; left: 6px; right: 6px; bottom: 6px; display: flex; justify-content: space-between; gap: 6px; z-index: 5; }
.copilot .cam .cam-tools .btn-icon { width: 36px; height: 36px; background: rgba(20,17,13,0.45); color: #fff; border-color: rgba(255,255,255,0.25); }
.copilot .cam .cam-tools .btn-icon:only-child { margin-left: auto; }
.copilot .cam .rec { position: absolute; top: 6px; left: 6px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 999px; background: rgba(0,0,0,0.5); color: #fff; font: 600 10px var(--font-mono); }
.copilot .cam .rec i { width: 6px; height: 6px; border-radius: 50%; background: #ff4d4d; }
.copilot .cam .rec.clock-off i { background: #9a968e; }
.copilot .chat { display: flex; flex-direction: column; min-width: 0; gap: 6px; }
.copilot .lines { flex: 1; overflow: auto; max-height: 92px; display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; }
.copilot.novoice .lines { max-height: 150px; font-size: 14.5px; }
.copilot .line { padding: 6px 10px; border-radius: 12px; max-width: 95%; }
.copilot .line .acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.copilot .line.mog { background: var(--accent-soft); align-self: flex-start; border-bottom-left-radius: 4px; }
.copilot .line.you { background: var(--surface-2); align-self: flex-end; border-bottom-right-radius: 4px; }
.copilot .line b { font-family: var(--font-display); font-weight: 400; margin-right: 4px; }
.copilot .ask { display: flex; gap: 6px; align-items: center; }
.copilot .ask input { flex: 1; min-width: 0; min-height: 40px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--bg); padding: 0 14px; font-size: 14px; outline: none; }
/* header: face · name · balance | Hold · End. The name and balance share one shrinking slot. */
.copilot .meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font: 500 11px var(--font-mono); color: var(--text-2); }
.copilot .meta .who { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.copilot .meta .who .nm { font: 400 15px/1 var(--font-display); color: var(--text); white-space: nowrap; }
.copilot .meta .who .bal { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.copilot .meta .btn-sm { flex: none; }
/* chips: one scrolling row of thumb-sized targets */
.copilot .quick { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.copilot .quick::-webkit-scrollbar { display: none; }
.copilot .quick button { flex: none; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-solid); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
@media (min-width: 900px) {
  .copilot { left: auto; width: 460px; }
  /* with the paper manual hidden while Live is open, the panel takes the empty corner on the left */
  .player.live-pip .copilot, .player.live-voice .copilot { left: 12px; right: auto; }
}
/* phones: the panel is a strip over the stage; these rules come after the base ones so they win */
@media (max-width: 899px) {
  .copilot { position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 16; grid-template-columns: 72px 1fr; gap: 8px; padding: 8px; }
  .copilot .cam { width: 72px; height: 96px; }
  .copilot .cam .off { padding: 6px 4px; }
  .copilot .cam .off .avatar { width: 52px; height: 52px; } /* the tile's line is hidden in live.css, which loads after this file */
  .copilot .cam .cam-tools { left: 4px; right: 4px; bottom: 4px; gap: 4px; }
  .copilot .cam .cam-tools .btn-icon { width: 30px; height: 30px; }
  .copilot .cam .cam-tools .btn-icon .ic { font-size: 15px; }
  .copilot .lines { max-height: 54px; }
  .copilot .meta .who .nm { display: none; } /* the face says who */
}

/* ---------- scan ---------- */
.scan-hero { display: grid; gap: 6px; margin-bottom: 18px; }
.scan-hero h1 { margin: 0; font: 400 34px/1.05 var(--font-display); letter-spacing: -0.02em; }
.scan-hero p { margin: 0; color: var(--text-2); }
.card { border-radius: var(--radius-m); background: var(--surface-solid); border: 1px solid var(--border); box-shadow: var(--shadow-1); padding: 16px; }
.card h3 { margin: 0 0 8px; font: 400 21px/1.15 var(--font-display); }
.field { display: flex; gap: 8px; align-items: center; min-height: 52px; padding: 4px 4px 4px 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--bg); }
.field input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 16px; outline: none; }
.photo-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.photo-row .ph { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; border: 1px solid var(--border); }
.photo-add { width: 72px; height: 72px; border-radius: 12px; border: 1px dashed var(--border-strong); display: grid; place-items: center; background: var(--bg); color: var(--text-2); cursor: pointer; }
.stages { display: grid; gap: 10px; margin: 6px 0; }
.stage-row { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--bg-2); color: var(--text-2); }
.stage-row.on { background: var(--accent-soft); color: var(--text); }
.stage-row.done { color: var(--text); }
.stage-row .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-solid); border: 1px solid var(--border); font: 600 12px var(--font-mono); }
.stage-row.done .n { background: var(--live); color: #fff; border-color: transparent; }
.stage-row.on .n { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.stage-row small { font-family: var(--font-mono); font-size: 11px; }
.demo-note { font-size: 13px; color: var(--text-2); padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--border-strong); margin-top: 12px; }
.result { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; }
.result > div { min-width: 0; }
.result .thumb { aspect-ratio: 4/3; border-radius: 12px; background: var(--blueprint-paper); overflow: hidden; display: grid; place-items: center; }
.result .thumb svg { width: 100%; height: 100%; }
.result h3 { margin: 0; overflow-wrap: anywhere; }
.result .meta { font: 500 12px var(--font-mono); color: var(--text-2); }
.stack { display: grid; gap: 12px; }

/* ---------- garage ---------- */
.garage-item { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border-radius: var(--radius-m); background: var(--surface-solid); border: 1px solid var(--border); }
.garage-item > div { min-width: 0; }
.garage-item .thumb { width: 56px; height: 44px; border-radius: 10px; background: var(--blueprint-paper); overflow: hidden; }
.garage-item .thumb svg { width: 100%; height: 100%; }
.garage-item b { display: block; font: 400 18px/1.15 var(--font-display); overflow-wrap: anywhere; }
.garage-item small { color: var(--text-2); font-size: 12.5px; }
.garage-item .actions { display: flex; gap: 6px; align-items: center; }
/* the reminders run the full width under the name row, so nothing wraps letter by letter */
.garage-item .care { grid-column: 1 / -1; display: grid; gap: 6px; }
.garage-item .care:empty { display: none; }
.reminder.late { box-shadow: inset 3px 0 0 var(--warn); }
@media (max-width: 599px) {
  .garage-item { grid-template-columns: 56px minmax(0, 1fr) auto; column-gap: 10px; }
  .garage-item .actions .btn-sm { padding: 6px 10px; }
}
select.mini { min-height: 32px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface-solid); padding: 0 10px; font-size: 13px; max-width: 100%; }
.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 36px 16px; color: var(--text-2); }
.empty img { width: 180px; border-radius: 50%; }
.empty .avatar { margin-bottom: 4px; }
.empty h3 { margin: 0; font: 400 24px/1.1 var(--font-display); color: var(--text); overflow-wrap: anywhere; }
.reminder { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); font-size: 14px; flex-wrap: wrap; }
/* the text keeps a readable width; the buttons wrap to a second line when the row is narrow */
.reminder > span { flex: 1 1 150px; min-width: 0; overflow-wrap: break-word; }
.reminder .due { white-space: nowrap; }

/* ---------- sheets ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 30; background: rgba(27,24,20,0.35); animation: fadein var(--dur-fast) var(--ease-out); }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; max-height: 88vh; overflow: auto; border-radius: var(--radius-l) var(--radius-l) 0 0; background: var(--bg-elev); border: 1px solid var(--border); padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); box-shadow: var(--shadow-2); animation: rise var(--dur-med) var(--ease-out); }
.sheet .handle { width: 40px; height: 4px; border-radius: 2px; background: var(--border-strong); margin: 4px auto 12px; }
.sheet h2 { margin: 0 0 4px; font: 400 28px/1.1 var(--font-display); letter-spacing: -0.02em; }
.sheet .lead { margin: 0 0 14px; color: var(--text-2); }
@media (min-width: 720px) { .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: min(620px, 92vw); transform: translate(-50%, -50%); border-radius: var(--radius-l); animation: fadein var(--dur-med) var(--ease-out); } }
.plans { display: grid; gap: 10px; }
@media (min-width: 720px) { .plans { grid-template-columns: 1fr 1fr 1fr; } }
.plan { position: relative; padding: 14px; border-radius: var(--radius-m); border: 1px solid var(--border); background: var(--surface-solid); display: grid; gap: 8px; align-content: start; }
.plan.hero { border-color: var(--accent); box-shadow: var(--shadow-glow); }
.plan .price { font: 400 32px/1 var(--font-display); }
.plan .price small { font: 500 12px var(--font-mono); color: var(--text-2); margin-left: 4px; }
.plan ul { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--text-2); display: grid; gap: 3px; }
.plan .price small { white-space: nowrap; }
.plan .tag { position: absolute; top: -10px; left: 14px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.row:last-child { border-bottom: 0; }
.row b { font-weight: 600; }
.row small { display: block; color: var(--text-2); font-size: 12.5px; }
.switch { position: relative; width: 48px; height: 28px; border-radius: 999px; background: var(--meter-track); border: 0; flex: none; transition: background var(--dur-fast); }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-solid); box-shadow: var(--shadow-1); transition: transform var(--dur-fast) var(--ease-out); }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(20px); }

/* ---------- onboarding ---------- */
.onboard { position: fixed; inset: 0; z-index: 40; background: var(--bg); display: flex; flex-direction: column; padding: calc(16px + env(safe-area-inset-top)) 20px calc(20px + env(safe-area-inset-bottom)); }
.onboard .slide { flex: 1; display: grid; align-content: center; justify-items: center; text-align: center; gap: 14px; }
.onboard .slide > img { width: min(68vw, 360px); height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 50%; box-shadow: var(--shadow-2); } /* height: auto, or the img's height attribute (720) wins over aspect-ratio and the circle becomes a tall oval that pushes Next off the screen; scoped to the slide's own image so the co-pilot clips keep their size */
.onboard .art { width: min(70vw, 360px); aspect-ratio: 1; display: grid; place-items: center; }
.onboard h1 { margin: 0; font: 400 36px/1.05 var(--font-display); letter-spacing: -0.02em; max-width: 14ch; }
.onboard p { margin: 0; color: var(--text-2); max-width: 36ch; font-size: 16px; }
.onboard .foot { display: grid; gap: 12px; justify-items: center; }
.onboard .foot .btn-primary { width: min(100%, 360px); }
.onboard .skip { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 16px; z-index: 2; } /* above the animated .slide (QA F1, 2026-10-22) */

/* ---------- toast ---------- */
/* phones: centred above the Ask button (which sits at 84px), never over it */
.toast { position: fixed; left: 50%; bottom: calc(142px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 45; display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 999px; background: var(--text); color: var(--bg); box-shadow: var(--shadow-2); animation: rise var(--dur-med) var(--ease-out); max-width: calc(100vw - 32px); font-size: 14px; }
.toast button { border: 0; background: transparent; color: var(--accent-2); font-weight: 700; padding: 4px 6px; }
/* desktop toasts sit bottom-left, clear of the Ask button at bottom-right */
@media (min-width: 900px) { .toast { bottom: 28px; left: 24px; transform: none; max-width: min(560px, calc(100vw - 220px)); } }

@media (prefers-reduced-motion: reduce) { .sheet, .toast, .copilot, .done-overlay, .clip-pill i { animation: none; } }

/* ---------- the year of care (garage, docs/14 section 7): twelve months of small moments ---------- */
.care-year { display: grid; gap: 10px; }
.care-year-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.care-year-head h3 { margin: 0; font: 400 22px/1.1 var(--font-display); letter-spacing: -0.02em; }
.care-year-head .muted { font-size: 13px; }
.care-months { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(168px, 1fr); gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 0 8px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.care-month { scroll-snap-align: start; display: grid; align-content: start; gap: 6px; min-height: 124px; padding: 10px; border-radius: var(--radius-s); background: var(--surface-solid); border: 1px solid var(--border); }
.care-month.now { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.care-month-name { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.care-month-name b { font: 400 19px/1 var(--font-display); }
.care-month-name small { font: 600 10.5px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.care-month.now .care-month-name small { color: var(--accent); }
.care-chip { display: grid; grid-template-columns: 24px 1fr; column-gap: 8px; align-items: center; text-align: left; padding: 7px 8px; border-radius: 12px; border: 1px solid var(--border); background: var(--accent-soft); color: var(--text); font: 500 12.5px/1.25 var(--font-ui); cursor: pointer; min-height: 44px; }
.care-chip .kicon { grid-row: span 2; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-solid); display: grid; place-items: center; color: var(--text-2); }
.care-chip .t { font-weight: 600; overflow-wrap: anywhere; }
.care-chip .m { font: 500 11px var(--font-mono); color: var(--text-3); }
.care-chip.ahead { background: var(--surface-solid); }
.care-chip.due { border-color: var(--accent); }
.care-chip.late { box-shadow: inset 3px 0 0 var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, var(--border)); }
.care-chip.late .m { color: var(--warn); }
.care-chip.done { background: var(--surface-2); color: var(--text-2); }
.care-chip.done .m { color: var(--live); }
.care-chip:hover { border-color: var(--border-strong); }
.care-quiet { margin: 4px 0 0; font: italic 400 15px/1.3 var(--font-display); color: var(--text-3); }
.months-on-time { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--radius-m); background: var(--surface-solid); border: 1px solid var(--border); }
.months-on-time .dots { display: grid; grid-template-columns: repeat(6, 14px); gap: 6px; }
.months-on-time .dots i { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--meter-track); }
.months-on-time .dots i.green { background: var(--live); }
.months-on-time .dots i.amber { background: var(--warn); }
.months-on-time h3 { margin: 0 0 2px; font: 400 20px/1.1 var(--font-display); }
.months-on-time p { margin: 0; color: var(--text-2); font-size: 13.5px; }
.guide-when { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -4px 0 12px; padding: 8px 10px; border-radius: 12px; background: var(--accent-soft); font-size: 13px; }
.guide-when > span { flex: 1 1 140px; }
@media (max-width: 899px) { .care-months { grid-auto-columns: 76%; } }

/* analytics.js's consent bar (EEA, until answered) sits over the bottom edge at z-index 9999: while it is up, <html>
   carries bm-consent-up and --bm-consent-h (its height plus its 16 px offset), and the app's bottom UI lifts above it */
html.bm-consent-up .tabbar { bottom: var(--bm-consent-h, 0px); }
html.bm-consent-up .player .dock { margin-bottom: var(--bm-consent-h, 0px); }
html.bm-consent-up .mog-fab { bottom: calc(84px + env(safe-area-inset-bottom) + var(--bm-consent-h, 0px)); }

/* ---------- building a custom manual (ui.js BuildScreen): the character, the product, the stages, the clock ---------- */
.bld-screen { max-width: 760px; }
.bld-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; margin: 4px 0 18px; }
.bld-face { width: 136px; height: 136px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--border); }
.bld-head h1 { margin: 6px 0 6px; font: 400 34px/1.05 var(--font-display); letter-spacing: -0.02em; overflow-wrap: anywhere; text-wrap: balance; }
.bld-head h1:focus { outline: none; } /* it takes focus when the build ends, for screen readers; not a control */
.bld-say, .bld-reason { margin: 0; color: var(--text-2); font-size: 15px; max-width: 52ch; }
.bld-credit { margin: 8px 0 0; font-size: 15px; }
.bld-credit b { font-weight: 600; color: var(--text); }
.bld-stages { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.bld-stage { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 14px; border-radius: var(--radius-s); background: var(--bg-2); color: var(--text-3); border: 1px solid transparent; }
.bld-stage .n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-solid); border: 1px solid var(--border); font: 600 12px var(--font-mono); color: var(--text-2); }
.bld-stage .t { display: grid; gap: 2px; min-width: 0; }
.bld-stage .t b { font-weight: 600; font-size: 15px; }
.bld-stage .t small { font: 500 12px/1.35 var(--font-mono); color: var(--text-2); overflow-wrap: anywhere; }
.bld-stage .s { font: 600 10.5px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.bld-stage.done { background: var(--surface-solid); border-color: var(--border); color: var(--text); }
.bld-stage.done .n { background: var(--live); border-color: transparent; color: var(--accent-ink); }
.bld-stage.on { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
.bld-stage.on .n { background: var(--accent); border-color: transparent; color: var(--accent-ink); animation: bld-breathe 2.4s ease-in-out infinite; }
.bld-stage.on .s { color: var(--text); }
.bld-stage.stopped { background: var(--surface-solid); border-color: color-mix(in srgb, var(--warn) 45%, var(--border)); box-shadow: inset 3px 0 0 var(--warn); color: var(--text); }
.bld-stage.stopped .n { background: var(--warn); border-color: transparent; color: var(--accent-ink); }
.bld-stage.stopped .s { color: var(--warn); }
.bld-meter { display: block; height: 6px; margin-top: 6px; border-radius: 3px; background: var(--meter-track); overflow: hidden; }
.bld-meter i { display: block; height: 100%; width: var(--w, 0%); border-radius: 3px; background: var(--accent-grad); transition: width var(--dur-med) var(--ease-out); }
.bld-clock { margin: 10px 0 0; font: 500 13px var(--font-mono); color: var(--text-2); }
.bld-clock b { font-weight: 600; font-size: 15px; color: var(--text); }
.bld-keep { margin: 4px 0 0; font-size: 13.5px; color: var(--text-2); }
.bld-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.bld-actions.bld-confirm { margin: 0 0 16px; }
.bld-back { margin-top: 10px; color: var(--text-2); }
@media (max-width: 599px) {
  .bld-head { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 10px; }
  .bld-face { width: 104px; height: 104px; }
  .bld-head > div { width: 100%; }
  .bld-head h1 { font-size: 29px; }
  .bld-say, .bld-reason { margin-inline: auto; }
  .bld-actions { flex-direction: column; align-items: stretch; }
  .bld-actions .btn { width: 100%; }
}

/* ---------- the Plans sheet: what each plan costs and gives, right above its button (plan-copy.js) ---------- */
.plan-get { margin: 2px 0 0; padding: 8px 10px; border-radius: 12px; background: var(--accent-soft); color: var(--text); font-size: 13px; line-height: 1.4; }
.plans-launch { font-size: 12.5px; color: var(--text-2); }
.plan-topup { display: grid; gap: 8px; justify-items: start; margin-top: 12px; padding: 12px 14px; border-radius: var(--radius-m); border: 1px solid var(--border); background: var(--surface-solid); }
.plan-topup .plan-get { margin: 0; }

/* ---------- before the camera first turns on for Live (ui.js LiveIntroSheet) ---------- */
.live-meter-line { margin: 4px 0 16px; font-size: 16px; line-height: 1.5; color: var(--text); max-width: 48ch; }
.live-intro-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
@media (max-width: 599px) { .live-intro-actions { flex-direction: column; align-items: stretch; } }

/* ---------- onboarding: pick your co-pilot, what's in your home (ui.js OnboardPilots, OnboardHome) ---------- */
.onboard .slide { min-height: 0; overflow-y: auto; align-content: safe center; padding: 10px; margin: 0 -10px; } /* a short phone scrolls the step; Skip and Next stay put; the padding keeps a chosen card's glow inside the scroll box */
.ob-pilots { display: flex; gap: 12px; justify-content: center; width: min(100%, 420px); }
.ob-pilot { flex: 1 1 0; min-width: 0; display: grid; justify-items: center; gap: 4px; padding: 14px 10px 12px; border-radius: var(--radius-m); border: 2px solid var(--border); background: var(--surface-solid); color: var(--text); text-align: center; transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast), border-color var(--dur-fast); }
.ob-pilot:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); }
.ob-pilot.on { border-color: var(--accent); box-shadow: var(--shadow-glow); }
.ob-pilot-face { display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); padding: 4px; margin-bottom: 4px; }
.ob-pilot b { font: 400 24px/1.1 var(--font-display); }
.ob-pilot small { font-size: 13px; line-height: 1.35; color: var(--text-2); max-width: 22ch; }
.ob-pilot-state { margin-top: 4px; font: 600 10.5px/1.3 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.ob-pilot.on .ob-pilot-state { color: var(--text); }
.ob-home { display: grid; justify-items: center; gap: 12px; width: min(100%, 560px); }
.ob-home-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ob-home-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px 6px 7px; border-radius: var(--radius-pill); border: 1px solid var(--border-strong); background: var(--surface-solid); color: var(--text); font-weight: 600; font-size: 14px; white-space: nowrap; transition: background var(--dur-fast), border-color var(--dur-fast); }
.ob-home-chip .kicon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); color: var(--text-2); }
.ob-home-chip.on { border-color: var(--accent); background: var(--accent-soft); }
.ob-home-chip.on .kicon { background: var(--accent); color: var(--accent-ink); }
.onboard .ob-home-line { margin: 0; min-height: 2.9em; font-size: 14.5px; color: var(--text-2); max-width: 44ch; }
.ob-home-line b { color: var(--text); font-weight: 600; }
@media (max-width: 599px) {
  .onboard h1 { font-size: 32px; }
  .ob-pilot b { font-size: 21px; }
  .ob-home-chip { font-size: 13.5px; padding-right: 12px; }
}

/* ---------- the setup experience (2026-10-23): label-first scan, confirm cards, the wait, leaving, the library ---------- */
.link { background: none; border: 0; padding: 6px 0; min-height: 32px; color: var(--text); font: 600 13.5px var(--font-ui); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.scan-label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 14px; }
.label-tips { flex-basis: 100%; }
.label-tips ul { margin: 6px 0 0; padding: 10px 14px 10px 30px; border-radius: var(--radius-s); background: var(--bg-2); font-size: 13.5px; display: grid; gap: 4px; }
.label-tips li b { font-weight: 600; }
.scan-label .label-tips { flex-basis: auto; }
.scan-label .label-tips.open { flex-basis: 100%; }
.pages-note { display: block; margin-top: 8px; font-size: 12.5px; }
.photo-row .ph.label-ph { outline: 2px solid var(--accent); outline-offset: 1px; }
.scan-confirm .result, .scan-none .result { margin-bottom: 4px; }
.scan-shot { width: 96px; height: 72px; border-radius: 12px; object-fit: cover; border: 1px solid var(--border); display: grid; place-items: center; background: var(--bg-2); }
.scan-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.scan-type { margin-top: 6px; }
.scan-why { margin: 2px 0 0; font-size: 12.5px; }
.scan-alts h3 { margin: 0 0 10px; font-size: 15px; }
.alt-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: var(--radius-s); background: var(--bg-2); color: var(--text); text-decoration: none; min-height: 44px; }
.alt-row span { display: grid; gap: 2px; min-width: 0; }
.alt-row small { color: var(--text-2); font-size: 12.5px; }
.alt-row:hover { background: var(--accent-soft); }
.build-status { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; margin: 0 0 14px; border-radius: var(--radius-m); background: var(--surface-solid); border: 1px solid var(--border); box-shadow: var(--shadow-1); }
.build-status h2 { margin: 4px 0 2px; font: 400 22px/1.15 var(--font-display); overflow-wrap: anywhere; }
.build-status p { margin: 0; color: var(--text-2); font-size: 14px; }
.build-status.ready { border-color: var(--accent); background: var(--accent-soft); }
.build-status.failed { border-color: var(--danger); background: var(--danger-soft); }
@media (max-width: 560px) { .build-status { grid-template-columns: 1fr; } .build-status .btn { justify-self: start; } }
.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(160px, 200px); gap: 12px; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
.shelf > * { scroll-snap-align: start; }
.bld-parts { margin: 4px 0 18px; padding: 16px; border-radius: var(--radius-m); background: var(--surface-solid); border: 1px solid var(--border); }
.bld-parts h2 { margin: 0 0 4px; font: 600 17px var(--font-ui); }
.bld-parts > p { margin: 0 0 12px; font-size: 13.5px; }
.bld-part-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; }
.bld-part-list li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; font-size: 14px; }
.bld-part-list li i { width: 12px; height: 12px; border-radius: 3px; background: var(--c); box-shadow: inset 0 0 0 1px var(--border-strong); }
.bld-part-list li b { font: 600 12px var(--font-mono); }
.bld-part-list li small { grid-column: 2 / -1; font: 500 11.5px var(--font-mono); color: var(--text-3); }
.bld-tools { margin: 12px 0 0; font-size: 13.5px; color: var(--text-2); }
.bld-tools b { color: var(--text); font-weight: 600; }
.bld-safety { margin-top: 12px; padding: 10px 14px; border-radius: var(--radius-s); background: var(--danger-soft); font-size: 13.5px; }
.bld-safety ul { margin: 6px 0 0; padding-left: 18px; }
.bld-notify { margin-top: 8px; }
.bld-notify.on { margin: 8px 0 0; font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.bld-share { margin-top: 14px; display: grid; gap: 6px; justify-items: start; }
.bld-share small, .bld-share-note { font-size: 12.5px; color: var(--text-2); max-width: 46ch; }
.bld-share-note { margin: 12px 0 0; }
.review-row { align-items: flex-start; }
.review-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
