@font-face {
  font-family:Archivo;
  src:url('/static2/assets/archivo-400.ttf') format('truetype');
  font-weight:400;
  font-display:swap
}

@font-face {
  font-family:Archivo;
  src:url('/static2/assets/archivo-700.ttf') format('truetype');
  font-weight:700;
  font-display:swap
}

@font-face {
  font-family:'JetBrains Mono';
  src:url('/static2/assets/jetbrains-mono-400.ttf') format('truetype');
  font-weight:400;
  font-display:swap
}

:root {
  color-scheme:dark;
  --gray-950:#101113;
  --gray-900:#18191c;
  --gray-800:#232428;
  --gray-700:#2d2e33;
  --gray-600:#3b3c42;
  --gray-500:#65666f;
  --gray-400:#9798a3;
  --gray-300:#bcbcc3;
  --gray-50:#f5f3ee;
  --brand-red:#ef534f;
  --brand-red-hover:#ff7770;
  --green-400:#83d3aa;
  --amber-400:#edc574;
  --red-400:#ff9098;
  --background:var(--gray-900);
  --surface:var(--gray-800);
  --raised:var(--gray-700);
  --inset:var(--gray-800);
  --field:var(--gray-700);
  --menu:var(--gray-700);
  --menu-hover:#393a40;
  --border:var(--gray-600);
  --border-strong:var(--gray-500);
  --text:var(--gray-50);
  --muted:var(--gray-300);
  --dim:var(--gray-400);
  --accent:var(--brand-red);
  --accent-hover:var(--brand-red-hover);
  --accent-ink:#240907;
  --good:var(--green-400);
  --warning:var(--amber-400);
  --bad:var(--red-400);
  --s1:4px;
  --s2:8px;
  --s3:12px;
  --s4:16px;
  --s6:24px;
  --s8:32px;
  --s12:48px;
  --s16:64px;
  --s24:96px;
  --r-control:10px;
  --r-card:16px;
  --r-panel:24px;
  --r-round:999px;
  --font-body:Archivo,Arial,sans-serif;
  --font-mono:'JetBrains Mono',Consolas,monospace;
  --text-small:14px;
  --text-body:18px;
  --inset-x:clamp(24px,5vw,128px);
  --fast:140ms;
  --normal:240ms;
  --slow:360ms;
  --ease:cubic-bezier(.16,1,.3,1);
  --shadow-card:0 10px 32px #0003,0 2px 8px #0002;
  --shadow-modal:0 32px 100px #0008,0 8px 24px #0006;
  --z-sticky:20;
  --z-menu:30;
  --z-modal:40;
  --z-notice:50
}

.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap;
  border:0
}

.choice-trigger {
  display:inline-flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  min-width:0;
  min-height:44px;
  width:100%;
  padding:11px 14px;
  border:1px solid var(--border-strong);
  border-radius:var(--r-control);
  background:var(--field);
  color:var(--text);
  font:inherit;
  text-align:left;
  transition:background var(--fast),border-color var(--fast),box-shadow var(--fast)
}

.choice-value {
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}

.choice-trigger > .icon {
  flex:none;
  width:16px;
  height:16px;
  color:var(--muted);
  transition:transform var(--fast)
}

.choice-trigger[aria-expanded=true] {
  border-color:var(--accent);
  box-shadow:0 0 0 1px var(--accent)
}

.choice-trigger[aria-expanded=true] > .icon { transform:rotate(180deg); }
.choice-trigger:focus-visible { outline-offset:3px; }
.choice-trigger[aria-expanded=true]:focus-visible { outline:none; }

.choice-menu {
  position:fixed;
  inset:auto;
  margin:0;
  padding:6px;
  border:1px solid var(--border-strong);
  border-radius:14px;
  background:var(--menu);
  color:var(--text);
  box-shadow:0 12px 32px #0005,0 2px 6px #0003;
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:var(--border-strong) transparent;
  z-index:var(--z-notice);
  animation:choice-enter 140ms var(--ease);
  font:400 14px/1.4 var(--font-body)
}

.choice-menu.is-open { display:block; }
.choice-menu::backdrop { background:transparent; }

.choice-option {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  min-height:44px;
  padding:10px 12px;
  border-radius:8px;
  cursor:pointer
}

.choice-option > span { min-width:0; overflow-wrap:anywhere; }
.choice-option > .icon { flex:none; width:16px; height:16px; opacity:0; }
.choice-option[aria-selected=true] { color:var(--accent-hover); }
.choice-option[aria-selected=true] > .icon { opacity:1; }
.choice-option.is-active { background:var(--menu-hover); }
.choice-option:active { background:var(--border-strong); }

@media (hover:hover) and (pointer:fine) {
  .choice-trigger:hover:not(:disabled) { background:var(--menu-hover); border-color:var(--dim); }
}

@keyframes choice-enter {
  from { opacity:0; transform:translateY(-3px); }
  to { opacity:1; transform:translateY(0); }
}

@media (prefers-reduced-motion:reduce) {
  .choice-menu { animation:none; }
  .choice-trigger,.choice-trigger > .icon { transition:none; }
}

* {
  box-sizing:border-box
}

html {
  background:var(--background);
  scroll-behavior:smooth
}

body {
  margin:0;
  color:var(--text);
  font:400 var(--text-body)/1.5 var(--font-body);
  font-variant-numeric:tabular-nums;
  -webkit-font-smoothing:antialiased
}

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

button,a,input,select,textarea {
  -webkit-tap-highlight-color:transparent
}

button,a {
  touch-action:manipulation
}

button {
  color:inherit;
  cursor:pointer
}

button:disabled {
  cursor:not-allowed;
  opacity:.45
}

a {
  color:inherit;
  text-decoration:none
}

input,textarea {
  width:100%;
  min-width:0;
  background:var(--field);
  color:var(--text);
  border:1px solid var(--border-strong);
  border-radius:var(--r-control);
  padding:12px 16px;
  min-height:46px
}

textarea {
  resize:vertical
}

input::placeholder,textarea::placeholder {
  color:var(--dim)
}

input[type=range] {
  accent-color:var(--accent);
  padding:0;
  min-height:28px;
  border:0;
  background:transparent
}

input[type=checkbox] {
  width:20px;
  min-height:20px;
  accent-color:var(--accent)
}

:focus-visible {
  outline:2px solid var(--accent);
  outline-offset:3px
}

h1,h2,h3,p {
  margin:0
}

h1,h2,h3 {
  font-weight:700
}

h1 {
  font-size:clamp(36px,3.5vw,84px);
  line-height:1.04;
  letter-spacing:-.045em;
  text-wrap:balance
}

h2 {
  font-size:clamp(22px,1.35vw,32px);
  line-height:1.2;
  letter-spacing:-.025em
}

h3 {
  font-size:21px;
  line-height:1.3;
  letter-spacing:-.015em
}

p {
  color:var(--muted)
}

small,.small {
  font-size:var(--text-small);
  line-height:1.45
}

.mono {
  font-family:var(--font-mono);
  font-weight:400
}

.muted {
  color:var(--muted)
}

.dim {
  color:var(--dim)
}

.accent {
  color:var(--accent)
}

.good {
  color:var(--good)
}

.warning {
  color:var(--warning)
}

.icon {
  width:22px;
  height:22px;
  display:inline-block;
  flex-shrink:0;
  vertical-align:middle
}

.hidden {
  display:none
}

.row {
  display:flex;
  align-items:center;
  gap:var(--s3);
  min-width:0
}

.wrap {
  flex-wrap:wrap
}

.spread {
  justify-content:space-between
}

.stack {
  display:flex;
  flex-direction:column;
  gap:var(--s6);
  min-width:0
}

.stack-tight {
  display:flex;
  flex-direction:column;
  gap:var(--s3);
  min-width:0
}

.grow {
  flex:1;
  min-width:0
}

.end {
  justify-content:flex-end
}

.section-head {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:var(--s6)
}

.section-head small {
  color:var(--dim)
}

.eyebrow {
  font:400 13px/1.4 var(--font-mono);
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--muted)
}

.panel {
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--r-panel);
  overflow:clip
}

.divider {
  height:1px;
  background:var(--border);
  margin:var(--s6) 0
}

.btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:11px 18px;
  border:1px solid var(--border-strong);
  border-radius:var(--r-control);
  font-weight:700;
  line-height:1.25;
  background:var(--raised);
  transition:background var(--fast),border-color var(--fast),transform var(--fast)
}

.btn:hover:not(:disabled) {
  background:#393a40;
  border-color:var(--muted)
}

.btn:active:not(:disabled) {
  transform:translateY(1px)
}

.btn-primary {
  background:var(--accent);
  border-color:var(--accent);
  color:var(--accent-ink)
}

.btn-primary:hover:not(:disabled) {
  background:var(--accent-hover);
  border-color:var(--accent-hover)
}

.btn-quiet {
  background:transparent;
  border-color:transparent;
  font-weight:400;
  color:var(--muted)
}

.btn-quiet:hover:not(:disabled) {
  background:var(--raised);
  border-color:transparent;
  color:var(--text)
}

.btn-danger {
  color:var(--bad);
  background:transparent;
  border-color:#ff90984d
}

.btn-large {
  min-height:58px;
  padding:16px 24px;
  font-size:18px
}

.btn-icon {
  width:46px;
  padding:10px;
  flex-shrink:0
}

.text-link {
  border:0;
  background:none;
  color:var(--accent);
  padding:8px 0;
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:44px
}

.status {
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:14px;
  color:var(--muted)
}

.status:before {
  content:'';
  width:7px;
  height:7px;
  border-radius:50%;
  background:currentColor;
  flex-shrink:0
}

.status.good {
  color:var(--good)
}

.status.warning {
  color:var(--warning)
}

.tag {
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:5px 9px;
  border-radius:6px;
  background:var(--raised);
  color:var(--muted);
  font-size:13px
}

.tag.accent {
  background:#ef534f17;
  color:var(--accent)
}

.tag.outline {
  border:1px solid var(--border);
  background:transparent
}

.avatar {
  height:42px;
  width:42px;
  flex-shrink:0;
  border-radius:50%;
  overflow:hidden;
  background:var(--raised);
  display:grid;
  place-items:center;
  color:var(--text);
  border:2px solid var(--border)
}

.avatar svg, .avatar img {
  display:block;
  object-fit:cover;
  width:100%;
  height:100%
}

.avatar.large {
  width:96px;
  height:96px;
  border-width:3px
}

.avatar.small {
  height:30px;
  width:30px
}

.avatar-stack .avatar {
  border-color:var(--surface)
}

.brand {
  display:flex;
  align-items:center;
  font-weight:700;
  white-space:nowrap
}

.brand em {
  font-style:normal
}

.topbar {
  align-items:center;
  gap:var(--s12);
  border-bottom:1px solid var(--border);
  position:relative;
  z-index:var(--z-sticky)
}

.nav {
  display:flex;
  align-items:center;
  gap:var(--s2);
  flex:1
}

.nav a {
  padding:10px 18px;
  color:var(--muted);
  border-radius:var(--r-control);
  font-size:16px;
  transition:background var(--fast),color var(--fast)
}

.nav a:hover {
  color:var(--text);
  background:var(--surface)
}

.nav a[aria-current=page] {
  background:var(--raised);
  color:var(--text)
}

.topbar-right {
  display:flex;
  gap:var(--s4);
  align-items:center
}

.language-button {
  font:14px var(--font-mono);
  border:0;
  background:none;
  display:flex;
  align-items:center;
  gap:8px;
  min-height:44px
}

.account-button {
  border:0;
  background:transparent;
  border-radius:var(--r-round);
  padding:5px;
  display:flex;
  align-items:center;
  gap:12px
}

.account-button:hover {
  background:var(--raised)
}

.page-header {
  display:flex;
  align-items:end;
  justify-content:space-between;
  margin-bottom:var(--s8)
}

.page-header p {
  margin-top:var(--s3)
}

.page-footer {
  display:flex;
  justify-content:space-between;
  align-items:center;
  color:var(--dim)
}

.page-footer .btn {
  font-size:13px;
  min-height:32px;
  padding:6px 10px
}

.skip-link {
  position:fixed;
  top:0;
  left:24px;
  z-index:100;
  padding:12px;
  background:var(--accent);
  color:var(--accent-ink);
  transform:translateY(-120%)
}

.skip-link:focus {
  transform:none
}

.skip-link:not(:focus) {
  clip-path:inset(50%);
  pointer-events:none
}

.code-inputs {
  display:flex;
  gap:8px
}

.code-inputs input {
  width:54px;
  height:62px;
  padding:0;
  text-align:center;
  font:24px var(--font-mono)
}

.form-error {
  color:var(--bad);
  font-size:14px;
  margin-top:8px
}

.snapshot-stats {
  grid-template-columns:repeat(4,minmax(0,1fr))
}

.snapshot-stat strong {
  font:clamp(26px,1.8vw,44px)/1.2 var(--font-mono)
}

.snapshot-stat span {
  max-width:150px
}

.ranking-row {
  display:grid;
  align-items:center;
  border-bottom:1px solid var(--border)
}

.ranking-row:last-child {
  border-bottom:0
}

.ranking-row .mono {
  font-size:18px
}

.ranking-row small {
  display:block;
  color:var(--dim)
}

.mini-scene-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr))
}

.search-field {
  display:flex;
  align-items:center;
  gap:var(--s4);
  border:1px solid var(--border-strong);
  background:var(--surface)
}

.search-field>.icon {
  color:var(--accent);
  width:28px;
  height:28px
}

.search-field input {
  background:transparent;
  border:0;
  border-radius:6px;
  min-height:48px;
  padding:8px 0
}

.search-field input:focus-visible {
  outline:0
}

.search-field:focus-within {
  outline:2px solid var(--accent);
  outline-offset:2px
}

.search-field kbd {
  font:12px var(--font-mono);
  border:1px solid var(--border-strong);
  border-radius:5px;
  padding:5px;
  color:var(--dim)
}

.catalog-toolbar {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between
}

.segmented {
  display:inline-flex;
  border:1px solid var(--border);
  background:var(--inset);
  border-radius:var(--r-control);
  padding:4px;
  gap:4px
}

.segmented button {
  border:0;
  border-radius:7px;
  background:transparent;
  color:var(--muted);
  padding:9px 14px;
  min-height:40px;
  font-size:14px;
  white-space:nowrap
}

.segmented button[aria-pressed=true] {
  background:var(--raised);
  color:var(--text)
}

.segmented button:hover {
  color:var(--text)
}

.compact-select {
  width:auto;
  max-width:220px;
  min-height:44px;
  background:var(--surface);
  border-color:var(--border)
}

.group-stepper {
  display:flex;
  align-items:center;
  gap:6px;
  border:1px solid var(--border);
  border-radius:var(--r-control);
  padding:3px 6px;
  font-size:14px
}

.group-stepper button {
  border:0;
  background:transparent;
  min-width:32px;
  min-height:36px;
  padding:4px;
  border-radius:6px
}

.group-stepper button:hover {
  background:var(--raised)
}

.group-stepper .icon {
  height:16px;
  width:16px
}

.catalog-summary {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:var(--s4);
  margin:var(--s8) 0 var(--s4)
}

.catalog-summary p {
  color:var(--dim)
}

.scene-grid {
  display:grid
}

.scene-card {
  min-width:0;
  position:relative;
  background:var(--surface);
  overflow:clip
}

.scene-main {
  display:block;
  background:none;
  border:0;
  padding:0;
  width:100%;
  text-align:left
}

.scene-art {
  position:relative;
  aspect-ratio:16/9;
  background:var(--inset);
  overflow:hidden
}

.scene-art>svg, .scene-art>img {
  display:block;
  object-fit:cover;
  width:100%;
  height:100%
}

.scene-art:after {
  content:'';
  position:absolute;
  inset:0;
  border:1px solid #ffffff14;
  pointer-events:none
}

.scene-art .play-float {
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  display:grid;
  place-items:center;
  width:58px;
  height:58px;
  border-radius:50%;
  background:#101113bf;
  color:var(--text);
  border:1px solid #ffffff80
}

.scene-work {
  color:var(--dim);
  font-size:13px;
  margin-bottom:5px;
  white-space:nowrap;
  text-overflow:ellipsis;
  overflow:hidden
}

.scene-title {
  font-weight:700;
  font-size:18px;
  line-height:1.3;
  min-height:2.6em;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden
}

.scene-meta {
  display:flex;
  align-items:center;
  gap:10px;
  justify-content:space-between;
  margin-top:var(--s3);
  font-size:13px;
  color:var(--muted)
}

.scene-duration {
  position:absolute;
  right:10px;
  bottom:10px;
  background:#101113e6;
  border-radius:5px;
  color:var(--text);
  padding:3px 7px;
  font:12px var(--font-mono)
}

.scene-favorite {
  position:absolute;
  right:8px;
  top:8px;
  width:36px;
  height:36px;
  border:1px solid #ffffff40;
  border-radius:9px;
  background:#101113ae;
  display:grid;
  place-items:center;
  color:var(--text)
}

.scene-favorite .icon {
  height:18px;
  width:18px
}

.scene-favorite[aria-pressed=true] {
  color:var(--accent);
  background:var(--inset)
}

.scene-favorite[aria-pressed=true] .icon {
  fill:currentColor
}

.scene-audition {
  position:absolute;
  left:8px;
  top:8px;
  font-size:12px;
  min-height:32px;
  background:#101113ce;
  border:1px solid #ffffff40;
  border-radius:7px;
  display:flex;
  gap:5px;
  align-items:center;
  padding:4px 7px
}

.scene-audition .icon {
  width:14px;
  height:14px
}

.collection-label {
  position:absolute;
  left:12px;
  bottom:12px;
  background:var(--text);
  color:var(--inset);
  padding:4px 8px;
  font-size:13px;
  font-weight:700;
  border-radius:5px
}

.collection-card {
  box-shadow:0 4px 0 -1px var(--raised),0 8px 0 -3px var(--border-strong)
}

.match-text {
  font-size:14px;
  color:var(--muted);
  padding:0 16px 16px
}

.match-text mark {
  background:#ef534f24;
  color:var(--accent);
  border-radius:2px
}

.pagination {
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  align-items:center;
  gap:var(--s6);
  color:var(--dim);
  font-size:14px
}

.choice-trigger.compact-select {
  background:var(--field)
}

.empty-state {
  min-height:240px;
  padding:var(--s12) var(--s6);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  gap:var(--s4)
}

.empty-state p {
  max-width:48ch;
  font-size:16px
}

.empty-state>.icon {
  color:var(--dim);
  width:36px;
  height:36px
}

.filter-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:var(--s6)
}

.field {
  display:flex;
  flex-direction:column;
  gap:8px;
  min-width:0
}

.field>span:first-child {
  color:var(--muted)
}

dialog {
  width:min(760px,calc(100vw - 48px));
  max-height:calc(100dvh - 64px);
  padding:0;
  background:var(--surface);
  color:var(--text);
  border:1px solid var(--border-strong);
  box-shadow:var(--shadow-modal);
  overflow:auto
}

dialog::backdrop {
  background:#08090bbc;
  backdrop-filter:blur(7px)
}

.dialog-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  border-bottom:1px solid var(--border);
  top:0;
  background:var(--surface);
  z-index:1
}

.dialog-footer {
  border-top:1px solid var(--border);
  display:flex;
  justify-content:flex-end;
  gap:var(--s3)
}

.menu-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:var(--s3)
}

.menu-item {
  display:flex;
  align-items:center;
  gap:var(--s4);
  border:1px solid var(--border);
  background:var(--raised);
  border-radius:var(--r-card);
  text-align:left;
  padding:var(--s6);
  min-height:72px
}

.menu-item:hover {
  border-color:var(--border-strong)
}

.menu-item .icon {
  color:var(--accent)
}

.dialog-video {
  border-radius:var(--r-card);
  overflow:clip;
  aspect-ratio:16/9;
  background:var(--inset);
  margin-bottom:var(--s6)
}

.dialog-video video {
  width:100%;
  height:100%;
  object-fit:contain
}

.role-details {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin:var(--s6) 0
}

.role-detail {
  display:flex;
  gap:var(--s3);
  align-items:center;
  padding:12px;
  background:var(--raised);
  border-radius:var(--r-control)
}

.role-detail small {
  display:block;
  color:var(--dim)
}

#notice {
  position:fixed;
  bottom:28px;
  left:50%;
  transform:translateX(-50%);
  z-index:var(--z-notice);
  max-width:min(700px,calc(100vw - 32px))
}

.toast {
  background:var(--raised);
  border:1px solid var(--border-strong);
  padding:14px 16px 14px 22px;
  border-radius:var(--r-card);
  box-shadow:var(--shadow-modal);
  display:flex;
  align-items:center;
  gap:16px;
  font-size:15px
}

.toast .btn {
  min-height:32px;
  width:32px;
  padding:4px
}

.toast.error {
  border-color:var(--bad)
}

.room-topbar {
  gap:var(--s8)
}

.room-topbar .brand {
  font-size:23px
}

.room-code-button {
  font:22px var(--font-mono);
  letter-spacing:.12em;
  border:1px solid var(--border-strong);
  background:var(--surface);
  border-radius:var(--r-control);
  padding:8px 16px;
  display:flex;
  align-items:center;
  gap:12px
}

.room-code-button .icon {
  width:17px;
  height:17px
}

.room-phase {
  font-size:14px;
  color:var(--muted);
  flex:1
}

.room-phase strong {
  color:var(--text);
  font-weight:400
}

.phase-strip {
  display:flex;
  align-items:center;
  margin-bottom:var(--s8);
  color:var(--dim);
  font-size:14px
}

.phase-item {
  display:flex;
  align-items:center;
  gap:8px
}

.phase-item.current {
  color:var(--accent)
}

.phase-item .icon {
  width:17px;
  height:17px
}

.room-page {
  padding-top:var(--s8)
}

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

.room-main {
  min-width:0
}

.selected-scene {
  display:grid;
  background:var(--surface);
  border:1px solid var(--border);
  overflow:clip
}

.selected-scene .scene-art {
  aspect-ratio:auto
}

.selected-scene-info {
  display:flex;
  flex-direction:column;
  justify-content:center
}

.selected-scene-info .btn {
  align-self:flex-start
}

.role-list {
  border:1px solid var(--border);
  border-radius:var(--r-card);
  overflow:clip;
  background:var(--surface);
  overflow-y:auto
}

.cast-row {
  display:grid;
  align-items:center;
  border-bottom:1px solid var(--border)
}

.cast-row:last-child {
  border-bottom:0
}

.role-dot {
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  background:color-mix(in srgb,var(--role-color,var(--accent)) 12%,transparent);
  color:var(--role-color,var(--accent));
  border-radius:9px;
  border:1px solid color-mix(in srgb,var(--role-color,var(--accent)) 32%,transparent)
}

.cast-row .btn {
  justify-content:flex-start;
  font-size:14px;
  min-height:42px;
  padding:5px 10px;
  background:var(--raised);
  border-color:var(--border)
}

.cast-row .mono {
  color:var(--muted)
}

.cast-row small {
  font-size:12px;
  color:var(--dim)
}

.cast-row .name {
  font-weight:700
}

.task-grid {
  display:grid;
  grid-template-columns:1fr 1fr
}

.task-card {
  background:var(--surface);
  border:1px solid var(--border)
}

.task-card p {
  margin:10px 0 16px
}

.task-card .role-dot {
  flex-shrink:0
}

.room-aside {
  display:flex;
  flex-direction:column;
  gap:var(--s6);
  position:sticky;
  top:24px
}

.crew-panel {
  background:var(--surface);
  border:1px solid var(--border)
}

.crew-row {
  display:flex;
  align-items:center;
  border-bottom:1px solid var(--border)
}

.crew-row:last-of-type {
  border-bottom:0
}

.crew-row .name {
  font-weight:700
}

.crew-row .icon {
  height:17px;
  width:17px
}

.crew-row small {
  font-size:12px;
  color:var(--dim)
}

.crew-task {
  display:flex;
  gap:5px;
  align-items:center;
  color:var(--dim);
  font-size:12px;
  flex-wrap:wrap
}

.ready-check {
  margin-left:auto;
  color:var(--good)
}

.mic-meter {
  display:flex;
  gap:3px;
  height:32px;
  align-items:center;
  margin:var(--s4) 0
}

.mic-meter i {
  width:100%;
  height:var(--bar-height,20%);
  background:var(--border);
  border-radius:2px;
  min-height:5px
}

.mic-meter.active i:nth-child(-n+22) {
  background:var(--good)
}

.room-settings {
  display:grid
}

.mode-options {
  display:grid
}

.mode-option {
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--r-control);
  text-align:left
}

.mode-option[aria-pressed=true] {
  border-color:var(--accent);
  background:#ef534f0b
}

.mode-option p {
  margin-top:5px
}

.round-footer {
  position:fixed;
  bottom:0;
  left:0;
  right:0;
  background:#1c1d21f5;
  backdrop-filter:blur(12px);
  border-top:1px solid var(--border);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:var(--s6);
  z-index:var(--z-sticky)
}

.round-footer strong {
  display:block;
  margin-bottom:2px
}

.room-catalog {
  animation:page-in var(--normal) var(--ease)
}

.room-catalog .search-field input {
  font-size:18px
}

.room-catalog .scene-grid {
  grid-template-columns:repeat(auto-fill,minmax(232px,1fr));
  gap:16px
}

.invite-code {
  font:56px var(--font-mono);
  letter-spacing:.1em;
  margin:12px 0
}

.record-page {
  padding-bottom:105px
}

.record-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:var(--s6);
  margin-bottom:var(--s6)
}

.record-heading h1 {
  font-size:36px
}

.record-layout {
  display:grid;
  grid-template-columns:minmax(0,1fr) 310px;
  gap:var(--s6);
  min-height:440px
}

.record-stage {
  grid-template-rows:minmax(200px,1fr) auto 115px;
  min-height:0;
  min-width:0
}

.record-video {
  background:var(--inset);
  border:1px solid var(--border);
  border-radius:var(--r-card);
  position:relative;
  overflow:clip;
  min-height:0
}

.record-video .scene-art {
  height:100%;
  aspect-ratio:auto
}

.record-video .scene-art>svg, .record-video .scene-art>img {
  opacity:.42
}

.record-video video {
  width:100%;
  height:100%;
  object-fit:contain
}

.record-video-top {
  position:absolute;
  left:24px;
  right:24px;
  top:20px;
  display:flex;
  justify-content:space-between
}

.record-video-top .tag {
  background:#101113d9
}

.waveform {
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--r-card);
  position:relative;
  padding:14px 18px;
  overflow:clip
}

.waveform-label {
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:12px;
  color:var(--dim)
}

.waveform svg {
  display:block;
  width:100%;
  height:60px
}

.record-aside {
  display:flex;
  flex-direction:column;
  border:1px solid var(--border);
  background:var(--surface);
  overflow:auto;
  min-height:0
}

.record-aside .field {
  font-size:14px
}

.record-aside .crew-row {
  padding:12px 0
}

.line-strip {
  display:flex;
  gap:8px;
  overflow-x:auto;
  padding:12px 2px;
  margin-top:var(--s4)
}

.line-button {
  min-width:58px;
  height:48px;
  border-radius:var(--r-control);
  border:1px solid var(--border);
  background:var(--surface);
  font:14px var(--font-mono);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:5px
}

.line-button.current {
  border-color:var(--accent);
  box-shadow:inset 0 0 0 1px var(--accent)
}

.line-button.done {
  color:var(--good)
}

.line-button.flagged {
  color:var(--warning);
  background:#edc5740c
}

.line-button .icon {
  width:14px;
  height:14px
}

.review-adjust {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:var(--s6);
  margin-top:16px
}

.review-adjust .field {
  font-size:13px
}

.watch-layout {
  display:grid
}

.watch-video {
  border-radius:var(--r-panel);
  overflow:clip;
  background:var(--inset);
  border:1px solid var(--border);
  position:relative
}

.watch-controls {
  display:flex;
  gap:16px;
  align-items:center;
  background:var(--surface)
}

.watch-controls input[type=range] {
  max-width:160px
}

.watch-controls input[type=range].timeline {
  max-width:none;
  flex:1
}

.watch-clock {
  font:14px var(--font-mono);
  white-space:nowrap
}

.watch-caption {
  position:absolute;
  left:24px;
  right:24px;
  text-align:center;
  font-size:24px;
  text-shadow:0 2px 8px #000
}

.vote-layout {
  display:grid;
  align-items:start
}

.vote-list {
  border:1px solid var(--border);
  background:var(--surface);
  border-radius:var(--r-panel);
  overflow:clip
}

.vote-row {
  display:flex;
  align-items:center;
  border-bottom:1px solid var(--border)
}

.vote-row:last-child {
  border:0
}

.vote-row .name {
  font-weight:700
}

.vote-row small {
  color:var(--dim);
  display:block
}

.vote-counter {
  display:flex;
  align-items:center;
  gap:12px
}

.vote-counter .mono {
  font-size:30px;
  min-width:32px;
  text-align:center
}

.vote-own {
  opacity:.62
}

.ballot-points {
  display:flex;
  margin:var(--s8) 0
}

.ballot-point {
  border:2px solid var(--accent);
  border-radius:50%;
  display:grid;
  place-items:center;
  color:var(--accent);
  background:#ef534f12;
  transition:opacity var(--normal),transform var(--normal)
}

.ballot-point.spent {
  opacity:.18;
  transform:scale(.9)
}

.ballot-point .icon {
  width:32px;
  height:32px
}

.vote-help {
  position:sticky;
  top:32px
}

.vote-help p {
  margin-top:var(--s4);
  max-width:35ch
}

.vote-help .status {
  margin-top:var(--s8)
}

.award-layout {
  display:grid
}

.award-stage {
  border:1px solid var(--border);
  background:var(--surface);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  position:relative;
  overflow:hidden
}

.award-emblem {
  color:var(--accent);
  margin-bottom:24px;
  transform:rotate(-7deg)
}

.award-emblem .icon {
  width:100%;
  height:100%
}

.award-stage h2 {
  color:var(--accent);
  margin:12px 0
}

.award-stage p {
  max-width:38ch
}

.award-stage .avatar {
  margin:24px 0 8px
}

.podium {
  display:flex;
  align-items:flex-end;
  justify-content:center;
  gap:16px;
  width:100%;
  margin-top:32px
}

.podium-person {
  width:30%;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px
}

.podium-block {
  width:100%;
  border-radius:12px 12px 0 0;
  background:var(--raised);
  height:80px;
  display:flex;
  align-items:center;
  justify-content:center;
  font:32px var(--font-mono)
}

.podium-person.first .podium-block {
  height:128px;
  background:var(--accent);
  color:var(--accent-ink)
}

.podium-person.third .podium-block {
  height:60px
}

.podium-person>span {
  font-size:14px
}

.confetti {
  position:absolute;
  width:7px;
  height:14px;
  top:-20px;
  background:var(--accent);
  animation:confetti-fall 2.2s var(--ease) forwards;
  pointer-events:none
}

.results-table {
  width:100%;
  border-collapse:collapse;
  font-size:15px
}

.results-table th {
  text-align:left;
  padding:14px 12px;
  color:var(--dim);
  font-size:13px;
  font-weight:400;
  border-bottom:1px solid var(--border)
}

.results-table td {
  padding:16px 12px;
  border-bottom:1px solid var(--border)
}

.results-table th:last-child,.results-table td:last-child {
  text-align:right
}

.results-table .avatar {
  height:32px;
  width:32px
}

.profile-layout {
  display:grid
}

.profile-card {
  border:1px solid var(--border);
  background:var(--surface);
  align-self:start
}

.profile-card h1 {
  font-size:36px;
  margin:24px 0 8px
}

.profile-score {
  font:64px/1 var(--font-mono);
  letter-spacing:-.08em
}

.profile-score small {
  font:16px var(--font-body);
  color:var(--dim);
  letter-spacing:0
}

.profile-metrics {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  padding-bottom:32px;
  border-bottom:1px solid var(--border)
}

.profile-metrics strong {
  font:32px var(--font-mono);
  display:block
}

.profile-metrics small {
  color:var(--dim)
}

.award-grid {
  display:grid
}

.award-small {
  border-radius:var(--r-card);
  border:1px solid var(--border);
  background:var(--surface)
}

.award-small .icon {
  width:28px;
  height:28px;
  color:var(--accent);
  margin-bottom:16px
}

.award-small.locked {
  opacity:.5
}

.audio-layout {
  display:grid
}

.audio-metrics {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  margin-bottom:24px
}

.audio-metrics strong {
  display:block;
  font:20px var(--font-mono)
}

.audio-metrics small {
  color:var(--dim)
}

.switch-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  padding:16px 0;
  border-bottom:1px solid var(--border);
  font-size:15px
}

.toggle {
  width:48px;
  height:28px;
  min-height:28px;
  border:1px solid var(--border-strong);
  border-radius:var(--r-round);
  background:var(--raised);
  padding:3px;
  flex-shrink:0
}

.toggle:after {
  content:'';
  display:block;
  width:20px;
  height:20px;
  border-radius:50%;
  background:var(--muted);
  transition:transform var(--fast)
}

.toggle[aria-checked=true] {
  background:var(--accent);
  border-color:var(--accent)
}

.toggle[aria-checked=true]:after {
  transform:translateX(18px);
  background:var(--accent-ink)
}

.tap-grid {
  display:flex;
  gap:12px;
  margin:24px 0
}

.tap-dot {
  height:14px;
  width:14px;
  border-radius:50%;
  background:var(--border-strong)
}

.tap-dot.done {
  background:var(--accent)
}

.tap-dot.current {
  outline:2px solid var(--accent);
  outline-offset:5px
}

.tabs {
  display:flex;
  gap:var(--s6);
  border-bottom:1px solid var(--border);
  overflow-x:auto
}

.tabs a,.tabs button {
  border:0;
  background:none;
  color:var(--muted);
  padding:14px 0;
  border-bottom:2px solid transparent;
  white-space:nowrap;
  font-size:16px
}

.tabs [aria-current=page],.tabs [aria-selected=true] {
  color:var(--accent);
  border-bottom-color:var(--accent)
}

.draft-list {
  border:1px solid var(--border);
  border-radius:var(--r-card);
  overflow:clip
}

.draft-item {
  display:flex;
  gap:12px;
  align-items:center;
  text-align:left;
  width:100%;
  border:0;
  border-bottom:1px solid var(--border);
  background:var(--surface)
}

.draft-item.active {
  background:var(--raised);
  box-shadow:inset 3px 0 var(--accent)
}

.draft-item .scene-art {
  width:60px;
  flex-shrink:0;
  border-radius:5px
}

.draft-item strong {
  font-size:14px
}

.draft-item small {
  display:block;
  font-size:12px;
  color:var(--dim)
}

.studio-editor {
  min-width:0
}

.editor-grid {
  display:grid
}

.editor-media {
  min-width:0;
  background:var(--inset);
  border-radius:var(--r-card);
  overflow:clip
}

.editor-media video {
  width:100%;
  height:100%;
  object-fit:contain
}

.editor-media .scene-art {
  height:100%;
  aspect-ratio:auto
}

.trim-timeline {
  display:flex;
  gap:12px;
  margin:16px 0
}

.trim-timeline input {
  max-width:150px
}

.editor-form {
  display:flex;
  flex-direction:column
}

.transcript-row {
  display:grid;
  gap:12px;
  align-items:center;
  padding:12px 0;
  border-bottom:1px solid var(--border)
}

.transcript-row input {
  padding:8px;
  font-size:14px;
  min-height:40px
}

.studio-import {
  display:grid;
  grid-template-columns:1.1fr 1fr
}

.upload-area {
  border:1px dashed var(--border-strong);
  border-radius:var(--r-panel);
  background:var(--surface);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  gap:24px;
  padding:32px
}

.upload-area>.icon {
  width:48px;
  height:48px;
  color:var(--accent)
}

.admin-grid {
  display:grid
}

.admin-metrics {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  margin-bottom:var(--s8)
}

.admin-metric {
  padding:var(--s6);
  background:var(--surface);
  border-radius:var(--r-card);
  border:1px solid var(--border)
}

.admin-metric strong {
  font:clamp(26px,1.6vw,40px) var(--font-mono);
  display:block;
  margin-top:12px;
  letter-spacing:-.05em
}

.admin-metric small {
  color:var(--dim)
}

.storage-row {
  display:grid;
  align-items:center;
  margin-top:20px
}

.storage-row .mono {
  text-align:right
}

.storage-track {
  height:6px;
  background:var(--raised);
  border-radius:6px;
  overflow:hidden
}

.storage-track i {
  display:block;
  height:100%;
  background:var(--accent);
  min-width:2px
}

.capability-row {
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-bottom:1px solid var(--border)
}

.capability-row:last-child {
  border:0
}

.data-table {
  width:100%;
  border-collapse:collapse;
  font-size:16px
}

.data-table th {
  padding:16px 24px;
  text-align:left;
  font-size:13px;
  font-weight:400;
  color:var(--dim);
  background:var(--inset)
}

.data-table td {
  padding:20px 24px;
  border-top:1px solid var(--border)
}

.data-table td:last-child {
  text-align:right
}

.table-scroll {
  overflow:auto;
  border:1px solid var(--border);
  border-radius:var(--r-card);
  background:var(--surface)
}

.login-layout {
  max-width:620px;
  margin:64px auto
}

.login-layout h1 {
  font-size:48px
}

.progress-bar {
  height:6px;
  background:var(--border);
  overflow:hidden;
  border-radius:3px
}

.progress-bar i {
  display:block;
  height:100%;
  background:var(--accent);
  width:0;
  transition:width var(--normal)
}

::-webkit-scrollbar {
  width:8px;
  height:8px
}

::-webkit-scrollbar-thumb {
  background:var(--border-strong);
  border-radius:8px;
  border:2px solid var(--background)
}

::-webkit-scrollbar-track {
  background:transparent
}

::-webkit-scrollbar-button {
  width:0;
  height:0;
  display:none
}

::-webkit-scrollbar-corner {
  background:transparent
}

* {
  scrollbar-width:thin;
  scrollbar-color:var(--border-strong) transparent
}

@media(hover:hover) and (pointer:fine) {
  .scene-card:hover {
    transform:translateY(-4px);
    border-color:var(--border-strong);
    box-shadow:var(--shadow-card)
  }
  .scene-card:hover .play-float {
    background:var(--accent);
    color:var(--accent-ink)
  }
  .scene-favorite:hover,.scene-audition:hover {
    border-color:var(--text);
    background:var(--inset)
  }
}

@keyframes page-in {
  from {
    opacity:0;
    transform:translateY(12px)
  }
  to {
    opacity:1;
    transform:none
  }
}

@keyframes confetti-fall {
  to {
    transform:translateY(500px) rotate(220deg);
    opacity:0
  }
}

@media(min-width:2200px) {

  .scene-title {
    font-size:20px
  }
  .room-layout {
    grid-template-columns:minmax(0,1fr) 400px
  }
  .crew-panel {
    padding:32px
  }
  .crew-row {
    padding:20px 0
  }
  .crew-row .name {
    font-size:18px
  }
  .crew-row .avatar {
    width:42px;
    height:42px
  }
  .crew-task,.crew-row small,.crew-row .status {
    font-size:14px
  }
  .record-layout {
    grid-template-columns:minmax(0,1fr) 390px;
    grid-template-rows:minmax(0,1fr)
  }
  .record-stage {
    grid-template-rows:minmax(200px,1fr) auto 145px
  }
  .waveform svg {
    height:88px
  }
  .selected-scene {
    grid-template-columns:minmax(300px,.8fr) 1fr
  }
  .selected-scene .scene-art {
    min-height:260px
  }
  .cast-row {
    padding:20px 24px
  }
  .cast-row .name {
    font-size:18px
  }
  .role-list {
    max-height:490px
  }
  .room-settings {
    margin-top:32px
  }
  .page-footer {
    font-size:14px
  }
}

@media(max-width:1600px) {
  :root {
    --text-body:16px;
    --inset-x:48px
  }
  .topbar {
    height:76px
  }
  .page {
    padding-top:32px
  }

  .snapshot-stats {
    padding:24px 0
  }

  .room-layout {
    grid-template-columns:minmax(0,1fr) 300px;
    gap:24px
  }
  .room-aside {
    gap:16px
  }
  .crew-panel {
    padding:20px
  }
  .crew-row {
    padding:12px 0
  }
  .room-settings {
    grid-template-columns:1fr
  }
  .mode-options {
    grid-template-columns:repeat(4,1fr)
  }
  .selected-scene-info h2 {
    font-size:24px
  }
  .cast-row {
    grid-template-columns:32px minmax(100px,1fr) 68px 68px 170px;
    gap:12px;
    padding:14px 16px
  }
  .record-layout {
    grid-template-columns:minmax(0,1fr) 280px;
    height:calc(100dvh - 282px);
    min-height:340px
  }
  .record-stage {
    grid-template-rows:minmax(160px,1fr) auto 92px
  }
  .waveform svg {
    height:42px
  }
  .record-heading {
    margin-bottom:16px
  }
  .record-heading h1 {
    font-size:30px
  }
  .record-aside {
    padding:20px;
    gap:20px
  }
  .round-footer {
    padding:14px var(--inset-x)
  }
  .record-page {
    padding-top:24px
  }
  .profile-layout {
    grid-template-columns:300px minmax(0,1fr);
    gap:32px
  }
  .editor-grid {
    grid-template-columns:1fr 270px
  }
  .vote-layout {
    gap:48px
  }
  .vote-row {
    padding:20px 24px
  }
}

@media(max-width:1150px) {
  :root {
    --inset-x:32px
  }

  .room-layout {
    grid-template-columns:minmax(0,1fr) 270px;
    gap:16px
  }
  .selected-scene {
    grid-template-columns:1fr
  }
  .selected-scene .scene-art {
    max-height:180px
  }
  .cast-row {
    grid-template-columns:30px minmax(90px,1fr) 64px 145px
  }
  .cast-row .cast-time {
    display:none
  }
  .task-grid {
    grid-template-columns:1fr
  }
  .mode-options {
    grid-template-columns:1fr 1fr
  }
  .topbar {
    gap:24px
  }
  .room-phase {
    display:none
  }
  .room-topbar .topbar-right {
    gap:8px
  }
  .editor-grid {
    grid-template-columns:1fr
  }
  .audio-layout {
    grid-template-columns:1fr 340px
  }
  .watch-layout {
    grid-template-columns:1fr
  }
  .watch-layout>.crew-panel {
    display:none
  }
  .record-layout {
    grid-template-columns:minmax(0,1fr) 250px
  }
  .vote-layout {
    grid-template-columns:1fr
  }
  .vote-help {
    position:static
  }
  .award-layout {
    grid-template-columns:1fr
  }
  .profile-layout {
    grid-template-columns:260px minmax(0,1fr)
  }
  .admin-grid {
    grid-template-columns:1fr
  }
  .room-topbar .connection-label {
    display:none
  }
}

@media(max-width:780px) {
  :root {
    --inset-x:20px;
    --s12:32px;
    --text-small:13px
  }
  .topbar {
    height:72px;
    gap:20px
  }
  .brand {
    font-size:23px;
    gap:7px
  }
  .brand-mark {
    width:30px;
    height:30px
  }
  .nav {
    gap:0
  }
  .nav a {
    padding:8px 10px;
    font-size:14px
  }
  .topbar-right {
    gap:10px
  }.account-button .icon {
    display:none
  }
  .language-button {
    font-size:12px;
    gap:4px
  }
  .topbar .avatar {
    width:34px;
    height:34px
  }
  .topbar .tag {
    display:none
  }
  .page {
    padding-top:24px
  }
  .page-header {
    align-items:start;
    flex-wrap:wrap;
    gap:16px
  }
  .page-header h1 {
    font-size:36px
  }
  .page-header p {
    font-size:15px
  }

  .code-inputs input {
    width:46px;
    height:54px
  }

  .snapshot-stats {
    grid-template-columns:1fr 1fr;
    gap:24px
  }
  .snapshot-stat {
    gap:12px
  }
  .snapshot-stat strong {
    font-size:26px
  }
  .snapshot-stat span {
    font-size:12px
  }

  .mini-scene-grid {
    grid-template-columns:1fr 1fr
  }
  .mini-scene-grid>:last-child {
    display:none
  }
  .page-footer {
    flex-wrap:wrap;
    gap:12px;
    padding-top:16px;
    font-size:12px
  }
  .page-footer>span:nth-child(2) {
    display:none
  }
  .scene-grid {
    grid-template-columns:repeat(auto-fill,minmax(232px,1fr));
    gap:16px
  }
  .search-field {
    padding:8px 16px;
    gap:12px
  }
  .search-field input {
    font-size:17px
  }
  .search-field kbd {
    display:none
  }
  .catalog-toolbar {
    gap:12px
  }
  .catalog-toolbar>.row {
    flex-wrap:wrap
  }
  .catalog-summary {
    align-items:start;
    flex-direction:column;
    gap:6px;
    margin-top:24px
  }
  .catalog-summary p {
    font-size:12px
  }
  .compact-select {
    max-width:180px;
    font-size:13px
  }
  .filter-grid {
    grid-template-columns:1fr
  }
  .scene-title {
    font-size:17px
  }
  .scene-meta {
    font-size:12px
  }
  .room-layout {
    grid-template-columns:1fr
  }
  .room-aside {
    position:static;
    grid-row:1
  }
  .room-aside .crew-panel {
    padding:16px
  }
  .room-aside .crew-list {
    display:flex;
    overflow-x:auto;
    gap:16px;
    margin-top:12px
  }
  .room-aside .crew-row {
    border:0;
    min-width:140px;
    padding:0
  }
  .room-aside .crew-row .avatar {
    width:30px;
    height:30px
  }
  .room-aside .crew-row .ready-check {
    display:none
  }.room-aside .crew-panel>.small {
    display:none
  }
  .room-aside .crew-row .name {
    font-size:13px
  }
  .room-aside .crew-row .status {
    font-size:11px
  }
  .room-heading h1 {
    font-size:28px
  }
  .room-heading {
    margin-top:12px
  }
  .room-topbar .brand {
    font-size:0;
    gap:0
  }
  .room-topbar .brand-mark {
    width:30px;
    height:30px
  }
  .room-topbar {
    gap:12px
  }
  .room-code-button {
    font-size:16px;
    padding:7px 10px
  }
  .room-topbar .topbar-right {
    margin-left:auto
  }
  .room-topbar .topbar-right>.btn-quiet {
    display:none
  }
  .room-topbar .language-button {
    display:none
  }
  .phase-strip {
    gap:8px;
    justify-content:space-between;
    font-size:11px
  }
  .phase-item {
    gap:4px
  }
  .phase-item .icon {
    width:14px;
    height:14px
  }
  .room-page {
    padding-bottom:130px
  }
  .round-footer {
    padding:12px 20px;
    gap:12px;
    flex-wrap:wrap
  }
  .round-footer>.row {
    margin-left:auto
  }
  .round-footer strong {
    font-size:14px
  }
  .round-footer p {
    font-size:12px
  }
  .round-footer .btn {
    min-height:42px;
    padding:10px 12px;
    font-size:13px
  }
  .selected-scene {
    grid-template-columns:1fr
  }
  .selected-scene .scene-art {
    height:180px
  }
  .selected-scene-info {
    padding:20px
  }
  .cast-row {
    grid-template-columns:30px minmax(80px,1fr) minmax(140px,.8fr);
    padding:14px 12px;
    gap:8px
  }
  .cast-row .cast-lines {
    display:none
  }
  .cast-row .name {
    font-size:14px
  }
  .cast-row .btn {
    font-size:12px
  }
  .role-list {
    max-height:440px
  }
  .task-grid {
    grid-template-columns:1fr
  }
  .room-settings {
    gap:24px
  }
  .mode-option {
    min-height:98px
  }
  .record-layout {
    height:auto;
    min-height:0;
    display:flex;
    flex-direction:column
  }
  .record-stage {
    display:flex;
    flex-direction:column
  }
  .record-heading {
    flex-wrap:wrap;
    gap:12px
  }
  .record-heading h1 {
    font-size:28px
  }
  
  
  .record-aside {
    max-height:none;
    display:grid;
    grid-template-columns:1fr 1fr
  }
  .record-aside .crew-list {
    grid-column:1/-1
  }
  
  
  
  .record-video-top {
    left:12px;
    right:12px;
    top:12px
  }
  .record-video-top .tag {
    font-size:11px
  }
  
  
  .waveform {
    height:100px
  }
  .waveform svg {
    height:50px
  }
  .record-page {
    padding-bottom:150px
  }
  .line-strip {
    margin-top:8px
  }
  .review-adjust {
    grid-template-columns:1fr
  }
  .watch-controls {
    gap:10px;
    padding:12px;
    flex-wrap:wrap
  }
  .watch-controls input[type=range] {
    max-width:80px
  }
  .watch-controls input[type=range].timeline {
    order:1;
    flex-basis:100%
  }
  .watch-clock {
    font-size:12px
  }
  .watch-caption {
    font-size:18px;
    bottom:130px
  }
  .vote-row {
    padding:16px 12px;
    gap:12px
  }
  .vote-row .avatar {
    height:38px;
    width:38px
  }
  .vote-row .name {
    font-size:15px
  }
  .vote-row small {
    font-size:12px
  }
  .vote-row>.btn-icon {
    display:none
  }
  .vote-counter {
    gap:6px
  }
  .vote-counter .btn {
    width:36px;
    min-height:36px;
    padding:6px
  }
  .vote-counter .mono {
    font-size:22px;
    min-width:24px
  }
  .vote-help h2 {
    font-size:26px
  }
  .ballot-points {
    margin:24px 0
  }
  .ballot-point {
    width:58px;
    height:58px
  }
  .award-stage {
    padding:32px 16px;
    min-height:360px
  }
  .award-stage h2 {
    font-size:34px
  }
  .award-emblem {
    width:72px;
    height:72px
  }
  .profile-layout {
    grid-template-columns:1fr;
    gap:24px
  }
  .profile-card {
    padding:24px
  }
  .profile-card .avatar.large {
    height:72px;
    width:72px
  }
  .profile-score {
    font-size:52px
  }
  .profile-metrics {
    gap:12px
  }
  .profile-metrics strong {
    font-size:24px
  }
  .profile-metrics small {
    font-size:12px
  }
  .award-grid {
    grid-template-columns:1fr 1fr;
    gap:12px
  }
  .award-small {
    padding:16px
  }
  .award-small h3 {
    font-size:15px
  }
  .award-small p {
    font-size:12px
  }.audio-layout {
    grid-template-columns:1fr
  }
  .audio-primary {
    padding:24px
  }
  .audio-primary .mic-meter {
    height:64px
  }
  .audio-metrics {
    gap:12px
  }
  .audio-metrics strong {
    font-size:15px
  }.studio-import {
    grid-template-columns:1fr
  }
  .draft-list {
    max-height:220px;
    overflow:auto
  }
  .admin-metrics {
    grid-template-columns:1fr 1fr;
    gap:12px
  }
  .admin-metric {
    padding:16px
  }
  .admin-metric strong {
    font-size:27px
  }
  .admin-grid .panel-pad {
    padding:20px
  }
  .storage-row {
    grid-template-columns:105px 1fr 76px;
    gap:12px;
    font-size:12px
  }
  .data-table th {
    padding:12px
  }
  .data-table td {
    padding:14px 12px
  }
  .tabs {
    gap:24px;
    margin-bottom:24px
  }
  .tabs a,.tabs button {
    font-size:14px
  }
  .dialog-head {
    padding:16px 20px
  }
  .dialog-head h2 {
    font-size:21px
  }
  .dialog-body {
    padding:20px
  }
  .dialog-footer {
    padding:16px 20px
  }
  .menu-grid {
    grid-template-columns:1fr
  }
  .menu-item {
    padding:16px;
    min-height:60px
  }
  .role-details {
    grid-template-columns:1fr
  }
  .login-layout {
    margin:32px auto
  }
  .login-layout h1 {
    font-size:38px
  }
  .panel-pad {
    padding:24px
  }
}.room-aside, .crew-panel, .watch-layout>*, .profile-layout>* {
  min-width:0
}

.record-layout {
  height:calc(100dvh - 430px)
}

.record-page:has(.review-adjust) .record-layout {
  height:calc(100dvh - 545px)
}

.selected-scene .scene-art {
  min-height:0;
  height:260px
}

.scene-art>svg, .scene-art>img {
  overflow:hidden
}

@media(max-width:1600px) {
  .record-layout {
    height:calc(100dvh - 396px);
    min-height:320px
  }
  .record-page:has(.review-adjust) .record-layout {
    height:calc(100dvh - 510px)
  }
  .selected-scene .scene-art {
    height:220px
  }
}

@media(max-width:780px) {
  .topbar {
    gap:12px
  }
  .topbar:not(.room-topbar) .brand>span {
    display:none
  }
  .topbar-right {
    gap:8px
  }
  .room-layout {
    grid-template-columns:minmax(0,1fr)
  }
  .room-aside,.crew-panel,.room-main {
    max-width:100%
  }
  .phase-strip {
    gap:12px;
    justify-content:flex-start;
    min-height:24px
  }
  .phase-item:not(.current) .phase-label {
    display:none
  }
  .phase-item .icon {
    width:18px;
    height:18px
  }
  .phase-item {
    font-size:13px
  }
  .room-heading {
    flex-wrap:wrap
  }
  .room-heading>.tag {
    display:none
  }
  .room-main .section-head {
    gap:12px;
    flex-wrap:wrap
  }
  .room-main .section-head>.btn {
    font-size:13px;
    min-height:40px;
    padding:8px 10px
  }
  .watch-layout>.stack>.row>.row {
    flex-wrap:wrap
  }
  .record-layout,.record-page:has(.review-adjust) .record-layout {
    height:auto;
    min-height:0
  }
  .selected-scene .scene-art {
    height:180px
  }
  .room-aside>.btn {
    display:none
  }
  .page-footer {
    padding-bottom:24px
  }
}

@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior:auto
  }
  *,*:before,*:after {
    animation:none;
    transition:none
  }

}

.award-layout>* {
  min-width:0
}

.invite-details {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px
}

.invite-qr {
  width:160px;
  height:160px;
  border-radius:10px;
  background:white;
  padding:8px
}

@media(max-width:780px) {
  .award-layout {
    grid-template-columns:minmax(0,1fr)
  }
  .results-table th,.results-table td {
    padding:14px 8px
  }
  .results-table td>.row {
    gap:8px
  }
  .room-topbar .topbar-right>.btn-quiet {
    display:inline-flex
  }
  .invite-qr {
    width:120px;
    height:120px
  }
}

.transcript-row {
  grid-template-columns:28px 92px minmax(110px,.4fr) minmax(0,1fr) 44px 44px
}

#draft-lines {
  max-height:620px;
  overflow:auto
}

input[type=color] {
  padding:4px;
  min-height:44px;
  width:100%
}

@media(max-width:780px) {
  .transcript-row .btn-icon {
    width:36px;
    padding:6px
  }
}

.video-frame {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: 16 / 9;
  overflow: clip;
  background: var(--inset);
}

.video-frame > video, .video-frame > .scene-art {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  object-fit: contain;
}

.watch-caption {
  bottom: 24px;
}

.record-layout, .record-page:has(.review-adjust) .record-layout {
  height: auto;
  min-height: 0;
  align-items: start
}

.record-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.record-video.video-frame {
  width: min(100%, calc(max(240px, 100dvh - 350px) * 16 / 9))
}

.record-aside {
  max-height: calc(100dvh - 260px);
  gap: 20px;
}

.record-aside > * {
  flex-shrink: 0;
}

.record-aside .review-adjust {
  grid-template-columns: 1fr;
  margin-top: 0;
}

.record-aside .status {
  align-items: start;
}

@media(min-width:2200px) {
  .record-layout {
    grid-template-columns: minmax(0, 1fr) 420px;
  }
}

@media(max-width:1600px) {
  .record-layout,   .record-page:has(.review-adjust) .record-layout {
    grid-template-columns: minmax(0, 1fr) 310px;
  }
}

@media(max-width:780px) {
  .record-layout,   .record-page:has(.review-adjust) .record-layout {
    display: flex;
    flex-direction: column;
  }
  .record-stage, .record-video.video-frame {
  width: 100%
}
  .record-aside {
    display: flex;
    max-height: none;
    width: 100%;
  }
  
  
  
  
}

#app { --page-width:1600px; --page-edge:clamp(20px,4vw,64px); display:flex; flex-direction:column; min-height:100dvh; }
#app[data-view=library] { --page-width:1960px; }
#app[data-view=studio] { --page-width:1840px; }
#app[data-view=record] { --page-width:2040px; }
#app[data-view=account], #app[data-view=audio] { --page-width:1180px; }
#app[data-view=admin] { --page-width:1480px; }
#app[data-view=vote] { --page-width:1160px; }
#app[data-view=awards] { --page-width:1520px; }
#app[data-view=login] { --page-width:720px; }
.page, .page-footer, .round-footer-inner, .topbar-inner { width:calc(100% - var(--page-edge)*2); max-width:var(--page-width); margin-inline:auto; }
.page { flex:1; min-height:0; padding:40px 0; }
.topbar { display:block; height:80px; padding:0; background:#16171a; }
.topbar-inner { max-width:1760px; height:100%; display:flex; align-items:center; gap:40px; }
.topbar-right { margin-left:auto; }

.brand-mark { width:36px; height:36px; }
.page-header { gap:28px; }
.page-header h1 { font-size:clamp(32px,2.6vw,44px); }
.page-header p { font-size:16px; }
.eyebrow { display:block; margin-bottom:10px; }
.page-footer { padding:22px 0 26px; min-height:0; font-size:12px; gap:24px; border-top:1px solid var(--border); }
.page-footer > :last-child { margin-left:auto; }
.round-footer { padding:0; }
.round-footer-inner { padding:16px 0; display:flex; align-items:center; justify-content:space-between; gap:24px; }
.round-footer strong { font-size:16px; }
.round-footer p { font-size:13px; }
.round-footer .btn { font-size:15px; }.panel, .crew-panel, .role-list, .selected-scene { border-color:#3b3c428f; }
.panel-pad { padding:26px; }
.section { margin-top:28px; }
.section-head { margin-bottom:18px; }
.section-head h2 { font-size:23px; }
.section-head .small { font-size:13px; }
.btn { min-height:44px; font-size:15px; }
.field { font-size:14px; }
.compact-select { font-size:13px; }

.home-layout { display:grid; grid-template-columns:minmax(0,1fr) 330px; gap:28px; align-items:start; }
.home-main, .home-social { min-width:0; }
.play-entry { grid-column:1 / -1; display:grid; grid-template-columns:minmax(0,1fr) 430px; gap:0; border:1px solid var(--border); border-radius:24px; background:var(--surface); overflow:hidden; }
.room-launch { min-height:190px; padding:30px; position:relative; isolation:isolate; overflow:hidden; border:0; border-radius:0; background:linear-gradient(110deg,#ef534f0b,transparent 70%); color:var(--text); display:flex; flex-direction:column; justify-content:center; align-items:start; text-align:left; transition:background 140ms,transform 140ms; }
.room-launch:hover { background:#ef534f12; }
.room-launch:active { transform:scale(.985); }
.launch-icon { width:46px; height:46px; display:grid; place-items:center; border:1px solid #ef534f42; border-radius:12px; color:var(--accent); }
.launch-icon .icon { width:26px; height:26px; }
.launch-copy { display:flex; flex-direction:column; gap:8px; max-width:calc(100% - 45px); z-index:2; }
.launch-copy strong { font-size:36px; line-height:1.2; letter-spacing:-.035em; }
.launch-copy > span { font-size:14px; color:var(--muted); }
.launch-arrow { position:absolute; right:26px; bottom:26px; width:38px; height:38px; border-radius:50%; background:var(--accent); color:var(--accent-ink); display:grid; place-items:center; transition:transform 140ms; }
.room-launch:hover .launch-arrow { transform:translateX(4px); }
.launch-collage { position:absolute; top:28px; right:20px; width:290px; height:145px; pointer-events:none; }
.launch-collage > span { position:absolute; width:180px; border:3px solid #38282b; border-radius:10px; overflow:hidden; box-shadow:0 6px 20px #0005; transition:transform 240ms var(--ease); }
.launch-collage > :nth-child(1) { transform:translate(-6px,18px) rotate(-13deg); }
.launch-collage > :nth-child(2) { transform:translate(45px,0) rotate(1deg); }
.launch-collage > :nth-child(3) { transform:translate(108px,32px) rotate(14deg); }
.room-launch:is(:hover,:focus-visible) .launch-collage > :nth-child(1) { transform:translate(-23px,14px) rotate(-16deg); }
.room-launch:is(:hover,:focus-visible) .launch-collage > :nth-child(2) { transform:translate(42px,-5px); }
.room-launch:is(:hover,:focus-visible) .launch-collage > :nth-child(3) { transform:translate(117px,27px) rotate(17deg); }
.join-card { background:var(--surface); border:1px solid var(--border); border-radius:20px; padding:24px; display:flex; flex-direction:column; justify-content:space-between; gap:20px; }
.join-card h2 { font-size:18px; margin-bottom:8px; }
.join-card p { font-size:13px; max-width:28ch; }
.join-card form .btn { margin:8px 0 -8px; padding-left:0; }
.join-card .code-inputs { gap:8px; }
.join-card .code-inputs input { width:calc((100% - 32px) / 5); height:48px; min-height:48px; border-radius:9px; font-size:22px; }
.scene-picks { margin-top:0; }
.mini-scene-grid { gap:18px; }
.scene-picks .section-head h2 { font-size:24px; }
.scene-picks .section-head .btn { font-size:13px; }
.scene-picks-footer { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-top:20px; font-size:13px; }
.scene-picks-footer > span { font-size:12px; color:var(--dim); }
.snapshot-stats { display:flex; flex-wrap:wrap; justify-content:space-between; gap:24px; margin-top:24px; padding:22px 0 0; border-top:1px solid var(--border); border-bottom:0; }
.snapshot-stat { display:flex; align-items:center; gap:12px; }
.snapshot-stat > .icon { width:20px; color:var(--dim); }
.snapshot-stat > div { display:flex; flex-direction:column; gap:3px; }
.snapshot-stat strong { font-size:24px; letter-spacing:-.035em; line-height:1.15; }
.snapshot-stat span { font-size:12px; color:var(--dim); }
.home-social { padding-top:0; display:flex; flex-direction:column; gap:20px; }
.leaderboard-panel { padding:20px; border:1px solid var(--border); border-radius:18px; background:var(--surface); }
.leaderboard-panel .section-head { gap:10px; }
.leaderboard-panel h2 { font-size:19px; }
.leaderboard-panel .choice-trigger { max-width:126px; padding:8px 10px; }
.ranking-row { grid-template-columns:16px 34px minmax(0,1fr) auto; gap:9px; padding:12px 0; }
.ranking-row .avatar { width:32px; height:32px; }
.ranking-row .name { font-size:14px; }
.ranking-row small { font-size:11px; line-height:1.6; }
.ranking-row > strong { font-size:16px; }

.scene-card { border:1px solid var(--border); border-radius:14px; box-shadow:none; transition:transform 140ms,border-color 140ms,box-shadow 140ms; }
.scene-card:is(:hover,:focus-within) { transform:translateY(-4px); border-color:var(--border-strong); box-shadow:0 12px 28px #0003; }
.scene-card .scene-art :is(svg,img) { transition:transform 140ms; }
.scene-card:is(:hover,:focus-within) .scene-art :is(svg,img) { transform:scale(1.025); }
.scene-card .scene-title { font-size:18px; }
.scene-card .scene-work { font-size:12px; }
.scene-card .scene-meta { font-size:12px; margin-top:18px; }
.scene-body { padding:14px; }
.scene-meta .icon { width:14px; height:14px; }
.scene-favorite.is-saved .icon { animation:save-mark 180ms ease-out; }
.search-field { max-width:1020px; padding:14px 20px; border-radius:14px; }
.search-field input { font-size:20px; }
.catalog-toolbar { margin:16px 0 0; gap:16px; font-size:14px; }
.catalog-summary h2 { font-size:22px; }
.catalog-summary p { font-size:12px; }
.pagination { margin-top:26px; }

.room-page { padding-bottom:120px; }
.room-layout { grid-template-columns:minmax(0,1fr) 310px; gap:24px; }
.phase-strip { max-width:none; gap:0; margin:0 0 26px; padding:0; list-style:none; background:var(--surface); border:1px solid var(--border); border-radius:12px; overflow:hidden; position:relative; }
.phase-strip a, .phase-strip span { font-size:13px; white-space:nowrap; }
.phase-strip .icon { width:17px; height:17px; }

.selected-scene { grid-template-columns:260px minmax(0,1fr); border-radius:16px; margin-bottom:28px; }
.selected-scene > .scene-art { height:auto; min-height:0; max-height:none; aspect-ratio:16/9; align-self:center; }
.selected-scene-info { padding:20px 24px; gap:8px; }
.selected-scene-info h2 { font-size:27px; }
.selected-scene-info .tag { font-size:11px; }
.role-list { max-height:360px; }
.cast-row { grid-template-columns:34px minmax(115px,1fr) 76px 65px minmax(160px,240px); gap:14px; padding:12px 16px; }
.cast-row .name { font-size:16px; }
.cast-row .mono { font-size:13px; }
.task-grid { margin-top:16px; gap:14px; }
.task-card { padding:18px; border-radius:14px; }
.task-card h3 { font-size:16px; }
.task-card p { font-size:13px; max-width:43ch; }
.room-settings { grid-template-columns:minmax(0,1fr) 240px; gap:24px; }
.mode-options { gap:10px; }
.mode-option { min-height:96px; padding:14px 16px; }
.mode-option strong { font-size:14px; }
.mode-option p { font-size:12px; }
.crew-panel { padding:20px; border-radius:18px; }
.crew-panel h2 { font-size:19px; }
.crew-row { padding:13px 0; gap:10px; }
.crew-row .avatar { width:34px; height:34px; }
.crew-row .name { font-size:14px; }
.crew-row .small { font-size:12px; }
.crew-row .status { font-size:11px; }
.crew-row > .btn-icon { width:28px; min-height:32px; }
.record-page { padding-top:24px; }
.record-page .page-header h1 { font-size:30px; }
.record-layout, .record-page:has(.review-adjust) .record-layout { grid-template-columns:minmax(0,1fr) 340px; }
.record-aside { padding:20px; border-radius:18px; }
.record-aside h2 { font-size:17px; }
.record-aside .status, .record-aside .field { font-size:13px; }
.record-aside .small { font-size:12px; }
.watch-layout { grid-template-columns:minmax(0,1fr) 300px; gap:24px; }
.watch-controls { padding:12px 16px; }

.vote-layout { grid-template-columns:minmax(0,1fr) 285px; gap:32px; }
.vote-row { padding:18px 22px; gap:16px; }
.vote-row .avatar { width:42px; height:42px; }
.vote-row .name { font-size:17px; }
.vote-row small { font-size:12px; }
.vote-counter > span { font-size:26px; }
.vote-help { padding:24px; background:var(--surface); border:1px solid var(--border); border-radius:20px; }
.vote-help h2 { font-size:26px; }
.vote-help p { font-size:14px; }
.ballot-points { gap:12px; margin-block:22px; }
.ballot-point { width:58px; height:58px; }
.award-stage { padding:32px; border-radius:20px; }
.award-stage > * { animation:award-reveal 280ms ease-out both; }

.award-emblem { width:88px; height:88px; }

.profile-layout { grid-template-columns:290px minmax(0,1fr); gap:28px; }
.profile-card { padding:24px; border-radius:20px; }
.identity-header { display:flex; align-items:center; gap:16px; }
.identity-header .avatar { width:64px; height:64px; }
.identity-header h2 { font-size:24px; }
.identity-header p { font-size:13px; margin:4px 0 8px; }
.identity-header .tag { font-size:11px; }
.profile-score { font-size:54px; margin:28px 0 14px; }
.profile-card p { font-size:13px; }
.profile-card > .btn { margin-top:16px; }
.profile-metrics { background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:20px 24px; gap:24px; }
.profile-metrics strong { font-size:28px; }
.profile-metrics small { font-size:12px; }
.profile-metrics .role-value { font-size:19px; font-weight:700; line-height:1.5; }
.award-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.award-small { display:flex; align-items:start; gap:16px; padding:20px; }
.award-small > .icon { margin:0; flex:none; }
.award-small h3 { font-size:16px; }
.award-small p { font-size:12px; margin-top:6px; }
.audio-layout { grid-template-columns:minmax(0,1fr) 360px; gap:24px; }
.audio-primary { padding:26px; }
.audio-primary .mic-meter { max-width:520px; height:72px; margin:24px auto; }
.audio-metrics { gap:20px; }
.audio-metrics strong { font-size:16px; }
.audio-metrics small { font-size:12px; }
.audio-primary p, .audio-layout .panel-pad > p { font-size:14px; }
.audio-primary .row .btn { font-size:13px; }
.audio-settings { padding:24px; gap:16px; }
.audio-settings h2 { font-size:22px; }
.audio-settings .switch-row { font-size:14px; padding:12px 0; }
.audio-settings > .btn { align-self:start; }
.admin-metrics { gap:16px; }
.admin-metrics > div { padding:20px 24px; border-radius:14px; }
.admin-metrics strong { font-size:32px; }
.admin-metrics small { font-size:13px; }
.admin-grid { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:24px; }
.storage-row { grid-template-columns:140px minmax(0,1fr) 75px; gap:14px; font-size:13px; }
.storage-row .mono { font-size:12px; }
.capability-row { padding:15px 0; font-size:14px; }
.tabs { margin-bottom:24px; }
th { font-size:12px; padding:14px 20px; }
td { font-size:14px; padding:16px 20px; }
td .btn { font-size:13px; }
.editor-grid { grid-template-columns:minmax(0,1fr) 290px; gap:24px; }
.editor-form { gap:12px; }
.studio-import { max-width:1120px; gap:24px; }
.draft-item { padding:16px; border-radius:14px; }
.upload-area { min-height:310px; }

dialog { border-radius:20px; }
dialog[open] { display:flex; flex-direction:column; overflow:hidden; animation:dialog-arrive 240ms var(--ease) both; }
dialog[open]::backdrop { animation:backdrop-arrive 180ms ease-out; }
dialog.is-closing { animation:dialog-leave 180ms ease-in both; pointer-events:none; }
dialog.is-closing::backdrop { animation:backdrop-leave 180ms ease-in both; }
@keyframes dialog-arrive { from { opacity:0; transform:translateY(12px) scale(.985); } to { opacity:1; transform:none; } }
@keyframes dialog-leave { to { opacity:0; transform:translateY(8px) scale(.985); } }
@keyframes backdrop-arrive { from { opacity:0; } }
@keyframes backdrop-leave { to { opacity:0; } }
.dialog-head { padding:20px 26px; flex-shrink:0; position:relative; }
.dialog-head h2 { font-size:24px; }
.dialog-body { padding:26px; min-height:0; overflow:auto; overscroll-behavior:contain; }
.dialog-footer { padding:18px 26px; flex-shrink:0; background:var(--surface); }
.toast { animation:workspace-enter 220ms var(--ease); }
@keyframes save-mark { from { transform:scale(.45); } to { transform:scale(1); } }
@keyframes award-reveal { from { opacity:0; transform:translateY(9px); } to { opacity:1; transform:none; } }
input[type=range] { appearance:none; height:24px; }
input[type=range]::-webkit-slider-runnable-track { height:4px; border-radius:4px; background:linear-gradient(to right,var(--accent) var(--range-progress,0%),var(--border) var(--range-progress,0%)); }
input[type=range]::-webkit-slider-thumb { appearance:none; width:16px; height:16px; border-radius:50%; background:var(--accent); border:3px solid var(--surface); box-shadow:0 0 0 1px var(--accent); margin-top:-6px; transition:transform 140ms; }
input[type=range]:hover::-webkit-slider-thumb { transform:scale(1.15); }
input[type=range]::-moz-range-track { height:4px; border-radius:4px; background:var(--border); }
input[type=range]::-moz-range-progress { height:4px; background:var(--accent); }
input[type=range]::-moz-range-thumb { width:12px; height:12px; border:2px solid var(--surface); border-radius:50%; background:var(--accent); }

@media(max-width:1450px) {
  .home-layout { grid-template-columns:minmax(0,1fr) 300px; gap:24px; }

  .join-card { padding:20px; }
  .launch-collage { right:-74px; top:10px; }

  .launch-copy > span { max-width:23ch; }.leaderboard-panel { padding:18px; }
  .ranking-row { grid-template-columns:14px 30px minmax(0,1fr) auto; gap:6px; }
  .ranking-row .name { font-size:13px; }
  .ranking-row small { font-size:10px; }
  .room-layout { grid-template-columns:minmax(0,1fr) 290px; }
  .selected-scene { grid-template-columns:220px minmax(0,1fr); }
  .room-settings { grid-template-columns:1fr; }
  .room-settings > .stack-tight { display:grid; grid-template-columns:1fr 1fr; }
  .record-layout, .record-page:has(.review-adjust) .record-layout { grid-template-columns:minmax(0,1fr) 310px; }
  .scene-picks-footer > span { max-width:28ch; text-align:right; }
}
@media(max-width:1100px) {
  .home-layout { grid-template-columns:1fr; }
  .home-social { display:grid; grid-template-columns:1.1fr 1fr; align-items:start; }

  .launch-collage { right:-14px; }
  .room-layout { grid-template-columns:minmax(0,1fr) 250px; gap:18px; }
  .selected-scene { grid-template-columns:180px minmax(0,1fr); }
  .cast-row { grid-template-columns:28px minmax(90px,1fr) 145px; }
  .cast-row > .mono { display:none; }
  .phase-strip { gap:14px; }
  .profile-layout { grid-template-columns:260px minmax(0,1fr); }
  .identity-header { flex-direction:column; align-items:start; }
  .award-grid { grid-template-columns:1fr; }
  .audio-layout { grid-template-columns:minmax(0,1fr) 320px; }
  .audio-metrics { grid-template-columns:1fr; }
  .audio-metrics > div { display:flex; align-items:center; justify-content:space-between; gap:12px; }
  .award-stage { min-height:390px; }
  .watch-layout, .editor-grid, .admin-grid { grid-template-columns:1fr; }
}
@media(max-width:780px) {
  .topbar { height:68px; }
  .topbar-inner { gap:16px; }
  .page { padding-top:26px; }
  .page-header h1 { font-size:32px; }
  .page-footer { flex-wrap:wrap; }
  .page-footer > :last-child { margin-left:0; }
  .home-layout, .home-social { grid-template-columns:1fr; gap:18px; }
  .room-launch { min-height:220px; padding:24px; }
  .launch-collage { right:-8px; }
  .launch-copy strong { font-size:25px; }
  .join-card { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:16px; padding:20px; }
  .join-card h2 { font-size:16px; }
  .join-card p { font-size:12px; }
  .join-card .code-inputs { gap:6px; }
  .join-card .code-inputs input { width:38px; height:42px; min-height:42px; }
  .join-card form .btn { font-size:12px; }
  .scene-picks .section-head { flex-wrap:wrap; }
  .scene-picks .section-head h2 { font-size:23px; }
  .scene-picks .section-head .btn { padding-left:0; }
  .mini-scene-grid { display:grid; grid-template-columns:none; grid-auto-flow:column; grid-auto-columns:86%; overflow-x:auto; scroll-snap-type:x mandatory; padding:4px 2px 14px; margin-inline:-2px; }
  .mini-scene-grid > .scene-card { display:block; scroll-snap-align:start; }
  .scene-picks-footer { align-items:start; }
  .snapshot-stats { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
  .snapshot-stat strong { font-size:23px; }
  .snapshot-stat span { font-size:11px; }.leaderboard-panel { padding:20px; }
  .ranking-row .name { font-size:14px; }
  .ranking-row small { font-size:11px; }
  .search-field input { font-size:16px; }
  .search-field { padding:9px 14px; }
  .catalog-toolbar { flex-wrap:wrap; font-size:13px; }
  .scene-grid { grid-template-columns:1fr; }
  .room-layout { grid-template-columns:1fr; }
  .phase-strip { gap:12px; margin-bottom:22px; }
  .phase-strip a, .phase-strip span { font-size:12px; }
  .selected-scene { grid-template-columns:1fr; }
  .selected-scene-info { padding:20px; }
  .room-heading h1 { font-size:29px; }
  .cast-row { grid-template-columns:28px minmax(76px,1fr) minmax(120px,.9fr); gap:8px; padding:12px; }
  .cast-row .name { font-size:13px; }
  .task-grid, .room-settings > .stack-tight { grid-template-columns:1fr; }
  .room-page { padding-bottom:158px; }
  .round-footer-inner { flex-wrap:wrap; gap:12px; padding:12px 0; }
  .round-footer .btn { font-size:12px; }
  .record-layout, .record-page:has(.review-adjust) .record-layout { display:flex; flex-direction:column; }
  .record-aside { width:100%; max-height:none; }
  .record-page .page-header h1 { font-size:27px; }
  .vote-layout { grid-template-columns:1fr; gap:24px; }
  .vote-row { padding:14px 12px; gap:10px; }
  .vote-row .avatar { width:34px; height:34px; }
  .vote-row .name { font-size:14px; }
  .vote-counter > span { font-size:22px; }
  .vote-help { padding:22px; }
  .award-stage { padding:24px; }
  .award-stage h2 { font-size:36px; }
  .profile-layout, .audio-layout { grid-template-columns:1fr; }
  .identity-header { flex-direction:row; align-items:center; }
  .profile-metrics { padding:18px; gap:16px; }
  .profile-metrics .role-value { font-size:15px; }
  .award-grid { grid-template-columns:1fr; }
  .audio-primary, .audio-settings { padding:22px; }
  .audio-metrics strong { font-size:14px; }
  .admin-metrics { grid-template-columns:1fr 1fr; }
  .storage-row { grid-template-columns:110px minmax(0,1fr) 66px; font-size:12px; }
  .storage-row .mono { font-size:11px; }.studio-import { grid-template-columns:1fr; }
  .dialog-body { padding:20px; }
  .dialog-footer { flex-wrap:wrap; }
}
@media(max-width:410px) {
  .join-card { grid-template-columns:1fr; }
  .join-card form { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
  .join-card .form-error { order:2; width:100%; }
  .join-card form .btn { margin:0; font-size:12px; padding-right:0; }
}
@media(prefers-reduced-motion:reduce) {
  dialog[open], dialog::backdrop, dialog.is-closing, .toast, .award-stage > *, .scene-favorite.is-saved .icon { animation:none; }
  .scene-card:is(:hover,:focus-within), .scene-card:is(:hover,:focus-within) .scene-art :is(svg,img), .room-launch:active, .room-launch:hover .launch-arrow { transform:none; }
  .launch-collage > span { transition:none; }
}

dialog[data-kind=previewVideo] { width:min(1080px,calc(100vw - 48px)); }
.scene-preview-grid { display:grid; grid-template-columns:minmax(0,1fr) 260px; gap:28px; }
.scene-preview-main, .scene-preview-cast { min-width:0; }
.scene-preview-main h2 { font-size:26px; margin-top:6px; }
.scene-preview-main > .row { align-items:start; gap:24px; }
.scene-preview-main .mono { font-size:14px; }
.preview-facts { display:flex; flex-wrap:wrap; gap:16px; color:var(--muted); font-size:13px; margin:18px 0; }
.scene-preview-main > p { font-size:13px; }
.scene-preview-main > .text-link { margin-top:20px; font-size:14px; }
.scene-preview-cast { position:relative; min-height:0; padding-left:24px; border-left:1px solid var(--border); }
.scene-preview-cast h3 { font-size:18px; }
.scene-preview-cast .role-details { position:absolute; inset:34px 0 0 24px; display:flex; flex-direction:column; min-height:0; height:auto; gap:8px; max-height:none; overflow:auto; margin:0; padding-right:4px; }
.scene-preview-cast .role-detail { flex:none; padding:12px; font-size:14px; gap:12px; }
.scene-preview-cast .role-detail small, .scene-preview-cast > p { font-size:12px; }
.audio-settings input[type=range] { min-height:24px; }
.audio-settings > .field { gap:6px; }
.mode-options { grid-template-columns:repeat(2,minmax(0,1fr)); }
.award-small.locked { flex-direction:column; }
#dialog[data-kind=allTitles] .award-small { flex-direction:column; }
@media(min-width:781px) {
  .selected-scene-info { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; }
  .selected-scene-info > p, .selected-scene-info > h2 { grid-column:1; }
  .selected-scene-info > .row { grid-column:1; margin-top:6px; }
  .selected-scene-info > .btn { grid-column:2; grid-row:1 / 4; align-self:center; }
  .selected-scene-info > .btn .icon { width:17px; }
  .selected-scene > .scene-art { width:100%; height:auto; }
}
@media(max-width:1100px) and (min-width:781px) {
  .selected-scene { grid-template-columns:200px minmax(0,1fr); }
  .selected-scene-info { display:flex; padding:16px; }
  .selected-scene-info h2 { font-size:22px; }
  .selected-scene-info > .btn { align-self:start; }
}
@media(max-width:780px) {
  .scene-preview-grid { grid-template-columns:1fr; gap:24px; }
  .scene-preview-cast { border-left:0; padding-left:0; border-top:1px solid var(--border); padding-top:20px; }
  .scene-preview-cast .role-details { position:static; inset:auto; height:auto; max-height:none; overflow:visible; margin-top:12px; }
  .scene-preview-main h2 { font-size:21px; }
  .scene-preview-main > .row { gap:12px; }
  .scene-preview-main .mono { font-size:12px; }
}

@media(max-width:360px) {
  .topbar-inner { gap:8px; }
  .topbar .brand-mark { width:28px; height:28px; }
  .topbar .nav { gap:0; }
  .topbar .nav a { padding-inline:8px; font-size:12px; }
  .topbar-right { gap:4px; }
  .language-button { padding-inline:6px; min-width:36px; }
  .language-button .icon { display:none; }
}

.brand { gap:10px; font-size:24px; letter-spacing:-1px; }
.brand .brand-mark { width:30px; height:30px; object-fit:contain; }
.brand em { color:var(--accent); }
.brand:hover .brand-mark { transform:translateY(-2px); }
.brand .brand-mark { transition:transform 140ms ease-out; }
.role-claim { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:10px; min-width:0; }
.role-owner { display:flex; align-items:center; gap:9px; min-width:0; }
.role-owner > span:last-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; }
.role-owner .avatar { flex:none; }
.role-claim .btn { min-height:38px; font-size:13px; padding:8px 12px; flex:none; }
.role-claim .btn-quiet { color:var(--dim); font-size:12px; padding-inline:6px; }
.role-list:not(.scrollable) { max-height:none; }
.role-list.scrollable { max-height:500px; }
.spectator-label { display:flex; align-items:center; gap:8px; font-size:14px; color:var(--dim); }
.spectating .avatar { opacity:.7; }
.archive-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.account-recordings { grid-template-columns:repeat(2,minmax(0,1fr)); }
.archive-card { min-width:0; border:1px solid var(--border); border-radius:16px; background:var(--surface); overflow:hidden; transition:transform 140ms ease-out,border-color 140ms ease-out; }
.archive-card:hover, .archive-card:focus-within { transform:translateY(-3px); border-color:var(--border-strong); }
.archive-open { display:block; height:100%; }
.archive-open .scene-art { aspect-ratio:16/9; }
.archive-play { position:absolute; inset:0; display:grid; place-items:center; background:#10111320; }
.archive-play .icon { width:44px; height:44px; padding:12px; border-radius:50%; background:#101113b3; transition:transform 140ms ease-out,background 140ms ease-out; }
.archive-card:hover .archive-play .icon { transform:scale(1.1); background:var(--accent); color:var(--accent-ink); }
.archive-card-body { padding:18px; }
.archive-card time { font-size:12px; color:var(--dim); }
.archive-card h3 { margin-top:8px; font-size:17px; min-height:2.6em; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.archive-card p { margin-top:4px; font-size:12px; }
.archive-participants { display:flex; align-items:center; gap:12px; padding-top:16px; margin-top:16px; border-top:1px solid var(--border); }
.archive-participants > span:last-child { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; color:var(--muted); }
.avatar-stack { display:flex; padding-left:5px; flex:none; }
.avatar-stack .avatar { width:28px; height:28px; margin-left:-5px; border:2px solid var(--surface); }
.archive-toolbar { display:flex; align-items:center; gap:24px; margin-bottom:24px; }
.archive-toolbar .search-field { flex:1; }
.archive-toolbar > .field { width:180px; }
.archive-toolbar > .field > span { display:none; }
.saved-cast-person { display:flex; gap:12px; align-items:center; padding:16px 0; border-bottom:1px solid var(--border); }
.saved-cast-person strong { font-size:14px; }
.saved-cast-person p { font-size:12px; margin-top:5px; }
.saved-round-cast > .btn { margin-top:20px; }
.saved-round-frame video[hidden] { display:none; }
.saved-round-frame:has(video:not([hidden])) > .scene-art { visibility:hidden; }
.award-layout { grid-template-columns:minmax(0,1fr) minmax(360px,.8fr); gap:28px; }
.award-stage { min-height:590px; }
.award-stage > :not(.confetti) { position:relative; z-index:1; animation:award-reveal 280ms ease-out both; }
.award-stage > .confetti { z-index:2; }
.award-portrait { position:relative; margin:28px 0 20px; }
.award-portrait .avatar { width:156px; height:156px; margin:0; border:4px solid var(--accent); box-shadow:0 0 0 10px #ef534f12; }
.award-medal { position:absolute; bottom:-6px; right:-6px; width:48px; height:48px; background:var(--accent); color:var(--accent-ink); border:5px solid var(--surface); border-radius:50%; display:grid; place-items:center; }
.award-medal .icon { width:24px; height:24px; }
.award-stage .award-winner { font-size:23px; font-weight:700; color:var(--text); }
.award-stage h2 { font-size:clamp(28px,2.5vw,44px); }
.podium .avatar { width:90px; height:90px; margin:16px 0 8px; }
.podium .first .avatar { width:116px; height:116px; border:3px solid var(--accent); }
.podium-person > span:not(.avatar) { font-size:15px; }
.award-stage .confetti { animation-name:award-confetti; animation-timing-function:linear; animation-fill-mode:both; }
@keyframes award-confetti { from { transform:translate(0,-20px) rotate(0); opacity:0; } 8% { opacity:1; } 82% { opacity:1; } to { transform:translate(calc(var(--drift)*80px),680px) rotate(640deg); opacity:0; } }
@media(max-width:1100px) {
  .archive-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .account-recordings { grid-template-columns:1fr; }
  .award-layout { grid-template-columns:1fr; }
}
@media(max-width:780px) {
  .brand .brand-mark { width:28px; height:28px; }
  .role-claim { flex-wrap:wrap; gap:6px; }
  .role-owner > span:last-child { font-size:12px; }
  .role-owner .avatar { width:24px; height:24px; }
  .role-claim .btn { min-height:40px; font-size:12px; }
  .role-list.scrollable { max-height:70dvh; }
  .archive-grid, .account-recordings { grid-template-columns:1fr; }
  .archive-toolbar { flex-wrap:wrap; gap:12px; }
  .archive-toolbar .search-field { flex-basis:100%; }
  .archive-toolbar > .field { margin-left:auto; }
  .award-stage { min-height:500px; padding:24px 18px; }
  .award-portrait .avatar { width:132px; height:132px; }
  .podium { gap:10px; }
  .podium .avatar { width:62px; height:62px; }
  .podium .first .avatar { width:76px; height:76px; }
  .podium-person > span:not(.avatar) { font-size:12px; }
}
@media(prefers-reduced-motion:reduce) {
  .award-stage > :not(.confetti) { animation:none; }
  .brand:hover .brand-mark, .archive-card:hover, .archive-card:focus-within, .archive-card:hover .archive-play .icon { transform:none; }
}

.play-entry .join-card { border:0; border-left:1px solid var(--border); border-radius:0; padding:28px 32px; background:transparent; }
.play-entry .join-card .code-inputs { margin-top:0; }
.play-entry .join-card .code-inputs input { height:46px; min-height:46px; }
.play-entry .room-launch:focus-visible { outline-offset:-5px; border-radius:20px; }
.play-entry .launch-copy { z-index:2; margin-top:12px; }
.play-entry .launch-copy strong { font-size:32px; }
.play-entry .launch-icon { width:36px; height:36px; border:0; }
.play-entry .launch-icon .icon { width:29px; height:29px; }
.play-entry .launch-collage { top:14px; right:30px; }
.play-entry #join-form { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:8px; margin-top:18px; }
.play-entry .code-inputs { grid-column:1; grid-row:1; }
.play-entry .form-error { grid-column:1 / -1; grid-row:2; margin:0; }
.play-entry #join-form > .btn { grid-column:2; grid-row:1; margin:0; padding:12px; }
.play-entry .join-card { justify-content:center; }
.pagination > .row { flex-wrap:wrap; }
.home-room-status { grid-column:1 / -1; display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:-12px; padding:0 4px 20px; border-bottom:1px solid var(--border); font-size:13px; color:var(--dim); }
.home-room-status > span:first-child { display:flex; align-items:center; gap:10px; color:var(--muted); }
.home-room-status .icon { width:17px; height:17px; }
.home-recordings .section-head { margin-bottom:12px; }
.home-recordings h2 { font-size:19px; }
.icon-link { width:36px; height:36px; display:grid; place-items:center; border-radius:8px; font-size:0; color:var(--muted); }
.icon-link .icon { width:18px; height:18px; }
.icon-link:hover { background:var(--raised); color:var(--text); }
.compact-recordings { display:flex; flex-direction:column; gap:10px; }
.compact-recordings .archive-open { display:grid; grid-template-columns:102px minmax(0,1fr); align-items:center; padding:10px; gap:12px; }
.compact-recordings .scene-art { width:102px; border-radius:8px; }
.compact-recordings .archive-card-body { padding:0; min-height:0; gap:4px; }
.compact-recordings .archive-card h3 { font-size:14px; -webkit-line-clamp:2; }
.compact-recordings .archive-card time { font-size:10px; }
.compact-recordings .archive-card-body > p { display:none; }
.compact-recordings .archive-participants { padding-top:5px; margin-top:2px; border:0; font-size:10px; gap:6px; }
.compact-recordings .avatar { width:19px; height:19px; }
.compact-recordings .archive-play .icon { width:28px; height:28px; padding:7px; }
.compact-recordings .scene-duration { right:4px; bottom:4px; font-size:9px; }
.home-social .leaderboard-panel .section-head { margin-bottom:6px; }
.home-social .ranking-row:last-child { border-bottom:0; padding-bottom:0; }
.home-social .ranking-row small { display:none; }
.home-social .ranking-row .name { font-size:13px; }

.catalog-controls { padding:18px; border:1px solid var(--border); border-radius:18px; background:var(--surface); margin-bottom:28px; }
.catalog-controls .search-field { max-width:none; background:var(--raised); border-color:transparent; padding:12px 16px; border-radius:10px; }
.catalog-controls .search-field input { font-size:18px; min-height:28px; }
.catalog-controls .search-field:focus-within { border-color:var(--accent); }
.catalog-toolbar > .row { min-width:0; }
.filter-count { display:grid; place-items:center; flex:none; width:22px; height:22px; border-radius:6px; background:var(--accent); color:var(--accent-ink); font:12px var(--font-mono); margin-left:-12px; }
.collection-shelf { margin-bottom:30px; }
.collection-shelf .section-head { margin-bottom:14px; }
.collection-rail { display:flex; gap:16px; overflow-x:auto; padding:4px 2px 14px; scroll-snap-type:x proximity; overscroll-behavior-x:contain; scrollbar-width:thin; scrollbar-color:var(--border-strong) transparent; }
.collection-rail .collection-card { flex:0 0 228px; scroll-snap-align:start; border-top:3px solid var(--border-strong); }
.collection-rail .scene-main { display:block; }
.collection-rail .scene-body { min-height:0; padding:13px 16px 14px; }
.collection-rail .scene-work { display:none; }
.collection-rail .scene-title { font-size:17px; min-height:0; line-height:1.3; -webkit-line-clamp:1; }
.collection-rail .scene-meta { margin-top:10px; font-size:11px; }
.collection-rail .collection-label { border-radius:5px; font-size:11px; left:10px; bottom:10px; }
.scene-grid { grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),1fr)); gap:22px; }
.scene-grid .scene-body { min-height:138px; }
.scene-grid .scene-title { font-size:19px; min-height:0; }
.scene-grid .scene-meta { margin-top:auto; padding-top:18px; }
.mini-scene-grid .scene-body { min-height:132px; }
.scene-card .scene-art img, .scene-card .scene-art svg, .brand-mark { -webkit-user-drag:none; }

.phase-strip::after { content:''; position:absolute; bottom:0; left:0; height:2px; width:var(--phase-to); background:var(--accent); }
.phase-strip.has-advanced::after { animation:phase-advance 300ms ease-out; }
.phase-strip .phase-item { display:flex; flex:1; min-width:0; justify-content:center; align-items:center; gap:9px; padding:11px 12px 13px; color:var(--dim); }
.phase-strip .phase-item.current { background:var(--raised); color:var(--text); }
.phase-strip .phase-item.complete { color:var(--muted); }
.phase-symbol { display:grid; place-items:center; width:24px; height:24px; flex:none; }
.phase-item.current .phase-symbol { color:var(--accent); }
.phase-item.complete .phase-symbol { color:var(--good); }
.room-heading { display:flex; justify-content:space-between; gap:20px; align-items:center; margin-bottom:24px; }
.room-heading h1 { margin:0; font-size:32px; }
.room-guide { padding:22px; border:1px solid var(--border); border-radius:18px; background:var(--surface); }
.guide-heading { display:flex; align-items:center; gap:10px; }
.guide-heading > .icon { color:var(--accent); width:20px; flex:none; }
.guide-heading h2 { font-size:19px; line-height:1.25; }
.room-guide > p { font-size:13px; margin-top:10px; color:var(--dim); }
.guide-checks { display:flex; flex-direction:column; gap:10px; padding:18px 0; }
.guide-checks > span { display:flex; gap:9px; align-items:center; font-size:13px; color:var(--dim); }
.guide-checks .icon { width:15px; height:15px; }
.guide-checks .is-done { color:var(--text); }
.guide-checks .is-done .icon { color:var(--good); }
.room-guide > .btn { width:100%; }
.cast-row { position:relative; }
.cast-row.is-owned { background:#ef534f08; }
.cast-row.is-owned::before { content:''; position:absolute; left:0; top:10px; bottom:10px; width:3px; border-radius:0 3px 3px 0; background:var(--accent); }
.room-extras { margin-top:14px; border:1px solid var(--border); border-radius:12px; background:var(--surface); }
.room-extras > summary, .record-audio > summary { display:flex; align-items:center; gap:10px; padding:15px 18px; list-style:none; cursor:pointer; font-size:14px; color:var(--muted); border-radius:inherit; }
.room-extras > summary::-webkit-details-marker, .record-audio > summary::-webkit-details-marker { display:none; }
.room-extras > summary > .icon, .record-audio > summary > .icon { width:17px; height:17px; }
.room-extras > summary > .icon:last-child, .record-audio > summary > .icon:last-child { margin-left:auto; transition:transform 140ms; }
.room-extras[open] > summary > .icon:last-child, .record-audio[open] > summary > .icon:last-child { transform:rotate(180deg); }
.room-extras .task-grid { margin:0; padding:0 16px 16px; gap:12px; }
.room-extras .task-card { border-radius:10px; background:var(--raised); }
.room-settings { padding:22px; border:1px solid var(--border); border-radius:18px; background:var(--surface); margin-top:24px; }
.room-settings .mode-option { background:transparent; padding:15px; border-radius:10px; }
.room-settings .mode-option[aria-pressed=true] { background:#ef534f0b; }
.room-aside .crew-panel { padding:20px; }
.room-aside .crew-row { padding:13px 0; }
.room-aside .crew-row .avatar { width:32px; height:32px; }
.room-aside .crew-row .name { font-size:13px; }
.room-aside .crew-row small { font-size:11px; }

.capture-controls { display:flex; flex-direction:column; gap:14px; }
.capture-controls .waveform { margin:0; background:transparent; border:0; padding:12px 0 0; border-radius:0; }
.record-audio { border:1px solid var(--border); border-radius:12px; background:var(--raised); }
.record-audio > summary { padding:14px; color:var(--text); }
.record-audio-fields { display:flex; flex-direction:column; gap:16px; padding:4px 14px 18px; }
.record-aside .crew-list { padding-top:4px; }
.record-aside .crew-list .crew-row { padding:12px 0; }
.record-aside .crew-list .progress-bar { height:3px; }

.studio-drafts { margin:0 0 24px; }
.studio-drafts .section-head { margin-bottom:8px; }
.studio-drafts .section-head h2 { font-size:17px; }
.studio-drafts .draft-list { display:flex; flex-direction:row; gap:10px; overflow-x:auto; max-height:none; padding:4px 2px 12px; scrollbar-width:thin; }
.studio-drafts .draft-item { flex:0 0 260px; display:flex; align-items:center; gap:14px; padding:10px; background:var(--surface); border:1px solid var(--border); border-radius:12px; }
.studio-drafts .draft-item.active { border-color:var(--accent); background:var(--raised); }
.studio-drafts .draft-item .scene-art { flex:none; width:80px; aspect-ratio:16/9; height:auto; border-radius:6px; }
.studio-drafts .draft-item > span { padding:0; min-width:0; }
.studio-drafts .draft-item strong { font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.studio-drafts .draft-item small { margin-top:4px; font-size:11px; }
.studio-editor { background:var(--surface); padding:24px; border:1px solid var(--border); border-radius:20px; }
.studio-editor .editor-grid { grid-template-columns:minmax(0,1fr) 340px; gap:28px; }
.studio-editor .editor-form { padding:0 0 0 24px; border-left:1px solid var(--border); }
.studio-start { display:grid; grid-template-columns:minmax(260px,.8fr) 1fr; align-items:center; gap:48px; max-width:1040px; padding:40px; background:var(--surface); border:1px solid var(--border); border-radius:20px; }
.studio-start-frame { display:flex; aspect-ratio:16/9; flex-direction:column; justify-content:center; align-items:center; gap:20px; border:1px dashed var(--border-strong); border-radius:14px; background:var(--raised); font-size:13px; color:var(--dim); }
.studio-start-frame .icon { width:48px; height:48px; color:var(--accent); }
.studio-start h2 { font-size:30px; }
.studio-start p { font-size:15px; margin:12px 0 24px; }
.studio-start .text-link { display:inline-flex; margin-top:26px; }
.editor-actions { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:16px; margin:0 0 22px; padding:14px; background:var(--raised); border:1px solid var(--border-strong); border-radius:12px; position:sticky; top:12px; z-index:var(--z-sticky); box-shadow:0 6px 24px #0003; }
.transcript-sheet { border:1px solid var(--border); border-radius:12px; overflow:hidden; }
.transcript-head, .transcript-sheet .transcript-row { display:grid; grid-template-columns:26px 90px minmax(100px,.35fr) minmax(160px,1fr) 40px 40px; align-items:center; gap:10px; padding:10px 14px; }
.transcript-head { background:var(--raised); color:var(--muted); font-size:12px; }
.transcript-sheet .transcript-row:last-child { border-bottom:0; }
.transcript-sheet input { background:transparent; border-color:transparent; }
.transcript-sheet input:focus { background:var(--raised); }
.transcript-empty { padding:28px; text-align:center; font-size:14px; }

@keyframes phase-advance { from { width:var(--phase-from); } to { width:var(--phase-to); } }
@media (max-width:1100px) {
  .home-layout { grid-template-columns:minmax(0,1fr) 290px; gap:22px; }
  .play-entry { grid-template-columns:minmax(0,1fr) 390px; }
  .play-entry .join-card { padding:26px; }
  .launch-copy strong { font-size:30px; }
  .launch-collage { width:235px; right:0; }
  .launch-collage > span { width:155px; }
  .compact-recordings .archive-open { grid-template-columns:84px minmax(0,1fr); gap:10px; }
  .compact-recordings .scene-art { width:84px; }
  .studio-editor .editor-grid { grid-template-columns:minmax(0,1fr) 290px; gap:20px; }
  .studio-editor .editor-form { padding-left:20px; }
  .phase-strip .phase-label { font-size:12px; }
  .phase-strip .phase-item { gap:5px; padding-inline:6px; }
}
@media (max-width:850px) {
  .home-layout { grid-template-columns:1fr; }
  .home-social { display:grid; grid-template-columns:1fr 1fr; align-items:start; }
  .play-entry { grid-template-columns:1fr; }
  .play-entry .join-card { border-left:0; border-top:1px solid var(--border); }
  .room-launch { padding:24px; }
  .launch-copy strong { font-size:27px; }
  .studio-editor .editor-grid { grid-template-columns:1fr; }
  .studio-editor .editor-form { border:0; padding:0; display:grid; grid-template-columns:1fr 1fr; }
  .transcript-sheet { overflow-x:auto; }
  .transcript-head, .transcript-sheet #draft-lines { min-width:690px; }
  .studio-start { gap:24px; padding:28px; }
}
@media (max-width:620px) {
  .play-entry { grid-template-columns:1fr; border-radius:20px; }
  .room-launch { min-height:228px; padding:24px; justify-content:flex-end; }
  .room-launch .launch-icon { position:absolute; top:22px; left:24px; width:36px; height:36px; }
  .room-launch .launch-icon .icon { width:22px; height:22px; }
  .play-entry .launch-copy strong { font-size:28px; }
  .launch-collage { top:20px; right:32px; width:198px; }
  .launch-collage > span { width:130px; }
  .launch-collage > :nth-child(1) { transform:translate(-6px,18px) rotate(-13deg); }
  .launch-collage > :nth-child(2) { transform:translate(30px,0) rotate(1deg); }
  .launch-collage > :nth-child(3) { transform:translate(70px,32px) rotate(14deg); }
  .room-launch:is(:hover,:focus-visible) .launch-collage > :nth-child(1) { transform:translate(-12px,16px) rotate(-16deg); }
  .room-launch:is(:hover,:focus-visible) .launch-collage > :nth-child(2) { transform:translate(30px,-4px); }
  .room-launch:is(:hover,:focus-visible) .launch-collage > :nth-child(3) { transform:translate(76px,30px) rotate(17deg); }
  .play-entry .join-card { border-left:0; border-top:1px solid var(--border); padding:24px; }
  .play-entry .join-card .code-inputs { margin-top:16px; }
  .play-entry #join-form .code-inputs { margin-top:0; }
  .play-entry #join-form { grid-template-columns:1fr; }
  .play-entry #join-form > .btn { grid-column:1; grid-row:3; justify-self:start; padding-left:0; }
  .play-entry .join-card .code-inputs input { height:48px; min-height:48px; width:calc((100% - 24px) / 5); }
  .home-room-status { display:flex; flex-wrap:wrap; gap:7px 16px; margin-top:-8px; padding-bottom:18px; font-size:12px; }
  .home-social { display:flex; }
  .home-social > section { width:100%; }
  .compact-recordings .archive-open { grid-template-columns:110px minmax(0,1fr); }
  .compact-recordings .scene-art { width:110px; }
  .icon-link { width:44px; height:44px; }
  .catalog-controls { padding:12px; margin-bottom:24px; }
  .catalog-controls .search-field { padding:8px 10px; }
  .catalog-controls .search-field input { font-size:16px; }
  .catalog-toolbar { gap:14px; }
  .catalog-toolbar > .row { flex-wrap:wrap; width:100%; }
  .catalog-toolbar .choice-trigger { margin-left:auto; }
  .collection-rail .collection-card { flex-basis:204px; }
  .collection-rail { gap:12px; }
  .scene-grid { grid-template-columns:1fr; gap:18px; }
  .scene-grid .scene-body { min-height:128px; }
  .phase-strip { margin-bottom:20px; gap:0; }
  .phase-strip .phase-item { padding:9px 6px 11px; }
  .phase-strip .phase-label { display:none; }
  .phase-strip .phase-item.current .phase-label { display:none; }
  .phase-strip .phase-symbol { width:23px; height:23px; }
  .room-heading { align-items:start; flex-direction:column; gap:8px; margin-bottom:20px; }
  .room-heading h1 { font-size:28px; }
  .room-guide { padding:20px; }
  .room-guide .guide-checks { flex-direction:row; flex-wrap:wrap; gap:10px 16px; }
  .room-settings { padding:16px; }
  .room-extras .task-grid { grid-template-columns:1fr; }
  .studio-editor { padding:16px; border-radius:16px; }
  .studio-editor .editor-form { grid-template-columns:1fr; }
  .studio-start { grid-template-columns:1fr; padding:24px; gap:26px; }
  .studio-start-frame { max-width:320px; width:100%; }
  .studio-start h2 { font-size:25px; }
  .studio-drafts .draft-item { flex-basis:230px; }
  .editor-actions { position:static; justify-content:flex-start; gap:8px; padding:12px; box-shadow:none; }
  .editor-actions > .row { display:contents; }
  .editor-actions .btn { font-size:13px; gap:4px; padding:10px 8px; }
  .editor-actions .btn .icon { width:16px; height:16px; }
}
@media(prefers-reduced-motion:reduce) {
  *, *::before, *::after { transition:none !important; scroll-behavior:auto !important; }
  .phase-strip.has-advanced::after { animation:none; }
  .room-extras > summary > .icon:last-child, .record-audio > summary > .icon:last-child { transition:none; }
}
.record-page { --video-aspect:1.7778; --record-stage:calc(max(320px, 100dvh - 632px) * var(--video-aspect)); --record-aside:340px; }

.record-heading, .record-layout, .record-page:has(.review-adjust) .record-layout { width:min(100%, calc(var(--record-stage) + var(--record-aside) + 24px)); margin-inline:auto; }

.record-layout, .record-page:has(.review-adjust) .record-layout { grid-template-columns:minmax(0,1fr) var(--record-aside); gap:24px; }

.record-stage { display:grid; grid-template-rows:minmax(160px,1fr); grid-auto-rows:auto; align-items:stretch; height:calc(100dvh - 282px); min-height:380px; }
.record-video-slot { container-type:size; min-height:0; display:grid; place-items:center; }

.record-video.video-frame { aspect-ratio:var(--video-aspect); width:min(100cqw, calc(100cqh * var(--video-aspect))); height:auto; max-width:none; }
@media (max-width:780px) { .record-stage { display:flex; height:auto; min-height:0; } .record-video-slot { container-type:normal; display:block; } .record-video.video-frame { width:100%; } }

.line-card, .take-track, .take-review, .take-alert { width:100%; }
.room-page.record-page { padding-bottom:96px; }
.record-heading > div { min-width:0; }
#record-hint { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
@media (max-width:780px) { #record-hint { white-space:normal; } .take-next { display:none; } }
@media (hover:none) { .keyboard-hint { display:none; } }

@media (max-width:1600px) { .record-page { --record-aside:310px; } }

.take-lines { display:flex; align-items:center; gap:12px; padding-top:10px; border-top:1px solid var(--border); min-width:0; }

.take-lines .line-strip { flex:1 1 0; min-width:0; margin:0; padding:0; gap:4px; scrollbar-width:none; }

.take-lines .line-strip::-webkit-scrollbar { display:none; }

.take-lines .line-button { min-width:34px; height:26px; padding:0 6px; border-radius:7px; font-size:11px; gap:3px; }

.take-lines .line-button .icon { width:11px; height:11px; }

.take-next { flex:0 1 auto; max-width:40%; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-align:right; }

.line-card.is-long strong { font-size:18px; }

.line-card.is-longer strong { font-size:15px; }
.record-overlay { position:absolute; inset:0; display:grid; place-items:center; pointer-events:none; }
.record-state { position:absolute; left:20px; bottom:18px; background:#101113d9; }
.record-state.is-live { background:var(--accent); color:var(--accent-ink); }
.record-countdown { display:grid; justify-items:center; gap:8px; padding:20px 32px; border-radius:var(--r-card); background:#101113e6; }
.record-countdown strong { font-size:72px; line-height:1; }
.line-card { display:grid; gap:4px; padding:14px 20px; border-radius:var(--r-card); background:var(--surface); border:1px solid var(--border); text-align:center; }
.line-card strong { font-size:22px; line-height:1.3; }
.line-card small { color:var(--dim); font-size:14px; }
.line-card em, .take-next em, .watch-caption em { font-style:italic; font-weight:400; opacity:.6; }
.take-track { display:grid; gap:10px; padding:14px 16px; border-radius:var(--r-card); background:var(--surface); border:1px solid var(--border); }
.take-wave { display:block; width:100%; height:96px; border-radius:var(--r-control); background:var(--gray-950); }
.take-controls { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:8px; }
.take-controls .btn-primary { min-width:160px; }
.take-review { display:grid; gap:12px; padding:16px; border-radius:var(--r-card); background:var(--surface); border:1px solid var(--border); }
.take-review .review-adjust { margin-top:0; gap:12px; grid-template-columns:1fr; }

.take-review > .row { gap:8px; }
.take-alert { display:flex; align-items:center; gap:10px; padding:12px 16px; border-radius:var(--r-control); border:1px solid var(--bad); color:var(--bad); }

@media (min-width:781px) and (max-height:900px) {

  .record-page { padding-top:12px; }

  .record-heading h1 { font-size:24px; }

  .record-page { --record-stage:calc(max(260px, 100dvh - 520px) * var(--video-aspect)); }

  .record-stage { height:calc(100dvh - 254px); gap:8px; grid-template-rows:minmax(90px,1fr); }

  .line-card { padding:8px 16px; }

  .line-card strong { font-size:18px; }

  .take-track { gap:6px; padding:10px 12px; }

  .take-wave { height:64px; }

  .take-lines { padding-top:6px; }

}

#app[data-view=watch] #main { --watch-stage:calc(max(320px, 100dvh - 560px) * var(--video-aspect, 1.7778)); padding-bottom:96px; }

#app[data-view=watch] .phase-strip, #app[data-view=watch] .page-header, #app[data-view=watch] .watch-layout { width:min(100%, calc(var(--watch-stage) + 324px)); margin-inline:auto; }

#app[data-view=watch] .watch-layout { height:calc(100dvh - 406px); min-height:300px; }
@media (min-width:781px) and (max-height:900px) {
  #app[data-view=watch] #main { --watch-stage:calc(max(320px, 100dvh - 420px) * var(--video-aspect, 1.7778)); padding-top:12px; }
  #app[data-view=watch] .phase-strip { margin-bottom:12px; }
  #app[data-view=watch] .page-header { margin-bottom:12px; }
  #app[data-view=watch] .page-header h1 { font-size:26px; }
  #app[data-view=watch] .page-header p { margin-top:2px; }
  #app[data-view=watch] .watch-layout { height:calc(100dvh - 316px); }
}

.watch-layout > .stack { display:grid; grid-template-rows:minmax(0,1fr) auto; gap:12px; min-height:0; }

.watch-video { display:grid; grid-template-rows:minmax(0,1fr) auto; min-height:0; }

.watch-video-slot { container-type:size; min-height:0; display:grid; place-items:center; }

.watch-video .video-frame { aspect-ratio:var(--video-aspect, 1.7778); width:min(100cqw, calc(100cqh * var(--video-aspect, 1.7778))); height:auto; }

#app[data-view=publicRound] #main { --watch-stage:calc(max(320px, 100dvh - 349px) * var(--video-aspect, 1.7778)); }

#app[data-view=publicRound] .page-header, #app[data-view=publicRound] .watch-layout { width:min(100%, calc(var(--watch-stage) + 324px)); margin-inline:auto; }

#app[data-view=publicRound] .watch-video .video-frame { width:min(100%, var(--watch-stage)); }

@media (max-width:780px) { #app[data-view=watch] .watch-layout { height:auto; } .watch-video-slot { container-type:normal; display:block; } .watch-video .video-frame, #app[data-view=publicRound] .watch-video .video-frame { width:100%; } }

