#imposter-game-view { width: 100%; text-align: center; gap: 10px; }
#imposter-game-view .game-view-header { text-align: center; box-sizing: border-box; min-height: 148px; flex-shrink: 0; position: relative; }
#imposter-game-view .game-view-caption { padding: 0 85px; width: 100%; box-sizing: border-box; }
#imposter-game-view .game-view-caption h3 { font-size: clamp(1.5rem, 3vw, 2rem); margin: .25rem 0; }
#imposter-game-view .game-view-caption p { font-size: clamp(1.15rem, 2vw, 1.4rem); }
#imposter-game-view .game-view-timer-wrapper { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); margin: 0; }
#imposter-game-view > .skip-button, #imposter-lock-vote { width: fit-content; max-width: 100%; flex: 0 0 auto; align-self: center; margin-inline: auto; }
#imposter-game-view .imposter-header-role { position: absolute; top: 12px; left: 16px; margin: 0; }
#imposter-game-view .game-view-caption { padding-top: 24px; }
#imposter-game-view[data-mode^="WORD:"] .imposter-secret { color: #fff; }
.imposter-header-category { margin: .35rem 0 0; color: var(--highlight-primary); }
.imposter-role { display: inline-block; font-size: .8rem; font-weight: 800; padding: .2rem .55rem; margin-bottom: .35rem; border: 1px solid currentColor; border-radius: 999px; }
.imposter-role-regular { color: #68adff; }
.imposter-role-imposter { color: #ff707b; }
.imposter-role-spectator { color: var(--text-secondary); }
.imposter-secret.imposter-role-regular { color: #68adff; }
.imposter-secret.imposter-role-imposter { color: #ff707b; }
.imposter-missed-clue { font-style: italic; }
#imposter-timer-container[hidden] { display: block; visibility: hidden; }
#imposter-skip-discussion[hidden] { display: none; }
.imposter-phase-heading { margin: .5rem 0; }
#imposter-timer-container { position: relative; width: 80px; height: 80px; }
#imposter-timer-container svg { transform: rotate(-90deg); }
#imposter-clock { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 2em; font-weight: bold; color: var(--text-primary); }
.imposter-enter { animation: imposter-fade .45s ease both; }
.imposter-prompt { margin: auto; padding: clamp(2rem, 8vh, 5rem) 1rem; max-width: 680px; }
.imposter-secret { margin: 0 0 1.5rem; font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: bold; color: var(--highlight-primary); }
.imposter-objective { max-width: 680px; margin: .5rem auto; line-height: 1.6; color: var(--text-secondary); }
.imposter-prompt .imposter-objective { font-size: 1.15rem; color: var(--text-primary); }
.imposter-category { color: var(--highlight-primary); font-size: 1.25rem; }
.imposter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .75rem; margin: .25rem 0; width: 100%; align-items: stretch; flex-shrink: 0; }
.imposter-player-slot { position: relative; min-width: 0; display: flex; flex-direction: column; }
.imposter-player-slot > .imposter-player { flex: 1; }
.imposter-bubble-holder { position: absolute; top: 12px; left: 0; right: 0; height: 0; z-index: 2; pointer-events: none; }
.imposter-bubble-shell { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: max-content; max-width: 100%; z-index: 2; opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.imposter-bubble-shell::after { content: ''; position: absolute; top: 100%; left: calc(50% - 8px); border: 8px solid transparent; border-top: 10px solid var(--highlight-primary); border-bottom: 0; }
.imposter-bubble-shell.is-typing { opacity: 1; visibility: visible; }
.imposter-typing-dots { display: none; align-items: center; gap: 5px; height: 18px; padding: 2px; }
.is-typing .imposter-typing-dots { display: inline-flex; }
.imposter-typing-dots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: imposter-typing 1.1s ease-in-out infinite; }
.imposter-typing-dots i:nth-child(2) { animation-delay: .15s; }
.imposter-typing-dots i:nth-child(3) { animation-delay: .3s; }
.imposter-player { position: relative; display: flex; flex-direction: column; align-items: center; gap: .45rem; padding: .8rem .7rem; border: 2px solid var(--border-color, #444); border-radius: 16px; background: var(--bg-secondary, #24242d); color: inherit; font: inherit; min-width: 0; overflow-wrap: anywhere; transition: border-color .3s, transform .3s, opacity .3s, filter .3s; }
.imposter-player:disabled { opacity: 1; cursor: default; }
.imposter-player:not(:disabled) { cursor: pointer; }
.imposter-player:not(:disabled):hover, .imposter-player.active { border-color: var(--highlight-primary); transform: translateY(-3px); }
.imposter-player img { width: 64px; height: 64px; object-fit: contain; border-radius: 50%; border: 3px solid var(--player-color); padding: 3px; box-sizing: border-box; }
.imposter-bubble { position: relative; padding: .7rem .9rem; border-radius: 20px; background: var(--highlight-primary); color: #fff; width: 100%; max-height: var(--bubble-max-height, 240px); overflow-y: auto; overscroll-behavior: contain; box-sizing: border-box; text-align: left; overflow-wrap: anywhere; box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.imposter-clue-log { width: 100%; min-width: 0; flex-shrink: 0; text-align: left; }
#imposter-clue-list { display: flex; align-items: center; gap: .6rem; height: 76px; box-sizing: border-box; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; margin: 0; padding: .65rem .7rem; list-style: none; }
#imposter-clue-list li { flex: 0 0 auto; padding: .55rem 1rem; white-space: nowrap; line-height: 1.4; display: flex; align-items: center; gap: .4rem; border-radius: 999px; background: var(--player-color, var(--highlight-primary)); color: #fff; border: 1px solid var(--player-color, var(--highlight-primary)); font-size: 1rem; font-weight: 500; }
.imposter-form { display: flex; gap: .6rem; flex-wrap: wrap; margin: .25rem 0; align-items: center; flex-shrink: 0; }
.imposter-form[hidden] { display: none; }
.imposter-form input { flex: 1; min-width: 150px; }
#imposter-game-view .option-popout { color: #fff; }
.imposter-vote-count { animation: imposter-fade .5s both; animation-delay: var(--vote-delay); }
.imposter-selected { animation: imposter-highlight .5s both; animation-delay: var(--winner-delay); }
.imposter-found { border-color: var(--error-color, #ef6470); }
@keyframes imposter-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes imposter-highlight { to { box-shadow: 0 0 0 3px var(--highlight-primary); transform: translateY(-4px); } }
@keyframes imposter-typing { 0%, 70%, 100% { opacity: .35; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-3px); } }
@media (max-width: 600px) { #imposter-timer-container { width: 48px; height: 48px; } #imposter-clock { font-size: 1.5em; } #imposter-game-view .game-view-caption { width: 100%; padding-right: 35px; box-sizing: border-box; } .imposter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { #imposter-game-view *, .imposter-enter { animation-duration: .01ms; animation-delay: 0s; transition: none; } }

.imposter-card-timer { position: absolute; top: 8px; left: 8px; display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid #777985; border-radius: 50%; color: #b7b8c1; font-size: .7rem; font-variant-numeric: tabular-nums; }
.imposter-card-timer[hidden] { display: none; }
#imposter-game-view .skip-button[hidden] { display: none; }
.imposter-reveal-screen { width: 100%; min-width: 0; min-height: 0; overflow-x: hidden; overflow-y: auto; box-sizing: border-box; }
#imposter-game-view[data-mode^="VOTE_REVEAL:"] .imposter-reveal-screen {
    scrollbar-gutter: stable;
    scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-track-color);
    transition: scrollbar-color .35s ease;
}
#imposter-game-view[data-mode^="VOTE_REVEAL:"] .imposter-reveal-screen.is-revealing {
    scrollbar-color: transparent transparent;
}
#imposter-game-view[data-mode^="VOTE_REVEAL:"] .imposter-reveal-screen.is-revealing::-webkit-scrollbar-thumb,
#imposter-game-view[data-mode^="VOTE_REVEAL:"] .imposter-reveal-screen.is-revealing::-webkit-scrollbar-track {
    background: transparent;
    border-color: transparent;
}
#imposter-game-view[data-mode^="IMPOSTER_REVEAL:"] .imposter-reveal-screen {
    width: min(100%, 600px);
    align-self: center;
    margin-inline: auto;
    flex: 1 1 0;
    display: grid;
    grid-auto-rows: minmax(0, 1fr);
    min-width: 0;
    overflow: hidden;
}
#imposter-game-view[data-mode^="IMPOSTER_REVEAL:"] .imposter-identity-card {
    min-height: 0;
    min-width: 0;
    padding: 10px clamp(0px, 2vw, 24px);
    justify-content: flex-start;
    box-sizing: border-box;
}
#imposter-game-view[data-mode^="IMPOSTER_REVEAL:"] .imposter-revealed-player { flex: 0 0 auto; }
#imposter-game-view[data-mode^="IMPOSTER_REVEAL:"] .imposter-correct-voters {
    min-height: 0;
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
    overscroll-behavior-y: contain;
    padding: 4px;
    box-sizing: border-box;
}
#imposter-game-view[data-mode^="IMPOSTER_REVEAL:"] .imposter-correct-voters.is-revealing {
    overflow-y: hidden;
}
#imposter-game-view[data-mode^="IMPOSTER_REVEAL:"] .imposter-correct-voter {
    flex: 0 0 auto;
    min-width: 0;
    box-sizing: border-box;
}
#imposter-game-view[data-mode^="IMPOSTER_REVEAL:"] .imposter-correct-voter > span { min-width: 0; }
.imposter-vote-results { display: flex; flex-direction: column; gap: .75rem; padding: 8px; margin: 0; list-style: none; }
.imposter-result-card { min-width: 0; box-sizing: border-box; overflow-wrap: anywhere; display: flex; align-items: center; flex-wrap: wrap; gap: .8rem; padding: .8rem 1rem; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 14px; text-align: left; animation: imposter-fade .45s both; animation-delay: var(--reveal-delay); }
.imposter-result-card > img, .imposter-identity-card img { width: 64px; height: 64px; object-fit: contain; border: 3px solid var(--player-color); border-radius: 50%; }
.imposter-result-card > span { color: var(--text-secondary); }
.imposter-voter-icons { display: flex; flex-wrap: wrap; gap: .4rem; margin-left: auto; }
.imposter-voter-icons .player-icon-display { width: 32px; height: 32px; flex: 0 0 32px; animation: imposter-pop .6s both; animation-delay: var(--reveal-delay); }
.imposter-voter-icons img { box-sizing: border-box; width: 100%; height: 100%; object-fit: contain; border: 2px solid var(--player-color); border-radius: 50%; }
.imposter-voter-icons .player-icon-display:hover, .imposter-voter-icons .player-icon-display:focus { z-index: 11; }
.imposter-voter-icons .player-icon-display:focus .player-icon-tooltip { visibility: visible; opacity: 1; }
.imposter-identity-card { padding: 1.5rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; }
.imposter-revealed-player { display: flex; flex-direction: column; align-items: center; gap: .5rem; animation: imposter-pop .8s both; animation-delay: var(--reveal-delay); }
.imposter-revealed-player h3 { margin: 0; }
.imposter-correct-voters { display: flex; flex-direction: column; gap: .6rem; width: min(100%, 520px); text-align: left; }
.imposter-correct-voter { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 12px; overflow-wrap: anywhere; }
.imposter-guess-result { display: flex; align-items: center; justify-content: center; gap: .75rem; margin-bottom: 1rem; }
.imposter-guess-result img { width: 48px; height: 48px; object-fit: contain; border: 2px solid var(--player-color); border-radius: 50%; }
.imposter-identity-card img { width: 100px; height: 100px; }
.imposter-correct-voter img { width: 40px; height: 40px; flex: 0 0 40px; }
.imposter-word-comparison { background: var(--bg-secondary); border-radius: 14px; padding: clamp(1.5rem, 4vw, 3rem); margin: 1rem 0; }
.imposter-word-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.imposter-word-pair > div { display: flex; flex-direction: column; gap: .6rem; padding: 1rem; border: 1px solid var(--highlight-primary); border-radius: 10px; overflow-wrap: anywhere; }
.imposter-word-pair span { color: var(--text-secondary); font-size: .85rem; }
.imposter-word-pair strong { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.imposter-guess-result { padding: 1rem 0 1.5rem; font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
.imposter-word-pair .imposter-guess-box { animation: imposter-word-unveil .8s 1s both; }
.imposter-guess-verdict { animation: imposter-fade .4s 2.2s both; }
.imposter-guess-check { display: inline-block; margin-left: .5em; color: var(--success-color, #57e092); animation: imposter-pop .5s 2.2s both; }
.imposter-word-pair .imposter-guess-check { font-size: 1em; color: var(--success-color, #57e092); }
.imposter-guess-incorrect { animation: imposter-wrong .3s 2.2s both; text-decoration-color: var(--error-color, #ff707b); text-decoration-thickness: 3px; }
.imposter-correct-voter { animation: imposter-pop .55s both; animation-delay: var(--reveal-delay); }
.imposter-suspense-text { animation: imposter-suspense 3s ease both; }
#imposter-game-view .game-view-controls { padding: 15px 0; box-sizing: border-box; }
#imposter-game-view .imposter-form { width: 100%; }
.imposter-vote-results { padding-top: 35px; }
@keyframes imposter-pop { from { opacity: 0; transform: scale(1.4); } to { opacity: 1; transform: scale(1); } }
@keyframes imposter-suspense { 0% { opacity: .2; filter: blur(5px); transform: scale(.96); } 45% { opacity: 1; filter: blur(0); } 65% { opacity: .5; } 100% { opacity: 1; transform: scale(1); } }
@keyframes imposter-word-unveil { from { opacity: 0; filter: blur(12px); transform: translateY(10px); } to { opacity: 1; filter: blur(0); transform: translateY(0); } }
@keyframes imposter-wrong { to { color: var(--error-color, #ff707b); text-decoration-line: line-through; } }
.imposter-vote-check { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 24px; height: 24px; border: 2px solid var(--text-secondary); border-radius: 6px; background: transparent; color: transparent; transition: background .15s, color .15s; }
.imposter-player.vote-selected { border-color: var(--success-color); animation: none; }
.vote-selected .imposter-vote-check { border-color: var(--success-color); background: var(--success-color); color: #fff; }
.imposter-new-clue { animation: imposter-clue-glow 3.5s ease-out both; }
@keyframes imposter-clue-glow { 0%, 12% { box-shadow: 0 0 0 2px #fff, 0 0 10px 3px #fff; } 100% { box-shadow: 0 0 0 0 transparent, 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { #imposter-game-view .imposter-new-clue { animation-duration: .01ms; } }
@media (max-width: 600px) {
    #imposter-game-view .game-view-caption { padding: 24px 50px 0; }
    #imposter-game-view .game-view-timer-wrapper { right: 8px; }
}
#imposter-game-view .game-view-header { display: grid; grid-template-columns: 100px minmax(0, 1fr) 100px; align-content: center; column-gap: 12px; row-gap: 4px; }
#imposter-game-view .game-view-caption { display: contents; }
#imposter-game-view .game-view-caption h3 { grid-column: 2; grid-row: 1; text-align: center; overflow-wrap: anywhere; }
#imposter-game-view .game-view-caption p { grid-column: 2; grid-row: 2; margin: 0; text-align: center; }
#imposter-game-view .imposter-header-role { position: absolute; top: 12px; left: 16px; font-size: 1rem; padding: .3rem .7rem; }
#imposter-game-view .game-view-timer-wrapper { position: static; grid-column: 3; grid-row: 1; transform: none; justify-self: end; }
@media (max-width: 600px) { #imposter-game-view .game-view-header { grid-template-columns: 80px minmax(0, 1fr) 80px; padding-inline: 12px; gap: 4px; } }

#imposter-game-view .game-view-header.has-subtitle .game-view-timer-wrapper { grid-row: 1 / span 2; }
#imposter-game-view[data-mode^="ROLE:"] .imposter-secret { color: var(--text-primary); }
.imposter-clue-text { display: block; }
.imposter-collected-icon { color: var(--success-color, #57e092); font-size: 4rem; margin-bottom: 1rem; }

.imposter-clue-tooltip { display: flex; align-items: center; gap: .5rem; position: fixed; z-index: 10000; pointer-events: none; max-width: min(280px, calc(100vw - 32px)); overflow-wrap: anywhere; background: var(--bg-secondary); color: #fff; padding: .5rem .75rem; border-radius: 10px; box-shadow: 0 3px 12px #0005; font-weight: 600; }
.imposter-clue-tooltip::before { content: ''; position: absolute; top: -6px; left: 12px; border: 6px solid transparent; border-top: 0; border-bottom-color: var(--bg-secondary); }
.imposter-turn-progress { position: absolute; bottom: 0; left: 0; right: 0; height: 18px; overflow: hidden; border-radius: 0 0 10px 10px; background: #ffffff12; text-align: left; }
.imposter-turn-fill { height: 100%; background: var(--highlight-primary); transition: width .5s ease-out; }
.imposter-turn-count { position: absolute; left: 0; right: 0; top: 0; text-align: center; z-index: 1; color: #fff; text-shadow: 0 1px 3px #000; font-size: 12px; line-height: 18px; font-variant-numeric: tabular-nums; }
.imposter-discussion-timer { position: absolute; top: 16px; right: 16px; color: var(--text-secondary, #b7b8c1); font-size: .9rem; font-variant-numeric: tabular-nums; }
#central-waiting-message.imposter-voting-status .waiting-spinner { display: none; }
#central-waiting-message.imposter-voting-status::before { content: '\1F449'; }
.imposter-player.imposter-votable { animation: imposter-vote-pulse 1.5s ease-in-out infinite; }
@keyframes imposter-vote-pulse { 0%, 100% { border-color: #ffffff66; } 50% { border-color: #fff; box-shadow: 0 0 8px #ffffff55; } }
@media (prefers-reduced-motion: reduce) { .imposter-player.imposter-votable { animation: none; border-color: #fff; } .imposter-turn-fill { transition: none; } }

.imposter-clue-tooltip img { width: 28px; height: 28px; flex: 0 0 28px; object-fit: contain; }
.imposter-player.imposter-muted { opacity: .4; filter: grayscale(1); }
.imposter-form input.imposter-input-pulse { animation: imposter-vote-pulse 1.5s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .imposter-form input.imposter-input-pulse { animation: none; border-color: #fff; } }

.imposter-list-dialog {
    width: min(720px, calc(100vw - 32px));
    max-height: calc(100dvh - 48px);
    box-sizing: border-box;
    overflow-y: auto;
    padding: clamp(18px, 4vw, 30px);
    border: 1px solid var(--highlight-primary);
    border-radius: 16px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    box-shadow: 0 20px 80px #0008;
}
.imposter-list-dialog::backdrop { background: #100d26bb; }
.imposter-list-dialog h2 { margin: 0 0 12px; }
.imposter-list-dialog p { line-height: 1.5; }
.imposter-list-tree {
    max-height: 48dvh;
    overflow-y: auto;
    padding: 3px 6px 3px 3px;
    margin-bottom: 14px;
}
.imposter-list-folder {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 10px;
    background: var(--bg-primary);
}
.imposter-list-folder > summary { cursor: pointer; padding: 12px; overflow-wrap: anywhere; }
.imposter-list-folder > summary > span { margin-left: 8px; }
.imposter-folder-count { color: var(--text-secondary); font-size: .8rem; white-space: nowrap; }
.imposter-folder-content { padding: 0 12px 12px; }
.imposter-list-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.imposter-list-row > input { flex: 1; min-width: 0; width: 100%; box-sizing: border-box; }
.imposter-list-row > button { flex-shrink: 0; }
.imposter-list-words { margin: 12px 0 12px 14px; padding-left: 14px; border-left: 2px solid var(--highlight-primary); }
.imposter-list-empty { padding: 20px; color: var(--text-secondary); text-align: center; border: 1px dashed var(--border-color); border-radius: 10px; }
.imposter-remove-word { min-width: 36px; font-size: 1.2rem; }
@media (max-width: 480px) {
    .imposter-folder-content { padding: 0 8px 8px; }
    .imposter-list-words { margin-left: 4px; padding-left: 8px; }
    .imposter-list-row > button { padding: 8px; }
}
.imposter-list-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.imposter-list-status { font-size: .9rem; color: var(--text-secondary); }
.imposter-list-status:empty { display: none; }
.imposter-list-status.has-error { color: var(--error-color, #ff707b); }
.imposter-you-tag { font-size: .8rem; color: var(--text-secondary); }
.imposter-player-name { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: .35rem; }
.imposter-player-voting { font-size: .75rem; color: var(--text-secondary); }
.imposter-player-voting[hidden] { display: block; visibility: hidden; }
#imposter-game-view .imposter-player.vote-selected { border-color: var(--success-color); animation: none; }
.imposter-guess-area { width: min(100%, 760px); align-self: center; margin: auto 0 1.5rem; padding-top: 2rem; }
.imposter-guess-area .imposter-form { width: 100%; }
#imposter-game-view.imposter-guess-layout .imposter-grid { margin-top: 0; }
#imposter-game-view.imposter-guess-layout .imposter-bubble-holder { display: none; }
#imposter-game-view.imposter-guess-layout .imposter-clue-log { margin-bottom: auto; }
#imposter-game-view.imposter-guess-layout .imposter-player.imposter-muted { opacity: .75; }
.imposter-word-placeholder { display: inline-block; white-space: nowrap; }
@media (max-width: 600px) { .imposter-guess-area { margin-top: 1rem; padding-top: 0; margin-bottom: 1rem; } }

@media (min-width: 768px) {
    #imposter-game-view .game-view-header .game-view-timer-wrapper {
        position: absolute;
        grid-area: auto;
        top: 50%;
        right: 25px;
        margin: 0;
        transform: translateY(-50%);
    }
    /* The progress strip occupies the bottom 18px of the header. */
    #imposter-game-view .game-view-header:has(.imposter-turn-progress) .game-view-timer-wrapper { top: calc(50% - 9px); }
    #imposter-game-view .game-view-header + .imposter-grid { margin-top: 45px; }
}

/* Match the other game headers on mobile while reserving space for the role. */
@media (max-width: 767px) {
    #imposter-game-view .game-view-header {
        grid-template-columns: minmax(0, 1fr);
        min-height: 180px;
        padding: 64px 16px 28px;
        row-gap: 8px;
    }
    #imposter-game-view .game-view-caption h3,
    #imposter-game-view .game-view-caption p { grid-column: 1; }
    #imposter-game-view .game-view-timer-wrapper,
    #imposter-game-view .game-view-header.has-subtitle .game-view-timer-wrapper {
        position: absolute;
        grid-area: auto;
        top: 0;
        right: 0;
        margin: -10px;
        transform: none;
    }
    #imposter-timer-container { width: 48px; height: 48px; background: var(--bg-tertiary); border-radius: 50%; }
    #imposter-clock { font-size: 1.5em; }
    .imposter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #imposter-game-view .imposter-grid,
    #imposter-game-view.imposter-guess-layout .imposter-grid { margin-top: 20px; }
    #imposter-game-view .imposter-discussion-timer {
        position: absolute;
        top: -10px;
        right: -10px;
        max-width: calc(100% + 20px);
        box-sizing: border-box;
        padding: 4px 12px;
        border-radius: 20px;
        color: var(--bg-primary);
        background: var(--text-secondary);
        box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
        font-size: .95rem;
        font-weight: 600;
        z-index: 10;
        text-align: center;
    }
    #imposter-game-view .game-view-header:has(.imposter-discussion-timer) .imposter-header-role { top: 28px; }

    /* Mobile panels have auto height: a zero flex basis collapses the reveal.
       Reserve the entire reveal before animations start; scroll long voter lists. */
    #imposter-game-view[data-mode^="IMPOSTER_REVEAL:"] .imposter-reveal-screen {
        flex: 0 0 460px;
        height: 460px;
        grid-auto-rows: 460px;
        overflow-y: auto;
    }
    #imposter-game-view[data-mode^="IMPOSTER_REVEAL:"] .imposter-identity-card { padding: 16px 4px; }
    #imposter-game-view[data-mode^="IMPOSTER_REVEAL:"] .imposter-correct-voters { flex: 1 1 auto; }
    #imposter-game-view[data-mode^="IMPOSTER_REVEAL:"] .skip-button[hidden] { display: block; visibility: hidden; }
}

/* Scope the ring so other games cannot override its presentation. */
#imposter-timer-container svg { transform: rotate(-90deg); overflow: visible; }
#imposter-timer-container .timer-background { fill: none; stroke: rgba(255,255,255,.15); stroke-width: 8; }
#imposter-timer-container .timer-progress { fill: none; stroke: var(--warning-color, #ff9800); stroke-width: 8; stroke-linecap: round; }

#imposter-vote-skip-discussion { width: fit-content; max-width: 100%; align-self: center; margin-inline: auto; }
