:root {
  --paper: #f4f2ed; --raised: #fbfaf7; --ink: #1a1918; --soft: #696660; --mid: #44413d;
  --line: #bdb9b0; --fine: #dad6ce;
  --accent: #da376a; --accent-deep: #a9093e; --accent-pale: #ffc6d8;
  --artist: var(--accent-deep); --artist-pale: #ffe8ef;
  --tint: color-mix(in srgb, var(--paper) 90%, var(--accent) 10%);
  --good: #17643e; --good-bg: #dcece2; --warn: #9a520f; --warn-bg: #f8e6cf; --bad: #b8173f; --bad-bg: #f3dce3;
  --sb-bg: #171615; --sb-text: #f0efeb; --sb-muted: #9d9b96; --sb-line: #3a3936;
  --font: "Avenir Next", Avenir, "Nunito Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #191817; --raised: #232220; --ink: #f2efe8; --soft: #aaa69e; --mid: #d0cdc5; --line: #615e58; --fine: #393734;
    --accent: #ff739d; --accent-deep: #ff9ab8; --accent-pale: #542637; --artist-pale: #3f1d2a;
    --good: #83d6ad; --good-bg: #173d2d; --warn: #f2b36b; --warn-bg: #45301a; --bad: #ff85a6; --bad-bg: #4a1d2b;
    --sb-bg: #0f0f0e; --sb-line: #2e2e2c;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #191817; --raised: #232220; --ink: #f2efe8; --soft: #aaa69e; --mid: #d0cdc5; --line: #615e58; --fine: #393734;
  --accent: #ff739d; --accent-deep: #ff9ab8; --accent-pale: #542637; --artist-pale: #3f1d2a;
  --good: #83d6ad; --good-bg: #173d2d; --warn: #f2b36b; --warn-bg: #45301a; --bad: #ff85a6; --bad-bg: #4a1d2b;
  --sb-bg: #0f0f0e; --sb-line: #2e2e2c;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: linear-gradient(90deg, transparent 0, transparent calc(100% - 1px), rgba(110,103,93,.055) calc(100% - 1px)) 0 0 / 80px 100%, var(--paper);
  color: var(--ink); font-family: var(--font); font-size: 14px; letter-spacing: -.01em; line-height: 1.5;
}
a { color: var(--accent-deep); text-underline-offset: 2px; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-pale); color: var(--ink); }
h1, h2, h3 { text-wrap: balance; margin: 0; }
.tnum { font-variant-numeric: tabular-nums; }
.label, .eyebrow, .kicker { font: 400 11px/1.2 var(--font); letter-spacing: .09em; text-transform: uppercase; color: var(--soft); }
.kicker { color: var(--accent-deep); }

/* Shell + sidebar (from the Plus One sidebar) */
.shell { display: flex; min-height: 100%; }
.sb { width: 244px; flex: 0 0 244px; background: var(--sb-bg); color: var(--sb-text); position: sticky; top: env(safe-area-inset-top, 0px); height: 100vh; display: flex; flex-direction: column; border-right: 1px solid var(--sb-line); }
.sb-brand { min-height: 88px; padding: 20px; display: flex; flex-direction: column; justify-content: center; gap: 9px; border-bottom: 1px solid var(--sb-line); }
.sb-brand img { width: 168px; max-width: 100%; height: auto; display: block; }
.sb-brand span { color: var(--sb-muted); font: 500 10px/1.2 var(--font); letter-spacing: .08em; text-transform: uppercase; }
.sb-sec { padding: 18px 0 14px; }
.sb-label { display: block; margin: 0 20px 10px; color: var(--sb-muted); font: 600 10px/1 var(--font); letter-spacing: .09em; text-transform: uppercase; }
.sb-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 20px; border: 0; background: none; color: #bbb9b4; text-align: left; font: 600 12px/1.2 var(--font); letter-spacing: .09em; text-transform: uppercase; cursor: pointer; }
.sb-item:hover { color: var(--sb-text); background: rgba(255,255,255,.05); }
.sb-item.on { color: var(--sb-text); background: rgba(212,92,127,.13); box-shadow: inset 3px 0 0 var(--accent); }
.sb-dot { width: 6px; height: 6px; background: var(--accent); flex: 0 0 auto; }
.sb-item.add { color: var(--sb-muted); }
.sb-foot { margin-top: auto; padding: 14px 20px 16px; border-top: 1px solid var(--sb-line); color: var(--sb-muted); font: 500 9px/1.5 var(--font); letter-spacing: .08em; text-transform: uppercase; }
.sb-foot b { display: block; color: var(--sb-text); font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; margin-bottom: 2px; }
.main { flex: 1; min-width: 0; padding-inline: 28px; padding-block: 0 56px; }
.wrap { max-width: 1320px; margin: 0 auto; }

/* Scoreboard */
.board { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); border: 1px solid var(--line); border-top: 0; background: var(--raised); min-height: 280px; }
.b-title { padding: 30px 32px 26px; border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.b-title .kicker { margin-bottom: 20px; }
.big { font-size: clamp(44px, 5vw, 76px); font-weight: 500; line-height: .9; letter-spacing: -.075em; overflow-wrap: anywhere; }
.b-sub { margin-top: auto; padding-top: 22px; color: var(--soft); font-size: 12px; }
.b-sub b { color: var(--ink); font-weight: 600; }
.b-meta { display: flex; flex-wrap: wrap; margin-top: 12px; border: 1px solid var(--fine); }
.b-meta > * { padding: 6px 9px; border-right: 1px solid var(--fine); color: var(--soft); font: 400 10px/1 var(--font); letter-spacing: .04em; text-transform: uppercase; text-decoration: none; }
.b-meta > *:last-child { border-right: 0; }
.b-meta .on { background: var(--accent); color: #16090d; }
.b-ink { padding: 30px; background: var(--ink); color: var(--paper); display: flex; flex-direction: column; justify-content: center; overflow: hidden; min-width: 0; }
.b-ink .label { color: var(--accent); }
.huge { margin: 12px 0 8px; font-size: clamp(56px, 6.4vw, 100px); font-weight: 500; line-height: .9; letter-spacing: -.075em; white-space: nowrap; }
.huge small { font-size: .32em; letter-spacing: -.02em; margin-left: 6px; }
.b-ink .sub { color: color-mix(in srgb, var(--paper) 65%, transparent); font-size: 11px; }
.board { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 300px; min-height: 300px; }
.b-cover { position: relative; margin: 0; border-left: 1px solid var(--line); background: var(--accent-pale); overflow: hidden; }
.b-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.b-cover figcaption { position: absolute; left: 0; bottom: 0; padding: 6px 10px; background: var(--ink); color: var(--paper); font: 400 10px/1.2 var(--font); letter-spacing: .08em; text-transform: uppercase; }
.b-cover.empty figcaption { position: static; background: none; color: var(--soft); padding: 20px; }
.th { width: 36px; height: 36px; object-fit: cover; display: block; flex: 0 0 36px; border: 1px solid var(--fine); }
.tt { display: flex; align-items: center; gap: 10px; }
.tl-what .tt .th { width: 30px; height: 30px; flex-basis: 30px; }
.cv .th { width: 28px; height: 28px; flex-basis: 28px; align-self: center; }
.d-cover { display: block; width: 160px; height: 160px; object-fit: cover; margin: 14px 0 4px; border: 5px solid var(--raised); box-shadow: 7px 7px 0 rgba(22,9,13,.16); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-top: 0; margin-bottom: 28px; }
.stat { min-height: 88px; padding: 16px 20px; border-right: 1px solid var(--line); background: color-mix(in srgb, var(--raised) 92%, var(--accent) 8%); }
.stat:last-child { border-right: 0; }
.stat .l { font: 400 9px/1.2 var(--font); letter-spacing: .09em; text-transform: uppercase; color: var(--soft); margin-bottom: 8px; }
.stat .n { font-size: 27px; font-weight: 500; letter-spacing: -.04em; line-height: 1.1; }
.stat .s { font-size: 10px; color: var(--soft); }
.stat.warn .l { color: var(--warn); }

/* Panels: square, hairline */
.panel { background: var(--raised); border: 1px solid var(--line); }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 8px 16px; border-bottom: 1px solid var(--line); background: var(--tint); }
.panel-h h3 { font: 600 11px/1.2 var(--font); letter-spacing: .09em; text-transform: uppercase; color: var(--ink); }
.panel-b { padding: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.stack { display: grid; gap: 20px; }
.muted { color: var(--soft); }
.empty { color: var(--soft); font-style: italic; }

.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 5px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.chip.good { background: var(--good-bg); color: var(--good); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.art { background: var(--artist-pale); color: var(--accent-deep); }
.chip.plain { background: var(--paper); color: var(--soft); font-weight: 600; }
.btn { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 0; background: transparent; font: 600 10.5px/1 var(--font); letter-spacing: .07em; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.solid { background: var(--accent); border-color: var(--accent); color: #16090d; }
.btn.solid:hover { background: #f05c8a; border-color: #f05c8a; color: #16090d; }

/* Lists */
.list { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 8px 16px; border-top: 1px solid var(--fine); }
.row:first-child { border-top: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .t { font-weight: 600; font-size: 14px; }
.row .s { font-size: 11px; color: var(--soft); }
.row button.link { border: 1px solid var(--line); background: none; color: var(--ink); font: 600 10px/1 var(--font); letter-spacing: .07em; text-transform: uppercase; padding: 7px 10px; cursor: pointer; }
.row button.link:hover { background: var(--ink); color: var(--paper); }
.sev { width: 6px; align-self: stretch; margin: -8px 0; flex: 0 0 6px; }
.sev.warn { background: var(--warn); } .sev.bad { background: var(--bad); } .sev.plain { background: var(--line); }
.date-tile { width: 48px; flex: 0 0 48px; text-align: center; border: 1px solid var(--line); padding: 4px 0; background: var(--paper); }
.date-tile .m { font: 400 9px/1.2 var(--font); letter-spacing: .09em; text-transform: uppercase; color: var(--accent-deep); }
.date-tile .d { font-size: 20px; font-weight: 500; letter-spacing: -.04em; line-height: 1.1; }

/* Quick copy strip */
.qc { display: flex; flex-wrap: wrap; align-items: stretch; border: 1px solid var(--line); border-top: 0; background: var(--raised); }
.qc-h { display: flex; flex-direction: column; justify-content: center; padding: 8px 16px; border-right: 1px solid var(--fine); min-width: 150px; }
.qc-h b { font: 600 10px/1.2 var(--font); letter-spacing: .09em; text-transform: uppercase; }
.qc-h span { font-size: 11px; color: var(--soft); }
.qc-grid { display: flex; flex-wrap: wrap; flex: 1; }
.qbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 13px; border: 0; border-right: 1px solid var(--fine); border-bottom: 1px solid var(--fine); margin-bottom: -1px; background: transparent; color: var(--soft); font: 500 10px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.qbtn:hover { color: var(--ink); background: var(--tint); }
.qbtn .ic { font-size: 11px; color: var(--accent); }
.qbtn:disabled { opacity: .4; cursor: not-allowed; }
.qbtn:disabled:hover { background: transparent; color: var(--soft); }
.qbtn.done { background: var(--good-bg); color: var(--good); }

/* Tabs: the ink strip */
.tabs { display: flex; flex-wrap: wrap; background: var(--ink); margin: 20px 0 20px; border-bottom: 2px solid var(--ink); }
.tab { position: relative; min-height: 50px; padding: 0 18px; border: 0; border-right: 1px solid color-mix(in srgb, var(--paper) 18%, transparent); background: transparent; color: color-mix(in srgb, var(--paper) 78%, transparent); font: 600 11.5px/1 var(--font); letter-spacing: .09em; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--paper); background: color-mix(in srgb, var(--paper) 10%, transparent); }
.tab.on { background: var(--paper); color: var(--ink); }
.tab.on::after { content: ""; position: absolute; inset: auto 0 0; height: 3px; background: var(--accent); }
.tab .ct { margin-left: 6px; font-weight: 500; opacity: .7; }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }

/* Timeline */
.tl { padding: 6px 16px 14px; }
.tl-row { display: grid; grid-template-columns: 64px 14px 1fr; gap: 12px; align-items: start; padding: 10px 0; }
.tl-date { font-weight: 500; font-size: 17px; letter-spacing: -.04em; text-align: right; line-height: 1.1; }
.tl-date small { display: block; font: 400 9px/1.4 var(--font); letter-spacing: .09em; text-transform: uppercase; color: var(--accent-deep); }
.tl-pin { width: 11px; height: 11px; border: 2px solid var(--accent); background: var(--raised); margin-top: 5px; position: relative; }
.tl-pin.done { background: var(--accent); }
.tl-row:not(:last-child) .tl-pin::after { content: ""; position: absolute; left: 2.5px; top: 11px; width: 2px; height: 46px; background: var(--fine); }
.tl-what .t { font-weight: 600; }
.tl-what .s { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

/* Tables */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--raised); }
thead tr { background: var(--tint); }
th { text-align: left; font: 600 11px/1.2 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--soft); padding: 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { height: 54px; padding: 7px 12px; border-bottom: 1px solid var(--fine); vertical-align: middle; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--tint); }
td.num { color: var(--soft); width: 36px; }
td b { font-weight: 600; font-size: 14px; }
td .code { font-family: var(--mono); font-size: 12px; }
.ok { color: var(--good); font-weight: 700; }
.miss { color: var(--soft); }

/* Fields */
.fields { display: grid; grid-template-columns: 150px 1fr; gap: 10px 16px; align-items: baseline; margin: 0; }
.fields dt { font: 400 10px/1.4 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
.fields dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.copyable, .cv { display: inline-flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.copyable code { font-family: var(--mono); font-size: 12.5px; }
.cp { border: 1px solid var(--fine); background: none; color: var(--soft); font: 600 9.5px/1 var(--font); letter-spacing: .07em; text-transform: uppercase; cursor: pointer; padding: 4px 6px; }
.cp:hover { color: var(--ink); border-color: var(--ink); }
.cp.ok2 { color: var(--good); border-color: var(--good); }
input.inline, textarea.area { width: 100%; border: 1px solid var(--line); border-radius: 0; background: var(--paper); padding: 9px 11px; outline: none; }
input.inline:focus, textarea.area:focus { border-color: var(--accent); background: var(--raised); }
textarea.area { resize: vertical; line-height: 1.55; }
.counter { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; font-size: 12px; }
.meter { flex: 1; height: 4px; background: var(--fine); overflow: hidden; max-width: 260px; }
.meter i { display: block; height: 100%; background: var(--accent); }
.meter.over i { background: var(--bad); }
.rule { font-size: 12px; color: var(--soft); margin: 0 0 10px; }
.pill-list { display: flex; flex-wrap: wrap; gap: 6px; }

.lk-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--fine); }
.lk { display: grid; grid-template-columns: 100px minmax(0,1fr) auto auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--fine); }
.lk .l { font: 600 10px/1.2 var(--font); letter-spacing: .08em; text-transform: uppercase; }
.lk .u { font-size: 12px; color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lk a { font: 600 9.5px/1 var(--font); letter-spacing: .07em; text-transform: uppercase; text-decoration: none; }

/* Checklist */
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-top: 1px solid var(--fine); cursor: pointer; }
.check:first-of-type { border-top: 0; }
.check input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex: 0 0 auto; }
.check .t { font-weight: 600; }
.check.done .t { color: var(--soft); text-decoration: line-through; text-decoration-color: var(--line); }
.check .n { font-size: 12px; color: var(--soft); margin-top: 2px; }
.progress { height: 6px; background: var(--fine); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); }

.hl { display: grid; grid-template-columns: 52px 1fr; gap: 12px; padding: 9px 0; border-top: 1px solid var(--fine); }
.hl:first-child { border-top: 0; }
.hl .y { font-weight: 500; font-size: 15px; letter-spacing: -.04em; color: var(--accent-deep); }

/* Drawer */
.scrim { position: fixed; inset: 0; background: rgba(20,19,18,.4); z-index: 20; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(580px, 100%); background: var(--raised); border-left: 1px solid var(--accent); z-index: 21; overflow-y: auto; padding: calc(24px + env(safe-area-inset-top, 0px)) 26px calc(32px + env(safe-area-inset-bottom, 0px)); }
.drawer h2 { font-size: 40px; font-weight: 500; letter-spacing: -.07em; line-height: .95; margin-top: 10px; }
.drawer .sec { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--line); }
.drawer .sec > .eyebrow { margin-bottom: 12px; color: var(--accent-deep); }
.x { float: right; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--paper); border-bottom: 3px solid var(--accent); padding: 10px 16px; font: 600 11px/1 var(--font); letter-spacing: .07em; text-transform: uppercase; z-index: 30; }
.note { font-size: 12px; color: var(--soft); background: var(--tint); border-left: 3px solid var(--accent); padding: 10px 12px; }


@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .sb { position: static; width: 100%; height: auto; flex: none; border-right: 0; border-bottom: 1px solid var(--accent); }
  .sb-brand { min-height: 0; padding: 14px 16px; }
  .sb-brand img { width: 140px; }
  .sb-sec { display: grid; grid-template-columns: repeat(3, 1fr); padding: 0; border-top: 1px solid var(--sb-line); }
  .sb-label, .sb-foot { display: none; }
  .sb-item { justify-content: center; min-height: 46px; padding: 0 8px; font-size: 11px; border-right: 1px solid var(--sb-line); }
  .sb-item.on { box-shadow: inset 0 -3px 0 var(--accent); }
  .main { padding-inline: 16px; padding-block: 16px 48px; }
  .board { grid-template-columns: 1fr; border-top: 1px solid var(--line); }
  .b-cover { border-left: 0; border-top: 1px solid var(--line); aspect-ratio: 16 / 10; }
  .b-cover img { object-position: center 30%; }
  .b-title { border-right: 0; border-bottom: 1px solid var(--line); padding: 22px 20px; }
  .b-ink { padding: 22px 20px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2n) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .qc-h { border-right: 0; border-bottom: 1px solid var(--fine); width: 100%; }
  .tab { flex: 1 1 auto; padding: 0 12px; min-height: 46px; font-size: 10.5px; }
  .fields { grid-template-columns: 1fr; gap: 2px 0; }
  .fields dd { margin-bottom: 10px; }
  .lk { grid-template-columns: 80px minmax(0,1fr) auto; }
  .lk a { display: none; }
  .row.ed { flex-wrap: wrap; row-gap: 6px; padding-block: 10px; }
  .row.ed > div { flex: 1 1 100% !important; }
}
@media (prefers-reduced-motion: no-preference) {
  .drawer.enter { animation: slide .18s ease-out; }
  @keyframes slide { from { transform: translateX(24px); opacity: .6; } }
}

/* ── Release Desk V1: editable fields, auth, forms ── */
.fx { width: 100%; min-width: 0; border: 1px solid transparent; background: transparent; padding: 4px 6px; margin: -4px -6px; border-radius: 0; outline: none; color: var(--ink); }
.fx:hover { border-color: var(--fine); background: var(--paper); }
.fx:focus { border-color: var(--accent); background: var(--raised); }
.fx::placeholder { color: var(--soft); opacity: .8; font-style: italic; }
.fx.mono { font-family: var(--mono); font-size: 12.5px; }
.fx.big-in { font-size: inherit; font-weight: inherit; letter-spacing: inherit; line-height: inherit; padding: 0 6px; }
select.fx { cursor: pointer; }
textarea.fx { resize: vertical; line-height: 1.55; border-color: var(--fine); background: var(--paper); margin: 0; padding: 9px 11px; }
.fx-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fx-row .fx { flex: 1; }
.fields dd .fx-row { margin: 0; }
.save-state { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 25; padding: 7px 11px; background: var(--raised); border: 1px solid var(--line); font: 600 10px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
.save-state.err { color: var(--bad); border-color: var(--bad); }
.x-del { border: 0; background: none; color: var(--soft); cursor: pointer; font-size: 15px; line-height: 1; padding: 2px 6px; }
.x-del:hover { color: var(--bad); }
.add-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px 16px; border-top: 1px solid var(--fine); background: var(--tint); }
.add-row input, .add-row select { border: 1px solid var(--line); background: var(--raised); padding: 6px 8px; min-width: 0; }
.add-row input { flex: 1 1 140px; }
.rel-switch { display: flex; flex-wrap: wrap; margin-top: 12px; border: 1px solid var(--fine); }
.rel-switch button { border: 0; border-right: 1px solid var(--fine); background: transparent; padding: 6px 9px; color: var(--soft); font: 400 10px/1 var(--font); letter-spacing: .04em; text-transform: uppercase; cursor: pointer; }
.rel-switch button:last-child { border-right: 0; }
.rel-switch button.on { background: var(--accent); color: #16090d; }
.gate { min-height: 100%; display: grid; place-items: center; padding-inline: 16px; background: var(--sb-bg); color: var(--sb-text); }
.gate-box { width: min(420px, 100%); border: 1px solid var(--sb-line); padding: 32px; border-top: 3px solid var(--accent); }
.gate-box img { width: 180px; max-width: 100%; display: block; margin-bottom: 26px; }
.gate-box h1 { font-size: 40px; font-weight: 500; letter-spacing: -.07em; line-height: .95; margin-bottom: 12px; }
.gate-box p { color: var(--sb-muted); font-size: 13px; margin: 0 0 22px; }
.gate-box .btn { border-color: var(--sb-line); color: var(--sb-text); min-height: 42px; padding: 0 16px; }
.gate-box .btn.solid { color: #16090d; }
.dialog { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(20,19,18,.45); padding-inline: 16px; }
.dialog form { width: min(460px, 100%); background: var(--raised); border: 1px solid var(--line); border-top: 3px solid var(--accent); padding: 22px; display: grid; gap: 12px; }
.dialog h2 { font-size: 26px; font-weight: 500; letter-spacing: -.05em; }
.dialog label { display: grid; gap: 4px; font: 400 10px/1.2 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
.dialog input, .dialog select { border: 1px solid var(--line); background: var(--paper); padding: 9px 10px; font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--ink); }
.dialog .acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.upload { display: inline-flex; }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload:focus-within .btn { outline: 2px solid var(--accent); outline-offset: 2px; }
.danger { color: var(--bad); border-color: var(--bad); }
.danger:hover { background: var(--bad); border-color: var(--bad); color: var(--raised); }
.local-banner { background: var(--warn-bg); color: var(--warn); border-bottom: 1px solid var(--warn); padding: 8px 16px; font: 600 11px/1.3 var(--font); letter-spacing: .06em; text-transform: uppercase; display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.local-banner button { border: 1px solid currentColor; background: none; color: inherit; font: inherit; padding: 4px 8px; cursor: pointer; }
.empty-state { padding: 40px 24px; text-align: center; color: var(--soft); }
.empty-state h2 { font-size: 30px; font-weight: 500; letter-spacing: -.05em; color: var(--ink); margin-bottom: 8px; }
.sb-sec.artists { max-height: 50vh; overflow-y: auto; }
.theme-btn { margin-top: 10px; border: 1px solid var(--sb-line); background: none; color: var(--sb-muted); padding: 6px 10px; font: 600 9.5px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.theme-btn:hover { color: var(--sb-text); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Full-bleed header: the scoreboard, quick-copy strip and tabs run edge to edge against the sidebar,
   with no outer frame and no max-width gutter on wide screens. */
:root { --gutter: 28px; }
.main { padding-inline: var(--gutter); }
.wrap { max-width: none; }
.board, .qc, .stats { margin-inline: calc(var(--gutter) * -1); border-left: 0; border-right: 0; }
.board { border-top: 0; }
.tabs { margin-inline: calc(var(--gutter) * -1); margin-top: 0; }
.stats { margin-bottom: 28px; }
@media (max-width: 900px) {
  :root { --gutter: 16px; }
  .main { padding-block-start: 0; }
  .board { border-top: 0; }
}
