:root {
  --bg: #f6f7f9; --surface: #ffffff; --surface-2: #eef1f4; --text: #141a21; --muted: #5a6572;
  --line: #dde2e7; --accent: #1f5fd1; --accent-ink: #ffffff; --rec: #d92d2d; --ok: #17804a; --warn: #a85d00;
  --webspot: #2478c8; --personal: #1a2a6c; --focus: #ffb000; --radius: 14px;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 4px 16px rgba(16,24,40,.06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1720; --surface: #17212c; --surface-2: #1f2b38; --text: #e9eef3; --muted: #9aa8b6;
    --line: #2a3846; --accent: #6aa1ff; --accent-ink: #0b1320; --rec: #ff5c5c; --ok: #4cc386; --warn: #f0a443;
    --webspot: #5fb0ff; --personal: #9fb2ff; --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}
main { max-width: 860px; margin: 0 auto; padding: 16px; outline: none; }
h1 { font-size: 1.5rem; margin: 8px 0 16px; line-height: 1.25; }
h2 { font-size: 1.1rem; margin: 24px 0 8px; }
h3 { font-size: 1rem; margin: 16px 0 4px; }
p { margin: 6px 0; }
a { color: var(--accent); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.topbar {
  position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; color: var(--text); text-decoration: none; display: flex; gap: 8px; align-items: center; min-height: 44px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--rec); }
.who { display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: .9rem; }

button, .btn {
  font: inherit; min-height: 44px; min-width: 44px; padding: 10px 16px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
button:disabled { opacity: .5; cursor: not-allowed; }
.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.danger { color: var(--rec); }
.link { border: 0; background: none; color: var(--accent); padding: 8px; min-height: 44px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }

input, textarea, select {
  font: inherit; width: 100%; padding: 10px 12px; min-height: 44px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
textarea { min-height: 96px; resize: vertical; }
label { display: block; font-weight: 600; margin: 14px 0 6px; }
.hint { color: var(--muted); font-size: .9rem; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.login { max-width: 380px; margin: 12vh auto 0; }
.error { color: var(--rec); min-height: 1.5em; }

.record-cta {
  width: 100%; min-height: 72px; font-size: 1.15rem; font-weight: 700; border-radius: var(--radius);
  background: var(--rec); color: #fff; border: 0; margin: 4px 0 16px;
}
.record-cta .dot { background: #fff; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; background: var(--surface); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

.day { color: var(--muted); font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin: 20px 0 6px; }
.item {
  display: flex; gap: 12px; align-items: center; padding: 12px 14px; margin: 6px 0; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--text); min-height: 64px;
}
.item .main { flex: 1; min-width: 0; }
.item .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .sub { color: var(--muted); font-size: .9rem; }
.side { width: 6px; align-self: stretch; border-radius: 4px; }
.side.webspot { background: var(--webspot); } .side.personal { background: var(--personal); }
.chip { font-size: .8rem; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); white-space: nowrap; }
.chip.review { background: #fff1d6; color: #7a4a00; } .chip.filed { background: #dcf4e6; color: #0f6136; }
.chip.failed { background: #fde2e2; color: #9c1c1c; } .chip.recording { background: #fde2e2; color: #9c1c1c; }
@media (prefers-color-scheme: dark) {
  .chip.review { background: #3d2c0b; color: #f7c66b; } .chip.filed { background: #0f3322; color: #7fe0aa; }
  .chip.failed, .chip.recording { background: #3d1515; color: #ff9b9b; }
}
.empty { text-align: center; color: var(--muted); padding: 40px 12px; }

.side-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.side-pick button { min-height: 72px; font-weight: 700; flex-direction: column; }
.side-pick button[aria-pressed="true"] { border: 2px solid var(--accent); background: var(--surface-2); }
.results { list-style: none; padding: 0; margin: 6px 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.results li button { width: 100%; justify-content: flex-start; border: 0; border-radius: 0; border-bottom: 1px solid var(--line); text-align: left; }
.picked { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; }

.recorder { text-align: center; padding: 24px 8px; }
.timer { font-size: 3.4rem; font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: .02em; }
.meter { height: 10px; background: var(--surface-2); border-radius: 6px; overflow: hidden; margin: 16px auto; max-width: 420px; }
.meter span { display: block; height: 100%; width: 0; background: var(--ok); transition: width .1s linear; }
.rec-state { color: var(--rec); font-weight: 700; display: inline-flex; gap: 8px; align-items: center; }
.rec-state .dot { animation: pulse 1.2s infinite; }
.controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.controls button { min-height: 64px; font-weight: 700; }
.stop { background: var(--rec); color: #fff; border-color: var(--rec); }
@keyframes pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .rec-state .dot { animation: none; } .meter span { transition: none; } }

.banner { padding: 12px 14px; border-radius: 12px; margin: 10px 0; background: var(--surface-2); }
.banner.warn { background: #fff1d6; color: #5c3800; } .banner.bad { background: #fde2e2; color: #7d1414; }
@media (prefers-color-scheme: dark) { .banner.warn { background: #3d2c0b; color: #f7d394; } .banner.bad { background: #3d1515; color: #ffc0c0; } }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 16px 0 8px; overflow-x: auto; }
.tabs button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; color: var(--muted); }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); font-weight: 700; }
.minutes ul { padding-left: 20px; margin: 4px 0; }
table { border-collapse: collapse; width: 100%; }
.meta th { text-align: left; color: var(--muted); font-weight: 600; width: 30%; padding: 4px 8px 4px 0; vertical-align: top; }
.actions th, .actions td { border: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }
.line { display: grid; grid-template-columns: 64px 1fr; gap: 8px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.line button.ts { min-height: 32px; padding: 2px 6px; font-size: .85rem; font-variant-numeric: tabular-nums; }
.line .spk { font-weight: 700; font-size: .9rem; }
.line.marked { background: var(--surface-2); }
audio { width: 100%; margin: 8px 0; }
.sticky-actions { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); display: flex; gap: 8px; flex-wrap: wrap; }
.action-row { display: grid; grid-template-columns: 1fr 140px 120px 44px; gap: 6px; margin: 6px 0; }
@media (max-width: 560px) { .action-row { grid-template-columns: 1fr 1fr; } .action-row textarea { grid-column: 1 / -1; } }

#toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: #1b2430; color: #fff; padding: 10px 16px; border-radius: 10px; max-width: 90vw; display: none; z-index: 20;
}
#toast.show { display: block; }
dialog { border: 0; border-radius: var(--radius); padding: 20px; width: min(520px, 92vw); background: var(--surface); color: var(--text); }
dialog::backdrop { background: rgba(0,0,0,.45); }
.wide { width: 100%; }
.gap-top { margin-top: 6px; }
.gap-y { margin: 8px 0; }
.tools { margin: 4px 0 0; }
.tools .btn, .tools button { padding: 8px 14px; }
.grow { flex: 1; }
#danger-zone { margin-top: 24px; }
.item .title, .item .sub { display: block; }
.record-cta, .stop { background: #c62828; border-color: #c62828; color: #fff; }

/* ---- Send MARVEL, upcoming, settings (2026-10-19) ---- */
:root { --bot: #0f3b66; --ok-bg: #dcf4e6; --ok-ink: #0f6136; --bad-bg: #fde2e2; --bad-ink: #9c1c1c; }
@media (prefers-color-scheme: dark) { :root { --bot: #1d4f86; --ok-bg: #0f3322; --ok-ink: #7fe0aa; --bad-bg: #3d1515; --bad-ink: #ff9b9b; } }
.cta-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 6px; }
.cta-row .record-cta { margin: 0; }
@media (max-width: 560px) { .cta-row { grid-template-columns: 1fr; } }
.bot-cta { min-height: 72px; font-size: 1.15rem; font-weight: 700; border-radius: var(--radius); background: var(--bot); color: #fff; border: 0; }
.bot-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #fff; color: var(--bot); font-size: .95rem; font-weight: 800; }
.empty.small { padding: 14px 8px; text-align: left; }
.chip.scheduled, .chip.joining, .chip.in_call { background: #dbe9fb; color: #0b3d75; }
.chip.waiting { background: #fff1d6; color: #7a4a00; }
.chip.missed, .chip.cancelled { background: var(--surface-2); color: var(--muted); }
@media (prefers-color-scheme: dark) { .chip.scheduled, .chip.joining, .chip.in_call { background: #10294a; color: #9cc8ff; } .chip.waiting { background: #3d2c0b; color: #f7c66b; } }
.chip.level-manage { background: var(--ok-bg); color: var(--ok-ink); }
.chip.level-none { background: var(--surface-2); color: var(--muted); }
.break { overflow-wrap: anywhere; }
.block { display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { flex-wrap: wrap; }
.danger-fill { background: var(--rec); border-color: var(--rec); color: #fff; }
fieldset.plain { border: 0; padding: 0; margin: 14px 0 0; }
fieldset.plain legend { font-weight: 600; padding: 0; margin-bottom: 6px; }
.side-option { display: block; margin: 0; }
.side-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.side-option span { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 64px; border: 1px solid var(--line); border-radius: 10px; font-weight: 700; cursor: pointer; background: var(--surface); }
.side-option input:checked + span { border: 2px solid var(--accent); background: var(--surface-2); }
.side-option input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.access-row { display: grid; grid-template-columns: 110px 1fr; gap: 8px; align-items: center; margin: 6px 0; }
.access-row label { margin: 0; }
label.check { display: flex; gap: 10px; align-items: center; font-weight: 600; min-height: 44px; }
label.check input { width: 22px; height: 22px; min-height: 0; }
details summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.tabs a.tab { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 14px; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a.tab[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); font-weight: 700; }
.card.user { margin: 10px 0; }
.card.user.off { opacity: .7; }
.table-wrap { overflow-x: auto; }
table.grid th, table.grid td { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.grid select { min-width: 140px; }
ul.log, ul.sessions, ul.checks { list-style: none; padding: 0; margin: 0; }
ul.log li { margin: 8px 0; }
ul.sessions li.session { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; align-items: end; }
.filters label { margin-top: 0; }
.audit-row { display: grid; grid-template-columns: 150px 1fr; gap: 4px 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.audit-row code { grid-column: 2; font-size: .8rem; color: var(--muted); }
@media (max-width: 560px) { .audit-row { grid-template-columns: 1fr; } .audit-row code { grid-column: 1; } }
.check-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.light { flex: none; width: 14px; height: 14px; border-radius: 50%; margin-top: 5px; }
.light.ok { background: var(--ok); } .light.bad { background: var(--rec); }
.who a.link { display: inline-flex; align-items: center; }
