/* Shared party palette. All preferences are local to this browser. */
:root{--paper:#f4f1ff;--white:#fff;--ink:#252241;--muted:#636780;--line:#dfdced;--green:#6244c7;--green-dark:#4b2ca6;--green-soft:#eee9ff;--coral:#b73572;--coral-soft:#fff0f5;--surface:#fff;--surface-2:#f2effb;--aqua:#147a81;--lavender:#7553cb;--warm:#ad365c;--party-shadow:0 14px 42px #3d226c12;color-scheme:light}
html[data-theme="dark"]{--paper:#0e1024;--white:#181d37;--ink:#f1f2ff;--muted:#b7c0db;--line:#39415f;--green:#b8a8ff;--green-dark:#cfbfff;--green-soft:#282347;--coral:#ff9cbd;--coral-soft:#392238;--surface:#181d37;--surface-2:#222945;--aqua:#8cdbd7;--lavender:#c3b3ff;--warm:#ffb0c9;--party-shadow:0 18px 44px #0004;color-scheme:dark}

/* Adapt the legacy interface surfaces and text in dark mode. */
html[data-theme="dark"] .host-sidebar{background:var(--surface)}
html[data-theme="dark"] .sidebar-caption{color:var(--muted)}
html[data-theme="dark"] .host-nav{color:var(--muted)}
html[data-theme="dark"] .host-nav.active{background:var(--surface)}
html[data-theme="dark"] .host-nav:hover{background:var(--surface)}
html[data-theme="dark"] .host-url{border:1px solid var(--line);background:var(--surface)}
html[data-theme="dark"] .host-url>span{color:var(--aqua)}
html[data-theme="dark"] .host-url p{color:var(--aqua)}
html[data-theme="dark"] .logout-button{color:var(--muted)}
html[data-theme="dark"] .host-identity>span{background:var(--surface);color:var(--aqua)}
html[data-theme="dark"] .host-identity>div>small{color:var(--aqua)}
html[data-theme="dark"] .host-identity>svg{color:var(--muted)}
html[data-theme="dark"] .host-topbar{background:var(--surface)}
html[data-theme="dark"] .host-topbar>div{color:var(--muted)}
html[data-theme="dark"] .host-topbar i{color:var(--muted)}
html[data-theme="dark"] .host-topbar strong{color:var(--aqua)}
html[data-theme="dark"] .host-page-heading p{color:var(--aqua)}
html[data-theme="dark"] .online-summary{border:1px solid var(--line);color:var(--aqua);background:var(--surface)}
html[data-theme="dark"] .online-summary strong{color:var(--aqua)}
html[data-theme="dark"] .host-card-head{border-bottom:1px solid var(--line)}
html[data-theme="dark"] .host-card-head h2>svg{color:var(--aqua)}
html[data-theme="dark"] .quiet{color:var(--aqua)}
html[data-theme="dark"] .stage-button{background:var(--surface);border:1px solid var(--line);color:var(--aqua)}
html[data-theme="dark"] .stage-button:hover:not(:disabled){border-color:var(--line);background:var(--surface)}
html[data-theme="dark"] .stage-button.selected{background:var(--surface);border-color:var(--line);color:var(--aqua)}
html[data-theme="dark"] .stage-number{color:var(--aqua)}
html[data-theme="dark"] .stage-symbol{background:var(--surface);color:var(--aqua)}
html[data-theme="dark"] .selected .stage-symbol{background:var(--surface-2);color:var(--aqua)}
html[data-theme="dark"] .stage-button small{color:var(--aqua)}
html[data-theme="dark"] .stage-control-note{color:var(--aqua)}
html[data-theme="dark"] .revealed-warning{background:var(--surface);color:var(--warm);border-top:1px solid var(--line)}
html[data-theme="dark"] .host-welcome p{color:var(--aqua)}
html[data-theme="dark"] .count-badge{background:var(--surface);color:var(--aqua)}
html[data-theme="dark"] .checkin-empty>span{background:var(--surface);color:var(--aqua)}
html[data-theme="dark"] .checkin-empty p{color:var(--aqua)}
html[data-theme="dark"] .checkin-table-head{color:var(--aqua)}
html[data-theme="dark"] .checkin-row{border-bottom:1px solid var(--line)}
html[data-theme="dark"] .checkin-name small{color:var(--aqua)}
html[data-theme="dark"] .checkin-name small.is-impostor{color:var(--warm)}
html[data-theme="dark"] .checkin-chip{border:1px solid var(--line);background:var(--surface);color:var(--muted)}
html[data-theme="dark"] .checkin-chip.done{background:var(--surface);border-color:var(--line);color:var(--aqua)}
html[data-theme="dark"] .next-arrivals{background:var(--surface);border-top:1px solid var(--line)}
html[data-theme="dark"] .next-arrivals h3{color:var(--aqua)}
html[data-theme="dark"] .next-arrivals h3 span{background:var(--surface);color:var(--aqua)}
html[data-theme="dark"] .next-arrivals strong{color:var(--aqua)}
html[data-theme="dark"] .next-arrivals small{color:var(--aqua)}
html[data-theme="dark"] .status-dot.offline{background:var(--surface-2)}
html[data-theme="dark"] .round-meters>div>span{color:var(--aqua)}
html[data-theme="dark"] .round-meters strong{color:var(--aqua)}
html[data-theme="dark"] .round-meters strong small{color:var(--muted)}
html[data-theme="dark"] .host-question-pair>div{border:1px solid var(--line);background:var(--surface)}
html[data-theme="dark"] .host-question-pair>div>span{color:var(--aqua)}
html[data-theme="dark"] .host-question-pair p{color:var(--aqua)}
html[data-theme="dark"] .host-question-pair .host-impostor-question{border-color:var(--line);background:var(--surface)}
html[data-theme="dark"] .host-question-pair .host-impostor-question>span{color:var(--warm)}
html[data-theme="dark"] .host-question-pair .host-impostor-question p{color:var(--warm)}
html[data-theme="dark"] .host-next-stage{border-top:1px solid var(--line);background:var(--surface)}
html[data-theme="dark"] .host-next-stage>span{color:var(--aqua)}
html[data-theme="dark"] .live-pill{color:var(--aqua)}
html[data-theme="dark"] .host-answer-peek{border-top:1px solid var(--line)}
html[data-theme="dark"] .host-answer-peek>.text-button{color:var(--aqua)}
html[data-theme="dark"] .host-answer-list>div{border-top:1px solid var(--line)}
html[data-theme="dark"] .host-answer-list strong{color:var(--aqua)}
html[data-theme="dark"] .host-answer-list span{color:var(--aqua)}
html[data-theme="dark"] .host-answer-list i{color:var(--muted)}
html[data-theme="dark"] .host-answer-list small{color:var(--aqua)}
html[data-theme="dark"] .setup-questions textarea{background:var(--surface)}
html[data-theme="dark"] .setup-questions>div:last-child textarea{background:var(--surface);border-color:var(--line)}
html[data-theme="dark"] .setup-questions>div:last-child label{color:var(--warm)}
html[data-theme="dark"] .setup-questions textarea::placeholder{color:var(--muted)}
html[data-theme="dark"] .setup-questions>div:last-child textarea::placeholder{color:var(--muted)}
html[data-theme="dark"] .setup-questions .field-help{color:var(--aqua)}
html[data-theme="dark"] .setup-roles{border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:var(--surface)}
html[data-theme="dark"] .setup-roles h3{color:var(--aqua)}
html[data-theme="dark"] .setup-roles p{color:var(--aqua)}
html[data-theme="dark"] .role-mode{border:1px solid var(--line);background:var(--surface)}
html[data-theme="dark"] .role-mode button{color:var(--aqua)}
html[data-theme="dark"] .role-mode .active{background:var(--surface);color:var(--aqua)}
html[data-theme="dark"] .impostor-count-label{color:var(--aqua)}
html[data-theme="dark"] .impostor-count-label select{color:var(--aqua)}
html[data-theme="dark"] .manual-hint{color:var(--aqua)}
html[data-theme="dark"] .setup-roster-head h3>span{color:var(--aqua)}
html[data-theme="dark"] .setup-player{border-top:1px solid var(--line)}
html[data-theme="dark"] .setup-player label small{color:var(--aqua)}
html[data-theme="dark"] .role-tag{border:1px solid var(--line);background:var(--surface);color:var(--aqua)}
html[data-theme="dark"] .role-tag.impostor{background:var(--surface);border-color:var(--line);color:var(--warm)}
html[data-theme="dark"] .roster-empty{color:var(--aqua)}
html[data-theme="dark"] .setup-foot{border-top:1px solid var(--line);background:var(--surface)}
html[data-theme="dark"] .setup-foot>p:not(.form-error){color:var(--aqua)}
html[data-theme="dark"] .host-footer{border-top:1px solid var(--line);color:var(--aqua)}
html[data-theme="dark"] .host-login-card>p{color:var(--aqua)}
html[data-theme="dark"] .back-to-game{color:var(--aqua)}
html[data-theme="dark"] .login-footer{color:var(--aqua)}
html[data-theme="dark"] .idea-pair{border:1px solid var(--line);background:var(--surface)}
html[data-theme="dark"] .idea-pair small{color:var(--aqua)}
html[data-theme="dark"] .idea-pair strong{color:var(--aqua)}
html[data-theme="dark"] .idea-pair>span{color:var(--warm)}
html[data-theme="dark"] .idea-pair em{color:var(--aqua)}
html[data-theme="dark"] .checkin-name strong{color:var(--aqua)}
html[data-theme="dark"] .host-page-heading p,html[data-theme="dark"] .host-welcome p{color:var(--aqua)}
html[data-theme="dark"] .visibility-options strong{color:var(--aqua)}
html[data-theme="dark"] .visibility-options small{color:var(--aqua)}
html[data-theme="dark"] .delete-player{color:var(--warm);border:1px solid var(--line)}
html[data-theme="dark"] .delete-player:hover{background:var(--surface)}
html[data-theme="dark"] .host-refusals{background:var(--surface)}
html[data-theme="dark"] .host-refusals h3{color:var(--warm)}
html[data-theme="dark"] .host-refusals strong{color:var(--warm)}
html[data-theme="dark"] .host-refusals p{color:var(--warm)}
html[data-theme="dark"] .host-round-notice{background:var(--surface);color:var(--warm)}
html[data-theme="dark"] .combo-card{background:var(--surface)}
html[data-theme="dark"] .combo-card>small{color:var(--aqua)}
html[data-theme="dark"] .combo-card>p{color:var(--aqua)}
html[data-theme="dark"] .host-leaderboard .remove-column .icon-button{color:var(--warm)}
html[data-theme="dark"] .question-browser-controls{background:var(--surface)}
html[data-theme="dark"] .bank-page-row>span{color:var(--aqua)}
html[data-theme="dark"] .bank-notice{color:var(--aqua)}
html[data-theme="dark"] .question-browser .combo-card{border-color:var(--line);background:var(--surface)}
html[data-theme="dark"] .combo-category{background:var(--surface);color:var(--aqua)}
html[data-theme="dark"] .combo-questions>p{color:var(--ink)}
html[data-theme="dark"] .combo-questions>p>b{border:1px solid var(--line);color:var(--aqua)}
html[data-theme="dark"] .combo-edit-category{color:var(--aqua)}
html[data-theme="dark"] .combo-empty>span{color:var(--aqua)}
html[data-theme="dark"] .combo-empty h3{color:var(--aqua)}
html[data-theme="dark"] .room-protection-state{color:var(--aqua)}
html[data-theme="dark"] .room-delete-zone{border-top:1px solid var(--line)}
html[data-theme="dark"] .room-unlock p{color:var(--muted)}
html[data-theme="dark"] .room-closed-message{border:1px solid var(--line);background:var(--surface);color:var(--muted)}
html[data-theme="dark"] .owned-room-locked{color:var(--muted)}
html[data-theme="dark"] .rooms-body{background:var(--surface)}
html[data-theme="dark"] .rooms-header{background:var(--surface)}
html[data-theme="dark"] .rooms-edition{color:var(--aqua)}
html[data-theme="dark"] .room-entry .big-icon{background:var(--surface);color:var(--aqua)}
html[data-theme="dark"] .room-entry>p{color:var(--aqua)}
html[data-theme="dark"] .room-entry-divider{color:var(--muted)}
html[data-theme="dark"] .room-entry-divider:before,html[data-theme="dark"] .room-entry-divider:after{background:var(--surface-2)}
html[data-theme="dark"] .room-entry .room-host-note{color:var(--aqua)}
html[data-theme="dark"] .owned-room-list>article{background:var(--surface)}
html[data-theme="dark"] .owned-room-list strong{color:var(--aqua)}
html[data-theme="dark"] .rooms-loading{color:var(--aqua)}
html[data-theme="dark"] .rooms-footer{color:var(--aqua)}
html[data-theme="dark"] .host-room-intro{color:var(--aqua)}
html[data-theme="dark"] .host-code-row .icon-button{background:var(--surface);color:var(--aqua)}
html[data-theme="dark"] .code-availability{color:var(--aqua)}
html[data-theme="dark"] .code-availability.available{color:var(--aqua)}
html[data-theme="dark"] .code-availability.unavailable{color:var(--warm)}
html[data-theme="dark"] .bank-filters{border:1px solid var(--line,var(--line));background:var(--paper,var(--surface))}
html[data-theme="dark"] .ready-page small{color:var(--muted,var(--muted))}
html[data-theme="dark"] .flow-timer{background:var(--surface);border:1px solid var(--line);color:var(--aqua)}
html[data-theme="dark"] .flow-ready-list>div{border-bottom:1px solid var(--line)}
html[data-theme="dark"] .flow-ready-list span{color:var(--aqua)}
html[data-theme="dark"] .flow-setting small{color:var(--muted,var(--muted))}
html[data-theme="dark"] .score-reset-controls{border-top:1px solid var(--line)}
html[data-theme="dark"] .round-reset-score-option{border:1px solid var(--line);background:var(--surface)}
html[data-theme="dark"] .site-admin-body{background:var(--surface)}
html[data-theme="dark"] .site-admin-header{border-bottom:1px solid var(--line)}
html[data-theme="dark"] .site-admin-header>div>span{color:var(--muted)}
html[data-theme="dark"] .site-active-pill{border:1px solid var(--line);background:var(--surface);color:var(--aqua)}
html[data-theme="dark"] .solution-card{border:1px solid var(--line)}
html[data-theme="dark"] .solution-card.solution-active{border-color:var(--line);background:var(--surface)}
html[data-theme="dark"] .solution-letter{border:1px solid var(--line);color:var(--aqua)}
html[data-theme="dark"] .solution-card-status{color:var(--muted)}
html[data-theme="dark"] .solution-active .solution-card-status{color:var(--aqua)}
html[data-theme="dark"] .solution-card-icon svg{color:var(--aqua)}
html[data-theme="dark"] .site-switch-note{color:var(--aqua)}
html[data-theme="dark"] .site-switch-progress{background:var(--surface);color:var(--aqua)}
html[data-theme="dark"] .site-admin-footer{border-top:1px solid var(--line);color:var(--muted)}
html[data-theme="dark"] .site-admin-login-note{color:var(--muted)}
html[data-theme="dark"] .site-solution-link{background:var(--surface-2);color:var(--ink)!important;border:1px solid var(--line)}
html[data-theme="dark"] .site-solution-link:hover{background:#1d604c}
html[data-theme="dark"] .site-rooms p{color:var(--muted)}
html[data-theme="dark"] .site-room-table th,html[data-theme="dark"] .site-room-table td{border-bottom:1px solid var(--line)}
html[data-theme="dark"] .site-room-table th{color:var(--muted)}
html[data-theme="dark"] #room-communication-root{background:var(--surface);border:1px solid var(--line);color:var(--aqua)}
html[data-theme="dark"] .voice-title small{color:var(--muted)}
html[data-theme="dark"] .voice-details{border-top:1px solid var(--line)}
html[data-theme="dark"] .voice-details p,html[data-theme="dark"] .voice-status{color:var(--muted)}
html[data-theme="dark"] .voice-details li>span{color:var(--muted)}
html[data-theme="dark"] .room-voice-setting{border-top:1px solid var(--line)}
html[data-theme="dark"] #voice-chat-root,html[data-theme="dark"] #room-chat-root{border-top:1px solid var(--line)}
html[data-theme="dark"] .chat-heading small{color:var(--muted)}
html[data-theme="dark"] .chat-message{background:var(--surface)}
html[data-theme="dark"] .chat-message time{color:var(--muted)}
html[data-theme="dark"] .chat-empty{color:var(--muted)}
html[data-theme="dark"] .chat-compose-footer small{color:var(--muted)}
html[data-theme="dark"] .chat-unread{background:#244c3d;color:var(--ink)}
html[data-theme="dark"] input,html[data-theme="dark"] textarea,html[data-theme="dark"] select{border:1px solid var(--line);background:var(--surface)}
html[data-theme="dark"] input:focus,html[data-theme="dark"] textarea:focus,html[data-theme="dark"] select:focus{border-color:var(--line)}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:var(--muted)}
html[data-theme="dark"] label{color:var(--aqua)}
html[data-theme="dark"] .button.primary{color:var(--ink)}
html[data-theme="dark"] .button.secondary{background:var(--surface);color:var(--aqua);border-color:var(--line)}
html[data-theme="dark"] .button.secondary:hover:not(:disabled){background:var(--surface);border-color:var(--line)}
html[data-theme="dark"] .button.subtle{background:var(--surface)}
html[data-theme="dark"] .icon-button{color:var(--aqua)}
html[data-theme="dark"] .icon-button:hover{background:var(--surface)}
html[data-theme="dark"] .card{background:var(--surface)}
html[data-theme="dark"] .eyebrow{color:var(--aqua)}
html[data-theme="dark"] .brand-icon{color:var(--ink)}
html[data-theme="dark"] .player-header{background:var(--surface)}
html[data-theme="dark"] .edition{color:var(--muted)}
html[data-theme="dark"] .connection{color:var(--aqua)}
html[data-theme="dark"] .status-dot{background:var(--surface-2)}
html[data-theme="dark"] .connection.is-syncing{color:var(--warm)}
html[data-theme="dark"] .connection.is-syncing .status-dot{background:var(--surface-2)}
html[data-theme="dark"] .player-footer{border-top:1px solid var(--line);color:var(--aqua)}
html[data-theme="dark"] .playing-as strong{color:var(--aqua)}
html[data-theme="dark"] .join-intro h1 em{color:var(--aqua)}
html[data-theme="dark"] .join-intro>p{color:var(--aqua)}
html[data-theme="dark"] .join-steps{color:var(--aqua)}
html[data-theme="dark"] .join-steps>i{background:var(--surface-2)}
html[data-theme="dark"] .big-icon{color:var(--aqua);background:var(--surface)}
html[data-theme="dark"] .join-card>p{color:var(--aqua)}
html[data-theme="dark"] .field-help{color:var(--aqua)}
html[data-theme="dark"] .privacy-note{color:var(--aqua)!important}
html[data-theme="dark"] .waiting-page>p{color:var(--aqua)}
html[data-theme="dark"] .waiting-mask{background:var(--surface);color:var(--aqua)}
html[data-theme="dark"] .orbit-avatar{background:var(--surface-2);color:var(--lavender)}
html[data-theme="dark"] .orbit-avatar.other{background:var(--surface-2);color:var(--warm)}
html[data-theme="dark"] .waiting-pill{background:var(--surface);border:1px solid var(--line);color:var(--aqua)}
html[data-theme="dark"] .waiting-page .quiet-note{color:var(--muted)}
html[data-theme="dark"] .round-tag{color:var(--aqua)}
html[data-theme="dark"] .stage-track>span{color:var(--muted)}
html[data-theme="dark"] .stage-track i{border:1px solid var(--line)}
html[data-theme="dark"] .stage-track .current{color:var(--aqua)}
html[data-theme="dark"] .stage-track .current i{background:var(--surface-2);border-color:var(--line);color:var(--aqua)}
html[data-theme="dark"] .stage-track .passed{color:var(--aqua)}
html[data-theme="dark"] .stage-heading>p{color:var(--aqua)}
html[data-theme="dark"] .question-panel{background:var(--surface);border:1px solid var(--line)}
html[data-theme="dark"] .question-panel>span{color:var(--aqua)}
html[data-theme="dark"] .question-panel h2{color:var(--aqua)}
html[data-theme="dark"] .answer-help{color:var(--aqua)}
html[data-theme="dark"] .round-progress{color:var(--aqua)}
html[data-theme="dark"] progress{background:var(--surface-2)}
html[data-theme="dark"] progress::-webkit-progress-bar{background:var(--surface-2)}
html[data-theme="dark"] progress::-webkit-progress-value{background:var(--surface-2)}
html[data-theme="dark"] progress::-moz-progress-bar{background:var(--surface-2)}
html[data-theme="dark"] .lock-circle{background:var(--surface);color:var(--aqua)}
html[data-theme="dark"] .locked-answer p{color:var(--aqua)}
html[data-theme="dark"] .locked-label{color:var(--aqua)}
html[data-theme="dark"] .section-line h2>span{background:var(--surface);color:var(--aqua)}
html[data-theme="dark"] .section-line>span{color:var(--aqua)}
html[data-theme="dark"] .answer-tile{background:var(--surface)}
html[data-theme="dark"] .answer-tile.chosen{border-color:var(--line);background:var(--surface)}
html[data-theme="dark"] .avatar{background:var(--surface-2);color:var(--aqua)}
html[data-theme="dark"] .avatar-1{background:var(--surface-2);color:var(--muted)}
html[data-theme="dark"] .avatar-2{background:var(--surface-2);color:var(--warm)}
html[data-theme="dark"] .avatar-3{background:var(--surface-2);color:var(--warm)}
html[data-theme="dark"] .avatar-4{background:var(--surface-2);color:var(--lavender)}
html[data-theme="dark"] .avatar-5{background:var(--surface-2);color:var(--muted)}
html[data-theme="dark"] .avatar-6{background:var(--surface-2);color:var(--muted)}
html[data-theme="dark"] .avatar-7{background:var(--surface-2);color:var(--aqua)}
html[data-theme="dark"] .you-pill{background:var(--surface);color:var(--aqua)}
html[data-theme="dark"] .person-answer{color:var(--aqua)}
html[data-theme="dark"] .person-answer.no-answer{color:var(--aqua)}
html[data-theme="dark"] .voting-note{color:var(--aqua)}
html[data-theme="dark"] .vote-total{color:var(--aqua)}
html[data-theme="dark"] .vote-total>strong{color:var(--aqua)}
html[data-theme="dark"] .vote-total>small{color:var(--aqua)}
html[data-theme="dark"] .reveal-icon{background:var(--surface-2);border:1px solid var(--line);color:var(--warm)}
html[data-theme="dark"] .reveal-hero h1{color:var(--aqua)}
html[data-theme="dark"] .revealed-names>strong{color:var(--warm)}
html[data-theme="dark"] .revealed-names>strong>span{color:var(--warm)}
html[data-theme="dark"] .reveal-hero>p{color:var(--aqua)}
html[data-theme="dark"] .impostor-panel{background:var(--surface);border-color:var(--line)}
html[data-theme="dark"] .impostor-panel>span{color:var(--warm)}
html[data-theme="dark"] .impostor-panel h2{color:var(--warm)}
html[data-theme="dark"] .initial-load{color:var(--aqua)}
html[data-theme="dark"] .form-error{background:var(--surface);color:var(--warm);border:1px solid var(--line)}
html[data-theme="dark"] .modal-backdrop{background:#243a2a66}
html[data-theme="dark"] .modal{background:var(--surface)}
html[data-theme="dark"] .modal-head{border-bottom:1px solid var(--line)}
html[data-theme="dark"] .modal-body{color:var(--aqua)}
html[data-theme="dark"] .modal-footer{border-top:1px solid var(--line)}
html[data-theme="dark"] .how-to strong{color:var(--aqua)}
html[data-theme="dark"] .how-to p{color:var(--aqua)}
html[data-theme="dark"] #toast{background:var(--surface);border:1px solid var(--line);color:var(--aqua)}
html[data-theme="dark"] ::selection{background:var(--surface-2)}
html[data-theme="dark"] /* Supporting copy remains legible on handheld screens. */
.subtitle,html[data-theme="dark"] .stage-heading>p,html[data-theme="dark"] .waiting-page>p,html[data-theme="dark"] .join-intro>p{color:var(--aqua)}
html[data-theme="dark"] .question-panel.impostor-panel>span{color:var(--warm)}
html[data-theme="dark"] .decline-button{color:var(--warm)}
html[data-theme="dark"] .countdown-banner{border:1px solid var(--line);background:var(--surface);color:var(--aqua)}
html[data-theme="dark"] .countdown-banner>small{color:var(--aqua)}
html[data-theme="dark"] .answer-row{background:var(--surface)}
html[data-theme="dark"] .answer-row.chosen{border-color:var(--line);background:var(--surface)}
html[data-theme="dark"] .answer-row.your-tile{border-left:3px solid var(--line)}
html[data-theme="dark"] .answer-row .voter-icon{color:var(--aqua);border:1px solid var(--line)}
html[data-theme="dark"] .answer-row-text{color:var(--ink)}
html[data-theme="dark"] .answer-row-text.no-answer{color:var(--muted)}
html[data-theme="dark"] .reveal-ready-bar{border:1px solid var(--line);background:var(--surface)}
html[data-theme="dark"] .reveal-ready-bar strong{color:var(--muted)}
html[data-theme="dark"] .reveal-ready-bar>div>span{color:var(--aqua)}
html[data-theme="dark"] .round-end-banner{border:1px solid var(--line);color:var(--warm)}
html[data-theme="dark"] .scores-table th,html[data-theme="dark"] .scores-table td{border-bottom:1px solid var(--line)}
html[data-theme="dark"] .scores-table thead th{color:var(--muted);background:var(--surface)}
html[data-theme="dark"] .scores-table th:first-child,html[data-theme="dark"] .scores-table td:first-child{color:var(--aqua)}
html[data-theme="dark"] .scores-table td:last-child{color:var(--aqua)}
html[data-theme="dark"] .scores-table tbody th small{color:var(--warm)}
html[data-theme="dark"] .scores-table .your-score{background:var(--surface)}
html[data-theme="dark"] .points-negative{color:var(--warm)}
html[data-theme="dark"] .button.danger{background:#a24b3e;color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] .leave-game-button{color:var(--warm)}
html[data-theme="dark"] .compact-reveal-hero h1{color:var(--muted)}
html[data-theme="dark"] .p-round-line nav>span{color:var(--muted)}
html[data-theme="dark"] .p-round-line nav .passed{color:var(--muted)}
html[data-theme="dark"] .p-checkin-panel li{border-bottom:1px solid var(--line)}
html[data-theme="dark"] .p-checkin-status{color:var(--muted)}
html[data-theme="dark"] .p-remove{border:1px solid var(--line);color:var(--muted)}
html[data-theme="dark"] .p-remove:hover:not(:disabled){background:#496350;color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] .p-question{background:var(--surface-2);border:1px solid var(--line);color:var(--aqua)}
html[data-theme="dark"] .p-question>span{color:var(--aqua)}
html[data-theme="dark"] .p-voters{border:1px solid var(--line)}
html[data-theme="dark"] .p-voters:hover{background:#496350;color:var(--ink)}
html[data-theme="dark"] .presentation-body .countdown-banner{background:#2e4e37;border-color:var(--line)}
html[data-theme="dark"] .presentation-body .countdown-banner>small{color:var(--aqua)}
html[data-theme="dark"] .p-question-pair .p-question:last-child{background:var(--surface-2);border-color:var(--line);color:var(--warm)}
html[data-theme="dark"] .p-question-pair .p-question:last-child>span{color:var(--warm)}
html[data-theme="dark"] .p-score-card .scores-table thead th{background:#1a342c}
html[data-theme="dark"] .p-score-card .scores-table .points-negative{color:var(--warm)}
html[data-theme="dark"] .p-score-card .scores-table .icon-button{border:1px solid var(--line)}
html[data-theme="dark"] .p-score-card .scores-table .icon-button:hover{background:#496350;color:var(--ink)}
html[data-theme="dark"] .p-footer{background:#142d27f5}
html[data-theme="dark"] .p-footer p{color:var(--warm)}
html[data-theme="dark"] .p-next{color:var(--ink)}
html[data-theme="dark"] .p-next:hover:not(:disabled){background:var(--surface-2)}
html[data-theme="dark"] .p-voting-layout .p-checkin-panel li:last-child{border-bottom:1px solid var(--line)}
html[data-theme="dark"] .room-bar-code>span{color:var(--aqua)}
html[data-theme="dark"] .room-bar-code>strong{color:var(--aqua)}
html[data-theme="dark"] .word-private{background:var(--surface);border:1px solid var(--line)}
html[data-theme="dark"] .word-private p{color:var(--muted)}
html[data-theme="dark"] .word-private.is-impostor{background:var(--surface);border-color:var(--line)}
html[data-theme="dark"] .word-turn{border:1px solid var(--line);background:var(--surface)}
html[data-theme="dark"] .word-turn.is-yours{border:2px solid var(--line);background:var(--surface)}
html[data-theme="dark"] .word-turn>p{color:var(--muted)}
html[data-theme="dark"] .word-timer{background:var(--surface)}
html[data-theme="dark"] .word-timer-urgent{background:var(--surface);color:var(--warm)}
html[data-theme="dark"] .word-no-timer{color:var(--muted)}
html[data-theme="dark"] .word-clues li{border-top:1px solid var(--line)}
html[data-theme="dark"] .word-clues li:before{color:var(--muted)}
html[data-theme="dark"] .word-clues li>span{color:var(--aqua)}
html[data-theme="dark"] .word-clues li>.word-skipped{color:var(--muted)}
html[data-theme="dark"] .word-empty{color:var(--muted)}
html[data-theme="dark"] .word-order summary{color:var(--muted)}
html[data-theme="dark"] .word-order small{color:var(--muted)}
html[data-theme="dark"] .word-order .word-current{background:var(--surface);color:var(--aqua)}
html[data-theme="dark"] .word-bank-row{border:1px solid var(--line)}
html[data-theme="dark"] .word-bank-row small{color:var(--muted)}
html[data-theme="dark"] .word-bank-count{color:var(--muted)}
html[data-theme="dark"] .presentation-main .word-clues{background:var(--surface)}
html[data-theme="dark"] .solution-c-label{color:var(--muted)}
html[data-theme="dark"] .word-admin-body .checkin-person{border-bottom:1px solid var(--line)}
html[data-theme="dark"] .word-admin-body .checkin-person small{color:var(--muted)}
html[data-theme="dark"] .word-admin-body .host-login p{color:var(--muted)}
html[data-theme="dark"] .word-admin-body .current-round>.word-clues{border:1px solid var(--line)}
html[data-theme="dark"] .presentation-main .word-turn,html[data-theme="dark"] .presentation-main .word-clues{color:var(--aqua)}
html[data-theme="dark"] .presentation-main .word-turn h2,html[data-theme="dark"] .presentation-main .word-clues h2,html[data-theme="dark"] .presentation-main .word-clues strong{color:var(--aqua)}
html[data-theme="dark"] .presentation-main .word-order summary{color:var(--muted)}
html[data-theme="dark"] .presentation-main .word-order li.word-current{color:var(--aqua)}
html[data-theme="dark"] .presentation-main .word-order small{color:var(--muted)}
html[data-theme="dark"] .presentation-main .word-order li.word-current small{color:var(--aqua)}
html[data-theme="dark"] .mixed-host-play{background:var(--surface);border:1px solid var(--line)}
html[data-theme="dark"] .mixed-host-play small{color:var(--muted)}
html[data-theme="dark"] .mixed-bank-note{color:var(--muted)}
html[data-theme="dark"] .mixed-private-note{background:var(--surface)}
html[data-theme="dark"] .mixed-private-note p{color:var(--muted)}
/* Party styling */
html[data-theme] body{background:radial-gradient(ellipse at 5% 5%,#cdbbff55,transparent 42%),radial-gradient(ellipse at 98% 20%,#ffcfdf66,transparent 40%),radial-gradient(ellipse at 50% 100%,#b8f0e944,transparent 46%),var(--paper);background-attachment:fixed;color:var(--ink)}
html[data-theme="dark"] body{background:radial-gradient(ellipse at 5% 5%,#7038b933,transparent 45%),radial-gradient(ellipse at 98% 20%,#cc397222,transparent 40%),radial-gradient(ellipse at 50% 100%,#236c8e22,transparent 46%),var(--paper)}
html[data-theme] :is(.card,.host-checkin,.word-turn,.word-clues,.score-card,.p-score-card,.p-answer,.answer-row,.join-card,.room-access){background:var(--surface);border-color:var(--line);box-shadow:var(--party-shadow);border-radius:20px}
html[data-theme] :is(.host-topbar,.player-header,.p-topbar){background:var(--surface);border-color:var(--line)}
html[data-theme] :is(.stage-heading h1,.host-page-heading h1,.site-admin-heading h1,.join-intro h1){font-weight:760;letter-spacing:-1.3px;color:var(--ink)}
html[data-theme] .brand-icon{background:linear-gradient(135deg,#6751da,#b33178);border-radius:12px;box-shadow:0 4px 12px #7848ba30;color:white}
html[data-theme] .brand-dot{color:var(--green)}
html[data-theme] .button{border-radius:11px;min-height:44px;font-weight:650;transition:transform .15s,box-shadow .15s,background .15s}
html[data-theme] .button.primary,html[data-theme] .p-next{background:linear-gradient(115deg,#6549cc,#b33178);border-color:transparent;color:#fff;box-shadow:0 5px 14px #7c3dbd25}
html[data-theme] .button.primary:hover:not(:disabled),html[data-theme] .p-next:hover:not(:disabled){background:linear-gradient(115deg,#5334b3,#97275f);transform:translateY(-1px);box-shadow:0 7px 20px #7c3dbd38}
html[data-theme] .button.secondary{background:var(--surface);border-color:var(--line);color:var(--green)}
html[data-theme] .button.secondary:hover:not(:disabled){background:var(--green-soft);border-color:var(--green)}
html[data-theme] :is(.text-button,.icon-button){color:var(--green)}
html[data-theme] :is(input,textarea,select){background:var(--surface);border-color:var(--line);color:var(--ink);border-radius:10px;accent-color:#7553cb}
html[data-theme] :is(input,textarea,select):focus{border-color:var(--green);box-shadow:0 0 0 3px #9766d528}
html[data-theme] :is(.field-help,.quiet-note,.eyebrow,.stage-heading>p,.site-admin-heading>p,.join-card>p){color:var(--muted)}
html[data-theme] :is(.big-icon,.waiting-mask,.solution-letter){background:linear-gradient(145deg,var(--green-soft),var(--coral-soft));color:var(--green);border-color:var(--line)}
html[data-theme] .waiting-mask{box-shadow:0 9px 28px #8955c523}
html[data-theme] :is(.question-panel,.mixed-host-play,.locked-answer,.host-question-pair,.word-private,.p-question,.mafia-host-note){background:linear-gradient(130deg,var(--green-soft),var(--surface));border-color:var(--line);color:var(--ink)}
html[data-theme] :is(.question-panel h2,.question-panel p,.word-private h2,.word-private p,.host-question-pair p,.host-question-pair span,.p-question h2){color:var(--ink)}
html[data-theme] .word-private.is-impostor{background:linear-gradient(125deg,var(--coral-soft),var(--surface));border-color:var(--coral)}
html[data-theme] .answer-row.chosen{background:linear-gradient(110deg,var(--green-soft),var(--surface));border-color:var(--green);box-shadow:0 0 0 1px var(--green)}
html[data-theme] .avatar-0{background:linear-gradient(135deg,#f1c2dd,#d4bfff);color:#40265e}
html[data-theme] .avatar-1{background:linear-gradient(135deg,#a8e8de,#b6dcff);color:#174b63}
html[data-theme] .avatar-2{background:linear-gradient(135deg,#ffd3a1,#ffb6c9);color:#713745}
html[data-theme] .avatar-3{background:linear-gradient(135deg,#c1ccff,#dcbaff);color:#3b3378}
html[data-theme] .avatar-4{background:linear-gradient(135deg,#f4d69a,#cde4b2);color:#4c542c}
html[data-theme] .avatar-5{background:linear-gradient(135deg,#b9e7ff,#cabfff);color:#33426a}
html[data-theme] .avatar-6{background:linear-gradient(135deg,#fac2e3,#ffc6aa);color:#763a56}
html[data-theme] .avatar-7{background:linear-gradient(135deg,#baded1,#d2d0f5);color:#345e5d}
html[data-theme] :is(.flow-timer,.ready-page){background:linear-gradient(125deg,var(--green-soft),var(--surface));border-color:var(--line);color:var(--ink)}
html[data-theme] .flow-timer strong{color:var(--green)}
html[data-theme] :is(.stage-track .current,.stage-track .current i){color:var(--green);border-color:var(--green);background:var(--green-soft)}
html[data-theme] :is(.role-mode button.active,.mixed-type .button[aria-pressed=true]){background:linear-gradient(120deg,#6549cc,#953d9e);color:#fff;border-color:transparent}
html[data-theme] .solution-card:nth-child(2n){border-top:3px solid #d967a4}
html[data-theme] .solution-card:nth-child(2n+1){border-top:3px solid #8071df}
html[data-theme] .solution-card.solution-active{background:linear-gradient(135deg,var(--green-soft),var(--surface));border-color:var(--green)}
html[data-theme] .solution-card h2{color:var(--ink)}
html[data-theme] :is(.modal,.modal-panel,.modal-dialog,.modal-card){background:var(--surface);color:var(--ink);border-color:var(--line);border-radius:20px;box-shadow:0 28px 90px #100b354d}
html[data-theme] :is(.modal-header,.modal-footer){background:var(--surface);border-color:var(--line)}
html[data-theme] #room-communication-root{background:var(--surface);border-color:var(--line);color:var(--ink);border-radius:16px;box-shadow:0 10px 40px #3f267526}
html[data-theme] .chat-message{background:linear-gradient(115deg,var(--green-soft),var(--surface-2))}
html[data-theme] :is(.chat-message p,.chat-message strong,.voice-title span,.voice-details strong){color:var(--ink)}
html[data-theme] :is(.chat-heading small,.chat-message time,.voice-status,.voice-details p,.voice-title small,.chat-compose-footer small){color:var(--muted)}
html[data-theme] .button.danger{background:var(--coral-soft);color:var(--warm);border-color:var(--coral)}
.mafia-host-note{padding:20px 24px;margin:16px 0;border-block:1px solid var(--line)}
.mafia-host-note strong{display:flex;gap:8px;align-items:center}.mafia-host-note p{font-size:13px;line-height:1.7;color:var(--muted);margin-top:8px}
.mafia-role-card{position:relative;overflow:hidden;text-align:center;padding:30px 20px;border-radius:24px;margin:0 0 25px;color:#fff;border:1px solid #ffffff30;box-shadow:0 16px 40px #55266c30}
.mafia-role-card:before{content:"";position:absolute;inset:-50% -30%;background:radial-gradient(circle at 80% 30%,#ffffff1f,transparent 36%);pointer-events:none}
.mafia-team{background:linear-gradient(130deg,#882b6b,#492e7c)}.civilian-team{background:linear-gradient(130deg,#13647e,#3d408e)}
.mafia-role-card .eyebrow{color:#f4eaff!important;margin:10px 0}.mafia-role-card h2{font-size:clamp(34px,8vw,48px);letter-spacing:-1px;line-height:1.1;color:#fff}
.mafia-role-card p{font-size:14px;line-height:1.7;color:#fff;margin-top:14px}.mafia-role-card small{display:flex;justify-content:center;gap:6px;align-items:center;color:#eee8ff;margin-top:20px;font-size:11px}
.mafia-role-icon{display:inline-grid;place-items:center;width:62px;height:62px;border-radius:20px;background:#ffffff18;color:inherit}.mafia-role-icon svg{width:34px;height:34px}
.mafia-reveal{text-align:center;padding:32px;margin-bottom:22px}.mafia-reveal .mafia-role-icon{background:var(--coral-soft);color:var(--coral)}.mafia-reveal .revealed-names{margin:20px 0}
.mafia-public-heading{text-align:center;margin:28px 0}.mafia-public-heading h1{font-size:clamp(32px,5vw,64px);line-height:1.2}.mafia-public-heading p{margin:15px auto;max-width:700px;font-size:18px;color:var(--muted)}
.mafia-public-roster{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:15px}.mafia-public-person{padding:22px;background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:var(--party-shadow);display:flex;justify-content:space-between;gap:10px}.mafia-public-person span{color:var(--muted)}
.appearance-control{position:relative;display:inline-flex;align-items:center;z-index:90;flex-shrink:0;font-family:var(--sans,system-ui)}
.appearance-trigger{display:flex;align-items:center;justify-content:center;gap:7px;border:1px solid var(--line);border-radius:99px;min-height:44px;padding:8px 12px;background:var(--surface);color:var(--green);font-size:11px;font-weight:600;box-shadow:0 3px 9px #34276b0a}
.appearance-trigger svg{width:18px;height:18px;pointer-events:none}
.appearance-floating{position:fixed;left:16px;bottom:16px}
@media(max-width:600px){html[data-theme] .card{border-radius:16px}.appearance-trigger{width:44px;min-height:44px;padding:9px}.appearance-trigger>span{display:none}.header-right{gap:8px}.heading-actions{flex-wrap:wrap;gap:10px}.mafia-role-card{padding:26px 18px}.mafia-host-note{padding:17px}.mafia-public-roster{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){html[data-theme] .button{transition:none}html[data-theme] .button.primary:hover:not(:disabled){transform:none}}
html[data-theme] .status-dot{background:#24bca5;box-shadow:0 0 0 3px #24bca517}html[data-theme] .status-dot.offline{background:var(--muted);box-shadow:none}html[data-theme] .connection.is-syncing .status-dot{background:#e9ab54}
html[data-theme] .site-solution-link{background:linear-gradient(115deg,#6549cc,#b33178);border-color:transparent}
