@font-face {
  font-family: "Vazirmatn";
  src: url("/fonts/Vazirmatn.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face { font-family: "Lalezar"; src: url("/fonts/Lalezar-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Vazirmatn RD"; src: url("/fonts/Vazirmatn-RD-Regular.ttf") format("truetype"); font-display: swap; }

:root {
  color-scheme: dark;
  font-family: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
  --bg: #0d1119;
  --surface: #151c2a;
  --surface-raised: #1a2433;
  --surface-hover: #222c3f;
  --surface-input: #101722;
  --border: #303b50;
  --border-light: #3b4660;
  --ink: #edf0fa;
  --muted: #94a1b8;
  --soft: #b3bfd1;
  --accent: #b2a1ff;
  --accent-light: #dacfff;
  --accent-dark: #8e78d8;
  --cyan: #8edcfa;
  --mint: #84dec2;
  --amber: #f0c489;
  --red: #f59ba6;
  --shadow: 0 28px 74px rgba(0, 0, 0, .28);
  --radius: 22px;
  --ease: cubic-bezier(.21, .77, .28, .99);
  background: var(--bg);
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { min-width: 320px; min-height: 100vh; margin: 0; color: var(--ink); overflow-x: hidden; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled, input:disabled { cursor: not-allowed; opacity: .43; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 3px;
}
button, input, select { -webkit-tap-highlight-color: transparent; }
button svg, .icon { pointer-events: none; }
button { border: 0; color: inherit; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3 { margin: 0; }
input, select { min-width: 0; }
input[type="range"] { cursor: pointer; accent-color: var(--accent); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }
select option { color: var(--ink); background: #1a2332; }
::selection { color: #f9f7ff; background: #715cba; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { display: inline-block; width: 20px; height: 20px; flex: 0 0 auto; fill: none; color: inherit; }
.icon--tiny { width: 14px; height: 14px; }
.soft-text { color: var(--muted); }
.gradient-text { color: var(--accent-light); background: linear-gradient(110deg,#e2d7ff 12%,#b9a7ff 55%,#9cddfc 96%); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.status-dot { display: inline-block; width: 8px; height: 8px; flex: none; border-radius: 50%; background: #8895a5; }
.status-dot--online { background: var(--mint); box-shadow: 0 0 0 4px rgba(132,222,194,.10); }
.status-dot--offline { background: #9aa5b5; }
.line { flex: 1; height: 1px; background: linear-gradient(90deg,transparent,var(--border-light),transparent); }

.app-shell { position: relative; isolate: isolate; display: flex; flex-direction: column; min-height: 100svh; background: radial-gradient(ellipse 90% 35% at 50% -8%,rgba(114,100,193,.10),transparent 72%), var(--bg); }
.ambient { z-index: -1; pointer-events: none; position: absolute; border-radius: 50%; filter: blur(70px); opacity: .7; }
.ambient--top { width: min(62vw,700px); height: 300px; top: -210px; right: 6vw; background: rgba(103,82,189,.22); }
.ambient--bottom { width: min(55vw,580px); height: 250px; bottom: 10%; left: 0; background: rgba(25,83,140,.14); }
.app-header { display: flex; align-items: center; gap: 10px; width: min(1460px,calc(100% - 80px)); height: 90px; min-height: 90px; margin: auto; border-bottom: 1px solid rgba(109,128,163,.14); z-index: 4; }
.brand { display: inline-flex; align-items: center; flex-shrink: 0; gap: 12px; direction: ltr; }
.brand__symbol { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #3b5c78; border-radius: 14px; color: #bceeff; background: linear-gradient(146deg,#294761,#172739); box-shadow: inset 0 1px 0 rgba(255,255,255,.09),0 5px 19px #07101b; }
.brand__mark { width: 35px; height: 35px; }
.brand__name { display: flex; align-items: baseline; flex-wrap: wrap; width: 157px; font: 700 23px/1 "Segoe UI", Arial, sans-serif; letter-spacing: -.9px; white-space: nowrap; }
.brand__name > span { color: #c1b2ff; }
.brand__name small { display: block; width: 100%; margin-top: 7px; color: #778aa8; font: 700 8px/1 "Segoe UI",Arial,sans-serif; letter-spacing: 2.1px; }
.header-spacer { flex: 1; }
.connection-pill { display: inline-flex; align-items: center; flex: none; gap: 9px; min-height: 35px; padding: 0 12px; border: 1px solid #2e3a4e; border-radius: 99px; background: rgba(23,31,44,.72); color: var(--muted); font-size: 11px; white-space: nowrap; }
.header-voice-controls { display: flex; align-items: center; gap: 5px; margin-inline-start: 8px; }
.voice-live-label { color: var(--muted); font-size: 11px; margin-inline: 6px; white-space: nowrap; }
.header-divider { width: 1px; height: 26px; flex: none; background: var(--border); margin: 0 5px; }
.icon-button { display: inline-grid; place-items: center; position: relative; flex: 0 0 auto; min-width: 42px; width: 42px; height: 42px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: #b8c4d8; transition: transform .16s var(--ease),color .18s,border-color .18s,background .18s; }
.icon-button:hover { color: #f6f2ff; background: #222b3c; }
.icon-button:active { transform: scale(.94); }
.icon-button--outlined { background: #202a3b; border-color: #38435b; }
.icon-button--outlined:hover { border-color: #7666a8; }
.icon-button--voice { width: 40px; min-width: 40px; height: 40px; border-radius: 12px; background: #1b2434; border-color: #2e3b53; }
.icon-button--voice.active, .icon-button--voice[aria-pressed="true"] { color: #c9baff; border-color: #a492ed; background: #383055; }
.voice-cross { position: absolute; width: 20px; height: 2px; background: var(--red); transform: rotate(-40deg); box-shadow: 0 0 0 2px #1b2434; }
.icon-button--voice.active .voice-cross { display: none; }
.button-dot { position: absolute; top: 5px; left: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.mobile-only { display: none; }

#main-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.view { width: min(1290px,calc(100% - 80px)); margin-inline: auto; min-width: 0; }
.view--lobby { padding: clamp(42px,6.4vh,85px) 0 35px; }
.lobby-heading { text-align: center; margin-bottom: clamp(30px,4.9vh,53px); }
.eyebrow, .section-caption { color: #a599e0; font: 700 10px/1.7 "Segoe UI",Arial,sans-serif; letter-spacing: 2.3px; direction: ltr; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px; border-radius: 99px; border: 1px solid rgba(176,161,255,.18); background: rgba(176,161,255,.065); }
.eyebrow__star { display: grid; place-items: center; color: #d2c6ff; }
.lobby-heading h1 { margin: 16px 0 10px; font-size: clamp(28px,3.55vw,48px); line-height: 1.45; font-weight: 850; letter-spacing: -.9px; }
.lobby-heading p { color: #99a8bf; font-size: clamp(12px,1.1vw,15px); line-height: 2; }
.lobby-grid { display: grid; grid-template-columns: minmax(0,1.08fr) minmax(0,.92fr); gap: 19px; max-width: 1130px; margin: auto; align-items: stretch; }
.panel { position: relative; min-width: 0; padding: 30px; border: 1px solid #303d51; border-radius: var(--radius); background: linear-gradient(145deg,rgba(31,39,56,.96),rgba(19,26,38,.99) 67%); box-shadow: var(--shadow),inset 0 1px 0 rgba(255,255,255,.035); overflow: hidden; }
.panel::before { content: ""; pointer-events: none; position: absolute; top: 0; left: 12%; width: 75%; height: 1px; background: linear-gradient(90deg,transparent,rgba(183,195,230,.25),transparent); }
.panel--directory { display: flex; flex-direction: column; min-height: 455px; background: linear-gradient(145deg,rgba(26,36,52,.98),rgba(19,26,38,.99)); }
.panel-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 29px; }
.panel-heading__icon { display: grid; place-items: center; width: 48px; height: 48px; flex: none; color: #e6dfff; background: linear-gradient(150deg,#514480,#2e2a4c); border: 1px solid #776aa8; border-radius: 15px; }
.panel-heading__icon .icon { width: 22px; height: 22px; }
.panel-heading h2, .directory-heading h2, .sidebar-heading h2 { font-size: 20px; font-weight: 750; letter-spacing: -.2px; }
.panel-heading p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin-bottom: 16px; }
.field label, .capacity-heading label, .setting-row label, .source-kind-label { color: #c8d0e1; font-size: 12px; font-weight: 650; }
.field input:not([type="range"]), .field select, .code-input {
  width: 100%; height: 51px; border: 1px solid #374258; border-radius: 11px;
  background: var(--surface-input); color: var(--ink); padding: 0 15px;
  transition: border-color .2s,box-shadow .2s,background .2s;
}
.field input::placeholder, .code-input::placeholder { color: #738197; }
.field input:not([type="range"]):hover, .field select:hover { border-color: #516078; }
.field input:not([type="range"]):focus, .field select:focus {
  border-color: #b8a6f7; outline: none; box-shadow: 0 0 0 4px rgba(178,161,255,.12);
}
.field-with-icon { display: flex; align-items: center; position: relative; }
.field-with-icon > .icon { position: absolute; right: 14px; color: var(--muted); width: 17px; height: 17px; }
.field-with-icon input { padding-right: 42px !important; font: 13px "Segoe UI",Arial,sans-serif; }
.field input[dir="ltr"] { direction: ltr; text-align: left; }
.segmented { display: flex; gap: 5px; padding: 5px; margin: 22px 0 18px; background: #0f1622; border: 1px solid #2a3447; border-radius: 13px; }
.segmented__item { flex: 1; min-height: 44px; border-radius: 9px; background: transparent; color: #99a7bd; font-size: 13px; font-weight: 650; transition: color .2s,background .2s,box-shadow .2s; }
.segmented__item:hover { color: var(--ink); }
.segmented__item.is-active, .segmented__item[aria-selected="true"] { background: #34304e; color: #e4dbff; box-shadow: 0 2px 11px rgba(7,8,18,.23); }
.lobby-options { animation: slide-in .24s var(--ease) both; }
.code-input { font: 600 15px/1.4 "Segoe UI",Arial,sans-serif; letter-spacing: 3px; text-align: center !important; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 45px; padding: 10px 18px; border-radius: 12px; border: 1px solid transparent; font-size: 12px; font-weight: 700; line-height: 1.4; white-space: nowrap; text-decoration: none; transition: transform .16s var(--ease),background .2s,border-color .2s,box-shadow .2s; }
.button:not(:disabled):hover { transform: translateY(-1px); }
.button:not(:disabled):active { transform: translateY(0) scale(.98); }
.button .icon { width: 17px; height: 17px; }
.button--primary { color: #201731; border-color: #d8cdff; background: linear-gradient(145deg,#ccbfff,#a68df0); box-shadow: inset 0 1px 0 rgba(255,255,255,.35),0 7px 22px rgba(130,99,212,.2); }
.button--primary:not(:disabled):hover { background: linear-gradient(145deg,#e1d8ff,#b39bfd); box-shadow: 0 9px 24px rgba(144,109,223,.28); }
.button--secondary { color: #f0eaff; border-color: #706390; background: #39304f; }
.button--secondary:not(:disabled):hover { background: #4a3d66; }
.button--outline { background: #202a3a; border-color: #39465c; color: #d6deeb; }
.button--outline:not(:disabled):hover { border-color: #8272b8; background: #2a3448; }
.button--text { color: #bcb0f9; background: transparent; }
.button--text:not(:disabled):hover { background: #29273e; }
.button--wide { width: 100%; }
.button--small { min-height: 37px; padding: 7px 12px; border-radius: 9px; font-size: 11px; }
.button--compact { min-height: 40px; padding-inline: 14px; }
.button--tiny { min-height: 32px; border-radius: 8px; padding: 5px 9px; font-size: 10px; }
.capacity-heading { display: flex; justify-content: space-between; align-items: center; margin: 2px 0 11px; }
.capacity-heading output { color: var(--accent-light); font-size: 13px; font-weight: 750; }
#capacity-input { display: block; width: 100%; height: 5px; margin: 0 0 25px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.setting-row > div { min-width: 0; }
.setting-row p { max-width: 350px; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.9; }
.setting-row--lobby { padding: 0 0 20px; }
.toggle { display: inline-flex; position: relative; align-items: center; flex: none; width: 43px; height: 26px; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.toggle__track { position: relative; width: 43px; height: 25px; border-radius: 99px; border: 1px solid #526079; background: #2a3447; transition: background .2s,border-color .2s; }
.toggle__track::before { content: ""; position: absolute; width: 17px; height: 17px; top: 3px; right: 3px; border-radius: 50%; background: #bdc5d2; transition: transform .2s var(--ease),background .2s; }
.toggle input:checked + .toggle__track { background: #7968b2; border-color: #b6a2f6; }
.toggle input:checked + .toggle__track::before { transform: translateX(-17px); background: #faf5ff; }
.toggle input:focus-visible + .toggle__track { outline: 2px solid var(--accent); outline-offset: 3px; }
.lobby-perks { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 24px; padding-top: 18px; border-top: 1px solid #2f394c; color: #8c9bb0; font-size: 10px; }
.lobby-perks span { display: inline-flex; align-items: center; gap: 5px; }
.lobby-perks .icon { width: 14px; height: 14px; color: var(--mint); }
.inline-error { padding: 10px 12px; margin-top: 10px; color: #ffd4dc; background: rgba(183,62,85,.14); border: 1px solid rgba(245,155,166,.2); border-radius: 10px; font-size: 11px; }
.directory-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 18px; border-bottom: 1px solid #2c374b; }
.directory-heading .section-caption { margin-bottom: 6px; font-size: 9px; }
.directory-heading h2 { display: flex; align-items: center; gap: 10px; }
.count-badge, .tab-count { display: inline-grid; place-items: center; min-width: 26px; height: 23px; padding: 0 6px; border-radius: 7px; background: rgba(178,161,255,.13); color: #cabfff; font: 700 12px "Segoe UI",Arial,sans-serif; }
.room-directory { display: flex; flex-direction: column; gap: 10px; overflow: auto; max-height: 390px; min-height: 0; padding: 14px 2px 9px; scrollbar-width: thin; scrollbar-color: #36455f transparent; }
.room-directory:not(:empty) + .empty-directory { display: none; }
.public-room, .directory-room, .recent-room { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid #344057; border-radius: 13px; background: #1d2839; }
.public-room, .directory-room { transition: border-color .2s,background .2s,transform .16s var(--ease); }
.public-room:hover, .directory-room:not(:disabled):hover { background: #283349; border-color: #8070af; transform: translateY(-1px); }
.public-room__icon { display: grid; place-items: center; width: 39px; height: 39px; flex: none; color: #c7b7ff; background: #373350; border-radius: 12px; }
.public-room__info { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 4px; }
.public-room__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.public-room__meta { color: var(--muted); font-size: 10px; }
.directory-room { display: block; text-align: right; width: 100%; min-height: 51px; padding-inline: 16px; color: #dce2f3; font-size: 12px; line-height: 1.9; }
.recent-room { justify-content: space-between; flex-wrap: wrap; margin-top: 14px; background: #29283f; border-color: #5c507e; }
.recent-room__content { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.recent-room__tag { font-size: 10px; color: var(--accent); }
.recent-room__content strong { font-size: 13px; }
.recent-room__content .soft-text { font-size: 11px; }
.empty-directory { display: flex; align-items: center; flex-direction: column; justify-content: center; gap: 8px; min-height: 218px; flex: 1; text-align: center; }
.empty-directory__graphic { display: grid; place-items: center; width: 65px; height: 65px; margin-bottom: 7px; color: #9085c7; background: #2a2a42; border: 1px dashed #554a7c; border-radius: 20px; }
.empty-directory__graphic .icon { width: 28px; height: 28px; }
.empty-directory strong { font-size: 13px; }
.empty-directory p { max-width: 240px; color: var(--muted); font-size: 11px; line-height: 1.9; }
.directory-foot { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: auto; padding-top: 15px; border-top: 1px solid #2c374b; color: #879bb2; font-size: 10px; }
.directory-foot .status-dot { width: 6px; height: 6px; }
.lobby-bottom-line { display: flex; align-items: center; gap: 18px; max-width: 1100px; margin: 43px auto 0; color: #556982; font: 700 9px "Segoe UI",Arial,sans-serif; letter-spacing: 2.1px; direction: ltr; }

/* Room view keeps the desktop video and member/chat panel side-by-side. */
.view--room { width: min(1510px,calc(100% - 64px)); padding: 22px 0 20px; }
.room-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 18px; }
.room-toolbar__identity { min-width: 0; }
.eyebrow--small { padding: 0; border: 0; background: transparent; font-size: 9px; }
.room-toolbar h1 { margin: 3px 0 1px; font-size: clamp(20px,2vw,27px); font-weight: 750; }
.room-name { color: var(--accent); }
.room-toolbar h1, .room-name { overflow-wrap: anywhere; }
.room-toolbar p { color: var(--muted); font-size: 11px; }
.room-toolbar__actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.room-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(270px,315px); gap: 18px; align-items: stretch; min-height: 0; }
.room-sync-warning { display: flex; gap: 10px; align-items: center; margin: -3px 0 14px; padding: 10px 15px; border-radius: 11px; color: #f0ca96; background: rgba(176,115,45,.14); font-size: 12px; }
.player-panel { min-width: 0; display: flex; flex-direction: column; }
.movie-frame { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; isolation: isolate; border: 1px solid #303b4f; border-radius: 17px; background: #090c12; box-shadow: var(--shadow); }
.movie-screen { position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 150px; background: radial-gradient(circle at 50% 44%,#131727,#090c12 65%); overflow: hidden; touch-action: pan-y; }
.video-element, .youtube-frame { width: 100%; height: 100%; position: absolute; inset: 0; background: #080b10; object-fit: contain; z-index: 1; }
.youtube-frame iframe { width: 100%; height: 100%; display: block; border: 0; }
.video-placeholder { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 28px; isolation: isolate; }
.video-placeholder[hidden] { display: none !important; }
.video-placeholder__glow { position: absolute; z-index: -1; width: 260px; height: 220px; border-radius: 50%; background: rgba(115,94,191,.14); filter: blur(75px); }
.video-placeholder__play { display: grid; place-items: center; width: 79px; height: 79px; margin-bottom: 2px; background: linear-gradient(145deg,#302a4b,#1b2032); border: 1px solid #6d5d9d; border-radius: 25px; color: #cbbdff; box-shadow: 0 14px 45px #0005,inset 0 1px #ffffff12; }
.video-placeholder__play .icon { width: 38px; height: 38px; }
.video-placeholder h2 { font-size: 22px; font-weight: 750; }
.video-placeholder p { max-width: 380px; color: #a0a9bc; font-size: 12px; line-height: 2; }
.video-placeholder .button { margin-top: 4px; }
.subtitle-text { position: absolute; z-index: 5; left: 8%; right: 8%; bottom: 7%; color: white; font: 26px/1.5 "Lalezar","Vazirmatn",sans-serif; unicode-bidi: plaintext; -webkit-text-stroke: 1px #000; text-shadow: 0 2px 3px #000, 0 0 5px #000; background: rgba(0,0,0,.35); border-radius: 5px; text-align: center; padding: 5px 12px; white-space: pre-wrap; pointer-events: none; }
.player-feedback { position: absolute; z-index: 7; inset: 0; display: grid; place-items: center; pointer-events: none; color: #fff; }
.player-feedback span { border-radius: 16px; background: #09101dcc; backdrop-filter: blur(8px); padding: 13px 18px; font-size: 16px; }
.player-buffering { position: absolute; z-index: 6; inset: 0; display: grid; place-items: center; pointer-events: none; }
.fullscreen-topbar { position: absolute; top: max(16px,env(safe-area-inset-top)); left: max(14px,env(safe-area-inset-left)); right: max(14px,env(safe-area-inset-right)); display: flex; align-items: center; justify-content: space-between; z-index: 11; pointer-events: none; }
.fullscreen-topbar .icon-button { pointer-events: auto; }
.player-controls { position: relative; display: flex; flex-direction: column; justify-content: center; flex: none; min-width: 0; height: 105px; padding: 13px 19px 12px; border-top: 1px solid #2d374a; background: linear-gradient(180deg,#161d2b,#141b28); }
.timeline-row { display: flex; align-items: center; gap: 13px; height: 23px; }
.player-time { color: #d5deef; white-space: nowrap; font: 12px "Segoe UI",Arial,sans-serif; font-variant-numeric: tabular-nums; }
.player-time--muted { color: #8b99ad; }
.player-time--combined { font-size: 11px; }
#seek-slider { flex: 1; width: 100%; height: 4px; min-width: 10px; margin: 0; }
#seek-slider::-webkit-slider-thumb { width: 13px; height: 13px; }
.transport-row { position: relative; display: grid; align-items: center; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 10px; flex: 1; }
.transport-row__center, .transport-row__side { display: flex; align-items: center; }
.transport-row__center { justify-content: center; gap: 8px; }
.transport-row__side--end { justify-content: flex-end; gap: 2px; }
.transport-row__side--start { justify-content: flex-start; gap: 4px; }
.control-button { display: inline-grid; place-items: center; width: 39px; height: 39px; min-width: 39px; position: relative; border: 1px solid transparent; border-radius: 11px; color: #c2cbdc; background: transparent; transition: background .15s,color .15s,transform .15s; font-family: "Segoe UI",Arial,sans-serif; }
.control-button:hover:not(:disabled) { background: #2b364b; color: #f1ebff; }
.control-button:active:not(:disabled) { transform: scale(.94); }
.control-button .icon { width: 19px; height: 19px; }
.control-button--main { width: 46px; height: 46px; min-width: 46px; border-radius: 14px; color: #25193e; background: linear-gradient(135deg,#c8b7ff,#a08be5); box-shadow: 0 5px 18px rgba(147,118,223,.22); font-size: 27px; line-height: 1; }
.control-button--main:hover:not(:disabled) { background: #e0d5ff; color: #1d1533; }
.control-button--main .icon { width: 23px; height: 23px; }
.skip-value { position: absolute; bottom: 2px; font-size: 7px; font-weight: 700; pointer-events: none; }
.transport-row__center .control-button > .icon { transform: translateY(-1px); }
.player-ready { color: #8494ac; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-controls, .fit-controls { display: flex; align-items: center; gap: 0; }
.control-button--more { display: none; }
.volume-slider { width: 78px; height: 4px; margin: 0 4px; }
.track-popover { position: absolute; z-index: 30; bottom: 98px; right: 70px; display: flex; flex-direction: column; gap: 2px; width: min(270px,calc(100% - 24px)); max-height: min(45dvh,300px); overflow-y: auto; overscroll-behavior: contain; padding: 8px; background: #283245; border: 1px solid #4c5474; border-radius: 13px; box-shadow: 0 18px 40px #0008; }
.track-popover button, .track-popover span { display: block; width: 100%; padding: 11px 13px; text-align: start; font-size: 12px; border-radius: 9px; color: var(--ink); background: transparent; line-height: 1.7; }
.track-popover button:hover { background: #414762; }
.track-popover--audio { right: 118px; }
.media-meta { display: flex; justify-content: space-between; align-items: center; min-width: 0; gap: 12px; padding: 17px 4px 0; }
.media-meta > div { display: flex; gap: 9px; align-items: center; min-width: 0; }
.media-meta .icon { width: 17px; height: 17px; color: #8475c2; }
.media-meta #media-title { max-width: min(50vw,520px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #c8d4e6; font-size: 12px; }
.media-status { color: #7689a1; font-size: 10px; text-align: left; }

/* Fullscreen is requested on the frame itself so its dock stays available. */
.movie-frame:fullscreen, .movie-frame:-webkit-full-screen { width: 100vw; height: 100dvh; max-width: none; max-height: none; border: 0; border-radius: 0; background: #000; }
.movie-frame:fullscreen .movie-screen, .movie-frame:-webkit-full-screen .movie-screen { aspect-ratio: auto; flex: 1; min-height: 0; }
.movie-frame:fullscreen .player-controls, .movie-frame:-webkit-full-screen .player-controls { position: absolute; z-index: 10; bottom: 0; left: 0; right: 0; height: 124px; padding: 18px max(18px,env(safe-area-inset-right)) max(16px,calc(env(safe-area-inset-bottom) + 16px)) max(18px,env(safe-area-inset-left)); border: 0; background: linear-gradient(0deg,rgba(0,0,0,.88),rgba(0,0,0,.25) 68%,transparent); }
.movie-frame:fullscreen .subtitle-text, .movie-frame:-webkit-full-screen .subtitle-text { bottom: max(130px,calc(env(safe-area-inset-bottom) + 133px)); }
.movie-frame:fullscreen .video-element, .movie-frame:-webkit-full-screen .video-element { background: #000; }
.movie-frame:fullscreen .track-popover, .movie-frame:-webkit-full-screen .track-popover { bottom: max(116px,calc(env(safe-area-inset-bottom) + 116px)); max-height: min(48dvh,320px); }

/* Room side panel */
.room-sidebar { display: flex; flex-direction: column; min-width: 0; min-height: 525px; max-height: min(79vh,810px); border: 1px solid #303c51; border-radius: 18px; background: linear-gradient(160deg,#1b2434,#141b29); overflow: hidden; box-shadow: var(--shadow),inset 0 1px 0 #ffffff06; }
.sidebar-heading { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 22px 18px 13px; }
.sidebar-heading .section-caption { font-size: 8px; letter-spacing: 1.8px; }
.sidebar-heading h2 { font-size: 18px; margin-top: 3px; }
.room-code-card { display: flex; justify-content: space-between; align-items: center; gap: 9px; margin: 0 15px 14px; padding: 12px 14px; border: 1px solid #504c73; border-radius: 13px; background: linear-gradient(125deg,#302a49,#22253b); }
.room-code-card > div { display: flex; flex-direction: column; gap: 3px; }
.room-code-card > div > span { color: #aaa4c9; font-size: 10px; }
#room-code-display { direction: ltr; font: 750 20px "Segoe UI",Arial,sans-serif; letter-spacing: 2px; color: #ddd3ff; }
.room-code-card .icon-button { width: 37px; min-width: 37px; height: 37px; background: #393454; border-color: #645c86; }
.sidebar-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 0 15px; gap: 7px; }
.sidebar-tab { display: flex; align-items: center; justify-content: center; gap: 5px; min-width: 0; min-height: 41px; padding-inline: 8px; border: 1px solid #344157; border-radius: 11px; background: #192233; color: #8fa0b8; font-size: 12px; font-weight: 600; }
.sidebar-tab .icon { width: 15px; height: 15px; }
.sidebar-tab.is-active, .sidebar-tab[aria-selected="true"] { border-color: #7d6da8; background: #363049; color: #f0eaff; }
.tab-count { height: 20px; min-width: 20px; padding: 0 5px; font-size: 10px; }
.sidebar-panel { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 13px 14px; }
.sidebar-panel__hint { display: flex; justify-content: space-between; gap: 6px; margin-bottom: 11px; font-size: 10px; color: #d3d9e5; }
.member-list, .chat-messages, .requests-list { display: flex; flex-direction: column; gap: 9px; min-height: 0; margin: 0; padding: 0; list-style: none; overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #394d69 transparent; }
.member-list { flex: 1; }
.member-list:not(:empty) + .sidebar-empty { display: none; }
.sidebar-empty { margin-block: auto; text-align: center; color: var(--muted); font-size: 12px; }
.member-card, .member-row { border: 1px solid #303e56; border-radius: 12px; background: #202a3b; }
.member-card__main { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; text-align: start; background: transparent; }
.member-card__main:hover { background: #283449; }
.member-card__avatar, .join-request__avatar { display: grid; place-items: center; width: 35px; height: 35px; flex: none; border-radius: 11px; background: linear-gradient(130deg,#695a9b,#3c456e); color: #f5eaff; font: 750 14px "Segoe UI",Arial,sans-serif; }
.member-card__details { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.member-card__name { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-card__meta, .member-card__status { color: var(--muted); font-size: 10px; }
.member-card__status { color: var(--mint); }
.member-card__device { color: #a79ae5; }
.member-card__device-icon { width: 16px; height: 16px; }
.member-card__permissions { display: flex; gap: 6px; padding: 0 9px 9px; }
.member-card__permissions > button { flex: 1; }
.member-row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; justify-content: space-between; padding: 10px 12px; }
.member-row > span:first-child { font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.member-row > span:nth-child(2) { color: var(--mint); font-size: 12px; }
.member-row label { display: inline-flex; align-items: center; gap: 4px; color: var(--soft); font-size: 10px; min-height: 29px; padding: 0 7px; border-radius: 7px; background: #2a344b; cursor: pointer; }
.member-row input { width: 15px; height: 15px; }
.member-name-action { cursor: pointer; border-radius: 6px; }
.member-name-action:hover,.member-name-action:focus-visible { color: var(--accent-light); }
.join-requests-alert { display: flex; align-items: center; justify-content: space-between; gap: 9px; min-height: 44px; padding: 9px 11px; margin-top: 12px; background: #38304b; border: 1px solid #705f9e; border-radius: 11px; font-size: 11px; color: #eee5ff; }
.join-requests-alert > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.join-requests-alert .icon { width: 16px; height: 16px; }
.request-count { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: #7a66ad; font: 750 12px "Segoe UI",Arial,sans-serif; }
.sidebar-note { padding: 9px 3px; font-size: 10px; color: #a9b5ca; }
.sidebar-panel--chat { gap: 0; }
.chat-messages { flex: 1; padding: 3px 1px 12px; gap: 10px; }
.chat-messages:not(:empty) + .chat-empty { display: none; }
.chat-empty { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 9px; flex: 1; text-align: center; color: #9ca8c0; }
.chat-empty .icon { width: 32px; height: 32px; color: #9f8dd9; }
.chat-empty strong { color: #d4d8ea; font-size: 12px; }
.chat-empty p { font-size: 11px; }
.chat-message { position: relative; min-width: 0; padding: 11px 12px 9px; border: 1px solid #2f3d55; border-radius: 11px 11px 5px 11px; background: #233044; animation: chat-rise .2s var(--ease) both; }
.chat-message.own { background: #34304d; border-color: #534977; border-radius: 11px 11px 11px 5px; }
.chat-message__header { display: flex; justify-content: space-between; align-items: center; gap: 7px; }
.chat-message__author, .chat-meta { color: #c7b7ff; font-size: 11px; font-weight: 700; }
.chat-message__time { color: #8b9bb2; font: 10px "Segoe UI",Arial,sans-serif; }
.chat-message__body, .chat-text { margin: 5px 0 0; color: #e9eaf2; font-size: 12px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-message__quoted, .chat-quote { display: flex; flex-direction: column; gap: 2px; width: 100%; min-width: 0; margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: #3a3d55; border-right: 3px solid #b2a1ff; text-align: start; color: #d4d0e7; font-size: 11px; overflow-wrap: anywhere; }
.chat-message__quote-name { color: #c5baff; font-size: 10px; }
.chat-message__reply, .reply-action { display: flex; align-items: center; justify-content: center; gap: 5px; min-width: 32px; min-height: 26px; margin: 7px 0 0 auto; border-radius: 7px; padding: 3px 8px; background: #38435c; color: #d5ccff; font-size: 10px; }
.chat-message__reply:hover, .reply-action:hover { background: #504b70; }
.chat-message__reply .icon { width: 14px; height: 14px; }
.reply-preview { display: flex; align-items: center; gap: 9px; padding: 9px 10px; margin-bottom: 8px; border: 1px solid #51466d; border-radius: 11px; background: #302b46; }
.reply-preview__bar { display: inline-block; width: 3px; height: 33px; flex: none; border-radius: 8px; background: var(--accent); }
.reply-preview > div { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; overflow: hidden; }
.reply-preview strong { color: #dbd1ff; font-size: 10px; }
.reply-preview__text, #reply-preview-text { font-size: 11px; color: #aeb9d0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reply-preview .icon-button { min-width: 28px; width: 28px; height: 28px; }
.reply-preview .icon { width: 14px; height: 14px; }
.chat-form { display: flex; align-items: center; gap: 7px; padding-top: 12px; border-top: 1px solid #2f3b50; }
.chat-form input { flex: 1; height: 45px; min-width: 0; padding: 0 13px; background: #101723; color: var(--ink); border: 1px solid #364158; border-radius: 11px; outline: none; font-size: 11px; }
.chat-form input:focus { border-color: #a493e8; box-shadow: 0 0 0 3px rgba(178,161,255,.1); }
.chat-form input::placeholder { color: #76849a; }
.send-button { display: grid; place-items: center; width: 45px; height: 45px; flex: none; border-radius: 12px; color: #271b42; background: #bbaaff; }
.send-button:hover:not(:disabled) { background: #dbd0ff; }
.send-button .icon { width: 19px; height: 19px; transform: scaleX(-1); }
.sidebar-foot { display: flex; align-items: center; gap: 9px; min-height: 36px; padding: 0 16px; border-top: 1px solid #2d384a; color: #8898af; font-size: 10px; }
.sidebar-foot .status-dot { width: 6px; height: 6px; }

.app-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; width: min(1460px,calc(100% - 80px)); min-height: 43px; margin-inline: auto; color: #687b94; font: 700 9px "Segoe UI",Arial,sans-serif; letter-spacing: 1.3px; direction: ltr; }
.footer-divider { padding: 0 5px; color: #8274ae; }

/* Dialogs / overlays */
.modal { width: min(520px,calc(100vw - 24px)); max-height: min(90dvh,800px); padding: 25px; overflow-y: auto; margin: auto; color: var(--ink); background: linear-gradient(152deg,#202a3b,#151d2b 80%); border: 1px solid #536078; border-radius: 20px; box-shadow: 0 35px 125px #000a; }
.modal:not([open]) { display: none; }
.modal::backdrop { background: rgba(3,6,13,.79); backdrop-filter: blur(7px); }
.modal--small { width: min(460px,calc(100vw - 24px)); }
.modal--source { width: min(570px,calc(100vw - 24px)); }
.modal-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 25px; }
.modal-heading h2 { margin-top: 4px; font-size: 22px; font-weight: 750; }
.modal-heading .section-caption { font-size: 8px; }
.modal-close { border: 1px solid #35425b; background: #273347; }
.modal-divider { height: 1px; margin: 20px 0; background: #38445b; }
.source-cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.source-card { display: flex; align-items: center; flex-direction: column; justify-content: flex-start; gap: 8px; min-height: 122px; padding: 13px 7px; background: #1b2638; border: 1px solid #3a465e; border-radius: 13px; text-align: center; cursor: pointer; }
.source-card:hover { border-color: #9785d1; background: #2d304c; }
.source-card__icon { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 13px; color: #d2c5ff; background: #383451; }
.source-card__icon .icon { width: 20px; height: 20px; }
.source-card strong { font-size: 11px; }
.source-card small { font-size: 9px; color: #95a3b9; line-height: 1.6; }
.source-kind-label { margin: 2px 0 10px; }
.source-kind { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 20px; }
.radio-tile { display: flex; align-items: center; gap: 9px; min-height: 40px; padding: 8px 12px; background: #1d293b; border: 1px solid #36445d; border-radius: 10px; cursor: pointer; font-size: 11px; }
.radio-tile:has(input:checked) { border-color: #9180cb; background: #302b48; }
.source-subtitle { display: flex; align-items: center; gap: 12px; justify-content: space-between; margin-top: 20px; padding-top: 18px; border-top: 1px solid #354057; }
.source-subtitle > div { display: flex; flex-direction: column; gap: 3px; }
.source-subtitle strong { font-size: 12px; }
.source-subtitle span { font-size: 10px; color: var(--muted); }
.settings-sections { display: flex; flex-direction: column; gap: 17px; }
.settings-section { display: flex; flex-direction: column; gap: 15px; padding: 17px; border: 1px solid #37465e; border-radius: 14px; background: #1a2535; }
.settings-section h3 { display: flex; align-items: center; gap: 9px; padding-bottom: 11px; border-bottom: 1px solid #35435a; font-size: 14px; }
.settings-section h3 .icon { color: var(--accent); width: 17px; height: 17px; }
.settings-section .field { margin-bottom: 0; }
.settings-section .setting-row > input[type="range"] { width: 118px; }
.settings-section .setting-row > button { flex: none; }
.dialog-hint { color: var(--muted); font-size: 11px; line-height: 1.9; }
.requests-list { max-height: 340px; gap: 9px; }
.join-request, .requests-list > div { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; padding: 10px; border: 1px solid #38455b; border-radius: 11px; background: #222b3e; }
.join-request > strong, .requests-list > div > span { margin-inline-end: auto; font-size: 12px; }
.requests-list > div > button { padding: 6px 10px; border-radius: 8px; font-size: 11px; color: #dcd1ff; background: #3a3556; }
.requests-list > div > button:hover { background: #554c77; }
.client-chip { display: inline-flex; padding: 4px 9px; border-radius: 6px; color: var(--accent-light); background: #34304d; font: 700 10px "Segoe UI",Arial,sans-serif; }
.member-detail { display: flex; align-items: center; gap: 10px; margin-bottom: 17px; color: var(--muted); font-size: 11px; }
.member-permissions { display: flex; flex-direction: column; gap: 16px; border-top: 1px solid #344058; margin-top: 17px; padding-top: 18px; }
.waiting-overlay { position: fixed; inset: 0; z-index: 65; display: grid; place-items: center; padding: 20px; background: rgba(4,7,14,.76); backdrop-filter: blur(10px); }
.waiting-card { display: flex; flex-direction: column; align-items: center; gap: 15px; text-align: center; width: min(400px,100%); padding: 37px 30px; border: 1px solid #5e5783; border-radius: 21px; background: linear-gradient(150deg,#292845,#151e2e); box-shadow: var(--shadow); }
.waiting-card__orb { display: grid; place-items: center; width: 70px; height: 70px; border-radius: 24px; color: #e9deff; background: #443863; }
.waiting-card__orb .icon { width: 32px; height: 32px; }
.waiting-card h2 { font-size: 21px; }
.waiting-card p { color: var(--muted); font-size: 12px; }
.loader { display: block; width: 20px; height: 20px; flex: none; border: 2px solid rgba(192,178,255,.23); border-top-color: var(--accent-light); border-radius: 50%; animation: spin .9s linear infinite; }
.toast-stack { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; position: fixed; z-index: 90; top: max(20px,env(safe-area-inset-top)); left: max(20px,env(safe-area-inset-left)); width: min(380px,calc(100vw - 28px)); pointer-events: none; }
.toast, .glass-toast { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; padding: 13px 15px; color: #f0edff; background: linear-gradient(145deg,rgba(44,52,74,.94),rgba(25,33,49,.96)); border: 1px solid rgba(169,175,220,.32); border-radius: 14px; box-shadow: 0 12px 32px #0008, inset 0 1px 0 #ffffff1a; backdrop-filter: blur(16px); pointer-events: auto; animation: toast-enter .25s var(--ease) both; }
.toast__content { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.toast__title { font-size: 12px; overflow-wrap: anywhere; }
.toast__message { color: #aebad0; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.toast__icon { color: var(--accent-light); }
.toast__close { width: 30px; min-width: 30px; height: 30px; }
.glass-toast { font-size: 12px; line-height: 1.8; }
.glass-toast > span { flex: 1; overflow-wrap: anywhere; }
.glass-toast > button { width: 26px; min-width: 26px; height: 26px; border-radius: 7px; color: #c8c9d9; background: rgba(255,255,255,.07); font: 19px Arial,sans-serif; }
.glass-toast.error { border-color: rgba(251,145,160,.59); }
.glass-toast.success { border-color: rgba(143,221,186,.57); }
.source-card:disabled { cursor: not-allowed; opacity: .52; }
.source-card:disabled:hover { transform: none; border-color: #3a465e; background: #1b2638; }
.radio-tile:has(input:disabled) { opacity: .56; cursor: not-allowed; }
.playback-unlock { position: absolute; z-index: 12; inset-inline-start: 50%; top: 41%; transform: translate(-50%,-50%); padding: 13px 20px; min-height: 46px; border-radius: 12px; border: 1px solid #b7a6ff; background: rgba(25,24,43,.92); color: #f7f1ff; box-shadow: 0 15px 40px #0009; backdrop-filter: blur(12px); white-space: nowrap; }
[dir="rtl"] .playback-unlock { transform: translate(50%,-50%); }

.mobile-sidebar-scrim { display: none; position: fixed; inset: 0; z-index: 26; background: rgba(2,7,16,.65); backdrop-filter: blur(2px); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slide-in { from { transform: translateY(9px); opacity: .2; } to { transform: translateY(0); opacity: 1; } }
@keyframes chat-rise { from { transform: translateY(8px); opacity: .3; } to { transform: translateY(0); opacity: 1; } }
@keyframes toast-enter { from { transform: translateX(-20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

@media (max-width: 1240px) {
  .view--room { width: calc(100% - 44px); }
  .room-layout { grid-template-columns: minmax(0,1fr) 290px; gap: 12px; }
  .player-controls { padding-inline: 11px; }
  .player-ready { display: none; }
  .volume-slider { width: 58px; }
  .control-button { width: 35px; min-width: 35px; height: 37px; }
  .fit-controls { display: none; }
}
@media (max-width: 970px) {
  .app-header, .app-footer, .view { width: calc(100% - 42px); }
  .lobby-grid { gap: 13px; }
  .panel { padding: 22px; }
  .room-layout { grid-template-columns: minmax(0,1fr); }
  .view--room { width: calc(100% - 42px); }
  .room-sidebar { position: fixed; z-index: 27; top: 0; left: 0; bottom: 0; width: min(390px,calc(100vw - 32px)); max-height: none; min-height: 0; border-radius: 0 17px 17px 0; transform: translateX(-104%); transition: transform .27s var(--ease); box-shadow: -20px 0 80px #000a; }
  .room-sidebar.open { transform: translateX(0); }
  [dir="rtl"] .room-sidebar { left: auto; right: 0; border-radius: 17px 0 0 17px; box-shadow: 20px 0 80px #000a; }
  [dir="rtl"] .room-sidebar:not(.open) { transform: translateX(104%); }
  /* The dedicated scrim is the only backdrop; no duplicate overlays. */
  body:has(.room-sidebar.open) { overflow: hidden; }
  .mobile-only { display: inline-grid; }
  .app-header #mobile-room-toggle[hidden] { display: none; }
  .room-sidebar.open ~ .mobile-sidebar-scrim, .mobile-sidebar-scrim:not([hidden]) { display: block; }
  .sidebar-panel { flex: 1; }
  .room-toolbar__actions { gap: 7px; }
  .movie-screen { max-height: min(70dvh,calc(100vw * .58)); }
}
@media (max-width: 700px) {
  .app-header { width: calc(100% - 28px); min-height: 70px; height: 70px; gap: 5px; }
  .brand { gap: 8px; }
  .brand__symbol { width: 38px; height: 38px; border-radius: 12px; }
  .brand__mark { width: 31px; height: 31px; }
  .brand__name { font-size: 19px; width: 133px; }
  .brand__name small { font-size: 7px; letter-spacing: 1.5px; margin-top: 6px; }
  .connection-pill { display: none; }
  .header-voice-controls { gap: 0; margin: 0; }
  .voice-live-label { display: none; }
  .header-divider { margin: 0 1px; }
  .icon-button, .icon-button--voice { width: 39px; min-width: 39px; height: 39px; }
  .app-footer { width: calc(100% - 28px); min-height: 40px; font-size: 8px; }
  .app-footer > span:last-child { display: none; }
  .view--lobby { width: calc(100% - 28px); padding-top: 28px; }
  .lobby-heading { margin-bottom: 23px; }
  .lobby-heading h1 { font-size: clamp(25px,6.1vw,34px); line-height: 1.55; }
  .lobby-heading p { padding-inline: 12px; font-size: 11px; }
  .eyebrow { font-size: 8px; letter-spacing: 1.2px; }
  .lobby-grid { grid-template-columns: minmax(0,1fr); gap: 15px; }
  .panel--directory { min-height: 275px; }
  .panel { padding: 20px; border-radius: 17px; }
  .panel-heading { margin-bottom: 21px; }
  .panel-heading h2 { font-size: 18px; }
  .room-directory { max-height: 310px; }
  .empty-directory { min-height: 150px; }
  .lobby-bottom-line { margin-top: 26px; }
  .view--room { width: 100%; padding: 0; }
  .room-toolbar { align-items: flex-start; padding: 17px 15px 14px; margin: 0; gap: 10px; }
  .room-toolbar { flex-wrap: wrap; }
  .room-toolbar__identity { flex: 1 1 165px; }
  .room-toolbar h1 { font-size: 19px; }
  .room-toolbar .eyebrow { font-size: 8px; }
  .room-toolbar__actions { flex-wrap: nowrap; gap: 5px; }
  .room-toolbar__actions .button { min-height: 40px; padding: 10px; font-size: 11px; }
  .room-toolbar__actions .button .icon { width: 17px; height: 17px; }
  .room-toolbar__actions .button > span { display: none; }
  .room-sync-warning { margin: 0 12px 12px; }
  .room-layout { display: block; }
  .movie-frame { border-radius: 0; border-left: 0; border-right: 0; box-shadow: none; }
  .movie-screen { aspect-ratio: 16 / 9; max-height: 45dvh; }
  .video-placeholder { gap: 7px; padding: 12px; }
  .video-placeholder__play { width: 52px; height: 52px; border-radius: 17px; }
  .video-placeholder__play .icon { width: 28px; height: 28px; }
  .video-placeholder h2 { font-size: 16px; }
  .video-placeholder p { font-size: 10px; max-width: 270px; line-height: 1.7; }
  .video-placeholder .button { min-height: 33px; padding: 6px 10px; font-size: 10px; }
  .player-controls { height: 104px; padding: 9px 11px 8px; }
  .timeline-row { gap: 8px; height: 26px; }
  .player-time { font-size: 10px; }
  .transport-row { display: flex; align-items: center; justify-content: space-between; gap: 0; }
  .transport-row__center { order: 2; gap: 0; }
  .transport-row__side--start { order: 1; }
  .transport-row__side--end { order: 3; }
  .control-button { min-width: 40px; width: 40px; height: 44px; border-radius: 10px; }
  .control-button--main { min-width: 47px; width: 47px; height: 47px; }
  .transport-row__side--start #player-resync { display: none; }
  .track-controls { gap: 0; }
  .volume-slider, .fit-controls { display: none; }
  .media-meta { padding: 14px 14px; gap: 9px; }
  .media-meta #media-title { max-width: 56vw; }
  .media-status { display: none; }
  .movie-frame:fullscreen .movie-screen { max-height: none; }
  .movie-frame:fullscreen .player-controls { padding-bottom: max(19px,calc(env(safe-area-inset-bottom) + 16px)); height: max(104px,calc(env(safe-area-inset-bottom) + 104px)); }
  .movie-frame:fullscreen #player-resync { display: inline-grid; }
  .room-sidebar { width: min(390px,calc(100vw - 34px)); }
  .track-popover, .track-popover--audio { right: 12px; bottom: 96px; max-height: min(44dvh,50vw); }
  .modal { padding: 18px; }
  /* Keep transient notices away from the title, movie and playback controls. */
  .toast-stack { top: auto; bottom: max(52px,calc(env(safe-area-inset-bottom) + 16px)); left: 12px; width: min(340px,calc(100vw - 24px)); gap: 6px; }
  .glass-toast { padding: 9px 11px; gap: 9px; font-size: 11px; line-height: 1.5; }
  .glass-toast > button { width: 23px; min-width: 23px; height: 23px; }
}
@media (max-width: 390px) {
  .brand__name { width: 115px; font-size: 17px; }
  .brand__name small { font-size: 6px; }
  .app-header { gap: 1px; }
  .icon-button, .icon-button--voice { width: 36px; min-width: 36px; }
  .header-divider { display: none; }
  .source-cards { gap: 5px; }
  .source-card { padding: 9px 3px; min-height: 110px; }
  .source-card strong { font-size: 10px; }
  .source-card small { font-size: 8px; }
  .transport-row__side--end #player-audio, .transport-row__side--end #player-subtitle { display: none; }
  .transport-row__side--end #player-more { display: inline-grid; }
  .transport-row__side--start #player-resync { display: inline-grid; }
  .lobby-perks { gap: 8px; }
  .app-header:has(#header-voice-controls:not([hidden])) .brand__name { display: none; }
}
@media (max-width: 360px) {
  .brand__name { display: none; }
  .video-placeholder p { display: none; }
  .video-placeholder { gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
