:root {
  --paper: #f4f1ee;
  --surface: #fffdfa;
  --ink: #34302d;
  --muted: #655b55;
  --border: #d9cec5;
  --peach: #eedbd0;
  --outgoing: #f0e0d6;
  --pinned: #f5e6e0;
  --night: #221f1d;
  --focus: #a03f21;
  --ease-press: cubic-bezier(.2,.78,.35,1);
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.btn { min-height: 44px; border-radius: 13px; }
.btn:not(.small) { padding-inline: 16px; }
.btn:not(.ghost, .danger, .secondary) { color: #fffaf6; }
.btn:active:not(:disabled) { transform: scale(.96); }
.btn[aria-busy="true"], .icon-control[aria-busy="true"] { position: relative; cursor: progress; }
.btn[aria-busy="true"] .button-label { opacity: .65; }
.btn[aria-busy="true"]:not(:has(.glyph))::after {
  content: ""; width: 13px; height: 13px; flex: 0 0 13px; border: 1.5px solid currentColor;
  border-right-color: transparent; border-radius: 50%; animation: spin .72s linear infinite .13s backwards;
}
.glyph { width: 22px; height: 22px; display: block; }
.btn .glyph { width: 18px; height: 18px; }
.brand-orbit { display: block; width: 80px; height: 80px; }
.brand-orbit ellipse { stroke-width: 24; }
.brand-orbit.glyph ellipse { stroke-width: 52; }
.icon-control {
  display: inline-grid; place-items: center; flex: 0 0 auto; width: 44px; height: 44px; padding: 0;
  border: 1px solid transparent; border-radius: 13px; color: var(--ink); background: transparent;
  text-decoration: none; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: background 150ms ease, color 150ms ease, transform 145ms var(--ease-press);
}
.icon-control[aria-pressed="true"], .icon-control[aria-selected="true"], details[open] > .icon-control {
  color: var(--brand-hover); background: var(--peach);
}
.icon-control:active:not(:disabled), .menu-action:active { transform: scale(.91); }
.icon-control:disabled { opacity: .5; cursor: default; }
.icon-control[aria-busy="true"]::after {
  content: ""; position: absolute; inset: 8px; border: 1.4px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: spin .75s linear infinite .15s backwards;
}
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@media (hover: hover) {
  .icon-control:hover:not(:disabled):not([aria-pressed="true"]):not([aria-selected="true"]),
  .menu-action:hover { background: var(--surface-alt); color: var(--brand-hover); }
}
.remeet-hint {
  position: fixed; z-index: 100; pointer-events: none; max-width: min(85vw, 290px);
  padding: 7px 11px; border-radius: 10px; color: #fffaf6; background: #3c3029;
  font-size: .73rem; font-weight: 500; text-align: center; box-shadow: 0 4px 16px #422b2225;
  animation: hint-in 145ms var(--ease-press) both;
}
.remeet-hint::after {
  content: ""; width: 7px; height: 7px; border-radius: 1px; position: absolute; left: var(--hint-point);
  bottom: -3px; transform: translateX(-50%) rotate(45deg); background: inherit;
}
.remeet-hint[data-below="true"]::after { top: -3px; bottom: auto; }
@keyframes hint-in { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: translateY(0); } }

.action-menu { flex: 0 0 auto; position: relative; }
.action-menu > summary { list-style: none; }
.action-menu > summary::-webkit-details-marker { display: none; }
.menu-pane {
  z-index: 40; position: fixed; display: grid; gap: 2px; width: max-content; min-width: 11.5rem; max-width: min(280px, 90vw);
  padding: 5px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface);
  box-shadow: 0 10px 34px #32261c21; animation: hint-in 130ms var(--ease-press) both;
}
.action-menu:not([open]) > .menu-pane { display: none; }
.menu-action {
  min-height: 44px; padding: 7px 10px; border: 0; border-radius: 9px; font: inherit; font-size: .82rem;
  text-align: left; color: var(--ink); background: none; transition: background 150ms, transform 145ms var(--ease-press);
}
.menu-action.danger-text { color: var(--danger); }

dialog.live-dialog {
  padding: clamp(18px, 4vw, 30px); background: var(--surface); border: 1px solid var(--border); border-radius: 23px;
  color: var(--ink); box-shadow: 0 24px 82px #27161138;
}
dialog.live-dialog[open] { animation: dialog-in 185ms var(--ease-press) both; }
dialog.live-dialog::backdrop { background: #31251f63; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(7px) scale(.989); } to { opacity: 1; transform: translateY(0) scale(1); } }
.live-dialog h2 { font-size: clamp(1.35rem, 3.3vw, 1.75rem); }
.live-dialog .dialog-actions { justify-content: end; gap: 8px; }
.dialog-error:not(:empty) {
  margin-top: 14px; padding: 10px 13px; border-radius: 11px; background: #f7e5e0; color: var(--danger);
  font-size: .86rem;
}
.dialog-error:empty { display: none; }

.studio-header { background: var(--surface); border-bottom: 1px solid #e6dcd4; }
.studio-header-inner {
  max-width: 1190px; min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0 auto; padding: max(9px, var(--safe-top)) clamp(16px, 4vw, 34px) 9px;
}
.studio-header .brand, .room-header .brand { align-self: center; font-size: 1.04rem; }
.studio-header .brand img, .room-header .brand img { width: 35px; height: 35px; border-radius: 10px; }
.studio-main { width: min(100%, 1190px); margin: 0 auto; padding: clamp(25px, 4.5vw, 61px) clamp(16px, 4vw, 34px) 42px; }
.studio-title {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-bottom: clamp(20px, 3vw, 31px);
}
.studio-title h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
.studio-content { display: grid; gap: 26px; min-width: 0; }
.studio-empty, .studio-skeleton {
  display: grid; align-items: center; position: relative; isolation: isolate; min-height: clamp(250px, 31vw, 355px);
  overflow: hidden; padding: clamp(24px, 5vw, 57px); border-radius: 27px;
  border: 1px solid var(--border); background: var(--surface);
}
.studio-empty { grid-template-columns: minmax(0, 2fr) minmax(145px, 1fr); gap: 12px; }
.empty-copy { display: grid; justify-items: start; gap: 12px; }
.empty-copy h2 { font-size: clamp(1.25rem, 3vw, 1.9rem); }
.empty-copy p { max-width: 30ch; font-size: .94rem; }
.empty-copy .btn { margin-top: 7px; }
.empty-orbit { width: 100%; height: auto; aspect-ratio: 1; color: #ba7053; opacity: .56; }
.empty-orbit ellipse { stroke-width: 7; }
.empty-orbit .orbit-core { fill: #be7457; }
.studio-skeleton { align-content: center; justify-items: start; gap: 14px; }
.skeleton-line {
  width: min(270px, 70%); height: 14px; border-radius: 20px; background: #efe4dc;
  animation: loading-fade 1.5s ease-in-out infinite alternate;
}
.skeleton-line:first-child { width: min(180px, 55%); height: 21px; }
.skeleton-line:last-child { width: min(120px, 45%); height: 39px; margin-top: 5px; }
@keyframes loading-fade { from { opacity: .48; } to { opacity: .95; } }
.event-section { display: grid; gap: 9px; min-width: 0; }
.event-section h2 { font-size: .96rem; color: var(--muted); font-weight: 500; margin: 0 0 4px 1px; }
.event-list { display: grid; gap: 9px; }
.event-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0;
  padding: 14px clamp(13px, 3vw, 23px); border: 1px solid #e2d8d0; border-radius: 20px; background: var(--surface);
}
.event-card.featured { background: #fbf5ef; border-color: #dac2b4; padding-block: 20px; }
.event-details { display: grid; gap: 4px; min-width: 0; }
.event-details h3 { font-size: clamp(1rem, 2.3vw, 1.38rem); }
.event-state { color: var(--brand); font-size: .72rem; font-weight: 500; }
.event-state.live::before { content: ""; display: inline-block; margin-inline-end: 6px; vertical-align: 1px; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.event-state.ended { color: var(--muted); }
.event-time { font-size: .82rem; }
.event-actions { display: flex; align-items: center; flex: 0 0 auto; gap: 5px; }

.room-room { max-width: 1530px; padding: max(17px, var(--safe-top)) clamp(15px, 3vw, 40px) max(32px, var(--safe-bottom)); }
.room-header { display: grid; gap: 17px; margin-bottom: 16px; }
.room-brand-line, .room-title-line {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; flex-wrap: wrap;
}
.room-actions, .room-indicators { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.room-title { font-size: clamp(1.46rem, 3.25vw, 2.62rem); line-height: 1.1; }
.room-status, .room-count, .top-record {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; min-height: 29px;
  border-radius: 10px; font-size: .79rem; line-height: 1.25; font-weight: 500; padding: 4px 8px;
}
.room-status { color: var(--muted); background: var(--surface); border: 1px solid #e6dbd1; }
.room-status[data-phase="live"] { color: var(--brand-hover); background: var(--peach); border-color: transparent; }
.room-count { color: var(--muted); background: transparent; }
.room-count .glyph { width: 17px; height: 17px; }
.air-orbit { width: 20px; height: 20px; overflow: visible; animation: orbit-in .43s var(--ease-press) both; }
.air-orbit ellipse { stroke-width: 55; }
@keyframes orbit-in { from { opacity: 0; transform: rotate(-32deg) scale(.58); } to { opacity: 1; transform: rotate(0) scale(1); } }
.status-time { font-variant-numeric: tabular-nums; white-space: nowrap; }
.top-record { color: #73532b; background: #f4e7d4; white-space: normal; }
.top-record[data-phase="active"] { color: #9b3024; background: #f4dfda; }
.record-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: currentColor; }
[data-phase="active"] .record-dot { box-shadow: 0 0 0 2.5px #a32e241b; }
.room-room .room-grid { grid-template-columns: minmax(0, 1fr) minmax(294px, 28%); gap: clamp(13px, 2vw, 23px); }
.room-lead { display: grid; align-content: start; min-width: 0; gap: 10px; }
.room-lead .stage {
  border-color: #302a27; border-radius: 22px;
  background: radial-gradient(ellipse at 49% 57%, #362b25 0%, #251f1c 46%, var(--night) 81%);
}
.poster-title { font-size: clamp(.89rem, 2vw, 1.17rem); }
.poster-note { font-size: .77rem; opacity: .8; }
.poster-orbit { width: clamp(64px, 10vw, 105px); height: auto; color: #e0a084; }
.poster-orbit ellipse { stroke-width: 14; }
.hostcam, .speaker-cam { transition: outline-color 180ms ease, box-shadow 180ms ease; outline: 1px solid transparent; outline-offset: -2px; }
.stage[data-host-speaking="true"][data-has-host-camera="true"] .hostcam,
.stage[data-student-speaking="true"][data-has-speaker-camera="true"] .speaker-cam {
  outline: 2px solid #ecab8e; z-index: 3; box-shadow: 0 0 0 3px #c26b463b;
}
.media-dock {
  min-width: 0; padding: 5px 7px; border-radius: 17px; border: 1px solid #e4d9d0; background: var(--surface);
}
.dock-line, .dock-info, .dock-controls, .seat-actions, .dock-seat {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px; min-width: 0;
}
.dock-line { justify-content: space-between; gap: 4px 8px; min-height: 44px; }
.dock-controls { margin-inline-start: auto; justify-content: flex-end; }
.dock-info { padding-inline-start: 5px; }
.connection-label { color: var(--muted); font-size: .77rem; }
.connection-label:not(:empty)[data-state="ok"]::before {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-inline-end: 6px;
  border-radius: 50%; background: #648154; vertical-align: 1px;
}
.connection-label:empty, .device-status:empty { display: none; }
.device-status { margin: 0 5px 5px; color: var(--brand-hover); font-size: .78rem; }
.dock-control[data-glyph="mic"]::before {
  content: ""; position: absolute; inset: -1px; border: 1.5px solid #c56a46; border-radius: inherit;
  pointer-events: none; box-shadow: 0 0 10px #db96736b, inset 0 0 6px #e2a58772;
  opacity: 0; transition: opacity 230ms ease-out;
}
.dock-control[data-glyph="mic"].has-voice::before { opacity: 1; transition-duration: 120ms; }
.dock-control { position: relative; }
.record-control { color: var(--danger); }
.record-control[aria-pressed="true"] { color: #a23829; background: #f6e2dc; }
.record-control[data-phase="starting"], .record-control[data-phase="uncertain"] { color: #83572d; background: #f4e7d4; }
.dock-seat { padding: 4px 3px; }
.seat-actions { gap: 7px; }
.seat-actions strong { padding-inline: 5px; font-size: .8rem; }

.recording-panel {
  min-width: 0; padding: 12px 13px; border: 1px solid #e4d9d0; border-radius: 17px; background: var(--surface);
}
.recording-panel h2 { font-size: .9rem; padding: 0 1px 6px; }
.recording-row {
  display: flex; align-items: center; gap: 5px; min-width: 0; min-height: 47px; padding: 4px 0;
  border-top: 1px solid #eee4dc;
}
.recording-meta { flex: 1; min-width: 0; }
.rec-row-state {
  display: flex; align-items: center; gap: 6px; font-size: .79rem; color: var(--muted);
}
.recording-row small { font-size: .71rem; }
.recording-row[data-phase="active"] .rec-row-state, .recording-row[data-phase="failed"] .rec-row-state,
.recording-error { color: var(--danger); }
.recording-row[data-phase="ready"] .rec-row-state, .recording-row[data-phase="saved"] .rec-row-state { color: var(--sage); }
.recording-row:is([data-phase="starting"], [data-phase="uncertain"], [data-phase="stopping"], [data-phase="finalizing"]) .record-dot {
  color: #936027; animation: loading-fade 1.1s ease-in-out infinite alternate;
}
.recording-error { margin-top: 3px; font-size: .73rem; }

.talk-panel {
  display: flex; flex-direction: column; gap: 0; height: clamp(385px, 42vw, 615px); min-width: 0;
  border: 1px solid #e4d9d0; border-radius: 22px; background: var(--surface);
}
.talk-head { display: flex; align-items: center; justify-content: space-between; gap: 5px; flex-wrap: wrap; padding: 6px 8px 7px 12px; border-bottom: 1px solid #eee4dc; }
.side-title { font-size: .93rem; flex: 1 1 auto; min-width: 0; }
.studio-tabs { display: flex; align-items: center; gap: 1px; }
.talk-tab { position: relative; }
.talk-tab[data-count]:not([data-count=""])::after {
  content: attr(data-count); position: absolute; inset: 0 0 auto auto; min-width: 13px; padding: 0 3px;
  border-radius: 8px; background: var(--brand); color: #fffaf6; font-size: .58rem; line-height: 14px; text-align: center;
}
.talk-body { position: relative; flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.talk-scroll { flex: 1; min-height: 0; min-width: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 8px 9px; }
.talk-empty { margin: auto; padding: 35px 9px; color: var(--muted); font-size: .84rem; text-align: center; }
.talk-pin {
  display: flex; align-items: center; gap: 6px; padding: 8px; margin: 8px 8px 0;
  border-radius: 10px; background: var(--pinned); color: var(--brand-hover); font-size: .76rem;
}
.talk-pin .glyph { width: 16px; height: 16px; }
.talk-pin span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.talk-message {
  display: flex; align-items: end; gap: 3px; min-width: 0; margin: 6px 0 10px;
}
.message-arrived { animation: message-in 170ms var(--ease-press) backwards; }
@keyframes message-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.talk-message.grouped { margin-top: -5px; }
.message-content { min-width: 0; flex: 1; }
.message-meta {
  display: flex; align-items: baseline; gap: 4px 7px; min-width: 0; flex-wrap: wrap; margin-bottom: 3px;
  color: var(--muted); font-size: .67rem; font-variant-numeric: tabular-nums;
}
.message-meta strong { color: var(--ink); }
.message-role { color: var(--brand-hover); }
.message-bubble {
  width: fit-content; max-width: 100%; padding: 7px 9px; border-radius: 4px 12px 12px 12px;
  background: var(--surface-alt); color: var(--ink); font-size: .86rem; overflow-wrap: anywhere;
}
.message-bubble > p { white-space: pre-wrap; }
.talk-message.own .message-meta { justify-content: end; }
.talk-message.own .message-bubble { margin-inline-start: auto; border-radius: 12px 4px 12px 12px; background: var(--outgoing); }
.talk-message.from-host:not(.own) .message-bubble { background: #f5e7de; }
.message-tag, .message-failure {
  display: flex; align-items: center; gap: 3px; margin-top: 3px; color: var(--muted); font-size: .66rem;
}
.message-tag .glyph { width: 13px; height: 13px; }
.message-failure { color: var(--danger); }
.message-failure .message-retry { margin: -4px -4px -4px 0; }
.talk-message.failed .message-bubble { background: #f8e5e0; }
.talk-message .action-menu > summary { color: var(--muted); }
.talk-message .action-menu .glyph { width: 17px; height: 17px; }
.talk-jump {
  position: absolute; bottom: 6px; right: 10px; z-index: 5; color: var(--brand); background: var(--surface);
  border-color: var(--border); box-shadow: 0 2px 12px #3322191b;
}
.talk-member { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 4px; }
.talk-member + .talk-member { border-top: 1px solid #eee4dc; }
.member-meta { min-width: 0; display: grid; gap: 3px; font-size: .8rem; }
.member-meta .muted { font-size: .69rem; }
.talk-composer {
  display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: end; gap: 5px; padding: 7px 8px;
  border-top: 1px solid #eee4dc;
}
.talk-composer textarea {
  min-height: 44px; max-height: 106px; field-sizing: content; padding: 11px 9px; resize: none;
  color: var(--ink); background: var(--surface-alt); border-color: transparent;
  font-size: max(.84rem, 16px);
}
.talk-composer textarea:focus { border-color: var(--border); }
.talk-send, .talk-send:not(:disabled):hover { color: #fffaf6; background: var(--brand); }
.talk-send:disabled { opacity: .44; }
@media (hover:hover) {
  .talk-message .action-menu:not([open]) > summary:not(:focus-visible) { opacity: .67; }
  .talk-message:hover .action-menu > summary { opacity: 1; }
  .talk-send:hover:not(:disabled) { color: #fffaf6 !important; background: var(--brand-hover) !important; }
}
@media (max-width: 860px) {
  .room-room .room-grid { grid-template-columns: minmax(0, 1fr); }
  .talk-panel { height: clamp(335px, 62svh, 460px); }
  .room-lead .stage { border-radius: 18px; }
}
@media (max-width: 535px) {
  .studio-empty { grid-template-columns: 1fr; min-height: 255px; }
  .empty-copy { max-width: min(100%, 300px); z-index: 1; }
  .empty-orbit { position: absolute; z-index: 0; width: min(58vw, 220px); right: -8%; bottom: -20%; opacity: .29; }
  .event-card { flex-wrap: wrap; }
  .event-actions { width: 100%; justify-content: end; }
  .room-header { gap: 10px; margin-bottom: 12px; }
  .room-actions, .room-indicators { gap: 4px; }
  .room-brand-line { gap: 4px; }
  .room-header .brand { font-size: .85rem; gap: 6px; }
  .room-header .brand img { width: 29px; height: 29px; border-radius: 8px; }
  .room-actions .btn { font-size: .77rem; padding-inline: 8px; }
  .room-actions .btn .glyph { display: none; }
  .room-title-line { gap: 7px; }
  .talk-panel { border-radius: 17px; }
}
@media (max-width: 350px) {
  .room-brand-line { align-content: start; }
  .dock-controls { margin-inline: 0; justify-content: start; }
  .dialog-actions { justify-content: start !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .btn:active:not(:disabled), .icon-control:active:not(:disabled), .menu-action:active { transform: none; }
}
@media (forced-colors: active) {
  .icon-control { border: 1px solid ButtonText; }
  :focus-visible { outline-color: Highlight; }
}

.btn.preview-badge {
  min-height: 32px; padding: 4px 8px; gap: 5px; border-radius: 10px;
  background: var(--surface); color: var(--muted); border-color: #e6dbd1; font-size: .79rem;
}
.btn.preview-badge .glyph { width: 17px; height: 17px; }
@media (hover:hover) {
  .btn.preview-badge:hover:not(:disabled) { color: var(--brand-hover); background: var(--surface-alt); border-color: var(--border); }
}
dialog.live-dialog.preflight-dialog { width:min(38rem, calc(100vw - 24px)); }
.preflight-dialog .dialog-heading { margin-bottom:18px; align-items:center; }
.preflight-dialog .dialog-heading h2 { margin:0; letter-spacing:-.035em; }
.preflight-content { display:grid; gap:14px; }
.preflight-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:0; }
.preflight-device {
  position:relative; min-width:0; padding:11px 13px 14px;
  border:1px solid #e8ddd3; border-radius:14px; background:#f8f4ef;
}
.preflight-device dt { display:flex; align-items:center; gap:7px; font-size:.78rem; font-weight:600; }
.preflight-device dt .glyph { width:17px; height:17px; flex:none; color:#835843; }
.preflight-device dd {
  display:flex; align-items:center; gap:6px; margin:5px 0 0 24px;
  font-size:.69rem; color:var(--muted); line-height:1.35;
}
.preflight-device dd::before { content:""; flex:none; width:6px; height:6px; border-radius:50%; background:#b1a29a; }
.preflight-device[data-tone="on"] dd { color:#405747; }
.preflight-device[data-tone="on"] dd::before { background:#6a856e; }
.preflight-device[data-tone="warn"] dd { color:#865338; }
.preflight-device[data-tone="warn"] dd::before { background:#c18159; }
.preflight-meter {
  position:absolute; inset:auto 13px 6px 37px; height:2px; overflow:hidden;
  border-radius:3px; background:#ded9cf;
}
.preflight-meter > span { display:block; height:100%; border-radius:inherit; background:#708d74; transform:scaleX(0); transform-origin:left; transition:transform 100ms linear; }
.preflight-probe { min-width:0; padding:10px 12px; border:1px solid #e8d7c9; border-radius:17px; background:#fbf1e8; }
.preflight-probe[data-tone="ready"] { background:linear-gradient(120deg,#f8ece2,#fffbf6); }
.preflight-probe[data-tone="warn"] { border-color:#e6c7b6; }
.preflight-probe-row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; min-width:0; }
.preflight-probe-icon {
  display:grid; place-items:center; width:37px; height:37px; flex:none;
  border-radius:11px; background:#f0dbcc; color:#873b26;
}
.preflight-probe-icon .glyph { width:18px; height:18px; }
.preflight-probe-copy { min-width:0; flex:1 1 9rem; }
.preflight-probe-copy strong { font-size:.83rem; }
.preflight-record-state { margin:2px 0 0; font-size:.7rem; line-height:1.38; color:#725a50; }
.preflight-tools { display:flex; align-items:center; gap:2px; }
.preflight-tools:not(:has(:is(a,button):not([hidden]))) { display:none; }
.preflight-tools .icon-control { width:36px; height:36px; border-radius:10px; color:#813d2a; }
.preflight-tools .icon-control .glyph { width:18px; height:18px; }
.preflight-player { display:block; width:100%; margin-top:10px; max-height:min(38vh,320px); border-radius:10px; background:var(--night); }
.preflight-footer { display:flex; justify-content:space-between; align-items:center; gap:9px; flex-wrap:wrap; }
.preflight-footer .btn { min-height:39px; font-size:.77rem; }
.preflight-footer button { margin-inline-start:auto; }
.preflight-footer .preflight-viewer { background:transparent; border-color:#e7d9cc; color:#6c493b; }
.preflight-footer .preflight-viewer:hover { background:#f6ebe3; border-color:#d9bda9; color:#813d2a; }
.preflight-footer .preflight-viewer .glyph { width:16px; height:16px; }
.viewer-main { width:min(100%,56rem); margin-inline:auto; padding:clamp(18px,4vw,38px) clamp(12px,3vw,22px); }
.viewer-head { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; margin-bottom:14px; }
.viewer-heading { min-width:0; }
.viewer-heading h1 { font-size:clamp(1.55rem,4vw,2.4rem); letter-spacing:-.04em; }
.viewer-heading p { margin:3px 0 0; font-size:.88rem; overflow-wrap:anywhere; }
.viewer-indicator { border-radius:11px; padding:6px 10px; background:#eaded4; color:#6a5549; font-size:.72rem; font-weight:600; }
.viewer-indicator[data-live="true"] { background:#f3dbd0; color:#8d3927; }
.viewer-stage .poster .glyph { width:34px; height:34px; margin-bottom:7px; color:#e3ad96; }
.viewer-stage .poster-title { font-size:clamp(.92rem,3vw,1.2rem); }
.viewer-dock {
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px;
  margin-top:10px; padding:7px 9px 7px 13px; border:1px solid var(--border); border-radius:14px; background:var(--surface);
}
.viewer-connection, .viewer-controls { display:flex; align-items:center; gap:7px; }
.viewer-connection .glyph { width:18px; height:18px; color:#795746; }
.viewer-quality { font-size:.76rem; color:var(--muted); }
.viewer-quality[data-tone="positive"] { color:#405747; }
@media (max-width:460px) {
  .preflight-device { padding-inline:9px; }
  .preflight-device dt { gap:5px; }
  .preflight-device dd { margin-inline-start:0; }
  .preflight-meter { inset-inline-start:10px; }
  .preflight-probe-copy { flex-basis:6rem; }
}
@media (prefers-reduced-motion:reduce) { .preflight-meter > span { transition:none; } }
.room-room .room-grid.chat-collapsed { grid-template-columns: minmax(0, 1fr); }
.room-grid.chat-collapsed .room-lead { max-width: 1140px; width: 100%; margin-inline: auto; }
.room-chat-toggle { position: relative; }
.room-chat-toggle[data-count]:not([data-count=""])::after {
  content: attr(data-count); position: absolute; inset: 0 0 auto auto; min-width: 14px; padding: 0 3px;
  border-radius: 10px; color: #fffaf6; background: var(--brand); font-size: .62rem; line-height: 14px;
}
.system-message {
  justify-content: center; text-align: center; padding: 4px 6px; margin: 4px 0 6px;
  font-size: .75rem; color: #524a45; line-height: 1.35;
}
.talk-team-member { justify-content: flex-start; gap: 7px; }
.talk-team-member .glyph { color: var(--brand); width: 17px; height: 17px; }
.menu-action[aria-current="true"] { color: var(--brand-hover); background: var(--peach); }
.room-room .stage { --pip-inset: 12px; }
.stage[data-scene="camera"] > .screen,
.stage[data-scene="screen"] > :is(.hostcam,.speaker-cam),
.stage .hostcam:not(:has(video)) { display: none; }
.stage[data-has-screen="true"][data-has-host-camera="true"] .hostcam {
  width: 19%;
  left: calc(var(--pip-inset) + (100% - 2 * var(--pip-inset)) * var(--camera-x, 1));
  top: calc(var(--pip-inset) + (100% - 2 * var(--pip-inset)) * var(--camera-y, 1));
  translate: calc(-100% * var(--camera-x, 1)) calc(-100% * var(--camera-y, 1));
  right: auto; bottom: auto;
}
.stage[data-camera-side="left"][data-has-screen="true"][data-has-host-camera="true"] .speaker-cam { left: auto; right: var(--pip-inset); }
.hostcam.camera-moving { z-index: 4; outline: 1.5px solid #e9ad8f; box-shadow: 0 5px 17px #21150764; }
.hostcam .camera-drag, .hostcam .camera-drag:hover:not(:disabled) {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; overflow: hidden;
  color: #fffaf6; background: transparent; touch-action: none; user-select: none;
  -webkit-touch-callout: none; cursor: grab;
}
.hostcam.camera-moving .camera-drag { cursor: grabbing; }
.camera-drag .glyph {
  position: absolute; width: 24px; height: 24px; padding: 3px; top: 3px; right: 3px;
  color: #fffaf6; border-radius: 6px; background: #302621a0; opacity: 0; transition: opacity 160ms ease;
}
.camera-drag:focus-visible { outline-offset: -4px; outline-color: #fffaf6; }
.camera-drag:is(:hover,:focus-visible) .glyph, .camera-moving .camera-drag .glyph { opacity: 1; }
@media (max-width: 760px) { .room-room .stage { --pip-inset: 7px; } }

:root {
  --paper: #f4efea;
  --surface: #fffdf9;
  --surface-alt: #f7f0e9;
  --peach: #efd9cb;
  --team-ink: #705346;
  --attendee-ink: #4b6255;
  --motion-remeet: cubic-bezier(.42,0,.22,1);
  --route-shift: 8px;
}

::view-transition-old(root) { animation: page-out 155ms var(--motion-remeet) both; }
::view-transition-new(root) { animation: page-in 240ms var(--motion-remeet) both; }
@keyframes page-out { to { opacity: 0; transform: translateX(calc(-1 * var(--route-shift))); } }
@keyframes page-in { from { opacity: 0; transform: translateX(var(--route-shift)); } }
h1[tabindex="-1"]:focus { outline: none; }
dialog.live-dialog::backdrop { animation: shade-in 185ms var(--motion-remeet) both; }
dialog.live-dialog[data-closing="true"]::backdrop { animation: shade-out 175ms var(--motion-remeet) both; }
dialog.live-dialog[data-closing="true"] { pointer-events: none; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.dialog-heading .dialog-close { margin: -6px -5px -6px 0; width: 38px; height: 38px; }
@keyframes shade-in { from { background: transparent; } }
@keyframes shade-out { to { background: transparent; } }

.studio-header { background: #fffaf4; border-color: #e6d4c7; }
.studio-header-inner, .studio-main { max-width: 1310px; }
.studio-header-inner { justify-content: start; }
.studio-header-inner > .action-menu { margin-inline-start: auto; }
.studio-brand-link.btn { border-color: transparent; padding: 0; min-width: max-content; }
.studio-brand-link.btn:hover { background: transparent; }
.studio-nav { display: flex; gap: 4px; align-items: center; }
.studio-nav-link.btn { min-height: 39px; padding-inline: 11px; white-space: nowrap; }
.studio-nav-link[aria-current="page"], .management-tabs [aria-selected="true"] { color: var(--brand-hover); background: var(--peach); }
.studio-title { position: relative; }

.studio-workspace { display: grid; grid-template-columns: minmax(0,1fr) minmax(220px,288px); align-items: start; gap: 16px; }
.studio-workspace > :only-child { grid-column: 1/-1; }
.studio-event-list { display: grid; gap: 19px; min-width: 0; }
.studio-card {
  min-width: 0; display: grid; align-content: start; gap: 11px; padding: clamp(15px,2.8vw,22px);
  border: 1px solid #e4d6ca; border-radius: 20px; background: var(--surface);
}
.studio-card h2 { font-size: 1.14rem; }
.studio-card > p, .studio-card .form { font-size: .88rem; }
.studio-card > .btn { width: fit-content; }
.studio-sidebar { background: #f9f1e8; }
.studio-card .form { margin-top: 3px; }
.event-card { min-height: 110px; }
.event-card.featured { background: #f9ede2; min-height: 133px; box-shadow: inset 3px 0 #ad553a; }
.event-details h3 { overflow-wrap:anywhere; }
.event-state { width: fit-content; color: #695951; background: #f0e7de; padding: 3px 8px; border-radius: 8px; }
.event-state.live { background: #efdbcd; color: var(--brand-hover); }
.event-time { display: flex; align-items: center; gap: 5px; }
.event-time > .glyph { width: 14px; height: 14px; color: var(--muted); }
.event-actions {
  display: grid; grid-template-columns: 137px 139px 44px; align-items: center;
  justify-items: stretch; gap: 6px; margin: 0;
}
.event-actions > .btn { font-size: .79rem; min-height: 43px; padding-inline: 9px; white-space: nowrap; }
.event-actions > :is(.action-menu,.empty-action):last-child { width: 44px; }
.studio-invitation {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px;
  padding: 13px 17px; margin: 0 0 14px; border-radius: 15px; border: 1px solid #e7cdbb; background: #fbefe3;
}
.studio-invitation .stack { gap: 4px; }
.studio-person-row {
  display: flex; min-width: 0; gap: 9px; justify-content: space-between; align-items: center; flex-wrap: wrap;
  padding: 8px 0; border-top: 1px solid #ebe0d7; font-size: .84rem;
}
.person-summary { display: flex; align-items: center; gap: 8px; min-width: 0; }
.person-summary-text { min-width: 0; display: grid; overflow-wrap: anywhere; }
.person-summary-text small { font-size: .71rem; }
.person-avatar {
  display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 11px;
  background: #f0dfd1; color: var(--brand-hover); font-size: .67rem; font-weight: 600;
}
.person-avatar.role-team { color: var(--team-ink); background: #eddfd4; }
.staff-role { font-size: .71rem; font-weight: 600; color: var(--brand-hover); }
.staff-role.role-team { color: var(--team-ink); }
.staff-role.role-admin { color: #655748; }
.staff-role-line, .assignment-actions, .participant-actions { display: flex; gap: 6px 9px; align-items: center; flex-wrap: wrap; }
.assignment-status { font-size: .68rem; }
.assignment-status.good { color: #416149; }
.assignment-status.waiting { color: #825728; }
.role-description p { margin-top: 3px; font-size: .78rem; }
.management-tabs {
  display: flex; gap: 4px; padding: 4px; width: fit-content; max-width: 100%; flex-wrap: wrap;
  border-radius: 14px; background: #eae0d6; margin-bottom: 13px;
}
.management-tabs .btn { min-height: 37px; font-size: .82rem; padding-inline: 10px; }
.management-tabs [aria-selected="true"] { background: #fff9f1; box-shadow: 0 1px 4px #3a251623; }
.management-pane { min-width: 0; }
.management-pane .studio-card > p { line-height: 1.5; }
.studio-choice {
  display: flex; align-items: center; gap: 9px; min-height: 50px; position: relative;
  padding: 8px 10px; border: 1px solid #e3d4c8; border-radius: 12px; background: #fffaf4;
  cursor: pointer; transition: background .16s, border-color .16s, transform .2s var(--motion-remeet);
}
.studio-choice:active { transform: scale(.982); }
.studio-choice:hover { background: #f6e9dd; }
.studio-choice:has(input:checked) { border-color: #d6ac94; background: #f5e3d6; }
.studio-choice:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.studio-choice input { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); padding: 0; margin: 0; min-height: 1px; }
.choice-symbol { color: var(--brand-hover); display: grid; place-items: center; width: 29px; height: 29px; background: #efd9ca; border-radius: 9px; flex: 0 0 29px; }
.choice-symbol .glyph, .choice-mark .glyph { width: 16px; height: 16px; }
.choice-text { min-width: 0; display: grid; gap: 1px; }
.choice-text strong { font-size: .84rem; }
.choice-text small { font-size: .73rem; color: #63534b; }
.choice-mark { flex: 0 0 20px; min-height: 20px; display: grid; place-items: center; border-radius: 50%; margin-left: auto; border: 1px solid #d6bbb0; color: transparent; }
.studio-choice:has(input:checked) .choice-mark { background: var(--brand); border-color: var(--brand); color: white; }
.studio-choices { border: 0; margin: 0; min-inline-size: 0; padding: 0; display: grid; gap: 6px; }
.studio-choices legend { font-size: .82rem; font-weight: 600; margin-bottom: 7px; }
.person-options { max-height: 230px; overflow-y: auto; padding: 4px 3px; }
.studio-check { display: flex; align-items: start; gap: 8px; font-size: .8rem; }
.studio-check input { accent-color: var(--brand); margin-top: 4px; min-height: 0; width: auto; }
input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px #fbf1e7 inset; -webkit-text-fill-color: var(--ink); }
.form-columns > .field { min-width: 0; flex: 1; }
.notification-status { color: var(--team-ink); background: #f5e8de; padding: 7px 9px; border-radius: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.notification-status .status-failed { color: var(--danger); }
.studio-ticket-list { display: grid; }
.studio-ticket-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; border-top: 1px solid var(--border); font-size: .8rem; padding: 7px 0; }
.studio-ticket-row > span { flex: 1 1 14ch; overflow-wrap: anywhere; }
.journal-text { background: var(--surface-alt); border: 1px solid var(--border); border-radius: 12px; margin: 0; padding: 12px; white-space: pre-wrap; overflow-wrap: anywhere; font: .79rem/1.5 Geologica, sans-serif; }

.message-role { padding: 0; border-radius: 0; background: none; color: var(--brand-hover); font-weight: 500; }
.message-role.role-team { color: var(--team-ink); }
.message-role.role-student { color: var(--attendee-ink); }
.message-role.role-admin { color: #695347; }
.talk-message[data-author-role="host"] .message-bubble { background: #f5e4d8; }
.talk-message[data-author-role="mod"] .message-bubble { background: #f4e9e0; }
.talk-message[data-author-role="team"] .message-bubble { background: #f0e7de; }
.talk-message[data-author-role="student"] .message-bubble { background: #ecf0e9; }
.system-message { color: #645c56; }
.participant-actions { justify-content: flex-end; }
.participant-actions .btn.small { min-height: 37px; }
.participant-actions .icon-control { width: 37px; height: 37px; }
.stage .guest-voice {
  position: absolute; z-index: 6; bottom: var(--pip-inset, 12px); left: var(--pip-inset,12px);
  display: flex; align-items: center; gap: 7px; max-width: 55%; padding: 7px 9px; border-radius: 10px;
  border: 1px solid #f0cdbb4d; background: #302520ed; color: #fff4e8; font-size: .72rem;
  transition: box-shadow .22s ease-out, border-color .22s ease-out;
  animation: hint-in 170ms var(--motion-remeet) both;
}
.guest-voice[data-speaking="true"] { border-color: #e8a185; box-shadow: 0 0 12px #e8a18580; }
.guest-voice-copy { min-width: 0; display: grid; }
.guest-voice-copy small { color: #f2d1bf; font-size: .65rem; }
.guest-voice .glyph { width: 16px; height: 16px; }
.stage[data-camera-side="left"][data-has-screen="true"][data-has-host-camera="true"] .guest-voice { left:auto; right:var(--pip-inset,12px); }
.stage[data-has-speaker-camera="false"] .speaker-cam, .stage:not([data-has-speaker-camera]) .speaker-cam { display: none; }
.stage[data-scene="screen"][data-has-speaker-camera="true"] .speaker-cam { display: block; }
.guest-camera-label {
  position: absolute; bottom: 4px; inset-inline-start: 4px; max-width: calc(100% - 8px); padding: 2px 5px; border-radius: 5px;
  background: #281d1be5; color: #fff5ed; font-size: .62rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

@media (max-width: 960px) {
  .studio-workspace { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 600px) {
  .studio-header-inner { flex-wrap: wrap; min-height: 58px; gap: 2px 7px; }
  .studio-nav { order: 3; width: 100%; flex-wrap: wrap; gap: 2px; padding-bottom: 3px; }
  .studio-brand-link .brand { font-size: .91rem; }
  .studio-nav-link.btn { min-height: 36px; font-size: .74rem; }
  .studio-workspace { gap: 10px; }
  .studio-event-list + .studio-sidebar { order: 0; }
  .event-card { align-items: stretch; gap: 8px; }
  .event-card > * { width: 100%; }
  .event-actions { grid-template-columns: minmax(0,1fr) minmax(0,1fr) 39px; }
  .event-actions > .btn { min-height: 40px; font-size: .72rem; padding-inline: 5px; }
  .event-actions > :is(.action-menu,.empty-action):last-child { width: 39px; }
  .event-actions .icon-control { width: 39px; height: 39px; }
  .form-columns { gap: 7px; }
  .role-description p { font-size: .76rem; }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root), dialog.live-dialog::backdrop,
  dialog.live-dialog[data-closing="true"]::backdrop { animation: none; }
}

.studio-trail { margin: 0 0 14px; }
.studio-trail .studio-back.btn { border-color: transparent; min-height: 36px; padding-inline: 0 8px; font-size: .82rem; }
.studio-trail .studio-back:hover { background: transparent; }
.studio-back .glyph { width: 16px; height: 16px; }
.studio-title-actions { align-items: center; gap: 8px; }
.studio-archive-tools { margin: 0 0 12px; }
.studio-removed.btn { min-height: 35px; padding-inline: 10px; font-size: .76rem; }
.studio-technical { font-size: .76rem; color: var(--muted); }
.studio-technical .btn { margin: 4px 0 0; }
.welcome .poster .entry-camera {
  width: clamp(158px, 24vw, 194px); height: auto; margin: 6px auto 0;
  border-radius: 0; filter: drop-shadow(0 5px 9px #63413417);
  animation: scenes-arrive 360ms var(--motion-remeet) both;
}
.welcome .poster .entry-camera.camera-awake { animation: scenes-awake 650ms var(--motion-remeet); }
.entry-code-control { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:7px; }
.entry-code-control input { font-variant-numeric:tabular-nums; letter-spacing:.17em; }
.entry-code-control .entry-paste { padding-inline:12px; font-size:.75rem; }
.entry-paste-feedback { margin:4px 0 0; color:var(--muted); font-size:.74rem; }
.entry-paste-feedback:empty { display:none; }
.entry-resend { font-variant-numeric:tabular-nums; }
.entry-resend:disabled { opacity:1; color:var(--muted); background:#f4efea; border-color:#e6dad0; }
.entry-delivery-note {
  display:flex; align-items:flex-start; gap:10px; padding:10px 12px; border:1px solid #eccfbb;
  border-radius:12px; background:#f8ece0; color:#743e2a; font-size:.79rem; line-height:1.42;
}
.entry-delivery-note strong { display:block; font-weight:600; }
.entry-delivery-note p { margin:2px 0 0; color:#6d554b; }
.entry-delivery-note .glyph { width:19px; height:19px; flex:none; margin-top:1px; }
@keyframes scenes-arrive { from { opacity: .3; transform: translateY(4px) scale(.97); } }
@keyframes scenes-awake { 45% { transform: translateY(-2px) scale(1.02); } }
@media (prefers-reduced-motion: reduce) {
  .welcome .poster .entry-camera, .welcome .poster .entry-camera.camera-awake { animation: none; }
}

.camera-move-guide { display:flex; align-items:center; justify-content:center; gap:5px; color:var(--muted); font-size:.71rem; }
.camera-move-guide .glyph { width:15px; height:15px; color:var(--brand-hover); }
.camera-drag-bounds { position:absolute; inset:var(--pip-inset,12px); pointer-events:none; }
.hostcam .camera-drag { border:none; border-radius:inherit; padding:0; -webkit-user-drag:none; }
.hostcam .camera-drag:active { transform:none; }
.hostcam video { pointer-events:none; user-select:none; -webkit-user-drag:none; }
.camera-drag-frame { display:none; width:100%; height:100%; object-fit:cover; }
.camera-moving .camera-drag-frame { display:block; }
.hostcam.camera-moving .camera-drag { background:#392921; }
.camera-moving .camera-drag::after { content:''; position:absolute; inset:0; background:#30231e65; pointer-events:none; }
.camera-moving .camera-drag .glyph {
  inset:50% auto auto 50%; transform:translate(-50%,-50%); width:36px; height:36px;
  border-radius:12px; padding:7px; background:#ad583df0; z-index:1;
}

.solo-room .stage { --pip-inset:12px; }
.solo-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(220px,295px); align-items:start; gap:16px; }
.solo-mode { width:fit-content; background:#efdcd0; color:var(--brand-hover); font-size:.76rem; }
.solo-settings { gap:15px; }
.solo-room .stage:not([data-has-host-camera="true"]) .hostcam,
.solo-room .stage:not([data-has-screen="true"]) > .screen { visibility:hidden; }
.solo-room .stage .poster .glyph { width:37px; height:37px; margin-bottom:8px; color:#e4b5a0; }
.solo-actions { display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end; }
.solo-actions .btn { min-height:42px; }
.solo-timer { margin-left:5px; color:var(--muted); font-size:.75rem; font-variant-numeric:tabular-nums; }
.solo-dock .connection-label[data-state="recording"] { color:var(--danger); font-weight:600; }
.solo-dock .connection-label[data-state="recording"]::before {
  content:''; display:inline-block; width:7px; height:7px; margin-right:6px; border-radius:50%; background:currentColor;
}
.solo-preview-player { width:100%; max-height:480px; background:var(--night); border-radius:14px; }
.solo-files .stack { gap:3px; min-width:0; }
@media (max-width:820px) { .solo-layout { grid-template-columns:minmax(0,1fr); } }
@media (max-width:600px) { .solo-room .stage { --pip-inset:7px; } .solo-actions { justify-content:flex-start; } }
