/* StatPlay Code: the coding suite. A dark workspace by default, so the video is the brightest thing on
   screen, with a light version for bright rooms. */
:root {
  color-scheme: light;
  --bg: #eef0f2;
  --surface-1: #ffffff;
  --surface-2: #f3f4f6;
  --surface-3: #e6e8eb;
  --border: #d6d9de;
  --text-primary: #0f1b2d;
  --text-secondary: #46505e;
  --text-muted: #6a7380;
  --brand: #0f1b2d;
  --accent: #1e846c;
  --accent-strong: #166653;
  --on-accent: #ffffff;
  --live: #d03b3b;
  --focus: #1e846c;
  --team-us: #1e846c;
  --team-opp: #6b7a8f;
  --neutral-code: #c08a1e;
  --on-code: #ffffff;
  --half-shade: rgb(30 132 108 / .06);
  --playhead: #d03b3b;
  --corner: 6px;
  --body-font: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --data-font: "Barlow Condensed", "Barlow", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b1320;
    --surface-1: #121c2b;
    --surface-2: #182435;
    --surface-3: #22304390;
    --border: #2a3a50;
    --text-primary: #eef2f6;
    --text-secondary: #b8c2cf;
    --text-muted: #8794a5;
    --accent: #2bd9a0;
    --accent-strong: #25b389;
    --on-accent: #08251c;
    --focus: #2bd9a0;
    --team-us: #25b389;
    --team-opp: #7d8ca3;
    --neutral-code: #d9a23a;
    --on-code: #08131f;
    --half-shade: rgb(43 217 160 / .05);
    --playhead: #ff5a5a;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1320;
  --surface-1: #121c2b;
  --surface-2: #182435;
  --surface-3: #22304390;
  --border: #2a3a50;
  --text-primary: #eef2f6;
  --text-secondary: #b8c2cf;
  --text-muted: #8794a5;
  --accent: #2bd9a0;
  --accent-strong: #25b389;
  --on-accent: #08251c;
  --focus: #2bd9a0;
  --team-us: #25b389;
  --team-opp: #7d8ca3;
  --neutral-code: #d9a23a;
  --on-code: #08131f;
  --half-shade: rgb(43 217 160 / .05);
  --playhead: #ff5a5a;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text-primary); font-family: var(--body-font); font-size: 15px;
  display: flex; flex-direction: column; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.muted, .hint { color: var(--text-muted); }
.hint { font-size: 13px; margin: 0; }
a { color: inherit; }

.mark { display: inline-block; width: 28px; height: 28px; flex: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Crect width='100' height='100' rx='23' fill='%230F1B2D'/%3E%3Crect x='18.25' y='57.25' width='11' height='22' rx='3.5' fill='%231E846C'/%3E%3Crect x='34.25' y='43.25' width='11' height='36' rx='3.5' fill='%2325B389'/%3E%3Cpath d='M52.25 23.25 L79.25 50 L52.25 76.75 Z' fill='%232BD9A0' stroke='%232BD9A0' stroke-width='5' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.mark.big { width: 72px; height: 72px; }

.loading-screen { display: none; }
body.booting .loading-screen { display: grid; justify-items: center; align-content: center; gap: 10px; flex: 1; }
body.booting .loading-screen p { margin: 0; }
body.booting > :not(.loading-screen):not(dialog):not(script) { display: none !important; }

/* Buttons and fields */
.btn { font: inherit; font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: var(--corner); cursor: pointer;
  background: var(--surface-2); color: var(--text-primary); border: 1px solid var(--border); white-space: nowrap; }
.btn:hover { background: var(--surface-3); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn.small { font-size: 13px; padding: 3px 9px; }
.btn.icon { width: 36px; padding: 6px 0; text-align: center; }
.btn:disabled { opacity: .45; cursor: default; }
.btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
input, select { font: inherit; color: var(--text-primary); }
label input, label select, .dlg-body select, .dlg-body input[type=file] { width: 100%; padding: 7px 9px; border: 1px solid var(--border);
  border-radius: var(--corner); background: var(--surface-2); font-size: 14px; }

/* Top bar */
.bar { display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: var(--surface-1); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-size: 17px; white-space: nowrap; }
.brand b { color: var(--accent); }
.pick { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pick-label { font-family: var(--data-font); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.pick select { padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--corner); background: var(--surface-2); max-width: 340px; font-size: 14px; }
.spacer { flex: 1; }
.status { font-size: 13px; color: var(--text-muted); }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; display: grid; min-width: 200px; padding: 4px;
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--corner); box-shadow: 0 10px 28px rgb(0 0 0 / .25); }
.menu[hidden] { display: none; }
.menu-item { border: 0; background: none; color: inherit; font: inherit; text-align: left; padding: 8px 12px; border-radius: var(--corner);
  cursor: pointer; text-decoration: none; }
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-2); outline: none; }

/* Sign in and messages */
.gate { flex: 1; display: grid; place-items: start center; padding: 48px 16px; }
.gate .card { width: min(440px, 100%); display: grid; gap: 12px; padding: 24px; background: var(--surface-1); border: 1px solid var(--border); border-radius: 12px; }
.gate h2 { margin: 0; font-size: 22px; }
.gate-brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; }
.gate-brand b { color: var(--accent); }
.auth-form { display: grid; gap: 10px; }
.auth-form label { display: grid; gap: 4px; font-size: 13px; color: var(--text-secondary); }
.auth-form .btn { justify-self: start; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--corner); overflow: hidden; justify-self: start; }
.seg button { border: 0; background: none; color: inherit; font: inherit; font-size: 14px; padding: 6px 12px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

/* Workspace */
.workspace { flex: 1; min-height: 0; display: grid; gap: 8px; padding: 8px;
  grid-template-columns: minmax(0, 1.55fr) minmax(340px, 1fr); grid-template-rows: minmax(0, 1fr) minmax(200px, 36vh);
  grid-template-areas: "video window" "timeline timeline"; }
.video-pane { grid-area: video; }
.cw-pane { grid-area: window; display: flex; flex-direction: column; overflow: hidden; }
.tl-pane { grid-area: timeline; display: flex; flex-direction: column; overflow: hidden; }
.pane { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--corner); min-width: 0; min-height: 0; }
.video-pane { display: flex; flex-direction: column; }
.video-box { position: relative; flex: 1; min-height: 160px; background: #000; border-radius: var(--corner) var(--corner) 0 0; display: grid; place-items: center; overflow: hidden; }
.video-box video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.video-box video:not([src]) { display: none; }
.video-empty { color: #b8c2cf; margin: 0; padding: 24px; text-align: center; }
.transport { display: flex; align-items: center; gap: 10px; padding: 8px 10px; flex-wrap: wrap; border-top: 1px solid var(--border); }
.clock { font-family: var(--data-font); font-size: 16px; font-variant-numeric: tabular-nums; min-width: 120px; }
#scrub { flex: 1 1 200px; accent-color: var(--accent); }
.speed { padding: 5px 6px; border: 1px solid var(--border); border-radius: var(--corner); background: var(--surface-2); }
.angles { display: flex; gap: 4px; flex-wrap: wrap; }
.upload-bar { display: grid; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--border); font-size: 13px; }
.upload-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; }
.progress { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s; }

/* Dialogs */
dialog { border: 1px solid var(--border); border-radius: 12px; padding: 0; background: var(--surface-1); color: var(--text-primary); width: min(560px, calc(100vw - 32px)); }
dialog::backdrop { background: rgb(0 0 0 / .5); }
.dlg-body { display: grid; gap: 12px; padding: 20px; }
.dlg-body h2 { margin: 0; font-size: 20px; }
.dlg-body label { display: grid; gap: 4px; font-size: 13px; color: var(--text-secondary); }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.angles-pick { border: 1px solid var(--border); border-radius: var(--corner); padding: 10px; display: grid; gap: 8px; margin: 0; }
.angles-pick legend { font-size: 13px; color: var(--text-secondary); padding: 0 4px; }
.angle-file { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.angle-file input[type=text] { padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--corner); background: var(--surface-2); width: 100%; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; }
.warn { font-size: 13px; background: color-mix(in srgb, var(--live) 16%, var(--surface-1)); border-radius: var(--corner); padding: 8px 10px; margin: 0; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.keys dt { font-family: var(--data-font); font-weight: 600; }
.keys dd { margin: 0; color: var(--text-secondary); }
kbd { font-family: var(--data-font); font-size: 13px; padding: 1px 6px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; background: var(--surface-2); }

@media (max-width: 640px) {
  .bar { gap: 8px; padding: 8px 12px; }
  .pick select { max-width: 100%; }
  .pick { flex: 1 1 100%; }
  .workspace { padding: 6px; }
  .angle-file { grid-template-columns: 1fr; }
}

/* Halves */
.halves { display: flex; gap: 4px; flex-wrap: wrap; }
.halves .btn.marked { border-color: var(--accent); }

/* Panes */
.pane-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.pane-head select, .pane-head input { padding: 4px 8px; border: 1px solid var(--border); border-radius: var(--corner); background: var(--surface-2); font-size: 14px; min-width: 0; }
.pane-head select { flex: 1; }
.edit-only { display: none !important; }
.cw-pane.editing .edit-only { display: flex !important; }
.cw-pane.editing p.edit-only { display: block !important; padding: 0 8px; }
.cw-pane.editing #cw-edit, .cw-pane.editing #cw-select { display: none; }
.cw-pane.editing .pane-head input { flex: 1; }
.edit-tools { gap: 6px; padding: 6px 8px; flex-wrap: wrap; align-items: center; }
.notice { margin: 8px 8px 0; padding: 8px 10px; font-size: 13px; background: var(--surface-2); border-radius: var(--corner); color: var(--text-secondary); }

/* Code window */
.cw-board { flex: 1; overflow: auto; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; padding: 8px; align-content: start; }
.cw-btn { position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; padding: 4px 8px; border-radius: var(--corner);
  font: inherit; font-size: 14px; font-weight: 600; line-height: 1.15; cursor: pointer; user-select: none; touch-action: manipulation;
  border: 2px solid var(--btn, var(--border)); background: color-mix(in srgb, var(--btn, var(--surface-2)) 16%, var(--surface-1)); color: var(--text-primary); }
.cw-btn:hover { background: color-mix(in srgb, var(--btn, var(--surface-2)) 28%, var(--surface-1)); }
.cw-btn:active { transform: translateY(1px); }
.cw-btn.label { border-style: dashed; font-weight: 500; }
.cw-btn.on { background: var(--btn); color: var(--on-code); box-shadow: 0 0 0 3px color-mix(in srgb, var(--btn) 35%, transparent); }
.cw-btn.flash { animation: flash .4s ease-out; }
@keyframes flash { from { background: var(--btn, var(--accent)); color: var(--on-code); } }
@media (prefers-reduced-motion: reduce) { .cw-btn.flash { animation: none; } }
.cw-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-btn kbd { position: absolute; top: 2px; right: 3px; font-size: 10px; padding: 0 3px; opacity: .8; border-bottom-width: 1px; background: transparent; color: inherit; border-color: currentColor; }
.cw-time { font-family: var(--data-font); font-size: 13px; font-variant-numeric: tabular-nums; }
.cw-text { align-self: end; font-family: var(--data-font); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); padding: 0 2px 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cw-board.locked .cw-btn { opacity: .5; cursor: not-allowed; }
.cw-pane.editing .cw-board { background-image: linear-gradient(to right, var(--surface-2) 1px, transparent 1px); background-size: calc((100% - 16px) / 12) 100%; background-position: 8px 0; }
.cw-pane.editing [data-edit] { cursor: move; outline: 1px dashed var(--text-muted); outline-offset: 1px; }
.cw-resize { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; cursor: nwse-resize; background: linear-gradient(135deg, transparent 50%, var(--text-muted) 50%); border-bottom-right-radius: var(--corner); }

/* Timeline */
.tl-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 280px; }
.tl-wrap { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
#tl-canvas { position: absolute; inset: 0; display: block; touch-action: none; }
.selected { border-left: 1px solid var(--border); padding: 10px; overflow: auto; display: grid; gap: 8px; align-content: start; font-size: 14px; }
.sel-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sel-times { display: grid; gap: 4px; }
.sel-times label { display: flex; justify-content: space-between; align-items: center; color: var(--text-secondary); font-size: 13px; }
.nudge { display: inline-flex; align-items: center; gap: 6px; }
.nudge b { font-family: var(--data-font); font-size: 15px; font-variant-numeric: tabular-nums; color: var(--text-primary); min-width: 52px; text-align: center; }
.sel-labels { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 2px 4px 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.chip button { border: 0; background: none; color: var(--text-muted); cursor: pointer; font-size: 14px; padding: 0 4px; }
.sel-add { display: grid; grid-template-columns: 1fr 1fr auto; gap: 4px; }
.sel-add input { min-width: 0; padding: 4px 6px; border: 1px solid var(--border); border-radius: var(--corner); background: var(--surface-2); font-size: 13px; }

/* Button settings */
#btn-dlg { width: min(620px, calc(100vw - 32px)); }
#btn-dlg .fields { display: grid; gap: 10px; max-height: 64vh; overflow: auto; padding-right: 4px; }
#btn-dlg details { border: 1px solid var(--border); border-radius: var(--corner); padding: 6px 10px; }
#btn-dlg summary { cursor: pointer; font-size: 14px; }
.link-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 2px 10px; margin-top: 6px; }
label.check { display: flex !important; flex-direction: row; align-items: center; gap: 6px; font-size: 13px; color: var(--text-primary); }
label.check input { width: auto; }
.color-pick { display: flex; gap: 10px; align-items: center; }
.color-pick input[type=color] { width: 44px; height: 32px; padding: 2px; }
.dlg-actions .spacer { flex: 1; }

@media (max-width: 1000px) {
  .workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-rows: max-content; grid-template-areas: "video" "window" "timeline"; overflow: auto; }
  .workspace > .pane { min-height: auto; }
  .video-box { aspect-ratio: 16 / 9; flex: none; }
  .cw-pane { min-height: 320px; }
  .tl-pane { height: 360px; }
  .tl-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .selected { border-left: 0; border-top: 1px solid var(--border); max-height: 180px; }
}
.keys .keys-title { grid-column: 1 / -1; margin-top: 8px; font-family: var(--data-font); text-transform: uppercase; letter-spacing: .06em; font-size: 12px; color: var(--text-muted); }
#keys-dlg .keys { max-height: 60vh; overflow: auto; }

/* A row's clips */
.clips-actions { display: flex; gap: 6px; }
.clip-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.clip { width: 100%; display: grid; grid-template-columns: 26px 1fr auto; gap: 2px 8px; align-items: center; text-align: left; padding: 6px 8px;
  border: 1px solid transparent; border-radius: var(--corner); background: none; color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
.clip:hover { background: var(--surface-2); }
.clip.playing { border-color: var(--playhead); background: var(--surface-2); }
.clip-n { color: var(--text-muted); font-family: var(--data-font); }
.clip-when { font-family: var(--data-font); font-size: 14px; font-weight: 600; }
.clip-len { color: var(--text-muted); font-size: 12px; }
.clip-labels { grid-column: 2 / -1; color: var(--text-secondary); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-btn { justify-self: start; border: 0; background: none; color: var(--accent); font: inherit; font-size: 13px; padding: 0; cursor: pointer; }

/* Tabs in the right-hand pane */
.pane-tabs { display: flex; gap: 2px; padding: 6px 8px 0; border-bottom: 1px solid var(--border); }
.pane-tabs button { border: 0; background: none; color: var(--text-muted); font: inherit; font-size: 14px; font-weight: 600; padding: 6px 12px;
  border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.pane-tabs button[aria-selected="true"] { color: var(--text-primary); border-bottom-color: var(--accent); }
.cw-view, .ow-view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ow-edit-only { display: none !important; }
.cw-pane.ow-editing .ow-edit-only { display: flex !important; }
.cw-pane.ow-editing p.ow-edit-only { display: block !important; padding: 0 8px; }
.cw-pane.ow-editing #ow-edit, .cw-pane.ow-editing #ow-select, .cw-pane.ow-editing #ow-popout { display: none; }
.cw-pane.ow-editing #ow-view .pane-head input { flex: 1; }
.cw-pane.ow-editing [data-edit] { cursor: move; outline: 1px dashed var(--text-muted); outline-offset: 1px; position: relative; }

/* Output boxes */
.ow-board { flex: 1; overflow: auto; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; padding: 8px; align-content: start; }
.ow-box { display: flex; flex-direction: column; justify-content: center; align-items: stretch; gap: 2px; min-width: 0; padding: 6px 10px; border-radius: var(--corner);
  background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; position: relative; }
.ow-label { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ow-value { font-family: var(--data-font); font-size: 28px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.ow-heading { align-self: end; font-family: var(--data-font); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); padding: 0 2px 2px; }
.ow-split { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; }
.ow-side { display: grid; line-height: 1.05; min-width: 0; }
.ow-side.them { text-align: right; }
.ow-side b { font-family: var(--data-font); font-size: 20px; font-variant-numeric: tabular-nums; }
.ow-side small { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 9em; }
.ow-track { height: 10px; border-radius: 5px; background: var(--team-opp); overflow: hidden; display: block; }
.ow-track i { display: block; height: 100%; background: var(--team-us); border-right: 2px solid var(--surface-2); }
.ow-box.error { border-color: var(--live); }
.ow-err { font-size: 12px; color: var(--live); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.popout { min-height: 100vh; }
body.popout .ow-board { padding: 16px; gap: 10px; }
body.popout .ow-value { font-size: 40px; }
body.popout .ow-side b { font-size: 28px; }

/* Box settings */
#box-dlg { width: min(680px, calc(100vw - 32px)); }
#box-dlg .fields { display: grid; gap: 10px; max-height: 66vh; overflow: auto; padding-right: 4px; }
#box-dlg textarea { width: 100%; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 8px; border: 1px solid var(--border);
  border-radius: var(--corner); background: var(--surface-2); color: var(--text-primary); resize: vertical; tab-size: 2; }
#box-dlg details { border: 1px solid var(--border); border-radius: var(--corner); padding: 6px 10px; }
#box-dlg summary { cursor: pointer; font-size: 14px; }
.script-test { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.script-test output { font-size: 14px; font-family: var(--data-font); }
.script-test output.good { color: var(--accent); }
.script-test output.bad { color: var(--live); font-family: inherit; font-size: 13px; }
.fn-list { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 8px 0; font-size: 13px; }
.fn-list dd { margin: 0; color: var(--text-secondary); }
.rows-seen { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 0; }
.rows-seen code, .fn-list code, .hint code { font-size: 12px; background: var(--surface-2); padding: 1px 4px; border-radius: 3px; }
.script-fields { display: grid; gap: 8px; margin-top: 8px; }
#btn-dlg textarea { width: 100%; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 8px; border: 1px solid var(--border);
  border-radius: var(--corner); background: var(--surface-2); color: var(--text-primary); resize: vertical; }
.common .row { margin-top: 8px; }
.common-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
