/* =============================================================================
   GigPrep — "Stage Desk" theme
   Stagelight's gig-ready dark + Console's desk precision.

   Colour rules (keep them — they are what makes this read as one product):
   1. One neutral family (cool graphite) for rail, page and cards.
   2. One accent with one meaning: AMBER = music & selection (chords, keys,
      active nav, energy meters, links). Nothing else is amber.
   3. Actions are neutral: primary = off-white, secondary = graphite + hairline.
   4. Hierarchy by weight, not hue (verse chip outlined, chorus chip solid).
   5. Red only for delete; rose only for "needs review" (OCR) — never amber.
   6. Monospace only for data: labels, metadata, keys, chords, the chart grid.
   Every text pair is >= 4.5:1. Fonts are self-hosted (strict CSP font-src).
   ========================================================================== */

/* ---- Fonts (OFL-1.1, see static/fonts/OFL-*.txt) ------------------------- */
@font-face {
  font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("fonts/manrope-latin-wght-normal.woff2") format("woff2-variations"),
       url("fonts/manrope-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("fonts/manrope-latin-ext-wght-normal.woff2") format("woff2-variations"),
       url("fonts/manrope-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-display: swap; font-weight: 400;
  src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-display: swap; font-weight: 400;
  src: url("fonts/ibm-plex-mono-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-display: swap; font-weight: 500;
  src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-display: swap; font-weight: 500;
  src: url("fonts/ibm-plex-mono-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-display: swap; font-weight: 600;
  src: url("fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-display: swap; font-weight: 600;
  src: url("fonts/ibm-plex-mono-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* ---- Tokens --------------------------------------------------------------- */
:root {
  color-scheme: dark;
  /* neutrals — one cool-graphite family */
  --rail: #0b0c0e;
  --bg: #111316;
  --surface: #181b1f;
  --surface-2: #15181c;      /* toolbars, card footers */
  --inset: #0f1114;          /* inputs, code */
  --raised: #1d2025;         /* secondary buttons */
  --raised-hover: #23272d;
  --ink: #eceef1;
  --ink-2: #c4c9d0;
  --muted: #9aa1ab;
  --faint: #7d848e;
  --line: #262a30;           /* hairlines */
  --line-2: #343942;         /* control borders */
  --line-3: #4a505a;         /* control hover */
  --row-line: #20242a;
  /* the one accent: music & selection */
  --accent: #f5b53d;
  --accent-text: #f7c25a;
  --accent-tint: #2a2316;
  --accent-edge: #4a3b1c;
  --on-accent: #1a1408;
  --chord: var(--accent-text);
  /* status */
  --danger: #ff8a7a;
  --danger-tint: #2e1a1a;
  --review: #ff9aa2;         /* low-confidence (OCR) chord — rose, never amber */
  --review-ink: #ffb3b8;
  --review-tint: #3b2024;
  /* type */
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  /* shape */
  --radius: 10px;
  --r-ctl: 8px;
  --r-chip: 5px;
  --rail-w: 88px;
  --drawer-w: 248px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-edge); color: #fff; }
h1, h2, h3 { margin: 0; }
button { font-family: inherit; }
p { margin: 0; }
code { font-family: var(--mono); font-size: 0.92em; background: var(--inset);
  border: 1px solid var(--line); padding: 1px 5px; border-radius: 4px; color: var(--ink-2); }
.muted { color: var(--muted); }
.spacer { flex: 1 1 auto; }

/* Stroke icons (inline SVG from _icons.html; stroke = currentColor) */
.ico { width: 18px; height: 18px; flex: 0 0 auto; stroke: currentColor; fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico.big { width: 40px; height: 40px; stroke-width: 1.4; }

/* ---- App shell: Console-style icon rail ----------------------------------- */
.sidebar {
  position: fixed; top: 0; left: 0; z-index: 20;
  width: var(--rail-w); height: 100vh; overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column; gap: 4px; padding: 14px 8px;
  background: var(--rail); border-right: 1px solid var(--rail);
  transition: transform .18s ease;
}
.brand { display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 2px 0 16px; color: var(--ink); font-weight: 800; letter-spacing: -0.01em;
  white-space: nowrap; }
.brand:hover { text-decoration: none; }
/* GigPrep mark: graphite tile, off-white G, amber note head (amber = music).
   Inline SVG from _brand.html; sources in static/brand/. */
.brand-mark { display: block; width: 40px; height: 40px; flex: 0 0 auto; }
.brand-text { display: none; font-size: 18px; letter-spacing: -0.015em; }
.wm-a { font-weight: 800; color: var(--ink); }
.wm-b { font-weight: 500; color: var(--ink-2); }

.sb-nav { display: flex; flex-direction: column; gap: 2px; }
.sb-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; min-height: 60px; padding: 6px 4px; border-radius: 8px;
  color: var(--muted); text-align: center; text-decoration: none; }
.sb-nav a:hover { background: #15171b; color: var(--ink); }
.sb-nav a.active { background: #1c1f24; color: #fff; box-shadow: inset 2px 0 0 var(--accent); }
.sb-nav .ico { width: 20px; height: 20px; stroke-width: 1.6; }
.sb-nav .lbl { font-family: var(--mono); font-size: 9.5px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .02em; line-height: 1.25; }

.sb-foot { margin-top: auto; display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding-top: 10px; }
.sb-foot .who { display: none; color: var(--muted); font-size: 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-logout { margin: 0; }
.sb-logout .btn { color: var(--muted); }

/* Mobile menu toggle (desktop always shows the rail) */
.sb-toggle { display: none; position: fixed; top: 12px; left: 12px; z-index: 40;
  width: 44px; height: 44px; padding: 0; cursor: pointer;
  align-items: center; justify-content: center;
  border: 1px solid var(--line-2); border-radius: var(--r-ctl);
  background: var(--raised); color: var(--ink); }
.sb-toggle:hover { border-color: var(--line-3); }
.sb-backdrop { display: none; }

.content { margin-left: var(--rail-w); min-height: 100vh; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 28px 40px 80px; }

@media (max-width: 768px) {
  .sb-toggle { display: inline-flex; }
  .sidebar { width: var(--drawer-w); transform: translateX(-100%);
    padding: 70px 12px 16px; box-shadow: 2px 0 24px rgba(0,0,0,.5); }
  .sb-open .sidebar { transform: translateX(0); }
  .brand { justify-content: flex-start; padding: 0 8px 14px; }
  .brand-text { display: inline; }
  .sb-nav a { flex-direction: row; justify-content: flex-start; gap: 12px;
    min-height: 46px; padding: 0 12px; }
  .sb-nav .lbl { font-family: var(--sans); font-size: 14px; font-weight: 600;
    text-transform: none; letter-spacing: 0; }
  .sb-foot { flex-direction: row; align-items: center; padding: 12px 8px 0;
    border-top: 1px solid var(--line); }
  .sb-foot .who { display: block; flex: 1; min-width: 0; }
  .content { margin-left: 0; }
  .wrap { padding: 72px 16px 64px; }
  .sb-backdrop:not([hidden]) { display: block; position: fixed; inset: 0;
    z-index: 15; background: rgba(0,0,0,.6); }
}

/* ---- Page header ---------------------------------------------------------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 14px 24px; padding-bottom: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.ph-text { min-width: 0; }
.page-head h1, .song-head h1 { font-size: 30px; line-height: 1.12; font-weight: 800;
  letter-spacing: -0.02em; overflow-wrap: anywhere; }
.crumb { margin: 0 0 8px; }
.crumb a { display: inline-flex; align-items: center; gap: 4px; color: var(--muted);
  font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.crumb a:hover { color: var(--ink); text-decoration: none; }
.crumb .ico { width: 14px; height: 14px; }
.sub { margin-top: 8px; color: var(--muted); font-size: 14px; max-width: 70ch; }
.metaline, .sub.metaline { font-family: var(--mono); font-size: 12px; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); }
.head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.head-actions form { margin: 0; }

/* Small uppercase data labels (card titles, field labels) */
.label, .col-head, .field-label { display: block; font-family: var(--mono); font-size: 11px;
  font-weight: 500; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
h2.label { margin: 0 0 14px; }
.card-head { margin: 0 !important; padding: 16px 20px 12px; }

/* ---- Cards & lists -------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  margin: 0 0 16px; }
.card.pad { padding: 20px 22px; }
.card-foot { padding: 12px 16px; margin: 0; border-top: 1px solid var(--line);
  background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }

.list { list-style: none; margin: 0; padding: 0; }
.list .row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  min-height: 58px; padding: 8px 14px 8px 18px; border-top: 1px solid var(--row-line); }
.list > .row:first-child { border-top: 0; }
.card > .card-head + .list > .row:first-child { border-top: 1px solid var(--row-line); }
.list .row form { margin: 0; }
.list .row { flex-wrap: nowrap; }
.row-text { display: flex; flex-direction: column; min-width: 0; flex: 0 1 auto; }
.row-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.row-actions form { margin: 0; }
.row-text .title, .song-list .title { font-weight: 700; font-size: 15.5px; color: var(--ink);
  overflow-wrap: anywhere; }
a.title:hover { color: var(--accent-text); text-decoration: none; }
.title.missing { color: var(--muted); font-style: italic; font-weight: 500; }
.meta { color: var(--muted); font-size: 13px; }
.badges { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }

.key-pill { display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto; width: 46px; height: 30px; padding: 0 4px; border-radius: var(--r-chip);
  background: var(--accent-tint); border: 1px solid var(--accent-edge); color: var(--accent-text);
  font-family: var(--mono); font-weight: 600; font-size: 12.5px; }
.key-pill.empty-key { background: transparent; border-color: var(--line-2); color: var(--faint); }
.num { width: 20px; text-align: right; color: var(--faint); font-family: var(--mono); font-weight: 500; }

.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border-radius: 4px; background: #23272d; color: var(--ink-2);
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.badge.review { background: var(--review-tint); color: var(--review-ink); }

.avatar { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 32px; height: 32px; border-radius: 999px; background: #262a30; color: #e3e6ea;
  font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }
.avatar.large { width: 42px; height: 42px; font-size: 13px; }
.avatar.small { width: 24px; height: 24px; font-size: 10px; }
.sidebar .avatar { background: #1c1f24; }

.empty { color: var(--muted); padding: 24px 20px; text-align: center; }
.empty.card p + p { margin-top: 6px; }
.empty-hero { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 40px 24px; }
.empty-hero .ico.big { color: var(--faint); margin-bottom: 6px; }
.empty-title { font-size: 17px; font-weight: 700; color: var(--ink); }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.empty-actions form { margin: 0; }
.alt { margin-top: 4px; }

.danger-row { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); }
.danger-row .btn { margin-left: -10px; }

.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;
  align-items: start; }
.two-col > .card { margin: 0; overflow: hidden; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

/* ---- Buttons -------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 14px; border-radius: var(--r-ctl);
  border: 1px solid var(--line-2); background: var(--raised); color: var(--ink);
  font: inherit; font-size: 13.5px; font-weight: 600; line-height: 1;
  text-decoration: none; white-space: nowrap; cursor: pointer; user-select: none;
  transition: background-color .12s, border-color .12s, color .12s; }
.btn:hover { text-decoration: none; background: var(--raised-hover); border-color: var(--line-3); }
.btn .ico { width: 16px; height: 16px; }
.btn.small { min-height: 34px; padding: 0 11px; font-size: 12.5px; gap: 6px; }
.btn.large { min-height: 46px; padding: 0 20px; font-size: 14.5px; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #0b0c0e; }
.btn.primary:hover { background: #fff; border-color: #fff; }
.btn.primary .ico { stroke-width: 2.1; }
.btn.ghost, .btn.quiet { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover, .btn.quiet:hover { background: var(--raised); color: var(--ink); border-color: transparent; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-tint); border-color: transparent; color: var(--danger); }
.btn.icon { width: 40px; padding: 0; }
.btn.small.icon { width: 34px; }
.btn[disabled], .btn[disabled]:hover { opacity: .38; cursor: default;
  background: var(--raised); border-color: var(--line-2); color: var(--ink); }
.btn.quiet[disabled], .btn.ghost[disabled] { background: transparent; border-color: transparent; }
summary.btn { list-style: none; }
summary.btn::-webkit-details-marker { display: none; }

/* Segmented group (buttons / toggles sharing one outline) */
.seg { display: inline-flex; align-items: stretch; border: 1px solid var(--line-2);
  border-radius: var(--r-ctl); overflow: hidden; background: var(--raised); min-height: 40px; }
.seg > .btn, .seg .zoom button { border: 0; border-radius: 0; background: transparent; min-height: 38px; }
.seg > * + * { border-left: 1px solid var(--line-2) !important; }
.seg > .btn:hover { background: var(--raised-hover); }

/* ---- Form controls -------------------------------------------------------- */
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=search], input[type=url], input[type=date], input[type=time], input[type=tel],
select, textarea {
  font: inherit; font-size: 14px; color: var(--ink);
  background: var(--inset); border: 1px solid var(--line-2); border-radius: var(--r-ctl);
  min-height: 40px; padding: 0 12px; min-width: 0; }
textarea { padding: 10px 12px; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 181, 61, .22); }
select { appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa1ab' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 14px; }
select option, select optgroup { background: var(--surface); color: var(--ink); }
input[type=number] { font-family: var(--mono); }
input[type=color] { width: 36px; height: 30px; padding: 2px; border: 1px solid var(--line-2);
  border-radius: 6px; background: var(--inset); cursor: pointer; }
input[type=file] { font: inherit; font-size: 13px; color: var(--muted); max-width: 100%; }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; font-size: 12.5px;
  margin-right: 12px; padding: 8px 12px; border-radius: var(--r-ctl); cursor: pointer;
  border: 1px solid var(--line-2); background: var(--raised); color: var(--ink); }
input[type=file]::file-selector-button:hover { background: var(--raised-hover); }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }

/* A labelled field: mono caps label above its control */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0;
  font-family: var(--mono); font-size: 11px; font-weight: 500; text-transform: uppercase;
  letter-spacing: .07em; color: var(--muted); }
.field > input, .field > select, .field > textarea { text-transform: none; letter-spacing: 0;
  font-family: var(--sans); font-size: 14px; font-weight: 400; }
.field > input[type=number] { font-family: var(--mono); }
.field .hint { text-transform: none; letter-spacing: 0; font-family: var(--sans); font-size: 12px; color: var(--faint); }
.field.narrow > input { width: 92px; }
.field.grow { flex: 1 1 220px; }
.field.wide { flex: 1 1 100%; }
.field-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); align-items: end; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* Setlist: per-song duration + unknown-length note */
.setlist-order .dur { font-family: var(--mono); font-size: 12.5px; color: var(--muted);
  min-width: 5ch; text-align: right; }
.setlist-order .dur.none { color: var(--faint); }
.setlist-order .artist { color: var(--ink-2); }
.unknown-len { color: var(--faint); text-transform: none; letter-spacing: 0; }

/* Library search + sort */
.lib-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 16px; }
.lib-search { position: relative; flex: 1 1 260px; display: flex; }
.lib-search .ico { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px;
  transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.lib-search input { width: 100%; padding-left: 36px; }
.lib-sort { display: inline-flex; align-items: center; gap: 8px; }
.lib-sort .field-label { margin: 0; }
.row-text .meta.metaline { font-size: 11.5px; text-transform: none; letter-spacing: .01em; }

/* Song details form (details.html) */
.song-details { max-width: 820px; }
.details-grid { display: grid; gap: 18px 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.details-grid .span-2 { grid-column: span 2; }
@media (max-width: 720px) {
  .details-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .details-grid { grid-template-columns: 1fr; }
  .details-grid .span-2 { grid-column: auto; }
}
.field.invalid > input { border-color: #7a3a33; }
.field-error { text-transform: none; letter-spacing: 0; font-family: var(--sans);
  font-size: 12.5px; color: #ffc2b8; }

/* Checkbox styled as a pill toggle (still a real checkbox) */
.toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 12px;
  cursor: pointer; color: var(--ink); font-family: var(--sans); font-size: 13px; font-weight: 600;
  text-transform: none; letter-spacing: 0; }
.toggle:has(input:checked) { background: var(--accent-tint); color: var(--accent-text); }

.inline-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-add input, .inline-add select { flex: 1 1 160px; }
.inline-add .btn { flex: 0 0 auto; }

/* ---- Flash / notices ------------------------------------------------------ */
.flash { padding: 11px 16px; border-radius: var(--r-ctl); margin-bottom: 16px; font-size: 14px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.flash.ok { border-color: var(--line-2); }
.flash.error { background: var(--danger-tint); border-color: #4a2626; color: #ffc2b8; }
.review-note { margin: 0 0 16px; padding: 11px 16px; border-radius: var(--r-ctl);
  background: var(--review-tint); border: 1px solid #5a2e35; color: var(--ink); font-size: 14px; }
.review-note a { color: var(--review-ink); font-weight: 700; }

/* ---- Toolbars ------------------------------------------------------------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 14px;
  padding: 12px 14px; background: var(--surface-2); }
.toolbar form { margin: 0; }
.edit-toolbar { align-items: center; gap: 8px; margin-bottom: 6px; }
p.toolbar-note { font-size: 12.5px; color: var(--faint); margin: 0 0 20px; max-width: 90ch; }
.view-key { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding: 0 4px; }
.view-key strong { font-family: var(--mono); font-weight: 600; font-size: 17px; color: var(--accent-text); line-height: 1.1; }
.view-outputs { display: flex; align-items: center; gap: 8px; }
.zoom { display: inline-flex; align-items: stretch; }
.zoom button { font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; color: var(--ink);
  background: transparent; border: 0; border-left: 1px solid var(--line-2); min-width: 38px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; }
.zoom button:hover { background: var(--raised-hover); }
.zoom button .ico { width: 15px; height: 15px; }
.zoom .zoom-pct { display: inline-flex; align-items: center; justify-content: center; min-width: 52px;
  border-left: 1px solid var(--line-2); font-family: var(--mono); font-size: 12.5px; color: var(--ink); }

/* ---- The chart (monospace grid — chords sit over their letters) ------------ */
.chart { padding: 30px 36px; overflow: hidden; }
.chart .section { margin: 0 0 26px; }
.chart .section:last-child { margin-bottom: 0; }
.sec-chip, .section h2 { display: inline-flex; align-items: center; gap: 6px;
  margin: 0 0 12px; padding: 3px 8px; border-radius: 4px; border: 1px solid #3a3f47;
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-2); line-height: 1.4; }
.section.cat-chorus > .sec-chip { background: var(--ink); border-color: var(--ink); color: #0b0c0e; }
.section h2 .repeat-mark { color: inherit; opacity: .8; font-weight: 700; }
.section pre { font-family: var(--mono); font-size: var(--chart-fs, 0.95rem); line-height: 1.5;
  margin: 0 0 12px; white-space: pre; overflow-x: auto; color: var(--lyric, var(--ink)); }
.section pre:last-child { margin-bottom: 0; }
.section pre .chords, .edit-pre .chords { color: var(--chord); font-weight: 600; }
/* A low-confidence (e.g. OCR-read) chord, flagged for a human to check. */
.section pre .chords.flag, .edit-pre .chords.flag { color: var(--review); text-decoration: underline dotted;
  text-underline-offset: 3px; text-decoration-thickness: 1px; }
.section pre .markings { color: var(--muted); font-style: italic; font-weight: 500; }
.tones-row { color: var(--faint); }

/* ---- Chord tones reference (chart + stage) --------------------------------- */
.chord-tones { margin: 0 0 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); }
.chord-tones > summary { cursor: pointer; display: flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 18px; font-weight: 700; font-size: 14px; color: var(--ink); list-style: none; }
.chord-tones > summary::-webkit-details-marker { display: none; }
.chord-tones > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px;
  border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted);
  transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
.chord-tones[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.chord-tones .ct-hint { color: var(--muted); font-weight: 400; font-size: 13px; }
.ct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 6px 18px; padding: 0 18px 16px; }
.ct-item { display: flex; align-items: baseline; gap: 10px; padding: 6px 0; border-top: 1px solid var(--row-line); }
.ct-chord { font-family: var(--mono); font-weight: 600; color: var(--chord); min-width: 3.2em; }
.ct-notes { display: flex; flex-wrap: wrap; gap: 5px; }
.ct-note { display: inline-flex; align-items: baseline; gap: 2px; font-family: var(--mono); font-size: 13px;
  padding: 1px 6px; border-radius: 4px; background: var(--raised); color: var(--ink); }
.ct-note.root { background: var(--accent-tint); outline: 1px solid var(--accent-edge); }
.ct-name { font-weight: 600; }
.ct-deg { font-size: 10px; color: var(--muted); transform: translateY(-0.2em); }

/* ---- Song page: recordings ------------------------------------------------ */
.recordings { padding: 18px 22px; }
.rec-list { list-style: none; padding: 0; margin: 0 0 14px; }
.rec-list li { display: flex; align-items: center; gap: 12px; padding: 8px 0;
  border-bottom: 1px solid var(--row-line); flex-wrap: wrap; }
.rec-name { font-weight: 700; min-width: 140px; }
.rec-list audio { height: 36px; flex: 1; min-width: 200px; }
.rec-del { margin: 0; }
.rec-empty { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.rec-empty .ico { width: 22px; height: 22px; color: var(--faint); }
.rec-upload { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 12px;
  border: 1px dashed var(--line-2); border-radius: var(--r-ctl); background: var(--surface-2); }

/* ---- Import --------------------------------------------------------------- */
.import-card { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px; padding: 24px; }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; min-height: 230px; padding: 32px 20px; text-align: center; cursor: pointer;
  border: 1.5px dashed var(--line-2); border-radius: var(--radius); background: var(--surface-2);
  color: var(--muted); }
.dropzone:hover, .dropzone:focus-within { border-color: var(--accent-edge); }
.dz-title { font-size: 17px; font-weight: 700; color: var(--ink); }
.dz-formats { font-family: var(--mono); font-size: 11px; letter-spacing: .05em; color: var(--faint); }
.dropzone input[type=file] { margin-top: 8px; }
.import-side { display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.how { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.how li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); font-size: 13.5px; }
.how .badge { flex: 0 0 116px; justify-content: center; }

/* ---- Stage mode — black, big, wraps between words -------------------------- */
body.stage { background: #000; color: #f5f6f7; min-height: 100vh; --chord: #ffc94d; }
.stage-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px;
  padding: 12px 24px; background: rgba(0,0,0,.92); border-bottom: 1px solid #2a2e35; }
.stage-bar .btn { background: #111316; border-color: #2a2e35; }
.stage-title { flex: 1 1 auto; min-width: 0; text-align: center; }
.stage-title h1 { font-size: 18px; font-weight: 800; letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage-title .metaline { margin-top: 2px; font-size: 11.5px; }
.stage .wrap { max-width: 1100px; padding: 32px 28px 80px; }
.stage .section { margin: 0 0 36px; }
.stage .section > .sec-chip { font-size: 12px; margin-bottom: 14px; border-color: #3a3f47; color: #c4c9d0; }
.stage .section.cat-chorus > .sec-chip { background: #f5f6f7; border-color: #f5f6f7; color: #000; }
.stage .blocks { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px 0; margin-bottom: 14px; }
.stage .block { display: inline-flex; flex-direction: column; font-family: var(--mono); }
/* Chord and lyric rows MUST share the same monospace cell width, or chords
   drift off their letters (a chord's N leading spaces must equal N lyric
   chars). Same font-size on both guarantees it; chords stay distinct by
   colour + weight. */
.stage .block .ch { color: var(--chord); font-weight: 600; font-size: 1.75rem; line-height: 1.2;
  min-height: 1.2em; white-space: pre; }
.stage .block .ly { color: var(--lyric, #f5f6f7); font-size: 1.75rem; line-height: 1.25; white-space: pre; min-height: 1.25em; }
/* Inline markings: width:0 + overflow:visible keeps a long label (e.g. "build
   to the key change") from widening its word column and pushing later words. */
.stage .block .mk { color: #9aa1ab; font-family: var(--sans); font-style: italic; font-weight: 500;
  font-size: 1rem; min-height: 1.2em; white-space: nowrap; width: 0; overflow: visible; }
.stage .block .mk:empty { min-height: 0; }
.stage .block .bt { display: none; color: #9aa1ab; font-size: 0.85rem; white-space: nowrap;
  width: 0; overflow: visible; min-height: 1.1em; }
.stage.show-tones .block .bt { display: block; }
.stage.show-tones .block .bt:empty { min-height: 0; }
.stage-notes-btn.active { background: #2a2316 !important; border-color: #4a3b1c !important; color: #ffc94d; }
.stage .chord-tones { margin-top: 28px; background: #0b0c0e; border-color: #262a30; }
.stage .ct-note { font-size: 15px; padding: 2px 8px; }
@media (max-width: 640px) {
  .stage .block .ch, .stage .block .ly { font-size: 1.3rem; }
  .stage-bar { padding: 10px 12px; gap: 10px; }
  .stage .wrap { padding: 20px 14px 64px; }
}

/* ---- Editor --------------------------------------------------------------- */
/* Editor: song-details summary (opens details.html) + the colour pickers */
.details-form { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.details-summary { display: flex; align-items: center; gap: 16px; flex: 1 1 360px; min-width: 0; }
.details-summary .ds-text { flex: 1; min-width: 0; }
.details-summary .metaline { margin-top: 4px; color: var(--ink-2); overflow-wrap: anywhere; }
.colour-form { display: flex; flex-direction: column; gap: 6px; }
.field-submit { display: flex; align-items: flex-end; justify-content: flex-end; }
.colour-row { display: flex; align-items: center; gap: 12px; min-height: 40px; flex-wrap: nowrap; }
.colour-row .toggle { border: 1px solid var(--line-2); border-radius: var(--r-ctl); background: var(--raised); }
.swatch { display: inline-flex; align-items: center; gap: 6px; font-family: var(--sans); font-size: 13px;
  font-weight: 600; color: var(--ink-2); text-transform: none; letter-spacing: 0; }

.edit-section { padding: 16px 20px 14px; }
.edit-section.is-linked { border-color: var(--line-3); }
.es-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.edit-section-head { display: flex; align-items: center; gap: 8px; margin: 0; flex: 1 1 360px; min-width: 0; }
.edit-section-head .section-name { font-weight: 700; flex: 1 1 140px; max-width: 240px; }
.edit-section-head .section-cat { flex: 1 1 100px; max-width: 160px; }
.section-tools { display: flex; gap: 6px; align-items: center; }
.section-tools form { margin: 0; }
.link-ctl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 2px; }
.link-ctl form { margin: 0; display: flex; align-items: center; gap: 6px; }
.link-ctl .link-form label { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.link-ctl select { min-height: 34px; font-size: 13px; }
.link-badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px;
  font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2);
  background: var(--raised); border: 1px solid var(--line-2); padding: 4px 9px; border-radius: 4px; }
.link-badge .ico { width: 13px; height: 13px; }
.edit-line-wrap { border-top: 1px solid var(--row-line); padding: 10px 0; }
.edit-section > .link-ctl + .edit-line-wrap { margin-top: 10px; }
.edit-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.edit-pre { flex: 1 1 320px; font-family: var(--mono); font-size: 0.95rem; line-height: 1.5;
  margin: 0; white-space: pre; overflow-x: auto; color: var(--lyric, var(--ink)); }
.edit-actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }
.edit-line-form { display: flex; flex-direction: column; gap: 8px; padding: 6px 0; }
.edit-line-form .row-label { display: flex; flex-direction: column; gap: 5px; font-family: var(--mono);
  font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.mono-row { font-family: var(--mono) !important; font-size: 0.95rem !important; width: 100%; }
.edit-line-form .hint { font-size: 12.5px; color: var(--faint); }
.form-row { display: flex; gap: 8px; flex-wrap: wrap; }
.add-line { margin: 6px 0 0; }
.add-section { margin: 4px 0 24px; }

/* Direct chord placement (click a letter to drop a chord) */
.place-line { padding: 6px 0; }
.place-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.place-hint { font-size: 13px; color: var(--muted); }
.place-hint b { color: var(--accent-text); font-weight: 700; }
.place-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 2px 6px; }
.place-word { display: inline-flex; flex-direction: column; align-items: flex-start; position: relative; }
.place-word.lead { opacity: 0.9; }
.place-chords { display: flex; gap: 3px; min-height: 1.5em; margin-bottom: 2px; }
.place-chip { font-family: var(--mono); font-size: 12.5px; font-weight: 600; line-height: 1;
  color: var(--accent-text); background: var(--accent-tint); border: 1px solid var(--accent-edge);
  border-radius: 4px; padding: 3px 6px; cursor: pointer; }
.place-chip:hover { border-color: var(--accent); }
.place-chip.sel { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.place-letters { display: inline-flex; font-family: var(--mono); font-size: 1rem; }
.letter { font: inherit; font-family: var(--mono); line-height: 1.5; min-width: 0.62em; padding: 0 1px;
  margin: 0; border: 0; border-radius: 3px; background: transparent; color: var(--ink); cursor: pointer;
  border-bottom: 2px solid transparent; }
.letter:hover { background: var(--accent-tint); border-bottom-color: var(--accent); }
.letter.slot { color: var(--muted); min-width: 1em; text-align: center; }
.word-del { position: absolute; top: -8px; right: -8px; width: 18px; height: 18px; padding: 0;
  line-height: 15px; font-size: 0.75rem; border-radius: 50%; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--muted); cursor: pointer; opacity: 0; transition: opacity 0.12s; }
.place-word:hover .word-del, .word-del:focus-visible { opacity: 1; }
.word-del:hover { color: var(--danger); border-color: var(--danger); }
.place-pop:not(:empty) { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--r-ctl); background: var(--surface-2); }
.chord-add, .chord-edit { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chord-add label, .chord-edit label { display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--muted); }
.chord-input { font-family: var(--mono) !important; width: 10rem; }

/* Markings manager (editor) */
.markings-host:empty { display: none; }
.markings-panel { border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 12px 14px;
  margin: 4px 0 10px; background: var(--surface-2); }
.markings-head { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); margin-bottom: 8px; }
.markings-list { list-style: none; padding: 0; margin: 0 0 10px; }
.markings-list li { display: flex; align-items: center; gap: 8px; padding: 4px 0; flex-wrap: wrap; }
.mark-type { font-family: var(--mono); font-weight: 500; font-size: 11.5px; padding: 2px 7px; border-radius: 4px;
  background: var(--raised); border: 1px solid var(--line-2); color: var(--ink-2); }
.mark-text { font-style: italic; color: var(--ink-2); }
.mark-meta { color: var(--faint); font-size: 12px; margin-left: auto; font-family: var(--mono); }
.markings-empty { color: var(--muted); font-size: 13px; margin: 0 0 10px; }
.markings-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.markings-add select, .markings-add input { min-height: 36px; font-size: 13px; }
.markings-add input[type=number] { width: 80px; }
.markings-add input[type=text] { width: 160px; }

/* ---- Text editors (bulk / ChordPro) --------------------------------------- */
.editor-split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .editor-split { grid-template-columns: 1fr; } }
.editor-split > .card { margin: 0; }
.chordpro-form, .charttext-form { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.chordpro-area, .charttext-area { width: 100%; font-family: var(--mono); font-size: 0.92rem; line-height: 1.6;
  padding: 16px 18px; border-radius: var(--radius); background: var(--inset); color: var(--ink);
  resize: vertical; tab-size: 2; }
.chordpro-area { min-height: 380px; }
.charttext-area { min-height: 560px; white-space: pre; overflow-x: auto; }
.chordpro-actions, .charttext-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.help .tips { margin: 14px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px;
  display: flex; flex-direction: column; gap: 8px; }
.help .tips strong { color: var(--ink); }
.help code { white-space: nowrap; font-size: 11.5px; }
.charttext-example { font-family: var(--mono); font-size: 11.5px; line-height: 1.55; margin: 0;
  background: var(--inset); color: var(--ink); padding: 10px 12px; border-radius: var(--r-ctl);
  overflow-x: auto; border: 1px solid var(--line); white-space: pre; }

/* ---- Play Plan grid ------------------------------------------------------- */
.plan-wrap { overflow-x: auto; }
table.plan { border-collapse: collapse; width: 100%; font-size: 13.5px; }
table.plan th, table.plan td { padding: 10px 12px; text-align: left; vertical-align: middle;
  border-bottom: 1px solid var(--row-line); }
table.plan tbody tr:last-child td { border-bottom: 0; }
/* No sticky header: inside the horizontal-scroll wrapper a sticky `top` is
   relative to the wrapper, which pushed the header down over the first rows. */
table.plan thead th { background: var(--surface-2); font-family: var(--mono); font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .07em; color: var(--muted); white-space: nowrap;
  border-bottom: 1px solid var(--line); }
table.plan .sec-name { font-weight: 700; white-space: nowrap; font-size: 14px; }
table.plan .sec-col, table.plan .sec-name { position: sticky; left: 0; z-index: 1;
  box-shadow: inset -1px 0 0 var(--line); }
table.plan .sec-name { background: var(--surface); }
.plan-cell form { display: flex; gap: 6px; align-items: center; margin: 0; }
.plan-cell select { width: 62px; min-height: 34px; padding: 0 24px 0 10px; font-family: var(--mono);
  font-size: 13px; background-position: right 7px center; }
.plan-cell input[type=text] { width: 116px; min-height: 34px; font-size: 13px; }

/* Energy Arc — amber LED segments (CSP-clean height classes) */
td.arc { width: 44px; text-align: center; }
.arc .bar { display: inline-block; width: 16px; vertical-align: bottom; border-radius: 2px;
  background: repeating-linear-gradient(to top, var(--accent) 0 4px, transparent 4px 6px); }
.arc .bar.e0 { height: 2px; background: var(--line-2); }
.arc .bar.e1 { height: 6px; }
.arc .bar.e2 { height: 12px; }
.arc .bar.e3 { height: 18px; }
.arc .bar.e4 { height: 24px; }
.arc .bar.e5 { height: 30px; }

/* ---- Teams / setlists ----------------------------------------------------- */
.setlist-notes { display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; margin: 0 0 16px;
  padding: 12px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.setlist-notes p { white-space: pre-wrap; color: var(--ink); flex: 1 1 300px; }
.setlist-details { margin: 0 0 16px; }
.setlist-details[open] > summary { margin-bottom: 10px; background: var(--raised-hover); }
.detail-form { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.detail-form .field { flex: 1 1 240px; }
.detail-form .field.wide { flex-basis: 100%; }
.detail-form textarea { width: 100%; resize: vertical; }
.detail-form .form-actions { flex-basis: 100%; margin-top: 0; }
.setlist-order .row { padding-left: 14px; }
.item-key { display: inline-block; position: relative; }
.item-key > summary { list-style: none; }
.item-key > summary::-webkit-details-marker { display: none; }
.item-key[open] > summary { background: var(--accent-tint); border-color: var(--accent-edge); color: var(--accent-text); }
.item-key-form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10;
  display: flex; align-items: flex-end; gap: 10px; padding: 12px 14px;
  border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface);
  box-shadow: 0 12px 32px rgba(0,0,0,.5); white-space: nowrap; }
.item-key-form input { width: 5rem; }

.chips { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 4px 4px 6px;
  border-radius: 999px; background: var(--raised); border: 1px solid var(--line); }
.chip .chip-name { font-weight: 700; font-size: 13.5px; }
.chip .meta { font-size: 12.5px; }
.chip form { margin: 0; display: inline-flex; }
.chip-x { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border: 0; border-radius: 999px; background: transparent; color: var(--faint); cursor: pointer; }
.chip-x:hover { background: var(--raised-hover); color: var(--ink); }
.chip-x .ico { width: 14px; height: 14px; }

/* ---- Instruments ---------------------------------------------------------- */
.inst-list { display: flex; flex-direction: column; }
.inst-list > .inst-form + .inst-form { border-top: 1px solid var(--row-line); padding-top: 14px; margin-top: 14px; }
.inst-form { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.inst-form .num { width: 7rem; }
.inst-actions { display: flex; gap: 6px; align-items: center; }
.table-wrap { overflow-x: auto; }
.inst-table { width: 100%; border-collapse: collapse; }
.inst-table th, .inst-table td { text-align: left; padding: 11px 20px; border-top: 1px solid var(--row-line); font-size: 14px; }
.inst-table th { font-family: var(--mono); font-size: 11px; font-weight: 500; text-transform: uppercase;
  letter-spacing: .07em; color: var(--muted); background: var(--surface-2); }
.inst-table td:nth-child(2), .inst-table td:nth-child(3) { font-family: var(--mono); color: var(--ink-2); }
.inst-table .seed td:first-child { font-weight: 600; }

/* ---- Auth (standalone, centred card) -------------------------------------- */
body.auth { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 48px 16px; }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 34px 34px 26px; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.auth-brand .brand-mark { width: 44px; height: 44px; }
.auth-brand .brand-text { display: inline; font-size: 22px; letter-spacing: -0.02em; }
.auth-card h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.auth-card .sub { margin-top: 6px; }
.auth-card form { display: flex; flex-direction: column; gap: 16px; margin: 24px 0 0; }
.auth-card .flash { margin: 18px 0 0; }
.auth-card .btn.primary { width: 100%; margin-top: 4px; }
.auth-alt { margin: 20px 0 0; font-size: 13.5px; color: var(--muted); text-align: center; }

/* ---- Setlist print view --------------------------------------------------- */
/* On screen: a white "paper" preview. In print: just the paper. */
.print-sheet { max-width: 760px; margin: 0 auto; padding: 44px 52px; border-radius: 6px;
  background: #fff; color: #111; box-shadow: 0 20px 50px rgba(0,0,0,.45); }
.print-head h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; color: #111; }
.print-meta { color: #555; margin: 4px 0 22px; font-family: var(--mono); font-size: 12px;
  text-transform: uppercase; letter-spacing: .06em; }
.print-order { margin: 0 0 22px; padding-left: 1.9em; }
.print-order li { padding: 7px 0; border-bottom: 1px solid #e3e3e3; }
.print-order li::marker { color: #777; font-weight: 700; font-family: var(--mono); }
.print-order .p-title { font-weight: 700; font-size: 16px; }
.print-order .p-key { margin-left: 12px; color: #555; font-family: var(--mono); font-size: 13px; }
.print-order .p-artist { margin-left: 10px; color: #555; font-size: 14px; }
.print-order .p-dur { float: right; padding-left: 12px; color: #555; font-family: var(--mono); font-size: 13px; line-height: 22px; }
.print-sub { font-family: var(--mono); font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .09em; color: #555; margin: 22px 0 8px; }
.print-roster { margin: 0; padding-left: 1.2em; color: #111; }
.print-roster li { padding: 2px 0; }
.print-notes { white-space: pre-wrap; color: #111; }
.print-sheet .empty { color: #555; }

@media print {
  :root { color-scheme: light; }
  .sidebar, .sb-toggle, .sb-backdrop, .no-print, .flash { display: none !important; }
  body, body.app { background: #fff !important; color: #111 !important; }
  .content { margin: 0 !important; }
  .wrap { padding: 0 !important; max-width: none !important; }
  .print-sheet { box-shadow: none; padding: 0; max-width: none; border-radius: 0; }
  .print-order li { border-bottom: 1px solid #ccc; }
}

/* ---- Small screens -------------------------------------------------------- */
@media (max-width: 640px) {
  .page-head h1 { font-size: 24px; }
  .setlist-order .row { flex-wrap: wrap; row-gap: 8px; }
  .setlist-order .row .row-text { flex: 1 1 0; }
  .setlist-order .row .spacer { display: none; }
  .setlist-order .row .row-actions { flex: 1 1 100%; justify-content: flex-end; }
  .list .row-text .title { font-size: 15px; }
  .hide-sm { display: none; }
  .row-actions .btn.small:has(.hide-sm) { width: 34px; padding: 0; }
  .chart { padding: 20px 16px; }
  .card.pad { padding: 16px; }
  .print-sheet { padding: 28px 22px; }
  .view-outputs { width: 100%; }
  .view-outputs .btn.primary { flex: 1; }
  .list .row { padding-left: 14px; }
}

/* ---- Events (events.html, event.html, event_form.html, calendar, venues) ----
   Kinds differ by weight, not hue (rule 4): gig = solid off-white, rehearsal =
   outline, other = muted. Tentative = dashed + italic; cancelled = faded +
   struck (the BandHelper convention). Amber stays for music & selection. */
.faint { color: var(--faint); }
.pre { white-space: pre-wrap; }
.hint { font-size: 12.5px; color: var(--faint); }
.pad { padding: 16px 20px; }
.sep { color: var(--faint); }

.ev-kind { display: inline-flex; align-items: center; height: 20px; padding: 0 7px;
  border-radius: var(--r-chip); font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; border: 1px solid var(--line-2); color: var(--ink-2); }
.ev-kind.k-gig { background: var(--ink); border-color: var(--ink); color: #0b0c0e; }
.ev-kind.k-rehearsal { background: transparent; border-color: var(--line-3); color: var(--ink); }
.ev-kind.k-other { background: transparent; border-color: var(--line); color: var(--muted); }
.ev-status { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.ev-status.s-tentative { color: var(--ink-2); font-style: italic; border-bottom: 1px dashed var(--line-3); }
.ev-status.s-cancelled { color: var(--faint); text-decoration: line-through; }
.ev-status.s-confirmed { color: var(--muted); }
.ev-meta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 3px; }
.ev-venue, .ev-rep, .ev-rep-label { display: inline-flex; align-items: center; gap: 4px; }
.ev-venue .ico, .ev-rep .ico, .ev-rep-label .ico, .ev-link .ico, .song-upcoming .ico,
.setlist-event .ico { width: 14px; height: 14px; }
.ev-sets { margin-top: 4px; font-size: 13px; color: var(--ink-2); }
.ev-sets a { color: var(--ink-2); }
.ev-sets a:hover { color: var(--accent-text); }

.ev-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.tabs { display: inline-flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface-2); }
.tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 6px;
  color: var(--muted); font-weight: 600; font-size: 14px; text-decoration: none; }
.tabs a:hover { color: var(--ink); }
.tabs a.active { background: var(--raised); color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
.tabs .count { font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.ev-filters { display: flex; gap: 8px; align-items: center; }

.ev-days { display: flex; flex-direction: column; gap: 14px; }
.ev-day .card-head { font-family: var(--mono); }
.ev-row { align-items: flex-start !important; }
.ev-time { flex: 0 0 auto; min-width: 92px; font-family: var(--mono); font-size: 13.5px; color: var(--ink);
  padding-top: 2px; display: flex; flex-direction: column; }
.ev-date { font-size: 11.5px; color: var(--muted); }
.ev-row.st-tentative .title { font-style: italic; }
.ev-row.st-tentative { background-image: linear-gradient(90deg, var(--line-3) 50%, transparent 0);
  background-size: 8px 1px; background-repeat: repeat-x; background-position: 0 100%; }
.ev-row.st-cancelled { opacity: .55; }
.ev-row.st-cancelled .title { text-decoration: line-through; }
.ev-title.st-cancelled { text-decoration: line-through; color: var(--muted); }
.ev-title.st-tentative { font-style: italic; }
.ev-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px;
  color: var(--muted); font-size: 13px; }

.unscheduled { margin-top: 22px; }
.unscheduled .card-head .faint { font-family: var(--sans); text-transform: none; letter-spacing: 0; font-weight: 400; }
.attach-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.attach-form select { max-width: 280px; }
.tz-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 26px; color: var(--muted); }
.tz-form .field-label { margin: 0; }
.tz-form select { max-width: 260px; }

.ev-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 11px 16px; margin: 0 0 16px;
  border-radius: var(--r-ctl); border: 1px dashed var(--line-3); background: var(--surface-2); color: var(--ink-2); }
.ev-banner.cancelled { border-style: solid; color: var(--muted); }
.ev-banner form { margin: 0 0 0 auto; }
.ev-link { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.ev-sheet { margin-bottom: 16px; }
.ev-times .row { align-items: center !important; }
.ev-time-add select { flex: 0 1 150px !important; }
.ev-time-add input[type=time] { flex: 0 1 120px !important; }
.ev-venue-card p { margin: 0 0 8px; }
.ev-venue-card .title { font-weight: 700; font-size: 16px; color: var(--ink); }
.ev-venue-card a { display: inline-flex; align-items: center; gap: 4px; }
.ev-venue-card .field-label, .ev-notes .field-label { margin: 12px 0 4px; }
.ev-notes { border-top: 1px solid var(--line); }
.ev-notes p { margin: 0 0 6px; }
.faint-link a { color: var(--muted); font-size: 13px; }
.ev-sets-card { margin-bottom: 16px; }
.ev-setlist .num { width: auto; min-width: 46px; text-align: left; font-size: 12px; text-transform: uppercase; padding-top: 3px; }
.ev-setlist .row { align-items: flex-start !important; }
.ev-songs { margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.ev-set-actions { display: flex; flex-direction: column; gap: 10px; }
.ev-rehearse { margin-bottom: 16px; }
.ev-rehearse .muted { margin: 6px 0 12px; font-size: 13.5px; }
.ev-rehearse input[type=date], .ev-rehearse input[type=time] { flex: 0 1 150px !important; }
fieldset.scope { border: 0; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
fieldset.scope legend { float: left; padding: 0; margin-bottom: 8px; width: 100%; }
fieldset.scope legend + * { clear: left; }
fieldset.scope label { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 14px; }
.scope-box { padding: 12px 14px !important; border: 1px solid var(--line-2) !important; border-radius: var(--r-ctl); background: var(--surface-2); margin-bottom: 18px !important; }
.scope-box .hint { width: 100%; margin: 4px 0 0; }

/* Event / venue form */
.event-form { max-width: 880px; }
.form-grid { display: grid; gap: 18px 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-all { grid-column: 1 / -1; }
.form-grid.inner { margin-top: 14px; }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: 6px; }
.seg-row { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-opt { position: relative; display: inline-flex; }
.seg-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg-opt span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: var(--r-ctl);
  border: 1px solid var(--line-2); background: var(--raised); color: var(--ink-2); font-family: var(--sans);
  font-size: 14px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.seg-opt.small span { min-height: 32px; padding: 0 10px; font-size: 13px; }
.seg-opt input:checked + span { background: var(--accent-tint); border-color: var(--accent-edge); color: var(--accent-text); }
.seg-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.toggle-field .toggle { border: 1px solid var(--line-2); border-radius: var(--r-ctl); background: var(--raised);
  text-transform: none; letter-spacing: 0; font-family: var(--sans); font-size: 14px; color: var(--ink-2); }
details.new-venue, details.repeat-box { border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 10px 14px; background: var(--surface-2); }
details.new-venue summary, details.repeat-box summary { display: flex; align-items: center; gap: 8px; cursor: pointer;
  font-weight: 600; color: var(--ink-2); list-style: none; }
details.new-venue summary::-webkit-details-marker, details.repeat-box summary::-webkit-details-marker { display: none; }
details summary .ico { width: 16px; height: 16px; }
details summary .faint { font-weight: 400; }
.end-row { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; text-transform: none;
  letter-spacing: 0; font-family: var(--sans); font-size: 14px; color: var(--ink-2); }
.end-row label { display: inline-flex; align-items: center; gap: 8px; }
.end-row input[type=date] { width: 160px; }
.narrow-num { width: 80px; }
@media (max-width: 720px) {
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
}

/* Month grid */
.cal { padding: 14px 16px 16px; }
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cal-month { margin: 0 6px; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; min-width: 190px; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal-wd { padding: 6px 8px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.cal-day { min-height: 104px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-day.out { background: #141619; }
.cal-day.out .cal-num span { color: var(--faint); }
.cal-num { display: flex; align-items: center; justify-content: space-between; font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
.cal-day.today .cal-num span { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px;
  border-radius: 12px; background: var(--ink); color: #0b0c0e; font-weight: 700; }
.cal-add { display: inline-flex; padding: 2px; border-radius: 4px; color: var(--faint); opacity: 0; }
.cal-add .ico { width: 14px; height: 14px; }
.cal-day:hover .cal-add, .cal-add:focus-visible { opacity: 1; }
.cal-add:hover { color: var(--ink); background: var(--raised); }
.cal-chip { display: block; padding: 2px 6px; border-radius: 4px; font-size: 12px; line-height: 1.35; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; border: 1px solid transparent; }
.cal-chip .t { font-family: var(--mono); font-weight: 500; font-size: 11px; }
.cal-chip.k-gig { background: var(--ink); color: #0b0c0e; }
.cal-chip.k-rehearsal { background: transparent; border-color: var(--line-3); color: var(--ink); }
.cal-chip.k-other { background: var(--raised); color: var(--muted); }
.cal-chip.st-tentative { font-style: italic; border-style: dashed; border-color: var(--line-3); background: transparent; color: var(--ink-2); }
.cal-chip.st-cancelled { opacity: .5; text-decoration: line-through; }
.cal-chip:hover { text-decoration: none; filter: brightness(1.1); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.cal-legend .cal-chip { display: inline-block; }
.cal-list { display: none; }
@media (max-width: 768px) {
  .cal { padding: 10px; }
  .cal-day { min-height: 56px; padding: 4px; }
  .cal-grid .cal-chip { font-size: 0; padding: 0; height: 7px; border-radius: 4px; }
  .cal-grid .cal-chip .t { display: none; }
  .cal-add { display: none; }
  .cal-month { min-width: 0; font-size: 17px; }
  .cal-legend { display: none; }
  .cal-list { display: block; margin-top: 12px; }
  .ev-setlist .row { flex-wrap: wrap !important; }
  .ev-setlist .row-text { flex: 1 1 calc(100% - 70px); }
  .ev-setlist .spacer { display: none; }
  .ev-setlist .row-actions { width: 100%; padding-left: 58px; }
}

/* Library: Next up card */
.next-up { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; padding: 16px 20px; margin: 0 0 18px;
  border-left: 3px solid var(--ink-2); }
.next-up.st-tentative { border-left-style: dashed; }
.nu-when { display: flex; flex-direction: column; gap: 2px; min-width: 120px; }
.nu-when .field-label { margin: 0 0 2px; }
.nu-day { font-weight: 800; font-size: 17px; color: var(--ink); }
.nu-time { font-family: var(--mono); font-size: 13px; color: var(--ink-2); }
.nu-what { display: flex; flex-direction: column; flex: 1 1 260px; min-width: 0; }
.nu-what .title { font-weight: 700; font-size: 16px; color: var(--ink); }
.nu-go { display: flex; gap: 8px; }
.song-upcoming, .setlist-event { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 16px;
  font-size: 14px; color: var(--muted); }
.setlist-event form { margin: 0; }
.setlist-event > span { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
input[type=time] { font-family: var(--mono); }
.ev-more { display: flex; justify-content: center; margin: 4px 0 0; }

/* ---- Platform admin portal (views/admin.py) ---------------------------------
   Neutral throughout: amber stays for music & selection (active tab marker,
   links). Status is shown by weight/line style, never by a new hue. */
.admin-tabs { margin: 0 0 16px; }
.admin-note { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 16px; padding: 10px 14px;
  border: 1px dashed var(--line-3); border-radius: var(--r-ctl); color: var(--ink-2); font-size: 13.5px; }
.admin-note .ico { margin-top: 1px; color: var(--muted); }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0 0 16px; }
.stat-grid > .card { margin: 0; padding: 16px 18px; }
.stat-v { margin-top: 6px; font-size: 28px; font-weight: 800; letter-spacing: -0.01em; color: var(--ink);
  font-variant-numeric: tabular-nums; }
.stat-of { font-size: 18px; font-weight: 600; color: var(--muted); }
.stat-s { margin-top: 2px; font-size: 12.5px; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .stat-grid { gap: 10px; } .stat-v { font-size: 24px; } }
.admin-two { margin: 0 0 16px; }
.pad-x { padding: 0 20px 16px; }
.row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row-head h2.label { margin: 0; }
.link-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 0; margin: 0; padding: 0 20px 16px; }
.kv dt, .kv dd { margin: 0; padding: 8px 0; border-top: 1px solid var(--row-line); font-size: 14px; }
.kv dt { color: var(--ink-2); }
.kv dd { font-family: var(--mono); color: var(--ink); text-align: right; }
.kv + .card-head { padding-top: 8px; }
/* sign-ups bar chart: one neutral series, recessive axis */
.bars { display: block; width: 100%; height: auto; overflow: visible; }
.bars-base { stroke: var(--line-2); stroke-width: 1; }
.bar-fill { fill: var(--ink-2); }
.bar-hit { fill: transparent; }
.bar:hover .bar-fill { fill: var(--ink); }
.bar:hover .bar-hit { fill: var(--raised); }
.bar-x, .bar-max { fill: var(--muted); font-family: var(--mono); font-size: 11px; }
/* the SVG scales down on phones: bigger user-unit text, every other label */
@media (max-width: 600px) { .bar-x, .bar-max { font-size: 18px; } .bar-x.odd { display: none; } }
.as-table { margin-top: 8px; }
.as-table > summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.as-table .inst-table th, .as-table .inst-table td { padding: 7px 4px; }
/* account tables */
.adm-table th.n, .adm-table td.n { text-align: right; font-family: var(--mono); }
.adm-table td { vertical-align: middle; }
.adm-table td.acct { min-width: 220px; }
.adm-table td.acct .title { display: inline; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.adm-table td.acct .meta { display: block; margin-top: 2px; }
.adm-table td.acct .badge { margin-left: 6px; vertical-align: 1px; }
.adm-table td:nth-child(2), .adm-table td:nth-child(3) { font-family: inherit; color: inherit; }
.adm-table code { white-space: nowrap; }
.tier { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
.st-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: var(--r-chip);
  font-size: 12px; font-weight: 700; white-space: nowrap; border: 1px solid var(--line-3); color: var(--ink-2); }
.st-chip.st-locked { background: var(--ink); border-color: var(--ink); color: #0b0c0e; }
.st-chip.st-pending_deletion { border-style: dashed; font-style: italic; color: var(--muted); }
.admin-filters { flex-wrap: wrap; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 0 16px; }
.admin-foot { margin: 4px 2px 0; font-size: 12.5px; color: var(--muted); }
.sidebar .sb-admin { margin-top: 14px; }
/* admin batch 2: sign-up mode, lock controls */
.mode-form { display: flex; flex-direction: column; gap: 8px; }
.mode-opt { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--r-ctl); cursor: pointer; }
.mode-opt:has(input:checked) { border-color: var(--accent-edge); background: var(--accent-tint); }
.mode-opt input { margin-top: 4px; accent-color: var(--accent); }
.mode-opt > span { display: flex; flex-direction: column; gap: 2px; }
.mode-form + .admin-note { margin: 16px 0 0; }
.adm-table td.act { text-align: right; white-space: nowrap; vertical-align: top; }
.adm-table td.act form { margin: 0; }
.lock-pop { position: relative; display: inline-block; }
.lock-pop > summary { list-style: none; }
.lock-pop > summary::-webkit-details-marker { display: none; }
.lock-pop[open] > form { margin-top: 8px; width: 280px;
  display: flex; flex-direction: column; gap: 8px; padding: 14px; text-align: left; white-space: normal;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r-ctl); }
.lock-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 12px; }
.lock-card .muted { margin-top: 2px; }
.lock-card form { margin-top: 12px; }
.audit-d { max-width: 320px; color: var(--ink-2); }
/* admin batch 3 */
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.check input { accent-color: var(--accent); }
.lock-pop[open] > form .check { white-space: normal; }
.adm-table td.act > * { display: block; width: fit-content; margin: 4px 0 4px auto; }
