:root {
  --bg: #151d35;
  --bg-deep: #0b1122;
  --panel-border: #6c79a2;
  --panel-soft: rgba(255, 255, 255, 0.05);
  --text: #f6f3ea;
  --muted: #c0c9de;
  --accent: #f2bb52;
  --accent-soft: rgba(242, 187, 82, 0.14);
  --label-text: #dde6fb;
  --mint-soft: rgba(104, 213, 187, 0.18);
  --mint-text: #bcf8ea;
  --mint-border: rgba(104, 213, 187, 0.3);
  --danger-soft: rgba(255, 122, 109, 0.16);
  --danger-text: #ffd0cb;
  --blue-soft: rgba(115, 165, 255, 0.14);
  --blue-text: #cddbff;
  --blue-border: rgba(115, 165, 255, 0.28);
  --message-agent-text: #fff3d7;
  --message-impact-text: #fde7b4;
  --bubble-label-text: #d7fff5;
  --shadow: 0 18px 44px rgba(2, 7, 20, 0.4);
  --pixel-border: 0 0 0 2px rgba(255, 255, 255, 0.07), 0 0 0 5px rgba(12, 17, 32, 0.42);
  --room-top-band-height: 132px;
  --room-workspace-panel-height: clamp(720px, calc(100vh - 120px), 900px);
}

html[data-theme="light"] {
  --bg: #f6f1e7;
  --bg-deep: #e8edf4;
  --panel-border: #d4a247;
  --panel-soft: rgba(24, 36, 60, 0.06);
  --text: #1d2433;
  --muted: #5b667a;
  --accent: #bb6b1d;
  --accent-soft: rgba(205, 131, 45, 0.16);
  --label-text: #40506c;
  --mint-soft: rgba(36, 137, 116, 0.14);
  --mint-text: #0b6b5a;
  --mint-border: rgba(36, 137, 116, 0.3);
  --danger-soft: rgba(203, 71, 63, 0.12);
  --danger-text: #8f2f29;
  --blue-soft: rgba(47, 99, 176, 0.12);
  --blue-text: #315f9d;
  --blue-border: rgba(47, 99, 176, 0.22);
  --message-agent-text: #22304a;
  --message-impact-text: #5e4a18;
  --bubble-label-text: #0b6b5a;
  --shadow: 0 18px 42px rgba(73, 64, 48, 0.18);
  --pixel-border: 0 0 0 2px rgba(80, 67, 45, 0.08), 0 0 0 5px rgba(255, 255, 255, 0.54);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top, rgba(242, 187, 82, 0.16), transparent 24%),
    linear-gradient(180deg, #1b2442 0%, #0b1122 100%);
  color: var(--text);
  font-family: "Noto Sans SC", sans-serif;
}

html[data-theme="light"] body {
  background:
    radial-gradient(circle at top, rgba(205, 131, 45, 0.18), transparent 24%),
    linear-gradient(180deg, #fff8eb 0%, #e9eef6 100%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled,
select:disabled {
  cursor: wait;
  opacity: 0.72;
}

.hidden {
  display: none !important;
}

.admin-page {
  min-height: 100vh;
  padding: 32px;
  background: #f5f7fb;
  color: #152033;
}

.admin-header,
.admin-actions,
.admin-stats-grid {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-header {
  justify-content: space-between;
  padding: 18px 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(18, 32, 58, 0.14);
  border-radius: 10px;
  background: #182642;
  color: #f8fafc;
  box-shadow: 0 14px 34px rgba(18, 32, 58, 0.16);
}

.admin-header .eyebrow {
  color: #9cc5ff;
}

.admin-header h1 {
  color: #ffffff;
}

.admin-page .pill {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.admin-page .ghost-btn {
  border: 1px solid #8aa4d6;
  background: #ffffff;
  color: #152033;
}

.admin-page .ghost-btn:hover {
  background: #eaf1ff;
  border-color: #5f7fbd;
}

.admin-page .admin-actions .ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.38);
}

.admin-page .admin-actions .ghost-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.62);
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

.admin-stat,
.admin-event {
  border: 1px solid rgba(18, 32, 58, 0.12);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
  color: #152033;
}

.admin-stat span,
.admin-event small,
.admin-table small {
  display: block;
  color: #526173;
}

.admin-stat strong {
  font-size: 24px;
  color: #152033;
}

.admin-page .panel.admin-panel {
  margin-top: 16px;
  border: 1px solid rgba(18, 32, 58, 0.14);
  border-radius: 10px;
  background: #ffffff;
  color: #152033;
  box-shadow: 0 12px 28px rgba(18, 32, 58, 0.1);
}

.admin-page .subpanel-title {
  color: #152033;
}

.admin-page .subpanel-title small {
  color: #526173;
}

.admin-table-wrap {
  overflow-x: auto;
  background: #ffffff;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  color: #152033;
}

.admin-table th,
.admin-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(18, 32, 58, 0.1);
  color: #152033;
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  background: #eef3fb;
  color: #20345a;
}

.admin-table strong {
  color: #152033;
}

.admin-event-list {
  display: grid;
  gap: 10px;
}

.small-action {
  min-height: 32px;
  padding: 6px 10px;
}

.danger-btn {
  border: 1px solid #dc2626;
  border-radius: 8px;
  background: #fee2e2;
  color: #991b1b;
  cursor: pointer;
}

@media (max-width: 760px) {
  .admin-page {
    padding: 18px;
  }

  .admin-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.app-shell {
  min-height: 100vh;
  padding: 18px;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-screen.hidden {
  display: none;
}

.auth-panel {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(40, 52, 90, 0.98), rgba(26, 34, 60, 1));
  border: 2px solid var(--panel-border);
  border-radius: 18px;
  box-shadow: var(--shadow), var(--pixel-border);
}

.auth-brand {
  margin-bottom: 8px;
}

.auth-error {
  margin: 0;
  color: #ffb0a9;
  font-size: 13px;
}

.auth-user-chip {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1000;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.app-toast {
  padding: 13px 15px;
  border-radius: 12px;
  background: rgba(9, 14, 27, 0.96);
  border: 1px solid rgba(242, 187, 82, 0.34);
  color: var(--text);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
  font-size: 13px;
  line-height: 1.5;
}

.app-toast-warning {
  border-color: rgba(255, 122, 109, 0.42);
  background: rgba(36, 14, 18, 0.96);
}

.draft-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(4, 8, 18, 0.72);
  backdrop-filter: blur(8px);
}

.draft-modal {
  width: min(640px, 100%);
  max-height: min(86vh, 760px);
  overflow: auto;
  display: grid;
  gap: 14px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(40, 52, 90, 0.98), rgba(26, 34, 60, 1));
  border: 2px solid var(--panel-border);
  border-radius: 18px;
  box-shadow: var(--shadow), var(--pixel-border);
}

.draft-modal h3 {
  margin: 0;
  font-size: 18px;
}

.draft-modal-grid,
.draft-modal-field {
  display: grid;
  gap: 10px;
}

.draft-modal-field .text-input,
.draft-modal-field .text-area {
  margin-top: 0;
}

.draft-modal-error {
  margin: 0;
  color: #ffb0a9;
  font-size: 13px;
}

.draft-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.topbar,
.panel,
.speaker-bar {
  background: linear-gradient(180deg, rgba(40, 52, 90, 0.98), rgba(26, 34, 60, 1));
  border: 2px solid var(--panel-border);
  border-radius: 22px;
  box-shadow: var(--shadow), var(--pixel-border);
}

html[data-theme="light"] .topbar,
html[data-theme="light"] .panel,
html[data-theme="light"] .speaker-bar,
html[data-theme="light"] .auth-panel,
html[data-theme="light"] .draft-modal {
  background: linear-gradient(180deg, rgba(255, 252, 244, 0.98), rgba(237, 242, 249, 0.98));
}

.topbar {
  display: grid;
  grid-template-columns: 280px 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 16px 20px;
  margin-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(180deg, #ff776f, #dc4650);
  border: 2px solid rgba(255, 255, 255, 0.25);
  font-family: "Press Start 2P", monospace;
  font-size: 18px;
}

.brand-name {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
}

.brand-subtitle,
.eyebrow,
.speaker-role,
.helper-text {
  margin: 0;
  color: var(--muted);
}

.meeting-badge,
.status-chip,
.pill,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
}

.topbar-center h1 {
  margin: 8px 0 0;
  font-size: 26px;
}

.topbar-actions,
.controls,
.setup-actions,
.clarify-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-actions {
  justify-content: flex-end;
}

.primary-btn,
.ghost-btn,
.link-btn {
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 700;
}

.primary-btn {
  background: linear-gradient(180deg, #ffd15b, #eda63c);
  color: #31210b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 10px 18px rgba(123, 74, 20, 0.22);
}

.ghost-btn {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.link-btn {
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
}

.link-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

html[data-theme="light"] .ghost-btn {
  background: rgba(22, 34, 56, 0.06);
  border-color: rgba(22, 34, 56, 0.14);
}

.ghost-btn.active {
  background: rgba(104, 213, 187, 0.18);
  border-color: rgba(104, 213, 187, 0.34);
  color: #dcfff5;
}

html[data-theme="light"] .ghost-btn.active {
  color: #0c5a4d;
}

.active-toggle {
  border-color: rgba(244, 191, 79, 0.35);
  background: rgba(244, 191, 79, 0.12);
}

.wide-btn {
  width: 100%;
}

.panel {
  padding: 16px;
}

.setup-panel {
  margin-bottom: 18px;
}

.meeting-workspace-header {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.meeting-workspace-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.meeting-workspace-top h2 {
  margin: 4px 0 0;
  font-size: 22px;
}

.meeting-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 14px;
}

.meeting-workspace-header .overview-flow-panel,
.meeting-workspace-header .overview-status-panel {
  padding: 12px;
}

.meeting-workspace-header .overview-workflow-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.meeting-workspace-header .overview-step {
  min-height: 104px;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  gap: 8px 10px;
  padding: 10px;
}

.meeting-workspace-header .overview-step-index {
  width: 30px;
  height: 30px;
  border-radius: 10px;
}

.meeting-workspace-header .overview-step .tag {
  grid-column: 1 / -1;
  justify-self: start;
}

.meeting-workspace-header .overview-status-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.meeting-workspace-header .overview-status-item {
  padding: 9px 10px;
}

.meeting-workspace-header.compact {
  gap: 10px;
}

.meeting-workspace-header.compact .meeting-workspace-top h2 {
  font-size: 18px;
}

.meeting-workspace-header.compact .meeting-workspace-grid {
  grid-template-columns: 1fr;
}

.meeting-workspace-header.compact .overview-status-panel {
  display: none;
}

.meeting-workspace-header.compact .overview-flow-panel .subpanel-title {
  display: none;
}

.meeting-workspace-header.compact .overview-workflow-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 0;
}

.meeting-workspace-header.compact .overview-step {
  min-height: 56px;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-rows: 1fr;
  padding: 9px;
}

.meeting-workspace-header.compact .overview-step .tag {
  grid-column: 2;
}

.meeting-workspace-header.compact .overview-step-copy {
  gap: 2px;
}

.meeting-workspace-header.compact .overview-step-copy small {
  display: none;
}

.overview-workspace,
.output-grid {
  display: grid;
  gap: 18px;
  margin-top: 16px;
}

.overview-workspace {
  grid-template-columns: minmax(300px, 1fr);
  align-items: stretch;
}

.output-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.output-result-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 16px;
}

.output-status-strip,
.output-result-hero {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--panel-soft);
}

.output-status-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
}

.output-status-strip h3,
.output-key-block h4,
.output-premise-block h4 {
  margin: 4px 0 0;
}

.output-status-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.output-status-actions,
.output-format-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.output-status-actions {
  position: relative;
}

.output-export-menu {
  background: rgba(4, 8, 18, 0.68);
}

.output-format-modal {
  width: min(540px, 100%);
}

.output-format-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.output-format-choice-grid .ghost-btn {
  min-height: 86px;
  padding: 14px;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  white-space: normal;
}

.output-format-choice-title,
.output-format-choice-detail {
  display: block;
}

.output-format-choice-title {
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}

.output-format-choice-detail {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.output-result-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.85fr) minmax(220px, 0.75fr);
  gap: 16px;
  padding: 20px;
}

.output-result-copy {
  min-width: 0;
}

.output-result-copy h3 {
  margin: 8px 0 0;
  font-size: 28px;
  line-height: 1.2;
}

.output-recommendation {
  margin: 12px 0 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
}

.output-key-block,
.output-premise-block {
  min-width: 0;
  border-radius: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.output-key-list,
.output-premise-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.output-key-item {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.output-key-item.muted {
  color: var(--muted);
}

.output-premise-item {
  display: grid;
  grid-template-columns: minmax(72px, 0.45fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--muted);
  line-height: 1.5;
}

.output-premise-item strong {
  color: var(--text);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.output-evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.output-secondary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

html[data-theme="light"] .output-status-strip,
html[data-theme="light"] .output-result-hero {
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(22, 34, 56, 0.12);
}

html[data-theme="light"] .output-export-menu {
  background: rgba(22, 34, 56, 0.38);
}

html[data-theme="light"] .output-key-block,
html[data-theme="light"] .output-premise-block,
html[data-theme="light"] .output-key-item {
  background: rgba(22, 34, 56, 0.04);
  border-color: rgba(22, 34, 56, 0.08);
}

.overview-heading {
  align-items: center;
}

.overview-heading-copy {
  max-width: 820px;
}

.overview-lead {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.overview-next-panel,
.overview-flow-panel,
.overview-status-panel {
  min-height: 100%;
  border-radius: 16px;
  padding: 16px;
  background: var(--panel-soft);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.overview-next-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: space-between;
}

.overview-next-panel h3 {
  margin: 0;
  font-size: 25px;
}

.overview-next-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.overview-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.overview-workflow-list,
.overview-status-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.overview-step {
  width: 100%;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  text-align: left;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.overview-step.active {
  border-color: rgba(242, 187, 82, 0.42);
  background: var(--accent-soft);
}

.overview-step.done {
  border-color: rgba(104, 213, 187, 0.3);
  background: var(--mint-soft);
}

.overview-step.ready {
  border-color: rgba(125, 187, 255, 0.28);
  background: rgba(125, 187, 255, 0.08);
}

.overview-step.blocked {
  color: var(--muted);
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.overview-step-index {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 800;
}

.overview-step-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.overview-step-copy strong,
.overview-status-item strong {
  overflow-wrap: anywhere;
}

.overview-step-copy small {
  color: var(--muted);
  line-height: 1.4;
}

.overview-status-item {
  display: grid;
  gap: 6px;
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.overview-status-item span {
  color: var(--muted);
  font-size: 12px;
}

.overview-card {
  text-align: left;
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.overview-card h3 {
  margin: 14px 0 0;
}

.overview-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.config-page-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 18px;
  margin-top: 16px;
}

.config-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.setup-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 18px;
  margin-top: 16px;
}

.materials-step-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  margin-top: 16px;
}

.materials-step-section {
  align-content: start;
}

.material-check-section {
  grid-column: 1 / -1;
}

.materials-goal-section,
.materials-source-section {
  align-self: start;
}

.materials-source-section {
  height: var(--materials-goal-panel-height, auto);
  max-height: var(--materials-goal-panel-height, none);
  min-height: 0;
  overflow: hidden;
}

.material-template-block {
  display: grid;
  gap: 12px;
}

.template-mode-note {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.template-mode-note {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.custom-meeting-fields {
  display: grid;
  gap: 12px;
}

.template-mode-note h4,
.template-mode-note p {
  margin: 0;
}

.template-mode-note p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.55;
}

.participant-setup-grid {
  grid-template-columns: minmax(0, 1fr);
}

.participant-recommendation-card,
.participant-members-card,
.participant-advanced-options {
  display: grid;
  gap: 14px;
}

.participant-material-note,
.participant-readiness-message,
.participant-reason {
  line-height: 1.6;
}

.participant-material-note.warning,
.participant-readiness-message.warning {
  color: var(--gold);
}

.participant-material-note.blocked,
.participant-readiness-message.blocked {
  color: #ffb0a7;
}

.recommended-agent-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.recommended-agent-item {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(104, 213, 187, 0.07);
  border: 1px solid rgba(104, 213, 187, 0.18);
  cursor: pointer;
}

.recommended-agent-item.active {
  background: rgba(246, 176, 58, 0.12);
  border-color: rgba(246, 176, 58, 0.42);
}

.recommended-agent-item input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--gold);
}

.agent-select-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.recommended-agent-item strong {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
}

.recommended-agent-item span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.recommended-agent-item em {
  font-size: 11px;
  font-style: normal;
  color: var(--gold);
}

.meeting-member-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.participant-member-card {
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: border-color 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
}

.participant-member-card[draggable="true"] {
  cursor: grab;
}

.participant-member-card.dragging {
  opacity: 0.62;
  cursor: grabbing;
}

.participant-member-card.drag-over {
  border-color: rgba(246, 176, 58, 0.78);
  transform: translateY(-1px);
}

.participant-member-main {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.participant-member-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.participant-member-title h4,
.participant-empty-state h4 {
  margin: 0;
}

.participant-role,
.participant-task,
.participant-empty-state p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 12px;
}

.participant-member-meta,
.participant-permissions,
.participant-member-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.model-chip {
  color: var(--muted);
}

.participant-order-chip,
.drag-handle {
  color: rgba(255, 255, 255, 0.78);
}

.drag-handle {
  font-size: 12px;
  cursor: grab;
  user-select: none;
}

.permission-chip.disabled {
  opacity: 0.58;
}

.participant-empty-state {
  min-width: 0;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.16);
}

.participant-advanced-options summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.participant-advanced-options summary::-webkit-details-marker {
  display: none;
}

.participant-advanced-options summary span:first-child {
  display: grid;
  gap: 4px;
}

.participant-advanced-options summary small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.participant-advanced-body {
  display: grid;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.advanced-option-card {
  display: grid;
  gap: 12px;
}

.settings-setup-grid {
  grid-template-columns: minmax(0, 1fr);
}

.setup-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.materials-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.materials-source-section .materials-panel {
  flex: 1 1 auto;
  min-height: 0;
}

.materials-source-section .material-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.materials-toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.material-main-action {
  color: var(--text);
  background: rgba(242, 187, 82, 0.12);
  border-color: rgba(242, 187, 82, 0.34);
}

.sample-material-action {
  margin-left: auto;
}

.template-list,
.tag-group,
.stage-list,
.consensus-list,
.log-list,
.agent-list,
.material-list,
.question-preview-list,
.agent-library,
.config-agent-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.template-card,
.stage-item,
.consensus-card,
.log-item,
.agent-card,
.setup-card,
.clarify-card,
.material-card,
.summary-card,
.question-preview-card,
.library-agent-card,
.config-agent-card {
  min-width: 0;
  border-radius: 16px;
  padding: 14px;
  background: var(--panel-soft);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

html[data-theme="light"] .overview-card,
html[data-theme="light"] .overview-next-panel,
html[data-theme="light"] .overview-flow-panel,
html[data-theme="light"] .overview-status-panel,
html[data-theme="light"] .template-card,
html[data-theme="light"] .stage-item,
html[data-theme="light"] .consensus-card,
html[data-theme="light"] .log-item,
html[data-theme="light"] .agent-card,
html[data-theme="light"] .setup-card,
html[data-theme="light"] .clarify-card,
html[data-theme="light"] .material-card,
html[data-theme="light"] .summary-card,
html[data-theme="light"] .question-preview-card,
html[data-theme="light"] .library-agent-card,
html[data-theme="light"] .config-agent-card {
  background: rgba(255, 255, 255, 0.56);
  border-color: rgba(22, 34, 56, 0.12);
}

html[data-theme="light"] .overview-step,
html[data-theme="light"] .overview-status-item,
html[data-theme="light"] .history-replay-item,
html[data-theme="light"] .history-replay-empty,
html[data-theme="light"] .history-replay-note,
html[data-theme="light"] .material-check-message,
html[data-theme="light"] .material-check-empty,
html[data-theme="light"] .template-mode-note,
html[data-theme="light"] .recommended-agent-item,
html[data-theme="light"] .participant-member-card,
html[data-theme="light"] .participant-empty-state {
  background: rgba(22, 34, 56, 0.045);
  border-color: rgba(22, 34, 56, 0.1);
}

html[data-theme="light"] .participant-order-chip,
html[data-theme="light"] .drag-handle {
  color: rgba(22, 34, 56, 0.72);
}

.template-card {
  text-align: left;
}

.template-card.active {
  background: rgba(244, 191, 79, 0.12);
  border-color: rgba(244, 191, 79, 0.35);
}

.template-card h4,
.consensus-card h4,
.stage-row h4,
.clarify-card h3 {
  margin: 0;
}

.template-card p,
.consensus-card p,
.stage-item p,
.clarify-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.template-agenda {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.active-history-card {
  background: rgba(244, 191, 79, 0.1);
  border-color: rgba(244, 191, 79, 0.36);
}

.wide-summary-card {
  grid-column: 1 / -1;
}

.history-replay-card {
  gap: 14px;
}

.history-replay-stages,
.history-replay-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.history-replay-timeline {
  display: grid;
  gap: 12px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.history-replay-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.history-replay-index {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 800;
}

.history-replay-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.history-replay-copy p,
.history-replay-note p,
.history-replay-empty p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.history-replay-copy small {
  color: #9fd7cc;
  line-height: 1.5;
}

.history-replay-empty,
.history-replay-note {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.history-replay-support {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.history-replay-support > div {
  display: grid;
  gap: 10px;
  align-content: start;
}

.history-replay-support h4 {
  margin: 0;
}

.setup-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.compact-title {
  margin-top: 4px;
}

.form-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--label-text);
}

.text-input,
.text-area {
  width: 100%;
  margin-top: 8px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 12, 24, 0.46);
  color: var(--text);
  padding: 12px 14px;
  outline: none;
}

html[data-theme="light"] .text-input,
html[data-theme="light"] .text-area {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(22, 34, 56, 0.18);
}

.text-area {
  resize: vertical;
}

.text-input:focus,
.text-area:focus {
  border-color: rgba(244, 191, 79, 0.4);
  box-shadow: 0 0 0 3px rgba(244, 191, 79, 0.12);
}

.inline-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.tag-group {
  flex-direction: row;
  flex-wrap: wrap;
}

.tag-group .tag button,
.tag button {
  all: unset;
}

.removable-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.remove-chip {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  color: var(--text);
  font-size: 11px;
  cursor: pointer;
}

.agent-library {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.saved-agent-library {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.library-agent-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.config-agent-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.library-agent-card.active {
  background: rgba(104, 213, 187, 0.12);
  border-color: rgba(104, 213, 187, 0.28);
}

.config-agent-card.active {
  background: rgba(244, 191, 79, 0.12);
  border-color: rgba(244, 191, 79, 0.32);
}

.library-agent-card h4 {
  margin: 0;
}

.library-agent-card p,
.config-agent-card p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 12px;
}

.library-toggle {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
}

.library-agent-card.active .library-toggle {
  background: var(--mint-soft);
  border-color: var(--mint-border);
  color: var(--mint-text);
}

.config-open-btn {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
}

.config-detail-card {
  min-height: 620px;
}

.prompt-guide-card {
  border-radius: 14px;
  padding: 14px;
  background: rgba(104, 213, 187, 0.08);
  border: 1px solid rgba(104, 213, 187, 0.18);
}

.prompt-guide-card h4 {
  margin: 0 0 8px;
}

.prompt-guide-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.prompt-guide-card p + p {
  margin-top: 8px;
}

.compact-guide {
  margin-top: -2px;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.permission-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.permission-item input {
  width: 16px;
  height: 16px;
}

.material-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.material-empty-state h4,
.material-check-column h4,
.material-check-empty h4 {
  margin: 0;
}

.material-check-message {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
}

.material-check-message strong {
  font-size: 15px;
}

.material-check-message p,
.material-check-empty p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.material-check-message.ready {
  background: var(--mint-soft);
  border-color: var(--mint-border);
}

.material-check-message.warning {
  background: rgba(242, 187, 82, 0.12);
  border-color: rgba(242, 187, 82, 0.28);
}

.material-check-message.blocked {
  background: var(--danger-soft);
  border-color: rgba(255, 122, 109, 0.28);
}

.material-check-pill.ready {
  background: var(--mint-soft);
  border-color: var(--mint-border);
  color: var(--mint-text);
}

.material-check-pill.warning {
  background: rgba(242, 187, 82, 0.14);
  border-color: rgba(242, 187, 82, 0.3);
}

.material-check-pill.blocked {
  background: var(--danger-soft);
  color: var(--danger-text);
}

.material-check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.material-check-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.material-check-empty {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.12);
}

.material-head,
.summary-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.material-name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.material-meta,
.summary-card p,
.question-preview-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.material-tags,
.question-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.material-tags .tag,
.question-tags .tag,
.tag-group .tag {
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.material-check-column .summary-grid {
  grid-template-columns: 1fr;
}

.summary-card h4,
.question-preview-card h4 {
  margin: 0;
}

.question-preview-card {
  border-style: dashed;
  overflow-wrap: anywhere;
}

.panel-heading,
.subpanel-title,
.board-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.panel-heading h2,
.board-head h2,
.subpanel-title h3 {
  margin: 6px 0 0;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(520px, 1.65fr) minmax(280px, 0.82fr);
  align-items: start;
  grid-auto-rows: min-content;
  gap: 14px;
}

.room-decision-workspace {
  grid-template-columns: minmax(420px, 1.28fr) minmax(320px, 0.88fr) minmax(340px, 0.92fr);
}

.workspace-grid > *,
.room-bottom-grid > *,
.console-grid > *,
.panel,
.subpanel {
  min-width: 0;
}

.room-bottom-grid > .subpanel {
  min-height: 0;
  overflow: auto;
}

.room-bottom-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr 0.85fr 0.95fr;
  grid-auto-rows: minmax(0, clamp(420px, 58vh, 680px));
  align-items: stretch;
  gap: 18px;
  margin-top: 18px;
}

.room-decision-support {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(0, clamp(340px, 46vh, 520px));
}

.room-control-console {
  margin-top: 18px;
}

.room-control-summary {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.room-control-summary::-webkit-details-marker {
  display: none;
}

.room-control-summary span:first-child {
  display: grid;
  gap: 4px;
}

.room-control-summary strong {
  font-size: 16px;
}

.room-control-console[open] .console-grid {
  margin-top: 16px;
}

.console-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.05fr 1fr;
  gap: 18px;
  margin-top: 16px;
}

.console-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.console-stat-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.console-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.console-label {
  font-size: 12px;
  color: var(--muted);
}

.console-stat strong {
  font-size: 15px;
  line-height: 1.5;
}

.console-range-label {
  font-size: 13px;
  color: var(--muted);
}

.console-range {
  width: 100%;
  accent-color: #f2bb52;
}

.console-actions {
  margin-top: auto;
}

.room-progress-strip {
  margin-top: 18px;
}

.side-panel,
.speaker-side-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-panel {
  align-self: start;
  height: var(--room-main-panel-height, var(--room-workspace-panel-height));
  min-height: 0;
  max-height: var(--room-main-panel-height, var(--room-workspace-panel-height));
  overflow: hidden;
}

.side-panel .panel-heading,
.side-panel .panel-footer {
  flex: 0 0 auto;
}

.side-panel .agent-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.meeting-progress-panel {
  align-self: start;
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
}

.discussion-flow-panel .board-head {
  align-items: flex-start;
}

.meeting-progress-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
  min-height: 0;
}

.progress-top-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 860px;
  min-height: 0;
  justify-content: flex-start;
}

.progress-stage-summary {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.generation-progress-panel {
  border: 1px solid rgba(133, 180, 255, 0.24);
  border-radius: 18px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(28, 50, 86, 0.82), rgba(24, 35, 52, 0.9)),
    rgba(255, 255, 255, 0.04);
  box-shadow: 0 18px 36px rgba(4, 8, 18, 0.22);
}

.generation-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.generation-progress-head h3 {
  margin: 4px 0 0;
  font-size: 18px;
}

.generation-refresh-notice {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.generation-refresh-notice h3 {
  margin: 4px 0 0;
  font-size: 18px;
}

.generation-refresh-notice .ghost-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.status-chip.warning {
  color: #ffd8bd;
  background: rgba(255, 128, 80, 0.16);
  border-color: rgba(255, 153, 102, 0.32);
}

.generation-progress-detail {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.generation-progress-meter {
  height: 8px;
  margin: 14px 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.generation-progress-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6ee7b7, #93c5fd);
  transition: width 220ms ease;
}

.generation-agent-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.generation-agent-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.generation-agent-chip strong,
.generation-agent-chip em {
  min-width: 0;
  overflow-wrap: anywhere;
}

.generation-agent-chip em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.generation-agent-chip.running {
  border-color: rgba(147, 197, 253, 0.48);
  background: rgba(59, 130, 246, 0.16);
}

.generation-agent-chip.complete {
  border-color: rgba(110, 231, 183, 0.42);
  background: rgba(16, 185, 129, 0.14);
}

.generation-agent-chip.error {
  border-color: rgba(255, 153, 102, 0.42);
  background: rgba(255, 128, 80, 0.14);
}

.generation-event-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.generation-event-item {
  display: grid;
  grid-template-columns: minmax(84px, 130px) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  font-size: 13px;
}

.generation-event-item span {
  color: #b6cdfa;
}

.generation-event-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.progress-main-canvas {
  position: relative;
  flex: 0 0 auto;
  aspect-ratio: 1507 / 1044;
  min-height: 0;
  width: 100%;
  border-radius: 28px;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, #9b633e 0%, #845331 28%, #6f4627 100%);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.04);
}

.speaker-side-panel {
  align-self: start;
  height: var(--room-main-panel-height, var(--room-workspace-panel-height));
  min-height: 0;
  max-height: var(--room-main-panel-height, var(--room-workspace-panel-height));
  overflow: hidden;
  display: grid;
  grid-template-rows: var(--room-top-band-height) minmax(0, 1fr) auto;
}

.current-decision-panel {
  align-self: start;
  height: var(--room-main-panel-height, var(--room-workspace-panel-height));
  max-height: var(--room-main-panel-height, var(--room-workspace-panel-height));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.current-decision-panel .clarify-card {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.current-decision-panel .clarify-actions {
  flex: 0 0 auto;
  padding-top: 4px;
}

.decision-card-helper {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.speaker-side-panel .controls {
  flex: 0 0 auto;
}

.speaker-side-panel > * {
  min-width: 0;
  width: 100%;
}

.speaker-header {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 18px;
  min-height: var(--room-top-band-height);
}

.discussion-stream-panel .speaker-header {
  min-height: var(--room-top-band-height);
}

.chat-meta {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.chat-meta > div {
  min-width: 0;
}

.speaker-header .tag {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.chat-panel {
  min-height: 0;
  height: 100%;
  max-height: none;
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(18, 25, 46, 0.92), rgba(11, 16, 31, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: auto;
}

html[data-theme="light"] .chat-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(238, 244, 252, 0.82));
  border-color: rgba(22, 34, 56, 0.12);
}

.chat-row {
  display: flex;
}

.host-row {
  justify-content: flex-start;
}

.speaker-row {
  justify-content: flex-end;
}

.chat-bubble {
  max-width: 88%;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 18px;
  line-height: 1.7;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.host-bubble {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

html[data-theme="light"] .host-bubble {
  background: rgba(22, 34, 56, 0.045);
  border-color: rgba(22, 34, 56, 0.1);
  color: var(--muted);
}

.speaker-bubble {
  background: linear-gradient(180deg, rgba(255, 217, 122, 0.18), rgba(216, 133, 52, 0.13));
  border: 1px solid rgba(242, 187, 82, 0.24);
  color: var(--text);
}

html[data-theme="light"] .speaker-bubble {
  background: linear-gradient(180deg, rgba(255, 246, 222, 0.94), rgba(246, 233, 205, 0.9));
  border-color: rgba(187, 107, 29, 0.2);
}

.speaker-bubble.current {
  border-color: rgba(255, 214, 102, 0.4);
  box-shadow: 0 0 0 1px rgba(255, 214, 102, 0.16);
}

.message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
  margin-bottom: 8px;
  font-size: 11px;
  color: var(--muted);
}

.message-meta span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.message-agent {
  font-weight: 700;
  color: var(--message-agent-text);
}

.message-impact {
  margin-top: 10px;
  font-size: 12px;
  color: var(--message-impact-text);
  overflow-wrap: anywhere;
}

.speaker-loading-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(242, 187, 82, 0.22);
  color: var(--text);
  line-height: 1.6;
}

.speaker-loading-card p {
  margin: 0;
  color: var(--muted);
}

.loading-dots {
  display: flex;
  gap: 7px;
  align-items: center;
  min-height: 18px;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  animation: loadingPulse 1s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.16s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.32s;
}

.loading-agent-models {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.loading-agent-models span {
  padding: 6px 9px;
  border-radius: 9px;
  background: rgba(104, 213, 187, 0.12);
  color: var(--mint-text);
  font-size: 12px;
}

@keyframes loadingPulse {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.42;
  }
  50% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.bubble-label {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(104, 213, 187, 0.16);
  color: var(--bubble-label-text);
  font-size: 11px;
  font-weight: 700;
}

.chat-panel::-webkit-scrollbar {
  width: 8px;
}

.chat-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.console-summary-card h4 {
  margin: 0 0 6px;
}

.console-summary-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.subpanel {
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.compact-subpanel {
  padding: 12px;
}

.focus-subpanel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  border-color: rgba(244, 191, 79, 0.16);
}

.compact-list {
  gap: 8px;
}

.compact-list .stage-item,
.compact-list .consensus-card {
  padding: 10px 12px;
}

.compact-list .stage-item p,
.compact-list .consensus-card p {
  font-size: 12px;
  line-height: 1.45;
}

.stage-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.stage-list .stage-item {
  min-height: 118px;
  padding: 10px;
}

.stage-list .stage-row {
  align-items: flex-start;
}

.stage-list .stage-row h4 {
  font-size: 13px;
  line-height: 1.35;
}

.stage-list .stage-item p {
  font-size: 11px;
  line-height: 1.4;
}

.stage-list .pill {
  display: none;
}

.progress-strip-list {
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  align-items: stretch;
}

.progress-strip-list .stage-item {
  min-height: 92px;
}

.log-subpanel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.issue-subpanel {
  min-height: 0;
}

.member-support-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.member-support-panel .agent-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.member-support-panel .panel-footer {
  flex: 0 0 auto;
  margin-top: 12px;
}

.log-scroll {
  flex: 1 1 0;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding-right: 4px;
}

.log-scroll::-webkit-scrollbar {
  width: 8px;
}

.log-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.log-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.issue-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-wrap: anywhere;
}

.issue-card h4 {
  margin: 0;
}

.issue-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.log-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.log-agent-name {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
}

.log-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}

.agent-card {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 12px;
  align-items: center;
}

.agent-avatar,
.room-agent-avatar,
.speaker-avatar {
  display: grid;
  place-items: center;
  overflow: visible;
}

.agent-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: transparent;
  border: 0;
}

.agent-avatar img,
.speaker-avatar img {
  display: block;
}

.agent-name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.agent-role {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.agent-model-control {
  width: min(100%, 190px);
  display: grid;
  gap: 5px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
}

.agent-model-select {
  width: 100%;
  min-height: 34px;
  padding: 6px 28px 6px 10px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 15, 29, 0.9);
  color: var(--text);
  font-size: 12px;
}

html[data-theme="light"] .agent-model-select {
  background: rgba(255, 255, 255, 0.84);
  border-color: rgba(22, 34, 56, 0.16);
  color: var(--text);
}

.agent-state {
  font-size: 11px;
  padding: 6px 8px;
  border-radius: 10px;
  background: var(--mint-soft);
  border: 1px solid var(--mint-border);
  color: var(--mint-text);
}

.board-panel {
  overflow: hidden;
}

.board-topic {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  min-width: 240px;
}

.topic-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.room-generated-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: saturate(0.92) brightness(0.95) contrast(0.98);
}

.room-scene-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 11, 22, 0.12), rgba(7, 11, 22, 0.28)),
    radial-gradient(circle at center, rgba(7, 11, 22, 0.02) 32%, rgba(7, 11, 22, 0.22) 100%);
}

.room-agents {
  position: absolute;
  inset: 0;
  z-index: 4;
  touch-action: none;
}

.room-agent {
  position: absolute;
  width: 120px;
  height: 144px;
  text-align: center;
  transform: translate(-50%, -50%) rotate(var(--agent-rotate, 0deg)) scale(var(--agent-scale, 1));
  transform-origin: center center;
  cursor: grab;
  user-select: none;
}

.room-agent.dragging {
  cursor: grabbing;
  filter: drop-shadow(0 10px 18px rgba(5, 10, 22, 0.22));
}

.room-agent-avatar {
  width: 112px;
  height: 128px;
  margin: 0 auto;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  font-size: 28px;
}

.agent-cutout {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.room-cutout {
  filter: drop-shadow(0 8px 12px rgba(6, 10, 24, 0.24));
  image-rendering: pixelated;
  transform: scaleX(var(--agent-flip, 1));
  transform-origin: center center;
}

.sidebar-cutout {
  width: 52px;
  height: 52px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 4px 10px rgba(8, 12, 24, 0.2));
}

.speaker-cutout {
  width: 86px;
  height: 86px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 8px 14px rgba(8, 12, 24, 0.24));
}

.room-agent-status {
  position: absolute;
  left: 50%;
  top: -10px;
  transform: translate(-50%, -100%);
  width: fit-content;
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(8, 12, 24, 0.74);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.room-agent-name {
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  transform: translateX(-50%);
  padding: 3px 7px;
  border-radius: 9px;
  background: rgba(15, 21, 39, 0.8);
  font-size: 10px;
  white-space: nowrap;
}

.room-agent-label {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 260;
  min-width: max-content;
  max-width: 150px;
  padding: 6px 9px;
  border-radius: 12px;
  background: rgba(10, 15, 28, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 18px rgba(5, 10, 22, 0.24);
  color: #f7fbff;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1.1;
  white-space: nowrap;
}

.room-agent-label.below {
  transform: translate(-50%, 88px);
}

.room-agent-label.above {
  transform: translate(-50%, -94px);
}

.room-agent-label.right {
  transform: translate(76px, -50%);
}

.room-agent-label.left {
  transform: translate(calc(-100% - 76px), -50%);
}

.room-agent-label strong {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.room-agent-label span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: rgba(234, 241, 255, 0.78);
}

.room-agent-label.current {
  background: rgba(36, 54, 92, 0.92);
  border-color: rgba(147, 197, 253, 0.42);
  box-shadow:
    0 10px 20px rgba(5, 10, 22, 0.28),
    0 0 0 2px rgba(147, 197, 253, 0.12);
}

.stage-item.active,
.clarify-card.active,
.consensus-card.pending {
  background: var(--accent-soft);
  border-color: rgba(244, 191, 79, 0.3);
}

.stage-item.done {
  background: var(--mint-soft);
}

.stage-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.stage-index {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  font-size: 12px;
}

.divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.clarify-card {
  min-height: 280px;
}

.clarify-status-row,
.clarify-meta,
.clarify-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.card-section {
  margin-top: 14px;
}

.card-section strong {
  display: block;
  margin-bottom: 8px;
  color: #eaf1ff;
}

.clarify-question {
  margin-top: 12px;
  font-size: 18px;
  line-height: 1.6;
}

.clarify-recommendation {
  margin-top: 14px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(115, 165, 255, 0.14);
  border: 1px solid rgba(115, 165, 255, 0.18);
}

.clarify-options {
  margin-top: 14px;
}

.option-chip {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
}

.option-chip.selected {
  background: var(--mint-soft);
  border-color: rgba(104, 213, 187, 0.3);
}

.clarify-card .text-area {
  margin-top: 10px;
  min-height: 112px;
}

.clarify-helper {
  margin-top: 10px;
  font-size: 12px;
  color: #9fd7cc;
}

.clarify-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.clarify-history-item {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.clarify-history-item p {
  margin: 8px 0 0;
}

.decision-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}

.decision-item {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.decision-item p {
  margin: 6px 0 0;
}

.speaker-avatar {
  width: 86px;
  height: 86px;
  flex: 0 0 86px;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.pixel-agent {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 42px;
  min-height: 42px;
}

.pixel-agent-shadow {
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 50%;
  height: 10px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
}

.pixel-agent-head,
.pixel-agent-hair,
.pixel-agent-face,
.pixel-agent-body,
.pixel-agent-arms,
.pixel-agent-legs,
.pixel-agent-prop,
.pixel-agent-badge {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.pixel-agent-head {
  top: 10%;
  width: 38%;
  height: 30%;
  border-radius: 16px 16px 12px 12px;
  background: #ead2ba;
  z-index: 2;
}

.pixel-agent-hair {
  top: 5%;
  width: 42%;
  height: 22%;
  border-radius: 16px 16px 9px 9px;
  z-index: 3;
}

.pixel-agent-body {
  top: 34%;
  width: 48%;
  height: 38%;
  border-radius: 16px 16px 18px 18px;
  z-index: 1;
}

.pixel-agent-face {
  top: 20%;
  width: 28%;
  height: 10%;
  z-index: 4;
}

.pixel-agent-eye {
  position: absolute;
  top: 2px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #202536;
}

.pixel-agent-eye.eye-left {
  left: 0;
}

.pixel-agent-eye.eye-right {
  right: 0;
}

.pixel-agent-arms {
  top: 40%;
  width: 66%;
  height: 10%;
  z-index: 0;
}

.pixel-agent-arms::before,
.pixel-agent-arms::after,
.pixel-agent-legs::before,
.pixel-agent-legs::after,
.pixel-agent-prop::before,
.pixel-agent-prop::after {
  content: "";
  position: absolute;
}

.pixel-agent-arms::before,
.pixel-agent-arms::after {
  top: 0;
  width: 16px;
  height: 10px;
  border-radius: 10px;
  background: inherit;
}

.pixel-agent-arms::before {
  left: 0;
  transform: rotate(14deg);
}

.pixel-agent-arms::after {
  right: 0;
  transform: rotate(-14deg);
}

.pixel-agent-legs {
  top: 67%;
  width: 34%;
  height: 14%;
  z-index: 0;
}

.pixel-agent-legs::before,
.pixel-agent-legs::after {
  bottom: 0;
  width: 10px;
  height: 16px;
  border-radius: 0 0 10px 10px;
  background: #2b3144;
}

.pixel-agent-legs::before {
  left: 2px;
}

.pixel-agent-legs::after {
  right: 2px;
}

.pixel-agent-prop {
  top: 28%;
  width: 64%;
  height: 44%;
  z-index: 5;
  pointer-events: none;
}

.pixel-agent-badge {
  top: 42%;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff5df;
  font-size: 13px;
  font-weight: 800;
  z-index: 4;
  background: rgba(17, 23, 42, 0.22);
}

.pixel-agent.sidebar .pixel-agent-head {
  width: 40%;
  height: 32%;
}

.pixel-agent.sidebar .pixel-agent-body {
  width: 52%;
  height: 40%;
}

.pixel-agent.sidebar .pixel-agent-prop,
.pixel-agent.speaker .pixel-agent-prop {
  opacity: 0.92;
}

.pixel-agent.speaker .pixel-agent-head {
  width: 42%;
  height: 34%;
}

.pixel-agent.speaker .pixel-agent-body {
  width: 54%;
  height: 42%;
}

.pixel-agent.tone-fair .pixel-agent-head {
  background: #f0d8c0;
}

.pixel-agent.tone-warm .pixel-agent-head {
  background: #ddb494;
}

.pixel-agent.tone-tan .pixel-agent-head {
  background: #c6926f;
}

.pixel-agent.tone-neutral .pixel-agent-head {
  background: #dec1a8;
}

.pixel-agent.hair-dark .pixel-agent-hair {
  background: #1b2031;
}

.pixel-agent.hair-brown .pixel-agent-hair {
  background: #65412f;
}

.pixel-agent.hair-teal .pixel-agent-hair {
  background: #0f6d67;
}

.pixel-agent.hair-red .pixel-agent-hair {
  background: #9c4334;
}

.pixel-agent.hair-blue .pixel-agent-hair {
  background: #325889;
}

.pixel-agent.hair-silver .pixel-agent-hair {
  background: #79879b;
}

.pixel-agent.outfit-navy .pixel-agent-body {
  background: linear-gradient(180deg, #465b88, #2e3e61);
}

.pixel-agent.outfit-cocoa .pixel-agent-body {
  background: linear-gradient(180deg, #81624d, #624535);
}

.pixel-agent.outfit-green .pixel-agent-body {
  background: linear-gradient(180deg, #2c8d6b, #1d624d);
}

.pixel-agent.outfit-maroon .pixel-agent-body {
  background: linear-gradient(180deg, #8f4a48, #663131);
}

.pixel-agent.outfit-blue .pixel-agent-body {
  background: linear-gradient(180deg, #4670aa, #2d4e76);
}

.pixel-agent.outfit-charcoal .pixel-agent-body {
  background: linear-gradient(180deg, #666f7d, #444b57);
}

.pixel-agent.outfit-navy .pixel-agent-arms::before,
.pixel-agent.outfit-navy .pixel-agent-arms::after {
  background: #3d5078;
}

.pixel-agent.outfit-cocoa .pixel-agent-arms::before,
.pixel-agent.outfit-cocoa .pixel-agent-arms::after {
  background: #70513f;
}

.pixel-agent.outfit-green .pixel-agent-arms::before,
.pixel-agent.outfit-green .pixel-agent-arms::after {
  background: #237657;
}

.pixel-agent.outfit-maroon .pixel-agent-arms::before,
.pixel-agent.outfit-maroon .pixel-agent-arms::after {
  background: #7b403e;
}

.pixel-agent.outfit-blue .pixel-agent-arms::before,
.pixel-agent.outfit-blue .pixel-agent-arms::after {
  background: #3b6193;
}

.pixel-agent.outfit-charcoal .pixel-agent-arms::before,
.pixel-agent.outfit-charcoal .pixel-agent-arms::after {
  background: #5a6371;
}

.pixel-agent.accent-gold .pixel-agent-badge {
  background: rgba(242, 187, 82, 0.3);
}

.pixel-agent.accent-mint .pixel-agent-badge {
  background: rgba(104, 213, 187, 0.28);
}

.pixel-agent.accent-amber .pixel-agent-badge {
  background: rgba(255, 161, 71, 0.32);
}

.pixel-agent.accent-sky .pixel-agent-badge {
  background: rgba(115, 165, 255, 0.28);
}

.pixel-agent.accent-rose .pixel-agent-badge {
  background: rgba(255, 122, 109, 0.28);
}

.profile-strategy .pixel-agent-prop::before {
  right: 2px;
  top: 4px;
  width: 12px;
  height: 18px;
  border-radius: 4px;
  background: #d8c9a2;
  border: 2px solid rgba(71, 52, 25, 0.45);
}

.profile-consumer .pixel-agent-hair {
  height: 26%;
  border-radius: 16px 16px 14px 14px;
}

.profile-consumer .pixel-agent-prop::before,
.profile-content .pixel-agent-prop::before {
  right: 0;
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.08);
}

.profile-consumer .pixel-agent-prop::after,
.profile-content .pixel-agent-prop::after {
  right: 4px;
  top: 20px;
  width: 8px;
  height: 6px;
  border-radius: 0 0 8px 8px;
  background: rgba(255, 255, 255, 0.86);
  transform: rotate(28deg);
}

.profile-content .pixel-agent-hair {
  width: 46%;
  height: 25%;
}

.profile-delivery .pixel-agent-prop::before {
  left: -2px;
  top: 16px;
  width: 16px;
  height: 10px;
  border-radius: 6px;
  background: #ffd35a;
  border: 2px solid rgba(101, 69, 17, 0.34);
}

.profile-data .pixel-agent-prop::before {
  right: -1px;
  top: 8px;
  width: 16px;
  height: 12px;
  border-radius: 3px;
  background: #dbe5f6;
  border: 2px solid rgba(53, 77, 111, 0.3);
}

.profile-data .pixel-agent-prop::after {
  right: 3px;
  top: 12px;
  width: 10px;
  height: 2px;
  background: #4c6fa3;
  box-shadow: 0 4px 0 #4c6fa3, 0 8px 0 #4c6fa3;
}

.profile-boss .pixel-agent-prop::before {
  left: 50%;
  top: -2px;
  width: 30px;
  height: 10px;
  transform: translateX(-50%);
  border-radius: 12px 12px 0 0;
  background: rgba(255, 255, 255, 0.88);
}

.profile-boss .pixel-agent-prop::after {
  left: 50%;
  top: 6px;
  width: 16px;
  height: 6px;
  transform: translateX(-50%);
  border-radius: 0 0 6px 6px;
  background: rgba(255, 255, 255, 0.88);
}

.status-text {
  display: inline-block;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.status-dot-speaking {
  background: #8cffcf;
}

.status-dot-thinking {
  background: #cbdcff;
}

.status-dot-challenge {
  background: #ffd0cb;
}

.status-dot-analysis,
.status-dot-responding {
  background: #cddbff;
}

.status-dot-listening,
.status-dot-idle {
  background: rgba(255, 255, 255, 0.66);
}

.room-agent.current .pixel-agent-body,
.speaker-avatar .pixel-agent-body {
  box-shadow: 0 0 0 3px rgba(255, 209, 91, 0.16);
}

.room-agent.current .pixel-agent {
  animation: bounce 1.4s infinite ease-in-out;
}

.room-agent.current .room-cutout {
  filter:
    drop-shadow(0 8px 12px rgba(6, 10, 24, 0.24))
    drop-shadow(0 0 12px rgba(255, 209, 91, 0.28));
  animation: bounce 1.4s infinite ease-in-out;
}

.room-agent-status.status-speaking {
  background: rgba(17, 97, 92, 0.86);
}

.room-agent-label.status-speaking {
  background: rgba(17, 97, 92, 0.9);
}

.room-agent-status.status-speaking .status-dot {
  animation: pulseDot 1s infinite;
}

.room-agent-label.status-speaking .status-dot {
  animation: pulseDot 1s infinite;
}

.room-agent-status.status-thinking {
  background: rgba(35, 56, 93, 0.82);
}

.room-agent-label.status-thinking {
  background: rgba(35, 56, 93, 0.9);
}

.room-agent-status.status-thinking .status-dot {
  animation: blinkDot 1.4s infinite;
}

.room-agent-label.status-thinking .status-dot {
  animation: blinkDot 1.4s infinite;
}

.room-agent-status.status-challenge {
  background: rgba(130, 57, 43, 0.9);
}

.room-agent-label.status-challenge {
  background: rgba(130, 57, 43, 0.92);
}

.room-agent-status.status-responding,
.room-agent-status.status-analysis {
  background: rgba(70, 78, 123, 0.88);
}

.room-agent-label.status-responding,
.room-agent-label.status-analysis {
  background: rgba(70, 78, 123, 0.92);
}

.room-agent-status.status-listening,
.room-agent-status.status-idle {
  background: rgba(8, 12, 24, 0.74);
}

.room-agent-label.status-listening,
.room-agent-label.status-idle {
  background: rgba(8, 12, 24, 0.86);
}

.tag.warning {
  background: var(--danger-soft);
  color: var(--danger-text);
}

.tag.mint {
  background: var(--mint-soft);
  border-color: var(--mint-border);
  color: var(--mint-text);
}

.tag.blue {
  background: var(--blue-soft);
  border-color: var(--blue-border);
  color: var(--blue-text);
}

.status-chip.online,
.status-chip.active {
  background: var(--mint-soft);
  border-color: var(--mint-border);
  color: var(--mint-text);
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes pulseDot {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.35);
    opacity: 0.72;
  }
}

@keyframes blinkDot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

@media (max-width: 1360px) {
  .workspace-grid {
    grid-template-columns: minmax(200px, 0.7fr) minmax(460px, 1.55fr) minmax(260px, 0.85fr);
  }

  .room-decision-workspace {
    grid-template-columns: minmax(360px, 1.05fr) minmax(300px, 0.9fr) minmax(320px, 0.9fr);
  }

  .console-grid,
  .room-bottom-grid {
    grid-template-columns: 1fr 1fr;
  }

  .setup-grid,
  .config-page-grid {
    grid-template-columns: 1fr;
  }

  .overview-workspace,
  .output-grid {
    grid-template-columns: 1fr 1fr;
  }

  .output-result-hero,
  .output-evidence-grid,
  .output-secondary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .output-result-copy {
    grid-column: 1 / -1;
  }

  .meeting-workspace-header .overview-workflow-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-next-panel {
    grid-column: 1 / -1;
  }

  .stage-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .topbar,
  .workspace-grid,
  .inline-fields,
  .summary-grid,
  .materials-step-grid,
  .material-check-grid {
    grid-template-columns: 1fr;
  }

  .sample-material-action {
    margin-left: 0;
  }

  .template-mode-note {
    grid-template-columns: 1fr;
  }

  .materials-source-section {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .materials-source-section .material-list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .workspace-grid,
  .room-bottom-grid,
  .console-grid {
    gap: 14px;
  }

  .agent-library {
    grid-template-columns: 1fr;
  }

  .permission-grid {
    grid-template-columns: 1fr;
  }

  .overview-workspace,
  .meeting-workspace-grid,
  .output-grid,
  .output-status-strip,
  .output-result-hero,
  .output-evidence-grid,
  .output-secondary-grid,
  .console-grid,
  .room-bottom-grid {
    grid-template-columns: 1fr;
  }

  .output-status-meta,
  .output-status-actions,
  .output-format-actions {
    justify-content: flex-start;
  }

  .output-export-menu {
    padding: 12px;
  }

  .output-format-choice-grid {
    grid-template-columns: 1fr;
  }

  .room-bottom-grid {
    grid-auto-rows: auto;
  }

  .stage-list {
    grid-template-columns: 1fr;
  }

  .progress-strip-list {
    grid-template-columns: 1fr;
  }

  .agent-card {
    grid-template-columns: 52px 1fr;
  }

  .agent-state {
    grid-column: 2;
    justify-self: start;
  }

  .agent-model-control {
    width: 100%;
  }

  .topbar-actions,
  .controls,
  .setup-actions,
  .clarify-actions {
    justify-content: flex-start;
  }

  .meeting-progress-panel,
  .speaker-side-panel,
  .current-decision-panel {
    height: auto;
    min-height: auto;
    max-height: none;
  }

  .side-panel {
    height: auto;
    max-height: none;
  }

  .speaker-side-panel {
    grid-template-rows: auto minmax(260px, auto) auto;
  }

  .speaker-header {
    min-height: 0;
  }

  .chat-panel {
    height: auto;
    max-height: min(62vh, 520px);
  }

  .panel-heading,
  .subpanel-title,
  .board-head {
    flex-wrap: wrap;
  }

  .panel-heading > *,
  .subpanel-title > *,
  .board-head > *,
  .topbar-actions,
  .controls,
  .clarify-actions {
    min-width: 0;
  }

  .progress-main-canvas {
    min-height: 420px;
  }

  .board-room {
    min-height: 520px;
  }

  .log-scroll {
    max-height: 180px;
  }

  .room-table {
    width: 74%;
    height: 48%;
  }

  .room-agent {
    transform: translate(-50%, -50%) scale(0.9);
    transform-origin: center;
  }

  .room-agent-label {
    max-width: 132px;
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 12px;
  }

  .panel {
    border-radius: 16px;
  }

  .board-head {
    flex-direction: column;
    align-items: stretch;
  }

  .board-topic {
    min-width: 0;
    width: 100%;
  }

  .progress-main-canvas {
    min-height: 360px;
    border-radius: 20px;
  }

  .speaker-header {
    gap: 12px;
  }

  .speaker-avatar {
    width: 64px;
    height: 64px;
    flex-basis: 64px;
  }

  .speaker-cutout {
    width: 64px;
    height: 64px;
  }

  .chat-meta {
    align-items: flex-start;
  }

  .chat-panel {
    padding: 12px;
    gap: 12px;
  }

  .chat-row,
  .host-row,
  .speaker-row {
    justify-content: stretch;
  }

  .chat-bubble {
    max-width: 100%;
    padding: 12px;
    font-size: 14px;
  }

  .speaker-side-panel .tag,
  .speaker-side-panel .pill,
  .room-agent-label,
  .room-bottom-grid .tag,
  .room-bottom-grid .pill {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .room-bottom-grid .topbar-actions,
  .speaker-side-panel .controls,
  .clarify-actions {
    width: 100%;
    align-items: stretch;
  }

  .room-bottom-grid .topbar-actions .pill,
  .room-bottom-grid .topbar-actions button,
  .speaker-side-panel .controls button,
  .clarify-actions button {
    flex: 1 1 130px;
    min-width: 0;
  }

  .generation-progress-head {
    flex-direction: column;
    align-items: stretch;
  }

  .generation-refresh-notice {
    flex-direction: column;
    align-items: stretch;
  }

  .generation-refresh-notice .ghost-btn {
    width: 100%;
  }

  .generation-event-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .overview-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .draft-modal-backdrop {
    padding: 12px;
  }

  .draft-modal {
    padding: 14px;
    border-radius: 14px;
  }

  .draft-modal-actions {
    justify-content: stretch;
  }

  .draft-modal-actions button {
    flex: 1 1 140px;
  }

  .overview-step {
    grid-template-columns: 30px 1fr;
  }

  .overview-step .tag {
    grid-column: 2;
    justify-self: start;
  }

  .history-replay-support {
    grid-template-columns: 1fr;
  }

  .history-replay-item {
    grid-template-columns: 30px 1fr;
    padding: 10px;
  }
}
