:root {
  color-scheme: dark;
  --canvas: #0b1018; --surface: #121923; --raised: #18212e; --hover: #1c2939;
  --text: #edf2f7; --secondary: #9caabb; --muted: #8799ae; --border: #273142;
  --control-border: #65788d; --accent: #83baff; --on-accent: #0b1726;
  --accent-soft: #172c43; --codex: #82cfb3; --claude: #dba58c;
  --codex-soft: #132c29; --claude-soft: #30241f; --danger: #ffaaa6;
  --shadow: 0 18px 70px #0005; --backdrop: #03070dbd;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --r-control: 10px; --r-panel: 16px; --motion: 160ms;
}
:root[data-theme="light"] {
  color-scheme: light;
  --canvas: #f6f7f9; --surface: #fff; --raised: #f0f3f7; --hover: #e9eff7;
  --text: #1d2433; --secondary: #596579; --muted: #64748b; --border: #dfe5ed;
  --control-border: #8993a4; --accent: #2563b6; --on-accent: #fff;
  --accent-soft: #e8f1fc; --codex: #216c56; --claude: #965333;
  --codex-soft: #e8f4ed; --claude-soft: #fbefe7; --danger: #b42318;
  --shadow: 0 18px 70px #1e293b20; --backdrop: #18263980;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; font: 15px/1.6 var(--font); background: var(--canvas); color: var(--text); -webkit-font-smoothing: antialiased; }
button, textarea, input, select { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { color: inherit; cursor: pointer; }
button { transition: background-color var(--motion), color var(--motion), border-color var(--motion); }
button:disabled { cursor: default; opacity: .55; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
textarea { color: var(--text); background: var(--canvas); border: 1px solid var(--control-border); border-radius: var(--r-control); resize: vertical; width: 100%; padding: 14px 14px 32px; line-height: 1.8; font-size: 15px; }
textarea::placeholder { color: var(--muted); }
textarea:focus { border-color: var(--accent); outline-offset: 2px; }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3, p { margin: 0; }
.icon-library { position: absolute; width: 0; height: 0; pointer-events: none; }
.icon { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fill-icon { fill: currentColor; stroke-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.topbar { height: 72px; display: flex; gap: 32px; align-items: center; padding: 0 40px; background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { display: flex; gap: 14px; align-items: center; white-space: nowrap; color: var(--text); font-size: 20px; font-weight: 600; line-height: 1.3; }
.brand-mark { width: 36px; height: 36px; fill: none; stroke: var(--text); stroke-width: 1.3; overflow: visible; }
.navigation { height: 100%; display: flex; gap: 32px; padding-left: 28px; position: relative; align-items: stretch; }
.navigation::before { content: ""; width: 1px; height: 24px; position: absolute; top: 24px; left: 0; background: var(--border); }
.nav-item { padding: 0; border: 0; background: none; color: var(--secondary); font-size: 14px; position: relative; }
.nav-item.selected { color: var(--accent); font-weight: 600; }
.nav-item.selected::after { content: ""; position: absolute; bottom: 12px; left: 0; right: 0; height: 2px; background: var(--accent); border-radius: 2px; }
.nav-item:hover { color: var(--text); }
.mobile-history { display: none; }
.top-tools { margin-left: auto; display: flex; align-items: center; gap: 24px; }
.preview-label, .local-label { display: inline-flex; align-items: center; gap: 10px; color: var(--secondary); font-size: 13px; white-space: nowrap; }
.theme-control { border: 1px solid var(--border); display: flex; border-radius: 22px; padding: 3px; gap: 4px; }
.theme-button { display: grid; place-items: center; width: 32px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); }
.theme-button.selected { background: var(--accent-soft); color: var(--accent); }
.theme-button:hover { background: var(--hover); color: var(--text); }
.workspace { max-width: 1600px; margin: 0 auto; padding: 24px 40px 16px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; padding-bottom: 24px; gap: 16px; }
.page-heading h1 { font-size: 32px; line-height: 42px; font-weight: 600; letter-spacing: -.6px; }
.page-heading p { margin-top: 4px; color: var(--secondary); font-size: 15px; }
.workspace-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
.panel { border: 1px solid var(--border); background: var(--surface); border-radius: var(--r-panel); min-width: 0; }
.configuration { padding: 22px; }
.configuration-heading { cursor: default; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.configuration-heading::-webkit-details-marker { display: none; }
.configuration-heading h2 { font-size: 20px; line-height: 28px; font-weight: 600; }
.disclosure-icon { display: none; }
.configuration-body { margin-top: 20px; }
.field > label, .round-field legend { font-size: 14px; font-weight: 500; margin-bottom: 8px; display: block; }
.textarea-wrap { position: relative; }
#topic { min-height: 170px; max-height: 300px; display: block; }
.character-count { position: absolute; bottom: 10px; right: 12px; font-size: 12px; color: var(--muted); pointer-events: none; font-variant-numeric: tabular-nums; }
.round-field { border: 0; padding: 0; margin: 20px 0 0; min-width: 0; }
.round-field legend { padding: 0; float: left; width: 100%; }
.round-options { display: flex; width: 100%; border: 1px solid var(--control-border); border-radius: var(--r-control); clear: both; }
.round-option { flex: 1; padding: 8px; height: 40px; border: 0; border-left: 1px solid var(--border); background: none; color: var(--secondary); font-size: 14px; border-radius: 0; }
.round-option:first-child { border-left: 0; border-radius: 9px 0 0 9px; }
.round-option:last-child { border-radius: 0 9px 9px 0; }
.round-option.selected { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); border-radius: 9px; font-weight: 600; }
.round-option:hover { color: var(--accent); background: var(--hover); }
.field-help { margin-top: 8px; font-size: 12px; line-height: 20px; color: var(--muted); }
.field-error { margin-top: 8px; font-size: 13px; color: var(--danger); }
.background-button { width: 100%; border: 1px solid var(--border); border-radius: var(--r-control); margin-top: 20px; min-height: 44px; padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; background: var(--raised); font-size: 14px; font-weight: 500; }
.background-button:hover { border-color: var(--control-border); background: var(--hover); }
.background-tools { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.background-tools > span { font-size: 12px; font-weight: 400; }
.background-tools .icon { width: 16px; height: 16px; flex-basis: 16px; }
.participants { margin-top: 20px; }
.participants h3 { font-size: 14px; font-weight: 500; margin-bottom: 10px; }
.participant { display: flex; align-items: center; gap: 12px; min-height: 50px; }
.participant + .participant { margin-top: 10px; }
.speaker-avatar { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border: 1.5px solid currentColor; border-radius: 10px; }
.speaker-avatar .icon { width: 24px; height: 24px; stroke-width: 1.7; }
.codex, .codex-text { color: var(--codex); }
.claude, .claude-text { color: var(--claude); }
.speaker-avatar.codex { background: var(--codex-soft); }
.speaker-avatar.claude { background: var(--claude-soft); }
.participant-copy { display: flex; flex-direction: column; min-width: 0; }
.participant-copy strong { font-size: 15px; font-weight: 600; }
.participant-copy > span { color: var(--muted); font-size: 12px; }
.participant-check { margin-left: auto; color: var(--accent); width: 17px; height: 17px; }
.start-actions { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.button { min-height: 40px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 9px 16px; border-radius: var(--r-control); border: 1px solid transparent; font-size: 14px; line-height: 20px; font-weight: 500; }
.button.primary { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.button.primary:hover { filter: brightness(1.08); }
.button.secondary { background: transparent; color: var(--text); border-color: var(--control-border); }
.button.secondary:hover { background: var(--hover); border-color: var(--accent); }
.preview-note { display: flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--muted); font-size: 12px; }
.preview-note .icon { width: 16px; height: 16px; flex-basis: 16px; }
.debate { display: flex; flex-direction: column; height: min(780px, calc(100dvh - 208px)); min-height: 640px; overflow: clip; }
.debate-heading { display: flex; align-items: flex-start; gap: 12px; padding: 22px 24px 12px; }
.debate-title-wrap { min-width: 0; flex: 1; }
.debate-title-wrap h2 { font-size: 20px; line-height: 28px; font-weight: 600; overflow-wrap: anywhere; }
.debate-title-wrap > p { margin-top: 4px; color: var(--secondary); font-size: 13px; }
.debate-status { font-size: 12px; display: inline-flex; align-items: center; gap: 6px; color: var(--secondary); flex: 0 0 auto; padding-top: 4px; }
.debate-status.playing { color: var(--accent); }
.debate-status .icon { width: 16px; height: 16px; flex-basis: 16px; }
.icon-button { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); }
.icon-button:hover { background: var(--hover); color: var(--text); }
.turn-rail { display: flex; margin: 8px 24px 0; min-height: 54px; }
.turn { flex: 1; min-width: 0; text-align: center; position: relative; padding: 18px 4px 0; border: 0; background: none; color: var(--muted); font-size: 12px; line-height: 20px; }
.turn::before { content: ""; position: absolute; height: 1px; background: var(--control-border); left: -50%; right: 50%; top: 6px; }
.turn:first-child::before { display: none; }
.turn-dot { position: absolute; width: 10px; height: 10px; left: calc(50% - 5px); top: 1px; border: 1px solid var(--control-border); border-radius: 50%; background: var(--surface); z-index: 1; }
.turn.done .turn-dot { background: var(--accent); border-color: var(--accent); }
.turn.done::before { background: var(--accent); }
.turn.current { color: var(--accent); font-weight: 600; }
.turn.current .turn-dot { width: 14px; height: 14px; top: -1px; left: calc(50% - 7px); background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.turn:focus-visible { outline-offset: 0; border-radius: 8px; }
.tabbar { display: flex; align-items: center; gap: 28px; border-bottom: 1px solid var(--border); padding: 0 24px; margin-top: 10px; }
.view-tab { padding: 12px 0; border: 0; background: none; color: var(--secondary); font-size: 14px; position: relative; }
.view-tab.selected { color: var(--accent); font-weight: 600; }
.view-tab.selected::after { content: ""; height: 2px; background: var(--accent); position: absolute; bottom: 0; left: 0; right: 0; }
.tab-hint { margin-left: auto; color: var(--muted); font-size: 12px; }
.process-pane { min-height: 0; flex: 1; display: flex; flex-direction: column; }
.feed { overflow-y: auto; min-height: 0; flex: 1; padding: 20px 24px 8px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--control-border) transparent; }
.message { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 16px; padding-left: 14px; padding-bottom: 22px; }
.message::before { content: ""; position: absolute; left: 0; top: 12px; bottom: -8px; width: 1px; background: var(--border); }
.message::after { content: ""; width: 8px; height: 8px; position: absolute; top: 12px; left: -4px; border-radius: 50%; background: var(--codex); box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--codex); }
.message.claude-message::after { background: var(--claude); box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--claude); }
.message:last-child { padding-bottom: 10px; }
.message:last-child::before { bottom: 30px; }
.message-content { min-width: 0; }
.message-heading { display: flex; align-items: center; gap: 10px; min-height: 30px; flex-wrap: wrap; }
.message-heading strong { font-size: 15px; font-weight: 600; }
.message-label, .message-time { color: var(--muted); font-size: 12px; }
.message-time { font-variant-numeric: tabular-nums; }
.message-copy { margin-left: auto; width: 28px; height: 28px; flex-basis: 28px; }
.message-copy .icon { width: 16px; height: 16px; }
.message h3 { font-size: 18px; line-height: 28px; font-weight: 600; margin-top: 6px; }
.message-excerpt { margin-top: 6px; color: var(--text); font-size: 16px; line-height: 1.85; }
.reference { display: flex; align-items: center; gap: 10px; border-left: 2px solid var(--control-border); background: var(--raised); padding: 9px 12px; border-radius: 0 8px 8px 0; margin-top: 12px; color: var(--secondary); font-size: 12px; }
.reference .icon { width: 16px; height: 16px; flex-basis: 16px; }
.message-full { margin-top: 10px; }
.message-full > summary { color: var(--muted); font-size: 12px; cursor: pointer; width: fit-content; padding: 4px 0; }
.message-full[open] > summary { color: var(--accent); }
.message-full .markdown { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 16px; }
.typing-caret { display: inline-block; width: 2px; height: 16px; background: var(--accent); margin-left: 4px; vertical-align: -2px; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.next-step { display: flex; align-items: center; gap: 10px; margin: 0 24px 16px; padding: 12px 14px; border-radius: var(--r-control); border: 1px solid var(--border); background: var(--raised); text-align: left; font-size: 13px; color: var(--secondary); flex: 0 0 auto; }
.next-step:hover { border-color: var(--control-border); color: var(--text); }
.next-step .icon:last-child { margin-left: auto; transform: rotate(-90deg); }
.playback { display: flex; align-items: center; flex: 0 0 auto; gap: 16px; min-height: 74px; padding: 14px 24px; border-top: 1px solid var(--border); }
.play-button { display: grid; place-items: center; width: 44px; height: 40px; padding: 0; flex: 0 0 44px; border: 0; border-radius: var(--r-control); background: var(--accent); color: var(--on-accent); }
.play-button:hover { filter: brightness(1.08); }
.play-button .icon { width: 22px; height: 22px; stroke-width: 2.6; }
.seek { flex: 1; min-width: 40px; height: 24px; accent-color: var(--accent); cursor: pointer; }
.step-count { color: var(--text); font-size: 13px; min-width: 36px; text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.speed-wrap { position: relative; flex: 0 0 66px; }
.speed-wrap select { appearance: none; -webkit-appearance: none; color: var(--text); border: 1px solid var(--control-border); border-radius: 8px; background: var(--surface); padding: 6px 26px 6px 10px; font-size: 13px; width: 100%; cursor: pointer; height: 36px; }
.speed-wrap .icon { position: absolute; right: 7px; top: 10px; pointer-events: none; color: var(--muted); width: 16px; height: 16px; }
.follow-control { display: inline-flex; position: relative; align-items: center; gap: 8px; font-size: 12px; padding-left: 16px; border-left: 1px solid var(--border); min-height: 36px; cursor: pointer; white-space: nowrap; }
.follow-control input { position: absolute; opacity: 0; width: 40px; height: 28px; left: 16px; margin: 0; }
.switch { display: inline-block; width: 36px; height: 22px; border-radius: 20px; background: var(--control-border); position: relative; }
.switch::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); left: 3px; top: 3px; transition: transform var(--motion); }
.follow-control input:checked + .switch { background: var(--accent); }
.follow-control input:checked + .switch::after { transform: translateX(14px); background: var(--on-accent); }
.follow-control input:focus-visible + .switch { outline: 2px solid var(--accent); outline-offset: 4px; }
.summary-pane { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 26px; scrollbar-width: thin; scrollbar-color: var(--control-border) transparent; }
.summary-tools { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.summary-tools p { color: var(--muted); font-size: 12px; }
.summary-brief { max-width: 900px; }
.summary-section-label { display: flex; align-items: center; gap: 8px; color: var(--codex); font-size: 13px; font-weight: 500; }
.summary-section-label .icon { width: 18px; height: 18px; flex-basis: 18px; }
.summary-consensus h3 { font-size: 21px; line-height: 1.65; font-weight: 600; margin: 10px 0; }
.summary-consensus p { font-size: 15px; color: var(--secondary); line-height: 1.9; }
.summary-section { padding-top: 22px; margin-top: 22px; border-top: 1px solid var(--border); }
.summary-section h3 { font-size: 16px; font-weight: 600; margin-bottom: 14px; }
.summary-section dl { margin: 0; }
.summary-section dl > div { display: grid; grid-template-columns: 140px minmax(0,1fr); gap: 16px; font-size: 14px; line-height: 1.9; }
.summary-section dl > div + div { margin-top: 12px; }
.summary-section dt { color: var(--text); }
.summary-section dd { margin: 0; color: var(--secondary); }
.summary-actions { margin: 0; padding-left: 22px; font-size: 14px; line-height: 1.9; color: var(--secondary); }
.summary-actions li + li { margin-top: 10px; }
.summary-actions li::marker { color: var(--accent); }
.summary-original { margin-top: 24px; border-top: 1px solid var(--border); }
.summary-original > summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; padding: 16px 0; color: var(--accent); font-size: 13px; list-style: none; }
.summary-original > summary::-webkit-details-marker { display: none; }
.summary-original[open] > summary .icon { transform: rotate(180deg); }
.summary-original > .markdown { padding-top: 10px; }
.button.compact { font-size: 12px; padding: 5px 10px; min-height: 32px; flex: 0 0 auto; }
.compact .icon { width: 15px; height: 15px; flex-basis: 15px; }
.markdown { font-size: 14px; line-height: 1.95; overflow-wrap: anywhere; }
.markdown > * + * { margin-top: 14px; }
.markdown h3 { font-size: 17px; line-height: 1.6; font-weight: 600; margin-top: 24px; }
.markdown h3:first-child { margin-top: 0; }
.markdown ul, .markdown ol { padding-left: 22px; }
.markdown li + li { margin-top: 8px; }
.markdown strong { font-weight: 600; }
.markdown code { color: var(--accent); background: var(--raised); border-radius: 4px; padding: 2px 4px; font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.markdown .table-scroll { overflow: auto; max-width: 100%; }
.markdown table { width: 100%; border-collapse: collapse; min-width: 480px; font-size: 12px; }
.markdown th, .markdown td { text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); padding: 10px 12px; }
.markdown th { color: var(--secondary); background: var(--raised); font-weight: 500; }
.summary-footnote { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; padding-top: 20px; margin-top: 24px; border-top: 1px solid var(--border); }
.summary-footnote .icon { width: 16px; height: 16px; flex-basis: 16px; }
.mode-notice { margin: 16px 24px 0; padding: 10px 12px; display: flex; gap: 8px; color: var(--accent); background: var(--accent-soft); border-radius: 8px; font-size: 12px; }
.mode-notice .icon { width: 16px; height: 16px; flex-basis: 16px; margin-top: 2px; }
.empty-feed { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px; height: 100%; min-height: 160px; text-align: center; color: var(--muted); }
.empty-feed .brand-mark { color: var(--secondary); stroke: currentColor; width: 48px; height: 48px; }
.empty-feed strong { font-size: 16px; color: var(--text); font-weight: 500; }
.empty-feed p { max-width: 300px; font-size: 13px; }
.workspace-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; gap: 16px; color: var(--muted); font-size: 11px; }
.dialog { padding: 24px; width: min(640px, calc(100% - 32px)); max-height: calc(100dvh - 48px); overflow-y: auto; border-radius: 20px; background: var(--surface); color: var(--text); border: 1px solid var(--control-border); box-shadow: var(--shadow); }
.dialog::backdrop { background: var(--backdrop); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.dialog h2 { font-size: 20px; line-height: 28px; font-weight: 600; }
.dialog-heading p { margin-top: 6px; color: var(--secondary); font-size: 13px; }
.background-dialog textarea { min-height: 200px; max-height: 48dvh; font-size: 14px; }
.dialog-note { font-size: 12px; color: var(--muted); margin-top: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.dialog-actions .button { min-width: 90px; }
.history-record { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; background: var(--raised); border: 1px solid var(--border); border-radius: var(--r-control); padding: 16px; }
.history-record:hover { border-color: var(--accent); background: var(--hover); }
.history-record-icon { color: var(--accent); display: grid; place-items: center; }
.history-record strong { font-size: 15px; font-weight: 500; display: block; }
.history-record > span:nth-child(2) { min-width: 0; }
.history-record > span:nth-child(2) > span { font-size: 12px; color: var(--muted); display: block; margin-top: 5px; }
.history-status { display: inline-flex; align-items: center; white-space: nowrap; gap: 4px; font-size: 12px; color: var(--codex); margin-left: auto; }
.history-status .icon { width: 16px; height: 16px; flex-basis: 16px; }
.toast { position: fixed; z-index: 70; bottom: 28px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px); background: var(--text); color: var(--canvas); font-size: 13px; padding: 12px 20px; border-radius: var(--r-control); box-shadow: var(--shadow); text-align: center; }
@media (min-width: 1440px) { .workspace-grid { grid-template-columns: 420px minmax(0,1fr); } #topic { height: 176px; min-height: 176px; font-size: 16px; line-height: 1.6; } .debate-title-wrap h2 { font-size: 22px; line-height: 30px; } .message-heading strong { font-size: 17px; } .message h3 { font-size: 19px; } .message-excerpt { font-size: 17px; } .configuration { padding: 22px; } .configuration-heading h2 { font-size: 22px; } .field > label, .round-field legend, .round-option, .background-button, .participants h3, .configuration .button { font-size: 15px; } }
@media (min-width: 1600px) { .workspace { padding-top: 32px; } .debate { height: min(800px, calc(100dvh - 220px)); } }
@media (max-width: 1199px) { .topbar { padding-inline: 24px; gap: 24px; } .workspace { padding-inline: 24px; } .workspace-grid { grid-template-columns: 300px minmax(0, 1fr); gap: 16px; } .configuration { padding: 20px; } .follow-control > span:last-child { display: none; } .tab-hint { display: none; } .debate-heading { gap: 8px; } .debate-title-wrap h2 { font-size: 18px; } .message { gap: 12px; } .playback { gap: 12px; } }
@media (max-width: 1023px) { .workspace-grid { grid-template-columns: 1fr; } .configuration { padding: 20px 24px; } .configuration-heading { cursor: pointer; } .disclosure-icon { display: block; transition: transform var(--motion); } .configuration[open] .disclosure-icon { transform: rotate(180deg); } .configuration-body { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; } .field { grid-column: 1; grid-row: 1 / 4; } #topic { min-height: 202px; } .round-field { margin-top: 0; } .background-button { margin-top: 14px; } .participants { grid-column: 1; margin-top: 16px; } .participant { display: inline-flex; width: 49%; gap: 8px; } .participant + .participant { margin-top: 0; } .participant-copy > span, .participant-check { display: none; } .start-actions { margin-top: 16px; } .preview-note { grid-column: 1 / -1; } .debate { height: min(780px, calc(100dvh - 280px)); min-height: 520px; } .follow-control > span:last-child { display: inline; } }
@media (max-width: 767px) {
  .topbar { height: 64px; padding-inline: 16px; gap: 12px; }
  .brand { gap: 8px; font-size: 16px; } .brand-mark { width: 28px; height: 28px; }
  .navigation { padding-left: 0; gap: 0; margin-left: auto; } .navigation::before, #roomNav { display: none; }
  .nav-item { display: flex; align-items: center; justify-content: center; width: 44px; } .nav-item > span { display: none; } .mobile-history { display: block; }
  .top-tools { gap: 0; margin-left: 0; } .preview-label { display: none; }
  .theme-control { border: 0; padding: 0; gap: 0; } .theme-button { width: 40px; height: 40px; } .theme-button.selected { display: none; }
  .workspace { padding: 20px 16px 24px; }
  .page-heading { padding-bottom: 20px; } .page-heading h1 { font-size: 26px; line-height: 36px; } .page-heading p { font-size: 13px; max-width: 240px; } .local-label { display: none; }
  .configuration { padding: 18px; } .configuration-body { display: block; margin-top: 18px; } .configuration-heading h2 { font-size: 18px; }
  #topic { min-height: 164px; font-size: 16px; } .round-field { margin-top: 18px; } .round-option { height: 44px; font-size: 15px; }
  .participants { margin-top: 18px; } .participant-copy > span { display: block; font-size: 11px; } .participant { gap: 8px; } .participant .speaker-avatar { width: 32px; height: 32px; flex-basis: 32px; border-radius: 8px; }
  .participant .speaker-avatar .icon { width: 20px; height: 20px; } .participant-copy strong { font-size: 14px; }
  .start-actions { margin-top: 20px; } .button { min-height: 44px; font-size: 15px; } .background-button { min-height: 44px; }
  .debate { min-height: 540px; height: calc(100dvh - 280px); max-height: 900px; }
  .debate-heading { padding: 18px 16px 10px; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
  .debate-title-wrap { flex-basis: 100%; } .debate-title-wrap h2 { font-size: 18px; line-height: 28px; } .debate-title-wrap > p { font-size: 12px; }
  .debate-status { padding-top: 0; line-height: 32px; } .debate-heading > .icon-button { margin-left: auto; }
  .turn-rail { margin: 4px 16px 0; min-height: 60px; } .turn { font-size: 10px; padding: 18px 2px 0; line-height: 16px; }
  .turn-rail.many-turns { overflow-x: auto; justify-content: flex-start; margin-inline: 12px; padding-top: 4px; scrollbar-width: thin; } .many-turns .turn { flex: 0 0 68px; }
  .tabbar { padding-inline: 16px; gap: 24px; margin-top: 6px; } .view-tab { min-height: 44px; font-size: 14px; }
  .feed { padding: 20px 16px 8px; } .message { grid-template-columns: 30px minmax(0,1fr); padding-left: 12px; gap: 10px; padding-bottom: 20px; }
  .message .speaker-avatar { width: 30px; height: 30px; flex-basis: 30px; border-radius: 8px; } .message .speaker-avatar .icon { width: 20px; height: 20px; }
  .message-heading { gap: 7px; } .message-heading strong { font-size: 14px; } .message-label { font-size: 11px; } .message-time { display: none; } .message-copy { margin-left: 0; width: 28px; height: 32px; }
  .message h3 { font-size: 16px; line-height: 26px; } .message-excerpt { font-size: 15px; line-height: 1.9; }
  .message-full > summary { min-height: 40px; display: flex; align-items: center; } .reference { padding: 8px 10px; }
  .next-step { margin: 0 16px 12px; font-size: 12px; padding: 10px 12px; min-height: 44px; }
  .playback { padding: 12px 16px; min-height: 68px; gap: 10px; } .play-button { width: 40px; height: 40px; flex-basis: 40px; } .follow-control { display: none; } .speed-wrap { flex-basis: 56px; } .speed-wrap select { padding-left: 8px; height: 40px; } .speed-wrap .icon { top: 12px; right: 4px; } .step-count { font-size: 12px; min-width: 30px; }
  .summary-pane { padding: 16px; } .summary-tools { flex-wrap: wrap; gap: 10px; } .summary-tools .button { min-height: 40px; font-size: 12px; } .summary-document { font-size: 15px; line-height: 1.9; }
  .summary-consensus h3 { font-size: 19px; } .summary-section dl > div { display: block; } .summary-section dd { margin-top: 4px; } .summary-actions { font-size: 15px; }
  .mode-notice { margin: 12px 16px 0; font-size: 12px; }
  .workspace-footer { display: block; font-size: 11px; } .workspace-footer > span { display: block; } .workspace-footer > span:last-child { margin-top: 4px; }
  .dialog { padding: 20px; border-radius: 16px; width: calc(100% - 24px); max-height: calc(100dvh - 24px); } .dialog h2 { font-size: 18px; } .dialog .icon-button { width: 40px; height: 40px; } .dialog textarea { font-size: 16px; }
  .history-record { align-items: flex-start; flex-wrap: wrap; padding: 14px; } .history-record > span:nth-child(2) { flex: 1; } .history-status { padding-left: 32px; margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; } .typing-caret { animation: none; } }
/* Live local application controls, using the accepted preview's palette and spacing. */
.select-control { width: 100%; min-width: 0; min-height: 38px; color: var(--text); background: var(--canvas); border: 1px solid var(--control-border); border-radius: 9px; padding: 7px 10px; font-size: 13px; }
.mode-field { margin-bottom: 16px; }
.mode-field > label { display: block; font-size: 14px; margin-bottom: 7px; }
.role-field { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.role-field > label { flex: 0 0 auto; font-size: 13px; color: var(--secondary); }
.text-button { background: none; border: 0; padding: 4px 0; font-size: 12px; color: var(--accent); white-space: nowrap; }
.text-button:hover { text-decoration: underline; }
.participants-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.participants-heading h3 { margin-bottom: 0; }
.model-participant { display: grid; grid-template-columns: 32px 48px minmax(0,1fr); gap: 9px; min-height: 40px; }
.model-participant .speaker-avatar { width: 30px; height: 30px; flex-basis: 30px; border-radius: 8px; }
.model-participant .speaker-avatar .icon { width: 20px; height: 20px; }
.model-participant > label { font-size: 13px; font-weight: 600; }
.memory-choice { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; font-size: 12px; }
.memory-choice label { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.memory-choice input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.model-caption { font-size: 11px; color: var(--muted); margin: 0 0 10px; overflow-wrap: anywhere; }
.message-body { overflow-wrap: anywhere; font-size: 15px; line-height: 1.85; }
.message-body h3 { font-size: 16px; margin: 18px 0 8px; }
.message-body p, .message-body ul, .message-body ol { margin: 10px 0; }
.message-body > :first-child { margin-top: 0; }
.message-body pre, .summary-document pre { overflow-x: auto; max-width: 100%; padding: 14px; background: var(--canvas); border-radius: 10px; font-size: 12px; }
.message-body .table-scroll { font-size: 13px; }
.thinking { color: var(--secondary); }
.live-indicator { display: inline-flex; align-items: center; gap: 8px; flex: 1; min-width: 0; font-size: 12px; color: var(--secondary); }
.live-indicator > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--control-border); flex: 0 0 7px; }
.live-indicator.active { color: var(--accent); }
.live-indicator.active .live-dot { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.stop-button { border-color: var(--control-border); color: var(--danger); background: transparent; flex: 0 0 auto; }
.stop-button:hover { border-color: var(--danger); background: var(--raised); }
.memory-result { color: var(--secondary); font-size: 12px; border-top: 1px solid var(--border); padding-top: 16px; margin-top: 24px; }
.confirm-meta { display: flex; align-items: center; justify-content: space-between; font-size: 13px; padding: 10px 12px; background: var(--accent-soft); color: var(--accent); border-radius: 9px; gap: 16px; }
.confirm-models { margin: 14px 0 22px; font-size: 13px; color: var(--secondary); overflow-wrap: anywhere; }
.confirm-dialog h3 { font-size: 14px; margin: 18px 0 8px; }
.snapshot-text { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--secondary); font-size: 13px; max-height: 240px; overflow: auto; }
.snapshot-detail { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 14px; }
.snapshot-detail > summary { font-size: 13px; cursor: pointer; color: var(--text); margin-bottom: 10px; }
.snapshot-detail h4 { font-size: 13px; }
.history-record + .history-record { margin-top: 10px; }
.memory-provider + .memory-provider { margin-top: 26px; border-top: 1px solid var(--border); padding-top: 24px; }
.memory-provider > h3 { display: flex; align-items: center; gap: 12px; font-size: 18px; }
.memory-provider > h3 > span { color: var(--muted); font-size: 12px; font-weight: 400; }
.memory-record { background: var(--raised); padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; margin-top: 14px; overflow-wrap: anywhere; }
.memory-record strong { font-size: 14px; }
.memory-record > p:not(.field-help) { margin-top: 10px; font-size: 13px; color: var(--secondary); }
.note-type { display: inline-block; font-size: 11px; padding: 1px 6px; margin-right: 8px; border: 1px solid var(--control-border); border-radius: 5px; color: var(--text); }
.memory-empty { font-size: 13px; color: var(--muted); margin-top: 14px; }
@media (min-width: 1024px) {
  .configuration { max-height: max(640px, calc(100dvh - 208px)); display: flex; flex-direction: column; overflow: auto; }
  .configuration-body { margin-top: 16px; }
  .configuration #topic { height: 118px; min-height: 118px; font-size: 14px; }
  .configuration .round-field, .configuration .participants { margin-top: 16px; }
  .configuration .background-button { margin-top: 14px; }
  .configuration .start-actions { margin-top: 16px; }
  .configuration .preview-note { margin-top: 10px; }
}
@media (min-width: 1440px) { .message-body { font-size: 16px; } .message-body h3 { font-size: 17px; } }
@media (min-width: 768px) and (max-width: 1023px) {
  .configuration-body { display: block; }
  .configuration #topic { min-height: 120px; }
  .model-participant { display: grid; width: 100%; }
  .model-participant + .model-participant { margin-top: 8px; }
}
@media (max-width: 767px) {
  #memoryNav { display: none; }
  .model-participant { display: grid; width: 100%; grid-template-columns: 32px 48px minmax(0,1fr); }
  .model-participant + .model-participant { margin-top: 8px; }
  .configuration .select-control { min-height: 44px; font-size: 14px; }
  .playback { padding: 12px 16px; gap: 8px; min-height: 68px; }
  .playback .follow-control { padding-left: 0; border: 0; }
  .playback .follow-control input { left: 0; }
  .playback .follow-control > span:last-child { display: none; }
  .live-indicator { font-size: 11px; gap: 6px; }
  .stop-button { font-size: 12px; padding: 8px; min-height: 36px; }
  .step-count { font-size: 12px; min-width: 28px; }
  .message-body { font-size: 14px; }
  .history-record { padding: 12px; gap: 8px; }
  .history-record strong { font-size: 13px; }
  .history-status { font-size: 11px; }
}
@media (min-width: 1024px) {
  .configuration { height: min(780px, calc(100dvh - 208px)); min-height: 640px; overflow: hidden; }
  .configuration-body { display: flex; flex-direction: column; flex: 1; min-height: 0; }
  .setup-scroll { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--control-border) transparent; padding-right: 4px; }
  .configuration .start-actions { flex: 0 0 auto; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
  .configuration .preview-note { flex: 0 0 auto; }
}
.debate-title-wrap h2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.model-info > summary { color: var(--muted); cursor: pointer; }
.model-info > p { margin-top: 8px; }
.summary-document { font-size: 15px; line-height: 1.9; }
@media (min-width: 1024px) {
  /* details has an anonymous content box, so give the form a definite height. */
  .configuration-body { height: max(550px, min(690px, calc(100dvh - 298px))); max-height: max(550px, min(690px, calc(100dvh - 298px))); }
  .configuration #topic { height: 110px; min-height: 110px; }
  .configuration .mode-field { margin-bottom: 12px; }
  .configuration .round-field, .configuration .participants { margin-top: 12px; }
  .configuration .background-button { margin-top: 12px; }
  .configuration .memory-choice { margin-top: 12px; }
}
@media (min-width: 1024px) { .configuration .memory-choice { flex: 0 0 auto; } }
@media (max-width: 767px) { .playback .follow-control { display: inline-flex; } }
