/* HorrorGuess contrast repair. Loaded last; presentation only. */
html:is([data-theme="qlink-light"],[data-theme="qlink-inverted"]){
 --hg-readable-accent:#625ca1;--hg-field-border:#76708f;--hg-focus:#252177;
 --hg-placeholder:#686288;--hg-on-dark:#fff;--hg-chip-ink:#080611;--hg-chip-fill:#7771bd;
}
html[data-theme="qlink-dark"]{
 --hg-readable-accent:#a9a3e6;--hg-field-border:#8f87ad;--hg-focus:#ecebff;
 --hg-placeholder:#c6c1f0;--hg-on-dark:#fff;--hg-chip-ink:#080611;--hg-chip-fill:#7771bd;
}
/* Inversion changes luminance; use a pair verified after the filter as well. */
html[data-theme="qlink-inverted"]{--hg-chip-fill:#a199da;--hg-readable-accent:#565082}
html:is([data-theme="qlink-light"],[data-theme="qlink-dark"],[data-theme="qlink-inverted"]) :is(input:not([type=range]):not([type=checkbox]):not([type=radio]),textarea,select){border-color:var(--hg-field-border)!important}
html[data-theme^="qlink-"] :is(input,textarea)::placeholder{color:var(--hg-placeholder)!important;opacity:1!important}
html[data-theme^="qlink-"] :is(#live-still-input,.guessbar-input)::placeholder{color:#c5c8ff!important;opacity:1!important}
html[data-theme^="qlink-"] :is(#live-still-input,.guessbar-input){border-color:#a9a3e6!important}
html[data-theme^="qlink-"] :is(button,a,summary,input,textarea,select,[tabindex]):focus-visible{outline:3px solid var(--hg-focus)!important;outline-offset:3px!important}
html[data-theme^="qlink-"] :is(#live-still-input,.guessbar-input):focus-visible{outline:3px solid var(--hg-focus)!important;outline-offset:2px!important;border-color:#c5c8ff!important}
/* Fixed dark surfaces keep their appearance and own their foregrounds. */
html[data-theme^="qlink-"] :is(.lock-in-self-label,.lock-in-self-name,.lock-in-self-status,.lock-in-player-name,.lock-in-player-state,.lock-in-player-icon,.podium-place,.podium-name,.podium-tagline,.podium-points,.podium-correct,.goodnight-title,.goodnight-copy,.goodnight-count,.goodnight-closed-message,.member-feedback-card .member-profile-label){color:var(--hg-on-dark)!important}
html[data-theme^="qlink-"] :is(.lock-in-self-avatar,.lock-in-player-avatar,.podium-avatar).avatar-fallback{background:#252177!important;color:#ecebff!important;filter:none!important}
html[data-theme^="qlink-"] :is(.lock-in-self-icon,.four-corner-label,.four-corners-badge,.round-mind_melt .answer .letter,.rank.gold,.rank.bronze){background:var(--hg-chip-fill)!important;color:var(--hg-chip-ink)!important;text-shadow:none!important}
html[data-theme^="qlink-"] .four-corners-badge small{color:var(--hg-chip-ink)!important}
html[data-theme^="qlink-"] :is(.admin-mic-time,.admin-video-time){color:var(--ink)!important}
html[data-theme^="qlink-"] :is(.you-tag,#member-tagline-count,.admin-mic-note,.admin-video-note,#admin-queue-status,.admin-section-label,.admin-game-note,.admin-message-help,.admin-video-playback strong,.still-inspector-help,.remaining-standings-title,.still-inspector-timer-num.low){color:var(--hg-readable-accent)!important}
html[data-theme^="qlink-"] :is(.audio-wave-kicker,.guess-confirmation-kicker){color:var(--hg-readable-accent)!important}
html[data-theme^="qlink-"] :is(.network-home,.ql-network,.ql-network a,.ql-network span){color:#080611!important}
html[data-theme="qlink-inverted"] :is(.quantum-bar,.ql-network){background:#a199da!important}
/* The inspector badge must not depend on the current movie frame. */
html[data-theme^="qlink-"] #still-inspector-zoom{background:#252177!important;color:#fff!important;opacity:1!important;text-shadow:none!important}
html[data-theme^="qlink-"] #admin-start-confirm{--hg-focus:#fff}
html[data-theme^="qlink-"] :is(.locker-stat-value,.locker-avatar.selected){color:var(--ink)!important}
html[data-theme^="qlink-"] :is(.locker-stat-label,.locker-tracking-note,.member-note-empty,.member-message-empty,.member-note-index){color:var(--hg-readable-accent)!important}
html[data-theme^="qlink-"] :is(.member-note-title,.member-note-year){color:var(--hg-on-dark)!important}
/* Final cards participate in layout instead of overflowing a 145px container. */
html[data-theme^="qlink-"] #s-board.final-board{overflow-y:auto!important}
html[data-theme^="qlink-"] #s-board.final-board.active{display:flex!important}
html[data-theme^="qlink-"] #s-board.final-board .final-podium{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch;gap:8px;flex:0 0 auto!important;max-height:none!important;overflow:visible;padding:20px 2px 4px}
html[data-theme^="qlink-"] #s-board.final-board .podium-card{width:auto;max-width:none;min-height:0;min-width:0;padding:22px 6px 10px;justify-content:flex-start}
html[data-theme^="qlink-"] #s-board.final-board .podium-name{display:block;min-height:0;overflow:visible;white-space:normal;overflow-wrap:anywhere;-webkit-line-clamp:unset}
html[data-theme^="qlink-"] #s-board.final-board .podium-avatar{width:48px;height:48px}
html[data-theme^="qlink-"] #s-board.final-board :is(.leaderboard,.next-count,#admin-board-action,#admin-goodnight-action){flex:0 0 auto!important;max-height:none}
html[data-theme^="qlink-"] #s-board.final-board .leaderboard{overflow:visible!important;min-height:0}
/* Independent control-room pages have a fixed light palette. */
html:not([data-theme]) body:is(.admin-home-body,.member-editor,.host-body) :is(input,textarea,select){border-color:#76708f!important}
html:not([data-theme]) body:is(.admin-home-body,.member-editor,.host-body) :is(input,textarea)::placeholder{color:#605983!important;opacity:1!important}
html:not([data-theme]) body:is(.admin-home-body,.member-editor,.host-body) :is(button,a,summary,input,textarea,select,[tabindex]):focus-visible{outline:3px solid #252177!important;outline-offset:3px!important}
html:not([data-theme]) .member-editor .me-member-name{color:#302578!important}

