:root {
  --bg: #f7f3ec;
  --surface: #fffdf9;
  --surface-2: #efe9df;
  --ink: #1f1f1c;
  --text: #1f1f1c;
  --text-muted: #6d675e;
  --line: #e2dbcf;
  --grid: rgba(31, 31, 28, 0.08);
  --accent: #b4532a;
  --accent-ink: #fff;
  --ok: #2f7d4f;
  --warn: #b7791f;
  --danger: #b42318;
  --bt: #c2410c;
  --et: #2563eb;
  --ror: #15803d;
  --target: #8a8378;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(31, 31, 28, 0.06), 0 4px 16px rgba(31, 31, 28, 0.05);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #181816; --surface: #22221f; --surface-2: #2b2a26; --ink: #f3eee6; --text: #f3eee6; --text-muted: #a8a196;
    --line: #36352f; --grid: rgba(243, 238, 230, 0.08); --accent: #e07a4a; --accent-ink: #1a1a18;
    --bt: #fb923c; --et: #60a5fa; --ror: #4ade80; --target: #9c958a; --shadow: none; color-scheme: dark;
  }
  :root:not([data-theme="light"]) .brand img, :root:not([data-theme="light"]) .logo-img { filter: invert(1) hue-rotate(180deg) brightness(1.05); }
}
:root[data-theme="dark"] {
  --bg: #181816; --surface: #22221f; --surface-2: #2b2a26; --ink: #f3eee6; --text: #f3eee6; --text-muted: #a8a196;
  --line: #36352f; --grid: rgba(243, 238, 230, 0.08); --accent: #e07a4a; --accent-ink: #1a1a18;
  --bt: #fb923c; --et: #60a5fa; --ror: #4ade80; --target: #9c958a; --shadow: none; color-scheme: dark;
}
:root[data-theme="dark"] .brand img, :root[data-theme="dark"] .logo-img { filter: invert(1) hue-rotate(180deg) brightness(1.05); }

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); }
body { min-height: 100vh; padding-bottom: env(safe-area-inset-bottom); }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: 1.6rem; letter-spacing: -0.01em; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75rem; }
small, .muted { color: var(--text-muted); }
[hidden] { display: none !important; }
.icon { flex: none; vertical-align: -3px; }

/* ----- top bar ----- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1rem;
  padding: .55rem 1rem; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .45rem; text-decoration: none; flex: none; }
.brand-mark { height: 28px; width: auto; }
.brand-word { height: 20px; width: auto; }
.nav { display: flex; gap: .15rem; overflow-x: auto; scrollbar-width: none; flex: 1; }
.nav a { padding: .4rem .7rem; border-radius: 999px; text-decoration: none; color: var(--text-muted); white-space: nowrap; font-weight: 500; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.active { color: var(--accent-ink); background: var(--ink); }
:root[data-theme="dark"] .nav a.active { background: var(--accent); }
.topbar-right { display: flex; gap: .5rem; align-items: center; }

.nav a { display: inline-flex; align-items: center; gap: .35rem; }
.nav a .icon { width: 16px; height: 16px; }

/* Phones: brand on top, main navigation as a bottom tab bar. */
@media (max-width: 760px) {
  /* No backdrop-filter here: it would pin the fixed bottom nav inside the top bar. */
  .topbar { padding: .45rem 16px; padding-top: calc(.45rem + env(safe-area-inset-top)); backdrop-filter: none; background: var(--bg); }
  .brand-word { display: inline; height: 18px; }
  .nav {
    position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; gap: 0; justify-content: space-between;
    background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding: .25rem .25rem calc(.25rem + env(safe-area-inset-bottom));
  }
  .nav a { flex: 1 0 auto; min-width: 52px; flex-direction: column; gap: .1rem; padding: .3rem .25rem; border-radius: 10px; font-size: .68rem; font-weight: 600; }
  .nav a .icon { width: 22px; height: 22px; }
  .nav a.active { background: transparent; color: var(--accent); }
  :root[data-theme="dark"] .nav a.active { background: transparent; }
  body.watching .nav { display: none; }
}

main { padding: 1.25rem; max-width: 1400px; margin: 0 auto; outline: none; }
@media (max-width: 760px) { main { padding: .75rem 16px calc(5.5rem + env(safe-area-inset-bottom)); } body.watching main { padding-bottom: 2rem; } }

/* ----- building blocks ----- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.card + .card { margin-top: 1rem; }
.grid { display: grid; gap: 1rem; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: .75rem; }
.spacer { flex: 1; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { margin: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 38px;
  padding: .45rem .9rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; touch-action: manipulation;
}
.btn:hover:not(:disabled) { background: var(--surface-2); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover:not(:disabled) { background: color-mix(in srgb, var(--ink) 85%, var(--accent)); }
.btn.accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.btn.danger.solid { background: var(--danger); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.small { min-height: 30px; padding: .25rem .6rem; font-size: .88rem; }
.btn.big { min-height: 52px; padding: .6rem 1.2rem; font-size: 1.05rem; }
.btn.icon-only { padding: .4rem; min-width: 38px; }
.btn.on { background: var(--ink); color: var(--bg); }
.btn:focus-visible, .input:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--surface-2); color: var(--text-muted); white-space: nowrap; }
.chip.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.chip.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.chip.danger { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.chip.rec { background: var(--danger); color: #fff; }
.chip.rec::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .2; } }

.field { display: flex; flex-direction: column; gap: .25rem; font-size: .88rem; font-weight: 600; color: var(--text-muted); }
.field > span { color: var(--text-muted); }
.input { font: inherit; font-weight: 400; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: .45rem .6rem; min-height: 38px; width: 100%; }
textarea.input { min-height: 90px; resize: vertical; }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 500; color: var(--text); }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.form-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.hint { font-weight: 400; }

table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: .5rem .55rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); font-weight: 600; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--surface-2); }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }

.empty { text-align: center; padding: 2.5rem 1rem; color: var(--text-muted); }
.empty .logo-img { max-width: 360px; width: 80%; margin: 0 auto 1.25rem; display: block; }

/* ----- dashboard ----- */
.hero { display: grid; gap: 1.5rem; place-items: center; text-align: center; padding: 2rem 1rem; }
.hero .logo-img { width: min(520px, 90%); }
.hero p { max-width: 560px; color: var(--text-muted); }
.john { display: grid; grid-template-columns: 112px 1fr; gap: 1rem; align-items: center; }
.john img { width: 112px; height: 140px; object-fit: cover; border-radius: 12px; }
.john-say { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border-radius: 12px; padding: .75rem .9rem; }
.john-say p { margin: .3rem 0 0; color: var(--text-muted); }
.guide { max-width: 760px; margin: 0 auto 1.5rem; }
.guide ol { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .9rem; }
.guide-step { display: grid; grid-template-columns: 2rem 1fr; gap: .75rem; align-items: start; }
.guide-step p { margin: .2rem 0 0; color: var(--text-muted); }
.guide-n { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; }
.roaster-card { display: flex; flex-direction: column; gap: .6rem; }
.roaster-card .temps { display: flex; gap: 1.25rem; }
.big-num { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.big-num small { font-size: .8rem; font-weight: 600; display: block; color: var(--text-muted); margin-bottom: .2rem; text-transform: uppercase; letter-spacing: .05em; }
.swatch { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* ----- roaster tabs ----- */
.tabbar { position: sticky; top: var(--topbar-h, 52px); z-index: 12; display: flex; align-items: center; gap: .5rem; margin: -1.25rem -1.25rem 1rem; padding: .5rem 1.25rem 0; background: var(--bg); border-bottom: 1px solid var(--line); }
.tabstrip { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.tabstrip::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .85rem .55rem; border: 1px solid transparent; border-bottom: 0; border-radius: 12px 12px 0 0; text-decoration: none; color: var(--text-muted); background: none; font: inherit; cursor: pointer; white-space: nowrap; flex: none; position: relative; top: 1px; }
.tab:hover { color: var(--text); background: var(--surface-2); }
.tab.active { color: var(--text); background: var(--surface); border-color: var(--line); }
.tab .swatch { width: 10px; height: 10px; flex: none; }
.tab.offline .swatch { opacity: .35; }
.tab-text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.tab-name { font-weight: 700; }
.tab-sub { font-size: .76rem; font-variant-numeric: tabular-nums; color: var(--text-muted); }
.tab.recording .tab-sub { color: var(--danger); font-weight: 700; }
.tab.add { font-weight: 600; }
.live-link { flex: none; margin-bottom: .35rem; }
.live-link.on { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.tabpanel { min-height: 50vh; }
.offline-panel { max-width: 720px; }
.qr { width: min(240px, 70vw); margin: 0 auto; background: #fff; padding: 8px; border-radius: 12px; }
.qr svg { display: block; width: 100%; height: auto; }
@media (max-width: 760px) {
  .tabbar { margin: -.75rem -16px .75rem; padding: .4rem 16px 0; }
  .tab { padding: .45rem .7rem .5rem; }
  .live-link span { display: none; }
  .hide-phone { display: none !important; }
}
@media (min-width: 761px) { .show-phone { display: none !important; } }

/* ----- live roast ----- */
.live-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.live-timer { flex-wrap: nowrap; }
.live { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; }
.live > * { min-width: 0; }
@media (max-width: 1000px) { .live { grid-template-columns: 1fr; } }
.readouts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: .5rem; margin-bottom: .75rem; }
.readout { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .6rem .75rem; }
.readout .label { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.readout .value { font-size: 1.85rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.readout.bt .value { color: var(--bt); }
.readout.et .value { color: var(--et); }
.readout.ror .value { color: var(--ror); }
.chart { position: relative; overflow: hidden; min-width: 0; height: clamp(300px, 55vh, 620px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.chart.small { height: 260px; }
.chart-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: pan-y; }
.chart-tip { position: absolute; display: none; pointer-events: none; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .35rem .55rem; font-size: .8rem; box-shadow: var(--shadow); white-space: nowrap; z-index: 2; }
.events { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: .5rem; margin-top: .75rem; }
.events .btn { flex-direction: column; gap: 0; min-height: 56px; line-height: 1.15; }
.events .btn small { font-weight: 500; font-variant-numeric: tabular-nums; }
.events .btn.done { background: var(--surface-2); border-color: var(--ink); }
.events .btn.drop { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.side { display: flex; flex-direction: column; gap: 1rem; }
.control { display: grid; grid-template-columns: 1fr auto; gap: .35rem .75rem; align-items: center; }
.control + .control { margin-top: .9rem; }
.control .name { font-weight: 700; display: flex; align-items: center; gap: .4rem; }
.control .val { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 3ch; text-align: right; }
.control .steps { grid-column: 1 / -1; display: grid; grid-template-columns: 52px 1fr 52px; gap: .5rem; align-items: center; }
.control input[type="range"] { width: 100%; accent-color: var(--accent); height: 30px; }
.control .btn { min-height: 44px; font-size: 1.3rem; }
.steps-list { list-style: none; margin: 0; padding: 0; font-size: .88rem; }
.steps-list li { display: flex; justify-content: space-between; gap: .5rem; padding: .3rem 0; border-bottom: 1px dashed var(--line); }
.steps-list li.fired { color: var(--text-muted); text-decoration: line-through; }
.steps-list li.next { font-weight: 700; }
.alert-banner { padding: .6rem .85rem; border-radius: 10px; background: color-mix(in srgb, var(--warn) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); font-weight: 600; }
.alert-banner.danger { background: var(--danger); color: #fff; border-color: var(--danger); cursor: pointer; }
.timer { font-size: 2.2rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.phase-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--surface-2); }
.phase-bar > div { height: 100%; }
.phase-bar .dry { background: #d6c27a; }
.phase-bar .mai { background: #c08a4a; }
.phase-bar .dev { background: #6b3f22; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .82rem; color: var(--text-muted); }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; font-size: .92rem; }
.kv dt { color: var(--text-muted); }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }

.stars { display: inline-flex; gap: 1px; }
.star { background: none; border: 0; padding: 0 1px; font-size: 1.15rem; color: var(--line); cursor: default; line-height: 1; }
.stars.editable .star { cursor: pointer; }
.star.on { color: #d4a017; }

/* ----- presets ----- */
.step-row { display: grid; grid-template-columns: 1.1fr 1.6fr repeat(3, .6fr) 1.4fr auto; gap: .4rem; align-items: end; padding: .5rem 0; border-bottom: 1px dashed var(--line); }
@media (max-width: 900px) { .step-row { grid-template-columns: 1fr 1fr; } }
.tag { display: inline-block; font-size: .75rem; padding: .05rem .45rem; border-radius: 6px; background: var(--surface-2); color: var(--text-muted); margin-right: .25rem; }

/* ----- community ----- */
.market-card { display: flex; flex-direction: column; gap: .5rem; cursor: pointer; }
.market-card:hover { border-color: var(--ink); }
.price { font-weight: 800; }
.comment { padding: .6rem 0; border-bottom: 1px solid var(--line); }
.comment b { margin-right: .4rem; }
.plan { border: 2px solid var(--line); }
.plan.current { border-color: var(--accent); }

/* ----- dialogs, toasts ----- */
dialog.modal { border: 1px solid var(--line); border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
dialog.modal.wide { width: min(900px, calc(100vw - 32px)); }
dialog.modal::backdrop { background: rgba(20, 18, 15, .45); }
dialog.modal header { display: flex; align-items: center; justify-content: space-between; padding: .85rem 1rem .4rem; }
dialog.modal header h2 { margin: 0; }
.modal-body { padding: .5rem 1rem 1rem; max-height: 70vh; overflow: auto; }
dialog.modal footer { display: flex; justify-content: flex-end; gap: .5rem; padding: .75rem 1rem; border-top: 1px solid var(--line); }
.toasts { position: fixed; z-index: 100; bottom: 1rem; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: .5rem; align-items: center; pointer-events: none; width: min(520px, calc(100vw - 32px)); }
.toast { pointer-events: auto; background: var(--ink); color: var(--bg); padding: .6rem 1rem; border-radius: 10px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.2); transition: opacity .35s, transform .35s; }
.toast.error { background: var(--danger); color: #fff; }
.toast.warn { background: var(--warn); color: #fff; }
.toast.out { opacity: 0; transform: translateY(8px); }
.update-bar { position: fixed; bottom: 1rem; right: 1rem; z-index: 90; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .6rem .8rem; box-shadow: var(--shadow); display: flex; gap: .75rem; align-items: center; }
.spark { color: var(--bt); display: block; }
.compare-pick { display: flex; flex-wrap: wrap; gap: .4rem; }
.compare-pick .chip { padding: .3rem .4rem .3rem .65rem; color: var(--text); }
.compare-pick .chip button { border: 0; background: none; cursor: pointer; color: inherit; padding: 0 .2rem; font-size: 1rem; }
.delta-pos { color: var(--danger); }
.delta-neg { color: var(--ok); }

/* ----- phones: live roast ----- */
@media (max-width: 760px) {
  .live-head { position: sticky; top: calc(var(--topbar-h, 52px) + var(--tabbar-h, 58px)); z-index: 11; background: var(--bg); margin: 0 -16px .5rem; padding: .35rem 16px; border-bottom: 1px solid var(--line); }
  .live-head .timer { font-size: 1.7rem; }
  .readouts { grid-template-columns: repeat(2, 1fr); gap: .4rem; }
  .readout { padding: .45rem .6rem; }
  .readout .value { font-size: 1.6rem; }
  .readout.dev .value, .readout.delta .value { font-size: 1.15rem; }
  .chart { height: clamp(240px, 48vh, 420px); }
  .events { grid-template-columns: repeat(3, 1fr); gap: .4rem; }
  .events .btn { min-height: 52px; font-size: .9rem; padding: .35rem; }
  .control .btn { min-height: 48px; }
  .page-head h1 { font-size: 1.35rem; }
  .card { padding: .85rem; }
}

/* ----- watch (phone live view) ----- */
.watch-head { margin-bottom: .75rem; }
.watch-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: .25rem; }
.watch-top .timer { font-size: 2.6rem; }
.watch-chart { margin-top: .75rem; }
.control-chips { margin: .25rem 0 .5rem; }
.watch-events { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .4rem; margin-top: .75rem; }
.watch-event { display: flex; justify-content: space-between; gap: .5rem; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.watch-event.done { color: var(--text); border-color: var(--ink); }
.stale { color: var(--warn) !important; font-weight: 700; }
.watch-notice { position: fixed; z-index: 95; left: 50%; top: calc(var(--topbar-h, 52px) + .75rem); transform: translateX(-50%); background: var(--accent); color: var(--accent-ink); padding: .65rem 1.1rem; border-radius: 12px; font-weight: 700; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
@media (max-width: 760px) {
  .watch-top .timer { font-size: 2.2rem; }
  .watch-events { grid-template-columns: repeat(2, 1fr); }
}

/* ----- roaster overview (cards) ----- */
.overview { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(400px, 100%), 1fr)); gap: .9rem; }
.rc-stats span { white-space: nowrap; }
.overview .card + .card { margin-top: 0; }
.roaster-card { display: flex; flex-direction: column; gap: .5rem; text-decoration: none; color: inherit; text-align: left; font: inherit; cursor: pointer; border-left: 5px solid var(--line); }
.roaster-card:hover { border-color: var(--ink); }
.roaster-card.recording { border-left-color: var(--danger); }
.roaster-card.offline { opacity: .72; }
.rc-head { display: flex; align-items: center; gap: .5rem; }
.rc-name { font-weight: 800; font-size: 1.05rem; }
.rc-body { display: flex; align-items: flex-end; justify-content: space-between; gap: .75rem; }
.rc-bt { font-size: 2.6rem; font-weight: 800; line-height: 1; color: var(--bt); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.roaster-card.offline .rc-bt { color: var(--text-muted); }
.rc-stats { display: flex; gap: .85rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.rc-stats div { display: flex; flex-direction: column; align-items: flex-end; }
.rc-stats small { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 700; }
.rc-spark svg { display: block; width: 100%; height: 44px; }
.rc-foot { font-size: .82rem; color: var(--text-muted); min-height: 1em; }
.rc-alert { color: var(--accent); }
.add-card { align-items: center; justify-content: center; min-height: 160px; border-style: dashed; border-left-width: 1px; color: var(--text-muted); font-weight: 700; }

/* ----- phone header bar (replaces tabs) ----- */
.phonebar { gap: .4rem; padding-top: .35rem; padding-bottom: .35rem; }
.phonebar h1 { margin: 0; font-size: 1.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.phonebar .live-link { margin-bottom: 0; }
.phonebar .icon-only { font-size: 1.5rem; line-height: 1; min-width: 40px; }
.phonebar .back { padding-left: .2rem; }
@media (max-width: 760px) {
  .overview { grid-template-columns: 1fr; gap: .6rem; }
  .rc-bt { font-size: 2.3rem; }
  .live-head { top: calc(var(--topbar-h, 52px) + var(--tabbar-h, 48px)); }
}
@media (max-width: 760px) {
  /* The phone bar already names the roaster. */
  .phonebar:not([hidden]) + .tabpanel .watch-top h2,
  .phonebar:not([hidden]) + .tabpanel .watch-top .swatch { display: none; }
}
