:root {
  --bg: #14110f; --panel: #1e1a17; --line: #3a322c; --text: #f3ece4; --muted: #b5a99c;
  --accent: #e8b04a; --rec: #e5484d; --ok: #46a758; --warn: #f5a524; --danger: #ff6b6b;
  --radius: 14px; --tap: 48px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body { padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: var(--accent); color: #000; padding: 8px; z-index: 9; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2 { line-height: 1.2; } h2 { font-size: 1.15rem; margin: 1.2rem 0 .5rem; }
.brand { font-family: Georgia, "Times New Roman", serif; letter-spacing: .02em; font-size: 2.2rem; margin: 0; }
.brand.small { font-size: 1.25rem; }
.muted { color: var(--muted); }
.error { color: var(--danger); min-height: 1.2em; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.narrow { max-width: 420px; margin: 12vh auto 0; display: grid; gap: 12px; }
.topbar { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; background: rgba(20,17,15,.95); border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 4px; margin-left: auto; }
.tabs [role=tab] { min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text); font: inherit; font-size: .95rem; }
.tabs [aria-selected=true] { background: var(--accent); color: #1b1307; border-color: var(--accent); font-weight: 600; }
.chip { font-size: .8rem; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.chip.off { color: #1b1307; background: var(--warn); border-color: var(--warn); }
main { max-width: 760px; margin: 0 auto; padding: 16px 14px 80px; }
.label { display: block; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 6px; }
input, textarea { width: 100%; font: inherit; color: var(--text); background: #0f0d0c; border: 1px solid var(--line); border-radius: 10px; padding: 12px; min-height: var(--tap); }
textarea { resize: vertical; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chips button { min-height: 36px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); padding: 0 12px; font: inherit; font-size: .9rem; }
fieldset { border: 0; padding: 0; margin: 0; }
.mode { display: flex; gap: 8px; flex-wrap: wrap; } .mode legend { width: 100%; }
.seg { flex: 1; } .seg input { position: absolute; opacity: 0; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: var(--tap); border: 1px solid var(--line); border-radius: 10px; }
.seg input:checked + span { border-color: var(--accent); background: rgba(232,176,74,.15); font-weight: 600; }
.seg input:focus-visible + span { outline: 3px solid var(--accent); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap); padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.small { min-height: 38px; font-size: .9rem; padding: 0 12px; }
.btn.primary { background: var(--accent); color: #1b1307; border-color: var(--accent); }
.btn.danger { color: var(--danger); border-color: #6b2c2c; }
.btn.big { min-height: 56px; font-size: 1.1rem; width: 100%; }
.btn.huge { width: 100%; min-height: 96px; font-size: 1.6rem; border-radius: 20px; margin-top: 16px; }
.btn.rec { background: var(--rec); border-color: var(--rec); color: #fff; }
.btn.rec.ready { box-shadow: 0 0 0 4px rgba(229,72,77,.35); }
.btn.stop { background: #f3ece4; color: #14110f; border-color: #f3ece4; }
.preview { width: 100%; max-height: 42vh; background: #000; border-radius: var(--radius); margin-top: 14px; object-fit: cover; }
#rec-live { text-align: center; padding: 28px 0; }
.live-title { font-family: Georgia, serif; font-size: 1.8rem; margin: 0; word-break: break-word; }
.timer { font-variant-numeric: tabular-nums; font-size: 4rem; font-weight: 700; margin: 8px 0; }
.dot { display: inline-block; width: 16px; height: 16px; border-radius: 50%; background: var(--rec); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } }
.row { display: flex; gap: 10px; margin-top: 12px; } .row.wrap { flex-wrap: wrap; } .row > .btn { flex: 1 1 auto; }
.check { display: flex; align-items: center; gap: 8px; margin: 10px 0; } .check input { width: 22px; min-height: 22px; }
.song { border: 1px solid var(--line); border-radius: var(--radius); margin: 12px 0; background: var(--panel); }
.song > h3 { margin: 0; padding: 12px 14px; font-size: 1.05rem; font-family: Georgia, serif; border-bottom: 1px solid var(--line); }
.take { display: flex; width: 100%; text-align: left; gap: 10px; align-items: center; justify-content: space-between; min-height: 60px; padding: 10px 14px; background: transparent; color: var(--text); border: 0; border-top: 1px solid #2a2420; font: inherit; cursor: pointer; }
.take:first-of-type { border-top: 0; }
.take .meta { color: var(--muted); font-size: .9rem; }
.badge { font-size: .78rem; padding: 3px 8px; border-radius: 999px; white-space: nowrap; border: 1px solid var(--line); }
.badge.local { color: var(--muted); } .badge.pending { color: var(--warn); border-color: #6b5321; }
.badge.uploading { color: var(--accent); } .badge.ok { color: #0c1a0e; background: var(--ok); border-color: var(--ok); }
.badge.attention { color: #fff; background: #a23b3b; border-color: #a23b3b; } .badge.archived { color: var(--muted); }
.badge.external { color: #9fc5ff; border-color: #2d4466; }
dialog { width: min(680px, 96vw); max-height: 92vh; overflow: auto; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
dialog::backdrop { background: rgba(0,0,0,.6); }
.dialog-close { float: right; }
.radio { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; } .radio input { width: 22px; min-height: 22px; margin-top: 2px; }
audio, video.player { width: 100%; margin: 10px 0; border-radius: 10px; }
.code { font-size: 2.4rem; letter-spacing: .3em; font-variant-numeric: tabular-nums; text-align: center; font-weight: 700; }
.status { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; } .status dt { color: var(--muted); }
.conflict { border-left: 3px solid var(--warn); padding: 6px 10px; margin: 8px 0; white-space: pre-wrap; }
@media (min-width: 900px) { main { padding-top: 28px; } .btn.huge { min-height: 84px; } }
