:root {
  color-scheme: dark;
  --ink: #f3f2ec; --muted: #a0aaa9; --accent: #d6ed9b;
  --panel: #141b20; --line: #2d383d; --base: #080f14;
  --target: 48px; --panel-width: clamp(360px, 28vw, 440px); --bar-height: 80px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: var(--base); color: var(--ink);
}
* { box-sizing: border-box; }
html, body { overflow: hidden; }
body { margin: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; color: inherit; background: #1c292f; border: 1px solid var(--line); border-radius: 8px; min-width: var(--target); min-height: var(--target); padding: 10px 16px; }
button:hover:enabled { background: #2c3b40; }
button:disabled { opacity: .35; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
[hidden] { display: none !important; }
h2, p { margin: 0; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 24px; height: 24px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-button, .transport-icon { display: inline-grid; place-items: center; width: var(--target); min-width: var(--target); height: var(--target); padding: 11px; }
.visually-hidden { position: absolute; top: 0; left: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.workspace { height: 100vh; height: 100dvh; width: 100%; display: grid; grid-template-columns: minmax(0,1fr); overflow: hidden; background: var(--base); }
.workspace.panel-open { grid-template-columns: minmax(0,1fr) var(--panel-width); }
.workspace:fullscreen { width: 100vw; height: 100dvh; }
.stage { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; container-type: inline-size; background: #102126; }
.stage-header { background: linear-gradient(#071015c9,transparent); z-index: 3; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 28px 32px 16px; }
.song-header { min-width: 0; }
.song-meta { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: start; gap: 6px 12px; }
.song-number { border: 1px solid #d6ed9b70; color: var(--accent); border-radius: 6px; padding: 3px 7px; font-size: 17px; font-variant-numeric: tabular-nums; }
#song-title { font-size: clamp(20px,2.4cqw,30px); line-height: 1.2; font-weight: 650; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
#song-number[hidden] + #song-title { grid-column: 1 / -1; }
#song-artist { grid-column: 1 / -1; font-size: 17px; line-height: 1.3; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage-utilities { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.stage-corner { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex-shrink: 0; }
.next-songs { display: none; flex-direction: column; align-items: flex-end; gap: 4px; padding: 0; border: 0; background: transparent; font-variant-numeric: tabular-nums; text-shadow: 0 2px 5px #000; }
.next-songs:hover:enabled { background: #080f1466; }
.next-song-heading { display: flex; align-items: baseline; gap: 12px; font-size: 20px; line-height: 1.15; }
#next-song-number { color: var(--accent); font-size: 36px; font-weight: 700; }
.next-song-later { display: flex; gap: 16px; color: #d2d8d4; font-size: 20px; line-height: 1.4; white-space: nowrap; }
@media (min-height: 600px) {
  @container (min-width: 700px) { .next-songs { display: flex; } }
}
#room-button { white-space: nowrap; }
#background-poster, #background-video, #background-transition, .background-shade { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.background-shade { background: #040b0d99; }
#background-transition { transition: opacity .24s ease-out; }
#background-transition.fading { opacity: 0; }
.lyric-screen { position: relative; z-index: 2; flex: 1; min-height: 0; display: grid; place-items: center; padding: 24px 5cqw; text-align: center; }
.stage.idle { isolation: isolate; background: var(--base) url('/brand/home-forest.jpg') center / cover no-repeat; }
.stage.idle::before { content: ''; position: absolute; inset: 0; z-index: -1; background: #040b0d33; }
.stage.idle .lyric-screen { z-index: auto; }
#empty-symbol { width: min(90%, 920px); max-height: 100%; aspect-ratio: 6.35; }
.idle-logo { display: block; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: screen; }
.lyric-lines { width: 100%; text-shadow: 0 2px 5px #000; }
.current-line { font-size: clamp(28px,8cqw,112px); font-weight: 750; line-height: 1.2; white-space: pre-wrap; overflow-wrap: anywhere; letter-spacing: -.02em; }
.current-line .sung { color: var(--accent); }
.next-line { font-size: clamp(21px,5.6cqw,64px); color: #d2d8d4; line-height: 1.3; margin-top: 24px; white-space: pre-wrap; overflow-wrap: anywhere; }
#video { position: relative; flex: 1; min-height: 0; width: 100%; height: 0; object-fit: contain; background: #000; }
.command-bar { margin-top: auto; position: relative; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--bar-height); flex-shrink: 0; padding: 12px 32px max(12px,env(safe-area-inset-bottom)); background: #0b1419ed; border-top: 1px solid #ffffff14; }
.stage-navigation, .stage-actions { display: flex; align-items: center; gap: 10px; }
.stage-navigation button { min-width: 96px; }
.stage-navigation button[aria-expanded="true"], .browse-modes button[aria-pressed="true"], .play-button { background: var(--accent); color: #101b16; border-color: transparent; }
.play-button:hover:enabled { background: #e5fab8; }
.stop-button { background: #541f26; border-color: #823740; color: #ffb5b9; margin-left: 10px; }
.stop-button:hover:enabled { background: #752b35; }
.play-button .pause-glyph, .play-button[data-playing="true"] .play-glyph { display: none; }
.play-button[data-playing="true"] .pause-glyph { display: block; }
.listen-toggle { display: grid; place-items: center; min-width: var(--target); width: var(--target); padding: 11px; background: transparent; border-color: transparent; }
.listen-toggle svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.listen-toggle[aria-pressed="false"] .sound-on, .listen-toggle[aria-pressed="true"] .sound-off { display: none; }
.library-panel { min-height: 0; min-width: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--panel); border-left: 1px solid var(--line); }
.panel-header { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; gap: 8px; padding: 16px 18px 8px; }
#panel-title { font-size: 23px; font-weight: 650; }
.panel-utilities { display: flex; gap: 4px; }
.panel-utilities button { background: transparent; border-color: transparent; }
.panel-tabs { display: none; }
.display-settings { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
select { min-height: var(--target); border-radius: 8px; background: #0b1318; color: var(--ink); border: 1px solid var(--line); padding: 8px; max-width: 160px; }
.catalog, .queue-panel { min-height: 0; flex: 1; display: flex; flex-direction: column; }
#search-form { display: flex; gap: 10px; padding: 8px 18px; flex-shrink: 0; }
.search-field { display: flex; align-items: center; flex: 1; min-width: 0; gap: 10px; padding: 0 12px; border: 1px solid #45545b; background: #0b1419; border-radius: 8px; }
.search-field .icon { width: 20px; height: 20px; color: var(--muted); }
.search-field:focus-within { outline: 2px solid var(--accent); outline-offset: -2px; }
#search:focus-visible { outline: none; }
#search { min-width: 0; width: 100%; height: var(--target); background: transparent; color: var(--ink); border: 0; outline-offset: -3px; font-size: 16px; }
#keypad-toggle { padding: 10px; }
.browse-modes { display: flex; gap: 8px; padding: 8px 18px 14px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.browse-modes button { flex: 1; border-color: transparent; background: transparent; padding: 8px; }
.catalog-scroll { overflow: auto; flex: 1; min-height: 0; overscroll-behavior: contain; scrollbar-color: #425256 transparent; }
.results { outline-offset: -3px; }
.song-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--line); min-height: 80px; margin: 0 18px; }
.song-select { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; text-align: left; background: transparent; border: 0; border-radius: 0; padding: 14px 0; }
.song-select:hover:enabled { background: #ffffff06; }
.row-number { color: var(--accent); font-size: 15px; font-variant-numeric: tabular-nums; min-width: 47px; }
.row-text, .queue-song { display: flex; flex-direction: column; min-width: 0; gap: 5px; }
.row-title { font-size: 18px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.row-artist { font-size: 15px; color: var(--muted); line-height: 1.3; overflow-wrap: anywhere; }
.queue-add { align-self: center; min-width: var(--target); width: var(--target); padding: 11px; border: 0; background: transparent; color: var(--accent); }
.song-row.selected { background: #d6ed9b0c; }
.browse-row { display: block; text-align: left; width: 100%; background: transparent; border: 0; border-radius: 0; border-bottom: 1px solid var(--line); padding: 18px 24px; min-height: 64px; }
.filter-back { margin: 0 18px 8px; text-align: left; color: var(--accent); }
.result-summary { flex-shrink: 0; }
#retry-search { margin: 8px 18px; }
.search-status, .queue-empty { padding: 20px; color: var(--muted); }
#keypad { padding: 12px 18px; border-bottom: 1px solid var(--line); }
.digits { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.digits button { font-size: 20px; }
.digits #keypad-clear { font-size: 14px; }
.digits .icon-button { width: 100%; }
.keypad-actions { display: flex; gap: 10px; margin-top: 10px; }
.keypad-actions button { flex: 1; }
#keypad-play { background: var(--accent); color: #101b16; }
.queue-header { display: flex; justify-content: flex-end; padding: 8px 18px; }
.queue-list { list-style: none; margin: 0; padding: 0 18px; flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.queue-row { display: grid; grid-template-columns: 24px minmax(0,1fr) auto; gap: 8px; align-items: start; border-bottom: 1px solid var(--line); padding: 14px 0; }
.queue-position { color: var(--accent); padding-top: 12px; }
.queue-song { padding-top: 10px; }
.queue-actions { display: flex; gap: 2px; }
.queue-actions button { width: var(--target); min-width: var(--target); height: var(--target); padding: 12px; background: transparent; border-color: transparent; }
.queue-actions .icon { width: 20px; height: 20px; }
.preparing { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); }
.spinner { width: 20px; height: 20px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
.play-overlay { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); z-index: 5; background: var(--accent); color: #101b16; }
.playback-toast, .player-error { position: absolute; z-index: 6; bottom: calc(var(--bar-height) + 12px); left: 20px; right: 20px; width: fit-content; max-width: calc(100% - 40px); margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #10191ff5; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.workspace:has(.playback-toast:not([hidden])) .player-error { display: none; }
.player-error { color: #ffc0bb; }
.playback-toast[data-busy="true"]::before { content: ""; width: 14px; height: 14px; flex-shrink: 0; border: 2px solid #ffffff35; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
#toast-message { min-width: 0; overflow-wrap: anywhere; }
#toast-retry { flex-shrink: 0; color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }
/* Bottom sheets are based on orientation, not host/guest role. */
@media (orientation: portrait) and (max-width: 1100px) {
  .workspace.panel-open { grid-template-columns: minmax(0,1fr); grid-template-rows: clamp(280px,38dvh,512px) minmax(0,1fr); }
  .library-panel { border-left: 0; border-top: 1px solid var(--line); border-radius: 12px 12px 0 0; }
  .panel-open .stage-navigation, #panel-title { display: none; }
  .panel-open .next-songs { display: none; }
  .panel-tabs { display: flex; flex: 1; min-width: 0; }
  .panel-tabs button { flex: 1; border: 0; border-radius: 0; background: transparent; padding: 8px; }
  .panel-tabs button[aria-selected="true"] { color: var(--accent); border-bottom: 2px solid var(--accent); }
  .panel-header { padding: 4px 12px; }
  .command-bar { padding-left: 16px; padding-right: 16px; }
  .panel-open .stage-actions { width: 100%; justify-content: flex-end; }
  .panel-open .listen-toggle { margin-right: auto; }
  .stage-header { padding: 16px; gap: 10px; }
  .stage-utilities { gap: 6px; }
  #room-button { padding: 8px 10px; font-size: 14px; }
  .song-number { font-size: 13px; padding: 3px 5px; }
  #song-title { font-size: 18px; }
  #song-artist { font-size: 14px; }
  .song-meta { gap: 5px 8px; }
  .current-line { font-size: clamp(28px,8cqw,64px); }
  .next-line { font-size: clamp(21px,6cqw,44px); margin-top: 14px; }
  .panel-open .lyric-screen { padding: 6px 16px; }
}
@media (max-width: 700px) {
  :root { --bar-height: 72px; }
  .stage-navigation { gap: 6px; }
  .stage-navigation button { min-width: auto; padding: 10px 8px; }
  .stage-actions { gap: 6px; }
  .command-bar { gap: 8px; padding-left: 12px; padding-right: 12px; }
  .song-row { min-height: 72px; margin: 0 16px; }
  .row-title { font-size: 16px; } .row-artist { font-size: 14px; }
  .row-number { font-size: 14px; min-width: 43px; }
  .song-select { gap: 10px; padding: 12px 0; }
  #search-form { padding: 6px 16px; }
  .browse-modes { padding: 4px 16px 8px; }
  .panel-open .stage-header .stage-utilities { gap: 4px; }
}
@media (orientation: landscape) and (max-height: 540px) {
  :root { --panel-width: 360px; --bar-height: 68px; }
  .stage-header { padding: 12px 16px; gap: 10px; }
  #song-title { font-size: 18px; } #song-artist { font-size: 14px; }
  .song-number { font-size: 13px; }
  .stage-utilities { gap: 6px; }
  #room-button { padding: 8px; font-size: 13px; }
  .command-bar { padding: 10px 12px; gap: 6px; }
  .stage-navigation { gap: 4px; } .stage-navigation button { min-width: 0; padding: 8px; font-size: 14px; }
  .stage-actions { gap: 4px; } .stop-button { margin-left: 6px; }
  .panel-header { padding: 4px 14px; }
  #search-form { padding: 4px 14px; }
  .browse-modes { padding: 4px 14px 8px; }
  .song-row { min-height: 72px; }
  .row-title { font-size: 16px; } .row-artist { font-size: 14px; }
  .current-line { font-size: clamp(26px,6.8cqw,52px); }
  .next-line { font-size: clamp(20px,4.7cqw,36px); margin-top: 12px; }
  .lyric-screen { padding: 8px 16px; }
}
/* A very narrow window and the onscreen keyboard give the active task the space. */
.workspace.keyboard-open.panel-open { grid-template-columns: minmax(0,1fr); grid-template-rows: var(--bar-height) minmax(0,1fr); }
.keyboard-open.panel-open .stage-header, .keyboard-open.panel-open .lyric-screen, .keyboard-open.panel-open #video { visibility: hidden; }
.keyboard-open.panel-open .command-bar { margin-top: auto; position: absolute; inset: 0; }
.keyboard-open.panel-open .stage-navigation, .keyboard-open.panel-open #panel-title { display: none; }
.keyboard-open.panel-open .panel-tabs { display: flex; flex: 1; }
.keyboard-open.panel-open .stage-actions { margin-left: auto; }
@media (orientation: landscape) and (max-width: 680px) {
  .workspace.panel-open { grid-template-columns: minmax(0,1fr); grid-template-rows: var(--bar-height) minmax(0,1fr); }
  .panel-open .stage-header, .panel-open .lyric-screen, .panel-open #video { visibility: hidden; }
  .panel-open .command-bar { margin-top: auto; position: absolute; inset: 0; }
  .panel-open .stage-navigation, #panel-title { display: none; }
  .panel-tabs { display: flex; flex: 1; }
  .panel-tabs button { flex: 1; }
  .panel-open .stage-actions { margin-left: auto; }
}
@media (min-width: 700px) and (orientation: portrait) {
  .stage-header { padding: 24px; }
  #song-title { font-size: 26px; } #song-artist { font-size: 18px; }
}
@media (min-width: 1100px) and (min-height: 600px) {
  .workspace.tv { --target: 64px; --bar-height: 104px; --panel-width: 560px; }
  .tv .stage-header { padding: 48px 64px 20px; }
  .tv #song-title { font-size: 36px; } .tv #song-artist { font-size: 26px; } .tv .song-number { font-size: 24px; }
  .tv .stage-utilities { gap: 16px; } .tv #room-button { font-size: 24px; }
  .tv .stage-corner { gap: 16px; }
  .tv .next-song-heading { font-size: 28px; }
  .tv #next-song-number { font-size: 56px; }
  .tv .next-song-later { font-size: 28px; gap: 20px; }
  .tv .command-bar { padding: 20px 64px; }
  .tv .stage-navigation button { min-width: 144px; font-size: 26px; }
  .tv .current-line { font-size: clamp(64px,8cqw,112px); } .tv .next-line { font-size: clamp(44px,6cqw,80px); }
  .tv .panel-header { padding: 28px 28px 12px; } .tv #panel-title { font-size: 32px; }
  .tv #search-form, .tv .browse-modes { padding-left: 28px; padding-right: 28px; }
  .tv #search, .tv .browse-modes button { font-size: 23px; }
  .tv .song-row { min-height: 132px; margin: 0 28px; }
  .tv .row-title { font-size: 28px; } .tv .row-artist, .tv .row-number { font-size: 23px; }
  .tv .song-select { gap: 20px; } .tv .row-number { min-width: 68px; }
  .tv .icon { width: 30px; height: 30px; }
  .tv button:focus-visible { outline-width: 4px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }
#room-button{flex-shrink:0;background:#162329d9;border-color:#ffffff20;font-size:14px}
#room-dialog{color:var(--ink);background:var(--panel);border:1px solid var(--line);border-radius:16px;width:min(440px,calc(100% - 24px));padding:24px}
#room-dialog::backdrop{background:#000a;backdrop-filter:blur(5px)}
.room-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}
.room-heading h2{font-size:24px}
#room-form label{display:block;margin:14px 0;color:var(--muted);font-size:14px}
#room-form input{display:block;width:100%;padding:12px;margin-top:6px;border:1px solid #45525a;border-radius:8px;background:#0b1318;color:var(--ink);font-size:20px}
.room-buttons{display:flex;gap:8px;flex-wrap:wrap;margin-top:18px}
.room-buttons button{flex:1}
#room-create{background:var(--accent);color:#162011}
#room-solo{margin-top:12px;width:100%;background:transparent}
#room-error{margin-top:14px;color:#ffb3ae;font-size:14px}
#room-link{display:block;color:var(--accent);margin-top:15px;overflow-wrap:anywhere;user-select:all}
#room-role{color:var(--accent)}
#room-qr{display:block;width:220px;max-width:100%;height:auto;margin:18px auto;background:white;image-rendering:pixelated}
.room-choice{display:grid;gap:12px;padding:12px 0}
.room-choice button{min-height:68px;font-size:20px}
.room-choice #choose-create,.room-submit{background:var(--accent);color:#162011}
#room-logo { display: none; }
#room-dialog.room-entry-screen {
  width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0;
  border: 0; border-radius: 0; padding: 32px; isolation: isolate;
  background: var(--base) url('/brand/home-forest.jpg') center / cover no-repeat;
}
#room-dialog.room-entry-screen[open] { display: grid; place-items: center; }
#room-dialog.room-entry-screen::before { content: ''; position: absolute; inset: 0; z-index: -1; background: #040b0d33; }
.room-home #room-form { width: min(1040px, 52.4vw); position: relative; top: -12px; }
.room-home .room-heading { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.room-home .room-choice { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding: 0; }
.room-home #room-logo {
  display: block; grid-column: 1 / -1; width: 92%; height: auto; aspect-ratio: 6.35;
  object-fit: cover; object-position: center; mix-blend-mode: screen; margin: 0 auto 17px;
}
.room-home .room-choice button { min-height: clamp(64px, 6.6vw, 104px); font-size: clamp(20px, 2.4vw, 36px); font-weight: 600; border-radius: 12px; }
.room-home #choose-create:hover { background: #e2f4b7; }
.room-home #choose-join { background: #141f25dc; border-color: #4b5d65; }
.room-home #choose-join:hover { background: #24353be6; }
.room-home #room-error:empty { display: none; }
@media (max-width: 700px), (max-width: 1100px) and (orientation: portrait) {
  #room-dialog.room-entry-screen { padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); }
  .room-home #room-form { width: min(100%, 520px); }
  .room-home .room-choice { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .room-home #room-logo { width: 100%; margin-bottom: 20px; }
  .room-home .room-choice button { min-height: 68px; font-size: 22px; }
}
@media (max-height: 450px) and (min-width: 701px) {
  .room-home #room-form { width: min(100%, 620px); }
  .room-home #room-logo { margin-bottom: 0; }
}
.room-submit{background:var(--accent);color:#162011}
#room-code-preview{display:block;font-size:44px;font-weight:650;letter-spacing:.12em;font-variant-numeric:tabular-nums;margin:10px 0 25px}
.room-field-label{display:block;color:var(--muted);font-size:14px}
#room-form .password-toggle{display:flex;align-items:center;gap:10px;color:var(--ink);font-size:16px}
#room-form .password-toggle input{width:20px;height:20px;margin:0;accent-color:var(--accent)}
.pin-boxes{display:flex;gap:12px;margin-top:10px}
#room-form .pin-boxes input{width:56px;height:64px;margin:0;text-align:center;font-size:28px;padding:5px;font-variant-numeric:tabular-nums}
#room-back{background:transparent;margin-top:12px}
#room-password-display{font-variant-numeric:tabular-nums;letter-spacing:.06em;margin-top:12px}
#workspace[inert]{visibility:hidden}
#room-dialog { max-height: calc(100dvh - 24px); overflow: auto; }
#room-host-controls { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 18px; }
#room-guests-heading { margin: 24px 0 8px; font-size: 18px; }
#room-guests { padding: 0; margin: 0; list-style: none; }
#room-guests li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
#room-guests .guest-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
#room-guests .guest-status { color: var(--muted); font-size: 13px; }
#room-guests .guest-remove { color: #ffb3ae; min-height: 48px; flex-shrink: 0; }
#room-guests-empty { color: var(--muted); margin-top: 12px; }
#room-password-generate { margin-top: 12px; }
#room-dialog.room-form-screen #room-form { width: min(100%, 440px); padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: #141b20f5; }
.room-form-screen .room-heading { margin-bottom: 24px; }
.room-form-screen #room-code-preview { margin: 8px 0 24px; color: var(--accent); font-size: 48px; line-height: 1.15; }
.room-form-screen #room-form .password-toggle { min-height: 32px; margin: 0 0 12px; }
.room-form-screen .pin-boxes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.room-form-screen #room-form .pin-boxes input { width: 100%; min-width: 0; }
.room-form-screen #room-join-step { display: flex; flex-direction: column; gap: 20px; }
.room-form-screen #room-join-step > label { margin: 0; }
.room-form-screen #room-join { margin-top: 4px; }
.room-form-screen #room-code { min-height: 64px; margin-top: 8px; font-size: 28px; letter-spacing: .08em; }
.room-form-screen .room-submit { width: 100%; min-height: 56px; margin-top: 24px; font-size: 18px; font-weight: 600; }
.room-form-screen #room-back { width: 100%; margin-top: 12px; border-color: transparent; color: var(--muted); }
.room-form-screen #room-error:empty { display: none; }
@media (max-height: 600px) {
  #room-dialog.room-form-screen[open] { align-items: start; }
  #room-dialog.room-form-screen #room-form { padding: 20px; }
  .room-form-screen .room-heading { margin-bottom: 16px; }
  .room-form-screen #room-code-preview { margin-bottom: 16px; font-size: 40px; }
  .room-form-screen #room-form .pin-boxes input { height: 52px; }
  .room-form-screen .room-submit { min-height: 48px; margin-top: 20px; }
  .room-form-screen #room-join { margin-top: 0; }
}
@media (orientation: landscape) and (max-height: 450px) {
  #room-dialog.room-entry-screen { padding: 12px max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left)); }
  #room-dialog.room-form-screen #room-form { padding: 16px; }
  .room-form-screen .room-heading { margin-bottom: 12px; }
  .room-form-screen #room-code-preview { margin-bottom: 12px; font-size: 36px; }
  .room-form-screen #room-form .password-toggle { min-height: 28px; margin-bottom: 8px; }
  .room-form-screen #room-form .pin-boxes input { height: 48px; }
  .room-form-screen #room-code { min-height: 56px; padding: 10px 12px; font-size: 26px; }
  .room-form-screen #room-join-step { gap: 16px; }
  .room-form-screen .room-submit { margin-top: 16px; }
  .room-form-screen #room-back { margin-top: 8px; }
}

.play-button .icon, .stop-button .icon { fill: currentColor; stroke: none; }

#panel-feedback:empty { display: none; }
#panel-feedback { flex-shrink: 0; }
#panel-feedback .playback-toast, #panel-feedback .player-error { position: static; width: auto; max-width: none; margin: 8px 16px; }
