:root {
  color-scheme: dark;
  --bg: #111317;
  --panel: #1b1e24;
  --panel-2: #232832;
  --text: #f5f0e6;
  --muted: #b9afa0;
  --line: #333946;
  --accent: #f2c14e;
  --danger: #f06a6a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

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

button {
  min-height: 40px;
  border: 1px solid #d6a934;
  border-radius: 6px;
  background: var(--accent);
  color: #19150c;
  font-weight: 700;
  cursor: pointer;
}

button:not(:disabled):hover {
  filter: brightness(1.08);
}

button.secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

button.danger {
  background: var(--danger);
  border-color: #be4d4d;
  color: #1f0c0c;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button.tiny {
  min-height: 30px;
  padding: 0 10px;
  background: transparent;
  color: var(--accent);
  border-color: #5d5230;
  font-size: 12px;
}

.icon-button {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
}

.icon-button:not(:disabled):hover {
  border-color: #5d5230;
  background: #20242c;
  color: var(--accent);
}

.icon-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button.active {
  background: var(--accent);
  border-color: #d6a934;
  color: #19150c;
}

.app-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

body.room-open .app-shell {
  padding-top: 12px;
}

.hidden {
  display: none !important;
}

.entry {
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: 1fr minmax(320px, 440px);
  gap: 48px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
}

h1,
h2 {
  margin: 0;
}

.brand h1 {
  font-size: clamp(34px, 6vw, 64px);
}

.lede {
  max-width: 620px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

[contenteditable="true"] {
  outline: none;
}

.brand [contenteditable="true"] {
  border-radius: 6px;
}

.brand [contenteditable="true"]:focus {
  box-shadow: 0 0 0 2px #5d5230;
}

.entry-form,
.participants-panel,
.chat-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.entry-form {
  padding: 20px;
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #13161b;
  color: var(--text);
  padding: 11px 12px;
}

input[type="range"] {
  appearance: none;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  accent-color: var(--accent);
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border: 1px solid #303746;
  border-radius: 999px;
  background: linear-gradient(90deg, #3d3315, #151920);
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border: 2px solid #11151b;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 1px #5d5230;
}

input[type="range"]:hover::-webkit-slider-thumb {
  background: #ffd45c;
}

input[type="range"]:disabled {
  cursor: default;
  opacity: 0.48;
}

input[type="range"]:disabled::-webkit-slider-runnable-track {
  border-color: #262c38;
  background: linear-gradient(90deg, #242833, #151920);
}

input[type="range"]:disabled::-webkit-slider-thumb {
  background: #5f6673;
  box-shadow: none;
}

input[type="range"]:disabled:hover::-webkit-slider-thumb {
  background: #5f6673;
}

input[type="range"]::-moz-range-track {
  height: 6px;
  border: 1px solid #303746;
  border-radius: 999px;
  background: #151920;
}

input[type="range"]::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: #5d5230;
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 2px solid #11151b;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 1px #5d5230;
}

input[type="range"]:disabled::-moz-range-track {
  border-color: #262c38;
  background: #151920;
}

input[type="range"]:disabled::-moz-range-progress {
  background: #303746;
}

input[type="range"]:disabled::-moz-range-thumb {
  background: #5f6673;
  box-shadow: none;
}

textarea {
  resize: vertical;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.actions button {
  flex: 1;
}

.entry-link {
  justify-self: start;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.entry-link:hover {
  text-decoration: underline;
}

.status {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
}

.room-preview {
  display: grid;
  gap: 6px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.room-preview strong,
.room-preview span,
.room-preview small {
  display: block;
}

.room-preview strong {
  color: var(--text);
}

.room-preview span,
.room-preview small {
  color: var(--muted);
  line-height: 1.45;
}

.room {
  display: grid;
  gap: 20px;
}

.room-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 18px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.room-heading {
  min-width: 0;
}

.room-header h1 {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.08;
}

.header-actions {
  justify-self: end;
  align-self: center;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.room-action-button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #151920;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.room-action-button:hover {
  border-color: #5d5230;
  color: var(--accent);
}

.room-action-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.invite-link {
  color: var(--accent);
  border-color: #5d5230;
  background: #24200f;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}

.invite-link.copied {
  background: #2c2712;
  border-color: var(--accent);
}

.settings-header-button {
  width: 34px;
  min-width: 34px;
  padding: 0;
  justify-content: center;
}

.settings-header-button.active {
  background: var(--accent);
  border-color: #d6a934;
  color: #19150c;
}

.workspace {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
  min-height: 620px;
}

.participants-panel {
  padding: 16px;
}

.participants-panel-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
}

.participants-panel-header h2 {
  margin: 0;
  min-width: 0;
}

.quick-filter-tags {
  display: flex;
  gap: 6px;
}

.panel-toggle-button {
  width: 36px;
  height: 36px;
}

.settings-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 10, 14, 0.74);
}

.settings-dialog {
  width: min(920px, 100%);
  height: min(760px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.settings-topbar {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
}

.settings-topbar h2 {
  font-size: 22px;
}

.close-button {
  flex: 0 0 auto;
}

.settings-layout {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  overflow: hidden;
}

.settings-nav {
  min-width: 0;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 16px;
  border-right: 1px solid var(--line);
  background: #151920;
}

.settings-nav-item {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: start;
  min-height: 38px;
  padding: 0 12px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.settings-nav-item.active {
  border-color: #5d5230;
  background: #24200f;
  color: var(--accent);
}

.settings-nav-item:hover {
  border-color: #4a5160;
  background: #1d222b;
  color: var(--text);
}

.settings-content {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 18px;
}

.settings-section {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.settings-section h3 {
  margin: 0 0 2px;
  color: var(--accent);
  font-size: 14px;
}

.settings-test-row {
  display: grid;
  grid-template-columns: minmax(160px, max-content) 1fr;
  gap: 10px;
  align-items: center;
}

.settings-test-row button {
  min-height: 36px;
}

.settings-test-row button.active {
  border-color: #5d5230;
  background: #24200f;
  color: var(--accent);
}

.settings-test-row span {
  color: var(--muted);
  font-size: 12px;
}

.diagnostics-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.diagnostics-actions button.active {
  border-color: #5d5230;
  background: #24200f;
  color: var(--accent);
}

.diagnostics-log {
  min-height: 320px;
  max-height: 52vh;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  line-height: 1.45;
  white-space: pre;
}

.operator-diagnostics-summary {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid #303746;
  border-radius: 8px;
  background: #10141b;
  color: var(--text);
  font-size: 12px;
  min-width: 0;
}

.operator-diagnostics-summary .muted {
  color: var(--muted);
}

.operator-diagnostics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.operator-diagnostics-quality {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.operator-diagnostics-grid article,
.operator-diagnostics-quality article,
.operator-diagnostics-text,
.operator-diagnostics-chunks span {
  min-width: 0;
  border: 1px solid #252c38;
  border-radius: 7px;
  background: #151a23;
}

.operator-diagnostics-grid article {
  display: grid;
  gap: 3px;
  padding: 8px;
}

.operator-diagnostics-quality article {
  display: grid;
  gap: 3px;
  padding: 8px;
}

.operator-diagnostics-grid strong,
.operator-diagnostics-quality strong {
  color: var(--accent);
  font-size: 12px;
}

.operator-diagnostics-grid span,
.operator-diagnostics-quality span,
.operator-diagnostics-text span {
  color: var(--muted);
}

.operator-recommendation-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.operator-recommendation-apply {
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid #5d5230;
  border-radius: 6px;
  background: #24200f;
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.operator-recommendation-apply:hover {
  border-color: var(--accent);
  background: #302811;
  color: var(--text);
}

.operator-diagnostics-text {
  display: grid;
  gap: 4px;
  padding: 8px;
}

.operator-diagnostics-text p {
  margin: 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.operator-diagnostics-chunks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.operator-diagnostics-chunks span {
  padding: 5px 7px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.settings-nav,
.settings-content {
  scrollbar-width: thin;
  scrollbar-color: #5d5230 #151920;
}

.settings-nav::-webkit-scrollbar,
.settings-content::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.settings-nav::-webkit-scrollbar-track,
.settings-content::-webkit-scrollbar-track {
  background: #151920;
}

.settings-nav::-webkit-scrollbar-thumb,
.settings-content::-webkit-scrollbar-thumb {
  border: 2px solid #151920;
  border-radius: 999px;
  background: #5d5230;
}

.settings-nav::-webkit-scrollbar-thumb:hover,
.settings-content::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

.check-row {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.check-row input {
  width: auto;
}

.range-field {
  display: grid;
  gap: 6px;
}

.range-field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.range-field-header > label:first-child {
  min-width: 0;
}

.inline-auto-toggle {
  display: inline-flex;
  width: auto;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

.inline-auto-toggle:hover {
  color: var(--text);
}

.inline-auto-toggle input {
  width: auto;
}

.participants-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.filter-tags-panel {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.filter-tag {
  width: 100%;
  min-height: 38px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #151920;
  color: var(--muted);
  padding: 0 10px;
  text-align: left;
}

.filter-tag.compact {
  width: 36px;
  height: 36px;
  min-height: 36px;
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 0;
}

.filter-tag:hover {
  border-color: #5d5230;
  background: #1d222b;
  color: var(--text);
}

.filter-tag.active {
  background: var(--panel-2);
  color: var(--text);
  border-color: var(--accent);
}

.filter-tag.solo {
  background: #2a220d;
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(245, 197, 66, 0.22);
}

.filter-tag-icon,
.filter-tag-icon svg {
  width: 18px;
  height: 18px;
}

.filter-tag-icon svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.filter-tag-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-tag.compact .filter-tag-title,
.filter-tag.compact .filter-tag-count {
  display: none;
}

.filter-tag-count {
  color: var(--accent);
  font-size: 12px;
}

.participant {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #151920;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.participant:hover {
  border-color: #4a5160;
  background: #1a1f27;
}

.participant.is-speaking {
  background: #211f16;
  box-shadow: inset 0 0 0 1px rgba(245, 197, 66, 0.28), 0 0 22px rgba(245, 197, 66, 0.12);
}

.participant.is-speaking:hover {
  background: #282417;
}

.participant-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding-right: 34px;
  min-width: 0;
}

.participant strong,
.participant span {
  display: block;
}

.participant span {
  color: var(--muted);
  font-size: 13px;
}

.participant-actions {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  align-items: center;
  padding-top: 2px;
}

.participant-actions .icon-button {
  position: relative;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  background: #11151b;
  border-color: #303746;
  color: var(--muted);
  cursor: pointer;
}

.participant-actions .icon-button:hover {
  border-color: #5d5230;
  background: #20242c;
  color: var(--accent);
}

.participant-actions .icon-button svg {
  width: 19px;
  height: 19px;
}

.participant-mic.is-on {
  color: var(--accent);
  border-color: #5d5230;
  background: #24200f;
}

.participant-mic.active.is-on {
  background: #24200f;
  border-color: #5d5230;
  color: var(--accent);
}

.participant-mic.is-off {
  color: var(--muted);
  background: #11151b;
}

.participant-mic.is-muted-all {
  color: #ff8a8a;
  border-color: #7a3b42;
  background: #25181d;
}

.participant-speaker.is-on {
  color: #a8d7ff;
  border-color: #35536a;
  background: #111d27;
}

.participant-speaker.is-off {
  color: var(--muted);
  background: #11151b;
}

.participant-speaker.is-muted-local {
  color: #45b7ff;
  border-color: #2b5570;
  background: #10202b;
}

.participant-speaker.is-muted-output {
  color: #e4e8ef;
  border-color: #4c5968;
  background: #1b2028;
}

.participant-speaker.is-muted-all {
  color: #ff8a8a;
  border-color: #7a3b42;
  background: #25181d;
}

.participant-speaker.is-muted-output.is-muted-local {
  box-shadow: inset 0 0 0 1px #45b7ff;
}

.participant-speaker.is-muted-local.is-muted-all {
  box-shadow: inset 0 0 0 1px #45b7ff;
}

.participant-webspeech.is-on {
  color: var(--accent);
  border-color: #5d5230;
  background: #24200f;
}

.participant-webspeech.is-off {
  color: var(--muted);
  background: #11151b;
}

.participant-transcript {
  position: relative;
}

.participant-transcript.is-broadcasting {
  color: var(--accent);
  border-color: #5d5230;
  background: #24200f;
}

.state-dots {
  position: absolute;
  right: 4px;
  bottom: 5px;
  display: flex;
  gap: 2px;
  max-width: 28px;
  flex-wrap: wrap-reverse;
  justify-content: flex-end;
  pointer-events: none;
}

.state-dot {
  width: 7px;
  height: 7px;
  border: 1px solid #05070a;
  border-radius: 999px;
  background: var(--dot-color, var(--accent));
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.32);
}

.participant-transcript.is-off {
  color: var(--muted);
  background: #11151b;
}

.participant-role-badge {
  position: relative;
  border: 1px solid var(--participant-color, #4a5160);
  color: var(--participant-color, var(--muted));
  cursor: default;
}

.participant-card-settings-button {
  position: relative;
}

.participant-card-settings-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.participant-card-settings-button:hover,
.participant-card-settings-button.active {
  border-color: #5d5230;
  background: #24200f;
  color: var(--accent);
}

.participant-role-badge svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.participant-role-badge .role-main-icon {
  width: 19px;
  height: 19px;
}

.participant-role-badge.role-master {
  color: var(--participant-color, var(--accent));
  border-color: #5d5230;
  background: #24200f;
}

.participant-role-badge.role-assistant {
  color: var(--participant-color, #a8d7ff);
  border-color: var(--participant-color, #35536a);
  background: #111d27;
}

.participant-role-badge.role-player {
  color: var(--participant-color, var(--muted));
}

.participant-role-badge .owner-icon {
  position: absolute;
  right: 2px;
  top: 2px;
  width: 9px;
  height: 9px;
  padding: 1px;
  border: 1px solid #080a0f;
  border-radius: 999px;
  background: #151920;
  color: var(--participant-color, var(--accent));
}

.participant-role-badge .self-icon {
  position: absolute;
  left: 2px;
  top: 2px;
  min-width: 11px;
  height: 11px;
  padding: 0 2px;
  display: grid;
  place-items: center;
  border: 1px solid #080a0f;
  border-radius: 999px;
  background: var(--participant-color, var(--accent));
  color: #080a0f;
  font-size: 7px;
  font-weight: 900;
  line-height: 1;
}

.participant-inline-settings {
  margin-top: 6px;
}

.participant-slider-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.participant-slider-row input {
  width: 100%;
}

.participant-context-menu {
  position: fixed;
  z-index: 80;
  min-width: 180px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #171b22;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
}

.participant-context-menu button {
  width: 100%;
  min-height: 34px;
  justify-content: flex-start;
  border: 0;
  background: transparent;
  color: var(--text);
}

.participant-context-menu button:hover {
  background: #232832;
}

.remote-audio {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.remote-audio audio {
  width: 100%;
  height: 34px;
}

.chat-panel {
  min-width: 0;
  display: grid;
  grid-template-rows: 1fr auto auto;
}

.messages {
  min-height: 320px;
  overflow: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #151920;
  padding: 10px 12px;
}

.message.generated {
  border-color: #5d5230;
  background: #1c1a12;
}

.message.draft {
  border-style: dashed;
  border-color: #766833;
  background: #17160f;
  opacity: 0.86;
}

.message.draft p {
  color: #d8d1bc;
}

.message-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.meta-ref {
  color: var(--accent);
}

.message-kind-badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  border: 1px solid rgba(245, 197, 66, 0.28);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(245, 197, 66, 0.08);
  font-size: 11px;
  line-height: 1;
}

.message-kind-badge.draft {
  border-color: rgba(126, 117, 86, 0.5);
  color: #d8d1bc;
  background: rgba(126, 117, 86, 0.12);
}

.message p {
  margin: 8px 0 0;
  line-height: 1.45;
}

.composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.transcript-tools {
  border-top: 1px solid var(--line);
  padding: 12px;
}

.transcript-tools summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 700;
}

.tool-block {
  margin: 12px 0 8px;
}

.tool-block strong {
  display: block;
  color: var(--text);
  font-size: 13px;
}

.hint {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.transcript-grid {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 10px;
  margin: 12px 0;
}

.transcription-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 150px) minmax(120px, 150px) minmax(0, 220px);
  gap: 10px;
  margin: 12px 0;
}

.transcription-summary {
  display: grid;
  gap: 10px;
}

.transcription-summary article {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #131820;
}

.transcription-summary strong {
  color: var(--text);
}

.transcription-summary span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.model-manager {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.operator-model-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
  align-items: end;
}

.operator-model-settings label {
  min-width: 0;
}

.operator-profile-preview {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #12161d;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.operator-profile-preview strong {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  font-size: 13px;
}

.operator-profile-preview-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #171c24;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.operator-profile-preview.is-source-safe {
  border-color: rgba(35, 197, 94, 0.42);
  background: #111a18;
}

.operator-profile-preview.is-source-safe .operator-profile-preview-badge {
  border-color: rgba(35, 197, 94, 0.5);
  color: #86efac;
  background: rgba(35, 197, 94, 0.1);
}

.operator-profile-preview.is-source-mixed {
  border-color: rgba(96, 165, 250, 0.42);
  background: #111824;
}

.operator-profile-preview.is-source-mixed .operator-profile-preview-badge {
  border-color: rgba(96, 165, 250, 0.5);
  color: #93c5fd;
  background: rgba(96, 165, 250, 0.1);
}

.operator-profile-preview.is-source-fallback,
.operator-profile-preview.is-source-risk {
  border-color: rgba(250, 204, 21, 0.45);
  background: #1a1710;
}

.operator-profile-preview.is-source-fallback .operator-profile-preview-badge,
.operator-profile-preview.is-source-risk .operator-profile-preview-badge {
  border-color: rgba(250, 204, 21, 0.55);
  color: var(--accent);
  background: rgba(250, 204, 21, 0.1);
}

.model-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #151920;
}

.model-card strong,
.model-card span {
  display: block;
}

.model-card span {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 840px) {
  .entry,
  .workspace,
  .room-header {
    grid-template-columns: 1fr;
  }

  .room-header {
    display: grid;
    align-items: start;
  }

  .room-heading {
    grid-row: auto;
  }

  .header-actions {
    justify-self: start;
    justify-content: flex-start;
  }

  .header-actions {
    flex-wrap: wrap;
  }

  .workspace {
    min-height: 0;
  }

  .split,
  .transcript-grid,
  .transcription-controls,
  .operator-model-settings,
  .settings-test-row,
  .composer {
    grid-template-columns: 1fr;
  }

  .model-card {
    display: grid;
  }

  .settings-modal {
    padding: 10px;
  }

  .settings-dialog {
    height: calc(100vh - 20px);
  }

  .settings-layout {
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .settings-nav {
    grid-auto-flow: column;
    grid-auto-columns: minmax(130px, max-content);
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}
