:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #191919;
  background: #f5f5f5;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: #f5f5f5; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #ffcc2f; outline-offset: 3px; }

.app-shell { max-width: 1240px; min-height: 100vh; margin: 0 auto; padding: 0 clamp(16px, 3.5vw, 44px) 36px; }
.app-header { height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 84px; height: 38px; padding: 0 11px; border: 0; border-radius: 11px; background: #fff; color: #191919; font-size: 12px; font-weight: 700; }
.theme-icon { font-size: 18px; line-height: 1; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; letter-spacing: -.045em; }
.brand-icon { display: grid; place-items: center; width: 32px; height: 32px; padding-left: 2px; border-radius: 10px; background: #ffdc55; font-size: 13px; }
.connection { color: #8a8a8a; font-size: 12px; white-space: nowrap; }
.eyebrow { display: block; font-size: 11px; line-height: 1.3; font-weight: 700; color: #8a8a8a; }

.home { max-width: 780px; padding-top: clamp(44px, 8vw, 110px); }
.home-heading h1 { max-width: 680px; margin: 12px 0 17px; font-size: clamp(38px, 6vw, 66px); line-height: 1.04; letter-spacing: -.06em; font-weight: 800; }
.home-heading p { max-width: 530px; margin: 0; font-size: 16px; line-height: 1.5; color: #626262; }
.start-card { display: grid; grid-template-columns: 62px 1fr auto; align-items: center; gap: 20px; margin-top: 42px; padding: 22px; background: #fff; border-radius: 22px; box-shadow: 0 8px 36px #16161608; }
.start-icon { display: grid; place-items: center; width: 62px; height: 62px; padding-left: 3px; background: #ffdc55; border-radius: 18px; font-size: 22px; }
.start-copy h2 { margin: 0 0 5px; font-size: 19px; letter-spacing: -.035em; }
.start-copy p { margin: 0; font-size: 13px; color: #8a8a8a; }
.primary-button, .dark-button { min-height: 48px; padding: 0 19px; border: 0; border-radius: 13px; font-size: 14px; font-weight: 700; transition: transform .15s ease, background .15s ease; }
.primary-button { background: #ffdc55; color: #171717; }
.primary-button:hover { background: #ffcc35; transform: translateY(-1px); }
.primary-button span { margin-left: 12px; }
.home-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.home-chips span { padding: 9px 12px; background: #e9e9e9; border-radius: 100px; color: #606060; font-size: 12px; font-weight: 600; }
.setup-card, .directory, .settings-card, .search-card { background: #fff; border-radius: 19px; }
.setup-card { margin-top: 12px; padding: 22px; }
.setup-card h2, .directory h2, .search-card h2 { margin: 0 0 16px; font-size: 18px; letter-spacing: -.035em; }
.setup-card label, .settings-form label { display: grid; gap: 7px; margin-bottom: 14px; font-size: 12px; font-weight: 700; }
.setup-card input:not([type="checkbox"]), .setup-card textarea, .setup-card select,
.settings-form input:not([type="checkbox"]), .settings-form textarea, .settings-form select,
.search-card input { width: 100%; min-height: 45px; padding: 11px 13px; border: 0; border-radius: 11px; background: #f3f3f3; color: #191919; font-size: 14px; font-weight: 400; }
.setup-card textarea, .settings-form textarea { resize: vertical; }
.setup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.setup-switches { display: flex; flex-wrap: wrap; gap: 18px; margin: 2px 0 20px; }
.setup-switches label { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; }
.setup-switches input { accent-color: #e9b800; width: 17px; height: 17px; }
.directory { margin-top: 24px; padding: 22px; }
.directory-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.directory-head h2 { margin: 4px 0 0; }
.directory-head button { padding: 9px 11px; border: 0; border-radius: 10px; background: #f2f2f2; color: #555; font-size: 12px; }
.public-rooms { display: grid; gap: 10px; margin-top: 17px; }
.directory-empty { margin: 2px 0; color: #888; font-size: 13px; line-height: 1.4; }
.public-room { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 14px; border: 1px solid #ededed; border-radius: 13px; }
.public-room-copy { min-width: 0; flex: 1; }
.public-room strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.public-room p { margin: 4px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #888; font-size: 12px; }
.public-room button { flex: 0 0 auto; padding: 10px 13px; border: 0; border-radius: 10px; background: #ffdc55; color: #191919; font-size: 12px; font-weight: 700; }

.room { padding-top: 26px; }
.room-topline { display: flex; align-items: center; gap: 15px; margin-bottom: 22px; }
.back-link { flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; padding-bottom: 4px; background: #fff; border-radius: 12px; font-size: 30px; line-height: 1; }
.room-title { flex: 1; min-width: 0; }
.room-title h1 { margin: 3px 0 0; font-size: 26px; line-height: 1.15; letter-spacing: -.05em; }
.room-description { margin: 5px 0 0; color: #777; font-size: 12px; }
.viewers { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 9px 12px; background: #fff; border-radius: 100px; font-size: 12px; font-weight: 700; }
.viewers:before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #32bc78; }
.room-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: 20px; }
.watch-column { min-width: 0; }
.stage-shell { position: relative; isolation: isolate; }
.ambient-light { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .82; transition: opacity 240ms cubic-bezier(0.23, 1, 0.32, 1); }
.stage-shell.is-paused .ambient-light { opacity: .55; }
.ambient-layer { position: absolute; inset: 0; border-radius: 24px; background: linear-gradient(90deg, #92734b, #ac8656); background-position: center; background-size: cover; filter: blur(24px); transform: translateY(8px) scale(1.12); opacity: 0; transition: opacity 240ms cubic-bezier(0.23, 1, 0.32, 1); }
.ambient-layer.is-active { opacity: 1; }
.stage { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #171717; border-radius: 20px; }
.stage-shell.has-video .stage { border-radius: 20px 20px 0 0; }
.empty-stage { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; color: #fff; text-align: center; }
.empty-play { display: grid; place-items: center; width: 64px; height: 64px; padding-left: 4px; margin-bottom: 20px; background: #303030; border-radius: 19px; color: #ffdc55; font-size: 22px; }
.empty-stage h2 { margin: 0 0 7px; font-size: 21px; letter-spacing: -.04em; }
.empty-stage p { margin: 0; color: #aaa; font-size: 13px; }
.player-host, .player-host iframe, .player-host video { width: 100%; height: 100%; border: 0; }
.player-host video { background: #000; }
.playback-controls { position: relative; z-index: 1; display: flex; align-items: center; gap: 11px; min-height: 62px; padding: 9px 13px; border-radius: 0 0 17px 17px; background: #1b1c1e; color: #fff; }
.control-icon { display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: #f2f2f2; font-size: 20px; line-height: 1; }
.control-icon svg { width: 20px; height: 20px; }
.sound-slash { display: none; }
.control-icon.is-muted .sound-waves { display: none; }
.control-icon.is-muted .sound-slash { display: block; }
.control-play { background: #ffdc55; color: #171717; font-size: 14px; }
.control-icon:hover:not(:disabled) { background: #36383b; }
.control-play:hover:not(:disabled) { background: #f5ca3d; }
.control-icon:disabled, .progress-wrap input:disabled { opacity: .45; cursor: default; }
.progress-wrap { display: flex; flex: 1; align-items: center; gap: 11px; min-width: 0; }
.progress-wrap input { flex: 1; min-width: 0; height: 22px; margin: 0; appearance: none; background: transparent; cursor: pointer; }
.progress-wrap input::-webkit-slider-runnable-track { height: 4px; border-radius: 10px; background: linear-gradient(90deg, #ffdc55 var(--progress, 0%), #62656a var(--progress, 0%)); }
.progress-wrap input::-moz-range-track { height: 4px; border-radius: 10px; background: #62656a; }
.progress-wrap input::-moz-range-progress { height: 4px; border-radius: 10px; background: #ffdc55; }
.progress-wrap input::-webkit-slider-thumb { width: 13px; height: 13px; margin-top: -4.5px; border: 0; border-radius: 50%; appearance: none; background: #ffdc55; }
.progress-wrap input::-moz-range-thumb { width: 13px; height: 13px; border: 0; border-radius: 50%; background: #ffdc55; }
.time-label { flex: 0 0 auto; color: #bfc0c2; font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stage-shell:fullscreen { display: flex; flex-direction: column; justify-content: center; padding: 14px; background: #0b0b0c; }
.stage-shell:fullscreen .stage { width: 100%; max-height: calc(100vh - 85px); aspect-ratio: 16 / 9; }
.stage-shell:fullscreen .playback-controls { width: 100%; }
.share-button { display: flex; align-items: center; width: 100%; min-height: 62px; gap: 14px; margin-top: 14px; padding: 11px 17px; background: #ffdc55; border: 0; border-radius: 17px; text-align: left; font-size: 15px; font-weight: 800; }
.share-button:hover { background: #ffcf3d; }
.share-icon { display: grid; place-items: center; width: 33px; height: 33px; background: #ffffff78; border-radius: 10px; font-size: 20px; font-weight: 400; }
.share-chevron { margin-left: auto; font-size: 27px; font-weight: 400; line-height: 1; }
.source-card, .chat-card, .voice-card { background: #fff; border-radius: 19px; }
.source-card { padding: 20px; margin-top: 14px; }
.settings-card { margin-top: 14px; padding: 0 20px; }
.settings-card summary { display: flex; justify-content: space-between; padding: 18px 0; cursor: pointer; font-size: 14px; font-weight: 700; list-style: none; }
.settings-card summary::-webkit-details-marker { display: none; }
.settings-form { padding-bottom: 20px; }
.settings-status, .search-status { min-height: 16px; margin: 10px 0 0; color: #8b6a12; font-size: 12px; }
.search-card { margin-top: 14px; padding: 20px; }
.search-results { display: grid; gap: 8px; margin-top: 12px; }
.search-result { display: flex; gap: 10px; align-items: center; min-width: 0; padding: 9px; border: 1px solid #ececec; border-radius: 12px; }
.search-result img { flex: 0 0 auto; width: 90px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 7px; background: #eee; }
.search-result-copy { flex: 1; min-width: 0; }
.search-result strong { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 12px; line-height: 1.25; }
.search-result span { display: block; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #888; font-size: 11px; }
.search-result button { flex: 0 0 auto; padding: 9px; border: 0; border-radius: 9px; background: #ffdc55; color: #191919; font-size: 11px; font-weight: 700; }
.card-header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 15px; }
.card-header h2, .chat-title h2, .voice-title h2 { margin: 0; font-size: 17px; letter-spacing: -.035em; }
.card-header span { color: #909090; font-size: 12px; }
.source-input-row { display: flex; gap: 9px; }
.source-input-row input, .chat-form input { min-width: 0; flex: 1; border: 0; background: #f3f3f3; border-radius: 12px; padding: 0 14px; color: #171717; font-size: 14px; }
.source-input-row input { height: 48px; }
.source-input-row input::placeholder, .chat-form input::placeholder { color: #989898; }
.dark-button { background: #252525; color: #fff; }
.dark-button:hover { background: #111; }
.status { min-height: 18px; margin: 10px 4px 0; color: #7d5b00; font-size: 12px; }
.side-column { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.voice-card { padding: 18px; margin-top: 14px; }
.voice-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.voice-count { color: #888; font-size: 12px; }
.voice-description { margin: 10px 0 15px; color: #7c7c7c; font-size: 12px; line-height: 1.35; }
.voice-controls { display: flex; gap: 8px; }
.voice-button { flex: 1; min-height: 42px; border: 0; border-radius: 12px; background: #232323; color: #fff; font-size: 13px; font-weight: 700; }
.voice-button.active { background: #ffdc55; color: #191919; }
.mute-button { min-width: 42px; border: 0; border-radius: 12px; background: #f1f1f1; font-size: 17px; }
.mute-button svg { width: 19px; height: 19px; vertical-align: middle; }
.mute-slash { display: none; }
.mute-button.muted { background: #ffe9e9; color: #c43b3b; }
.mute-button.muted .mute-slash { display: block; }
.voice-status { min-height: 15px; margin: 9px 0 0; color: #8a8a8a; font-size: 11px; }
.chat-card { display: flex; flex-direction: column; height: min(490px, calc((100vw - 470px) * .5625 + 40px)); min-height: 340px; overflow: hidden; }
.chat-title { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid #f1f1f1; }
.chat-live { color: #838383; font-size: 11px; }
.messages { min-height: 0; flex: 1; overflow-y: auto; padding: 17px 20px; }
.chat-empty { color: #959595; font-size: 13px; line-height: 1.4; }
.message { margin-bottom: 17px; }
.message-name { margin-bottom: 5px; color: #777; font-size: 12px; font-weight: 700; }
.message-text { font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #f1f1f1; }
.chat-form input { height: 42px; }
.chat-form button { width: 42px; border: 0; border-radius: 11px; background: #ffdc55; color: #191919; font-size: 23px; }
.room-footnote { margin: 15px 3px; color: #929292; font-size: 12px; }
:root[data-theme="dark"] { color-scheme: dark; color: #f2f2f2; background: #111214; }
[data-theme="dark"] body { background: #111214; }
[data-theme="dark"] .theme-toggle,
[data-theme="dark"] .start-card,
[data-theme="dark"] .back-link,
[data-theme="dark"] .viewers,
[data-theme="dark"] .source-card,
[data-theme="dark"] .chat-card,
[data-theme="dark"] .voice-card { background: #202124; color: #f2f2f2; box-shadow: none; }
[data-theme="dark"] .home-heading p { color: #b5b5b5; }
[data-theme="dark"] .connection,
[data-theme="dark"] .eyebrow,
[data-theme="dark"] .start-copy p,
[data-theme="dark"] .card-header span,
[data-theme="dark"] .voice-count,
[data-theme="dark"] .voice-description,
[data-theme="dark"] .voice-status,
[data-theme="dark"] .chat-live,
[data-theme="dark"] .chat-empty,
[data-theme="dark"] .message-name,
[data-theme="dark"] .room-footnote { color: #aaaeb2; }
[data-theme="dark"] .home-chips span { background: #292b2e; color: #c7c8ca; }
[data-theme="dark"] .brand-icon,
[data-theme="dark"] .start-icon,
[data-theme="dark"] .share-button { color: #191919; }
[data-theme="dark"] .source-input-row input,
[data-theme="dark"] .chat-form input,
[data-theme="dark"] .mute-button { background: #2d2f32; color: #f2f2f2; }
[data-theme="dark"] .source-input-row input::placeholder,
[data-theme="dark"] .chat-form input::placeholder { color: #a1a5a9; }
[data-theme="dark"] .dark-button,
[data-theme="dark"] .voice-button:not(.active) { background: #383a3e; color: #f2f2f2; }
[data-theme="dark"] .dark-button:hover { background: #484b50; }
[data-theme="dark"] .chat-title,
[data-theme="dark"] .chat-form { border-color: #35373b; }
[data-theme="dark"] .status { color: #e8c865; }
[data-theme="dark"] .mute-button.muted { background: #513435; color: #ff9b9b; }
[data-theme="dark"] .setup-card,
[data-theme="dark"] .directory,
[data-theme="dark"] .settings-card,
[data-theme="dark"] .search-card { background: #202124; color: #f2f2f2; }
[data-theme="dark"] .setup-card input:not([type="checkbox"]),
[data-theme="dark"] .setup-card textarea,
[data-theme="dark"] .setup-card select,
[data-theme="dark"] .settings-form input:not([type="checkbox"]),
[data-theme="dark"] .settings-form textarea,
[data-theme="dark"] .settings-form select,
[data-theme="dark"] .search-card input,
[data-theme="dark"] .directory-head button { background: #2d2f32; color: #f2f2f2; }
[data-theme="dark"] .public-room,
[data-theme="dark"] .search-result { border-color: #3a3c40; }
[data-theme="dark"] .directory-empty,
[data-theme="dark"] .public-room p,
[data-theme="dark"] .search-result span,
[data-theme="dark"] .room-description { color: #aaaeb2; }
[data-theme="dark"] .search-status,
[data-theme="dark"] .settings-status { color: #e8c865; }
@media (max-width: 900px) { .room-layout { grid-template-columns: 1fr; } .chat-card { height: 320px; min-height: 320px; } .home { padding-top: 70px; } }
@media (max-width: 600px) {
  .app-shell { padding: 0 15px 24px; }
  .app-header { height: 62px; }
  .brand { font-size: 16px; }
  .brand-icon { width: 29px; height: 29px; border-radius: 9px; }
  .connection { font-size: 11px; }
  .header-actions { gap: 7px; }
  .theme-toggle { min-width: 37px; width: 37px; height: 37px; padding: 0; }
  .theme-label { display: none; }
  .home { padding-top: 42px; }
  .home-heading h1 { font-size: 42px; }
  .home-heading p { font-size: 14px; }
  .start-card { grid-template-columns: 52px 1fr; gap: 13px; margin-top: 32px; padding: 15px; border-radius: 19px; }
  .start-icon { width: 52px; height: 52px; border-radius: 15px; font-size: 19px; }
  .start-copy h2 { font-size: 17px; }
  .start-copy p { font-size: 12px; }
  .start-card .primary-button { grid-column: 1 / -1; width: 100%; margin-top: 3px; }
  .home-chips { margin-top: 16px; }
  .setup-card, .directory, .search-card { padding: 16px; }
  .setup-grid { grid-template-columns: 1fr; gap: 0; }
  .public-room { gap: 9px; padding: 11px; }
  .search-result img { width: 72px; }
  .search-result button { padding: 8px 7px; }
  .room { padding-top: 15px; }
  .room-topline { gap: 10px; margin-bottom: 16px; }
  .back-link { width: 35px; height: 35px; }
  .room-title h1 { font-size: 21px; }
  .viewers { padding: 8px 9px; font-size: 11px; }
  .stage { border-radius: 16px; }
  .stage-shell.has-video .stage { border-radius: 16px 16px 0 0; }
  .playback-controls { gap: 6px; min-height: 54px; padding: 7px 8px; }
  .control-icon { width: 32px; height: 34px; font-size: 18px; }
  .progress-wrap { gap: 6px; }
  .time-label { font-size: 10px; }
  .empty-play { width: 54px; height: 54px; margin-bottom: 14px; }
  .empty-stage h2 { font-size: 18px; }
  .empty-stage p { font-size: 11px; }
  .share-button { min-height: 58px; }
  .source-card { padding: 16px; }
  .card-header { align-items: start; flex-direction: column; gap: 4px; }
  .source-input-row { flex-direction: column; }
  .source-input-row input { flex: none; }
  .dark-button { width: 100%; }
  .chat-card { height: 300px; min-height: 300px; }
  .room-footnote { line-height: 1.4; }
}
@media (prefers-reduced-motion: reduce) { .primary-button, .dark-button { transition: none; } .ambient-light, .ambient-layer { transition-duration: 120ms; } }
