@import url("https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap");

:root {
  --canvas: #f7f7f5;
  --surface-1: #ffffff;
  --surface-2: #f3f3ef;
  --surface-3: #e8e8e2;
  --surface-stage: #fafaf8;
  --border: #e4e4df;
  --border-strong: #cfcfc8;
  --text-1: #111110;
  --text-2: #52524d;
  --text-3: #7c7c75;
  --gold: #9a6700;
  --gold-bright: #854d0e;
  --gold-soft: #fef9ec;
  --sem-green: #059669;
  --sem-amber: #d97706;
  --sem-red: #dc2626;
  --tt-ink: #0f766e;
  --ig-ink: #be185d;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --stage-scale: 1;
  --font-sans: "Figtree", "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--canvas);
  color: var(--text-1);
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, textarea, select {
  font-family: inherit;
}

button {
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, opacity 0.14s ease;
}

button:active {
  transform: translateY(0.5px);
}

.ico {
  flex-shrink: 0;
  vertical-align: middle;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.hidden {
  display: none !important;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(17, 17, 16, 0.14);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(17, 17, 16, 0.24);
}

/* ==================== BUTTONS & CONTROLS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 500;
  background: var(--surface-1);
  color: var(--text-1);
  border: 1px solid var(--border-strong);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover {
  background: var(--surface-2);
  border-color: #b8b8b0;
}
.btn-sm {
  height: 26px;
  padding: 0 8px;
  font-size: 11.5px;
  gap: 5px;
}
.btn-lg {
  height: 40px;
  padding: 0 16px;
  font-size: 13.5px;
}
.btn-primary {
  background: #111110;
  color: #ffffff;
  border-color: #111110;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.btn-primary:hover {
  background: #272725;
  border-color: #272725;
}
.btn-gold {
  background: #fef9ec;
  color: #854d0e;
  border-color: #e6c675;
  font-weight: 600;
}
.btn-gold:hover {
  background: #fdf2d6;
}
.btn-ready {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
  font-weight: 600;
}
.btn-ready:hover {
  background: #d1fae5;
}
.btn-danger {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}
.btn-danger:hover {
  background: #fee2e2;
}
.btn-ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--text-2);
}
.btn-ghost:hover {
  background: rgba(17, 17, 16, 0.05);
  color: var(--text-1);
}

.input, .textarea, .select {
  width: 100%;
  background: var(--surface-1);
  color: var(--text-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 12.5px;
  outline: none;
  transition: border-color 0.15s ease;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: #111110;
}
input[type="file"]::file-selector-button {
  background: var(--surface-2);
  color: var(--text-1);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 4px 10px;
  margin-right: 10px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
input[type="file"]::file-selector-button:hover {
  background: var(--surface-3);
}
.textarea {
  resize: vertical;
  line-height: 1.45;
}

/* ==================== TAGS & DOTS ==================== */
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  background: var(--text-3);
}
.dot-green { background: var(--sem-green); }
.dot-amber { background: var(--sem-amber); }
.dot-red { background: var(--sem-red); }
.dot-gold { background: #b45309; }
.dot-live {
  background: var(--sem-green);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.18);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 7px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text-2);
  white-space: nowrap;
}
.tag-tt { color: #0f766e; border-color: #99f6e4; background: #f0fdfa; }
.tag-ig { color: #be185d; border-color: #fbcfe8; background: #fdf2f8; }
.tag-vip { color: #854d0e; border-color: #f3d78a; background: #fef9ec; }
.tag-green { color: #047857; border-color: #a7f3d0; background: #ecfdf5; }
.tag-amber { color: #b45309; border-color: #fde68a; background: #fffbeb; }
.tag-red { color: #b91c1c; border-color: #fecaca; background: #fef2f2; }

/* ==================== PIN GATE ==================== */
.pin-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(247, 247, 245, 0.88);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.pin-box {
  width: 100%;
  max-width: 360px;
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}
.pin-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold-bright);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.pin-box h2 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.pin-box p {
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--text-2);
}
.pin-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--canvas);
  color: var(--text-1);
  font-family: var(--font-mono);
  font-size: 20px;
  text-align: center;
  letter-spacing: 10px;
  margin-bottom: 14px;
  outline: none;
}
.pin-input:focus {
  border-color: #111110;
}
.pin-error {
  color: #b91c1c;
  font-size: 12px;
  margin-top: 10px;
  min-height: 16px;
  text-align: center;
}

/* ==================== LAUNCHER PORTAL (/) ==================== */
.portal-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.portal-nav {
  height: 52px;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-1);
}
.portal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
}
.portal-main {
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  padding: 44px 24px 64px;
}
.portal-hero {
  border-bottom: 1px solid var(--border);
  padding-bottom: 28px;
  margin-bottom: 28px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.portal-hero h1 {
  margin: 8px 0 8px;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.portal-hero p {
  margin: 0;
  max-width: 620px;
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.55;
}
.portal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--border);
  gap: 1px;
  margin-bottom: 28px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}
.portal-tile {
  background: var(--surface-1);
  padding: 24px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  transition: background 0.15s ease;
}
.portal-tile:hover {
  background: var(--surface-stage);
}
.tile-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.08em;
}
.portal-tile h3 {
  margin: 8px 0 6px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.portal-tile p {
  margin: 0;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}
.portal-steps {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-1);
  padding: 20px 24px;
}
.portal-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 14px;
}
.step-item {
  border-left: 1px solid var(--border-strong);
  padding-left: 14px;
  font-size: 13px;
  color: var(--text-2);
}
.step-item strong {
  display: block;
  color: var(--text-1);
  margin-bottom: 4px;
  font-weight: 600;
}

/* ==================== OPERATOR BROADCAST DESK ==================== */
.op-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--canvas);
}

.op-topbar {
  min-height: 48px;
  padding: 6px 14px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.op-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}
.op-brand-title {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.op-telemetry {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 10px;
  border-left: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
  white-space: nowrap;
}
.op-telemetry span {
  white-space: nowrap;
}
.op-telemetry b {
  color: var(--text-1);
  font-weight: 600;
}

.ratio-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ratio-track {
  width: 56px;
  height: 5px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
  display: flex;
}
.ratio-econ { background: var(--sem-green); height: 100%; transition: width 0.25s ease; }
.ratio-pol { background: var(--sem-amber); height: 100%; transition: width 0.25s ease; }

.op-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

/* 3-Pane Structural Hairline Grid */
.op-grid {
  display: grid;
  grid-template-columns: 1.12fr 1.18fr 0.92fr;
  flex: 1;
  min-height: 0;
  background: var(--border);
  gap: 1px;
}

.op-pane {
  background: var(--surface-1);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.pane-head {
  height: 40px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
  background: var(--surface-1);
}
.pane-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-2);
}

.underline-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 100%;
}
.u-tab {
  height: 100%;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  border-bottom: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.u-tab:hover {
  color: var(--text-1);
}
.u-tab.active {
  color: var(--text-1);
  border-bottom-color: var(--text-1);
}

.pane-search {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-stage);
}

.pane-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

/* Comment Stream Rows */
.cmt-row {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background 0.12s ease;
}
.cmt-row:hover {
  background: var(--surface-stage);
}
.cmt-row.risk-green { border-left-color: var(--sem-green); }
.cmt-row.risk-yellow { border-left-color: var(--sem-amber); }
.cmt-row.risk-red { border-left-color: var(--sem-red); opacity: 0.72; }
.cmt-row.is-priority {
  background: #fefcf4;
  border-left-color: #b45309;
}
.cmt-row.is-live-stage {
  background: #f4f4f1;
}

.cmt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cmt-author {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-1);
}
.cmt-body {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-1);
}
.cmt-reason {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #b91c1c;
}
.cmt-foot {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  flex-wrap: wrap;
}

.pane-composer {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.composer-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

/* Center Pane: On-Air Tally & Staging */
.stage-monitor {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-stage);
}
.tally-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.tally-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
}
.tally-pill.on-air {
  color: #b91c1c;
}
.tally-pill.on-air .dot {
  background: var(--sem-red);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.16);
}

.staging-wrap {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.section-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.bullet-row {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 8px;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
}
.bullet-idx {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold);
  font-weight: 600;
  padding-top: 6px;
}

.dock-wrap {
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  flex-shrink: 0;
}
.dock-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  height: 36px;
  border-bottom: 1px solid var(--border);
}
.dock-body {
  padding: 10px 14px;
}

.lock-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 9px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 500;
  background: var(--surface-1);
  color: var(--text-2);
  border: 1px solid var(--border-strong);
}
.lock-chip.locked {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.vip-dock {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: var(--surface-stage);
  display: flex;
  flex-direction: column;
}
.vip-dock-head {
  padding: 7px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.vip-dock-list {
  padding: 8px 12px;
  max-height: 118px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Right Pane: VIP, Radar & Sparkline */
.right-block {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.vip-row {
  padding: 8px 10px;
  border: 1px solid #f0d78c;
  background: #fefcf3;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.pulse-bar-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pulse-track {
  height: 4px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}
.pulse-fill {
  height: 100%;
  background: var(--text-1);
}

/* ==================== MODALS ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(17, 17, 16, 0.35);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-card {
  width: 100%;
  max-width: 760px;
  max-height: 88vh;
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.14);
}
.modal-head {
  height: 48px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-head h3 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
}
.modal-body {
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.modal-section {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ==================== TOUCHSCREEN STAGE (/stage & /tv) ==================== */
.stage-shell {
  background: var(--surface-stage);
  color: var(--text-1);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.stage-topbar {
  height: 44px;
  padding: 0 18px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.stage-grid {
  display: grid;
  grid-template-columns: 34% 66%;
  flex: 1;
  min-height: 0;
  background: var(--border);
  gap: 1px;
}
.stage-left {
  background: #f3f3ef;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.stage-left-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.stage-pause-banner {
  padding: 6px 12px;
  background: #fef9ec;
  border-bottom: 1px solid #f0d78c;
  color: #854d0e;
  font-family: var(--font-mono);
  font-size: 11px;
  text-align: center;
}
.stage-comment-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.stage-tap-card {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
  padding: 15px 16px;
  min-height: 78px;
  color: var(--text-1);
  display: flex;
  flex-direction: column;
  gap: 7px;
  touch-action: manipulation;
}
.stage-tap-card:hover {
  background: rgba(17, 17, 16, 0.03);
}
.stage-tap-card.risk-green { border-left-color: var(--sem-green); }
.stage-tap-card.risk-yellow { border-left-color: var(--sem-amber); }
.stage-tap-card.is-priority {
  border-left-color: #b45309;
  background: #fefcf3;
}
.stage-tap-card.is-active {
  background: #ffffff;
  border-left-color: #111110;
}
.stage-tap-text {
  font-size: calc(15.5px * var(--stage-scale));
  line-height: 1.42;
  font-weight: 500;
  color: var(--text-1);
}

.stage-right {
  background: var(--surface-stage);
  padding: 24px 34px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.whisper-banner {
  border: 1px solid #e6c675;
  background: #fef9ec;
  border-radius: var(--radius-md);
  padding: 13px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.whisper-banner.vip {
  border-color: #a7f3d0;
  background: #ecfdf5;
}
.whisper-msg {
  font-size: calc(19px * var(--stage-scale));
  font-weight: 600;
  color: #78350f;
  letter-spacing: -0.01em;
}
.whisper-banner.vip .whisper-msg {
  color: #065f46;
}

.stage-directive-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.directive-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: calc(12px * var(--stage-scale));
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid var(--border-strong);
  background: var(--surface-1);
  color: var(--text-1);
}
.directive-full_data { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
.directive-inoculation { border-color: #fde68a; background: #fffbeb; color: #b45309; }
.directive-smile_relax { border-color: #99f6e4; background: #f0fdfa; color: #0f766e; }
.directive-two_sides { border-color: #ddd6fe; background: #f5f3ff; color: #6d28d9; }
.directive-touch_pivot { border-color: #fed7aa; background: #fff7ed; color: #c2410c; }

.stage-question-block {
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border);
  padding: 18px 0 20px;
}
.stage-clean-q {
  margin: 10px 0 8px;
  font-size: calc(29px * var(--stage-scale));
  line-height: 1.24;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: #111110;
}
.stage-raw-q {
  font-size: calc(13px * var(--stage-scale));
  color: var(--text-3);
}

.stage-bullets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: start;
  gap: 18px;
}
.stage-bullet-col {
  width: 100%;
  text-align: left;
  cursor: pointer;
  background: #ffffff;
  border: 1px solid var(--border);
  border-top: 2px solid #111110;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.stage-bullet-col:hover {
  border-color: var(--border-strong);
  border-top-color: #111110;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.stage-bullet-col.is-expanded {
  background: #fefcf3;
  border-color: #e6c675;
  border-top: 2px solid var(--gold-bright);
}
.stage-bullet-col.is-expanding {
  background: #fffdf7;
  border-color: #e6c675;
  border-top: 2px solid var(--gold-bright);
}
.stage-card-inline-expand {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-strong);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.stage-card-inline-expand.is-loading {
  border-top-color: #e6c675;
}
.stage-bullet-col.is-loading {
  cursor: default;
  border-top-color: var(--border-strong);
  background: var(--surface-2);
}
.stage-bullet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.stage-bullet-num {
  font-family: var(--font-mono);
  font-size: calc(11px * var(--stage-scale));
  color: var(--text-3);
  letter-spacing: 0.08em;
}
.stage-bullet-hint {
  font-family: var(--font-mono);
  font-size: calc(10.5px * var(--stage-scale));
  color: var(--text-3);
}
.stage-expand-panel {
  background: #ffffff;
  border: 1px solid #e6c675;
  border-left: 3px solid var(--gold-bright);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.stage-expand-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stage-expand-item {
  font-size: calc(16px * var(--stage-scale));
  line-height: 1.48;
  color: #111110;
  padding-left: 14px;
  position: relative;
}
.stage-expand-item::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold-bright);
  position: absolute;
  left: 0;
  top: 0.58em;
}
.stage-bullet-hi {
  font-size: calc(20px * var(--stage-scale));
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #111110;
  line-height: 1.25;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.stage-bullet-detail {
  font-size: calc(15.5px * var(--stage-scale));
  line-height: 1.48;
  color: #3f3f3b;
  margin-top: 8px;
}
.stage-bullet-src {
  font-family: var(--font-mono);
  font-size: calc(11.5px * var(--stage-scale));
  color: var(--text-3);
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.stage-bridge {
  border-left: 2px solid #111110;
  padding: 4px 0 4px 14px;
  font-size: calc(15.5px * var(--stage-scale));
  line-height: 1.45;
  color: var(--text-2);
}

/* ==================== POST-LIVE STUDIO ==================== */
.post-wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 20px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--border);
  gap: 1px;
  overflow: hidden;
}
.kpi-cell {
  background: var(--surface-1);
  padding: 16px 20px;
}
.kpi-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.kpi-value {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
  color: var(--text-1);
}
.post-panel {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.post-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
}
.video-stage {
  background: #111110;
  border-radius: var(--radius-sm);
  width: 100%;
  max-height: 360px;
  border: 1px solid var(--border-strong);
}
.chart-canvas {
  width: 100%;
  height: 240px;
  display: block;
  background: var(--surface-stage);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: crosshair;
}
.moment-row {
  background: var(--surface-stage);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hook-box {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.5;
}

@media (max-width: 1120px) {
  .op-grid { grid-template-columns: 1fr; overflow-y: auto; }
  .op-shell { height: auto; min-height: 100vh; overflow: auto; }
  .stage-grid { grid-template-columns: 1fr; }
  .stage-bullets-grid { grid-template-columns: 1fr; }
  .portal-grid, .portal-steps-grid, .kpi-strip, .post-grid { grid-template-columns: 1fr; }
}
