/* AMG Run of Show — control-room UI. Dark by default; light via [data-theme="light"]. */
:root {
  --accent: #E8412C;
  --accent-hi: #FF6A3D;
  --accent-lo: #B81E3C;
  --accent-ink: #fff;
  --grad: linear-gradient(135deg, var(--accent-hi), var(--accent) 55%, var(--accent-lo));
  --glow: color-mix(in srgb, var(--accent) 45%, transparent);
  --bg: #07080B;
  --bg-2: #0D0F14;
  --panel: #111319;
  --panel-2: #181B23;
  --line: #20242E;
  --line-2: #2C313D;
  --text: #ECEEF3;
  --muted: #8A92A3;
  --faint: #596172;
  --display: 'Outfit', Inter, system-ui, sans-serif;
  --pattern: rgba(255, 255, 255, .022);
  --pass: #22C55E;
  --pass-bg: rgba(34, 197, 94, .14);
  --fail: #EF4444;
  --fail-bg: rgba(239, 68, 68, .16);
  --na: #94A3B8;
  --na-bg: rgba(148, 163, 184, .14);
  --warn: #F59E0B;
  --warn-bg: rgba(245, 158, 11, .14);
  --info: #3B82F6;
  --shadow: 0 18px 50px rgba(0, 0, 0, .55);
  --radius: 10px;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* Hover (Phase 9b): a quiet lift, never a different color. A few percent lighter in dark mode (darker in light). */
  --row-hover: color-mix(in srgb, var(--panel) 96%, #fff);
  --head-hover: color-mix(in srgb, var(--panel-2) 96%, #fff);
  --card-hover-shadow: 0 12px 30px -20px rgba(0, 0, 0, .7);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F3F4F7;
  --bg-2: #ECEEF2;
  --panel: #FFFFFF;
  --panel-2: #F7F8FA;
  --line: #E2E5EB;
  --line-2: #D3D8E0;
  --text: #141821;
  --muted: #5E6676;
  --faint: #9AA1AE;
  --pass-bg: rgba(34, 197, 94, .12);
  --fail-bg: rgba(239, 68, 68, .1);
  --na-bg: rgba(100, 116, 139, .1);
  --warn-bg: rgba(245, 158, 11, .14);
  --shadow: 0 14px 40px rgba(20, 24, 33, .14);
  --pattern: rgba(20, 24, 33, .035);
  --row-hover: color-mix(in srgb, var(--panel) 97.5%, #141821);
  --head-hover: color-mix(in srgb, var(--panel-2) 97%, #141821);
  --card-hover-shadow: 0 10px 24px -16px rgba(20, 24, 33, .22);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }
.hidden { display: none !important; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12px; }
.row { display: flex; align-items: center; gap: 8px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.spacer { flex: 1; }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text);
  font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .12s, border-color .12s, transform .05s;
}
.btn:hover { border-color: var(--faint); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--fail); }
.btn.danger:hover { border-color: var(--fail); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--panel-2); border-color: var(--line); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn.icon { width: 32px; padding: 0; }
.btn.sm.icon { width: 28px; }

.input, .select, textarea.input {
  width: 100%; height: 36px; padding: 0 10px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); outline: none;
}
textarea.input { height: auto; min-height: 84px; padding: 8px 10px; resize: vertical; }
.input:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.select { appearance: none; padding-right: 28px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.field-grid .full { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; margin-bottom: 10px; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }

/* Inline (table) inputs look like text until focused */
.cell-input {
  width: 100%; min-height: 30px; padding: 4px 8px; border-radius: 6px;
  border: 1px solid transparent; background: transparent; outline: none; color: var(--text);
}
.cell-input:hover { border-color: var(--line); }
.cell-input:focus { border-color: var(--accent); background: var(--bg-2); }
.cell-input::placeholder { color: var(--faint); }
select.cell-input { appearance: none; cursor: pointer; padding-right: 20px;
  background-image: linear-gradient(45deg, transparent 50%, var(--faint) 50%), linear-gradient(135deg, var(--faint) 50%, transparent 50%);
  background-position: calc(100% - 11px) 50%, calc(100% - 7px) 50%; background-size: 4px 4px; background-repeat: no-repeat; }
.cell-input:disabled { opacity: 1; cursor: default; background-image: none; }
.cell-input:disabled:hover { border-color: transparent; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 18px; height: 58px; padding: 0 20px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand-mark {
  height: 30px; min-width: 30px; padding: 0 8px; border-radius: 7px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-weight: 800; letter-spacing: .04em; font-size: 13px;
}
.brand-logo { height: 30px; max-width: 140px; object-fit: contain; }
.brand-text { line-height: 1.1; }
.brand-text b { display: block; font-size: 14px; }
.brand-text small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.nav { display: flex; gap: 4px; }
.nav a { padding: 7px 12px; border-radius: 7px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 13px; }
.nav a:hover { color: var(--text); background: var(--panel-2); }
.nav a.active { color: var(--text); background: var(--panel-2); box-shadow: inset 0 -2px 0 var(--accent); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-size: 11px; font-weight: 700; color: #fff; border: 2px solid var(--bg); text-transform: uppercase;
}
.avatar.sm { width: 22px; height: 22px; font-size: 9px; border-width: 1px; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { margin-left: -6px; }
.user-chip { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 8px 4px 4px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); }
.user-chip:hover { border-color: var(--line-2); }
.role-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 2px 6px; border-radius: 4px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.role-tag.admin { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }

/* ---------- menus ---------- */
.menu-wrap { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 230px; padding: 6px;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow);
}
.menu button, .menu a {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px;
  background: transparent; text-align: left; cursor: pointer; font-size: 13px; text-decoration: none; color: var(--text);
}
.menu button:hover, .menu a:hover { background: var(--panel-2); }
.menu .danger { color: var(--fail); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.menu .menu-label { padding: 6px 10px 4px; font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }

/* ---------- layout ---------- */
.page { max-width: 1440px; margin: 0 auto; padding: 24px 20px 80px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 24px; letter-spacing: -.01em; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-pad { padding: 18px; }
h2.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 28px 0 12px; font-weight: 700; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius); }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(1200px 500px at 50% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent), var(--bg); }
.auth-card { width: 100%; max-width: 400px; padding: 32px; }
.auth-card .brand { margin-bottom: 24px; }
.auth-card h1 { font-size: 20px; margin: 0 0 6px; }
.auth-card p { color: var(--muted); margin: 0 0 22px; }
.form-error { color: var(--fail); font-size: 13px; min-height: 18px; margin: -4px 0 10px; }

/* ---------- pills / badges ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.pill.planning { color: var(--info); border-color: rgba(59, 130, 246, .35); }
.pill.rehearsal { color: var(--warn); border-color: rgba(245, 158, 11, .35); }
.pill.live { color: #fff; background: var(--fail); border-color: var(--fail); }
.pill.live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: blink 1.2s infinite; }
.pill.wrapped { color: var(--na); }
.pill.go { color: #fff; background: var(--pass); border-color: var(--pass); }
.pill.nogo { color: #fff; background: var(--fail); border-color: var(--fail); }
.pill.ready { color: var(--pass); border-color: rgba(34, 197, 94, .4); }
.pill.notready { color: var(--warn); border-color: rgba(245, 158, 11, .4); }
.pill.lock { color: var(--warn); }
@keyframes blink { 50% { opacity: .25; } }

.progress { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; display: flex; }
.progress > i { display: block; height: 100%; }
.progress .p-pass { background: var(--pass); }
.progress .p-na { background: var(--na); }
.progress .p-fail { background: var(--fail); }

/* ---------- show cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 14px; }
.show-card { display: block; padding: 16px; text-decoration: none; cursor: pointer; transition: border-color .12s, transform .12s; position: relative; }
.show-card:hover { border-color: var(--line-2); transform: translateY(-1px); }
.show-card .date-block { display: flex; gap: 14px; align-items: flex-start; }
.show-card .date-tile { width: 52px; flex: none; text-align: center; border-radius: 8px; border: 1px solid var(--line-2); overflow: hidden; }
.show-card .date-tile b { display: block; background: var(--accent); color: var(--accent-ink); font-size: 10px; letter-spacing: .1em; padding: 2px 0; }
.show-card .date-tile span { display: block; font-size: 20px; font-weight: 800; padding: 3px 0 4px; }
.show-card h3 { margin: 0 0 2px; font-size: 16px; line-height: 1.25; }
.show-card .meta { color: var(--muted); font-size: 12px; }
.show-card .card-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 12px; color: var(--muted); }
.show-card .progress { margin-top: 12px; }
.show-card.today { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }

/* ---------- show header ---------- */
.show-head { padding: 18px 20px; margin-bottom: 14px; display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: start; }
.show-head h1 { margin: 0; font-size: 22px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.show-head .meta-line { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); margin-top: 6px; font-size: 13px; }
.show-head .meta-line b { color: var(--text); font-weight: 600; }
.clocks { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.clock { min-width: 128px; padding: 8px 12px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line); text-align: right; }
.clock small { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.clock span { font-family: var(--mono); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.clock.hot span { color: var(--fail); }
.clock.warm span { color: var(--warn); }

.readiness { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) 2fr; gap: 10px; margin-bottom: 14px; }
.stat { padding: 12px 14px; }
.stat small { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.stat b { font-size: 24px; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.stat.s-pass b { color: var(--pass); }
.stat.s-fail b { color: var(--fail); }
.stat.s-crit b { color: var(--warn); }
.stat.go-box { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.go-light { width: 14px; height: 14px; border-radius: 50%; background: var(--faint); flex: none; }
.go-light.on { background: var(--pass); box-shadow: 0 0 12px var(--pass); }
.go-light.off { background: var(--fail); box-shadow: 0 0 12px var(--fail); }
.go-light.wait { background: var(--warn); box-shadow: 0 0 12px var(--warn); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--text); border-color: var(--accent); }
.tabs .count { font-size: 11px; margin-left: 6px; padding: 1px 6px; border-radius: 99px; background: var(--panel-2); color: var(--muted); }
.tabs .count.bad { background: var(--fail); color: #fff; }

.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.seg button { height: 32px; padding: 0 12px; border: 0; background: var(--panel); cursor: pointer; font-weight: 600; font-size: 12px; color: var(--muted); border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.active { background: var(--panel-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.toolbar .search { width: 240px; }

/* ---------- checklist ---------- */
.section-block { margin-bottom: 14px; overflow: hidden; }
.section-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 14px; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.section-head .sec-name { font-weight: 700; font-size: 14px; max-width: 320px; text-transform: uppercase; letter-spacing: .04em; }
.section-head .sec-count { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.section-head .progress { width: 120px; }
.section-head .assign { width: 170px; }
.collapse-btn { transition: transform .15s; }
.collapsed .collapse-btn { transform: rotate(-90deg); }
.collapsed .rows, .collapsed .add-row { display: none; }

.grid-head, .item {
  display: grid; align-items: center; gap: 8px;
  grid-template-columns: 22px 26px minmax(220px, 2.2fr) 186px 170px 150px 92px minmax(170px, 1.6fr) 30px;
  padding: 0 12px;
}
.grid-head { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); height: 30px; border-bottom: 1px solid var(--line); }
.item { min-height: 46px; border-bottom: 1px solid var(--line); position: relative; transition: background .2s; }
.item:last-child { border-bottom: 0; }
.item:hover { background: color-mix(in srgb, var(--panel-2) 60%, transparent); }
.item.st-pass { background: linear-gradient(90deg, var(--pass-bg), transparent 40%); }
.item.st-fail { background: linear-gradient(90deg, var(--fail-bg), transparent 60%); }
.item.st-na { opacity: .62; }
.item.st-na .task-input, .item.st-pass .task-input { text-decoration-color: var(--faint); }
.item.overdue:not(.st-pass):not(.st-na) { box-shadow: inset 3px 0 0 var(--warn); }
.item.st-fail { box-shadow: inset 3px 0 0 var(--fail); }
.item.mine .task-input { font-weight: 600; }
.item.flash { animation: flash 1.2s; }
@keyframes flash { 0% { background: color-mix(in srgb, var(--accent) 30%, transparent); } }
.drag { cursor: grab; color: var(--faint); display: grid; place-items: center; user-select: none; height: 30px; }
.drag:hover { color: var(--text); }
.item.dragging { opacity: .4; }
.item.drop-above { box-shadow: inset 0 2px 0 var(--accent); }
.rows:empty { min-height: 40px; }
.rows:empty::before { content: 'No tasks yet'; display: block; padding: 12px 60px; color: var(--faint); font-size: 12px; }
.star { width: 26px; height: 26px; border: 0; background: transparent; cursor: pointer; color: var(--faint); font-size: 15px; border-radius: 6px; padding: 0; }
.star.on { color: var(--warn); }
.star:disabled { cursor: default; }
.star:not(:disabled):hover { background: var(--panel-2); }

.status { display: inline-flex; border: 1px solid var(--line-2); border-radius: 7px; overflow: hidden; width: max-content; }
.status button { height: 28px; min-width: 56px; padding: 0 8px; border: 0; background: var(--bg-2); color: var(--muted); font-weight: 700; font-size: 11px; letter-spacing: .04em; cursor: pointer; border-right: 1px solid var(--line); }
.status button:last-child { border-right: 0; }
.status button:not(:disabled):hover { color: var(--text); }
.status button.on.pass { background: var(--pass); color: #04210f; }
.status button.on.fail { background: var(--fail); color: #fff; }
.status button.on.na { background: var(--na); color: #0b1220; }
.status button:disabled { cursor: default; }
.status-ro { font-weight: 700; font-size: 11px; letter-spacing: .06em; padding: 4px 9px; border-radius: 6px; width: max-content; }
.status-ro.pending { color: var(--muted); border: 1px solid var(--line-2); }
.status-ro.pass { background: var(--pass); color: #04210f; }
.status-ro.fail { background: var(--fail); color: #fff; }
.status-ro.na { background: var(--na); color: #0b1220; }

.confirmed { font-size: 12px; line-height: 1.2; color: var(--muted); }
.confirmed b { color: var(--text); font-weight: 600; display: block; }
.due { font-family: var(--mono); font-size: 12px; }
.due.over { color: var(--warn); font-weight: 700; }
.editing-badge { position: absolute; left: -4px; top: 50%; transform: translateY(-50%); }
.item .del { opacity: 0; }
.item:hover .del, .item:focus-within .del { opacity: 1; }
.add-row { display: flex; gap: 8px; padding: 8px 12px 10px 60px; border-top: 1px solid var(--line); }
.add-row .input { height: 32px; }
.owner-cell { display: flex; align-items: center; gap: 6px; min-width: 0; }
.owner-cell .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }

/* ---------- rundown ---------- */
.onair { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 0; margin-bottom: 14px; overflow: hidden; }
.onair > div { padding: 16px 18px; border-right: 1px solid var(--line); }
.onair > div:last-child { border-right: 0; }
.onair small { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }
.onair .now-title { font-size: 20px; font-weight: 800; line-height: 1.2; }
.onair .big { font-family: var(--mono); font-size: 40px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.onair .big.over { color: var(--fail); }
.onair .big.warn { color: var(--warn); }
.onair.live { border-color: var(--fail); box-shadow: 0 0 0 1px var(--fail), 0 0 30px rgba(239, 68, 68, .15); }
.onair .controls { display: flex; flex-direction: column; gap: 8px; justify-content: center; min-width: 220px; }
.onair .controls .row .btn { flex: 1; }
.drift.behind { color: var(--fail); }
.drift.ahead { color: var(--pass); }

.ros-head, .seg-row {
  display: grid; align-items: center; gap: 8px;
  grid-template-columns: 22px 38px 84px minmax(220px, 2fr) 120px 84px 160px minmax(160px, 1.5fr) 96px 30px;
  padding: 0 12px;
}
.ros-head { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); height: 32px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.seg-row { min-height: 46px; border-bottom: 1px solid var(--line); position: relative; }
.seg-row:last-child { border-bottom: 0; }
.seg-row.current { background: linear-gradient(90deg, var(--fail-bg), transparent 70%); box-shadow: inset 3px 0 0 var(--fail); }
.seg-row.done { opacity: .55; }
.seg-row .num { font-family: var(--mono); color: var(--faint); font-size: 12px; }
.seg-row .del { opacity: 0; }
.seg-row:hover .del { opacity: 1; }
.seg-row.dragging { opacity: .4; }
.seg-row.drop-above { box-shadow: inset 0 2px 0 var(--accent); }
.type-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.t-match { color: var(--accent); } .t-break { color: var(--warn); } .t-vt { color: #A78BFA; } .t-ad { color: #22D3EE; } .t-standby { color: var(--na); } .t-segment { color: var(--info); }
.goto { opacity: 0; }
.seg-row:hover .goto { opacity: 1; }
.ros-foot { display: flex; justify-content: space-between; padding: 10px 14px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }

/* ---------- activity ---------- */
.activity { padding: 4px 0; }
.act { display: grid; grid-template-columns: 86px 1fr; gap: 12px; padding: 9px 18px; border-bottom: 1px solid var(--line); font-size: 13px; }
.act:last-child { border-bottom: 0; }
.act time { color: var(--faint); font-family: var(--mono); font-size: 12px; padding-top: 1px; }
.act b { font-weight: 600; }
.act .k-status.fail { color: var(--fail); }
.act-filter { margin-bottom: 12px; }

/* ---------- notes tab / show notes ---------- */
.notes-box { white-space: pre-wrap; }

/* ---------- tables (team / templates) ---------- */
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.tbl td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.inactive td { opacity: .5; }
.color-input { width: 34px; height: 30px; border: 1px solid var(--line-2); border-radius: 6px; padding: 2px; background: var(--bg-2); cursor: pointer; }
.table-wrap { overflow-x: auto; }

.role-legend { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.role-legend .panel { padding: 14px; }
.role-legend b { display: block; margin-bottom: 4px; }
.role-legend p { margin: 0; color: var(--muted); font-size: 12px; }

/* ---------- settings ---------- */
.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.logo-drop { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px dashed var(--line-2); border-radius: 10px; }
.logo-drop img { max-height: 48px; max-width: 160px; }
.preview-bar { border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }

/* ---------- modal ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(5, 7, 10, .62); display: grid; place-items: center; padding: 20px; animation: fade .12s; }
.modal { width: 100%; max-width: 560px; max-height: calc(100vh - 40px); overflow: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); }
.modal.wide { max-width: 720px; }
.modal-head { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 16px; flex: 1; }
.modal-body { padding: 20px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--panel-2); border-radius: 0 0 14px 14px; }
@keyframes fade { from { opacity: 0; } }
.share-box { display: flex; gap: 8px; }
.share-box .input { font-family: var(--mono); font-size: 12px; }
.callout { padding: 12px 14px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.callout.warn { border-color: rgba(245, 158, 11, .4); color: var(--text); background: var(--warn-bg); }
.kbd { font-family: var(--mono); font-size: 11px; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line-2); background: var(--bg-2); }

/* ---------- toasts ---------- */
#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { padding: 12px 14px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line-2); box-shadow: var(--shadow); display: flex; gap: 10px; align-items: flex-start; animation: slide .18s; font-size: 13px; }
.toast.fail, .toast.nogo { border-color: var(--fail); background: color-mix(in srgb, var(--fail) 18%, var(--panel)); }
.toast.go, .toast.ok { border-color: var(--pass); }
.toast b { display: block; }
@keyframes slide { from { transform: translateY(8px); opacity: 0; } }

.banner { padding: 10px 20px; text-align: center; font-weight: 600; font-size: 13px; }
.banner.view { background: var(--panel-2); border-bottom: 1px solid var(--line); color: var(--muted); }
.banner.locked { background: var(--warn-bg); color: var(--warn); border-bottom: 1px solid rgba(245, 158, 11, .3); }
.banner.offline { background: var(--fail); color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .readiness { grid-template-columns: repeat(3, 1fr); }
  .readiness .go-box { grid-column: 1 / -1; }
  .grid-head { display: none; }
  .item { grid-template-columns: 22px 26px 1fr auto; grid-template-areas: 'drag star task status' '. . owner owner' '. . meta meta' '. . notes notes'; padding: 10px 12px; row-gap: 6px; }
  .item > .c-drag { grid-area: drag; } .item > .c-star { grid-area: star; } .item > .c-task { grid-area: task; } .item > .c-status { grid-area: status; }
  .item > .c-owner { grid-area: owner; } .item > .c-confirmed { grid-area: meta; } .item > .c-notes { grid-area: notes; }
  .item > .c-due { position: absolute; right: 44px; bottom: 10px; } .item > .c-del { position: absolute; right: 8px; bottom: 8px; }
  .item .del { opacity: 1; }
  .ros-head { display: none; }
  .seg-row { grid-template-columns: 22px 30px 1fr auto; grid-template-areas: 'drag num title dur' '. time type owner' '. notes notes notes' '. actual actual del'; padding: 10px 12px; row-gap: 4px; }
  .seg-row > .r-drag { grid-area: drag; } .seg-row > .r-num { grid-area: num; } .seg-row > .r-title { grid-area: title; } .seg-row > .r-dur { grid-area: dur; }
  .seg-row > .r-time { grid-area: time; } .seg-row > .r-type { grid-area: type; } .seg-row > .r-owner { grid-area: owner; } .seg-row > .r-notes { grid-area: notes; }
  .seg-row > .r-actual { grid-area: actual; } .seg-row > .r-del { grid-area: del; }
  .seg-row .del, .seg-row .goto { opacity: 1; }
  .onair { grid-template-columns: 1fr 1fr; }
  .onair > div { border-bottom: 1px solid var(--line); }
  .settings-grid { grid-template-columns: 1fr; }
  .role-legend { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .topbar { padding: 0 12px; gap: 10px; }
  .brand-text, .nav-full { display: none; }
  .page { padding: 16px 12px 60px; }
  .show-head { grid-template-columns: 1fr; padding: 14px; }
  .clocks { justify-content: flex-start; }
  .clock { min-width: 0; flex: 1; text-align: left; }
  .readiness { grid-template-columns: repeat(2, 1fr); }
  .item { grid-template-columns: 22px 26px 1fr; grid-template-areas: 'drag star task' '. . status' '. . owner' '. . meta' '. . notes'; }
  .section-head { flex-wrap: wrap; }
  .section-head .progress { display: none; }
  .section-head .assign { width: 140px; }
  .toolbar .search { width: 100%; }
  .field-grid { grid-template-columns: 1fr; }
  .onair { grid-template-columns: 1fr; }
  .onair .big { font-size: 34px; }
  .add-row { padding-left: 12px; }
  .role-legend { grid-template-columns: 1fr; }
  .user-chip .uname { display: none; }
}

/* =====================================================================
   AMG brand layer — logo, motion, atmosphere
   ===================================================================== */
::selection { background: color-mix(in srgb, var(--accent) 38%, transparent); }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }

body {
  background:
    radial-gradient(1000px 460px at 88% -140px, color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%),
    radial-gradient(760px 420px at -12% 112%, color-mix(in srgb, var(--accent-lo) 9%, transparent), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
/* Triangular grid that echoes the angles of the A mark */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    repeating-linear-gradient(60deg, var(--pattern) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(-60deg, var(--pattern) 0 1px, transparent 1px 64px);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
}
#app { position: relative; z-index: 1; }

h1, h2, h3, .now-title, .brand-text b, .stat b, .date-tile span { font-family: var(--display); }
.page-head h1 { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.show-head h1 { font-size: 26px; font-weight: 700; letter-spacing: -.015em; }
h2.section-title { letter-spacing: .16em; font-weight: 700; display: flex; align-items: center; gap: 10px; }
h2.section-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }

/* ---------- logo ---------- */
.amg-logo, .amg-mark { display: block; overflow: visible; }
.m-fill { fill: url(#amg-grad); }
.m-sheen { fill: url(#amg-sheen); opacity: .55; pointer-events: none; }
.m-word { fill: var(--text); }
.m-draw { fill: none; stroke: var(--accent-hi); stroke-width: 3; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.brand { gap: 14px; }
.brand .amg-logo { height: 26px; width: auto; transition: filter .3s; }
.brand:hover .amg-logo { filter: drop-shadow(0 0 10px var(--glow)); }
.brand-divider { width: 1px; height: 28px; background: linear-gradient(180deg, transparent, var(--line-2), transparent); }
.brand-text b { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.brand-text small { font-size: 10px; letter-spacing: .14em; }
.amg-logo.live .m-fill, .amg-mark.live .m-fill { animation: livePulse 2s ease-in-out infinite; }
@keyframes livePulse { 50% { filter: drop-shadow(0 0 14px rgba(239, 68, 68, .9)) brightness(1.15); } }

/* ---------- boot loader ---------- */
.boot { min-height: 100vh; }
.boot-inner { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.boot-mark { width: 84px; height: auto; filter: drop-shadow(0 0 22px var(--glow)); }
.boot-mark .m-draw, .hero-mark .m-draw { animation: draw 1.4s cubic-bezier(.6, .1, .3, 1) forwards; }
.boot-mark .m-fill, .hero-mark .m-fill, .hero-mark .m-sheen { opacity: 0; animation: fillIn .7s ease 1.05s forwards; }
.hero-mark .m-sheen { animation-name: fillInSheen; }
.boot-bar { width: 120px; height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; }
.boot-bar i { display: block; width: 40%; height: 100%; background: var(--grad); animation: bootBar 1.1s ease-in-out infinite; }
.boot-label { color: var(--muted); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fillIn { to { opacity: 1; } }
@keyframes fillInSheen { to { opacity: .55; } }
@keyframes bootBar { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }

/* ---------- auth (login / setup) ---------- */
.auth { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, 420px); align-items: center; gap: 7vw; padding: 6vh 8vw; background: none; min-height: 100vh; }
.auth-hero { position: relative; }
.hero-mark { width: clamp(110px, 13vw, 190px); height: auto; margin-bottom: 34px; animation: heroGlow 5s ease-in-out 2s infinite; }
@keyframes heroGlow { 0%, 100% { filter: drop-shadow(0 0 18px color-mix(in srgb, var(--accent) 35%, transparent)); } 50% { filter: drop-shadow(0 0 42px color-mix(in srgb, var(--accent) 65%, transparent)); } }
.hero-word { height: 22px; width: auto; margin-bottom: 14px; opacity: 0; animation: rise .6s ease 1.3s forwards; }
.hero-title { font-family: var(--display); font-size: clamp(40px, 5.4vw, 76px); line-height: .98; font-weight: 800; letter-spacing: -.03em; margin: 0 0 18px;
  background: linear-gradient(100deg, var(--text) 30%, color-mix(in srgb, var(--accent-hi) 75%, var(--text))); -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: 0; animation: rise .7s ease 1.4s forwards; }
.hero-sub { color: var(--muted); font-size: 16px; max-width: 460px; margin: 0 0 26px; opacity: 0; animation: rise .7s ease 1.5s forwards; }
.hero-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; opacity: 0; animation: rise .7s ease 1.6s forwards; }
.hero-points li { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 14px; }
.hero-points li::before { content: ''; width: 9px; height: 9px; transform: rotate(45deg); background: var(--grad); border-radius: 2px; box-shadow: 0 0 10px var(--glow); flex: none; }
.auth-card { padding: 34px; animation: rise .6s ease .2s both; border-color: var(--line-2);
  background: color-mix(in srgb, var(--panel) 86%, transparent); backdrop-filter: blur(12px); box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .05); }
.auth-card h1 { font-size: 24px; font-weight: 700; }
.auth-card .auth-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-hi); margin-bottom: 10px; }
.auth-card .auth-eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: blink 1.6s infinite; }
.auth-foot { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: var(--faint); font-size: 12px; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- chrome ---------- */
.topbar { height: 64px; background: color-mix(in srgb, var(--bg) 74%, transparent); backdrop-filter: blur(16px) saturate(1.4); }
.topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 30%, var(--accent-lo) 65%, transparent 100%); opacity: .5; }
.nav a { border-radius: 8px; transition: color .15s, background .15s; }
.nav a.active { background: color-mix(in srgb, var(--accent) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent); }
.user-chip { background: var(--panel); transition: border-color .15s, box-shadow .15s; }
.user-chip:hover { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }

.panel { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035), 0 1px 2px rgba(0, 0, 0, .25); }
:root[data-theme="light"] .panel { box-shadow: 0 1px 2px rgba(20, 24, 33, .06); }

.btn { border-radius: 9px; transition: background .15s, border-color .15s, box-shadow .2s, transform .05s, filter .15s; }
.btn.primary { background: var(--grad); border-color: transparent; position: relative; overflow: hidden; isolation: isolate;
  box-shadow: 0 8px 22px -10px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .22); }
.btn.primary::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .32) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s ease; }
.btn.primary:hover::after { transform: translateX(120%); }
.btn.primary:hover { box-shadow: 0 10px 28px -8px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .25); }

.page.enter > * { animation: rise .45s cubic-bezier(.2, .7, .2, 1) both; }
.page.enter > *:nth-child(2) { animation-delay: .04s; }
.page.enter > *:nth-child(3) { animation-delay: .08s; }
.page.enter > *:nth-child(4) { animation-delay: .12s; }
.page.enter > *:nth-child(5) { animation-delay: .16s; }
.page.enter > *:nth-child(n+6) { animation-delay: .2s; }

/* ---------- show cards ---------- */
.show-card { overflow: hidden; }
.show-card::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, var(--accent), transparent 45%, transparent 60%, var(--accent-lo));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .25s; }
.show-card.today::before { opacity: 1; }
.show-card:hover { transform: translateY(-1px); box-shadow: var(--card-hover-shadow); }
.show-card.today, .show-card.today:hover { box-shadow: 0 16px 40px -24px var(--glow); }
.show-card h3 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.show-card .date-tile { border-color: var(--line-2); background: var(--bg-2); }
.show-card .date-tile b { background: var(--grad); }
.show-card .date-tile span { font-size: 22px; }
.today-flag { position: absolute; top: 12px; right: 14px; font-size: 10px; font-weight: 800; letter-spacing: .14em; color: var(--accent-hi); text-transform: uppercase; display: flex; align-items: center; gap: 6px; }
.today-flag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: blink 1.6s infinite; }
.card-watermark { position: absolute; right: -18px; bottom: -22px; width: 110px; opacity: .035; pointer-events: none; fill: var(--text); }

/* ---------- show page ---------- */
.show-head { position: relative; overflow: hidden; }
.show-head::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--grad); }
.show-head > * { position: relative; }
.show-head .head-watermark { position: absolute; right: 30%; top: -50px; width: 260px; opacity: .03; pointer-events: none; fill: var(--text); }
.clock { background: color-mix(in srgb, var(--bg-2) 80%, transparent); border-color: var(--line-2); }
.clock span { font-size: 22px; }
.pill.live { box-shadow: 0 0 18px rgba(239, 68, 68, .55); }
.pill.go { box-shadow: 0 0 16px rgba(34, 197, 94, .5); }
.stat { position: relative; overflow: hidden; }
.stat b { font-size: 28px; font-weight: 700; }
.stat.go-box.is-ready { border-color: rgba(34, 197, 94, .45); box-shadow: 0 0 0 1px rgba(34, 197, 94, .15), 0 10px 30px -18px rgba(34, 197, 94, .6); }
.stat.go-box.is-nogo { border-color: rgba(239, 68, 68, .5); box-shadow: 0 10px 30px -18px rgba(239, 68, 68, .7); }
.tabs { scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { transition: color .15s; }
.tabs a.active { border-bottom: 2px solid; border-image: var(--grad) 1; }
.seg button.active { box-shadow: inset 0 -2px 0 var(--accent); color: var(--text); }
.section-head { position: relative; }
.section-head::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--grad); }
.section-head .sec-name { font-family: var(--display); letter-spacing: .08em; }
.progress > i { transition: width .5s cubic-bezier(.2, .7, .2, 1); }
.status button.on.pass { box-shadow: 0 0 14px rgba(34, 197, 94, .45); }
.status button.on.fail { box-shadow: 0 0 14px rgba(239, 68, 68, .5); }
.onair.live { background: linear-gradient(135deg, color-mix(in srgb, var(--fail) 9%, var(--panel)), var(--panel) 55%); }

/* ---------- modal & toast ---------- */
.modal { box-shadow: var(--shadow), inset 0 2px 0 var(--accent); animation: modalIn .18s cubic-bezier(.2, .7, .2, 1); }
.modal-head h3 { font-family: var(--display); font-size: 18px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal-backdrop { backdrop-filter: blur(4px); }
.toast { border-left: 3px solid var(--accent); }
.toast.fail, .toast.nogo { border-left-color: var(--fail); }
.toast.go, .toast.ok { border-left-color: var(--pass); }

/* ---------- empty states ---------- */
.empty { position: relative; overflow: hidden; background: color-mix(in srgb, var(--panel) 50%, transparent); }
.empty .empty-mark { width: 54px; height: auto; margin: 0 auto 14px; }

/* ---------- settings brand preview ---------- */
.logo-drop .amg-logo { height: 40px; width: auto; }

/* ---------- big clock ---------- */
.bigclock { background: radial-gradient(1200px 700px at 50% 120%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%), #04050A; }
.bigclock .bc-watermark { position: absolute; width: 78vmin; height: auto; left: 50%; top: 50%; transform: translate(-50%, -50%); opacity: .045; fill: #fff; pointer-events: none; animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .08; } }
.bigclock .bc-brand .amg-logo { height: clamp(22px, 3vw, 40px); width: auto; }
.bigclock .m-word { fill: #fff; }
.bigclock .bc-time { position: relative; text-shadow: 0 0 60px rgba(255, 255, 255, .12); }
.bigclock[data-state="live"] .bc-time { text-shadow: 0 0 60px rgba(239, 68, 68, .3); }

@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; gap: 28px; padding: 40px 20px; align-content: center; }
  .hero-mark { width: 84px; margin-bottom: 18px; }
  .hero-title { font-size: 40px; }
  .hero-points { display: none; }
  .hero-sub { margin-bottom: 0; }
  .auth-card { padding: 24px; }
  .show-head .head-watermark { display: none; }
}
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; height: auto; min-height: 56px; padding: 10px 12px 0; row-gap: 6px; }
  .brand { flex: none; }
  .brand .amg-logo { height: 22px; }
  .brand-divider { display: none; }
  .nav { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; }
  .clocks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .clock { padding: 8px 10px; }
  .clock span { font-size: 18px; white-space: nowrap; }
  .clocks > .btn, .clocks > .menu-wrap { min-height: 44px; }
  .clocks > .btn { width: 100% !important; height: 44px !important; min-height: 0 !important; }
  .clocks > .menu-wrap > .btn { width: 100% !important; height: 44px !important; min-height: 0 !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* =====================================================================
   Rundowns
   ===================================================================== */
.rd-title-input { font: inherit; font-size: inherit; font-weight: 700; letter-spacing: inherit; padding: 2px 6px; margin-left: -7px; width: min(640px, 70vw); font-family: var(--display); }

/* ---------- on-air control bar (sticky) ---------- */
.rd-onair { position: sticky; top: 72px; z-index: 20; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(200px, 1fr) minmax(0, 1.2fr) auto; margin-bottom: 14px; overflow: hidden;
  background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(14px); }
.rd-onair > div { padding: 14px 18px; border-right: 1px solid var(--line); min-width: 0; }
.rd-onair > div:last-child { border-right: 0; }
.rd-onair small { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 4px; }
.rd-onair .oa-title { font-family: var(--display); font-size: 21px; font-weight: 700; line-height: 1.2; display: flex; align-items: center; gap: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-onair .oa-next-title { font-weight: 600; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.oa-num { display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 6px; border-radius: 6px; font-family: var(--mono); font-size: 13px; font-weight: 700;
  background: color-mix(in srgb, var(--cue) 22%, var(--panel-2)); border: 1px solid color-mix(in srgb, var(--cue) 60%, transparent); flex: none; }
.oa-num.sm { min-width: 24px; height: 20px; font-size: 11px; }
.rd-onair .big { font-size: 40px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.rd-onair .big.over { color: var(--fail); }
.rd-onair .big.warn { color: var(--warn); }
.rd-onair .big.paused { animation: blink 1.2s infinite; }
.oa-prog { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin: 8px 0 6px; }
.oa-prog i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .25s linear; }
.oa-prog i.over { background: var(--fail); }
.oa-controls { display: flex; flex-direction: column; gap: 8px; justify-content: center; min-width: 260px; }
.oa-controls .row { gap: 6px; }
.oa-controls .row .btn { flex: 1; padding: 0 8px; }
.oa-go { width: 100%; font-size: 16px; letter-spacing: .06em; height: 48px; }
.follow-btn { align-self: flex-end; }
.follow-btn.on { color: var(--accent-hi); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.rd-onair.live { border-color: var(--fail); box-shadow: 0 0 0 1px var(--fail), 0 12px 40px -18px rgba(239, 68, 68, .6);
  background: linear-gradient(135deg, color-mix(in srgb, var(--fail) 10%, var(--panel)), color-mix(in srgb, var(--panel) 92%, transparent) 55%); }
.rd-onair.paused { border-color: var(--warn); box-shadow: 0 0 0 1px var(--warn); }
.rd-onair.live small:first-child { color: var(--fail); }
.drift.behind, .behind { color: var(--fail); }
.drift.ahead, .ahead { color: var(--pass); }
.drift.ontime { color: var(--pass); }

/* ---------- grid ---------- */
.rd-grid-wrap { overflow-x: auto; margin-bottom: 14px; }
.rd-ghead, .rd-row { display: grid; align-items: start; gap: 8px; padding: 0 12px; }
.rd-ghead { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); padding-top: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.rd-ghead > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-row { position: relative; min-height: 48px; padding-top: 7px; padding-bottom: 7px; border-bottom: 1px solid var(--line);
  box-shadow: inset 4px 0 0 var(--cue); background: linear-gradient(90deg, color-mix(in srgb, var(--cue) 9%, transparent), transparent 45%); transition: background-color .12s, border-color .12s; }
.rd-row > div { min-width: 0; }
.rd-row .drag { height: 32px; }
.rd-num { display: flex; align-items: center; gap: 4px; height: 32px; font-family: var(--mono); font-weight: 700; color: var(--muted); position: relative; }
.rd-take { position: absolute; left: -2px; top: 2px; height: 28px; padding: 0 8px; opacity: 0; font-size: 11px; letter-spacing: .06em; color: var(--accent-hi); }
.rd-row:hover .rd-take { opacity: 1; }
.rd-start { display: flex; flex-direction: column; justify-content: center; min-height: 32px; font-size: 13px; position: relative; }
.rd-start b { font-weight: 700; }
.rd-start small { font-size: 11px; font-weight: 700; }
.hard-lock { position: absolute; right: 4px; top: 6px; font-size: 10px; opacity: .8; }
.rd-title input { font-weight: 600; font-size: 14px; }
.rd-ro { display: block; padding: 6px 8px; }
.rd-text-ro { white-space: pre-wrap; font-size: 13px; }
.rd-timing { display: flex; align-items: center; gap: 4px; min-height: 32px; flex-wrap: wrap; }
.mode { height: 24px; padding: 0 8px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; }
span.mode { cursor: default; }
.mode.hard { color: var(--warn); border-color: rgba(245, 158, 11, .45); background: var(--warn-bg); }
.hard-time { width: 100%; min-height: 28px; font-size: 12px; padding: 2px 4px; }
.rd-text { resize: none; field-sizing: content; min-height: 32px; max-height: 260px; line-height: 1.4; font-size: 13px; padding-top: 6px; overflow: auto; }
.rd-sel { font-size: 13px; }
.rd-sel.has { background-color: color-mix(in srgb, var(--opt) 18%, transparent); border-color: color-mix(in srgb, var(--opt) 45%, transparent); font-weight: 600; }
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; margin-top: 4px;
  background: color-mix(in srgb, var(--opt) 18%, transparent); border: 1px solid color-mix(in srgb, var(--opt) 45%, transparent); }
.rd-check { display: flex; align-items: center; height: 32px; padding-left: 8px; }
.rd-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.rd-actual { display: flex; flex-direction: column; justify-content: center; min-height: 32px; gap: 2px; }
.rd-actual .st { font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.rd-actual .st.live { color: var(--fail); }
.rd-actual .st.paused { color: var(--warn); }
.rd-act { display: flex; align-items: center; gap: 2px; height: 32px; justify-content: flex-end; }
.rd-act .menu { min-width: 250px; }
.swatch i { display: block; width: 14px; height: 14px; border-radius: 4px; background: var(--cue); border: 1px solid var(--line-2); }
.menu.swatches { display: grid; grid-template-columns: repeat(7, 26px); gap: 6px; min-width: 0; padding: 10px; }
.menu.swatches .sw { width: 26px; height: 26px; padding: 0; border-radius: 6px; border: 2px solid var(--line-2); background: var(--cue); cursor: pointer; }
.menu.swatches .sw:first-child { background: repeating-linear-gradient(45deg, var(--panel-2) 0 4px, var(--bg-2) 4px 8px); }
.menu.swatches .sw.on { border-color: var(--text); }

/* row states */
.rd-row.current { background: linear-gradient(90deg, color-mix(in srgb, var(--fail) 18%, transparent), transparent 70%); box-shadow: inset 4px 0 0 var(--fail), inset 0 0 0 1px color-mix(in srgb, var(--fail) 40%, transparent); }
.rd-row.current.paused { background: linear-gradient(90deg, var(--warn-bg), transparent 70%); box-shadow: inset 4px 0 0 var(--warn); }
.rd-row.current .live-dot { color: var(--fail); animation: blink 1.2s infinite; font-size: 16px; }
.rd-row.next { box-shadow: inset 4px 0 0 var(--cue), inset 0 -2px 0 color-mix(in srgb, var(--accent) 35%, transparent); }
.rd-row.next .rd-num::after { content: 'NEXT'; font-size: 9px; letter-spacing: .1em; color: var(--accent-hi); margin-left: 2px; }
.rd-row.done { opacity: .5; }
.rd-row.done:hover { opacity: .6; }
.rd-row.skipped { opacity: .4; }
.rd-row.skipped .rd-title input, .rd-row.skipped .rd-title .rd-ro { text-decoration: line-through; }
.rd-row.heading { min-height: 44px; align-items: center; background: linear-gradient(90deg, color-mix(in srgb, var(--cue) 20%, transparent), transparent 60%); background-color: var(--panel-2); box-shadow: inset 4px 0 0 var(--cue); }
.rd-heading-title { grid-column: 4 / -2; display: flex; align-items: center; gap: 12px; }
.rd-heading-title input, .rd-heading-title b { font-family: var(--display); font-size: 16px; font-weight: 700; letter-spacing: .01em; max-width: 520px; }
.rd-row.dragging { opacity: .35; }
.rd-gap { padding: 6px 12px 6px 84px; font-size: 12px; font-weight: 600; border-bottom: 1px dashed var(--line-2); }
.rd-gap.gap { color: var(--info); background: rgba(59, 130, 246, .07); }
.rd-gap.overlap { color: var(--fail); background: var(--fail-bg); }

/* ---------- show-day linked rundown ---------- */
.mini-head, .mini-row { display: grid; grid-template-columns: 40px 90px 80px minmax(0, 1fr) 140px; gap: 10px; align-items: center; padding: 0 14px; }
.mini-head { height: 32px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); background: var(--panel-2); border-bottom: 1px solid var(--line); }
.mini-row { min-height: 38px; border-bottom: 1px solid var(--line); box-shadow: inset 3px 0 0 var(--cue); }
.mini-row:last-child { border-bottom: 0; }
.mini-row.heading { background: var(--panel-2); font-family: var(--display); font-weight: 700; letter-spacing: .01em; font-size: 14px; }
.mini-row.current { background: var(--fail-bg); box-shadow: inset 3px 0 0 var(--fail); font-weight: 600; }
.mini-row.done, .mini-row.skipped { opacity: .5; }

/* ---------- columns modal ---------- */
.cols-list { display: grid; gap: 10px; }
.col-item { padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); }
.opt-list { display: grid; gap: 6px; margin: 10px 0 0 62px; }

@media (max-width: 1180px) {
  .rd-onair { grid-template-columns: 1fr 1fr; position: static; }
  .rd-onair > div { border-bottom: 1px solid var(--line); }
  .oa-controls { grid-column: 1 / -1; }
}
/* Phone (guest view): cue cards instead of a wide grid */
@media (max-width: 760px) {
  .rd-onair { grid-template-columns: 1fr; }
  .rd-onair .big { font-size: 46px; }
  .rd-grid { min-width: 0 !important; }
  .rd-ghead { display: none; }
  .rd-row { display: grid; grid-template-columns: 44px 1fr !important; gap: 4px 10px; padding: 12px; }
  .rd-row > .rd-drag, .rd-row > .rd-act, .rd-row > .rd-timing { display: none; }
  .rd-row > .rd-num { grid-row: 1 / span 2; }
  .rd-row > .rd-title, .rd-row > .rd-start, .rd-row > .rd-dur, .rd-row > .rd-cell, .rd-row > .rd-actual { grid-column: 2; }
  .rd-row > .rd-title { order: -1; }
  .rd-row > .rd-start { flex-direction: row; justify-content: flex-start; gap: 8px; align-items: center; min-height: 0; }
  .rd-row.heading > .rd-spacer { display: none; }
  .rd-row.heading > * { grid-column: 1 !important; }
  .rd-row.heading > .rd-start { order: 2; }
  .rd-row.heading { gap: 2px; }
  .rd-row > [data-label]::before { content: attr(data-label); display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
  .rd-row > .rd-start::before { display: inline; }
  .rd-row > .rd-cell:empty, .rd-row > .rd-actual:empty { display: none; }
  .rd-row.heading { grid-template-columns: 1fr !important; }
  .rd-heading-title { grid-column: 1; }
  .rd-gap { padding-left: 12px; }
  .mini-head, .mini-row { grid-template-columns: 30px 70px 60px minmax(0, 1fr); }
  .mini-head > :last-child, .mini-row > :last-child { display: none; }
}

/* =====================================================================
   Output screens (/o/:token) — always dark, sized for wall monitors
   ===================================================================== */
body.output-mode { background: #04050A; color: #F1F3F7; overflow: hidden; }
body.output-mode::before { display: none; }
body.output-mode #app { height: 100vh; }
.out { --o: calc(var(--scale, 1) * clamp(14px, 1.35vw, 34px)); font-size: var(--o); height: 100vh; display: flex; flex-direction: column; position: relative; overflow: hidden;
  background: radial-gradient(1200px 600px at 100% -10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%), #04050A; }
.out .m-word { fill: #fff; }
.out-head { display: flex; align-items: center; gap: 1em; padding: .8em 1.2em; border-bottom: 1px solid rgba(255, 255, 255, .08); flex: none; }
.out-logo { height: 1.4em; width: auto; }
img.out-logo { max-width: 8em; object-fit: contain; }
.out-title { font-family: var(--display); font-weight: 700; font-size: 1.05em; color: #C9CED8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.out-clock { font-size: 1.3em; font-weight: 700; color: #C9CED8; }
.out-over { font-family: var(--mono); font-weight: 700; font-size: .95em; padding: .15em .6em; border-radius: .4em; background: rgba(255, 255, 255, .06); }
.out-over.bad { color: #FF6B6B; }
.out-over.ok { color: #4ADE80; }
.out-empty { margin: auto; color: #8A92A3; text-align: center; font-size: 1.2em; }
.out-error { height: 100vh; display: grid; place-content: center; text-align: center; color: #C9CED8; }
.out-error .empty-mark { width: 80px; margin: 0 auto 20px; }
.out-offline { position: fixed; left: 50%; top: 12px; transform: translateX(-50%); z-index: 50; background: var(--fail); color: #fff; font-weight: 700; padding: 6px 16px; border-radius: 99px; font-size: 14px; }
.o-chip { display: inline-block; padding: .05em .55em; border-radius: 99px; font-size: .8em; font-weight: 700; background: color-mix(in srgb, var(--opt) 25%, transparent); border: 1px solid color-mix(in srgb, var(--opt) 60%, transparent); }

/* message overlay */
.out-msg { position: absolute; left: 0; right: 0; bottom: 0; z-index: 30; padding: .6em 1.2em; text-align: center; font-family: var(--display); font-weight: 800;
  font-size: calc(var(--o) * 2.2); line-height: 1.15; letter-spacing: .01em; box-shadow: 0 10px 40px rgba(0, 0, 0, .6); }
.pr-wrap .out-msg { bottom: auto; top: 0; }
.out-msg.c-red { background: #DC2626; color: #fff; }
.out-msg.c-amber { background: #F59E0B; color: #111; }
.out-msg.c-green { background: #16A34A; color: #fff; }
.out-msg.c-blue { background: #2563EB; color: #fff; }
.out-msg.c-white { background: #F8FAFC; color: #0B0D12; }
.out-msg.flash { animation: msgFlash 1s steps(2, jump-none) infinite; }
@keyframes msgFlash { 50% { filter: brightness(.45); } }

/* cue list */
.ocl-head, .ocl-row { display: grid; gap: .9em; align-items: center; padding: 0 1.2em; }
.ocl-head { font-size: .62em; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #6B7385; padding-top: .8em; padding-bottom: .6em; flex: none; }
.ocl-rows { flex: 1; overflow: hidden; }
.ocl-row { min-height: 2.6em; padding-top: .45em; padding-bottom: .45em; border-top: 1px solid rgba(255, 255, 255, .06); box-shadow: inset .3em 0 0 var(--cue); }
.ocl-row .num { color: #8A92A3; font-weight: 700; white-space: nowrap; }
.ocl-row > span { white-space: nowrap; }
.ocl-row > .t, .ocl-row > .cell { white-space: normal; }
.ocl-row .t { font-weight: 600; display: flex; align-items: baseline; gap: .8em; min-width: 0; }
.ocl-row .cell { font-size: .8em; color: #C9CED8; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ocl-row.heading { grid-template-columns: calc(var(--o) * 5.6) 1fr; padding-left: calc(var(--o) * 3 + 2.1em); background: rgba(255, 255, 255, .04); font-family: var(--display); font-weight: 700; letter-spacing: .01em; color: #DDE1E8; font-size: .9em; min-height: 2em; }
.ocl-row.done { opacity: .35; }
.ocl-row.skipped { opacity: .3; text-decoration: line-through; }
.ocl-row.next { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.ocl-row.next .num::after { content: ' NEXT'; font-size: .55em; letter-spacing: .1em; color: var(--accent-hi); }
.ocl-row.current .t { font-size: 1.45em; }
.ocl-row.current { min-height: 3.6em; background: linear-gradient(90deg, rgba(239, 68, 68, .22), transparent 75%); box-shadow: inset .25em 0 0 #EF4444; }
.ocl-row.current .num { color: #EF4444; animation: blink 1.2s infinite; }
.ocl-remain { margin-left: auto; font-size: 1.15em; font-weight: 700; }
.ocl-remain.over, .osc-time.over { color: #EF4444; }
.ocl-remain.warn, .osc-time.warn { color: #F59E0B; }
.osc-time.paused, .ocl-remain.paused { animation: blink 1.2s infinite; }

/* single cue */
.osc { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1em 4vw; gap: .5em; min-height: 0; }
.osc-label { font-size: 1.1em; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #8A92A3; }
.osc-label.live { color: #EF4444; }
.osc-title { font-family: var(--display); font-size: 2.6em; font-weight: 800; line-height: 1.05; display: flex; align-items: center; gap: .4em; max-width: 100%; }
.osc-num { font-family: var(--mono); font-size: .55em; padding: .1em .45em; border-radius: .25em; background: color-mix(in srgb, var(--cue) 30%, transparent); border: 1px solid color-mix(in srgb, var(--cue) 70%, transparent); }
.osc-time { font-size: clamp(80px, 17vw, 400px); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; text-shadow: 0 0 60px rgba(255, 255, 255, .1); }
.osc-prog { width: min(80vw, 1400px); height: .35em; background: rgba(255, 255, 255, .1); border-radius: 1em; overflow: hidden; }
.osc-prog i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .2s linear; }
.osc-prog i.over { background: #EF4444; }
.osc-body { font-size: 1.5em; color: #E1E5EC; white-space: pre-wrap; max-width: 80vw; max-height: 30vh; overflow: hidden; margin-top: .4em; }
.osc-next { font-size: 1.1em; color: #8A92A3; margin-top: .4em; }
.osc-next b { color: #F1F3F7; }

/* clock output reuses .bigclock */
.out-bigclock { position: absolute; inset: 0; cursor: default; }

/* teleprompter */
.out-prompter { background: #000; }
.pr-wrap { position: absolute; inset: 0; overflow: hidden; background: #000; }
.pr-wrap.mirror { transform: scaleX(-1); }
.pr-content { position: absolute; left: var(--margin); right: var(--margin); top: 0; will-change: transform; font-size: var(--fs); line-height: var(--lh); color: #fff; font-weight: 600; }
.pr-block { padding-bottom: 1.2em; }
.pr-cue { font-family: var(--display); font-size: .5em; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--cue); margin: 0 0 .3em; display: flex; gap: .6em; align-items: center;
  border-top: 2px solid color-mix(in srgb, var(--cue) 60%, transparent); padding-top: .4em; }
.pr-cue span { font-family: var(--mono); opacity: .8; }
.pr-block.live .pr-cue::after { content: '● LIVE'; color: #EF4444; margin-left: auto; font-family: var(--mono); }
.pr-text { white-space: pre-wrap; }
.pr-empty { color: #3A404C; }
.pr-end { text-align: center; color: #555; font-size: .5em; padding: 2em 0 100vh; letter-spacing: .3em; }
.pr-eye { position: absolute; left: 0; right: 0; top: var(--eye); display: flex; justify-content: space-between; pointer-events: none; color: var(--accent); font-size: 28px; transform: translateY(-50%); padding: 0 6px; }
.pr-none { position: absolute; inset: 0; display: grid; place-content: center; font-size: 28px; }
.pr-hud { position: fixed; right: 14px; bottom: 12px; z-index: 40; font: 600 13px/1.3 var(--mono); color: #8A92A3; background: rgba(0, 0, 0, .7); padding: 8px 12px; border-radius: 8px; border: 1px solid #222; }
.pr-hud::after { content: attr(data-idle); }
.pr-hud.show { color: #fff; font-size: 22px; border-color: var(--accent); }
.pr-hud.show::after { content: none; }

/* in-app output tools */
.out-list { display: grid; gap: 10px; }
.out-item { border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); }
.out-item-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; flex-wrap: wrap; }
.out-type { font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 3px 8px; border-radius: 5px; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--muted); }
.out-settings { padding: 12px; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 16px; }
.out-settings label { font-size: 12px; color: var(--muted); display: grid; gap: 4px; }
.out-settings .check { display: flex; color: var(--text); margin: 0; align-self: end; }
.msg-colors { display: flex; gap: 8px; flex-wrap: wrap; }
.msg-colors label { cursor: pointer; }
.msg-colors input { display: none; }
.msg-colors span { display: inline-block; padding: 6px 14px; border-radius: 8px; font-weight: 700; font-size: 12px; border: 2px solid transparent; }
.msg-colors input:checked + span { border-color: var(--text); }
.msg-presets { display: flex; gap: 6px; flex-wrap: wrap; margin: -6px 0 14px; }
.active-msg { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; background: var(--warn-bg); border: 1px solid rgba(245, 158, 11, .4); font-size: 12px; font-weight: 600; max-width: 100%; }
.active-msg span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.pc-grid .btn { height: 52px; font-size: 15px; }
.pc-speed { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 14px 0; }
.pc-speed b { font-family: var(--mono); font-size: 28px; min-width: 90px; text-align: center; }
.key-box { font-family: var(--mono); font-size: 13px; padding: 12px; border-radius: 8px; background: var(--bg-2); border: 1px dashed var(--accent); word-break: break-all; }
.api-doc code, .api-doc pre { font-family: var(--mono); font-size: 12px; }
.api-doc pre { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; overflow-x: auto; margin: 6px 0 12px; }

/* ---------- print ---------- */
@media print {
  :root { --bg: #fff; --panel: #fff; --panel-2: #f3f3f3; --text: #000; --muted: #444; --faint: #777; --line: #ccc; --line-2: #bbb; color-scheme: light; }
  body::before, .card-watermark, .head-watermark, .topbar, .toolbar, .tabs, .no-print, .add-row, .drag, .del, .goto, #toasts, .banner, .onair .controls { display: none !important; }
  .page { padding: 0; max-width: none; }
  .panel { border-color: #ccc; break-inside: avoid; }
  .section-block { break-inside: avoid; }
  .item { break-inside: avoid; }
  .cell-input { border: 0 !important; padding: 0; background: none !important; }
  select.cell-input { background-image: none; }
  body { font-size: 11px; }
}

/* ---------- full-screen countdown (studio monitor) ---------- */
.bigclock { position: fixed; inset: 0; z-index: 150; background: #05070A; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 4vh 4vw; cursor: pointer; }
.bigclock .bc-brand { position: absolute; top: 3vh; left: 3vw; display: flex; align-items: center; gap: 14px; font-weight: 700; font-size: clamp(14px, 1.6vw, 22px); color: #C9CED8; }
.bigclock .bc-label { font-size: clamp(18px, 3.2vw, 48px); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: #8C94A4; }
.bigclock .bc-time { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 700; line-height: 1; font-size: clamp(72px, 19vw, 360px); margin: 2vh 0; }
.bigclock .bc-sub { font-size: clamp(14px, 2vw, 30px); color: #C9CED8; }
.bigclock .bc-venue { position: absolute; bottom: 3vh; right: 3vw; font-size: clamp(14px, 1.8vw, 26px); color: #8C94A4; }
.bigclock[data-state="live"] .bc-label { color: var(--fail); }
.bigclock[data-state="warn"] .bc-time { color: var(--warn); }
.bigclock[data-state="over"] .bc-time { color: var(--fail); }
.bigclock[data-state="over"] { box-shadow: inset 0 0 0 10px var(--fail); }
.toolbar-sep { width: 1px; height: 22px; background: var(--line-2); margin: 0 4px; }

/* ---------- Phase 3: content tools ---------- */
/* Rich text (stored as a sanitized HTML subset; plain text keeps its line breaks via pre-wrap) */
.rt { white-space: pre-wrap; overflow-wrap: anywhere; }
.rt ul, .rt ol { margin: 2px 0; padding-left: 1.4em; white-space: normal; }
.rt li { white-space: pre-wrap; }
.rt p, .rt div { margin: 0; }
.rt a { color: var(--accent-hi); text-decoration: underline; text-underline-offset: 2px; }
.rt mark { background: rgba(245, 158, 11, .35); color: inherit; border-radius: 2px; }
.rt [data-mention] { display: inline-block; padding: 0 5px; border-radius: 5px; font-weight: 600; color: var(--accent-hi); background: color-mix(in srgb, var(--accent) 16%, transparent); white-space: nowrap; }
.var-tok { border-bottom: 1px dashed color-mix(in srgb, var(--info) 70%, transparent); background: rgba(59, 130, 246, .1); border-radius: 3px; }
.var-tok.missing { border-bottom-color: var(--fail); background: var(--fail-bg); }
.rd-rich { min-height: 32px; max-height: 260px; overflow: auto; line-height: 1.4; font-size: var(--rd-fs, 13px); padding-top: 6px; padding-bottom: 6px; cursor: text; }
.rd-rich:empty::before { content: attr(data-ph); color: var(--faint); font-style: italic; pointer-events: none; }
.rd-rich [data-mention] { cursor: default; }
.rd-text-ro { font-size: var(--rd-fs, 13px); }

/* Floating formatting toolbar */
.rt-bar { position: fixed; z-index: 90; background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow); padding: 4px; width: max-content; max-width: min(640px, calc(100vw - 16px)); }
.rt-tools { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.rt-tools > button { height: 28px; min-width: 28px; padding: 0 6px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; font-size: 13px; color: var(--text); }
.rt-tools > button:hover { background: var(--panel-2); }
.rt-sep { width: 1px; height: 18px; background: var(--line-2); margin: 0 3px; }
.rt-swatches { display: inline-flex; gap: 2px; }
.rt-sw { width: 16px; height: 16px; padding: 0; border-radius: 4px; border: 1px solid var(--line-2); background: var(--sw); cursor: pointer; }
.rt-sw.hl { border-radius: 50%; }
.rt-sw:hover { transform: scale(1.15); }
.rt-hint { font-size: 12px; color: var(--muted); padding: 5px 6px 2px; border-top: 1px solid var(--line); margin-top: 4px; }

/* @mention picker */
.mention-pop { position: fixed; z-index: 95; width: 250px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow); padding: 4px; }
.mention-pop button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: 6px; background: transparent; text-align: left; cursor: pointer; color: var(--text); }
.mention-pop button span { display: flex; flex-direction: column; min-width: 0; }
.mention-pop button small { color: var(--muted); font-size: 11px; }
.mention-pop button.on, .mention-pop button:hover { background: var(--panel-2); box-shadow: inset 2px 0 0 var(--accent); }

/* Notifications */
.notif-btn { position: relative; }
.notif-count { position: absolute; top: 1px; right: -2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 800; display: grid; place-items: center; line-height: 1; }
.menu.notif-menu { width: min(380px, calc(100vw - 24px)); max-height: 70vh; overflow: auto; padding: 4px; }
.notif-head { display: flex; align-items: center; padding: 6px 8px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu .notif { align-items: flex-start; }
.notif .grow { display: flex; flex-direction: column; gap: 2px; }
.notif b { font-weight: 500; }
.notif.unread b { font-weight: 700; }
.notif-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; flex: none; background: transparent; }
.notif.unread .notif-dot { background: var(--accent); }
.notif-empty { padding: 18px 10px; text-align: center; }

/* Highlight a cue / task opened from a notification */
.rd-row.hl, .item.hl { box-shadow: inset 0 0 0 2px var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }

/* Image cells */
.rd-cell.img { min-height: 32px; }
.rd-img { position: relative; display: inline-block; max-width: 100%; }
.rd-img img { display: block; max-width: 100%; max-height: 72px; border-radius: 6px; border: 1px solid var(--line-2); object-fit: cover; background: var(--bg-2); }
.dens-compact .rd-img img { max-height: 40px; }
.rd-img-x { position: absolute; top: 2px; right: 2px; width: 22px !important; height: 22px; background: rgba(0, 0, 0, .65) !important; color: #fff; opacity: 0; }
.rd-img:hover .rd-img-x { opacity: 1; }
.rd-img-add { display: inline-flex; align-items: center; height: 30px; padding: 0 10px; border-radius: 6px; border: 1px dashed var(--line-2); color: var(--faint); font-size: 12px; font-weight: 600; cursor: pointer; }
.rd-img-add:hover { color: var(--text); border-color: var(--accent); }
.rd-files small { font-size: 10px; font-weight: 700; margin-left: 1px; }
.rd-files.has { color: var(--accent-hi); }
.rd-act { gap: 0; }

/* View settings */
.menu.view-menu { width: 360px; max-height: 70vh; overflow: auto; }
.menu.view-menu.left { left: 0; right: auto; }
.view-menu .seg { margin: 0 8px 6px; display: flex; }
.view-menu .seg button { flex: 1; }
.view-col { display: flex; align-items: center; gap: 2px; padding: 2px 6px 2px 10px; }
.view-col .check { margin: 0; font-size: 13px; min-width: 0; }
.menu .view-col button.btn { width: 28px; padding: 0; justify-content: center; }
.view-w { height: 28px; width: 76px; padding: 0 6px; font-size: 12px; margin-left: 4px; }
.rd-grid-wrap { font-size: var(--rd-fs, 13px); }
.rd-grid-wrap .rd-title input, .rd-grid-wrap .rd-ro b { font-size: calc(var(--rd-fs, 13px) + 1px); }
.dens-compact .rd-row { min-height: 34px; padding-top: 2px; padding-bottom: 2px; }
.dens-compact .rd-row.heading { min-height: 34px; }
.dens-compact .rd-row .cell-input { min-height: 26px; padding-top: 2px; padding-bottom: 2px; }
.dens-compact .rd-rich { max-height: 120px; }
.dens-compact .rd-num, .dens-compact .rd-act, .dens-compact .rd-check, .dens-compact .rd-row .drag { height: 26px; }

/* Cue details drawer */
.drawer-tabs { margin-bottom: 14px; }
.file-list { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
.file-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.file-row:last-child { border-bottom: 0; }
.file-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line-2); }
.file-ico { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line-2); font: 700 10px var(--mono); color: var(--muted); }
.file-name { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.file-name:hover { text-decoration: underline; }
.file-add { cursor: pointer; }
.hist-list { max-height: 58vh; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.hist-row { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--bg-2); }
.hist-meta { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.hist-vals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 6px; }
.hist-vals small { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin-bottom: 2px; }
.hist-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
.hist-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; }
.hist-img { max-height: 48px; border-radius: 4px; }

/* Variables */
.var-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.var-row { gap: 4px; }

/* Import */
.import-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 20px; border: 2px dashed var(--line-2); border-radius: 12px; cursor: pointer; text-align: center; }
.import-drop:hover { border-color: var(--accent); }
.map-table { border: 1px solid var(--line); border-radius: 10px; max-height: 300px; overflow: auto; margin: 6px 0; }
.map-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.map-row:last-child { border-bottom: 0; }
.ellip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.imp-summary { margin: 14px 0 6px; font-size: 13px; }
.imp-prev { border: 1px solid var(--line); border-radius: 10px; max-height: 300px; overflow: auto; }
.imp-prev .tbl td { vertical-align: top; }
.imp-head td { background: var(--panel-2); }

/* Outputs */
.o-img { max-height: 3.2em; max-width: 100%; border-radius: .2em; vertical-align: middle; }
.osc-body .o-img { max-height: 28vh; }
.pr-text ul, .pr-text ol { padding-left: 1.2em; margin: 0; }
.pr-text a { color: inherit; text-decoration: none; }
.pr-text [data-mention] { color: inherit; background: none; padding: 0; }

@media (max-width: 760px) {
  .rd-img img { max-height: 140px; }
  .menu.view-menu { width: min(360px, calc(100vw - 32px)); }
  .hist-vals { grid-template-columns: 1fr; }
  .rd-row > .rd-act { display: flex; grid-column: 2; justify-content: flex-start; }
  .rd-row > .rd-act .menu-wrap, .rd-row > .rd-act:empty { display: none; }
}

/* ---------- Phase 4: automation, bridges, live data ---------- */
.auto-strip { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-bottom: 14px; flex-wrap: wrap; border-left: 3px solid var(--line-2); }
.auto-strip.armed { border-left-color: var(--fail); box-shadow: 0 0 0 1px rgba(239, 68, 68, .25), 0 0 22px rgba(239, 68, 68, .12); }
.auto-strip.safe { border-left-color: var(--pass); }
.auto-strip.empty-strip { background: none; border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 6px 10px; }
.auto-arm { height: 32px; padding: 0 14px; border-radius: 8px; font: 800 12px var(--display); letter-spacing: .1em; cursor: pointer; white-space: nowrap; border: 1px solid; }
.auto-arm.sm { height: 28px; padding: 0 10px; font-size: 11px; }
.auto-arm.safe { color: var(--pass); background: var(--pass-bg); border-color: rgba(34, 197, 94, .45); }
.auto-arm.armed { color: #fff; background: var(--fail); border-color: var(--fail); animation: armedPulse 1.6s ease-in-out infinite; }
.auto-arm:disabled { cursor: default; opacity: .9; }
@keyframes armedPulse { 50% { box-shadow: 0 0 18px rgba(239, 68, 68, .7); } }
.dev-chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 0; }
.dev-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 99px; background: var(--bg-2); border: 1px solid var(--line); font-size: 12px; max-width: 100%; overflow: hidden; }
.dev-chip b { white-space: nowrap; }
.dev-chip .dev-st { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dev-chip .dev-st b { color: var(--text); font-weight: 600; }
.dev-chip .dot, .dev-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; display: inline-block; }
.dev-dot { margin-right: 6px; vertical-align: 0; }
.dev-chip.on .dot, .dev-dot.on { background: var(--pass); box-shadow: 0 0 8px rgba(34, 197, 94, .7); }
.dev-chip.off { border-color: rgba(239, 68, 68, .35); }
.dev-chip.off .dot, .dev-dot.off { background: var(--fail); }
.dev-flag { display: inline-block; font: 800 10px var(--mono); letter-spacing: .06em; padding: 1px 5px; border-radius: 4px; margin-left: 4px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line-2); }
.dev-flag.rec, .dev-flag.live { background: var(--fail); color: #fff; border-color: var(--fail); }
.auto-last { max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.rd-auto { color: var(--warn); }
.auto-head { margin-bottom: 10px; gap: 10px; }
.auto-list { display: flex; flex-direction: column; gap: 6px; }
.auto-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); }
.auto-row.disabled { opacity: .55; }
.auto-badge { flex: none; font: 700 11px var(--mono); padding: 3px 8px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--muted); min-width: 64px; text-align: center; }
.auto-badge.start { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.auto-badge.offset { color: var(--info); border-color: rgba(59, 130, 246, .4); }
.auto-badge.binding { color: var(--pass); border-color: rgba(34, 197, 94, .4); }
.auto-form { margin-top: 10px; padding: 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel-2); }
.auto-form textarea.input { height: auto; padding: 8px 10px; resize: vertical; }
.auto-log { max-height: 56vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.auto-log td { vertical-align: top; }
.auto-log tr.auto-fail td { background: var(--fail-bg); }
.bridge-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; background: var(--bg-2); }
.bridge-card.off { opacity: .7; }
.bridge-dev { display: flex; align-items: center; gap: 8px; padding: 6px 0 0 18px; flex-wrap: wrap; }
.ds-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; background: var(--bg-2); }
.ds-st { font: 700 10px var(--mono); text-transform: uppercase; letter-spacing: .08em; padding: 2px 6px; border-radius: 4px; border: 1px solid var(--line-2); color: var(--muted); }
.ds-st.ok { color: var(--pass); border-color: rgba(34, 197, 94, .45); }
.ds-st.warn { color: var(--warn); border-color: rgba(245, 158, 11, .45); }
.ds-st.err { color: var(--fail); border-color: rgba(239, 68, 68, .45); }
.ds-vals { display: grid; grid-template-columns: max-content 1fr; gap: 3px 14px; margin-top: 8px; font-size: 13px; }
.ds-vals > span:nth-child(even) { overflow-wrap: anywhere; }
.ds-sub { margin: 18px 0 8px; font-size: 13px; }
.ds-map { margin-bottom: 6px; gap: 4px; }
.ds-mval { min-width: 90px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-prev { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.ds-prev td { cursor: pointer; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.ds-prev td:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.ds-prev th { position: sticky; top: 0; }
.ds-paths { display: flex; flex-direction: column; max-height: 240px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.ds-path { display: flex; gap: 12px; justify-content: space-between; text-align: left; padding: 6px 10px; border: 0; border-bottom: 1px solid var(--line); background: none; cursor: pointer; font-size: 12px; }
.ds-path:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.ds-path .faint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 50%; }
@media (max-width: 760px) {
  .auto-strip .dev-chips { flex-basis: 100%; order: 3; }
  .ds-map { flex-wrap: wrap; }
}

/* =====================================================================
   Phase 5 — help center, contextual help, guided tour, practice sandbox
   ===================================================================== */
.help-btn { font-weight: 800; font-family: var(--display); font-size: 15px; }
.help-btn.on { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.help-q { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; flex: none; vertical-align: middle;
  font: 700 11px/1 var(--display); letter-spacing: 0; text-transform: none; text-decoration: none;
  color: var(--muted); border: 1px solid var(--line-2); background: var(--panel-2); cursor: pointer; transition: color .12s, border-color .12s; }
.help-q:hover, .help-q:focus-visible { color: var(--accent); border-color: var(--accent); outline: none; }
.pill.practice { color: #A855F7; border-color: rgba(168, 85, 247, .45); background: rgba(168, 85, 247, .1); }
.banner.practice { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; text-align: left;
  background: rgba(168, 85, 247, .1); color: var(--text); border-bottom: 1px solid rgba(168, 85, 247, .3); }
.banner.practice .grow { flex: 0 1 auto; }
.role-tag.caller { color: var(--warn); border-color: rgba(245, 158, 11, .35); }
.role-tag.producer { color: var(--info); border-color: rgba(59, 130, 246, .35); }

/* ---------- help layout ---------- */
.help-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 18px; align-items: start; }
.help-side { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 92px); }
.help-search { width: 100%; }
.help-nav { overflow: auto; padding-right: 4px; min-height: 0; }
.help-nav-toggle { display: none; }
.help-cat { margin-bottom: 14px; }
.help-cat-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: 4px 10px; }
.help-cat a { display: block; padding: 5px 10px; border-radius: 7px; color: var(--muted); text-decoration: none; font-size: 13px; line-height: 1.35; }
.help-cat a:hover { color: var(--text); background: var(--panel-2); }
.help-cat a.active { color: var(--text); background: color-mix(in srgb, var(--accent) 12%, transparent); box-shadow: inset 2px 0 0 var(--accent); }
.help-main { padding: 26px 32px 30px; min-height: 60vh; min-width: 0; overflow-wrap: break-word; }
.help-main h1 { margin: 2px 0 6px; font-size: 28px; letter-spacing: -.015em; }
.help-crumb a { color: var(--muted); }
.help-roles { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 0 18px; }
.help-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 18px 0; }
.help-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; text-decoration: none; transition: border-color .12s, transform .12s; }
.help-card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); transform: translateY(-1px); }
.help-card-cat { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.help-home-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px; }
.help-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.help-topic { padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; }
.help-topic b { margin-bottom: 4px; }
.help-topic a { color: var(--muted); text-decoration: none; font-size: 13px; }
.help-topic a:hover { color: var(--text); text-decoration: underline; }
.help-results { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.help-result { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 8px; text-decoration: none; border: 1px solid transparent; }
.help-result:hover { background: var(--panel-2); border-color: var(--line); }
.help-result mark { background: color-mix(in srgb, var(--accent) 30%, transparent); color: inherit; border-radius: 2px; }
.help-related { display: flex; flex-direction: column; gap: 4px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.help-related b { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin-bottom: 4px; }
.help-related a { color: var(--text); }
.help-helpful { display: flex; align-items: center; gap: 8px; margin-top: 18px; }

/* ---------- rendered Markdown ---------- */
.md { font-size: 15px; line-height: 1.65; max-width: 760px; }
.md h2 { font-size: 19px; margin: 28px 0 8px; letter-spacing: -.005em; }
.md h3 { font-size: 16px; margin: 22px 0 6px; }
.md h4 { font-size: 14px; margin: 18px 0 4px; }
.md p { margin: 0 0 12px; }
.md ul, .md ol { margin: 0 0 14px; padding-left: 24px; }
.md li { margin: 4px 0; }
.md li > ul, .md li > ol { margin: 4px 0 0; }
.md a { color: var(--accent); text-underline-offset: 2px; }
.md code { font-family: var(--mono); font-size: .88em; padding: 1px 5px; border-radius: 5px; background: var(--panel-2); border: 1px solid var(--line); }
.md pre.md-code { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; overflow: auto; font-size: 13px; line-height: 1.5; }
.md pre.md-code code { padding: 0; border: 0; background: none; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.md blockquote { margin: 0 0 14px; padding: 4px 14px; border-left: 3px solid var(--line-2); color: var(--muted); }
.md-callout { margin: 0 0 14px; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-2); }
.md-callout > :last-child { margin-bottom: 0; }
.md-callout.tip { border-color: rgba(34, 197, 94, .35); background: var(--pass-bg); }
.md-callout.note, .md-callout.important { border-color: rgba(59, 130, 246, .35); background: rgba(59, 130, 246, .1); }
.md-callout.warning, .md-callout.safety, .md-callout.caution { border-color: rgba(245, 158, 11, .45); background: var(--warn-bg); }
.md-table { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 8px; }
.md table { border-collapse: collapse; width: 100%; font-size: 13px; line-height: 1.45; }
.md th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); background: var(--panel-2); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.md td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.md tr:last-child td { border-bottom: 0; }
.md-details { margin: 18px 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); }
.md-details > summary { cursor: pointer; padding: 10px 14px; font-weight: 700; font-size: 13px; color: var(--muted); }
.md-details[open] > summary { border-bottom: 1px solid var(--line); color: var(--text); }
.md-details-body { padding: 12px 14px 4px; font-size: 14px; }
.md-badlink { text-decoration: underline dotted; }

/* ---------- guided tour ---------- */
#tour-root { position: fixed; inset: 0; z-index: 250; }
#tour-root .tour-block { position: absolute; inset: 0; background: transparent; }
#tour-root.centered .tour-block { background: rgba(5, 7, 10, .62); }
.tour-hole { position: fixed; border-radius: 10px; pointer-events: none; box-shadow: 0 0 0 2px var(--accent), 0 0 0 9999px rgba(5, 7, 10, .62);
  transition: top .25s ease, left .25s ease, width .25s ease, height .25s ease; }
.tour-card { position: fixed; width: min(380px, calc(100vw - 24px)); background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px;
  box-shadow: var(--shadow); padding: 16px 18px 14px; transition: top .25s ease, left .25s ease; }
#tour-root.centered .tour-card { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); width: min(440px, calc(100vw - 24px)); }
.tour-card h3 { margin: 4px 0 6px; font-size: 17px; }
.tour-card p { margin: 0 0 10px; color: var(--muted); line-height: 1.5; }
.tour-step { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
.tour-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.tour-practice { margin: 4px 0 10px; }
#tour-root.narrow:not(.centered) .tour-card { left: 12px !important; right: 12px; top: auto !important; bottom: 12px; width: auto; }
html.touring .rt-bar, html.touring .mention-pop { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  .tour-hole, .tour-card, .help-card { transition: none !important; }
}

@media (max-width: 900px) {
  .help-layout { grid-template-columns: minmax(0, 1fr); }
  .help-side { position: static; max-height: none; }
  .help-nav-toggle { display: inline-flex; align-self: flex-start; }
  .help-nav { display: none; max-height: 60vh; border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: var(--panel); }
  .help-layout.nav-open .help-nav { display: block; }
  .help-main { padding: 18px 16px 22px; }
  .help-main h1 { font-size: 23px; }
}
@media print {
  .help-side, .help-helpful { display: none !important; }
  .help-layout { display: block; }
}

/* ---------- Phase 6: big rundowns, groups, reference images ---------- */
/* Off-screen rows skip style, layout and paint (content-visibility), which keeps 1000-row rundowns fast. A row with an
   open menu or the focused field opts out, because the containment would clip its dropdown. */
.rd-rows > .rd-row { content-visibility: auto; contain-intrinsic-size: auto 62px; }
.rd-rows > .rd-row.heading { contain-intrinsic-size: auto 46px; }
.dens-compact .rd-rows > .rd-row { contain-intrinsic-size: auto 40px; }
.rd-rows > .rd-row.menu-open, .rd-rows > .rd-row:focus-within { content-visibility: visible; }
.editing-badge { left: 0; }
.drag-hide { display: none !important; }
.rd-gtoggle { width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 14px; cursor: pointer; }
.rd-gtoggle:hover { background: var(--bg-2); color: var(--text); }
.rd-gmeta { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: 12px; color: var(--muted); font-weight: 500; }
.rd-gmeta b { color: var(--text); font-weight: 600; }
.rd-gmeta .pill { height: 20px; font-size: 10px; }
.rd-row.heading.collapsed { border-bottom-style: dashed; }
.rd-row.heading .rd-drag { cursor: grab; }
.rd-img-open { display: block; max-width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.rd-img, .rd-img-empty { border-radius: 6px; outline: none; }
.rd-img-empty { display: flex; align-items: center; gap: 8px; min-height: 32px; }
.rd-img-empty:focus, .rd-img:focus { box-shadow: 0 0 0 2px var(--accent); }
.rd-img-empty:focus::after { content: 'Ctrl+V to paste'; font-size: 11px; color: var(--faint); white-space: nowrap; }
[data-img-drop].drop-over, .import-drop.drop-over { box-shadow: 0 0 0 2px var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.undo-toast { align-items: center; }
.undo-toast .grow { min-width: 0; }

/* Lightbox: one image column, large, with previous / next and what's coming up */
.lightbox { position: fixed; inset: 0; z-index: 180; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: rgba(5, 6, 10, .94); color: #fff; animation: fade .12s; }
.lb-top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
.lb-top .muted { color: #9AA3B2; }
.lb-title { font-family: var(--display); font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lb-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 72px; }
.lb-stage img { width: 100%; height: 100%; object-fit: contain; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 80px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .08); color: #fff; font-size: 44px; line-height: 1; cursor: pointer; }
.lb-nav:hover:not(:disabled) { background: rgba(255, 255, 255, .16); }
.lb-nav.prev { left: 12px; }
.lb-nav.next { right: 12px; }
.lb-nav:disabled { opacity: .2; cursor: default; }
.lb-strip { display: flex; align-items: center; gap: 10px; padding: 10px 16px 16px; overflow-x: auto; }
.lb-strip > span { flex: none; }
.lb-strip button { flex: none; display: grid; gap: 4px; width: 156px; padding: 4px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 8px; background: rgba(255, 255, 255, .04); color: #D5DAE3; font-size: 11px; text-align: left; cursor: pointer; }
.lb-strip button:hover { border-color: var(--accent); }
.lb-strip img { width: 100%; height: 84px; object-fit: cover; border-radius: 5px; background: #11141B; }
.lb-strip button span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
@media (max-width: 760px) {
  .lb-stage { padding: 0 8px; }
  .lb-nav { width: 38px; height: 60px; font-size: 30px; }
  .rd-row.heading > .rd-num { display: block; }
}
.rd-heading-title input { flex: 0 1 520px; min-width: 120px; }
.rd-heading-title .rd-gmeta b { font-family: var(--mono); font-size: 12px; font-weight: 700; text-transform: none; letter-spacing: 0; max-width: none; }

/* Caster graphics output */
.osc-group { font-family: var(--display); font-weight: 700; letter-spacing: .02em; font-size: .85em; color: #B4BBC8; margin-bottom: .3em; }
.ogr { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1.2em; padding: 1em 1.2em; }
.ogr-label { display: flex; align-items: baseline; gap: .8em; font-size: .62em; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #8A92A3; margin-bottom: .6em; }
.ogr-now.live .ogr-label { color: #EF4444; }
.ogr-remain { margin-left: auto; font-size: 1.8em; letter-spacing: 0; color: #fff; }
.ogr-remain.over { color: #EF4444; }
.ogr-remain.warn { color: #F59E0B; }
.ogr-now, .ogr-next { min-height: 0; display: flex; flex-direction: column; }
.ogr-next { gap: .7em; overflow: hidden; }
.ogr-card { display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr); gap: .8em; align-items: start; padding: .5em; border-radius: .4em; background: rgba(255, 255, 255, .035); box-shadow: inset .25em 0 0 var(--cue); }
.ogr-card.big { grid-template-columns: 1fr; padding: .7em; flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr) auto; }
.ogr-pic { aspect-ratio: 16 / 9; border-radius: .3em; overflow: hidden; background: #0B0D12; display: grid; place-items: center; }
.ogr-card.big .ogr-pic { aspect-ratio: auto; min-height: 0; height: 100%; }
.ogr-pic img { width: 100%; height: 100%; object-fit: contain; }
.ogr-none { font-size: .6em; color: #5B6374; text-align: center; padding: 1em; }
.ogr-group { font-size: .55em; font-weight: 800; letter-spacing: .02em; color: var(--cue); margin-bottom: .2em; }
.ogr-title { font-weight: 700; font-size: .78em; line-height: 1.2; display: flex; gap: .5em; align-items: baseline; }
.ogr-card.big .ogr-title { font-size: 1.25em; margin-top: .3em; }
.ogr-card.big .ogr-group { font-size: .6em; margin-top: .5em; }
.ogr-num { font-family: var(--mono); color: #8A92A3; font-size: .8em; }
.ogr-when { font-size: .55em; color: #9AA3B2; margin-top: .3em; }
.ogr-notes { font-size: .55em; color: #C9CED8; margin-top: .3em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ogr-card.big .ogr-notes { font-size: .65em; -webkit-line-clamp: 4; }
@media (max-width: 900px) { .ogr { grid-template-columns: 1fr; } }

/* ---------- Rundown Studio parity: group numbers, tinted rows, solid type pills, big reference images ---------- */
/* Rows tinted by their type (the rundown's "Tint rows by" dropdown column) or by the cue's own color. */
.rd-row.tinted { background: linear-gradient(90deg, color-mix(in srgb, var(--tint) 34%, transparent), color-mix(in srgb, var(--tint) 20%, transparent) 55%, color-mix(in srgb, var(--tint) 15%, transparent)); }
.rd-row.tinted.current { background: linear-gradient(90deg, color-mix(in srgb, var(--fail) 22%, transparent), color-mix(in srgb, var(--tint) 12%, transparent) 70%); }
/* Solid pills in dropdown cells, readable on any option color (--opt-ink is dark on light colors). */
.chip.solid { background: var(--opt); border-color: var(--opt); color: var(--opt-ink, #fff); font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.rd-sel.has { background-color: var(--opt); border-color: var(--opt); color: var(--opt-ink, #fff); border-radius: 99px; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; width: auto; max-width: 100%; padding-left: 11px; }
.rd-sel option { background: var(--panel); color: var(--text); text-transform: none; font-weight: 500; letter-spacing: 0; }
/* Group numbers: the header shows its number next to the collapse arrow; its cues get a quiet tree line. */
.rd-gnum { font-family: var(--mono); font-weight: 800; color: var(--text); }
.rd-row.in-grp > .rd-num { padding-left: 8px; }
.rd-row.in-grp > .rd-num::before { content: ''; position: absolute; left: 1px; top: -8px; bottom: -8px; border-left: 1px solid color-mix(in srgb, var(--muted) 35%, transparent); }
.dens-compact .rd-row.in-grp > .rd-num::before { top: -3px; bottom: -3px; }
.rd-row.in-grp .rd-take { left: 6px; }
/* Multi-line cue titles (kept from imports): a box that grows with its text. */
.rd-title-ta { resize: none; field-sizing: content; min-height: 32px; max-height: 160px; line-height: 1.35; padding-top: 6px; overflow: auto; font-weight: 600; }
.rd-ro { white-space: pre-line; }
/* Reference image size (View → Reference images). Large is a 16:9 preview about 300 px wide; rows grow to fit. */
.img-m .rd-img img { width: 212px; max-width: 100%; height: auto; aspect-ratio: 16 / 9; max-height: none; object-fit: contain; }
.img-l .rd-img img { width: 300px; max-width: 100%; height: auto; aspect-ratio: 16 / 9; max-height: none; object-fit: contain; }
.img-m .rd-rows > .rd-row.has-img { contain-intrinsic-size: auto 136px; }
.img-l .rd-rows > .rd-row.has-img { contain-intrinsic-size: auto 186px; }
.dens-compact.img-m .rd-img img, .dens-compact.img-l .rd-img img { width: 180px; }
/* Show progress: one segment per group, sized by planned time, with the elapsed part filled. */
.rd-onair > .oa-segs { grid-column: 1 / -1; position: relative; display: flex; gap: 2px; height: 10px; padding: 0; border-right: 0; border-top: 1px solid var(--line); background: var(--bg-2); }
.oa-seg { flex-basis: 0; min-width: 2px; height: 100%; padding: 0; border: 0; cursor: pointer; background: color-mix(in srgb, var(--seg, var(--muted)) 45%, var(--panel-2)); }
.oa-seg.grp { background: color-mix(in srgb, var(--seg, var(--info)) 50%, var(--panel-2)); }
.oa-seg:nth-child(even) { filter: brightness(1.18); }
.oa-seg:hover { filter: brightness(1.5); }
.oa-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; pointer-events: none; background: color-mix(in srgb, var(--accent) 55%, transparent); border-right: 2px solid #fff; box-shadow: 0 0 10px var(--glow); transition: width .25s linear; }
.oa-fill[style*="width: 0"], .oa-fill:not([style]) { border-right: 0; box-shadow: none; }
/* Editorial status badge (Draft / In review / Approved / Finalized). */
.pill.final { color: #fff; background: color-mix(in srgb, var(--pass) 80%, #000); border-color: var(--pass); }
.status-pill { cursor: pointer; font-family: inherit; }
.status-wrap { display: inline-block; vertical-align: middle; }
.rd-head h1 .menu { font-family: Inter, system-ui, sans-serif; font-size: 13px; font-weight: 500; text-transform: none; letter-spacing: 0; min-width: 170px; }
.rd-head h1 .menu button.on { background: var(--bg-2); }
/* Find a cue by number or title */
.rd-find { width: 200px; height: 28px; font-size: 12px; padding: 0 10px; }
/* Import: Rundown Studio panel and image download progress */
.rs-callout .field { margin-bottom: 8px; }
.imp-progress { margin-top: 12px; padding: 12px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line); display: grid; gap: 8px; }
.imp-bar { height: 8px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.imp-bar i { display: block; height: 100%; background: var(--grad); transition: width .3s; }
@media (max-width: 760px) { .rd-find { width: 100%; } .rd-row.in-grp > .rd-num::before { display: none; } }

/* =====================================================================
   Phase 8: layouts, card rows and authoring tools
   ===================================================================== */
/* ---- slim header (Compact / Editor / Graphics) and the info strip ---- */
.rd-head.slim { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 8px; position: relative; }
.rd-head.slim::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--grad); border-radius: var(--radius) var(--radius) 0 0; }
.rd-slim-title { flex: 1 1 280px; min-width: 0; }
.rd-head.slim h1 { margin: 2px 0 0; font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; letter-spacing: -.01em; }
.rd-head.slim .rd-title-input { width: min(460px, 46vw); }
.rd-head.slim .small.muted { font-size: 12px; gap: 6px; }
.rd-slim-end { display: flex; align-items: center; gap: 6px; }
.slim-presence { display: flex; align-items: center; gap: 6px; max-width: 220px; overflow: hidden; white-space: nowrap; }
.slim-presence .small { overflow: hidden; text-overflow: ellipsis; }
.rd-head-menu { height: 34px; width: 36px; }
.rd-head:not(.slim) .rd-head-menu { height: 100%; min-height: 52px; width: 40px; }
.rd-info { display: flex; gap: 6px; flex-wrap: wrap; align-items: stretch; justify-content: flex-end; }
.rd-info .ri { display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 5px 10px; border-radius: 8px; background: color-mix(in srgb, var(--bg-2) 85%, transparent); border: 1px solid var(--line); min-width: 86px; }
.rd-info .ri small { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); white-space: nowrap; }
.rd-info .ri b { font-size: 14px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rd-info .ri.ifn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.rd-info .ri.ifn .btn { height: 22px; padding: 0 6px; font-size: 11px; margin-top: 2px; }
.rd-head:not(.slim) .rd-info .ri { padding: 8px 12px; min-width: 110px; }
.rd-head:not(.slim) .rd-info .ri b { font-size: 16px; }

/* ---- transport row (Compact / Graphics) and the Editor live chip ---- */
.rd-onair.bar, .rd-onair.chip { display: block; padding: 0; margin-bottom: 8px; }
.rd-onair.bar > .tp-row, .rd-onair.chip > .tp-row { padding: 5px 10px; border-right: 0; }
.tp-row { display: flex; align-items: center; gap: 12px; min-height: 46px; }
.tp-state { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.rd-onair.live .tp-state { color: var(--fail); }
.rd-onair.paused .tp-state { color: var(--warn); }
.tp-now { flex: 1 1 200px; min-width: 0; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; font-family: var(--display); font-size: 16px; }
.tp-now b { overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.tp-clock { display: flex; flex-direction: column; align-items: stretch; min-width: 88px; text-align: right; }
.tp-clock .big { font-size: 26px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.tp-clock .big.over { color: var(--fail); } .tp-clock .big.warn { color: var(--warn); } .tp-clock .big.paused { animation: blink 1.2s infinite; }
.tp-clock .oa-prog { margin: 4px 0 0; height: 3px; }
.clk-s .tp-clock .big { font-size: 20px; } .clk-l .tp-clock .big { font-size: 36px; }
.tp-next { flex: 0 1 280px; min-width: 0; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.tp-next small { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.tp-next .ellip { overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.tp-ctl { display: flex; align-items: center; gap: 4px; }
.tp-ctl .btn { height: 30px; }
.tp-go { min-width: 96px; letter-spacing: .05em; font-weight: 800; }
.tp-ctl .active-msg { max-width: 200px; }
.rd-onair.bar > .oa-segs { height: 6px; }
.rd-onair.chip { border-color: color-mix(in srgb, var(--fail) 55%, var(--line)); }
.kbd-pill { height: 24px; color: var(--info); border-color: color-mix(in srgb, var(--info) 40%, transparent); }
/* Big Show Caller panel: clock size S / M / L */
.rd-onair.clk-s .oa-clock .big { font-size: 30px; }
.rd-onair.clk-m .oa-clock .big { font-size: 42px; }
.rd-onair.clk-l .oa-clock .big { font-size: 64px; }
.rd-onair.clk-l .oa-title { font-size: 25px; }

/* ---- card rows ---- */
.rd-grid-wrap { background: color-mix(in srgb, var(--bg) 55%, var(--panel)); }
.rd-ghead { border-radius: var(--radius) var(--radius) 0 0; }
.rd-rows { display: flex; flex-direction: column; gap: 3px; padding: 6px 8px 8px; }
.rd-rows > .rd-row { border: 1px solid var(--line); border-radius: 9px; background-color: var(--panel); }
.rd-rows > .rd-row.heading { background-color: var(--panel-2); }
.rd-rows > .rd-row.heading { margin: 9px -4px 1px; border-radius: 10px; border-color: color-mix(in srgb, var(--cue) 40%, var(--line-2)); min-height: 46px; }
.rd-rows > .rd-row.heading:first-child { margin-top: 2px; }
.rd-rows > .rd-row.heading.ifn { border-style: dashed; }
.rd-rows > .rd-gap { border-radius: 8px; border: 1px dashed var(--line-2); margin: 2px 0; }
.rd-gap .rd-gapfix { height: 24px; margin-left: 10px; font-size: 12px; }
.rd-gadd { padding: 0 0 4px 44px; }
.rd-gadd .btn { height: 24px; font-size: 12px; color: var(--faint); border: 1px dashed transparent; }
.rd-gadd .btn:hover { color: var(--text); border-color: var(--line-2); }
.rd-numbox { display: inline-grid; place-items: center; min-width: 34px; height: 24px; padding: 0 6px; border-radius: 6px; font-family: var(--mono); font-size: 12px; font-weight: 800; color: var(--text);
  background: color-mix(in srgb, var(--cue, transparent) 26%, var(--bg-2)); border: 1px solid color-mix(in srgb, var(--cue, transparent) 55%, var(--line-2)); }
.rd-numbox:empty { visibility: hidden; }
.rd-row.current .rd-numbox { background: var(--fail); border-color: var(--fail); color: #fff; }
.rd-row.paused .rd-numbox { background: var(--warn); border-color: var(--warn); color: #111; }
.rd-row.next .rd-num::after { display: none; }
.rd-row.next .rd-numbox { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 55%, transparent); }
.dens-compact .rd-numbox { height: 22px; }
.rd-durchip { text-align: center; border-radius: 99px; font-weight: 700; background: color-mix(in srgb, var(--bg-2) 80%, transparent); border-color: var(--line); }
.rd-durchip::placeholder { color: var(--faint); font-weight: 500; font-size: 11px; }
.rd-durchip.ro { display: inline-block; padding: 3px 10px; border: 1px solid var(--line); }
.rd-grange { font-weight: 700; color: var(--text); padding: 1px 8px; border-radius: 99px; background: color-mix(in srgb, var(--cue) 18%, var(--bg-2)); border: 1px solid color-mix(in srgb, var(--cue) 40%, var(--line)); }
.rd-grange b { font-weight: 700; }
.rd-gtarget { color: var(--muted); }
.rd-gover:empty { display: none; }
.rd-gover { font-weight: 700; font-size: 12px; }
.pill.ifn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 10%, transparent); }
.rd-row.heading.g-amber { box-shadow: inset 4px 0 0 var(--warn), 0 0 0 1px var(--warn); }
.rd-row.heading.g-red { box-shadow: inset 4px 0 0 var(--fail), 0 0 0 1px var(--fail); background: linear-gradient(90deg, color-mix(in srgb, var(--fail) 22%, var(--panel-2)), var(--panel-2) 60%); }
.oa-seg.ifn { opacity: .55; background-image: repeating-linear-gradient(135deg, transparent 0 3px, rgba(0, 0, 0, .25) 3px 6px); }
/* tint strength */
/* Same colors as mixing with the panel, drawn over the row's background color so a hover can lift it without touching the tint. */
.tint-strong .rd-row.tinted { background-image: linear-gradient(90deg, color-mix(in srgb, var(--tint) 52%, transparent), color-mix(in srgb, var(--tint) 36%, transparent) 55%, color-mix(in srgb, var(--tint) 28%, transparent)); }
/* hover "+": add a cue below */
.rd-addbelow { position: absolute; left: 5px; bottom: 3px; width: 18px; height: 18px; padding: 0; border-radius: 50%; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--muted);
  font-size: 13px; line-height: 15px; font-weight: 700; cursor: pointer; opacity: 0; transition: opacity .12s; z-index: 2; }
.rd-row:hover .rd-addbelow { opacity: 1; }
.rd-addbelow:hover { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
/* selection */
.rd-rows > .rd-row.sel { border-color: var(--info); box-shadow: 0 0 0 1px var(--info), inset 4px 0 0 var(--info); background-color: color-mix(in srgb, var(--info) 12%, var(--panel)); }
.rd-num { cursor: default; }
.rd-row:not(.heading) .rd-num:hover .rd-numbox { outline: 1px solid var(--info); outline-offset: 1px; }

/* ---- toolbar extras, bulk bar, jump to live, suggestions, tips ---- */
.undo-btns { display: inline-flex; gap: 2px; }
.undo-btns .btn:disabled { opacity: .35; }
.bulk-bar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center;
  padding: 8px 10px; max-width: calc(100vw - 24px); background: var(--panel); border: 1px solid var(--info); border-radius: 12px; box-shadow: var(--shadow); }
.bulk-n { font-size: 13px; padding: 0 6px; white-space: nowrap; }
.bulk-dur { width: 92px; height: 30px; }
.bulk-sep { width: 1px; height: 22px; background: var(--line-2); }
.menu.up { top: auto; bottom: calc(100% + 6px); left: 0; right: auto; max-height: 60vh; overflow: auto; }
.bulk-menu .chip { margin: 0; }
.jump-live { position: fixed; right: 18px; bottom: 18px; z-index: 55; color: var(--fail); border-color: var(--fail); background: var(--panel); box-shadow: var(--shadow); font-weight: 700; }
.jump-live.raised { bottom: 78px; }
.ac-pop { position: fixed; z-index: 96; max-width: 460px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow); padding: 4px; }
.ac-pop .ac-head { padding: 4px 8px 2px; }
.ac-pop button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--text); cursor: pointer; text-align: left; font-size: 13px; }
.ac-pop button .chip { margin: 0; height: 20px; font-size: 10px; }
.ac-pop button.on, .ac-pop button:hover { background: var(--panel-2); box-shadow: inset 2px 0 0 var(--accent); }
.coach { position: fixed; z-index: 300; width: min(330px, calc(100vw - 24px)); padding: 12px 14px; background: var(--panel); border: 1px solid var(--accent); border-radius: 12px;
  box-shadow: var(--shadow), 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); font-size: 13px; animation: modalIn .18s ease; }
.coach p { margin: 4px 0 8px; color: var(--muted); line-height: 1.45; }
.coach-step { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 10px; }
/* View menu: layout picker */
.menu.view-menu { width: 400px; max-height: 76vh; }
.layout-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 8px 6px; }
.menu .layout-pick button { flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-2); }
.menu .layout-pick button small { font-size: 11px; color: var(--muted); line-height: 1.3; }
.menu .layout-pick button.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--bg-2)); }
.view-menu .row > .seg { margin-right: 0; }
.view-apply { justify-content: space-between; }
/* blocks, column options, shortcuts */
.block-list { display: grid; gap: 8px; }
.block-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); }
.block-item .input.sm { height: 28px; }
.opt-head { display: grid; grid-template-columns: 1fr 86px 92px 170px 28px; gap: 8px; padding-left: 42px; }
.opt-list .row { flex-wrap: nowrap; }
.kbd-table th { background: transparent; padding-top: 14px; }
.kbd-table td:first-child { width: 42%; }

@media (max-width: 1180px) {
  .rd-onair.bar, .rd-onair.chip { position: static; }
  .tp-next { display: none; }
}
@media (max-width: 760px) {
  .rd-head.slim { padding: 10px; }
  .rd-head.slim h1 { font-size: 18px; }
  .rd-info { justify-content: flex-start; }
  .rd-info .ri { min-width: 0; flex: 1 1 40%; }
  .slim-presence { display: none; }
  .tp-row { flex-wrap: wrap; gap: 6px 10px; }
  .tp-now { flex-basis: 100%; order: -1; }
  .tp-ctl { flex-wrap: wrap; }
  .rd-rows { padding: 4px; gap: 4px; }
  .rd-rows > .rd-row.heading { margin: 8px 0 0; }
  .rd-addbelow, .rd-gadd, .bulk-bar, .undo-btns { display: none !important; }
  .menu.view-menu { width: min(360px, calc(100vw - 24px)); }
}
@media print {
  .bulk-bar, .jump-live, .rd-addbelow, .rd-gadd, .coach, .ac-pop { display: none !important; }
  .rd-rows { gap: 0; padding: 0; }
  .rd-rows > .rd-row { border-radius: 0; }
}

.jump-live[hidden] { display: none !important; }
.rd-head.slim .rd-title-input { field-sizing: content; width: auto; min-width: 180px; max-width: min(520px, 48vw); }
.toolbar[data-layout] { gap: 5px; margin-bottom: 8px; }
.toolbar[data-layout] .rd-find { width: 150px; }
.toolbar[data-layout] .undo-btns { gap: 0; }
.toolbar[data-layout] .undo-btns .btn.sm.icon { width: 26px; }
.toolbar[data-layout] .toolbar-sep { margin: 0 2px; }
/* GO (take this cue) sits over the start time on hover, so the cue number is free for selecting rows. */
.rd-start .rd-take { position: absolute; left: -4px; top: 50%; transform: translateY(-50%); height: 26px; padding: 0 10px; opacity: 0; font-size: 11px; letter-spacing: .06em; color: var(--accent-hi); z-index: 1; }
.rd-row:hover .rd-start .rd-take { opacity: 1; }
.rd-row.in-grp .rd-start .rd-take { left: -4px; }
.bulk-bar { left: 0; right: 0; margin: 0 auto; width: max-content; transform: none; }
/* Slim header: one row. The title keeps its room; the info strip wraps inside itself on narrow screens. */
.rd-head.slim { display: grid; grid-template-columns: minmax(240px, 1fr) auto auto; align-items: center; }
.rd-slim-title { min-width: 0; }
.rd-slim-title > .row { flex-wrap: nowrap; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.rd-slim-title > .row > * { display: inline; margin-right: 6px; }
.rd-head.slim h1 { flex-wrap: nowrap; white-space: nowrap; }
.rd-head.slim h1 .pill { flex: none; }
.rd-head.slim .rd-info .ri { min-width: 0; padding: 4px 9px; }
.rd-info .ri.ifn { flex-direction: row; align-items: center; gap: 8px; }
.rd-info .ri.ifn > div { display: flex; flex-direction: column; }
.rd-info .ri.ifn .btn { margin: 0; }
@media (max-width: 1100px) { .rd-head.slim { grid-template-columns: 1fr auto; } .rd-head.slim .rd-info { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; } }
@media (max-width: 760px) { .rd-head.slim { grid-template-columns: 1fr; } .rd-head.slim h1 { flex-wrap: wrap; white-space: normal; } .rd-slim-end { justify-self: start; } }
.rd-head.slim { grid-template-columns: minmax(300px, 1fr) minmax(0, auto) auto; }
.rd-head.slim h1 .pill.practice { display: none; }
.rd-head.slim .slim-presence > .small { display: none; }
.rd-head.slim .rd-info { flex-wrap: wrap; }
/* Full header (Show Caller): title on the left, the info strip wraps on the right. */
.rd-head:not(.slim) { grid-template-columns: minmax(360px, 1fr) minmax(0, auto); }
.rd-head:not(.slim) .clocks { flex-wrap: nowrap; align-items: stretch; }
.rd-head:not(.slim) .rd-info { flex-wrap: wrap; max-width: 820px; }
.rd-head:not(.slim) .rd-info .ri { min-width: 0; padding: 6px 11px; }
.menu .help-q { display: inline-grid; width: 18px; height: 18px; padding: 0; vertical-align: middle; margin-left: 4px; }
/* A rundown uses the full width of big screens (1920 and up) so more columns fit without scrolling sideways. */
/* (A class, not :has(): a :has() on the page made every re-render of a 1000-cue rundown restyle the whole page.) */
.page.page-rd { max-width: 2400px; }
@media (min-width: 1700px) { .rd-head:not(.slim) .rd-info { max-width: none; flex-wrap: nowrap; } }
@media (max-width: 760px) {
  .rd-info .ri b { white-space: normal; font-size: 13px; }
  .rd-heading-title { flex-wrap: wrap; gap: 4px 10px; }
  .rd-heading-title > b, .rd-heading-title > input { flex: 1 1 100%; }
}
/* Click the cue number to select a row (Ctrl / Shift+click for more). */
.rd-row:not(.heading) > .rd-num { cursor: pointer; }

/* =====================================================================
   Pinned dock, resizable columns, live dot, hard-start pin, sign-in
   ===================================================================== */
/* Rows and the column names share one column template (--rd-tpl on .rd-page), so resizing touches no row markup. */
.rd-row, .rd-ghead { grid-template-columns: var(--rd-tpl); }
.rd-grid { min-width: var(--rd-gw); }
/* The dock (live bar, toolbar, column names, sideways scrollbar) pins under the top bar while the rows scroll. */
.rd-dock.pinned { position: sticky; top: var(--top-h, 58px); z-index: 25; background: var(--bg); padding-top: 8px; margin-top: -8px;
  box-shadow: 0 10px 14px -14px rgba(0, 0, 0, .8); }
.rd-dock .rd-onair { position: relative; top: auto; z-index: auto; }
html.rd-pinned { scroll-padding-top: calc(var(--top-h, 58px) + var(--dock-h, 0px) + 8px); }
/* Column names: their own box, scrolled sideways in step with the rows. */
.rd-ghead-box { overflow: hidden; border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; background: var(--panel-2); }
.rd-ghead-in { min-width: var(--rd-gw); padding: 0 8px; }
.rd-ghead { margin: 0 1px; border: 0; border-radius: 0; background: transparent; padding-top: 9px; padding-bottom: 9px; }
.rd-ghead > .gh { position: relative; min-width: 0; overflow: visible; }
.rd-ghead > .gh > .gh-t { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-grid-wrap { border-top-left-radius: 0; border-top-right-radius: 0; scrollbar-width: none; }
.rd-grid-wrap::-webkit-scrollbar { display: none; }
.rd-hscroll { display: none; overflow-x: auto; overflow-y: hidden; border: 1px solid var(--line); border-width: 0 1px; background: var(--panel-2); scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.rd-hscroll.on { display: block; }
.rd-hscroll > div { height: 1px; }
/* Resize handle on the right edge of each column name (it covers the gap between two columns). */
.col-rs { position: absolute; top: -9px; bottom: -9px; right: -8px; width: 8px; cursor: col-resize; z-index: 1; touch-action: none; }
.col-rs::after { content: ''; position: absolute; left: 3px; top: 7px; bottom: 7px; width: 2px; border-radius: 2px; background: var(--line-2); opacity: 0; transition: opacity .12s; }
.rd-ghead:hover .col-rs::after { opacity: .8; }
.col-rs:hover::after, .col-rs.drag::after { opacity: 1; background: var(--accent); }
html.col-resizing, html.col-resizing * { cursor: col-resize !important; user-select: none !important; }
/* Row GO (jump to this cue) only while the show runs, on hover, for Show Callers and admins. */
.rd-start .rd-take { display: none; }
.rd-grid-wrap.is-live .rd-row:hover .rd-start .rd-take, .rd-grid-wrap.is-live .rd-start .rd-take:focus-visible { display: inline-flex; opacity: 1; }
/* Start time with the hard-start pin in front of it (never on top of AM / PM). */
.rd-stime { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; min-width: 0; }
.hard-pin { flex: none; display: inline-grid; place-items: center; width: 17px; height: 17px; padding: 0; border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); border-radius: 4px;
  background: var(--warn-bg); color: var(--warn); cursor: pointer; }
.hard-pin svg { display: block; }
.hard-pin.ro { cursor: help; }
button.hard-pin:hover, button.hard-pin:focus-visible { background: var(--warn); border-color: var(--warn); color: #111; }
/* Live and paused marks drawn in CSS so they sit exactly in the middle at any size. */
.rec-dot { display: inline-block; flex: none; width: .62em; height: .62em; border-radius: 50%; background: currentColor; vertical-align: middle; }
.pause-ico { display: inline-block; flex: none; width: .58em; height: .7em; box-sizing: border-box; border-left: .2em solid currentColor; border-right: .2em solid currentColor; vertical-align: middle; }
.rd-numbox.live-dot { display: inline-flex; align-items: center; justify-content: center; line-height: 1; font-size: 12px; }
.rd-row.current .live-dot { animation: none; font-size: 12px; }
.rd-row.current .live-dot .rec-dot { width: 10px; height: 10px; background: #fff; animation: blink 1.2s infinite; }
.rd-row.current.paused .live-dot .pause-ico { width: 9px; height: 11px; border-width: 0 3px; color: #111; }
.tp-state, .rd-onair .oa-now > small { display: inline-flex; align-items: center; gap: 6px; }
.rd-onair .oa-now > small { display: flex; }
.tp-state .rec-dot, .oa-now > small .rec-dot { width: 8px; height: 8px; animation: blink 1.2s infinite; }
.tp-state .pause-ico, .oa-now > small .pause-ico { width: 7px; height: 9px; border-width: 0 2.5px; }
.jump-live { display: inline-flex; align-items: center; gap: 7px; }
.jump-live .rec-dot { width: 9px; height: 9px; }
/* Title badges (Live, Draft / Approved, Practice …): one centre line, one height. */
.show-head h1, .rd-head h1 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.rd-head.slim h1 { flex-wrap: nowrap; }
.show-head h1 .pill, .rd-head h1 .pill { height: 22px; box-sizing: border-box; line-height: 1; margin: 0; vertical-align: middle; flex: none; }
.rd-head h1 .status-wrap { display: inline-flex; align-items: center; flex: none; }
button.pill { font-family: inherit; font-size: 11px; font-weight: 700; letter-spacing: .06em; line-height: 1; padding: 0 9px; margin: 0; }
.status-pill .faint { font-size: 9px; line-height: 1; }
@media (max-width: 760px) {
  /* Phones: only the slim live bar stays pinned (the toolbar and column names scroll away). */
  .rd-dock.pinned { position: static; display: contents; }
  .rd-dock.pinned > .rd-onair.bar, .rd-dock.pinned > .rd-onair.chip { position: sticky; top: var(--top-h, 58px); z-index: 25; }
  .rd-ghead-box, .rd-hscroll { display: none !important; }
  .rd-grid-wrap { border-radius: var(--radius); }
}
@media print {
  .rd-dock.pinned { position: static; box-shadow: none; margin: 0; padding: 0; }
  .rd-hscroll, .col-rs { display: none !important; }
}
/* Sign in with Google */
.google-btn { width: 100%; justify-content: center; gap: 10px; background: #fff; color: #1F1F1F; border-color: #DADCE0; font-weight: 600; text-decoration: none; }
.google-btn:hover { background: #F7F8F8; color: #1F1F1F; border-color: #C6C9CE; }
.google-btn svg { flex: none; }
.auth-or { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; color: var(--faint); font-size: 12px; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.signin-err { color: var(--text); border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); background: var(--warn-bg); line-height: 1.45; }
.signin-err b { color: var(--warn); }
.google-pill { height: 20px; font-size: 10px; color: var(--info); border-color: color-mix(in srgb, var(--info) 40%, transparent); flex: none; }
.ok-text { color: var(--pass); font-weight: 700; text-transform: none; letter-spacing: 0; margin-left: 6px; }
.signin-pw { align-items: flex-start; }
.signin-pw > span { display: flex; flex-direction: column; gap: 2px; }
/* Narrower screens: the less-used toolbar buttons show just their icon (the name is in the tooltip), so the pinned
   toolbar stays one line at 1280–1440 px. */
@media (max-width: 1440px) { .toolbar[data-layout] .tb-l { display: none; } }
@media (max-width: 1180px) { .toolbar[data-layout] .tb-l2 { display: none; } }
/* The big Show Caller panel, pinned: one row down to 900 px wide (the old two-row version took half the screen),
   and a smaller clock on short screens, so the rows keep most of the height. */
@media (min-width: 900px) and (max-width: 1180px) {
  .rd-dock.pinned .rd-onair:not(.bar):not(.chip) { grid-template-columns: minmax(0, 1.4fr) minmax(170px, 1fr) minmax(0, 1fr) auto; }
  .rd-dock.pinned .rd-onair:not(.bar):not(.chip) > div { border-bottom: 0; }
  .rd-dock.pinned .rd-onair .oa-controls { grid-column: auto; min-width: 210px; }
}
@media (min-width: 761px) and (max-width: 899px) {
  .rd-dock.pinned .rd-onair:not(.bar):not(.chip) { grid-template-columns: minmax(0, 1fr) minmax(160px, auto) auto; }
  .rd-dock.pinned .rd-onair:not(.bar):not(.chip) > div { border-bottom: 0; }
  .rd-dock.pinned .rd-onair .oa-next { display: none; }
  .rd-dock.pinned .rd-onair .oa-controls { grid-column: auto; min-width: 200px; }
}
@media (max-height: 820px) and (min-width: 761px) {
  .rd-dock.pinned .rd-onair:not(.bar):not(.chip) > div { padding-top: 9px; padding-bottom: 9px; }
  .rd-dock.pinned .rd-onair.clk-l .oa-clock .big { font-size: 46px; }
  .rd-dock.pinned .rd-onair.clk-m .oa-clock .big { font-size: 36px; }
  .rd-dock.pinned .rd-onair .oa-go { height: 40px; }
  .rd-dock.pinned .rd-onair .oa-clock .oa-prog { margin: 6px 0 4px; }
}
/* The Editor layout's live chip shares the class name "chip" with dropdown pills, which squeezed it to a 24 px pill. */
.rd-onair.chip { height: auto; margin-top: 0; padding: 0; border-radius: var(--radius); font-size: inherit; font-weight: inherit;
  border: 1px solid color-mix(in srgb, var(--fail) 55%, var(--line)); background: color-mix(in srgb, var(--panel) 92%, transparent); }

/* =====================================================================
   Phase 9: floating layer, bottom bar, ⚙ item menus, Timing column, folders
   ===================================================================== */
/* One top-level layer for every menu and popover (app.js floatMenu). Above the pinned bars, the bottom bar, the
   bulk bar and the rich-text toolbar; below modals (100), the lightbox (180), toasts (200) and the tour (250). */
#float-layer { position: fixed; inset: 0; z-index: 85; pointer-events: none; }
.fl-pop { position: fixed; left: 0; top: 0; pointer-events: auto; visibility: hidden; }
.fl-pop > .menu { position: static; top: auto; right: auto; left: auto; bottom: auto; margin: 0; max-height: calc(100vh - 16px); overflow: auto;
  background: var(--panel); box-shadow: var(--shadow); }
.fl-pop > .menu.view-menu { max-height: min(76vh, calc(100vh - 16px)); }
.menu button.on { background: var(--panel-2); }
.menu .sub-ar { margin-left: auto; color: var(--faint); font-size: 11px; }
.menu .menu-label.ellip { max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--muted); }
.menu.item-menu { min-width: 260px; max-width: 360px; }
.menu.status-menu { min-width: 170px; }
.menu.status-menu .pill { margin: 0; }
button.user-chip { font: inherit; color: inherit; }
/* Show tools: Outputs, Message, Prompter, Automation, Images (with their help links). */
.tools-menu { min-width: 320px; }
.tools-menu .tool-row { display: flex; align-items: center; gap: 4px; padding-right: 6px; }
.tools-menu .tool-row > button { display: grid; gap: 1px; justify-items: start; }
.tools-menu .tool-row > button small { font-size: 11px; color: var(--muted); font-weight: 400; }
/* Hard-start editor */
.menu.hard-pop { width: 300px; padding: 8px; }
.hard-pop .hard-row { display: flex; gap: 6px; padding: 2px 6px 0; }
.hard-pop .hard-row .input { height: 32px; flex: 1; }
.hard-pop p { margin: 6px 8px 6px; line-height: 1.4; }

/* ---- the editing bar, pinned to the bottom (editors) ---- */
.rd-bbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: center; gap: 5px; flex-wrap: nowrap;
  padding: 8px 12px; min-height: 50px; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(14px) saturate(1.3);
  border-top: 1px solid var(--line-2); box-shadow: 0 -10px 24px -18px rgba(0, 0, 0, .8); }
.rd-bbar::before { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 30%, var(--accent-lo) 65%, transparent 100%); opacity: .35; }
.rd-bbar .rd-find { width: 170px; height: 28px; font-size: 12px; padding: 0 10px; }
.rd-bbar .undo-btns { gap: 0; }
.rd-bbar .undo-btns .btn.sm.icon { width: 26px; }
.rd-bbar .toolbar-sep { margin: 0 2px; }
.page.page-rd { max-width: none; padding: 8px 10px 80px; }
html.rd-bbar-on { scroll-padding-bottom: 64px; }
html.rd-bbar-on #toasts { bottom: 66px; }
html.rd-bbar-on .bulk-bar { bottom: 62px; }
html.rd-bbar-on .jump-live { bottom: 64px; }
html.rd-bbar-on .jump-live.raised { bottom: 124px; }
@media (max-width: 1240px) { .rd-bbar .tb-l { display: none; } }
@media (max-width: 1000px) { .rd-bbar .tb-l2, .rd-bbar .vb-l { display: none; } .rd-bbar .rd-find { width: 130px; } }
/* Find and 👁 View in the header, for people without the bottom bar (and editors on a phone). */
.head-tools { display: flex; align-items: center; gap: 6px; }
.head-tools .rd-find { width: 170px; height: 28px; font-size: 12px; padding: 0 10px; }
.head-tools.ed { display: none; }
.rd-head:not(.slim) .head-tools { align-self: center; flex-direction: column; align-items: stretch; }

/* ---- rows: ⚙ gear in the left cell (replaces the hover "+") ---- */
.rd-drag.gear-cell { position: relative; border-radius: 6px; outline: none; cursor: pointer; }
.rd-drag.gear-cell[draggable="true"] { cursor: grab; }
.gear-cell .dg, .gear-cell .gear { font-style: normal; line-height: 1; }
.gear-cell .gear { display: none; font-size: 15px; color: var(--muted); }
.gear-cell:not([draggable]) .dg { visibility: hidden; }
.rd-row:hover > .gear-cell .dg, .gear-cell:focus-visible .dg { display: none; }
.rd-row:hover > .gear-cell .gear, .gear-cell:focus-visible .gear { display: inline; }
.gear-cell:hover { background: color-mix(in srgb, var(--panel-2) 80%, transparent); }
.gear-cell:hover .gear { color: var(--text); }
.gear-cell:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.rd-addbelow { display: none !important; }
.rd-heading-title { grid-column: 3 / -2; }
/* Timing: the start time, a HARD tag for a hard start (never "Soft") and a second line the clock fills in. Always
   two lines tall, so rows don't change height when the show starts. */
.rd-start { display: flex; flex-direction: column; justify-content: center; gap: 0; min-height: 30px; line-height: 1.15; }
.rd-start .rd-stime { height: 18px; line-height: 18px; }
.rd-sub { display: flex; align-items: center; gap: 4px; height: 12px; line-height: 12px; white-space: nowrap; overflow: hidden; min-width: 0; }
.rd-sub small { font-size: 10.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.rd-sub small .st { font-size: 9.5px; font-weight: 800; letter-spacing: .08em; }
.rd-sub small .st.live { color: var(--fail); }
.rd-sub small .st.paused { color: var(--warn); }
.rd-sub small .act-at { color: var(--text); font-weight: 600; }
.hard-tag { flex: none; display: inline-grid; place-items: center; height: 11px; padding: 0 4px; border-radius: 3px; font: 800 8.5px/1 var(--mono); letter-spacing: .1em;
  color: var(--warn); background: var(--warn-bg); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); }
button.hard-tag { cursor: pointer; }
button.hard-tag:hover, button.hard-tag:focus-visible { background: var(--warn); border-color: var(--warn); color: #111; outline: none; }

/* ---- the gap / overlap notice ---- */
.toast.warn { border-color: var(--warn); border-left-color: var(--warn); }
.gap-toast .toast-acts { display: flex; gap: 6px; margin-top: 8px; align-items: center; }
.gap-toast .grow { display: flex; flex-direction: column; gap: 2px; }

/* ---- live area: the same size running or not ---- */
.tp-go { min-width: 110px; }
.rd-onair .oa-next > .small { min-height: 1.4em; }
.tp-ctl .btn:disabled, .oa-controls .btn:disabled { opacity: .35; }

/* ---- Run of Show list: cards with a ⋯ menu, folders ---- */
.rd-card, .folder-card, .evp-doc { position: relative; }
.rd-card .card-link, .folder-card .card-link, .evp-doc .card-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.show-card .card-menu { position: relative; z-index: 2; display: inline-flex; }
.show-card .card-foot { flex-wrap: wrap; row-gap: 6px; }
.folder-tile { width: 52px; height: 52px; flex: none; display: grid; place-items: center; font-size: 26px; border-radius: 8px; border: 1px solid var(--line-2);
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-2)); }
.folder-card h3 { margin-top: 4px; }
.folder-card.drop-over, .rd-crumbs a.drop-over { box-shadow: 0 0 0 2px var(--accent); border-color: var(--accent); }
.rd-crumbs { margin-bottom: 4px; gap: 6px; }
.rd-crumbs a.drop-over { border-radius: 6px; padding: 0 4px; }
.rd-card.dragging { opacity: .45; }
.rd-card[draggable="true"] { cursor: grab; }
.rd-card[draggable="true"] .card-link { cursor: pointer; }

/* ---- My settings: Appearance at the bottom ---- */
.my-theme { border-top: 1px solid var(--line); padding-top: 14px; }

@media (max-width: 760px) {
  .rd-bbar { display: none; }
  .head-tools.ed { display: flex; }
  .head-tools { flex-wrap: wrap; width: 100%; }
  .head-tools .rd-find { flex: 1; width: auto; }
  .page.page-rd { padding: 8px 8px 60px; }
  html.rd-bbar-on #toasts, html.rd-bbar-on .bulk-bar, html.rd-bbar-on .jump-live { bottom: 16px; }
  .rd-row > .rd-start { min-height: 0; }
  .rd-slim-end { flex-wrap: wrap; width: 100%; min-width: 0; }
  .rd-slim-end .head-tools { flex: 1 1 0; width: auto; min-width: 0; flex-wrap: nowrap; }
  .rd-slim-end .head-tools .rd-find { min-width: 0; }
  .rd-slim-end .head-tools > .menu-wrap, .rd-slim-end > :not(.head-tools) { flex: none; }
  .rd-head:not(.slim) .head-tools { flex-direction: row; align-items: center; }
}
@media print {
  .rd-bbar, .head-tools, #float-layer { display: none !important; }
  .page.page-rd { padding: 0; }
}
/* Header info strip: values keep a steady width, so the strip wraps the same way whether the show is running or not
   (and the grid under it never moves when the show starts). */
.rd-info .ri b.mono { min-width: 10.5ch; }
.rd-info .ri b.mono.drift { min-width: 12ch; }
.rd-info .ri.ri-hard b.mono { min-width: 29ch; }
.rd-info .ri.ifn b.mono { min-width: 23ch; }
/* Phones: the slim header stacks (title, info strip, then Find / View), so nothing pushes the page sideways. */
@media (max-width: 760px) {
  .rd-info .ri b.mono, .rd-info .ri b.mono.drift, .rd-info .ri.ri-hard b.mono, .rd-info .ri.ifn b.mono { min-width: 0; white-space: normal; }
  .rd-head.slim { grid-template-columns: minmax(0, 1fr); }
  .rd-head.slim .rd-slim-end { justify-self: stretch; }
}

/* =====================================================================
   Phase 9b: quiet hover, events (cards, client logo, share page)
   ===================================================================== */
/* Hover is a lift, not a color: the row's background color goes a few percent lighter (darker in light mode) under its
   own tint, and plain rows get a slightly stronger border. Type tints, item colors and the live / next / selected
   states are never replaced, so they stay clearly stronger than hover. */
.rd-rows > .rd-row:hover { background-color: var(--row-hover); }
.rd-rows > .rd-row:not(.heading):hover { border-color: var(--line-2); }
.rd-rows > .rd-row.heading:hover { background-color: var(--head-hover); }
.rd-rows > .rd-row.sel:hover { background-color: color-mix(in srgb, var(--info) 12%, var(--row-hover)); border-color: var(--info); }
.tint-strong .rd-row.tinted.current { background-image: linear-gradient(90deg, color-mix(in srgb, var(--fail) 30%, transparent), color-mix(in srgb, var(--tint) 24%, transparent) 70%); }
.rd-row:not(.heading) .rd-num:hover .rd-numbox { outline-color: color-mix(in srgb, var(--info) 70%, transparent); }

/* ---- event cards in the Run of Show list ---- */
.logo-plate { display: grid; place-items: center; flex: none; background: #fff; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.logo-plate { grid-template: minmax(0, 1fr) / minmax(0, 1fr); } /* Phase 13: the logo fits whole whatever its shape */
.logo-plate img { display: block; width: 100%; height: 100%; object-fit: contain; }
.logo-plate.ev-tile { width: 88px; height: 88px; padding: 8px; }
.logo-plate.sm { display: inline-grid; width: 68px; height: 36px; padding: 4px 6px; margin-right: 12px; vertical-align: -8px; border-radius: 7px; }
.logo-plate.lg { width: 180px; height: 96px; padding: 10px; margin-bottom: 12px; }
.ev-stack { position: relative; overflow: visible !important; }
.ev-stack::before, .ev-stack::after { content: ''; position: absolute; inset: 0; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-2); z-index: -1; }
.ev-stack::before { transform: translate(3px, 3px); opacity: .8; }
.ev-stack::after { transform: translate(6px, 6px); opacity: .45; }
.folder-card .date-block { isolation: isolate; }
.folder-card .ev-stack b { border-radius: 7px 7px 0 0; }
.folder-card .ev-stack span { background: var(--bg-2); border-radius: 0 0 7px 7px; }

/* ---- shared event page (/e/<token>) ---- */
.page.page-ev { max-width: 880px; padding-top: 32px; }
.ev-wrap { display: flex; justify-content: center; }
.ev-card { width: 100%; overflow: hidden; position: relative; }
.ev-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad); }
.ev-head { padding: 28px 28px 20px; text-align: center; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.logo-plate.ev-hero-logo { width: 148px; height: 72px; padding: 10px 14px; margin-bottom: 8px; border-radius: 10px; }
.ev-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.ev-livenow { color: var(--fail); }
.ev-head h1 { margin: 0; font-family: var(--display); font-size: 30px; line-height: 1.15; letter-spacing: -.01em; font-weight: 700; text-wrap: balance; }
.ev-meta { color: var(--text); font-size: 14px; font-weight: 600; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; }
.ev-tz { color: var(--muted); font-size: 12px; }
.ev-dot { color: var(--faint); margin: 0 7px; }
.ev-list { display: flex; flex-direction: column; padding: 10px; gap: 6px; }
.ev-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto 14px; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); text-decoration: none; transition: background-color .12s, border-color .12s; }
.ev-row:hover { background-color: var(--row-hover); border-color: var(--line-2); }
.ev-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ev-row.live { border-color: color-mix(in srgb, var(--fail) 55%, var(--line)); box-shadow: inset 3px 0 0 var(--fail); background: linear-gradient(90deg, color-mix(in srgb, var(--fail) 10%, transparent), transparent 60%); background-color: var(--panel); }
.ev-row.live:hover { background-color: var(--row-hover); border-color: color-mix(in srgb, var(--fail) 55%, var(--line)); }
.ev-day { width: 48px; text-align: center; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg-2); overflow: hidden; }
.ev-day b { display: block; background: var(--grad); color: var(--accent-ink); font-size: 10px; letter-spacing: .1em; padding: 2px 0; }
.ev-day span { display: block; font-size: 19px; font-weight: 800; padding: 2px 0 3px; }
.ev-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ev-title { font-weight: 700; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.ev-sub { color: var(--muted); font-size: 12.5px; display: flex; flex-wrap: wrap; align-items: center; }
.ev-sub .ev-dot { margin: 0 6px; }
.ev-badges { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.ev-chev { color: var(--faint); font-size: 22px; line-height: 1; }
.ev-row:hover .ev-chev { color: var(--muted); }
.ev-empty { padding: 28px 16px; text-align: center; color: var(--muted); }
.ev-foot { display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; padding: 12px 20px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--faint); }
.ev-sync { display: inline-flex; align-items: center; gap: 6px; }
.ev-sync::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--pass); }
.ev-sync.off::before { background: var(--fail); }
.ev-back { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--text); text-decoration: none; padding: 2px 8px 2px 4px; border-radius: 6px; }
.ev-back:hover { background: var(--panel-2); }
@media (max-width: 760px) {
  .page.page-ev { padding: 12px 10px 40px; }
  .ev-head { padding: 22px 16px 16px; }
  .ev-head h1 { font-size: 23px; }
  .ev-list { padding: 8px; }
  .ev-row { grid-template-columns: 42px minmax(0, 1fr) 10px; grid-template-areas: 'day main chev' 'day badges chev'; gap: 6px 12px; padding: 11px 12px; }
  .ev-row > .ev-day { grid-area: day; width: 42px; align-self: start; }
  .ev-row > .ev-main { grid-area: main; }
  .ev-row > .ev-badges { grid-area: badges; justify-content: flex-start; }
  .ev-row > .ev-chev { grid-area: chev; }
  .ev-day span { font-size: 17px; }
  .ev-title { font-size: 14.5px; }
  .ev-foot { padding: 10px 14px 12px; }
}
.ev-seg { white-space: nowrap; }
.show-card.today .date-block .grow { padding-right: 44px; } /* room for the LIVE flag in the corner */

/* =====================================================================
   Phase 10a: owner feedback round (2026-10-06)
   ===================================================================== */
/* Fields made of several controls (a date with Today / Tomorrow, a Synapse time field) use a div with this label. */
.field > .field-l { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
div.field { margin-bottom: 14px; }
/* Synapse time field: a typing box with a themed list of quarter hours (public/timefield.js). */
.syn-time { position: relative; display: inline-flex; align-items: center; width: 100%; max-width: 220px; }
.syn-time .syn-time-in { width: 100%; padding-right: 30px; }
.syn-time .syn-time-in.bad { border-color: var(--fail); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fail) 22%, transparent); }
.syn-time-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; }
.syn-time-btn:hover { background: var(--panel-2); color: var(--text); }
.syn-time-pop { position: fixed; z-index: 400; overflow: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow); padding: 4px; }
.syn-time-pop button { display: block; width: 100%; text-align: left; padding: 6px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--text); font: 600 13px var(--mono); cursor: pointer; }
.syn-time-pop button:hover, .syn-time-pop button.on { background: var(--panel-2); box-shadow: inset 2px 0 0 var(--accent); }
.hard-pop .syn-time { max-width: 170px; }
/* Dates: dark like the rest of the app, with Today / Tomorrow. */
.syn-date { display: flex; align-items: center; gap: 4px; }
.syn-date input[type=date] { flex: 1; min-width: 0; }
.syn-date .btn { height: 30px; padding: 0 8px; font-size: 12px; white-space: nowrap; }
input[type=date].input { color-scheme: dark; accent-color: var(--accent); }
input[type=date].input::-webkit-calendar-picker-indicator { filter: invert(.8); cursor: pointer; opacity: .8; }
:root[data-theme="light"] input[type=date].input { color-scheme: light; }
:root[data-theme="light"] input[type=date].input::-webkit-calendar-picker-indicator { filter: none; }
/* "More settings" / "Advanced" disclosures in dialogs. */
details.more-settings { margin: 2px 0 14px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--bg-2); }
details.more-settings > summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); }
details.more-settings[open] > summary { margin-bottom: 4px; color: var(--text); }

/* Empty duration reads 0:00, dimmed. */
.rd-durchip::placeholder { color: var(--faint); opacity: .7; }
.rd-durchip.ro.zero { color: var(--faint); }

/* Pre-show and the show start. */
.rd-row.pre > .rd-num .rd-numbox { opacity: .75; }
.pre-tag { display: inline-block; font-weight: 800; font-size: 9px; line-height: 14px; letter-spacing: .08em; padding: 0 4px; border-radius: 3px; background: color-mix(in srgb, var(--info) 22%, transparent); color: var(--info); vertical-align: 1px; }
.ss-tag { display: inline-block; font-weight: 800; font-size: 9px; letter-spacing: .06em; color: var(--warn); margin-right: 4px; }
.rd-ssline { display: flex; align-items: center; gap: 8px; padding: 4px 12px; margin: 6px 0 2px; border-top: 2px dashed color-mix(in srgb, var(--warn) 70%, transparent); color: var(--warn); font-size: 12px; }
.rd-ssline b { font-weight: 800; letter-spacing: .02em; }
.rd-ssline .ss-star { font-size: 13px; }
.rd-ssline .faint, .rd-ssline span:last-child { color: var(--muted); }
.ri.ri-ss b.mono { min-width: 17ch; }
.rd-onair.pre { border-color: var(--warn); box-shadow: 0 0 0 1px var(--warn); }
.rd-onair.pre .tp-state, .rd-onair.pre small:first-child { color: var(--warn); }
.rd-onair.pre .rec-dot { background: var(--warn); }
.big.mono.pre { color: var(--warn); }
.tp-sub { display: block; font-size: 10px; color: var(--muted); margin-top: -2px; white-space: nowrap; }
.out-pre { font-family: var(--mono); font-weight: 700; font-size: .95em; padding: .15em .6em; border-radius: .4em; color: #FBBF24; }
.out-pre:empty { display: none; }
.out-pre.late { color: #FF6B6B; }
/* Item 1's time sets when the run of show starts. */
.rd-startbtn { all: unset; cursor: pointer; border-radius: 4px; padding: 0 2px; margin: 0 -2px; }
.rd-startbtn:hover, .rd-startbtn:focus-visible { background: var(--panel-2); box-shadow: inset 0 -1px 0 var(--accent); }
.start-pop .syn-date { margin-bottom: 2px; }

/* An item's own color overrides the row tint: the swatch says so. */
.swatch.own i { box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px var(--text); }

/* Dragging rows: a ghost under the pointer and a line where the row will land (indented inside a group). */
.rd-dragging, .rd-dragging * { cursor: grabbing !important; user-select: none !important; }
.rd-ghost { position: fixed; left: 0; top: 0; z-index: 500; pointer-events: none; display: flex; align-items: center; gap: 8px; max-width: 420px; padding: 6px 12px; border-radius: 9px;
  background: var(--panel); border: 1px solid var(--accent); box-shadow: var(--shadow); font-size: 13px; white-space: nowrap; overflow: hidden; }
.rd-ghost b { overflow: hidden; text-overflow: ellipsis; }
.rd-drop-ind { position: fixed; left: 0; top: 0; z-index: 499; height: 3px; border-radius: 2px; background: var(--accent); pointer-events: none; }
.rd-drop-ind::before { content: ''; position: absolute; left: -5px; top: -4px; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); }
.rd-drop-ind.in { background: var(--info); }
.rd-drop-ind.in::before { background: var(--info); }
.rd-drop-ind .lbl { position: absolute; left: 12px; top: -22px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--panel); border: 1px solid currentColor; color: var(--accent); white-space: nowrap; box-shadow: var(--shadow); }
.rd-drop-ind.in .lbl { color: var(--info); }
.rd-rows > .rd-row.dragging { opacity: .35; }
.rd-rows > .drag-hide { display: none; }
/* Dragging a column name. */
.rd-ghead .gh-move .gh-t { cursor: grab; }
.rd-ghead .gh.gh-dragging { opacity: .45; }
.gh-drop-ind { position: fixed; left: 0; top: 0; z-index: 499; width: 3px; border-radius: 2px; background: var(--accent); pointer-events: none; }

/* Columns dialog: drag handles, options, defaults under a disclosure. */
.grip { cursor: grab; color: var(--faint); padding: 0 4px; user-select: none; touch-action: none; font-size: 13px; line-height: 1; }
.grip:hover { color: var(--text); }
.col-item.sorting, .opt-row.sorting { opacity: .55; outline: 1px dashed var(--accent); outline-offset: 2px; }
.opt-list { margin: 10px 0 0 30px; }
details.opt-adv { margin: 8px 0 0 30px; }
details.opt-adv > summary { cursor: pointer; color: var(--muted); }
.opt-adv-head, .opt-adv-row { display: grid; grid-template-columns: minmax(110px, 1fr) 96px minmax(160px, 1.4fr); gap: 8px; align-items: center; margin-top: 6px; }
.opt-adv-row .chip { justify-self: start; margin: 0; }

/* ---- Phase 10b: Events home, event pages by day, Crew Briefs, search ---------------------------------------------- */
/* Search in the top bar */
.gsearch { position: relative; display: flex; align-items: center; flex: 0 1 280px; min-width: 140px; }
.gsearch-ic { position: absolute; left: 10px; color: var(--faint); pointer-events: none; font-size: 15px; }
.gsearch-in { width: 100%; height: 34px; padding-left: 28px; border-radius: 9px; }
.gsearch-in::-webkit-search-cancel-button { cursor: pointer; }
.gsearch-menu { min-width: min(420px, calc(100vw - 16px)); max-width: min(520px, calc(100vw - 16px)); }
.gsearch-menu a { align-items: flex-start; }
.gs-ic { width: 20px; flex: none; text-align: center; color: var(--muted); }
.gs-t { display: flex; flex-direction: column; min-width: 0; }
.gs-t b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-t small { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) {
  .gsearch { order: 2; flex: 1 1 100%; min-width: 0; }
}

/* Event cards on the Events home reuse .show-card / .folder-card; event pages are sections by day. */
.evp-head h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.evp-day { margin: 0 0 22px; padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--panel) 55%, transparent); }
.evp-day.today { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.evp-day.whole { border-style: dashed; }
.evp-day-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.evp-day-head h2 { margin: 0; font-size: 16px; font-family: var(--display); letter-spacing: -.01em; }
.evp-empty { margin: 0; }
.evp-docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 12px; }
.evp-pair { grid-column: span 2; display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: stretch; }
.evp-link { align-self: center; color: var(--faint); font-size: 16px; }
@media (max-width: 760px) {
  .evp-pair { grid-column: auto; grid-template-columns: 1fr; }
  .evp-link { justify-self: center; transform: rotate(90deg); line-height: 1; }
  .evp-day { padding: 12px; }
}
.evp-doc { padding: 14px; display: flex; flex-direction: column; min-width: 0; }
.evp-doc h3 { margin: 4px 0 2px; overflow-wrap: anywhere; }
.evp-doc .card-foot { margin-top: auto; padding-top: 12px; }
.evp-doc .progress { margin-top: 10px; }
.evp-kind { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 700; letter-spacing: .12em; color: var(--muted); }
.evp-kind-ic { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; font-size: 11px; letter-spacing: 0; color: var(--accent-ink); background: var(--grad); }
.evp-show .evp-kind-ic { background: var(--pass); }
.evp-brief .evp-kind-ic { background: var(--info); }
.evp-arch { margin: 8px 0 0; }
.evp-arch .evp-docs { margin-top: 12px; opacity: .8; }

/* Crew Brief page */
.brief-head h1 { margin: 6px 0 4px; }
.brief-title-input { font: inherit; font-size: inherit; font-weight: inherit; width: 100%; max-width: 760px; padding: 2px 6px; margin-left: -6px; }
.brief-meta { gap: 10px; align-items: center; }
.pill-btn { border: 0; background: transparent; padding: 0; cursor: pointer; color: var(--muted); font: inherit; font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.brief-sheet { max-width: 860px; padding: 22px 26px; }
.brief-body.rd-rich { max-height: none; min-height: 360px; font-size: 15px; line-height: 1.6; padding: 10px 12px; }
.brief-body-ro { font-size: 15px; line-height: 1.65; }
.brief-hint { margin: 10px 0 0; }
.crew-brief-link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 0 0 8px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--text); }
.crew-brief-link:hover { border-color: var(--line-2); background: var(--panel-2); }
.crew-brief-link small { display: block; color: var(--muted); font-size: 12px; }
.crew-brief-link .evp-kind-ic { background: var(--info); }

/* Crew Brief link guests (/b/<token>): one readable sheet, phone first */
.brief-guest { max-width: 820px; margin: 0 auto; padding: 24px 16px 48px; }
.brief-guest .brief-sheet { max-width: none; padding: 26px 28px; }
.brief-guest .brief-sheet h1 { margin: 8px 0 6px; font-family: var(--display); font-size: 28px; line-height: 1.2; text-wrap: balance; overflow-wrap: anywhere; }
.brief-guest-meta { margin: 0 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.brief-guest .brief-body-ro { font-size: 16px; overflow-wrap: anywhere; }
.brief-guest-foot { text-align: center; margin-top: 16px; }
@media (max-width: 760px) {
  .brief-guest-bar { flex-wrap: nowrap; padding: 8px 12px; }
  .brief-guest { padding: 14px 10px 36px; }
  .brief-guest .brief-sheet { padding: 18px 16px; border-radius: 12px; }
  .brief-guest .brief-sheet h1 { font-size: 23px; }
  .brief-sheet { padding: 16px; }
}
@media print {
  .brief-sheet { border: 0; box-shadow: none; padding: 0; max-width: none; }
  .gsearch, .brief-hint { display: none !important; }
}

/* A field the form shows only when needed (e.g. "New event name"). */
.field[hidden] { display: none; }
@media (max-width: 760px) { .brief-head h1 { font-size: 22px; } }

/* ===================================================================================================================
   Phase 11: the event is the single source of truth. The document switcher, Event details, "Still to fill in", the
   wizard, the crew editor and directory, share links with picks, Call Sheets, and the guest event page.
   =================================================================================================================== */
:root { --k-rundown: var(--accent); --k-brief: var(--info); --k-callsheet: #8B5CF6; --k-show: var(--pass); }
.pill.info { color: var(--info); border-color: rgba(59, 130, 246, .4); }
.pill.ev-status { cursor: help; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.linkish { border: 0; background: none; padding: 0; color: var(--accent-hi); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.evp-kind-ic.k-rundown { background: var(--grad); } .evp-kind-ic.k-brief { background: var(--k-brief); } .evp-kind-ic.k-callsheet { background: var(--k-callsheet); } .evp-kind-ic.k-show { background: var(--k-show); }
.evp-callsheet .evp-kind-ic { background: var(--k-callsheet); }

/* ---- document switcher (#22) ---- */
.docnav { margin: 0 0 14px; padding: 8px 10px 0; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--panel) 70%, transparent); }
.docnav-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 32px; }
.docnav-ev { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--text); min-width: 0; }
.docnav-ev b { font-family: var(--display); font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }
.docnav-ev:hover b { text-decoration: underline; text-underline-offset: 3px; }
.docnav-day select { height: 30px; width: auto; max-width: 260px; }
.docnav-tabs { display: flex; gap: 2px; margin-top: 6px; overflow-x: auto; scrollbar-width: none; }
.docnav-tabs::-webkit-scrollbar { display: none; }
.docnav-tab { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px 10px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 13px; border-radius: 8px 8px 0 0; white-space: nowrap; }
.docnav-tab:hover { color: var(--text); background: var(--row-hover); }
.docnav-tab.on { color: var(--text); }
.docnav-tab.on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--grad); }
.docnav-tab.empty { color: var(--faint); }
.docnav-tab .count { margin-left: 0; }
.docnav-ic { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; font-size: 11px; color: #fff; background: var(--line-2); }
.docnav-tab[data-kind="rundown"] .docnav-ic { background: var(--k-rundown); } .docnav-tab[data-kind="brief"] .docnav-ic { background: var(--k-brief); }
.docnav-tab[data-kind="callsheet"] .docnav-ic { background: var(--k-callsheet); } .docnav-tab[data-kind="show"] .docnav-ic { background: var(--k-show); }
.docnav-tab.empty .docnav-ic { opacity: .45; }
.docnav-plus { font-weight: 700; color: var(--faint); }
.docnav-phone { display: none; }
.docnav-hint { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); padding: 2px 4px 2px 10px; border: 1px dashed var(--line-2); border-radius: 99px; }
.docnav-hint a { color: var(--accent-hi); text-decoration: none; font-weight: 600; }
.docnav-hint a:hover { text-decoration: underline; }
.page-rd .docnav { margin-bottom: 10px; }
@media (max-width: 760px) {
  .docnav { padding: 8px; }
  .docnav-tabs { display: none; }
  .docnav-phone { display: block; width: 100%; margin-top: 8px; height: 36px; }
  .docnav-day { flex: 1 1 100%; } .docnav-day select { width: 100%; max-width: none; }
  .docnav-hint { flex: 1 1 100%; justify-content: space-between; }
}
.slot-empty { max-width: 640px; padding: 26px 28px; }
.slot-empty h2 { font-family: var(--display); margin: 10px 0 6px; }

/* ---- the event page: details card and "Still to fill in" ---- */
.evd-top { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 12px; margin: 0 0 18px; align-items: start; }
.evd-top > :only-child { grid-column: 1 / -1; }
.evd-card { position: relative; padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; }
.art-frame.evd-art { width: 96px; height: 96px; }
.evd-facts { display: flex; flex-wrap: wrap; gap: 10px 22px; flex: 1 1 320px; min-width: 0; }
.evd-facts span { display: flex; flex-direction: column; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.evd-facts small { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.evd-facts a { color: var(--accent-hi); }
.miss-card { padding: 12px 14px; border-style: dashed; background: color-mix(in srgb, var(--panel) 60%, transparent); }
.miss-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.miss-list { display: flex; flex-wrap: wrap; gap: 6px; }
.miss-item { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px; font-size: 12px; text-decoration: none; color: var(--text); background: var(--panel); }
.miss-item span { color: var(--faint); }
.miss-item:hover { border-color: var(--line-2); background: var(--row-hover); }
.evp-times { font-variant-numeric: tabular-nums; }
.evp-addday { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -6px 0 22px; }
@media (max-width: 900px) { .evd-top { grid-template-columns: 1fr; } }

/* ---- Event details page ---- */
.evd-page { max-width: 1080px; }
.evd-sec { padding: 16px 18px; margin: 0 0 14px; scroll-margin-top: 80px; }
.evd-sec > h2 { font-family: var(--display); font-size: 16px; margin: 0 0 12px; }
.evd-sec > summary { cursor: pointer; font-weight: 600; }
.evd-links { display: flex; flex-direction: column; gap: 6px; }
.evd-link { display: grid; grid-template-columns: 140px minmax(0, 180px) minmax(0, 1fr) 34px 34px; gap: 6px; align-items: center; }
.evd-pend { text-align: center; }
.evd-add { margin-top: 6px; }
.evd-mode { width: max-content; }
.evd-days { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.evd-day { display: grid; grid-template-columns: 180px minmax(0, 1fr) 132px 132px 132px 34px; gap: 8px; align-items: center; }
.evd-day-h { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.evd-dn { display: flex; align-items: center; gap: 8px; }
.evd-dn input { width: 130px; }
.evd-brand { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.evd-brand .field-l { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; } /* Phase 13: like every other field label */
.syn-time.sm .syn-time-in { height: 36px; font-size: 12px; } /* Phase 13: the same height as the inputs beside it (was 30px) */
@media (max-width: 900px) {
  .evd-link { grid-template-columns: 1fr 1fr 34px 34px; }
  .evd-link .evd-url { grid-column: 1 / -1; grid-row: 2; }
  .evd-day { grid-template-columns: 1fr 1fr; }
  .evd-day-h { display: none; }
  .evd-day > span:first-child { grid-column: 1 / -1; }
  .evd-day { padding: 8px 0; border-bottom: 1px solid var(--line); }
  .evd-brand { grid-template-columns: 1fr; }
  /* Phase 13: the column heads are hidden here, so each time says what it is */
  .evd-day [data-hub-daytime]::before { display: block; margin-bottom: 3px; font-size: 11px; color: var(--muted); }
  .evd-day [data-hub-daytime="crew_call"]::before { content: "Crew call"; }
  .evd-day [data-hub-daytime="show_start"]::before { content: "Show start"; }
  .evd-day [data-hub-daytime="planned_end"]::before { content: "Planned end"; }
  .evd-day > span:last-child:not(:first-child) { align-self: end; }
}

/* ---- crew editor (Event details, call sheet) ---- */
.crew-ed { display: flex; flex-direction: column; gap: 14px; }
.crew-dept-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.crew-rows { display: flex; flex-direction: column; gap: 4px; }
.crew-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 130px 180px 150px 34px; /* room for the AUTO tag */ gap: 6px; align-items: center; }
.crew-rows.all .crew-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 130px 116px 180px 150px 34px; }
.crew-h { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.crew-row.open [data-cf="name"] { border-style: dashed; border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); }
.crew-row > span { min-width: 0; overflow-wrap: anywhere; }
.crew-add { margin-top: 4px; }
/* Phase 15: the ⋮⋮ drag handle on the left of each row (editors); the row being dragged dims, a line shows where it lands */
.crew-rows.ed .crew-row { grid-template-columns: 18px minmax(0, 1fr) minmax(0, 1.2fr) 130px 180px 150px 34px; }
.crew-rows.ed.all .crew-row { grid-template-columns: 18px minmax(0, 1fr) minmax(0, 1.2fr) 130px 116px 180px 150px 34px; }
.crew-drag { width: 18px; height: 28px; padding: 0; border: 0; border-radius: 5px; background: none; color: var(--faint); font-size: 12px; letter-spacing: -2px; line-height: 1;
  cursor: grab; touch-action: none; user-select: none; }
.crew-drag:hover, .crew-drag:focus-visible { color: var(--text); background: color-mix(in srgb, var(--text) 8%, transparent); }
.crew-row.crew-dragging { opacity: .4; }
.crew-drop-ind .lbl:empty { display: none; }
@media print { .crew-drag { display: none; } }
@media (max-width: 760px) {
  /* Phase 14: two columns (position | name, then day / department | call); the ✕ sits at the end */
  .crew-row, .crew-rows.all .crew-row { grid-template-columns: 1fr 1fr; padding: 8px 0; border-bottom: 1px solid var(--line); row-gap: 10px; }
  .crew-row > span:nth-child(3) { display: none; }
  /* Phase 15: the handle sits in the left margin, so the fields keep their two columns */
  .crew-rows.ed .crew-row, .crew-rows.ed.all .crew-row { grid-template-columns: 1fr 1fr; position: relative; padding-left: 24px; }
  .crew-rows.ed .crew-row > span:nth-child(3) { display: revert; }
  .crew-rows.ed .crew-row > span:nth-child(4) { display: none; }
  .crew-drag { position: absolute; left: 0; top: 10px; }
  .crew-row > span:last-child { grid-column: 1 / -1; justify-self: end; margin-top: -6px; }
  .crew-h { display: none; }
}

/* ---- share links with picks ---- */
.lk-list { display: flex; flex-direction: column; gap: 10px; }
.lk { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--panel-2); }
.lk-top { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 8px; align-items: center; }
.lk-label { font-weight: 600; }
.lk-url { margin: 0; }
.lk-picks, .lk-days { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; }
.lk-days { padding-top: 6px; border-top: 1px dashed var(--line); }
.lk-acts { margin-top: 8px; }
@media (max-width: 760px) { .lk-top { grid-template-columns: 1fr; } }

/* ---- the wizard ---- */
.wz-dots { display: flex; gap: 6px; margin: -4px 0 14px; }
.wz-dots i { width: 22px; height: 4px; border-radius: 4px; background: var(--line-2); }
.wz-dots i.done { background: color-mix(in srgb, var(--accent) 55%, var(--line-2)); }
.wz-dots i.on { background: var(--grad); width: 34px; }
.wz-days { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.wz-day { display: grid; grid-template-columns: 52px 150px repeat(3, minmax(0, 1fr)) 34px; gap: 8px; align-items: end; }
.wz-day > b { align-self: center; }
.wz-day label { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.wz-day small { font-size: 11px; color: var(--muted); }
.wz-links { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.wz-link { display: grid; grid-template-columns: 110px minmax(0, 160px) minmax(0, 1fr) 34px; gap: 6px; align-items: center; }
.wz-docs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 220px); gap: 10px 14px; align-items: center; }
.wz-docs .check { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.wz-copy { margin-top: 10px; text-align: left; white-space: normal; height: auto; padding: 8px 10px; }
@media (max-width: 760px) {
  .wz-day { grid-template-columns: 1fr 1fr; }
  .wz-day > b, .wz-day > input { grid-column: span 1; }
  .wz-link { grid-template-columns: 1fr 34px; }
  .wz-link > b { grid-column: 1 / -1; }
  .wz-docs { grid-template-columns: 1fr; }
}

/* ---- the crew directory ---- */
.crewdir { padding: 4px 0; overflow-x: auto; }
.cd-row { display: grid; grid-template-columns: minmax(150px, 1.2fr) minmax(130px, 1fr) 140px 130px 180px 130px minmax(120px, 1fr) 124px; gap: 6px; align-items: center; padding: 5px 12px; min-width: 1120px; } /* Phase 14: + Department */
.cd-h { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.cd-row > span { min-width: 0; }
/* The Team pill sits beside the name, not under it, so every row keeps the same height. */
.cd-name { display: flex; align-items: center; gap: 6px; }
.cd-name > .input { flex: 1; min-width: 0; }
.cd-name > .pill { flex: none; }
@media (max-width: 760px) {
  .cd-row { min-width: 0; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); padding: 8px 12px; }
  .cd-h { display: none; }
  .cd-row > .cd-name, .cd-row > .cd-acts { grid-column: 1 / -1; } /* Phase 13: the full name on its own line; actions at the end */
  .cd-acts { text-align: right; }
}

/* ---- crew brief: tools, event details in the text, the crew list ---- */
.brief-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 8px; }
.var-menu button { display: flex; align-items: baseline; gap: 10px; justify-content: space-between; }
.var-menu code { font-size: 11px; }
.var-menu .faint { font-size: 11px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brief-crew { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.brief-crew h3 { margin: 0 0 8px; font-family: var(--display); font-size: 15px; }
.bc-dept { margin: 0 0 10px; }
.bc-dept > b { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.bc-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .8fr) 80px; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.bc-row > span { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 760px) { .bc-row { grid-template-columns: 1fr 1fr; } }

/* ---- follow chips ---- */
.fw-chip { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 1px 8px; border-radius: 99px; font-size: 11px; border: 1px solid var(--line); color: var(--muted); background: var(--panel-2); white-space: nowrap; }
.fw-chip.off { border-style: dashed; }
.fw-chip.warn { color: var(--warn); border-color: rgba(245, 158, 11, .45); }
.ev-follow-note { margin-top: 4px; }

/* ---- search: an icon on phones ---- */
.gsearch-btn { display: none; }
@media (max-width: 760px) {
  .gsearch-btn { display: inline-flex; }
  .gsearch { display: none; }
  .gsearch.open { display: flex; order: 2; flex: 1 1 100%; }
}

/* ---- the guest event page: by day, every kind of document ---- */
.ev-dayh { padding: 12px 18px 4px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); border-top: 1px solid var(--line); }
.ev-dayh:first-of-type { border-top: 0; }
.ev-kindl { display: block; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.ev-row > .evp-kind-ic { flex: none; width: 30px; height: 30px; border-radius: 9px; font-size: 13px; }

/* ---- Call Sheets ---- */
.cs-pagehead { margin-bottom: 12px; }
.cs-crewedit { padding: 14px 16px; margin: 0 0 14px; }
.cs-sheet { max-width: 980px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
/* The header band uses the site's own theme: its surfaces (dark or light) with the AMG accent bar along the top,
   the same red-to-orange gradient as the top bar and tabs. It prints on white with only the thin accent bar in color. */
.cs-band { position: relative; display: flex; align-items: center; gap: 18px; padding: 20px 22px 18px; color: var(--text);
  background: linear-gradient(120deg, var(--panel-2), color-mix(in srgb, var(--panel-2) 82%, var(--accent))); border-bottom: 1px solid var(--line); }
.cs-band::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--grad); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.cs-brand { display: flex; align-items: center; }
.cs-logo { max-height: 44px; max-width: 160px; }
.cs-mark { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 20px; letter-spacing: .06em; }
.cs-mark .amg-mark { width: 34px; height: 34px; }
.cs-head { min-width: 0; }
.cs-kicker { font-size: 11px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--accent-hi); }
:root[data-theme="light"] .cs-kicker { color: var(--accent); }
.cs-head h1 { margin: 2px 0; font-family: var(--display); font-size: 26px; line-height: 1.15; overflow-wrap: anywhere; color: var(--text); }
.cs-date { font-weight: 600; color: var(--muted); }
.cs-strip { display: grid; grid-template-columns: 1.2fr 1.2fr 1fr; border-bottom: 1px solid var(--line); }
.cs-cell { padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; border-right: 1px solid var(--line); }
.cs-cell:last-child { border-right: 0; }
.cs-cell > small { font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cs-links { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.cs-links a { color: var(--accent-hi); font-weight: 600; text-decoration: none; }
.cs-links a:hover { text-decoration: underline; }
.cs-time b { font-size: 22px; }
.cs-time .small { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.cs-ov { border: 1px dashed var(--line-2); background: none; color: var(--warn); font-size: 11px; border-radius: 99px; padding: 1px 8px; cursor: pointer; width: max-content; }
.cs-set { height: 22px; min-width: 22px; }
.art-frame.cs-keyart { width: 100%; aspect-ratio: 16 / 9; max-height: 340px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.cs-dept { padding: 14px 18px 4px; }
.cs-dept h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-hi); }
.cs-dept h3::before { content: ''; width: 3px; height: 12px; border-radius: 2px; background: var(--grad); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
:root[data-theme="light"] .cs-dept h3 { color: color-mix(in srgb, var(--accent) 78%, var(--text)); }
.cs-tbl { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.cs-tbl col.c-pos { width: 30%; } .cs-tbl col.c-name { width: 28%; } .cs-tbl col.c-disc { width: 24%; } .cs-tbl col.c-call { width: 18%; }
.cs-tbl th:last-child, .cs-tbl td:last-child { text-align: right; }
.cs-tbl th { text-align: left; font-size: 11px; font-weight: 700; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line-2); }
.cs-tbl td { padding: 7px 8px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.cs-tbl tr.open td { color: var(--muted); }
.cs-tbl td.mono { white-space: nowrap; }
.cs-empty { padding: 16px 18px; color: var(--muted); margin: 0; }
.cs-notes-sec { padding-bottom: 16px; }
.cs-notes-ed { max-height: none; min-height: 70px; }
.cs-hint { margin-top: 10px; }
.cs-guest { max-width: 1000px; margin: 0 auto; padding: 18px 16px 48px; }
.cs-guest-top { justify-content: space-between; margin: 0 0 10px; }
.cs-tz button { white-space: nowrap; }
@media (max-width: 760px) {
  .cs-band { flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; }
  .cs-head h1 { font-size: 21px; }
  .cs-strip { grid-template-columns: 1fr; }
  .cs-cell { border-right: 0; border-bottom: 1px solid var(--line); }
  .cs-dept { padding: 12px 12px 4px; }
  .cs-tbl { font-size: 12px; }
  .cs-tbl th, .cs-tbl td { padding: 6px 4px; }
  .cs-guest { padding: 10px 8px 36px; }
  .cs-tz { width: 100%; } .cs-tz button { flex: 1; font-size: 12px; padding: 0 6px; }
}
@media print {
  .docnav, .cs-pagehead, .cs-crewedit, .cs-hint, .cs-set, .cs-ov, .gsearch-btn, .evd-top { display: none !important; }
  .cs-sheet { max-width: none; border: 0; border-radius: 0; }
  .cs-band { padding: 14px 14px 12px; background: #fff; color: #000; border-bottom: 1px solid #ccc; }
  .cs-kicker, .cs-dept h3 { color: #B81E3C !important; }
  .cs-strip { border: 1px solid #ccc; }
  .cs-tbl td, .cs-tbl th { border-color: #ccc; }
  .cs-dept { break-inside: avoid; }
  .cs-keyart { max-height: 200px; }
  .cs-guest { padding: 0; }
  .cs-notes-ed { border: 0 !important; }
}
.evd-facts .evd-inl { font-style: normal; display: block; }
.cs-tline { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cs-time .cs-tline.small b { font-size: 14px; }
.crew-ed > .btn, .crew-dept > .btn { align-self: flex-start; }
.crew-dept { display: flex; flex-direction: column; }
@media (max-width: 760px) {
  /* Phase 11: the top bar keeps to two rows on phones (icons and your chip, then the nav); page titles get the full width. */
  .topbar { gap: 6px; }
  .topbar .role-tag { display: none; }
  .topbar .user-chip { padding: 3px; }
  .page-head > .grow { flex: 1 1 100%; }
}
.docnav-tab[data-kind="details"] .docnav-ic { background: var(--muted); }

/* ---- Autosave status and two people editing at once (Event details, crew editor, crew directory, briefs, call sheets) ---- */
.save-st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; min-height: 26px; }
.save-st[data-state="saved"] { color: var(--pass); }
.save-st[data-state="saved"] .faint { color: var(--muted); }
.save-st[data-state="failed"] { color: var(--fail); font-weight: 600; }
.save-st[data-state="conflict"] { color: var(--warn); white-space: normal; }
.save-st-ic { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: currentColor; color: var(--panel); font-size: 11px; font-weight: 800; }
.save-st[data-state="failed"] .save-st-ic { background: var(--fail); } .save-st[data-state="conflict"] .save-st-ic { background: var(--warn); }
.save-st-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: blink 1s infinite; }
.save-st .btn { height: 24px; padding: 0 10px; }
.evd-head { align-items: flex-start; }
.evd-save { padding-top: 10px; flex: none; }
.brief-meta .save-st { margin-left: auto; }
.rx-upd { outline: 2px solid color-mix(in srgb, var(--info) 70%, transparent); outline-offset: 1px; background: color-mix(in srgb, var(--info) 10%, var(--panel)) !important; transition: outline-color .6s, background .6s; }
.rx-mine { border-color: var(--warn) !important; }
.rx-conflict { grid-column: 1 / -1; margin: 4px 0 2px; padding: 5px 9px; border-radius: 8px; font-size: 12px; line-height: 1.4; color: var(--text);
  background: var(--warn-bg); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); overflow-wrap: anywhere; }
.rx-acts { display: inline-flex; gap: 6px; align-items: center; margin-left: 4px; white-space: nowrap; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent-hi); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
:root[data-theme="light"] .linkbtn { color: var(--accent); }
.crew-pend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 4px; padding: 5px 8px; border-radius: 8px; font-size: 12px; color: var(--text);
  background: var(--warn-bg); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); }
.crew-pend .btn { height: 24px; padding: 0 8px; }
.crew-pend .btn.icon { width: 24px; padding: 0; }
.team-tabs { margin-top: 4px; }
.cd-acts { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; white-space: nowrap; }
@media print { .save-st, .rx-conflict, .crew-pend { display: none !important; } .rx-upd { outline: 0; background: none !important; } }
@media (max-width: 760px) { .crew-row > span:has(.crew-pend) { grid-column: 1 / -1; } }
/* ---- Event page: drag a document onto a day; a fresh duplicate or a moved card lights up for a moment ---- */
.evp-doc[draggable="true"] { cursor: grab; }
.evp-doc[draggable="true"] .card-link { cursor: pointer; }
.evp-doc.dragging { opacity: .45; }
.evp-dragging .evp-day[data-ev-drop] { transition: border-color .15s, background .15s; }
.evp-dragging .evp-day[data-ev-drop]:not(.drop-on) { border-style: dashed; }
.evp-day.drop-on { border-color: var(--accent); border-style: solid; background: color-mix(in srgb, var(--accent) 8%, var(--panel)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.evp-hl { box-shadow: 0 0 0 2px var(--accent), 0 0 24px -6px var(--glow); transition: box-shadow .4s; }
@media (hover: none) { .evp-doc[draggable="true"] { cursor: auto; } }
/* ---- Crew Brief: the text on the left, the crew on the right (stacked on phones and narrow windows) ---- */
.brief-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 16px; align-items: start; max-width: 1240px; }
.brief-cols.one { grid-template-columns: minmax(0, 1fr); }
.brief-cols .brief-sheet { max-width: none; }
.brief-side { padding: 16px 18px; position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow: auto; }
.brief-side .brief-crew { margin: 0; padding: 0; border: 0; }
.brief-crew-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.brief-crew-h h3 { margin: 0; }
.brief-side .bc-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 0; }
.brief-side .bc-row > span:nth-child(3), .brief-side .bc-row > span:nth-child(4) { font-size: 12px; color: var(--muted); }
.brief-guest .brief-cols { max-width: none; }
@media (max-width: 980px) { .brief-cols { grid-template-columns: minmax(0, 1fr); } .brief-side { position: static; max-height: none; } }
@media print { .brief-cols { display: block; } .brief-side { position: static; max-height: none; overflow: visible; border: 0; padding: 0; margin-top: 16px; } }
.brief-guest:has(.brief-side) { max-width: 1200px; }

/* ---- Phase 12: one Share (view-only) dialog; the simple run of show; an event link's tabs ---- */
.lk-top { display: flex; flex-wrap: wrap; }
.lk-top .lk-label { width: 200px; flex: 0 0 200px; }
.lk-top .lk-url { flex: 1 1 260px; min-width: 0; }
.lk-intro { margin-top: 0; }
.lk-new { border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); border-radius: 10px; padding: 12px 14px; background: color-mix(in srgb, var(--accent) 5%, var(--panel-2)); margin-bottom: 14px; }
.lk-new h4, .lk-h { margin: 0 0 8px; font-size: 14px; }
.lk-new .lk-for { max-width: 340px; margin-bottom: 0; }
.lk-new .row { margin-top: 10px; }
.lk-l { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); min-width: 44px; align-self: center; }
.lk-all { font-weight: 600; }
.lk.fresh { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.lk-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--fail-bg); font-size: 13px; }
.lk-confirm > span { flex: 1 1 240px; }
.lk-old { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; padding: 10px 12px; border: 1px dashed var(--line-2); border-radius: 10px; }
.lk-sum { display: flex; flex-direction: column; gap: 6px; margin: 0 0 12px; }
.lk-sum-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); }
.docnav-share { margin-left: 4px; }
.docnav-simple { white-space: nowrap; }
.rd-simple-head { display: flex; align-items: center; gap: 16px; padding: 16px 18px; margin-bottom: 14px; flex-wrap: wrap; }
.rd-simple-t { flex: 1 1 320px; min-width: 0; }
.rd-simple-t h1 { margin: 6px 0 4px; font-size: 24px; letter-spacing: -.01em; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rd-full-btn { height: 46px; padding: 0 20px; font-size: 15px; font-weight: 700; background: var(--grad); border-color: transparent; color: var(--accent-ink);
  box-shadow: 0 10px 28px -14px var(--glow); }
.rd-full-btn:hover { filter: brightness(1.08); color: var(--accent-ink); }
.rd-simple-air { position: static; }
.mini-row.next { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.mini-next { margin-left: 6px; font-size: 10px; vertical-align: 1px; color: var(--accent-hi); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
@media (max-width: 760px) {
  .rd-full-btn { width: 100%; justify-content: center; }
  .lk-top .lk-label { flex: 1 1 100%; width: auto; }
  .docnav-share, .docnav-simple { flex: 1 1 auto; justify-content: center; }
}
/* An event link's documents share one width (the overview stays a narrow list). */
.page.page-evdoc, .brief-guest.page-evdoc, .brief-guest.page-evdoc:has(.brief-side), .cs-guest.page-evdoc { max-width: 1200px; }
.rd-simple-head .meta-line { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 13px; }
.rd-simple-head .meta-line > span + span::before { content: '·'; margin-right: 14px; color: var(--faint); }
.modal.wide:has(.lk-dialog) { max-width: 780px; }

/* ---- Phase 13: artwork in any shape (1:1, 16:9, 9:16) shows whole, over a blurred, dimmed copy of itself ---- */
.art-frame { position: relative; display: grid; place-items: center; flex: none; overflow: hidden; isolation: isolate; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px; }
.art-frame::before { content: ''; position: absolute; inset: -18px; z-index: -1; background: var(--art) center / cover no-repeat; filter: blur(16px) brightness(.5) saturate(1.15); }
.art-frame img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.art-frame.ev-tile { width: 88px; height: 88px; }
@media (max-width: 760px) { .art-frame.ev-tile, .logo-plate.ev-tile { width: 72px; height: 72px; } }
@media print { .art-frame::before { display: none; } .art-frame { background: none; } }

/* ---- Phase 13: upload boxes (drop or click, with a preview, Replace and Remove) ---- */
.upl { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; min-width: 0; }
.upl-zone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 100%; min-height: 166px; padding: 16px;
  border: 1.5px dashed var(--line-2); border-radius: 12px; background: color-mix(in srgb, var(--panel-2) 55%, transparent); cursor: pointer; transition: border-color .12s, background .12s; }
.upl-zone:hover, .upl-zone.over, .upl-zone:focus-within { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--panel)); }
.upl-zone.has { padding: 8px; border-style: solid; }
.upl-zone b { font-size: 13px; }
.upl-in { position: absolute; inset: auto; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upl-ic { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 4px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--panel); color: var(--accent-hi); font-size: 16px; }
.art-frame.upl-art { width: 100%; height: 150px; }
.logo-plate.upl-logo { width: 100%; max-width: 260px; height: 150px; padding: 14px; }
.upl-acts { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; max-width: 100%; }
.upl-name { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upl-hint { margin: 0; max-width: 360px; line-height: 1.45; }
.upl-empty { display: block; padding: 10px 0; }
.evd-brand .field-l .faint, .wz-brand .field-l .faint { font-weight: 500; text-transform: none; letter-spacing: 0; }

/* ---- Phase 13: a suggested time (crew call ↔ show start): dimmed, tagged on its border, until typed over ---- */
.syn-time[data-suggested] .syn-time-in { color: var(--muted); font-style: italic; border-style: dashed; }
.syn-time[data-suggested]::after { content: 'suggested'; position: absolute; top: -7px; right: 8px; padding: 0 4px; border-radius: 4px; background: var(--panel); color: var(--accent-hi);
  font-size: 9px; font-weight: 800; line-height: 13px; letter-spacing: .08em; text-transform: uppercase; pointer-events: none; }
.wz-day-foot { gap: 10px; }

/* Phase 13b: a warning word inline (an outdated bridge) */
.warn-text { color: var(--warn); font-weight: 700; }

/* ---- Phase 14: auto-filled values (AUTO tag on the field's border) and "reset to auto" once typed over ---- */
.autof { position: relative; display: block; min-width: 0; }
.autof > .input, .autof > .select, .autof > .syn-time { width: 100%; max-width: none; }
.autof.is-auto > .input, .autof.is-auto > .select, .autof.is-auto .syn-time-in { color: var(--muted); border-style: dashed; }
/* The AUTO tag and the reset button sit inside the field, on its right (left of a dropdown arrow), so they can't be
   mistaken for the row above. */
.autof.is-auto::after { content: 'auto'; position: absolute; top: 50%; right: 8px; transform: translateY(-50%); padding: 0 4px; border-radius: 4px;
  background: color-mix(in srgb, var(--info) 14%, transparent); color: var(--info);
  font-size: 9px; font-weight: 800; line-height: 14px; letter-spacing: .08em; text-transform: uppercase; pointer-events: none; }
.cs-ov.auto-ov { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); z-index: 1; width: 22px; height: 22px; padding: 0;
  display: inline-grid; place-items: center; font-size: 13px; line-height: 1; border-radius: 6px; background: var(--panel); }
.autof:has(> .select)::after, .autof:has(> .syn-time)::after { right: 30px; }
.autof:has(> .select) > .cs-ov.auto-ov, .autof:has(> .syn-time) > .cs-ov.auto-ov { right: 30px; }
.autof.is-auto > .input, .autof:has(> .cs-ov) > .input { padding-right: 48px; }
.autof.is-auto > .select, .autof:has(> .cs-ov) > .select { padding-right: 66px; }
.autof.is-auto .syn-time-in, .autof:has(> .cs-ov) .syn-time-in { padding-right: 66px; }
.cs-ov.auto-ov:hover { color: var(--text); border-color: var(--warn); }
@media print { .autof.is-auto::after, .cs-ov.auto-ov { display: none; } }
/* the finish-your-profile nudge (once per session, never blocking) */
.profile-nudge { position: fixed; left: 16px; bottom: 16px; z-index: 300; max-width: 360px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--panel); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; }
.profile-nudge b { font-family: var(--display); }
.profile-nudge .row { gap: 6px; flex-wrap: wrap; }
@media (max-width: 760px) { .profile-nudge { left: 8px; right: 8px; bottom: 8px; max-width: none; } }
.match-box { margin: 0 0 12px; }
.match-box label { display: flex; gap: 8px; align-items: flex-start; margin-top: 6px; }
.call-offsets { display: grid; grid-template-columns: minmax(0, 1fr) 160px 150px; gap: 6px 10px; align-items: center; }
.call-offsets .co-h { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
@media (max-width: 760px) { .call-offsets { grid-template-columns: 1fr 1fr; } .call-offsets > .co-name { grid-column: 1 / -1; font-weight: 600; } .call-offsets .co-h { display: none; } }

/* Phase 14: the admin Team table scrolls sideways on narrow screens instead of squeezing every field */
.team-tbl { min-width: 1180px; }
.call-offsets + .row .btn { flex: none; }

/* Phase 16: portrait desktop monitors (1080x1920, 1200x1920). Everything below sits inside an orientation query, so
   landscape screens and phones are untouched. The checklist rows use two lines (task, PASS / FAIL, owner and due on
   the first; notes and who confirmed it under them), so the task gets the width and the page uses the height.
   1080-1180 px wide portrait screens used to get the stacked four-line card rows meant for small windows. From 1400 px
   (1440x2560) the page is as wide as the landscape design, which already fits, so it keeps the one-line table. */
@media (orientation: portrait) and (min-width: 900px) and (max-width: 1399px) {
  .grid-head, .item {
    grid-template-columns: 22px 26px minmax(0, 1fr) 118px minmax(150px, 190px) 92px 30px;
    grid-template-areas: 'drag star task status owner due del' '. . notes notes conf conf conf';
    padding: 0 12px;
  }
  .grid-head { display: grid; grid-template-areas: 'drag star task status owner due del'; }
  .grid-head > :nth-child(1) { grid-area: drag; } .grid-head > :nth-child(2) { grid-area: star; } .grid-head > :nth-child(3) { grid-area: task; }
  .grid-head > :nth-child(4) { grid-area: status; } .grid-head > :nth-child(5) { grid-area: owner; } .grid-head > :nth-child(7) { grid-area: due; }
  .grid-head > :nth-child(9) { grid-area: del; }
  .grid-head > :nth-child(6), .grid-head > :nth-child(8) { display: none; }
  .item { row-gap: 0; padding-top: 5px; padding-bottom: 5px; }
  .item > .c-drag { grid-area: drag; } .item > .c-star { grid-area: star; } .item > .c-task { grid-area: task; } .item > .c-status { grid-area: status; }
  .item > .c-owner { grid-area: owner; } .item > .c-due { grid-area: due; position: static; } .item > .c-del { grid-area: del; position: static; }
  .item > .c-notes { grid-area: notes; min-width: 0; } .item > .c-confirmed { grid-area: conf; min-width: 0; }
  .item > .c-notes .cell-input { height: 28px; font-size: 12px; color: var(--muted); }
  .item > .c-notes .cell-input:focus { color: var(--text); }
  .item .confirmed { display: flex; gap: 6px; align-items: baseline; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .item .confirmed b { display: inline; }
  .item .confirmed > .faint { display: none; }
  .item .del { opacity: 0; }
  .item:hover .del, .item:focus-within .del { opacity: 1; }
  .editing-badge { top: 18px; transform: none; }
  /* The stats: three across, two rows, the GO / NO-GO card in the sixth cell. */
  .readiness { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .readiness .go-box { grid-column: auto; flex-wrap: wrap; row-gap: 8px; }
  .readiness .go-box > .row:last-child { margin-left: auto; }
  /* The header: the clocks stay on one line next to the title, a little smaller. */
  .show-head { gap: 14px; padding: 16px 18px; }
  .clocks { flex-wrap: nowrap; gap: 8px; }
  .clock { min-width: 112px; padding: 7px 10px; }
  .clock span { font-size: 19px; white-space: nowrap; }
  .toolbar .search { width: 180px; }
}
/* Narrow portrait screens: the top bar keeps to one line (the brand's tagline goes, the name doesn't wrap). */
@media (orientation: portrait) and (min-width: 900px) and (max-width: 1279px) {
  .topbar { gap: 12px; }
  .brand { flex: none; }
  .brand-text small { display: none; }
  .user-chip .uname { white-space: nowrap; }
}
