/* /onboarding.css */
/* ==================== */
/* Onboarding Module    */
/* Shared carousel for  */
/* client-only games    */
/* ==================== */

:root {
    --onboarding-accent: var(--accent-pink, #ff3b6f);
    --onboarding-accent-dark: var(--accent-pink-dark, #cc2f59);
    --onboarding-shadow: rgba(255, 59, 111, 0.3);
    --onboarding-shadow-hover: rgba(255, 59, 111, 0.4);
}

#onboarding-screen {
    position: relative;
    height: 100vh;
    height: var(--app-height, 100dvh);
    overflow: hidden;
}

#onboarding-screen > .btn-back {
    z-index: 30;
    pointer-events: auto;
    touch-action: manipulation;
}

.onboarding-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: flex-start;
    align-items: center;
    padding-top: 40px;
}

.onboarding-slides {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 5vh;
    width: 100%;
    position: relative;
}

.onboarding-slide {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
    animation: fadeIn 0.4s ease;
    user-select: none;
    -webkit-user-select: none;
}

.onboarding-slide.active {
    display: flex;
}

/* Short or landscape screens: centre the active slide in the space above the dots.
   Auto margins fall back to 0 when the slide is taller than that space, so it never runs off the top. */
.onboarding-slides > .onboarding-slide.active {
    margin-top: auto;
    margin-bottom: auto;
}

/* Portrait screens: one geometry for every game.
   Buttons and dots sit at the same distance from the bottom, the title always starts at the
   middle of the screen, and the art fills the zone above it, anchored to its bottom.
   Games with their own half-screen art layout keep their slides but share the bottom rows. */
@media (min-height: 610px) and (max-aspect-ratio: 4/5) {
    #onboarding-screen.screen {
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    #onboarding-screen.screen .onboarding-container {
        padding-bottom: 0;
        gap: 0;
    }

    #onboarding-screen.screen :is(.onboarding-dots, .ww-pagination-row, .decoder-pagination-row) {
        height: 10px;
        margin: 0 0 30px;
    }

    #onboarding-screen.screen .onboarding-buttons {
        height: 56px;
        margin: 0 0 20px;
        align-items: stretch;
    }

    #onboarding-screen.screen .onboarding-buttons > button {
        min-height: 0;
        padding-top: 0;
        padding-bottom: 0;
    }

    #onboarding-screen.screen .onboarding-container:not(.taboo-onboarding):not(.secret-hitler-onboarding):not(.ww-ru-onboarding):not(.decoder-ru-onboarding) .onboarding-slides {
        align-items: stretch;
        padding-top: 0;
        padding-bottom: 0;
        min-height: 0;
    }

    /* Title line = screen height minus the bottom rows (116 px) minus this text zone = 50 %;
       below ~652 px the 210 px floor lifts it a little so long rule texts keep a gap above the dots. */
    #onboarding-screen {
        --onboarding-text-zone: max(210px, calc(var(--app-height, 100dvh) * 0.5 - 116px));
    }

    #onboarding-screen :is(.taboo-onboarding .onboarding-slide, .secret-hitler-onboarding .onboarding-slide, .ww-ru-onboarding .ww-page, .decoder-ru-onboarding .decoder-page) {
        grid-template-rows: minmax(0, calc(100% - var(--onboarding-text-zone))) auto 1fr;
    }

    #onboarding-screen :is(.taboo-onboarding, .secret-hitler-onboarding, .ww-ru-onboarding, .decoder-ru-onboarding) .slide-title {
        margin-top: 0;
    }

    #onboarding-screen .onboarding-container:not(.taboo-onboarding):not(.secret-hitler-onboarding):not(.ww-ru-onboarding):not(.decoder-ru-onboarding) .onboarding-slides > .onboarding-slide.active {
        display: grid;
        row-gap: 0;
        grid-template-rows: minmax(0, calc(100% - var(--onboarding-text-zone))) auto 1fr;
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        align-content: stretch;
        margin-top: 0;
        margin-bottom: 0;
        padding-top: 0;
        padding-bottom: 0;
    }

    #onboarding-screen .onboarding-container:not(.taboo-onboarding):not(.secret-hitler-onboarding):not(.ww-ru-onboarding):not(.decoder-ru-onboarding) .onboarding-slide.active > :first-child {
        align-self: end;
    }

    /* Same breathing room between the art and the title in every game. */
    #onboarding-screen.screen :is(.onboarding-slide, .ww-page, .decoder-page) > :is(.slide-icon, .rule-remotion-stage, .taboo-art, .sh-art, .ww-art, .decoder-art) {
        margin-bottom: var(--onboarding-art-gap, 32px);
    }

    #onboarding-screen .onboarding-container:not(.taboo-onboarding):not(.secret-hitler-onboarding):not(.ww-ru-onboarding):not(.decoder-ru-onboarding) .onboarding-slide.active > .slide-title {
        align-self: start;
        margin-top: 0;
    }

    #onboarding-screen .onboarding-container:not(.taboo-onboarding):not(.secret-hitler-onboarding):not(.ww-ru-onboarding):not(.decoder-ru-onboarding) .onboarding-slide.active > .slide-text {
        align-self: start;
        min-height: 0;
    }
}

.onboarding-slide.active.slide-in-left {
    animation: slideInLeft 0.3s ease;
}

.onboarding-slide.active.slide-in-right {
    animation: slideInRight 0.3s ease;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(60px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(-60px); }
    to   { opacity: 1; transform: translateX(0); }
}

.slide-icon {
    font-size: 80px;
    margin-bottom: 30px;
}

.slide-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.slide-text {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 300px;
}

.onboarding-dots {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bg-card);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--onboarding-accent);
    width: 30px;
    border-radius: 5px;
}

.onboarding-buttons {
    display: flex;
    gap: 16px;
    width: 100%;
    max-width: 320px;
    margin-bottom: 20px;
}

.btn-skip {
    flex: 1;
    background: transparent;
    border: 2px solid var(--text-secondary);
    color: var(--text-secondary);
    padding: 16px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

@media (hover: hover) {
    .btn-skip:hover {
        border-color: var(--text-primary);
        color: var(--text-primary);
    }
}

.btn-next-slide {
    flex: 1.5;
    background: linear-gradient(135deg, var(--onboarding-accent) 0%, var(--onboarding-accent-dark) 100%);
    border: none;
    color: white;
    padding: 16px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px var(--onboarding-shadow);
}

@media (hover: hover) {
    .btn-next-slide:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 25px var(--onboarding-shadow-hover);
    }
}

/* ==================== */
/* Rule Animation Stage */
/* ==================== */

.rule-animated-onboarding .onboarding-slides {
    align-items: stretch;
    padding-top: 0;
}

.rule-animated-onboarding .onboarding-slide {
    width: 100%;
    max-width: 360px;
    padding: 4px 4px 0;
    animation: none;
}

.rule-animated-onboarding .onboarding-slide.active.slide-in-left,
.rule-animated-onboarding .onboarding-slide.active.slide-in-right {
    animation: none;
}

.rule-remotion-stage {
    position: relative;
    width: min(100%, 320px);
    height: 244px;
    margin: 0 auto 18px;
    overflow: visible;
    background: transparent;
    box-shadow: none;
    isolation: isolate;
}

.rule-remotion-stage > div,
.rule-remotion-fill {
    width: 100%;
    height: 100%;
}

.rule-motion-layer {
    position: absolute;
    inset: 0;
}

.rule-motion-asset {
    position: absolute;
    display: block;
    height: auto;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    transform-origin: center;
    will-change: transform, opacity;
    filter: drop-shadow(0 14px 18px rgba(0,0,0,0.28));
}

.rule-motion-asset-word-card,
.rule-motion-asset-question-card,
.rule-motion-asset-canvas,
.rule-motion-asset-score {
    filter: drop-shadow(0 10px 14px rgba(0,0,0,0.22));
}

.rule-animated-onboarding .slide-title {
    font-size: 22px;
    line-height: 1.16;
    max-width: 340px;
    margin-bottom: 12px;
}

.rule-animated-onboarding .slide-text {
    max-width: 340px;
    min-height: 94px;
    line-height: 1.48;
}

@media (max-width: 380px) {
    .rule-remotion-stage {
        width: min(100%, 294px);
        height: 224px;
    }
}

@media (max-height: 700px) {
    .rule-animated-onboarding {
        padding-top: 6px;
    }

    .rule-remotion-stage {
        width: min(100%, 284px);
        height: 216px;
        margin-bottom: 12px;
    }

    .rule-animated-onboarding .slide-title {
        font-size: 19px;
        margin-bottom: 8px;
    }

    .rule-animated-onboarding .slide-text {
        min-height: 78px;
        font-size: 14px;
        line-height: 1.36;
    }
}

/* ==================== */
/* Responsive           */
/* ==================== */
@media (max-width: 480px) {
    .slide-icon {
        font-size: 60px;
        margin-bottom: 20px;
    }

    .slide-title {
        font-size: 20px;
        margin-bottom: 16px;
    }

    .slide-text {
        font-size: 14px;
        max-width: 280px;
    }

    .onboarding-buttons {
        gap: 12px;
    }

    .btn-skip,
    .btn-next-slide {
        padding: 14px;
        font-size: 14px;
    }
}

@media (max-height: 600px) {
    .onboarding-slides {
        min-height: 200px;
    }

    .slide-icon {
        font-size: 40px;
        margin-bottom: 16px;
    }

    .onboarding-container {
        gap: 16px;
    }
}

/* Question-mark glyph inside animated onboarding art.
   The host shape is a size container, so the «?» scales with the shape and always fits inside it.
   Put .onboarding-qmark-host on the shape (it needs a fixed width/height) and wrap the «?» in .onboarding-qmark.
   A host can shrink its glyph further with --onboarding-qmark-size (e.g. a star with a small inner area). */
.onboarding-qmark {
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
}

@supports (width: 1cqmin) {
    .onboarding-qmark-host {
        container-type: size;
    }

    .onboarding-qmark {
        font-size: var(--onboarding-qmark-size, 44cqmin);
    }
}

/* Scenes whose animation reaches past the 320 box use viewBox="-24 -24 368 368" and
   <img data-art-bleed>: drawn 115% wide with -7.5% margins, so the art keeps its size and
   layout box while the extra edge stays visible instead of being clipped. */
#onboarding-screen .slide-icon picture > img[data-art-bleed],
#onboarding-screen .slide-icon > img[data-art-bleed] {
    width: 115%;
    max-width: none;
    height: auto;
    max-height: none;
    margin: -7.5%;
}
/* /connection-overlay.css */
/* RoomPlay shared connection overlay («Переподключение…» / «Нет соединения») for online games.
   Markup: <div class="connection-overlay" id="connection-overlay"> with an optional
   .connection-spinner and a .connection-text / [data-connection-text] / #connection-copy element.
   Toggled by shared/client/connection-overlay.ts (adds/removes .visible).
   Link it BEFORE the game's stylesheet and *-theme.css: games tune it through the custom
   properties below or override these rules directly (theme selectors stay more specific). */

.connection-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--rp-connection-z, 100);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--rp-connection-gap, 16px);
    color: var(--rp-connection-color, inherit);
    background: var(--rp-connection-bg, rgba(13, 19, 41, 0.9));
}

.connection-overlay.visible {
    display: flex;
}

.connection-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--rp-connection-track, var(--bg-card, rgba(255, 255, 255, 0.1)));
    border-top-color: var(--rp-connection-arc, var(--accent-primary, #fff));
    border-radius: 50%;
    animation: rp-connection-spin 0.8s linear infinite;
}

@keyframes rp-connection-spin {
    to { transform: rotate(360deg); }
}

.connection-text {
    color: var(--rp-connection-text, var(--text-secondary));
    font-size: 16px;
}
/* /neverhaveiever/styles.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0d1329;
    --bg-secondary: #1a2140;
    --bg-card: #252b4a;
    --accent-purple: #9c27b0;
    --accent-purple-dark: #7b1fa2;
    --accent-pink: #e91e63;
    --accent-pink-dark: #c2185b;
    --text-primary: #ffffff;
    --text-secondary: #8892b0;
    --text-placeholder: #5a6380;
    --success: #4ade80;
    --error: #f87171;
    --onboarding-accent: var(--accent-purple);
    --onboarding-accent-dark: var(--accent-purple-dark);
    --onboarding-shadow: rgba(156, 39, 176, 0.3);
    --onboarding-shadow-hover: rgba(156, 39, 176, 0.4);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(180deg, var(--bg-primary) 0%, #0a0f1f 100%);
    min-height: 100vh;
    min-height: var(--app-height, 100dvh);
    color: var(--text-primary);
    overflow-x: hidden;
}

.app {
    max-width: 430px;
    margin: 0 auto;
    min-height: 100vh;
    min-height: var(--app-height, 100dvh);
    position: relative;
}

.screen {
    display: none;
    flex-direction: column;
    min-height: 100vh;
    min-height: var(--app-height, 100dvh);
    padding: 40px 24px;
    padding-top: calc(40px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    animation: fadeIn 0.3s ease;
}

.screen.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.title {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
}

/* Back Button */
.btn-back {
    position: absolute;
    top: calc(40px + env(safe-area-inset-top, 0px));
    left: 24px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    z-index: 10;
}

/* Game Screen */
.game-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding-top: 20px;
}

.card-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.statement-card {
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-pink) 100%);
    border-radius: 24px;
    padding: 40px 30px;
    width: 100%;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 8px 40px rgba(156, 39, 176, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

@media (hover: hover) {
    .statement-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 50px rgba(156, 39, 176, 0.5);
    }
}

.statement-card:active {
    transform: translateY(0) scale(0.98);
}

.card-header {
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.card-text {
    font-size: 26px;
    font-weight: 700;
    color: white;
    line-height: 1.4;
}

.card-hint {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 20px;
}

/* Punishment Section */
.punishment-section {
    padding: 30px 0;
}

.btn-punishment {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-pink) 0%, var(--accent-pink-dark) 100%);
    border: none;
    color: white;
    padding: 20px;
    border-radius: 30px;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(233, 30, 99, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

@media (hover: hover) {
    .btn-punishment:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 25px rgba(233, 30, 99, 0.4);
    }
}

.btn-punishment:active {
    transform: translateY(0);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 100;
    padding: 24px;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
    border-radius: 24px;
    padding: 40px 30px;
    max-width: 360px;
    width: 100%;
    text-align: center;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-pink);
    margin-bottom: 20px;
}

.modal-text {
    font-size: 20px;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 30px;
}

.btn-close-modal {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-purple-dark) 100%);
    border: none;
    color: white;
    padding: 16px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(156, 39, 176, 0.3);
}

@media (hover: hover) {
    .btn-close-modal:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 25px rgba(156, 39, 176, 0.4);
    }
}

/* Card flip animation */
@keyframes cardFlip {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(90deg); }
    100% { transform: rotateY(0deg); }
}

.statement-card.flip {
    animation: cardFlip 0.4s ease;
}

/* Bottom Section */
.bottom-section {
    padding: 20px 0;
    margin-top: auto;
}

/* Play Button */
.btn-play {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-pink) 0%, var(--accent-pink-dark) 100%);
    border: none;
    color: white;
    padding: 18px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(255, 59, 111, 0.3);
}

@media (hover: hover) {
    .btn-play:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 25px rgba(255, 59, 111, 0.4);
    }
}

.btn-play:active {
    transform: translateY(0);
}

.btn-play:disabled {
    background: var(--bg-card);
    box-shadow: none;
    cursor: not-allowed;
}

.play-icon {
    font-size: 20px;
}

/* Pack gallery — square, full-bleed illustrated covers */
#packs-screen {
    width: 100%;
    max-width: 520px;
    height: 100vh;
    height: var(--app-height, 100dvh);
    min-height: 0;
    margin: 0 auto;
    overflow: hidden;
}

#packs-screen .title {
    margin-bottom: 6px;
}

/* «Кто играет?» (one phone): the hint under the title, as in «Правда или действие». */
#players-screen .nhie-gender-hint,
#punish-pick-screen .nhie-gender-hint {
    margin: -6px 0 14px;
    color: var(--text-secondary);
    text-align: center;
    font-size: 14px;
}

#packs-screen .subtitle {
    margin-bottom: 20px;
    color: var(--text-secondary);
    text-align: center;
    font-size: 14px;
}

#packs-screen .packs-container {
    flex: 1 1 auto;
    min-height: 0;
    padding: 4px 2px 24px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

#packs-screen .bottom-section {
    position: relative;
    z-index: 10;
    flex: 0 0 auto;
    margin-top: 0;
    padding: 14px 0 0;
    background: linear-gradient(180deg, rgba(13, 19, 41, 0) 0, rgba(13, 19, 41, 0.96) 18px, #0d1329 100%);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .app {
        max-width: 100%;
    }

    .screen {
        padding: 20px 12px;
        padding-top: calc(20px + env(safe-area-inset-top, 0px));
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }

    .btn-back {
        top: 20px;
        left: 12px;
        font-size: 20px;
        padding: 6px;
    }

    .statement-card {
        min-height: 200px;
        padding: 24px 20px;
        margin: 10px;
        border-radius: 20px;
    }

    .card-header {
        font-size: 14px;
        margin-bottom: 12px;
        letter-spacing: 1px;
    }

    .card-text {
        font-size: 18px;
        line-height: 1.3;
    }

    .card-hint {
        font-size: 12px;
        margin-top: 12px;
    }

    .punishment-section {
        padding: 16px 0;
    }

    .btn-punishment {
        padding: 16px;
        border-radius: 24px;
        font-size: 16px;
        gap: 8px;
    }

    .modal-content {
        padding: 30px 24px;
        border-radius: 20px;
    }

    .modal-icon {
        font-size: 48px;
        margin-bottom: 16px;
    }

    .modal-title {
        font-size: 24px;
        margin-bottom: 16px;
    }

    .modal-text {
        font-size: 16px;
        line-height: 1.4;
        margin-bottom: 20px;
    }

    .btn-close-modal {
        padding: 14px;
        border-radius: 24px;
        font-size: 16px;
    }

}

/* Responsive Height */
@media (max-height: 700px) {
    .screen {
        padding: 20px;
    }

    .statement-card {
        min-height: 220px;
        padding: 30px 24px;
    }

    .card-text {
        font-size: 22px;
    }

    .punishment-section {
        padding: 20px 0;
    }
}

@media (max-height: 600px) {
    .statement-card {
        min-height: 180px;
        padding: 24px 20px;
    }

    .card-header {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .card-text {
        font-size: 20px;
    }
}

/* Tablet and larger */
@media (min-width: 768px) {
    .app {
        max-width: 100%;
    }

    .screen {
        padding: 50px 40px;
    }

    .statement-card {
        min-height: 320px;
        padding: 50px 40px;
    }

    .card-text {
        font-size: 30px;
    }

    .btn-punishment {
        padding: 24px;
        font-size: 22px;
    }

    .modal-content {
        padding: 50px 40px;
    }

    .modal-title {
        font-size: 32px;
    }

    .modal-text {
        font-size: 22px;
    }
}

/* Synchronized RU room mode */
.multiplayer-screen {
    position: relative;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 86% 8%, rgba(255, 59, 111, 0.16), transparent 28%),
        radial-gradient(circle at 12% 88%, rgba(156, 39, 176, 0.16), transparent 34%);
}

.multiplayer-center {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 360px;
    margin: 0 auto;
    text-align: center;
}

.multiplayer-center h1 {
    margin: 18px 0 12px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(30px, 9vw, 42px);
    font-style: italic;
    line-height: 1.05;
}

.multiplayer-center > p:not(.multiplayer-kicker) {
    color: #aeb7d8;
    font-size: 15px;
    line-height: 1.55;
}

.multiplayer-kicker {
    color: #ff769a;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.17em;
}

.multiplayer-kicker strong {
    color: #fff;
}

.waiting-orbit {
    position: relative;
    display: grid;
    place-items: center;
    width: 112px;
    height: 112px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    box-shadow: inset 0 0 0 18px rgba(255, 255, 255, 0.025), 0 24px 60px rgba(0, 0, 0, 0.34);
}

.waiting-orbit::before {
    content: '';
    position: absolute;
    inset: -5px;
    border: 3px solid transparent;
    border-top-color: #ff3b6f;
    border-right-color: #9c27b0;
    border-radius: 50%;
    animation: spin 1.8s linear infinite;
}

.waiting-orbit span {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 52px;
    font-style: italic;
    font-weight: 700;
}

.waiting-player-count {
    margin-top: 26px;
    padding: 9px 13px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    color: #cbd2ea;
    background: rgba(255, 255, 255, 0.045);
    font-size: 12px;
}

.multiplayer-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 34px;
    margin: 0 2px 14px 52px;
}

.round-pill,
.answer-progress,
.next-round-label {
    color: #cbd2ea;
    font-size: 12px;
    font-weight: 750;
}

.round-pill {
    padding: 7px 11px;
    border: 1px solid rgba(255, 101, 143, 0.36);
    border-radius: 999px;
    color: #ff88a8;
    background: rgba(233, 30, 99, 0.08);
}

.multiplayer-lives {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
    margin: 0 -24px 16px;
    padding: 0 24px 5px;
    overflow-x: auto;
    scrollbar-width: none;
}

.multiplayer-lives::-webkit-scrollbar {
    display: none;
}

.life-player {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    min-width: 118px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.045);
}

.life-player.current {
    border-color: rgba(255, 82, 130, 0.48);
    background: rgba(233, 30, 99, 0.1);
}

.life-player.disconnected {
    opacity: 0.42;
}

.life-avatar,
.choice-avatar {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 31px;
    height: 31px;
    overflow: hidden;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(145deg, #8b3fe8, #ff3b6f);
    font-size: 11px;
    font-weight: 900;
}

.life-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.life-copy {
    display: grid;
    gap: 4px;
}

.life-copy strong {
    max-width: 80px;
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.life-hearts {
    display: flex;
    gap: 2px;
}

.life-heart {
    color: rgba(255, 255, 255, 0.16);
    font-size: 11px;
    line-height: 1;
}

.life-heart.active {
    color: #ff527f;
    filter: drop-shadow(0 2px 5px rgba(255, 59, 111, 0.45));
}

.life-hearts.compact .life-heart {
    font-size: 9px;
}

#multiplayer-game-screen {
    gap: 0;
}

.split-statement-card {
    position: relative;
    display: grid;
    flex: 1 1 auto;
    grid-template-rows: minmax(92px, 0.9fr) 24px minmax(135px, 1.25fr);
    width: 100%;
    min-height: 310px;
    max-height: 470px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 30px;
    background:
        radial-gradient(circle at 12% 12%, rgba(255, 255, 255, 0.11), transparent 24%),
        linear-gradient(150deg, #9b2bd0 0%, #e91e63 58%, #ff654f 112%);
    box-shadow: 0 24px 70px rgba(132, 24, 105, 0.38);
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
    will-change: transform, opacity;
    transition: transform 260ms cubic-bezier(.2, .8, .2, 1), opacity 220ms ease, filter 220ms ease;
}

.split-statement-card.dragging {
    cursor: grabbing;
    transition: none;
}

.split-statement-card.swipe-demo {
    animation: swipe-affordance-card 1.55s cubic-bezier(.45, 0, .2, 1) 300ms both;
}

.split-statement-card.swipe-demo .swipe-stamp.happened {
    animation: swipe-affordance-happened 1.55s ease 300ms both;
}

.split-statement-card.swipe-demo .swipe-stamp.never {
    animation: swipe-affordance-never 1.55s ease 300ms both;
}

@keyframes swipe-affordance-card {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(0); }
    24% { transform: translate3d(calc(34px * var(--rp-motion-swipe-intensity, 1)), 0, 0) rotate(calc(2.6deg * var(--rp-motion-swipe-intensity, 1))); }
    43% { transform: translate3d(0, 0, 0) rotate(0); }
    69% { transform: translate3d(calc(-34px * var(--rp-motion-swipe-intensity, 1)), 0, 0) rotate(calc(-2.6deg * var(--rp-motion-swipe-intensity, 1))); }
    88% { transform: translate3d(0, 0, 0) rotate(0); }
}

@keyframes swipe-affordance-happened {
    0%, 8%, 43%, 100% { opacity: 0; }
    24%, 31% { opacity: 0.92; }
}

@keyframes swipe-affordance-never {
    0%, 49%, 88%, 100% { opacity: 0; }
    69%, 76% { opacity: 0.92; }
}

.split-statement-card.swipe-out-left,
.split-statement-card.swipe-out-right {
    opacity: 0;
}

.split-statement-card.answered {
    opacity: 0.48;
    filter: saturate(0.55);
    transform: scale(0.985);
}

.swipe-stamp {
    position: absolute;
    z-index: 4;
    top: 25px;
    padding: 8px 13px 7px;
    border: 3px solid currentColor;
    border-radius: 10px;
    opacity: 0;
    font-family: 'Trebuchet MS', 'Avenir Next', sans-serif;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
    pointer-events: none;
    filter: drop-shadow(0 4px 9px rgba(0, 0, 0, 0.25));
}

.swipe-stamp.happened {
    left: 22px;
    color: #fff4a8;
    transform: rotate(-8deg);
}

.swipe-stamp.never {
    right: 22px;
    color: #9effc0;
    transform: rotate(8deg);
}

.split-statement-card::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.13;
    background-image: radial-gradient(rgba(255, 255, 255, 0.75) 0.75px, transparent 0.75px);
    background-size: 7px 7px;
    mix-blend-mode: soft-light;
}

.split-statement-lead,
.split-statement-text {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    padding: 22px 28px;
    text-align: center;
}

.split-statement-lead {
    align-items: end;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(28px, 8.5vw, 43px);
    font-style: italic;
    font-weight: 700;
    letter-spacing: -0.035em;
}

.split-statement-text {
    align-items: start;
    font-family: 'Trebuchet MS', 'Avenir Next', sans-serif;
    font-size: clamp(27px, 8vw, 40px);
    font-weight: 900;
    line-height: 1.08;
    text-wrap: balance;
}

.split-statement-divider {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
}

.split-statement-divider span {
    width: 58px;
    height: 2px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.45);
}

.multiplayer-answer-area {
    flex: 0 0 auto;
    padding-top: 18px;
}

.multiplayer-answer-area > p {
    min-height: 20px;
    margin-bottom: 10px;
    color: #adb6d4;
    font-size: 13px;
    text-align: center;
}

.multiplayer-answer-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.multiplayer-answer-button {
    display: grid;
    place-items: center;
    min-height: 62px;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 19px;
    color: #fff;
    background: #202744;
    font: inherit;
    cursor: pointer;
    transition: transform 140ms ease, opacity 140ms ease, border-color 140ms ease;
}

.multiplayer-answer-button strong {
    font-size: 18px;
    letter-spacing: 0.01em;
}

.multiplayer-answer-button.selected {
    border-color: #ff769a;
    transform: translateY(-2px);
}

.multiplayer-answer-button.never.selected {
    border-color: #69e49a;
}

.multiplayer-answer-button:disabled:not(.selected) {
    opacity: 0.38;
}

#multiplayer-reveal-screen {
    overflow-y: auto;
}

.reveal-statement {
    margin-bottom: 15px;
    padding: 17px 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.24), rgba(233, 30, 99, 0.14));
}

.reveal-statement span,
.reveal-statement strong {
    display: block;
}

.reveal-statement span {
    margin-bottom: 4px;
    color: #ff83a4;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 18px;
    font-style: italic;
}

.reveal-statement strong {
    font-family: 'Trebuchet MS', 'Avenir Next', sans-serif;
    font-size: 22px;
    line-height: 1.14;
}

.choice-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.choice-column {
    min-width: 0;
    padding: 13px 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
}

.choice-column h2 {
    margin: 0 0 10px;
    font-size: 14px;
}

.choice-column h2 span {
    margin-right: 5px;
    color: #ff527f;
}

.choice-column.never h2 span {
    color: #4ade80;
}

.choice-column > div {
    display: grid;
    gap: 7px;
}

.choice-player {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    padding: 7px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.055);
}

.choice-avatar {
    width: 27px;
    height: 27px;
    border-radius: 9px;
    font-size: 9px;
}

.choice-player > span:last-child {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.choice-player strong {
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.choice-empty {
    padding: 11px 0;
    color: #77819f;
    font-size: 12px;
    text-align: center;
}

.punishment-phase-screen {
    overflow-y: auto;
    background:
        radial-gradient(circle at 50% 8%, rgba(255, 184, 77, 0.24), transparent 32%),
        radial-gradient(circle at 85% 88%, rgba(233, 30, 99, 0.18), transparent 34%);
}

.punishment-phase-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    width: 100%;
    max-width: 410px;
    margin: 0 auto;
    text-align: center;
}

.punishment-phase-kicker {
    margin-bottom: 13px;
    color: #ffc76f;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.18em;
}

.punishment-phase-content h1 {
    margin: 0;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(30px, 9vw, 43px);
    font-style: italic;
    line-height: 1.08;
}

.punishment-phase-copy {
    max-width: 330px;
    margin: 13px auto 22px;
    color: #aeb7d8;
    font-size: 13px;
    line-height: 1.45;
}

.punishment-phase-list {
    display: grid;
    gap: 10px;
}

.punishment-task-card {
    position: relative;
    padding: 18px 18px 19px;
    overflow: hidden;
    border: 1px solid rgba(255, 195, 109, 0.32);
    border-radius: 22px;
    background:
        radial-gradient(circle at 90% 10%, rgba(255, 202, 116, 0.13), transparent 28%),
        linear-gradient(145deg, rgba(255, 157, 66, 0.13), rgba(233, 30, 99, 0.1));
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.2);
    text-align: left;
}

.punishment-task-card.current {
    border-color: rgba(255, 205, 120, 0.75);
    box-shadow: 0 18px 54px rgba(255, 145, 61, 0.18);
}

.punishment-task-card strong {
    display: block;
    margin-bottom: 7px;
    color: #ffcb7d;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.punishment-task-card p {
    margin: 0;
    font-family: 'Trebuchet MS', 'Avenir Next', sans-serif;
    font-size: clamp(18px, 5.4vw, 23px);
    font-weight: 800;
    line-height: 1.25;
}

.punishment-phase-status {
    margin: 17px 0 10px;
    color: #c8cee4;
    font-size: 12px;
    font-weight: 750;
}

.punishment-complete-button {
    min-height: 58px;
    border: 0;
    border-radius: 18px;
    color: #15101a;
    background: linear-gradient(100deg, #ffd27f, #ff9f43);
    box-shadow: 0 13px 32px rgba(255, 159, 67, 0.24);
    font: inherit;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
}

.punishment-complete-button[hidden] {
    display: none;
}

.punishment-complete-button:disabled {
    color: #d8dbe7;
    background: #30364d;
    box-shadow: none;
    cursor: default;
}

.punishment-waiting {
    min-height: 58px;
    margin: 0;
    padding: 18px 14px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    color: #c7cce0;
    background: rgba(255, 255, 255, 0.04);
    font-size: 13px;
}

.punishment-waiting[hidden] {
    display: none;
}

.punishment-timebar {
    height: 4px;
    margin-top: 18px;
    overflow: hidden;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
}

.punishment-timebar span {
    display: block;
    width: 100%;
    height: 100%;
    transform-origin: left;
    background: linear-gradient(90deg, #ffd27f, #ff7657);
}

.punishment-time-label {
    margin-top: 8px;
    color: #8f97b3;
    font-size: 11px;
}

.next-round-track {
    flex: 0 0 auto;
    height: 3px;
    margin-top: 14px;
    overflow: hidden;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
}

.next-round-track span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    transform-origin: left;
    background: linear-gradient(90deg, #ff3b6f, #9c27b0);
}

.packs-room-error {
    min-height: 18px;
    margin: 3px 0 0;
    color: #ff8aa8;
    font-size: 12px;
    text-align: center;
}

.ended-icon {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 28px;
    background: linear-gradient(145deg, #8b3fe8, #ff3b6f);
    box-shadow: 0 18px 48px rgba(233, 30, 99, 0.28);
    font-size: 39px;
}

#multiplayer-ended-screen .btn-play {
    margin-top: 28px;
}

/* Connection overlay: base in ../connection-overlay.css */
.connection-overlay {
    --rp-connection-z: 500;
    --rp-connection-gap: 14px;
    --rp-connection-color: #b8c0dc;
    --rp-connection-bg: rgba(8, 12, 29, 0.9);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
}

.connection-overlay p {
    font-size: 13px;
}

@media (max-width: 480px) {
    .multiplayer-lives {
        margin-right: -12px;
        margin-left: -12px;
        padding-right: 12px;
        padding-left: 12px;
    }

    .multiplayer-topline {
        margin-left: 42px;
    }

    .split-statement-card {
        min-height: 275px;
        border-radius: 26px;
    }
}

@media (max-height: 680px) {
    .multiplayer-lives {
        margin-bottom: 9px;
    }

    .split-statement-card {
        min-height: 238px;
        grid-template-rows: minmax(76px, 0.8fr) 18px minmax(110px, 1.1fr);
    }

    .split-statement-lead,
    .split-statement-text {
        padding: 14px 22px;
    }

    .multiplayer-answer-area {
        padding-top: 10px;
    }

    .multiplayer-answer-button {
        min-height: 54px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .waiting-orbit::before {
        animation: none;
    }

    .split-statement-card.swipe-demo,
    .split-statement-card.swipe-demo .swipe-stamp {
        animation: none;
    }

    .multiplayer-answer-button {
        transition: none;
    }
}

/* One-phone end (after «Количество карточек»): ru-party-finale.js covers it with the shared game-end screen */
.nhie-solo-final-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
}

/* One phone «Кого выбрали?» before a punishment: the shared player cards (player-pick.css). */
#punish-pick-screen #punish-players { flex: 1 1 auto; overflow-y: auto; align-content: start; }
.punishment-player { margin: -4px 0 10px; text-align: center; font-size: 17px; font-weight: 700; }
/* One phone: several picked players (shared task) wrap centered. */
#punishment-player { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 12px; }
.punishment-player[hidden] { display: none; }
/* /neverhaveiever/multiplayer-roomplay.css */
/* RoomPlay shell for the synchronized "Never Have I Ever" mode.
   RoomPlay defaults; swipe cards, lives and punishments are explicit game content. */
.multiplayer-screen {
    --rp-bg: var(--bg-primary);
    --rp-panel: var(--bg-card);
    --rp-surface: #1a2140;
    --rp-line: rgba(255, 255, 255, 0.12);
    --rp-text: var(--text-primary);
    --rp-muted: var(--text-secondary);
    --game-accent: #ff527f;
    --game-accent-soft: #ff91af;
    --game-secondary: #9c5cf6;
    --game-positive: #69e49a;
    --game-warning: #ffc76f;
    width: min(430px, 100%);
    max-width: 430px;
    padding: calc(10px + env(safe-area-inset-top, 0px)) max(18px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px));
    overflow-x: hidden;
    color: var(--rp-text);
    background: linear-gradient(180deg, var(--bg-primary) 0%, #0a0f1f 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.multiplayer-topbar {
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: 48px 1fr 48px;
    align-items: center;
    min-height: 56px;
    margin-bottom: 12px;
}

.multiplayer-icon-button {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid var(--rp-line);
    border-radius: 15px;
    color: var(--rp-text);
    background: rgba(11, 23, 50, 0.88);
    cursor: pointer;
    transition: transform 140ms ease, background 140ms ease;
}

.multiplayer-icon-button svg,
.ended-icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.multiplayer-icon-button:active {
    transform: scale(0.95);
}

.multiplayer-brand-mark {
    display: flex;
    justify-self: center;
    align-items: center;
    gap: 8px;
    color: #dbe6ff;
    font-size: 11px;
    letter-spacing: 0.14em;
}

.multiplayer-brand-mark span {
    width: 12px;
    height: 12px;
    transform: rotate(45deg);
    border-radius: 3px;
    background: linear-gradient(135deg, var(--game-secondary) 0 50%, var(--game-accent) 50%);
}

.multiplayer-topbar-spacer {
    width: 48px;
    height: 48px;
}

.multiplayer-center {
    width: min(620px, 100%);
    max-width: 620px;
    min-height: calc(var(--app-height, 100dvh) - 130px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
}

.multiplayer-center h1,
.punishment-phase-content h1 {
    margin: 18px 0 12px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.045em;
}

.multiplayer-center > p:not(.multiplayer-kicker),
.punishment-phase-copy {
    max-width: 480px;
    color: var(--rp-muted);
    font-size: 15px;
    line-height: 1.55;
}

.multiplayer-kicker,
.punishment-phase-kicker {
    color: var(--game-accent-soft);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.15em;
}

.multiplayer-kicker strong {
    color: var(--rp-text);
}

.waiting-orbit {
    width: 128px;
    height: 128px;
    margin-bottom: 8px;
    border-color: rgba(255, 82, 127, 0.38);
    box-shadow: inset 0 0 0 18px rgba(255, 255, 255, 0.025), 0 24px 60px rgba(0, 0, 0, 0.34);
}

.waiting-orbit::before {
    inset: auto;
    top: 4px;
    left: 16px;
    width: 18px;
    height: 18px;
    border: 0;
    border-radius: 6px;
    background: var(--game-secondary);
    animation: never-room-orbit 3s ease-in-out infinite alternate;
}

.waiting-orbit span {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border-radius: 24px;
    color: #220817;
    background: var(--game-accent);
    font: 800 34px Unbounded, sans-serif;
}

.waiting-player-count {
    margin-top: 14px;
    padding: 10px 14px;
    border-color: var(--rp-line);
    color: #d9e4f8;
    background: rgba(255, 255, 255, 0.06);
    font-weight: 700;
}

.multiplayer-topline {
    min-height: 34px;
    margin: 0 2px 14px;
}

.round-pill,
.answer-progress,
.next-round-label {
    color: var(--rp-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.round-pill {
    border-color: rgba(255, 82, 127, 0.42);
    color: var(--game-accent-soft);
    background: rgba(255, 82, 127, 0.1);
}

.multiplayer-lives {
    margin: 0 -18px 14px;
    padding: 0 18px 5px;
}

.life-player {
    min-width: 126px;
    padding: 8px 10px;
    border-color: var(--rp-line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.045);
}

.life-player.current {
    border-color: rgba(255, 82, 127, 0.5);
    background: rgba(255, 82, 127, 0.1);
}

.life-avatar,
.choice-avatar {
    background: linear-gradient(145deg, var(--game-secondary), var(--game-accent));
}

.life-heart.active {
    color: var(--game-accent);
    filter: drop-shadow(0 2px 5px rgba(255, 82, 127, 0.45));
}

#multiplayer-game-screen {
    gap: 0;
}

.split-statement-card {
    grid-template-rows: minmax(88px, 0.85fr) 24px minmax(130px, 1.15fr);
    min-height: 310px;
    max-height: 480px;
    border-color: rgba(255, 255, 255, 0.18);
    border-radius: 30px;
    background:
        radial-gradient(circle at 12% 12%, rgba(255, 255, 255, 0.12), transparent 24%),
        linear-gradient(150deg, var(--game-secondary) 0%, var(--game-accent) 60%, #ff7657 112%);
    box-shadow: 0 28px 76px rgba(99, 34, 112, 0.34);
}

.split-statement-lead {
    font: 800 clamp(25px, 7vw, 39px)/1.08 Unbounded, Manrope, sans-serif;
    font-style: normal;
    letter-spacing: -0.045em;
}

.split-statement-text {
    font: 800 clamp(25px, 7vw, 39px)/1.12 Manrope, sans-serif;
    letter-spacing: -0.025em;
}

.swipe-stamp {
    font-family: Unbounded, Manrope, sans-serif;
    font-size: 17px;
}

.swipe-stamp.happened {
    color: #fff0a8;
}

.swipe-stamp.never {
    color: #a9ffc8;
}

.multiplayer-answer-area {
    padding-top: 15px;
}

.multiplayer-answer-area > p {
    color: var(--rp-muted);
    font-size: 12px;
}

.multiplayer-answer-button {
    min-height: 56px;
    border-color: var(--rp-line);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.055);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.multiplayer-answer-button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.09);
}

.multiplayer-answer-button.selected {
    border-color: var(--game-accent);
    background: rgba(255, 82, 127, 0.15);
}

.multiplayer-answer-button.never.selected {
    border-color: var(--game-positive);
    background: rgba(105, 228, 154, 0.12);
}

.reveal-statement {
    margin-bottom: 14px;
    padding: 18px;
    border-color: var(--rp-line);
    border-radius: 20px;
    background: var(--rp-panel);
}

.reveal-statement span {
    color: var(--game-accent-soft);
    font: 700 13px/1.3 Manrope, sans-serif;
    letter-spacing: 0.04em;
}

.reveal-statement strong {
    margin-top: 7px;
    font: 700 clamp(19px, 5vw, 26px)/1.25 Manrope, sans-serif;
}

.choice-columns {
    gap: 12px;
}

.choice-column {
    padding: 16px 12px;
    border: 0;
    border-radius: 22px;
    color: #210b16;
}

.choice-column.happened {
    background: linear-gradient(150deg, #ff9ab5, var(--game-accent));
}

.choice-column.never {
    color: #082116;
    background: linear-gradient(210deg, #b0f9c9, var(--game-positive));
}

.choice-column h2 {
    font: 800 14px/1.2 Unbounded, Manrope, sans-serif;
}

.choice-column h2 span,
.choice-column.never h2 span {
    color: currentColor;
}

.choice-player {
    background: rgba(255, 255, 255, 0.3);
}

.choice-avatar {
    color: #fff;
    background: #111d38;
}

.choice-empty {
    color: rgba(8, 20, 30, 0.62);
}

.punishment-phase-screen {
    background:
        radial-gradient(circle at 50% 8%, rgba(255, 199, 111, 0.19), transparent 32%),
        radial-gradient(circle at 85% 88%, rgba(255, 82, 127, 0.13), transparent 34%),
        linear-gradient(180deg, #0d1630 0%, var(--rp-bg) 100%);
}

.punishment-phase-content {
    width: min(620px, 100%);
    max-width: 620px;
}

.punishment-phase-content h1 {
    margin: 0;
}

.punishment-phase-kicker {
    color: var(--game-warning);
}

.punishment-phase-copy {
    margin: 13px auto 22px;
}

.punishment-phase-list {
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
}

.punishment-task-card {
    border-color: rgba(255, 199, 111, 0.32);
    border-radius: 22px;
    background: var(--rp-panel);
}

.punishment-task-card.current {
    border-color: rgba(255, 199, 111, 0.76);
    box-shadow: 0 18px 54px rgba(255, 145, 61, 0.16);
}

.punishment-task-card strong {
    color: var(--game-warning);
}

.punishment-task-card .punishment-player {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.punishment-task-card .punishment-avatar {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    font-size: 12px;
}

.punishment-task-card p {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.punishment-complete-button {
    min-height: 56px;
    border-radius: 18px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.punishment-waiting {
    min-height: 56px;
    border-color: var(--rp-line);
    background: rgba(255, 255, 255, 0.04);
}

.next-round-track span {
    background: linear-gradient(90deg, var(--game-accent), var(--game-secondary));
}

.ended-icon {
    color: #fff;
    background: linear-gradient(145deg, var(--game-secondary), var(--game-accent));
}

.ended-icon svg {
    width: 42px;
    height: 42px;
}

#multiplayer-ended-screen .btn-play {
    width: min(420px, 100%);
    min-height: 56px;
    border-radius: 18px;
}

.connection-overlay {
    color: var(--rp-muted);
    background: rgba(7, 17, 38, 0.94);
}

.multiplayer-icon-button:focus-visible,
.multiplayer-answer-button:focus-visible,
.punishment-complete-button:focus-visible,
#multiplayer-ended-screen .btn-play:focus-visible {
    outline: 3px solid #d9b8ff;
    outline-offset: 3px;
}

@keyframes never-room-orbit {
    to { transform: translate(92px, 95px) rotate(180deg); }
}

@media (max-width: 480px) {
    .multiplayer-screen {
        padding-right: max(12px, env(safe-area-inset-right, 0px));
        padding-left: max(12px, env(safe-area-inset-left, 0px));
    }

    .multiplayer-lives {
        margin-right: -12px;
        margin-left: -12px;
        padding-right: 12px;
        padding-left: 12px;
    }

    .split-statement-card {
        min-height: 275px;
        border-radius: 26px;
    }

    .choice-column {
        padding: 14px 10px;
    }
}

@media (max-height: 680px) {
    .multiplayer-topbar {
        min-height: 48px;
        margin-bottom: 7px;
    }

    .multiplayer-icon-button,
    .multiplayer-topbar-spacer {
        width: 44px;
        height: 44px;
    }

    .split-statement-card {
        min-height: 238px;
    }
}

@media (orientation: landscape) and (max-height: 620px) and (min-width: 620px) {
    #multiplayer-game-screen.active {
        display: grid;
        grid-template-columns: minmax(240px, 0.85fr) minmax(340px, 1.25fr);
        grid-template-rows: auto auto 1fr auto;
        gap: 8px 18px;
    }

    #multiplayer-game-screen .multiplayer-topbar {
        grid-column: 1 / -1;
        margin-bottom: 0;
    }

    #multiplayer-game-screen .multiplayer-topline {
        grid-column: 1;
        grid-row: 2;
        margin: 0;
    }

    #multiplayer-game-screen .multiplayer-lives {
        grid-column: 1;
        grid-row: 3;
        align-content: start;
        flex-wrap: wrap;
        margin: 0;
        padding: 0;
        overflow-y: auto;
    }

    #multiplayer-game-screen .split-statement-card {
        grid-column: 2;
        grid-row: 2 / 4;
        min-height: 270px;
    }

    #multiplayer-game-screen .multiplayer-answer-area {
        grid-column: 2;
        grid-row: 4;
        padding-top: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .waiting-orbit::before,
    .split-statement-card.swipe-demo,
    .split-statement-card.swipe-demo .swipe-stamp {
        animation: none;
    }

    .multiplayer-icon-button,
    .multiplayer-answer-button {
        transition: none;
    }
}
/* Common room shell; local cards are deliberately outside this scope. */
.multiplayer-screen { margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.multiplayer-screen h1 { font-family: inherit; font-size: 28px; font-weight: 700; letter-spacing: normal; }
.multiplayer-screen .multiplayer-icon-button { border: 0; background: transparent; border-radius: 0; }
.multiplayer-screen .players-list { width: 100%; margin-top: 24px; }

/* Shared preparation geometry; never applies to the one-phone game. */
.nhie-online #packs-screen,
.nhie-online #multiplayer-waiting-screen {
    position: relative;
    padding-top: calc(64px + env(safe-area-inset-top, 0px));
}
.nhie-online .btn-back {
    top: calc(16px + env(safe-area-inset-top, 0px));
    min-width: 48px;
    min-height: 48px;
}
.nhie-online #packs-screen .title { margin-bottom: 8px; }
.nhie-online #packs-screen .subtitle { margin-bottom: 24px; }
.nhie-online #btn-start-with-packs .play-icon { display: none; }
.nhie-online #multiplayer-waiting-text { margin: 24px 0; text-align: center; }
.nhie-online #multiplayer-rules-button { margin-top: 16px; }
.nhie-online #multiplayer-waiting-screen .screen-content { padding: 0; }
#packs-room-status { display: none; }
.nhie-online #packs-room-status { display: block; margin-bottom: 16px; text-align: center; color: var(--text-secondary); }
.nhie-online #onboarding-screen { padding-top: calc(64px + env(safe-area-inset-top, 0px)); }

/* Game end: the shared game-end screen (../game-end.css) brings its own padding and one-screen height. */
#multiplayer-finale-screen { padding: 0; animation: none; }

/* «Было» costs a life: on the reveal the lost heart swells, shakes and goes out, and a «−1» floats up. */
.life-hearts { position: relative; align-items: center; }
.life-heart.losing {
    display: inline-block;
    animation: nhie-heart-loss 1.1s cubic-bezier(.3, .7, .4, 1) .35s both;
}
.life-loss {
    position: absolute;
    left: 100%;
    top: 50%;
    margin-left: 12px;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
    white-space: nowrap;
    pointer-events: none;
    animation: nhie-life-loss 1.8s ease-out .45s both;
}
@keyframes nhie-heart-loss {
    0% { transform: scale(1); color: #ff8a93; }
    22% { transform: scale(2.4); color: #ff8a93; }
    38% { transform: scale(2.2) rotate(-14deg); color: #ff8a93; }
    54% { transform: scale(2.2) rotate(12deg); color: #ff8a93; }
    70% { transform: scale(1.6) rotate(0) translateY(2px); opacity: .6; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes nhie-life-loss {
    0% { opacity: 0; transform: translateY(-20%) scale(.6); }
    18% { opacity: 1; transform: translateY(-50%) scale(1.25); }
    30% { transform: translateY(-50%) scale(1); }
    75% { opacity: 1; transform: translateY(-120%); }
    100% { opacity: 0; transform: translateY(-170%); }
}
@media (prefers-reduced-motion: reduce) {
    .life-heart.losing { animation: none; }
    .life-loss { animation: none; transform: translateY(-50%); }
}
/* Like / dislike on the online statement card once this phone answered (shared
   content-report.css). Sheet tokens on :root follow the cutout palette; the thumbs sit on the dark
   page, so the pressed thumb is paper (#f1dadd) rather than the crimson accent. */
:root {
    --rp-report-surface: var(--bg-secondary);
    --rp-report-text: var(--game-paper);
    --rp-report-muted: rgb(241 218 221 / 72%);
    --rp-report-accent: var(--game-accent);
    --rp-report-accent-ink: var(--game-paper);
}
/* On the swipe card's bottom edge, centred, the report flag in the corner beside it. */
.nhie-online-card-vote { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); z-index: 3; margin: 0; }
.nhie-online-card-vote[hidden] { display: none; }
.nhie-online-card-vote :is(.rp-card-vote__btn, .rp-report-flag) { color: rgb(241 218 221 / 60%); }
.nhie-online-card-vote .rp-card-vote__btn[aria-pressed="true"] { color: var(--game-paper); }

/* Host's «Завершить» in the top bar: a labelled pill, so it is never mistaken for the card's report flag. */
.multiplayer-topbar:has(.nhie-topbar-actions) { grid-template-columns: auto 1fr auto; gap: 8px; }
.multiplayer-topbar:has(.nhie-topbar-actions) .btn-back-multiplayer { justify-self: start; }
/* Right column: the host's shared «Пауза» (shared/client/online-pause.ts) and «Завершить» side by side. */
.nhie-topbar-actions { display: flex; justify-self: end; align-items: center; gap: 8px; min-width: 48px; justify-content: flex-end; }
.nhie-topbar-actions .rp-online-pause-btn--inline { margin: 0; }
.nhie-finish-button {
    min-height: 36px;
    padding: 0 14px;
    border: 1.5px solid currentColor;
    border-radius: 999px;
    color: var(--game-paper, var(--rp-text));
    background: transparent;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}
.nhie-finish-button[hidden] { display: none; }
.nhie-finish-button:active { scale: .94; }
.nhie-finish-button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* Shared task for 2+ punished players: all of them on one card. */
.punishment-group-players {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
}
/* /player-setup.css */
/* Player Setup — shared styles for player/team input screens */
/* Uses ps- prefix to avoid collisions during incremental migration */

.ps-entry {
    /* Same compact row as the room player list (create-room .player-item). */
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border-radius: 14px;
    min-height: 56px;
    padding: 8px 12px;
    margin-bottom: 6px;
    animation: ps-slideIn 0.3s ease;
}

.ps-list.ps-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ps-list > .ps-entry { margin-bottom: 0; }

@keyframes ps-slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/*
 * Add / remove motion, same as the room player list (create-room .player-item.is-new / .is-leaving):
 * a new row opens its slot and pops in with a soft squash while its icon bounces and rings once in the
 * setup accent; a removed row squashes, shrinks out and closes its slot so the rows below glide up.
 * The -6px margin cancels the .ps-list gap while the slot is closed. JS adds these classes only when
 * motion is allowed. !important: some Game Themes give every row an id-scoped arrival animation
 * (#players-screen.active .ps-entry), which would otherwise win over these one-off states.
 */
.ps-entry.ps-entry--new {
    transform-origin: 30px 50%;
    animation: ps-row-slot 260ms ease-out both, ps-row-join 520ms cubic-bezier(.2, .9, .3, 1.25) both !important;
}

.ps-entry--new .ps-icon { animation: ps-icon-join 520ms cubic-bezier(.2, .9, .3, 1.25) 80ms both; }

/* After the join the row must not animate again: dropping .ps-entry--new would otherwise swap the
   animation back to the row's own arrival (ps-slideIn or a theme's #players-screen.active .ps-entry)
   and play it a second time. */
.ps-entry--settled { animation: none !important; }

.ps-entry.ps-entry--leaving {
    pointer-events: none;
    overflow: hidden;
    transform-origin: 30px 50%;
    animation: ps-row-leave 420ms cubic-bezier(.5, 0, .75, .3) both !important;
}

@keyframes ps-row-slot {
    from { max-height: 0; min-height: 0; padding-top: 0; padding-bottom: 0; margin-bottom: -6px; }
    to { max-height: var(--ps-row-max, 80px); }
}

@keyframes ps-row-join {
    0% { opacity: 0; transform: scale(.55); }
    45% { opacity: 1; transform: scale(1.05, .93); }
    70% { transform: scale(.98, 1.03); }
    100% { opacity: 1; transform: none; }
}

@keyframes ps-icon-join {
    0% { transform: scale(.3); box-shadow: 0 0 0 0 var(--ps-accent); }
    50% { transform: scale(1.18, .86); box-shadow: 0 0 0 6px color-mix(in srgb, var(--ps-accent) 45%, transparent); }
    75% { transform: scale(.95, 1.06); }
    100% { transform: none; box-shadow: 0 0 0 10px transparent; }
}

@keyframes ps-row-leave {
    0% { opacity: 1; transform: none; max-height: var(--ps-row-max, 80px); }
    22% { opacity: 1; transform: scale(1.04, .9); max-height: var(--ps-row-max, 80px); }
    60% { opacity: 0; transform: scale(.5); max-height: var(--ps-row-max, 80px); min-height: 56px; padding-top: 8px; padding-bottom: 8px; margin-bottom: 0; }
    100% { opacity: 0; transform: scale(.5); max-height: 0; min-height: 0; padding-top: 0; padding-bottom: 0; margin-bottom: -6px; }
}

.ps-icon {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.ps-icon--avatar {
    overflow: hidden;
    cursor: default;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 700;
}

.ps-icon--avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* Player mode icon states */
.ps-icon--filled {
    background: var(--ps-accent);
}

.ps-icon--empty {
    background: var(--bg-secondary);
    border: 1px solid var(--text-secondary);
}

.ps-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 16px;
    outline: none;
    min-width: 0;
}

.ps-input::placeholder {
    color: var(--text-placeholder);
}

.ps-remove {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Clear gap from the gender toggle so a tap on one never lands on the other. */
    margin: -2px -6px -2px 16px;
    position: relative;
    transition: color 0.2s;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

/* A just-added player: the ✕ is a ✓ in the setup accent until the name is saved. */
.ps-remove.ps-remove--confirm {
    width: 36px;
    height: 36px;
    margin: 0 -4px 0 18px;
    border-radius: 999px;
    color: var(--ps-confirm-ink, #17191f);
    background: var(--ps-accent);
}

.ps-remove--confirm svg { width: 20px; height: 20px; display: block; }
.ps-remove--confirm:active { transform: scale(0.9); }
.ps-remove:focus-visible { outline: 2px solid var(--ps-accent); outline-offset: 2px; }
/* The ✕ that replaces the ✓ after saving pops in. */
.ps-remove--saved { animation: ps-remove-saved 320ms cubic-bezier(.2, .9, .3, 1.25); }

@keyframes ps-remove-saved {
    0% { transform: scale(.4) rotate(-45deg); opacity: 0; }
    70% { transform: scale(1.15) rotate(6deg); opacity: 1; }
    100% { transform: none; }
}

/* Gender badge is a toggle: a tap switches male <-> female. */
.ps-gender {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: none;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    margin-left: 8px;
    font: inherit;
    font-size: 16px;
    font-weight: 800;
    background: color-mix(in srgb, var(--bg-secondary) 86%, transparent);
    color: var(--text-secondary);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s ease;
}

/* Compact visuals, but each control keeps a 44px touch area. */
.ps-icon::after,
.ps-gender::after,
.ps-remove::after { content: ''; position: absolute; inset: -4px; }
.ps-gender::after { inset: -6px; }

.ps-gender:active { transform: scale(0.9); }
.ps-gender:focus-visible { outline: 2px solid var(--ps-accent); outline-offset: 2px; }
.ps-gender--flip .rp-gender-icon { animation: ps-gender-flip 0.28s ease; }

@keyframes ps-gender-flip {
    0% { transform: scale(0.4) rotate(-40deg); opacity: 0; }
    70% { transform: scale(1.15) rotate(6deg); opacity: 1; }
    100% { transform: scale(1) rotate(0); }
}

.ps-gender--female { color: var(--rp-female, #ff7aaa); }
.ps-gender--male { color: var(--rp-male, #68a8ff); }

/*
 * «Перенести игроков?» is a dialog like «Выйти из игры?» and the settings popup, so it takes the
 * same --rp-dialog-* tokens every game theme sets (confirm-dialog.css), not the page's --bg-card /
 * --text-primary: those meant white text on a cream card in «5 секунд» and «Покажи слово».
 * Fallbacks are the shared navy dialog.
 */
.ps-roster-import-overlay {
    --rp-import-ink: var(--rp-dialog-title, #ffffff);
    --rp-import-muted: var(--rp-dialog-text, #8892b0);
    --rp-import-accent: var(--rp-dialog-primary-bg, linear-gradient(135deg, #ff3b6f, #cc2f59));
    --rp-import-on-accent: var(--rp-dialog-primary-text, #ffffff);
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: var(--rp-dialog-overlay, rgba(4, 7, 20, 0.82));
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 180ms ease;
}

.ps-roster-import-overlay.active { opacity: 1; }

.ps-roster-import-modal {
    width: min(100%, 390px);
    max-height: min(720px, calc(100dvh - 40px));
    display: flex;
    flex-direction: column;
    padding: 24px;
    border: var(--rp-dialog-border, 1px solid color-mix(in srgb, var(--rp-import-ink) 10%, transparent));
    border-radius: var(--rp-dialog-radius, 26px);
    background: var(--rp-dialog-bg, linear-gradient(135deg, #252b4a 0%, #1a2140 100%));
    box-shadow: var(--rp-dialog-shadow, 0 28px 70px rgba(0, 0, 0, 0.45));
    color: var(--rp-import-ink);
    transform: translateY(14px) scale(0.98);
    transition: transform 220ms cubic-bezier(.2, .8, .2, 1);
}

.ps-roster-import-overlay.active .ps-roster-import-modal {
    transform: translateY(0) scale(1);
}

.ps-roster-import-title {
    margin: 0;
    text-align: center;
    font-size: clamp(22px, 6vw, 28px);
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--rp-import-ink);
}

.ps-roster-import-subtitle,
.ps-roster-import-overflow {
    margin: 8px 0 18px;
    text-align: center;
    color: var(--rp-import-muted);
    font-size: 14px;
    line-height: 1.4;
}

.ps-roster-import-list {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    display: grid;
    gap: 8px;
    padding: 2px 2px 4px;
    scrollbar-width: thin;
}

.ps-roster-import-player {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 32px;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 6px 10px 6px 6px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--rp-import-ink) 7%, transparent);
}

.ps-roster-import-avatar {
    width: 46px;
    height: 46px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--rp-import-accent);
    color: var(--rp-import-on-accent);
    font-weight: 800;
}

.ps-roster-import-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.ps-roster-import-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--rp-import-ink);
    font-size: 17px;
    font-weight: 650;
}

.ps-roster-import-gender {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--rp-import-ink) 8%, transparent);
    color: var(--rp-import-muted);
    font-size: 17px;
    font-weight: 800;
}

.ps-roster-import-gender--female { color: var(--rp-female, #ff7aaa); }
.ps-roster-import-gender--male { color: var(--rp-male, #68a8ff); }

.ps-roster-import-overflow {
    margin: 12px 4px 0;
    font-size: 13px;
}

.ps-roster-import-actions {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.ps-roster-import-button {
    min-height: 50px;
    width: 100%;
    border-radius: var(--rp-dialog-btn-radius, 999px);
    border: 0;
    font: inherit;
    font-size: 16px;
    font-weight: 750;
    cursor: pointer;
    touch-action: manipulation;
}

.ps-roster-import-button--primary {
    background: var(--rp-import-accent);
    color: var(--rp-import-on-accent);
    box-shadow: var(--rp-dialog-primary-shadow, 0 10px 24px rgba(0, 0, 0, 0.22));
}

.ps-roster-import-button--secondary {
    border: 2px solid var(--rp-dialog-secondary-border, #3a4167);
    background: var(--rp-dialog-secondary-bg, transparent);
    color: var(--rp-dialog-secondary-text, var(--rp-import-muted));
}

.ps-roster-import-button:focus-visible {
    outline: 3px solid var(--rp-import-ink);
    outline-offset: 3px;
}

@media (max-height: 560px) and (orientation: landscape) {
    .ps-roster-import-modal { max-height: calc(100dvh - 20px); padding: 18px; }
    .ps-roster-import-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ps-roster-import-player { grid-template-columns: 40px minmax(0, 1fr) 28px; min-height: 46px; }
    .ps-roster-import-avatar { width: 40px; height: 40px; }
    .ps-roster-import-actions { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .ps-entry,
    .ps-gender,
    .ps-remove--saved,
    .ps-gender--flip .rp-gender-icon,
    .ps-roster-import-overlay,
    .ps-roster-import-modal { animation: none; transition: none; }
}

@media (hover: hover) {
    .ps-remove:hover {
        color: var(--ps-accent);
    }
}

/* Add button (games apply this class to their existing button) */
.ps-add-btn {
    background: transparent;
    border: 2px solid var(--ps-accent);
    color: var(--text-primary);
    padding: 16px 40px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin: 0 auto 30px;
    display: block;
    transition: all 0.3s ease;
}

@media (hover: hover) {
    .ps-add-btn:hover {
        background: var(--ps-accent);
        transform: scale(1.02);
    }
}

.ps-add-btn:active {
    transform: scale(0.98);
}

/* Mobile */
@media (max-width: 480px) {
    .ps-add-btn {
        padding: 14px 30px;
        font-size: 14px;
        margin-bottom: 20px;
    }

}

/*
 * Gender icons: one upright ♂ / ♀ pair as SVG masks instead of font glyphs, so the
 * sign is always centred in its badge whatever the game font (font ♂/♀ glyphs sit
 * high/low and off to the side). Colour comes from currentColor.
 * Markup: <span class="rp-gender-icon rp-gender-icon--male|female" aria-hidden="true"></span>
 * The same shapes are defined in player-gender.css and player-setup.css; keep them in sync.
 */
:root {
    --rp-icon-male: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10' cy='14' r='5.5'/%3E%3Cpath d='M14 10l5.5-5.5M14 4.5h5.5V10'/%3E%3C/svg%3E");
    --rp-icon-female: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8.5' r='5.5'/%3E%3Cpath d='M12 14v7M8.5 17.8h7'/%3E%3C/svg%3E");
}

.rp-gender-icon {
    display: block;
    flex: none;
    width: 0.9em;
    height: 0.9em;
    background-color: currentColor;
    -webkit-mask: var(--rp-icon-male) center / contain no-repeat;
    mask: var(--rp-icon-male) center / contain no-repeat;
}

.rp-gender-icon--female {
    -webkit-mask-image: var(--rp-icon-female);
    mask-image: var(--rp-icon-female);
}

.ps-gender .rp-gender-icon,
.ps-roster-import-gender .rp-gender-icon {
    width: 18px;
    height: 18px;
}

/* ---- Avatar picker (shared avatar-capture.js sheet, loaded on the first avatar tap) ----
   Same bottom sheet as the room picker (create-room/room-themes.css), coloured from the game theme:
   page background, translucent text-colour surfaces, and the setup accent. player-setup.js puts the
   resolved accent and its ink on <html> (--ps-ac-accent / --ps-ac-on-accent) before opening. */
.avatar-capture-overlay { background: rgba(0, 0, 0, 0.6); align-items: flex-end; }
.avatar-capture-modal {
    background: linear-gradient(180deg, var(--bg-primary) 0%, color-mix(in srgb, var(--bg-primary) 84%, #000) 100%);
    border-top: 1px solid color-mix(in srgb, var(--text-primary) 18%, transparent);
    color: var(--text-primary);
}
.avatar-capture-close {
    background: color-mix(in srgb, var(--text-primary) 14%, transparent);
    color: var(--text-primary);
}
.avatar-capture-tabs {
    background: color-mix(in srgb, var(--text-primary) 12%, transparent);
    border-radius: 14px;
    margin-right: 44px;
}
.avatar-capture-tab { color: var(--text-secondary); border-radius: 10px; }
.avatar-capture-tab.active { background: var(--ps-ac-accent, var(--settings-accent)); color: var(--ps-ac-on-accent, #ffffff); }
.avatar-capture-gif-item { background: color-mix(in srgb, var(--text-primary) 12%, transparent); border-radius: 10px; }
.avatar-capture-gif-item:hover { border-color: var(--ps-ac-accent, var(--settings-accent)); }
.avatar-capture-gif-grid::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text-primary) 22%, transparent); }
.avatar-capture-guide, .avatar-capture-preview { border-color: var(--ps-ac-accent, var(--settings-accent)); }
.avatar-capture-btn { border-radius: 14px; }
.avatar-capture-btn-capture, .avatar-capture-btn-use { background: var(--ps-ac-accent, var(--settings-accent)); color: var(--ps-ac-on-accent, #ffffff); }
.avatar-capture-btn-retake { border-color: color-mix(in srgb, var(--text-primary) 22%, transparent); color: var(--text-primary); }

/*
 * Teams with players (PlayerSetup config.members): each team is a card with its name row on top and
 * its players as chips below. A chip is dragged to another team, or tapped and then the team (the
 * other teams show a dashed «Сюда» target). Colours come from the game theme: the card is the theme's
 * .ps-entry, chips are a translucent tint of the card's ink, highlights use --ps-accent. A theme whose
 * cards are lighter than its screen sets --ps-card-ink / --ps-card-muted on .ps-entry.
 */
.ps-entry.ps-entry--team {
    --ps-row-max: 420px;
    flex-direction: column;
    align-items: stretch;
    padding: 8px 12px 12px;
    transition: box-shadow 160ms ease, transform 160ms ease;
}

.ps-team-head {
    display: flex;
    align-items: center;
    min-height: 40px;
}

.ps-team-members {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 8px;
    min-height: 44px;
}

.ps-team-tools {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 12px;
}

.ps-team-hint {
    flex: 1;
    margin: 0;
    font-size: 14px;
    line-height: 1.35;
    color: var(--text-secondary);
}

.ps-team-shuffle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    min-height: 40px;
    padding: 0 14px;
    border: 1.5px solid color-mix(in srgb, var(--text-primary) 45%, transparent);
    border-radius: 999px;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    transition: transform 120ms ease, background-color 160ms ease;
}

.ps-team-shuffle::after { content: ''; position: absolute; inset: -4px 0; }
.ps-team-shuffle .rp-icon { font-size: 18px; }
.ps-team-shuffle:active { transform: scale(0.95); background: color-mix(in srgb, var(--text-primary) 12%, transparent); }
.ps-team-shuffle:active .rp-icon { animation: ps-dice-roll 360ms ease; }
.ps-team-shuffle:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.ps-team-shuffle[hidden] { display: none; }

@keyframes ps-dice-roll {
    0% { transform: rotate(0); }
    100% { transform: rotate(180deg); }
}

.ps-member,
.ps-member-add,
.ps-member-drop,
.ps-member-input {
    box-sizing: border-box;
    min-height: 40px;
    border-radius: 999px;
    font: inherit;
    font-size: 15px;
    line-height: 1.2;
    -webkit-tap-highlight-color: transparent;
}

.ps-member {
    position: relative;
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 4px 14px 4px 5px;
    background: color-mix(in srgb, var(--ps-card-ink, var(--text-primary)) 9%, transparent);
    color: var(--ps-card-ink, var(--text-primary));
    font-weight: 600;
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    transition: background-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

/* Bigger touch target than the visual pill. */
.ps-member::before { content: ''; position: absolute; inset: -2px -2px; }
.ps-member .rp-player { gap: 8px; min-width: 0; }
.ps-member .rp-player-avatar { font-size: 15px; width: 30px; height: 30px; }
.ps-member .rp-player-avatar--emoji { font-size: 17px; }
.ps-member-label { display: inline-flex; min-width: 0; max-width: 100%; }
.ps-member:focus-visible { outline: 2px solid var(--ps-accent); outline-offset: 2px; }
.ps-member:active { cursor: grabbing; }

.ps-member--selected {
    background: color-mix(in srgb, var(--ps-accent) 22%, transparent);
    box-shadow: 0 0 0 2px var(--ps-accent);
    padding-right: 4px;
}

.ps-member-remove {
    display: none;
    position: relative;
    width: 30px;
    height: 30px;
    margin-left: 6px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: color-mix(in srgb, var(--ps-card-ink, var(--text-primary)) 14%, transparent);
    color: var(--ps-card-ink, var(--text-primary));
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.ps-member-remove::after { content: ''; position: absolute; inset: -6px; }
.ps-member--selected .ps-member-remove { display: inline-flex; align-items: center; justify-content: center; }
.ps-member-remove:focus-visible { outline: 2px solid var(--ps-accent); outline-offset: 1px; }

.ps-member--dragging { opacity: 0.32; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ps-card-ink, var(--text-primary)) 35%, transparent); }
.ps-member--dragging > * { visibility: hidden; }

.ps-member.ps-member--ghost {
    position: fixed;
    z-index: 1400;
    margin: 0;
    pointer-events: none;
    background: var(--ps-ghost-bg, #fff);
    background-image: linear-gradient(color-mix(in srgb, var(--ps-accent) 20%, transparent), color-mix(in srgb, var(--ps-accent) 20%, transparent));
    box-shadow: 0 0 0 2px var(--ps-accent), 0 14px 28px rgba(0, 0, 0, 0.32);
    transform-origin: 30% 50%;
    will-change: transform;
}

.ps-member-add,
.ps-member-drop {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    border: 1.5px dashed color-mix(in srgb, var(--ps-card-muted, var(--text-secondary)) 70%, transparent);
    background: transparent;
    color: var(--ps-card-muted, var(--text-secondary));
    font-weight: 600;
    cursor: pointer;
}

.ps-member-add span:first-child { font-size: 19px; font-weight: 700; line-height: 1; }
.ps-member-add:active { transform: scale(0.95); }
.ps-member-add:focus-visible,
.ps-member-drop:focus-visible { outline: 2px solid var(--ps-accent); outline-offset: 2px; }

.ps-member-drop {
    border-color: var(--ps-accent);
    color: var(--ps-card-ink, var(--text-primary));
    background: color-mix(in srgb, var(--ps-accent) 10%, transparent);
    animation: ps-drop-pulse 1.2s ease-in-out infinite;
}

@keyframes ps-drop-pulse {
    0%, 100% { background-color: color-mix(in srgb, var(--ps-accent) 8%, transparent); }
    50% { background-color: color-mix(in srgb, var(--ps-accent) 22%, transparent); }
}

.ps-member-input {
    width: 140px;
    padding: 0 14px;
    border: 1.5px solid var(--ps-accent);
    background: transparent;
    color: var(--ps-card-ink, var(--text-primary));
    outline: none;
}

.ps-member-input::placeholder { color: var(--ps-card-muted, var(--text-placeholder, var(--text-secondary))); }

/* Picking with a tap: the other teams are targets, the whole card is tappable. */
.ps-list--picking .ps-entry--pick-target { cursor: pointer; }

.ps-entry--team.ps-entry--drop {
    box-shadow: 0 0 0 2.5px var(--ps-accent), 0 8px 20px color-mix(in srgb, var(--ps-accent) 25%, transparent);
    transform: scale(1.015);
}

.ps-list--dragging { cursor: grabbing; }

.ps-entry--received { animation: ps-team-receive 420ms ease !important; }

@keyframes ps-team-receive {
    0% { box-shadow: 0 0 0 0 var(--ps-accent); }
    40% { box-shadow: 0 0 0 3px var(--ps-accent); }
    100% { box-shadow: 0 0 0 0 transparent; }
}

.ps-member--new { animation: ps-member-join 420ms cubic-bezier(.2, .9, .3, 1.25) both; }
.ps-member--landed { animation: ps-member-land 380ms cubic-bezier(.2, .9, .3, 1.25); }

@keyframes ps-member-join {
    0% { opacity: 0; transform: scale(.4); }
    55% { opacity: 1; transform: scale(1.08, .92); }
    100% { opacity: 1; transform: none; }
}

@keyframes ps-member-land {
    0% { transform: scale(1.1, .88); }
    55% { transform: scale(.96, 1.05); }
    100% { transform: none; }
}

/* Turn screen: «Ходит» + the player, teammates as small avatars (PlayerSetup.renderTeamTurn). */
.ps-team-turn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 12px auto 16px;
    text-align: center;
    color: var(--text-primary);
}

.ps-team-turn[hidden] { display: none; }

.ps-team-turn-label {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.ps-team-turn-player.rp-player { font-size: 24px; font-weight: 800; }

.ps-team-turn-others {
    display: inline-flex;
    gap: 4px;
    font-size: 17px;
    opacity: 0.9;
}

@media (prefers-reduced-motion: reduce) {
    .ps-member, .ps-entry--team, .ps-team-shuffle { transition: none; }
    .ps-member--new, .ps-member--landed, .ps-entry--received, .ps-member-drop, .ps-team-shuffle:active .rp-icon { animation: none !important; }
    .ps-entry--team.ps-entry--drop { transform: none; }
}
/* /player-avatar.css */
/* PlayerAvatar — «avatar + name» chip for one-phone games (player-avatar.js).
   Sizes follow the surrounding font, so the same markup works in a turn title and in a result row.
   The emoji/initial tile uses the game theme: --ps-accent (player setup accent) or --accent. */

.rp-player {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    max-width: 100%;
    min-width: 0;
    vertical-align: middle;
}

.rp-player-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rp-player-avatar {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1.6em;
    height: 1.6em;
    border-radius: 50%;
    overflow: hidden;
    background: color-mix(in srgb, var(--ps-accent, var(--accent, #7c5cff)) 28%, transparent);
    color: inherit;
    font-size: 1em;
    font-weight: 700;
    line-height: 1;
    vertical-align: middle;
    text-transform: none;
    letter-spacing: 0;
    user-select: none;
}

.rp-player-avatar--emoji {
    font-size: 0.95em;
    font-weight: 400;
}

.rp-player-avatar--initial,
.rp-player-avatar--image {
    font-size: 0.8em;
    width: 2em;
    height: 2em;
}

/* Photo/GIF avatars are cut-out stickers (transparent background), drawn like in online rooms
   (game-ui.css .player-avatar.has-photo): no tile, whole sticker, slightly enlarged past the box. */
.rp-player-avatar[data-rp-avatar-state="ready"] {
    background: none;
    overflow: visible;
    color: transparent;
}

.rp-player-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    transform: scale(1.25);
}

/* Larger hero variant: «Ход игрока …», role cards. */
.rp-player--lg .rp-player-avatar {
    width: 1.9em;
    height: 1.9em;
}

.rp-player--lg .rp-player-avatar--initial,
.rp-player--lg .rp-player-avatar--image {
    width: 2.375em;
    height: 2.375em;
}

/* Stacked variant: big avatar above the name (pass-the-phone screens). */
.rp-player--stack {
    flex-direction: column;
    gap: 0.25em;
}

.rp-player--stack .rp-player-name {
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
}
/* /player-pick.css */
/*
 * «Кого выбрали?» (player-pick.js): the players as cards to tap on one phone, the same in every game.
 * Colours: --rp-pick-surface (card), --rp-pick-accent (picked card), --rp-pick-ring (picked border).
 */
.rp-pick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    padding-bottom: 8px;
}
.rp-pick-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 64px;
    padding: 8px 10px;
    border: 2px solid transparent;
    border-radius: 18px;
    color: var(--text-primary, #fff);
    background: var(--rp-pick-surface, #262629);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}
.rp-pick-option:active { transform: scale(.97); }
@media (hover: hover) { .rp-pick-option:hover { border-color: var(--rp-pick-ring, #e0336e); } }
.rp-pick-option:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.rp-pick-option.selected { border-color: var(--rp-pick-ring, #e0336e); background: var(--rp-pick-accent, #a51043); }
.rp-pick-option .rp-pick-avatar { flex: 0 0 auto; width: 40px; height: 40px; font-size: 16px; }
.rp-pick-name { flex: 1; min-width: 0; overflow: hidden; font-size: 15px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.rp-pick-check {
    display: none;
    place-items: center;
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    border-radius: 50%;
    color: var(--rp-pick-accent, #a51043);
    background: #fff;
    font-size: 14px;
}
.rp-pick-option.selected .rp-pick-check { display: grid; }
@media (max-width: 299px) { .rp-pick-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .rp-pick-option { transition: none; } }
/* /answer-marks.css */
/*
 * Answer marks: the one upright ✓ / ✕ pair for right and wrong answers in every game.
 * SVG masks instead of font glyphs, so the shape never depends on the game font
 * (no italic or slanted checks) and the colour always comes from the theme
 * (--rp-correct / --rp-wrong / --rp-*-ink, see COMMON/roomplay-palettes.html).
 *
 * Markup:  <span class="rp-mark rp-mark--correct" aria-hidden="true"></span>
 *          <span class="rp-mark rp-mark--wrong" aria-hidden="true"></span>
 * The mark is 1em and takes currentColor; size and colour come from the context.
 * Pseudo-elements reuse the same shapes through --rp-icon-check / --rp-icon-cross
 * (bare glyph) and --rp-icon-check-badge / --rp-icon-cross-badge (glyph in a circle).
 */
:root {
    --rp-icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12.5l5 5L19.5 7'/%3E%3C/svg%3E");
    --rp-icon-cross: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round'%3E%3Cpath d='M6.8 6.8l10.4 10.4M17.2 6.8L6.8 17.2'/%3E%3C/svg%3E");
    /* Filled circle with the check cut out, and a ring around the cross. */
    --rp-icon-check-badge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cmask id='m'%3E%3Crect width='24' height='24' fill='%23fff'/%3E%3Cpath d='M7.2 12.4l3.2 3.2 6.4-6.6' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/mask%3E%3Ccircle cx='12' cy='12' r='12' mask='url(%23m)'/%3E%3C/svg%3E");
    --rp-icon-cross-badge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10.8' stroke-width='2.4'/%3E%3Cpath d='M8.4 8.4l7.2 7.2M15.6 8.4l-7.2 7.2' stroke-width='2.4'/%3E%3C/svg%3E");
}

.rp-mark {
    display: inline-block;
    flex: none;
    width: 1em;
    height: 1em;
    vertical-align: -0.14em;
    background-color: currentColor;
    -webkit-mask: var(--rp-icon-check) center / contain no-repeat;
    mask: var(--rp-icon-check) center / contain no-repeat;
}

.rp-mark--wrong {
    -webkit-mask-image: var(--rp-icon-cross);
    mask-image: var(--rp-icon-cross);
}
/* /packs.css */
/* ==================== */
/* Shared Pack Styles   */
/* ==================== */

.packs-container {
    flex: 1;
    overflow-y: auto;
    padding-top: 4px;
    padding-bottom: 20px;
}

/* Layout: List (row cards, e.g. ALIAS) */
.packs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Layout: Grid (2 columns, e.g. yesno) */
.packs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* Layout: Illustrated square gallery */
/* `.screen.` outranks the `.rp-local/.rp-direct .screen { height: auto }` reset, so the
   gallery scrolls inside a screen-tall layout and Play stays pinned at the bottom. */
.screen.packs-illustrated-screen {
    height: 100vh;
    height: var(--app-height, 100dvh);
    min-height: 0;
    overflow: hidden;
}

.packs-illustrated-content {
    min-height: 0;
    overflow: hidden;
}

.packs-illustrated-scroll {
    width: 100%;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    /* Room for the selected card's glow and tap pop, so its top edge is never cut. */
    padding: 8px 4px 18px;
    /* Soft edge above the action bar instead of a hard cut, hinting there is more below. */
    -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 16px), transparent);
    mask-image: linear-gradient(180deg, #000 calc(100% - 16px), transparent);
}

.packs-illustrated-actions {
    position: relative;
    z-index: 5;
    flex: 0 0 auto;
    width: 100%;
    margin-top: 0;
    background: linear-gradient(180deg, rgba(13, 19, 41, 0) 0%, var(--bg-primary) 14px);
}

/* One header geometry on every pack screen (the NHIE layout): back button and title share
   the first 44px row at the same height, subtitle right under it. Themes keep their own
   fonts and colours; only position and spacing are pinned, hence the !important against
   per-game margins and absolute offsets. */
.screen.packs-screen-shell {
    position: relative;
    padding-top: calc(20px + env(safe-area-inset-top, 0px)) !important;
}

.screen.packs-screen-shell > .screen-content {
    padding-top: 0 !important;
}

.screen.packs-screen-shell > .btn-back {
    position: absolute !important;
    z-index: 6;
    top: calc(20px + env(safe-area-inset-top, 0px)) !important;
    left: 12px !important;
    right: auto !important;
    width: 44px;
    height: 44px;
    margin: 0 !important;
    transform: none !important;
}

.screen.packs-screen-shell .title {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    margin: 0 0 2px !important;
    padding: 0 48px !important;
    line-height: 1.1;
    text-align: center;
}

.screen.packs-screen-shell .title + .subtitle {
    margin: 0 0 16px !important;
    text-align: center;
}

.screen.packs-screen-shell .packs-container {
    margin-top: 0 !important;
}

.screen.packs-screen-shell .subtitle + .subtitle {
    margin-top: -10px !important;
}

/* Compact action bar on every pack screen (any layout): on short phones the stacked
   summary card + settings + Play took ~240px and left the gallery a ~300px window. The
   settings button shares one row with Play, so the gallery keeps most of the screen.
   `.screen .bottom-section` lifts specificity above per-game theme rules. */
.screen .bottom-section.packs-compact-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 8px 10px;
    padding-top: 10px;
}

.screen .bottom-section.packs-compact-actions > * {
    flex: 1 1 100%;
    min-width: 0;
    margin: 0;
}

.screen .bottom-section.packs-compact-actions > .packs-summary {
    order: -2;
    padding: 6px 12px;
    line-height: 20px;
}

/* The count lives inside Play (packs.js `_mirrorCountIntoPlay`); the summary card stays
   in the DOM as the games' data source. */
.screen .bottom-section.packs-count-in-play > .packs-summary {
    display: none;
}

.screen .bottom-section.packs-count-in-play > .btn-play {
    flex-wrap: wrap;
    align-content: center;
    row-gap: 1px;
    line-height: 1.15;
}

.packs-play-count {
    display: block;
    flex-basis: 100%;
    font-size: 12px;
    font-weight: 600;
    opacity: 0.82;
}

.packs-play-count:empty {
    display: none;
}

.screen .bottom-section.packs-compact-actions > .form-message {
    order: -1;
}

.screen .bottom-section.packs-compact-actions > :is(.btn-additional-settings, .btn-settings-link) {
    flex: 1 1 0;
    min-height: 54px;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.15;
}

.screen .bottom-section.packs-compact-actions > .btn-play {
    flex: 1.35 1 0;
    min-height: 54px;
    padding: 8px 16px;
}

@media (max-width: 380px) {
    .screen .bottom-section.packs-compact-actions > :is(.btn-additional-settings, .btn-settings-link) {
        padding: 6px 8px;
        font-size: 13px;
    }

    .screen .bottom-section.packs-compact-actions > .btn-play {
        flex-grow: 1;
    }
}

.packs-illustrated-grid {
    --packs-accent: var(--accent-pink);
    --packs-feedback-rgb: 255, 59, 111;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 12px;
    width: 100%;
}

.packs-illustrated-grid .pack-card {
    isolation: isolate;
    aspect-ratio: 1;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border: 2px solid rgba(148, 163, 184, 0.72);
    border-radius: 18px;
    background: var(--bg-card);
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.28);
    transform: translateZ(0);
}

.packs-illustrated-grid .pack-card.premium,
.packs-illustrated-grid .pack-card.locked {
    border-color: rgba(148, 163, 184, 0.72);
    background: var(--bg-card);
}

.packs-illustrated-grid .pack-card.selected,
.packs-illustrated-grid .pack-card.premium.selected {
    border-color: var(--packs-accent);
    background: var(--bg-card);
    box-shadow: 0 0 0 2px rgba(var(--packs-feedback-rgb), 0.28),
                0 14px 30px rgba(var(--packs-feedback-rgb), 0.24);
}

.packs-illustrated-grid .pack-card.locked {
    opacity: 1;
}

.packs-illustrated-grid .pack-art {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    border-radius: 0;
    object-fit: cover;
    transition: transform 0.35s cubic-bezier(0.18, 0.82, 0.22, 1), filter 0.25s ease;
}

.packs-illustrated-grid .pack-card.locked .pack-art {
    filter: brightness(0.66) saturate(0.78);
}

.packs-illustrated-grid .pack-art-shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg,
        rgba(7, 11, 25, 0.02) 28%,
        rgba(7, 11, 25, 0.38) 58%,
        rgba(7, 11, 25, 0.94) 100%);
}

.packs-illustrated-grid .pack-copy {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 11px;
    text-align: left;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
}

.packs-illustrated-grid .pack-name {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: clamp(13px, 3.8vw, 16px);
    font-weight: 800;
    line-height: 1.08;
    color: #fff;
}

.packs-illustrated-grid .pack-count {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.1;
}

.packs-illustrated-grid .premium-badge {
    position: absolute;
    top: 9px;
    right: 9px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background: rgba(10, 15, 31, 0.74);
    font-size: 14px;
    line-height: 1;
    backdrop-filter: blur(6px);
}

.packs-illustrated-grid .pack-lock-image {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: 68px;
    height: 68px;
    object-fit: contain;
    transform: translate(-50%, -58%);
    filter: drop-shadow(0 8px 13px rgba(0, 0, 0, 0.55));
}

@media (hover: hover) {
    .packs-illustrated-grid .pack-card:not(.locked):hover {
        border-color: var(--packs-accent);
        transform: translateY(-3px);
        box-shadow: 0 0 0 2px rgba(var(--packs-feedback-rgb), 0.2),
                    0 16px 34px rgba(var(--packs-feedback-rgb), 0.22);
    }

    .packs-illustrated-grid .pack-card:not(.locked):hover .pack-art {
        transform: scale(1.045);
    }
}

/* ---- Pack Card (common) ---- */
.pack-card {
    background: var(--bg-card);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    display: flex;
    align-items: center;
}

@media (hover: hover) {
    .pack-card:hover {
        transform: translateY(-2px);
        border-color: var(--accent-pink);
    }
}

.pack-card:active {
    transform: scale(0.98);
}

/* List layout card */
.packs-list .pack-card {
    flex-direction: row;
    gap: 16px;
    padding: 16px 20px;
    width: 100%;
}

/* Grid layout card */
.packs-grid .pack-card {
    flex-direction: column;
    gap: 8px;
    padding: 20px 16px;
    text-align: center;
}

.packs-grid .pack-card:active {
    transform: scale(0.97);
}

/* ---- State Styles ---- */
.pack-card.selected {
    border-color: var(--accent-pink);
    background: linear-gradient(135deg, rgba(255, 59, 111, 0.15) 0%, rgba(74, 108, 247, 0.15) 100%);
}

.pack-card.premium {
    border-color: rgba(255, 215, 0, 0.3);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(255, 215, 0, 0.08) 100%);
}

.pack-card.premium.selected {
    border-color: #ffd700;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 59, 111, 0.1) 100%);
}

.pack-card.locked {
    opacity: 0.7;
    cursor: not-allowed;
}

@media (hover: hover) {
    .pack-card.locked:hover {
        transform: none;
        border-color: rgba(255, 215, 0, 0.3);
    }
}

.pack-card.locked:active {
    transform: none;
}

/* Opt-in press feedback plus a CSS fallback for selection animation. */
.pack-card.packs-touch-press:not(.locked) {
    transform: scale(0.965);
    box-shadow: 0 0 0 3px rgba(255, 92, 138, 0.26), 0 8px 22px rgba(233, 30, 99, 0.24);
}

.pack-card.packs-touch-press:not(.locked) .pack-art {
    transform: scale(1.09);
    transition-duration: 0.12s;
}

.pack-card.packs-touch-pop:not(.locked) {
    animation: packsTouchPop 0.68s cubic-bezier(0.18, 0.82, 0.22, 1);
}

.pack-card.packs-touch-pop:not(.locked) .pack-art {
    animation: packsArtTouchPop 0.68s cubic-bezier(0.18, 0.82, 0.22, 1);
}

@keyframes packsTouchPop {
    0% { transform: scale(calc(1 - .06 * var(--rp-motion-pack-intensity, 1))); }
    55% { transform: scale(calc(1 + .035 * var(--rp-motion-pack-intensity, 1))); }
    100% { transform: scale(1); }
}

@keyframes packsArtTouchPop {
    0% { transform: scale(calc(1 + .12 * var(--rp-motion-pack-intensity, 1))); }
    100% { transform: scale(calc(1 + .01 * var(--rp-motion-pack-intensity, 1))); }
}

@media (prefers-reduced-motion: reduce) {
    .pack-card.packs-touch-press,
    .pack-card.packs-touch-pop,
    .pack-card.packs-touch-pop .pack-art {
        animation: none;
        transform: none;
    }

    /* Native WebViews can report reduced motion by default. The opt-in illustrated
       gallery keeps its short selection feedback so taps never feel unresponsive. */
    .packs-illustrated-grid .pack-card.packs-touch-press:not(.locked) {
        transform: scale(0.965);
    }

    .packs-illustrated-grid .pack-card.packs-touch-pop:not(.locked) {
        animation: packsTouchPop 0.68s cubic-bezier(0.18, 0.82, 0.22, 1);
    }

    .packs-illustrated-grid .pack-card.packs-touch-pop:not(.locked) .pack-art {
        animation: packsArtTouchPop 0.68s cubic-bezier(0.18, 0.82, 0.22, 1);
    }
}

/* ---- Elements ---- */
.pack-icon {
    font-size: 36px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.pack-art {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
}

.pack-art-progressive {
    opacity: 0.9;
}

.pack-art-progressive.is-full-res {
    opacity: 1;
    transition: opacity 0.2s ease;
}

.packs-list .pack-art {
    width: 56px;
    height: 56px;
    border-radius: 12px;
}

.pack-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pack-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.pack-count {
    font-size: 13px;
    color: var(--text-secondary);
}

.pack-status {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Premium badge — inline in list, absolute in grid. Crown and lock are SVG (pack-glyph), not emoji. */
.premium-badge {
    font-size: 18px;
    color: #ffd166;
}

.pack-glyph {
    display: block;
    flex: none;
}

/* Premium pack the test sites open to everyone: the crown badge widens into a pill with «Тест». */
.premium-badge--test {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.premium-badge-test-label {
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.02em;
}

.packs-illustrated-grid .premium-badge.premium-badge--test,
.packs-illustrated-grid--3 .premium-badge.premium-badge--test {
    display: flex;
    width: auto;
    padding: 0 8px 0 6px;
    border-radius: 999px;
}

.packs-illustrated-grid--3 .premium-badge.premium-badge--test {
    padding: 0 6px 0 5px;
}

.packs-illustrated-grid--3 .premium-badge-test-label {
    font-size: 9px;
}

.packs-grid .premium-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 14px;
}

.pack-lock {
    font-size: 20px;
}

.pack-lock-image {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.packs-grid .pack-lock {
    margin-top: 4px;
}

.pack-check {
    width: 26px;
    height: 26px;
    background: var(--accent-pink);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    font-weight: 700;
}

/* ---- Shake Animation ---- */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.pack-card.shake {
    animation: shake 0.3s ease;
}

/* ---- Summary Bar ---- */
.packs-summary {
    text-align: center;
    margin-bottom: 12px;
    padding: 12px;
    background: var(--bg-card);
    border-radius: 12px;
}

.summary-text {
    color: var(--text-secondary);
    font-size: 14px;
}

.summary-text strong {
    color: var(--accent-pink);
    font-size: 18px;
}

/* ---- Responsive: Small screens ---- */
@media (max-width: 480px) {
    .packs-list,
    .packs-grid {
        gap: 10px;
    }

    .packs-illustrated-grid {
        gap: 10px;
    }

    .packs-illustrated-grid .pack-card {
        border-radius: 14px;
    }

    .pack-card {
        border-radius: 12px;
    }

    .packs-list .pack-card {
        padding: 14px 16px;
        gap: 12px;
    }

    .packs-grid .pack-card {
        padding: 16px 12px;
    }

    .pack-icon {
        font-size: 30px;
    }

    .pack-name {
        font-size: 14px;
    }

    .pack-count {
        font-size: 12px;
    }

    .premium-badge {
        font-size: 14px;
    }

    .pack-check {
        width: 22px;
        height: 22px;
        font-size: 12px;
    }

    .packs-summary {
        padding: 10px;
    }

    .summary-text {
        font-size: 13px;
    }

    .summary-text strong {
        font-size: 16px;
    }
}

/* ---- Responsive: Large screens ---- */
@media (min-width: 768px) {
    .packs-list,
    .packs-grid {
        gap: 16px;
    }

    .packs-illustrated-grid {
        gap: 16px;
    }

    .packs-illustrated-grid .pack-name {
        font-size: 17px;
    }

    .packs-list .pack-card {
        padding: 18px 24px;
    }

    .pack-icon {
        font-size: 42px;
    }

    .pack-name {
        font-size: 18px;
    }

    .pack-count {
        font-size: 14px;
    }
}

/* ==================== */
/* Choice gate          */
/* ==================== */

/* Until a pack is picked, the screen's actions are removed and the action bar
   loses its backdrop, so the gallery uses the whole screen with nothing covering it. */
.packs-awaiting-choice .bottom-section :is(.btn-play, .btn-additional-settings, .btn-settings-link, .packs-summary),
.packs-awaiting-choice .bottom-section .rp-setup-actions:not(:has(> :not(.btn-play, .btn-additional-settings, .btn-settings-link, .packs-summary))) {
    display: none !important;
}

.packs-awaiting-choice .bottom-section {
    padding-top: 0;
    background: none;
}

.packs-choice-cue {
    position: absolute;
    z-index: 6;
    top: 8px;
    right: 8px;
    width: 64px;
    height: 56px;
    color: var(--packs-cue-color, var(--packs-accent, var(--accent-pink, #ff3b6f)));
    pointer-events: none;
    filter: drop-shadow(0 3px 0 var(--packs-cue-shadow, rgba(255, 255, 255, 0.92)));
}

.packs-choice-cue svg {
    display: block;
    width: 100%;
    height: 100%;
}

.packs-list .packs-choice-cue {
    top: 50%;
    right: 12px;
    width: 46px;
    height: 40px;
    margin-top: -20px;
}

@media (prefers-reduced-motion: no-preference) {
    .packs-choice-cue {
        animation: packs-choice-point 800ms ease-in-out infinite alternate;
    }

    .packs-choice-revealed .bottom-section :is(.btn-play, .btn-additional-settings, .btn-settings-link, .packs-summary) {
        animation: packs-choice-reveal 420ms cubic-bezier(0.2, 0.9, 0.3, 1.25) both;
    }

    .packs-choice-revealed .bottom-section .btn-play {
        animation-delay: 60ms;
    }
}

@keyframes packs-choice-point {
    from { transform: translate(calc(3px * var(--rp-motion-artwork-intensity, 1)), calc(-3px * var(--rp-motion-artwork-intensity, 1))); }
    to { transform: translate(calc(-8px * var(--rp-motion-artwork-intensity, 1)), calc(8px * var(--rp-motion-artwork-intensity, 1))); }
}

@keyframes packs-choice-reveal {
    from { opacity: 0; transform: translateY(12px) scale(0.96); }
    to { opacity: 1; transform: none; }
}

/* ==================== */
/* Flat character covers */
/* ==================== */

/* Packs with an animated cover (pack.activeImage) use the flat character art:
   premium covers stay at full colour and a small flat lock sits in the top-right
   corner instead of the centred glossy lock, in every layout. */
.pack-card.pack-card--flat-art.locked {
    opacity: 1;
}

.pack-card.pack-card--flat-art.locked .pack-art {
    filter: none;
}

.pack-card.pack-card--flat-art .pack-lock-image {
    position: absolute;
    top: 10px;
    right: 10px;
    left: auto;
    z-index: 2;
    width: 34px;
    height: 34px;
    margin: 0;
    transform: none;
    filter: drop-shadow(0 2px 6px rgba(23, 25, 31, 0.35));
}

/* ==================== */
/* Selected state       */
/* ==================== */

/* Every game marks a picked pack the same clear way: a thick ring in the game's cue
   colour (palette atlas, checked for contrast with the ink outline) plus a check badge
   in the top-left corner (the lock sits top-right, and a picked pack is never locked).
   `.screen` + `!important` win over per-game theme borders that were too subtle. */
.screen .pack-card {
    --packs-select: var(--packs-cue-color, var(--packs-accent, var(--accent-pink, #ff3b6f)));
}

.screen .pack-card.selected:not(.locked),
.screen .pack-card.premium.selected:not(.locked) {
    border-color: var(--packs-select) !important;
    border-width: 4px !important;
    border-style: solid !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16), 0 10px 26px rgba(0, 0, 0, 0.32) !important;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--packs-select) 45%, transparent),
                0 10px 26px rgba(0, 0, 0, 0.32) !important;
}

.pack-selected-mark {
    position: absolute;
    z-index: 7;
    top: 8px;
    left: 8px;
    display: none;
    width: 32px;
    height: 32px;
    border: 2.5px solid #fff;
    border-radius: 50%;
    background-color: var(--packs-select);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23111211' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 20px 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.pack-card.selected:not(.locked) > .pack-selected-mark {
    display: block;
}

@media (prefers-reduced-motion: no-preference) {
    .pack-card.selected:not(.locked) > .pack-selected-mark {
        animation: packs-mark-pop 260ms cubic-bezier(0.2, 0.9, 0.3, 1.4) both;
    }
}

@keyframes packs-mark-pop {
    from { transform: scale(0.4); opacity: 0; }
    to { transform: none; opacity: 1; }
}

/* Long single words (German, Scandinavian) hyphenate where the browser can; otherwise
   packs.js `_fitPackText` shrinks the name so whole words fit. */
.pack-card .pack-name {
    -webkit-hyphens: auto;
    hyphens: auto;
}

/* The shared badge replaces the old list-layout ✓. */
.pack-card .pack-check {
    display: none;
}


/* «Выбрать все» tile (packs.js adds it first when no pack is premium): a flat card fan on
   the game's cue colour instead of cover art; selected when every pack is picked. */
.pack-card.pack-select-all {
    cursor: pointer;
}

/* `.screen` beats theme rules sized for cover images (Quiz shrinks .pack-art to 72%). */
.screen .packs-illustrated-grid .pack-select-all-art {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    height: 100%;
    padding: 14% 0 0;
    box-sizing: border-box;
    background: radial-gradient(circle at 50% 36%, color-mix(in srgb, var(--packs-select) 34%, transparent) 0 38%, transparent 62%);
}

.packs-illustrated-grid .pack-select-all-art .pack-select-all-icon {
    width: 64%;
    height: auto;
    transition: transform 0.35s cubic-bezier(0.18, 0.82, 0.22, 1);
}

.packs-illustrated-grid .pack-select-all.selected .pack-select-all-icon {
    transform: scale(1.06) rotate(-3deg);
}

.packs-grid .pack-select-all > .pack-select-all-icon,
.packs-list .pack-select-all > .pack-select-all-icon {
    flex-shrink: 0;
    width: 56px;
    height: auto;
}

/* Plain grid with cover art: the fan fills the cover box (`.pack-art`, sized by the game
   theme) instead of a 56px icon in the corner. */
.screen .packs-grid .pack-select-all-art {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--packs-select) 34%, transparent) 0 42%, transparent 66%);
}

.packs-grid .pack-select-all-art .pack-select-all-icon {
    width: 82%;
    max-height: 100%;
    height: auto;
    transition: transform 0.35s cubic-bezier(0.18, 0.82, 0.22, 1);
}

.packs-grid .pack-select-all.selected .pack-select-all-art .pack-select-all-icon {
    transform: scale(1.06) rotate(-3deg);
}

/* Illustrated grid, three in a row (Packs.render `columns: 3`): for games with many packs.
   Smaller covers, so the name, count, lock and «selected» mark shrink with them. */
.packs-illustrated-grid.packs-illustrated-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.packs-illustrated-grid--3 .pack-card {
    border-radius: 14px;
}

.packs-illustrated-grid--3 .pack-copy {
    left: 7px;
    right: 7px;
    bottom: 7px;
}

.packs-illustrated-grid--3 .pack-name {
    font-size: clamp(11px, 3vw, 14px);
}

.packs-illustrated-grid--3 .pack-count {
    margin-top: 2px;
    font-size: 10px;
}

.packs-illustrated-grid--3 .premium-badge {
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    font-size: 12px;
}

.packs-illustrated-grid--3 .pack-lock-image {
    width: 46px;
    height: 46px;
}

.packs-illustrated-grid--3 .pack-card > .pack-selected-mark {
    top: 6px;
    left: 6px;
    width: 24px;
    height: 24px;
    border-width: 2px;
    background-size: 15px 15px;
}

@media (min-width: 768px) {
    .packs-illustrated-grid.packs-illustrated-grid--3 {
        gap: 12px;
    }

    .packs-illustrated-grid--3 .pack-name {
        font-size: 15px;
    }
}

/* Section heading inside a pack list (a pack's `section`, e.g. Melody «Режимы» / «Наборы»): spans the
   whole row of any layout, so modes and packs read as two groups. */
.packs-section-title {
    grid-column: 1 / -1;
    margin: 10px 2px 0;
    font-family: var(--font-display, inherit);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 0.02em;
    color: var(--text-secondary, rgba(255, 255, 255, 0.72));
}

.packs-section-title:first-child {
    margin-top: 0;
}
/* /confirm-dialog.css */
/*
 * Back/exit confirmation dialog. Game Themes recolour it through the --rp-dialog-* tokens
 * (shared with settings-popup.css), set once on :root or [data-rp-game] in the theme:
 *   --rp-dialog-overlay, --rp-dialog-bg, --rp-dialog-border, --rp-dialog-shadow, --rp-dialog-radius,
 *   --rp-dialog-title, --rp-dialog-text, --rp-dialog-primary-bg, --rp-dialog-primary-text,
 *   --rp-dialog-primary-shadow, --rp-dialog-btn-radius, --rp-dialog-secondary-bg,
 *   --rp-dialog-secondary-border, --rp-dialog-secondary-text.
 * Fallbacks are the original navy look, so a game without tokens is unchanged. Unset tokens
 * follow related ones: secondary text = --rp-dialog-text; in the settings popup the value and
 * −/+ text = --rp-dialog-title, the toggle text = --rp-dialog-text and the «on» toggle = the primary button.
 */
.confirm-dialog-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--rp-dialog-overlay, rgba(0, 0, 0, 0.85));
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.confirm-dialog-overlay.active {
    display: flex;
}

.confirm-dialog-modal {
    background: var(--rp-dialog-bg, linear-gradient(135deg, #252b4a 0%, #1a2140 100%));
    border: var(--rp-dialog-border, none);
    box-shadow: var(--rp-dialog-shadow, none);
    border-radius: var(--rp-dialog-radius, 24px);
    padding: 32px 24px;
    max-width: 340px;
    width: 100%;
    text-align: center;
}

.confirm-dialog-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--rp-dialog-title, #ffffff);
    margin-bottom: 8px;
}

.confirm-dialog-subtitle {
    font-size: 14px;
    color: var(--rp-dialog-text, #8892b0);
    margin-bottom: 24px;
}

.confirm-dialog-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.confirm-dialog-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--rp-dialog-btn-radius, 30px);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.confirm-dialog-btn-confirm {
    background: var(--rp-dialog-primary-bg, linear-gradient(135deg, #ff3b6f, #cc2f59));
    color: var(--rp-dialog-primary-text, white);
    box-shadow: var(--rp-dialog-primary-shadow, none);
}

.confirm-dialog-btn-cancel {
    background: var(--rp-dialog-secondary-bg, transparent);
    border: 2px solid var(--rp-dialog-secondary-border, #3a4167);
    color: var(--rp-dialog-secondary-text, var(--rp-dialog-text, #8892b0));
}

/* Optional «why are you leaving» chips (ConfirmDialog.show(..., { reasons: true })). */
.confirm-dialog-reasons {
    margin: -8px 0 20px;
}
.confirm-dialog-reasons[hidden] { display: none; }
.confirm-dialog-reasons-title {
    font-size: 13px;
    color: var(--rp-dialog-text, #8892b0);
    margin-bottom: 10px;
}
.confirm-dialog-reason-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.confirm-dialog-reason {
    min-height: 36px;
    padding: 7px 14px;
    border: 1.5px solid var(--rp-dialog-secondary-border, #3a4167);
    border-radius: 18px;
    background: transparent;
    color: var(--rp-dialog-title, #ffffff);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}
.confirm-dialog-reason:active { transform: scale(0.95); }
.confirm-dialog-reason[aria-pressed="true"] {
    background: var(--rp-dialog-primary-bg, linear-gradient(135deg, #ff3b6f, #cc2f59));
    border-color: transparent;
    color: var(--rp-dialog-primary-text, #ffffff);
}
.confirm-dialog-reason:focus-visible { outline: 2px solid var(--rp-dialog-primary-text, #ffffff); outline-offset: 2px; }
/* /ui-icons.css */
/*
 * UI icons: one flat SVG icon family for interface chrome instead of emoji.
 * Emoji look different on every platform (Apple, Google, Samsung, Windows), ignore the
 * game palette and break the "one vector family" rule in docs/ROOMPLAY_DESIGN_RULES.md.
 * These are 24x24 shapes on a 2.1 round stroke (or solid fills), used as SVG masks, so
 * the icon is 1em and takes currentColor: size and colour always come from the context.
 *
 * Markup:  <span class="rp-icon rp-icon--pause" aria-hidden="true"></span>
 * Pseudo-elements reuse the shapes through --rp-icon-<name>, e.g.
 *   .btn::before { content: ""; width: 1em; height: 1em; background: currentColor;
 *                  -webkit-mask: var(--rp-icon-dice) center / contain no-repeat;
 *                  mask: var(--rp-icon-dice) center / contain no-repeat; }
 * Right/wrong marks stay in answer-marks.css (.rp-mark); gender signs in player-gender.css.
 */
:root {
    --rp-icon-pause: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='4.5' width='4.2' height='15' rx='1.6' fill='%23000' stroke='none'/%3E%3Crect x='13.8' y='4.5' width='4.2' height='15' rx='1.6' fill='%23000' stroke='none'/%3E%3C/svg%3E");
    --rp-icon-play: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 5.6v12.8a1.1 1.1 0 0 0 1.7.93l10-6.4a1.1 1.1 0 0 0 0-1.86l-10-6.4A1.1 1.1 0 0 0 8 5.6Z' fill='%23000' stroke='none'/%3E%3C/svg%3E");
    --rp-icon-video: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.8' y='6.3' width='12.6' height='11.4' rx='2.4'/%3E%3Cpath d='M15.4 10.4l4.5-2.7a.8.8 0 0 1 1.2.7v7.2a.8.8 0 0 1-1.2.7l-4.5-2.7Z' fill='%23000'/%3E%3C/svg%3E");
    --rp-icon-skip: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 6.3v11.4a1 1 0 0 0 1.55.83L15 12.83a1 1 0 0 0 0-1.66L6.55 5.47A1 1 0 0 0 5 6.3Z' fill='%23000' stroke='none'/%3E%3Cpath d='M18.6 5.5v13'/%3E%3C/svg%3E");
    --rp-icon-crown: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 7.5l4.6 4.2L12 5l3.9 6.7 4.6-4.2-1.7 10.3a1 1 0 0 1-1 .8H6.2a1 1 0 0 1-1-.8Z' fill='%23000' stroke='none'/%3E%3C/svg%3E");
    --rp-icon-card: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5.5' width='18' height='13' rx='2.6'/%3E%3Cpath d='M3 10h18M7 14.8h3.5'/%3E%3C/svg%3E");
    --rp-icon-sound: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 9.6v4.8a1 1 0 0 0 1 1h3l4.3 3.6a.7.7 0 0 0 1.2-.54V5.54a.7.7 0 0 0-1.2-.54L7.5 8.6h-3a1 1 0 0 0-1 1Z' fill='%23000' stroke='none'/%3E%3Cpath d='M16 9a4.2 4.2 0 0 1 0 6M18.8 6.3a8 8 0 0 1 0 11.4'/%3E%3C/svg%3E");
    --rp-icon-vibrate: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='3.5' width='8' height='17' rx='2.2'/%3E%3Cpath d='M4.8 8.5v7M19.2 8.5v7M2 10.5v3M22 10.5v3'/%3E%3C/svg%3E");
    --rp-icon-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.2l2.7 5.5 6 .9-4.35 4.25 1.03 6L12 17l-5.38 2.85 1.03-6L3.3 9.6l6-.9Z' fill='%23000' stroke='none' stroke-linejoin='round'/%3E%3C/svg%3E");
    --rp-icon-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4.8' y='10.3' width='14.4' height='10.2' rx='2.6' fill='%23000' stroke='none'/%3E%3Cpath d='M8 10.3V8a4 4 0 0 1 8 0v2.3'/%3E%3C/svg%3E");
    --rp-icon-dice: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.8' y='3.8' width='16.4' height='16.4' rx='4.2'/%3E%3Ccircle cx='8.6' cy='8.6' r='1.5' fill='%23000' stroke='none'/%3E%3Ccircle cx='12' cy='12' r='1.5' fill='%23000' stroke='none'/%3E%3Ccircle cx='15.4' cy='15.4' r='1.5' fill='%23000' stroke='none'/%3E%3C/svg%3E");
    --rp-icon-eye: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12Z'/%3E%3Ccircle cx='12' cy='12' r='3.1' fill='%23000' stroke='none'/%3E%3C/svg%3E");
    --rp-icon-list: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4.5' y='3.5' width='15' height='17' rx='2.6'/%3E%3Cpath d='M8.5 8.5h7M8.5 12.5h7M8.5 16.5h4'/%3E%3C/svg%3E");
    --rp-icon-refresh: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19.5 10.5A7.8 7.8 0 0 0 5.7 7.2L4.3 8.8'/%3E%3Cpath d='M4.3 4.3v4.5h4.5'/%3E%3Cpath d='M4.5 13.5a7.8 7.8 0 0 0 13.8 3.3l1.4-1.6'/%3E%3Cpath d='M19.7 19.7v-4.5h-4.5'/%3E%3C/svg%3E");
    --rp-icon-heart: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20.3s-8.3-4.9-8.3-11a4.6 4.6 0 0 1 8.3-2.7 4.6 4.6 0 0 1 8.3 2.7c0 6.1-8.3 11-8.3 11Z' fill='%23000' stroke='none'/%3E%3C/svg%3E");
    --rp-icon-skull: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath fill-rule='evenodd' d='M12 2.8a8.3 8.3 0 0 0-8.3 8.3c0 2.7 1.25 4.6 3.1 5.7v2.4a1.6 1.6 0 0 0 1.6 1.6h7.2a1.6 1.6 0 0 0 1.6-1.6v-2.4c1.85-1.1 3.1-3 3.1-5.7A8.3 8.3 0 0 0 12 2.8ZM6.9 11.3a2.2 2.2 0 1 0 4.4 0a2.2 2.2 0 1 0-4.4 0ZM12.7 11.3a2.2 2.2 0 1 0 4.4 0a2.2 2.2 0 1 0-4.4 0ZM12 13.9l-1.2 2h2.4Z' fill='%23000' stroke='none'/%3E%3C/svg%3E");
    --rp-icon-close: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 6.5l11 11M17.5 6.5l-11 11'/%3E%3C/svg%3E");
    --rp-icon-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.2'/%3E%3Cpath d='M15.2 15.2l5 5'/%3E%3C/svg%3E");
    --rp-icon-ballot: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.5 11V4.5h9V11'/%3E%3Cpath d='M9.8 7.9l1.5 1.5 2.9-2.9'/%3E%3Cpath d='M3.8 11h16.4v8a1.5 1.5 0 0 1-1.5 1.5H5.3A1.5 1.5 0 0 1 3.8 19Z'/%3E%3Cpath d='M8.5 15h7'/%3E%3C/svg%3E");
    --rp-icon-bolt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13.4 2.6L5.2 13.4h6.1l-1 8 8.5-11h-6.2Z' fill='%23000' stroke='none' stroke-linejoin='round'/%3E%3C/svg%3E");
    --rp-icon-dove: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 6.2c-1.1-.9-2.9-1-4.1 0-1.2.9-1.6 2.3-2.7 3.5L9.5 4.2C8.3 7.1 8.6 9.6 10.1 11.5L3 12.4c1.2 3.8 4.6 6.4 8.7 6.4 4.6 0 7.4-3.4 7.4-7.4V9.2l1.9-.9Z' fill='%23000' stroke='none' stroke-linejoin='round'/%3E%3C/svg%3E");
    --rp-icon-radiation: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='2.2' fill='%23000' stroke='none'/%3E%3Cpath d='M10.20 8.88L7.25 3.77A9.5 9.5 0 0 1 16.75 3.77L13.80 8.88A3.6 3.6 0 0 0 10.20 8.88ZM15.60 12.00L21.50 12.00A9.5 9.5 0 0 1 16.75 20.23L13.80 15.12A3.6 3.6 0 0 0 15.60 12.00ZM10.20 15.12L7.25 20.23A9.5 9.5 0 0 1 2.50 12.00L8.40 12.00A3.6 3.6 0 0 0 10.20 15.12Z' fill='%23000' stroke='none'/%3E%3C/svg%3E");
    --rp-icon-stop: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath fill-rule='evenodd' d='M12 2.8a9.2 9.2 0 1 0 0 18.4a9.2 9.2 0 1 0 0-18.4ZM6.8 10.4h10.4v3.2H6.8Z' fill='%23000' stroke='none'/%3E%3C/svg%3E");
    --rp-icon-phone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6.8' y='2.5' width='10.4' height='19' rx='2.6'/%3E%3Cpath d='M10.5 18.3h3'/%3E%3C/svg%3E");
    --rp-icon-bug: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='7.2' y='8' width='9.6' height='12.5' rx='4.8'/%3E%3Cpath d='M9.4 8a2.6 2.6 0 0 1 5.2 0M10.2 5.6L8.8 3.6M13.8 5.6l1.4-2M7.2 11.2L4 9.4M7.2 14.4H3.6M7.6 17.6l-3.2 1.8M16.8 11.2L20 9.4M16.8 14.4h3.6M16.4 17.6l3.2 1.8'/%3E%3C/svg%3E");
    --rp-icon-doc: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 3.5h7.6l4.4 4.4v11.2a1.4 1.4 0 0 1-1.4 1.4H6.5a1.4 1.4 0 0 1-1.4-1.4V4.9a1.4 1.4 0 0 1 1.4-1.4Z'/%3E%3Cpath d='M13.8 3.7v4.5h4.5M8.6 12.6h6.8M8.6 16.4h6.8'/%3E%3C/svg%3E");
    --rp-icon-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.2' y='4.5' width='17.6' height='15' rx='2.6'/%3E%3Ccircle cx='8.8' cy='9.6' r='1.7' fill='%23000' stroke='none'/%3E%3Cpath d='M3.8 17.2l5-4.9 3.8 3.7 2.6-2.5 5 4.4'/%3E%3C/svg%3E");
    --rp-icon-users: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8.2' r='3.6' fill='%23000' stroke='none'/%3E%3Cpath d='M2.3 19.8c.8-3.6 3.4-5.6 6.7-5.6s5.9 2 6.7 5.6Z' fill='%23000' stroke='none'/%3E%3Ccircle cx='16.8' cy='7.4' r='3' fill='%23000' stroke='none'/%3E%3Cpath d='M16.9 12.6c2.6.2 4.3 2.2 4.9 5.2h-3.9' fill='%23000' stroke='none'/%3E%3C/svg%3E");
    --rp-icon-spy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 10.4h16M6.6 10.4l1.5-5.2a1.2 1.2 0 0 1 1.6-.8l2.3.9 2.3-.9a1.2 1.2 0 0 1 1.6.8l1.5 5.2Z' stroke-linejoin='round'/%3E%3Ccircle cx='8.4' cy='15.6' r='2.8'/%3E%3Ccircle cx='15.6' cy='15.6' r='2.8'/%3E%3Cpath d='M11.2 15.4a1.6 1.6 0 0 1 1.6 0'/%3E%3C/svg%3E");
    --rp-icon-check-circle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.2'/%3E%3Cpath d='M7.8 12.4l2.9 2.9 5.5-5.8'/%3E%3C/svg%3E");
    --rp-icon-sad: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.2'/%3E%3Cpath d='M8.4 16.4c2-1.9 5.2-1.9 7.2 0'/%3E%3Ccircle cx='9' cy='10' r='1.3' fill='%23000' stroke='none'/%3E%3Ccircle cx='15' cy='10' r='1.3' fill='%23000' stroke='none'/%3E%3C/svg%3E");
    --rp-icon-hourglass: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 3.5h11M6.5 20.5h11'/%3E%3Cpath d='M8 3.5c0 4.4 4 5 4 8.5s-4 4.1-4 8.5M16 3.5c0 4.4-4 5-4 8.5s4 4.1 4 8.5'/%3E%3C/svg%3E");
    --rp-icon-gear: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath fill-rule='evenodd' d='M12.72 4.74L14.76 2.91L16.48 3.62L16.63 6.36L17.64 7.37L20.38 7.52L21.09 9.24L19.26 11.28L19.26 12.72L21.09 14.76L20.38 16.48L17.64 16.63L16.63 17.64L16.48 20.38L14.76 21.09L12.72 19.26L11.28 19.26L9.24 21.09L7.52 20.38L7.37 17.64L6.36 16.63L3.62 16.48L2.91 14.76L4.74 12.72L4.74 11.28L2.91 9.24L3.62 7.52L6.36 7.37L7.37 6.36L7.52 3.62L9.24 2.91L11.28 4.74ZM12 8.8a3.2 3.2 0 1 0 0 6.4a3.2 3.2 0 1 0 0-6.4Z' fill='%23000' stroke='none'/%3E%3C/svg%3E");
    --rp-icon-laugh: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.2'/%3E%3Cpath d='M7.6 13.2h8.8a4.4 4.4 0 0 1-8.8 0Z' fill='%23000' stroke='none'/%3E%3Cpath d='M8 9.6l1.6-1.2M16 9.6l-1.6-1.2'/%3E%3C/svg%3E");
    --rp-icon-palette: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.4a8.6 8.6 0 0 0 0 17.2c1.3 0 2-.8 2-1.8 0-1.3-1.2-1.7-1.2-2.9 0-1.1.9-1.9 2-1.9h1.9a3.9 3.9 0 0 0 3.9-3.9c0-3.8-3.8-6.7-8.6-6.7Z'/%3E%3Ccircle cx='7.6' cy='11.4' r='1.4' fill='%23000' stroke='none'/%3E%3Ccircle cx='10.2' cy='7.4' r='1.4' fill='%23000' stroke='none'/%3E%3Ccircle cx='15' cy='7.6' r='1.4' fill='%23000' stroke='none'/%3E%3C/svg%3E");
    --rp-icon-puzzle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 8h3.7a2.3 2.3 0 1 1 4.6 0h3.7v3.7a2.3 2.3 0 1 1 0 4.6V20h-12Z' stroke-linejoin='round'/%3E%3C/svg%3E");
    --rp-icon-chat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6.5A2.5 2.5 0 0 1 6.5 4h11A2.5 2.5 0 0 1 20 6.5v8a2.5 2.5 0 0 1-2.5 2.5H11l-4.6 3.6V17h0A2.4 2.4 0 0 1 4 14.5Z' stroke-linejoin='round'/%3E%3Cpath d='M8.5 9.4h7M8.5 12.6h4.5'/%3E%3C/svg%3E");
    --rp-icon-masks: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 4.6c5-1.7 10-1.7 15 0v6.2c0 5-3.3 9-7.5 9s-7.5-4-7.5-9Z'/%3E%3Cpath d='M7.6 9.6c.9-.8 2.1-.8 3 0M13.4 9.6c.9-.8 2.1-.8 3 0'/%3E%3Cpath d='M8.4 13.2h7.2a3.6 3.6 0 0 1-7.2 0Z' fill='%23000' stroke='none'/%3E%3C/svg%3E");
    --rp-icon-question: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.2'/%3E%3Cpath d='M9.4 9.5a2.7 2.7 0 1 1 3.9 2.4c-.8.4-1.3 1-1.3 1.9v.4'/%3E%3Ccircle cx='12' cy='17.1' r='1.35' fill='%23000' stroke='none'/%3E%3C/svg%3E");
    --rp-icon-globe: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.2'/%3E%3Cpath d='M2.8 12h18.4M12 2.8c2.6 2.6 3.8 5.7 3.8 9.2s-1.2 6.6-3.8 9.2c-2.6-2.6-3.8-5.7-3.8-9.2S9.4 5.4 12 2.8Z'/%3E%3C/svg%3E");
    --rp-icon-download: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.8v11M7.4 10.6 12 15.2l4.6-4.6M4.5 19.6h15'/%3E%3C/svg%3E");
    --rp-icon-flag: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 20.5V3.8'/%3E%3Cpath d='M5.5 4.6h12.2l-2.7 4.3 2.7 4.3H5.5Z' fill='%23000'/%3E%3C/svg%3E");
    --rp-icon-thumb: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.2 10.6V20H4.4a1.1 1.1 0 0 1-1.1-1.1v-7.2a1.1 1.1 0 0 1 1.1-1.1Z'/%3E%3Cpath d='M7.2 10.6l3.7-6.6a1.9 1.9 0 0 1 3.5 1.3l-.8 4.1h5a2 2 0 0 1 2 2.4l-1.3 6.6A2.2 2.2 0 0 1 17.1 20H7.2'/%3E%3C/svg%3E");
    --rp-icon-thumb-filled: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.2 10.6V20H4.4a1.1 1.1 0 0 1-1.1-1.1v-7.2a1.1 1.1 0 0 1 1.1-1.1Z'/%3E%3Cpath d='M7.2 10.6l3.7-6.6a1.9 1.9 0 0 1 3.5 1.3l-.8 4.1h5a2 2 0 0 1 2 2.4l-1.3 6.6A2.2 2.2 0 0 1 17.1 20H7.2'/%3E%3C/svg%3E");
    --rp-icon-move: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='14.6' cy='4.4' r='2.2' fill='%23000' stroke='none'/%3E%3Cpath d='M13.6 8.6l-2.4 5.6 3.8 2.7-1 4.6'/%3E%3Cpath d='M11.2 14.2l-2.4 3.5-4.3.6'/%3E%3Cpath d='M6.3 10.6l3.4-2.6 3.9.6 2.6 3.2 3 .5'/%3E%3C/svg%3E");
    --rp-icon-grid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.6' y='3.6' width='7' height='7' rx='1.9'/%3E%3Crect x='13.4' y='3.6' width='7' height='7' rx='1.9'/%3E%3Crect x='3.6' y='13.4' width='7' height='7' rx='1.9'/%3E%3Crect x='13.4' y='13.4' width='7' height='7' rx='1.9'/%3E%3C/svg%3E");
    --rp-icon-funnel: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4.5h16a.9.9 0 0 1 .7 1.5l-6.2 7.3v5.5a.9.9 0 0 1-.5.8l-2.7 1.4a.7.7 0 0 1-1-.6v-7.1L3.3 6a.9.9 0 0 1 .7-1.5Z'/%3E%3C/svg%3E");
    --rp-icon-split: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21v-6.2a3 3 0 0 0-.9-2.1L5.5 7.1M12 14.8a3 3 0 0 1 .9-2.1l5.6-5.6'/%3E%3Cpath d='M4.6 11.4V6.2h5.2M19.4 11.4V6.2h-5.2'/%3E%3C/svg%3E");
    --rp-icon-stack: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.3l8.6 4.3L12 11.9 3.4 7.6Z' fill='%23000' stroke='none'/%3E%3Cpath d='M3.4 12.1 12 16.4l8.6-4.3M3.4 16.4 12 20.7l8.6-4.3'/%3E%3C/svg%3E");
    --rp-icon-flow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3.5' width='7.5' height='6.5' rx='1.8' fill='%23000' stroke='none'/%3E%3Crect x='14.6' y='14' width='6.4' height='6.5' rx='1.8'/%3E%3Cpath d='M6.8 10v4.2a3 3 0 0 0 3 3h2.4M10 14.6l2.6 2.6-2.6 2.6'/%3E%3C/svg%3E");
    --rp-icon-mic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8.8' y='2.8' width='6.4' height='11.4' rx='3.2' fill='%23000' stroke='none'/%3E%3Cpath d='M5.4 11.2a6.6 6.6 0 0 0 13.2 0M12 17.8v3.4M8.6 21.2h6.8'/%3E%3C/svg%3E");
    --rp-icon-chart: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4v16h16'/%3E%3Cpath d='M8 15.5l3.6-4.2 3 2.6L19.5 8'/%3E%3Cpath d='M15.6 8h3.9v3.9'/%3E%3C/svg%3E");
    --rp-icon-coins: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.2'/%3E%3Cpath d='M12 5.9v12.2M14.9 9.3c-.4-1-1.5-1.6-2.9-1.6-1.6 0-2.8.8-2.8 2 0 2.8 5.7 1.5 5.7 4.4 0 1.2-1.2 2.1-2.9 2.1-1.4 0-2.6-.6-3-1.7' stroke-width='1.8'/%3E%3C/svg%3E");
    --rp-icon-menu: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 7h15M4.5 12h15M4.5 17h15' stroke-width='2.4'/%3E%3C/svg%3E");
    --rp-icon-exit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13.5 4.5H7a1.5 1.5 0 0 0-1.5 1.5v12A1.5 1.5 0 0 0 7 19.5h6.5'/%3E%3Cpath d='M11 12h9.5M17 8.5l3.5 3.5-3.5 3.5'/%3E%3C/svg%3E");
    --rp-icon-sparkle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 3.2c.7 4 2.8 6.1 6.8 6.8-4 .7-6.1 2.8-6.8 6.8-.7-4-2.8-6.1-6.8-6.8 4-.7 6.1-2.8 6.8-6.8Z' fill='%23000' stroke='none'/%3E%3Cpath d='M18 13.6c.35 1.9 1.3 2.85 3.2 3.2-1.9.35-2.85 1.3-3.2 3.2-.35-1.9-1.3-2.85-3.2-3.2 1.9-.35 2.85-1.3 3.2-3.2Z' fill='%23000' stroke='none'/%3E%3C/svg%3E");
    --rp-icon-more: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='5.5' cy='12' r='2' fill='%23000' stroke='none'/%3E%3Ccircle cx='12' cy='12' r='2' fill='%23000' stroke='none'/%3E%3Ccircle cx='18.5' cy='12' r='2' fill='%23000' stroke='none'/%3E%3C/svg%3E");
}

.rp-icon {
    display: inline-block;
    flex: none;
    width: 1em;
    height: 1em;
    vertical-align: -0.14em;
    background-color: currentColor;
    -webkit-mask: var(--rp-icon-star) center / contain no-repeat;
    mask: var(--rp-icon-star) center / contain no-repeat;
}

/*
 * Icon drawn in front of a label whose text is set by i18n (textContent), so the icon
 * cannot live in the markup: <button class="rp-icon-before">, and the game CSS picks
 * the shape with --rp-icon-before: var(--rp-icon-dice).
 */
.rp-icon-before::before {
    content: "";
    display: inline-block;
    width: 1.15em;
    height: 1.15em;
    margin-right: 0.4em;
    vertical-align: -0.2em;
    background-color: currentColor;
    -webkit-mask: var(--rp-icon-before, var(--rp-icon-star)) center / contain no-repeat;
    mask: var(--rp-icon-before, var(--rp-icon-star)) center / contain no-repeat;
}

.rp-icon--pause { -webkit-mask-image: var(--rp-icon-pause); mask-image: var(--rp-icon-pause); }
.rp-icon--play { -webkit-mask-image: var(--rp-icon-play); mask-image: var(--rp-icon-play); }
.rp-icon--video { -webkit-mask-image: var(--rp-icon-video); mask-image: var(--rp-icon-video); }
.rp-icon--skip { -webkit-mask-image: var(--rp-icon-skip); mask-image: var(--rp-icon-skip); }
.rp-icon--crown { -webkit-mask-image: var(--rp-icon-crown); mask-image: var(--rp-icon-crown); }
.rp-icon--card { -webkit-mask-image: var(--rp-icon-card); mask-image: var(--rp-icon-card); }
.rp-icon--sound { -webkit-mask-image: var(--rp-icon-sound); mask-image: var(--rp-icon-sound); }
.rp-icon--vibrate { -webkit-mask-image: var(--rp-icon-vibrate); mask-image: var(--rp-icon-vibrate); }
.rp-icon--star { -webkit-mask-image: var(--rp-icon-star); mask-image: var(--rp-icon-star); }
.rp-icon--lock { -webkit-mask-image: var(--rp-icon-lock); mask-image: var(--rp-icon-lock); }
.rp-icon--dice { -webkit-mask-image: var(--rp-icon-dice); mask-image: var(--rp-icon-dice); }
.rp-icon--eye { -webkit-mask-image: var(--rp-icon-eye); mask-image: var(--rp-icon-eye); }
.rp-icon--list { -webkit-mask-image: var(--rp-icon-list); mask-image: var(--rp-icon-list); }
.rp-icon--refresh { -webkit-mask-image: var(--rp-icon-refresh); mask-image: var(--rp-icon-refresh); }
.rp-icon--skull { -webkit-mask-image: var(--rp-icon-skull); mask-image: var(--rp-icon-skull); }
.rp-icon--heart { -webkit-mask-image: var(--rp-icon-heart); mask-image: var(--rp-icon-heart); }
.rp-icon--close { -webkit-mask-image: var(--rp-icon-close); mask-image: var(--rp-icon-close); }
.rp-icon--search { -webkit-mask-image: var(--rp-icon-search); mask-image: var(--rp-icon-search); }
.rp-icon--ballot { -webkit-mask-image: var(--rp-icon-ballot); mask-image: var(--rp-icon-ballot); }
.rp-icon--bolt { -webkit-mask-image: var(--rp-icon-bolt); mask-image: var(--rp-icon-bolt); }
.rp-icon--dove { -webkit-mask-image: var(--rp-icon-dove); mask-image: var(--rp-icon-dove); }
.rp-icon--radiation { -webkit-mask-image: var(--rp-icon-radiation); mask-image: var(--rp-icon-radiation); }
.rp-icon--stop { -webkit-mask-image: var(--rp-icon-stop); mask-image: var(--rp-icon-stop); }
.rp-icon--phone { -webkit-mask-image: var(--rp-icon-phone); mask-image: var(--rp-icon-phone); }
.rp-icon--doc { -webkit-mask-image: var(--rp-icon-doc); mask-image: var(--rp-icon-doc); }
.rp-icon--bug { -webkit-mask-image: var(--rp-icon-bug); mask-image: var(--rp-icon-bug); }
.rp-icon--image { -webkit-mask-image: var(--rp-icon-image); mask-image: var(--rp-icon-image); }
.rp-icon--users { -webkit-mask-image: var(--rp-icon-users); mask-image: var(--rp-icon-users); }
.rp-icon--spy { -webkit-mask-image: var(--rp-icon-spy); mask-image: var(--rp-icon-spy); }
.rp-icon--check-circle { -webkit-mask-image: var(--rp-icon-check-circle); mask-image: var(--rp-icon-check-circle); }
.rp-icon--sad { -webkit-mask-image: var(--rp-icon-sad); mask-image: var(--rp-icon-sad); }
.rp-icon--hourglass { -webkit-mask-image: var(--rp-icon-hourglass); mask-image: var(--rp-icon-hourglass); }
.rp-icon--gear { -webkit-mask-image: var(--rp-icon-gear); mask-image: var(--rp-icon-gear); }
.rp-icon--laugh { -webkit-mask-image: var(--rp-icon-laugh); mask-image: var(--rp-icon-laugh); }
.rp-icon--palette { -webkit-mask-image: var(--rp-icon-palette); mask-image: var(--rp-icon-palette); }
.rp-icon--puzzle { -webkit-mask-image: var(--rp-icon-puzzle); mask-image: var(--rp-icon-puzzle); }
.rp-icon--chat { -webkit-mask-image: var(--rp-icon-chat); mask-image: var(--rp-icon-chat); }
.rp-icon--masks { -webkit-mask-image: var(--rp-icon-masks); mask-image: var(--rp-icon-masks); }
.rp-icon--question { -webkit-mask-image: var(--rp-icon-question); mask-image: var(--rp-icon-question); }
.rp-icon--globe { -webkit-mask-image: var(--rp-icon-globe); mask-image: var(--rp-icon-globe); }
.rp-icon--download { -webkit-mask-image: var(--rp-icon-download); mask-image: var(--rp-icon-download); }
.rp-icon--flag { -webkit-mask-image: var(--rp-icon-flag); mask-image: var(--rp-icon-flag); }
.rp-icon--thumb { -webkit-mask-image: var(--rp-icon-thumb); mask-image: var(--rp-icon-thumb); }
.rp-icon--thumb-filled { -webkit-mask-image: var(--rp-icon-thumb-filled); mask-image: var(--rp-icon-thumb-filled); }
.rp-icon--move { -webkit-mask-image: var(--rp-icon-move); mask-image: var(--rp-icon-move); }
.rp-icon--grid { -webkit-mask-image: var(--rp-icon-grid); mask-image: var(--rp-icon-grid); }
.rp-icon--funnel { -webkit-mask-image: var(--rp-icon-funnel); mask-image: var(--rp-icon-funnel); }
.rp-icon--split { -webkit-mask-image: var(--rp-icon-split); mask-image: var(--rp-icon-split); }
.rp-icon--stack { -webkit-mask-image: var(--rp-icon-stack); mask-image: var(--rp-icon-stack); }
.rp-icon--flow { -webkit-mask-image: var(--rp-icon-flow); mask-image: var(--rp-icon-flow); }
.rp-icon--mic { -webkit-mask-image: var(--rp-icon-mic); mask-image: var(--rp-icon-mic); }
.rp-icon--chart { -webkit-mask-image: var(--rp-icon-chart); mask-image: var(--rp-icon-chart); }
.rp-icon--coins { -webkit-mask-image: var(--rp-icon-coins); mask-image: var(--rp-icon-coins); }
.rp-icon--menu { -webkit-mask-image: var(--rp-icon-menu); mask-image: var(--rp-icon-menu); }
.rp-icon--exit { -webkit-mask-image: var(--rp-icon-exit); mask-image: var(--rp-icon-exit); }
.rp-icon--sparkle { -webkit-mask-image: var(--rp-icon-sparkle); mask-image: var(--rp-icon-sparkle); }
.rp-icon--more { -webkit-mask-image: var(--rp-icon-more); mask-image: var(--rp-icon-more); }
/* /premium-cta.css */
/* Premium upsell button (owner 2026-10-20): a pearlescent foil that slowly wobbles in 3D, like the
 * cards in Balatro, so it never blends into a game's own palette. Shared: any game puts
 * class="rp-premium-cta" on its upsell button and links /premium-cta.css. The glare moves with the tilt;
 * with prefers-reduced-motion the button stays flat and still. No emoji: the optional crown is
 * --rp-icon-crown from ui-icons.css (class rp-premium-cta--crown). */

.rp-premium-cta {
    --rp-pearl-ink: #2b1236;
    position: relative;
    isolation: isolate;
    display: block;
    width: 100%;
    min-height: 58px;
    padding: 12px 18px;
    border: 0;
    border-radius: 20px;
    overflow: hidden;
    color: var(--rp-pearl-ink);
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: 0;
    text-align: center;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .55);
    cursor: pointer;
    background:
        linear-gradient(115deg, #fde7f1 0%, #e4d4ff 18%, #cdf3ee 34%, #fff3c9 50%, #ffd6e6 66%, #d9d1ff 82%, #fde7f1 100%);
    background-size: 280% 100%;
    background-position: 0% 50%;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .9),
        inset 0 -3px 0 rgba(120, 70, 140, .22),
        0 0 0 1px rgba(255, 255, 255, .55),
        0 12px 28px rgba(190, 140, 255, .35),
        0 4px 12px rgba(0, 0, 0, .25);
    transform-style: preserve-3d;
    -webkit-tap-highlight-color: transparent;
}

/* Fine foil grain and the moving glare. */
.rp-premium-cta::before,
.rp-premium-cta::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
}
.rp-premium-cta::before {
    z-index: -1;
    background:
        repeating-linear-gradient(115deg, rgba(255, 255, 255, 0) 0 6px, rgba(255, 255, 255, .22) 6px 7px),
        radial-gradient(120% 140% at 0% 0%, rgba(255, 255, 255, .55), transparent 55%);
    mix-blend-mode: soft-light;
}
.rp-premium-cta::after {
    z-index: 1;
    background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .75) 46%, rgba(255, 255, 255, .15) 54%, transparent 70%);
    background-size: 250% 100%;
    background-position: 100% 0;
    mix-blend-mode: overlay;
}

.rp-premium-cta--crown .rp-premium-cta-label::before {
    content: "";
    display: inline-block;
    width: 19px;
    height: 19px;
    margin-right: 8px;
    vertical-align: -3px;
    background: linear-gradient(135deg, #b0487a, #6d3fbf);
    -webkit-mask: var(--rp-icon-crown) center / contain no-repeat;
    mask: var(--rp-icon-crown) center / contain no-repeat;
}
.rp-premium-cta-label { position: relative; z-index: 2; }

.rp-premium-cta:active { filter: brightness(.96); }
.rp-premium-cta:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

@media (prefers-reduced-motion: no-preference) {
    .rp-premium-cta {
        animation: rp-pearl-tilt 4.8s ease-in-out infinite, rp-pearl-shift 4.8s ease-in-out infinite;
    }
    .rp-premium-cta::after { animation: rp-pearl-glare 4.8s ease-in-out infinite; }
    .rp-premium-cta:active { animation-play-state: paused; }
}

/* A slow circle: the tilt goes round the four edges, the colour band and the glare follow it. */
@keyframes rp-pearl-tilt {
    0%, 100% { transform: perspective(520px) rotateX(5deg) rotateY(0deg); }
    25% { transform: perspective(520px) rotateX(0deg) rotateY(-9deg); }
    50% { transform: perspective(520px) rotateX(-5deg) rotateY(0deg); }
    75% { transform: perspective(520px) rotateX(0deg) rotateY(9deg); }
}
@keyframes rp-pearl-shift {
    0%, 100% { background-position: 50% 50%; }
    25% { background-position: 100% 50%; }
    50% { background-position: 50% 50%; }
    75% { background-position: 0% 50%; }
}
@keyframes rp-pearl-glare {
    0%, 100% { background-position: 55% 0; opacity: .7; }
    25% { background-position: 0% 0; opacity: 1; }
    50% { background-position: 45% 0; opacity: .7; }
    75% { background-position: 100% 0; opacity: 1; }
}

/* Premium sample card (premium-teasers.js): the chip «Из премиум-набора «…»» on the card and a
 * pink glow around it. The same in every game; the chip sits on any card colour. */
.rp-premium-teaser {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    margin: 6px auto;
    padding: 6px 12px 6px 9px;
    border-radius: 999px;
    background: rgba(23, 25, 31, .82);
    border: 1px solid rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.25;
    text-align: left;
    text-shadow: none;
}
.rp-premium-teaser::before {
    content: "";
    flex: none;
    width: 15px;
    height: 15px;
    background: #ff8fa6;
    -webkit-mask: var(--rp-icon-crown) center / contain no-repeat;
    mask: var(--rp-icon-crown) center / contain no-repeat;
}
.rp-premium-teaser[hidden], .rp-premium-teaser-cta[hidden] { display: none; }
.rp-premium-teaser-card {
    box-shadow: 0 0 0 2px rgba(255, 122, 147, .55), 0 0 34px rgba(255, 35, 80, .38), 0 18px 40px rgba(0, 0, 0, .35) !important;
}
.rp-premium-teaser-cta { max-width: 420px; margin: 14px auto 0; }

/* Compact size for a tight game screen (a card, answer buttons and a player row on one phone screen):
 * the same pearl button one line high and the chip in smaller type, so the sample does not squeeze the card.
 * Used by the online «Я никогда не» card screen. */
.rp-premium-cta--compact {
    min-height: 44px;
    padding: 8px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.2;
}
.rp-premium-cta--compact.rp-premium-cta--crown .rp-premium-cta-label::before {
    width: 16px;
    height: 16px;
    margin-right: 6px;
}
.rp-premium-teaser--compact {
    gap: 5px;
    margin: 4px auto;
    padding: 4px 10px 4px 8px;
    font-size: 12px;
}
.rp-premium-teaser--compact::before { width: 13px; height: 13px; }
/* /video-task.css */
/* «Сними ролик» (video-task.js, owner 2026-10-22): the quiet button «Получи до 7 500 ₽ за это видео. Как?»
 * inside the task card, right under the task text, and the sheet with two ways to be paid.
 * Calm on purpose (owner: it must not look like an ad banner): no shine, no pulse, it takes the
 * card's own ink (currentColor) on a light tint, «Как?» underlined like a link.
 * No emoji: icons from ui-icons.css. With prefers-reduced-motion nothing moves. */

.rp-video-task-cta[hidden] { display: none; }

.rp-video-task-cta {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    margin: 16px 0 0;
    padding: 10px 14px;
    border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
    border-radius: 14px;
    background: color-mix(in srgb, currentColor 10%, transparent);
    color: inherit;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: normal;
    text-transform: none;
    text-align: left;
    cursor: pointer;
    transition: background .15s ease, transform .1s ease;
    -webkit-tap-highlight-color: transparent;
}
.rp-video-task-cta .rp-icon { flex: none; width: 20px; height: 20px; }
.rp-video-task-cta-how { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.rp-video-task-cta:hover { background: color-mix(in srgb, currentColor 16%, transparent); }
.rp-video-task-cta:active { transform: scale(.98); }
.rp-video-task-cta:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.rp-video-task-card {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .45), 0 18px 40px rgba(0, 0, 0, .35) !important;
}
/* The video task is not a card of the deck: no thumbs and no report flag on it. */
.rp-video-task-card .rp-card-vote,
.rp-video-task-card .rp-report-flag { visibility: hidden; }

/* The sheet: RoomPlay core surfaces, like «Час Premium за репост» (share-pass.js). */
.rp-video-task-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(10, 15, 31, .72);
    opacity: 0;
    transition: opacity .2s ease;
}
.rp-video-task-overlay.visible { opacity: 1; }
.rp-video-task-sheet {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    max-width: 480px;
    max-height: 100%;
    overflow-y: auto;
    padding: 24px 16px calc(20px + env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
    background: #1a2140;
    color: #fff;
    font-family: inherit;
    text-align: center;
    transform: translateY(24px);
    transition: transform .2s ease;
}
.rp-video-task-overlay.visible .rp-video-task-sheet { transform: none; }
.rp-video-task-sheet:focus { outline: none; }
.rp-video-task-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    font-size: 20px;
    opacity: .75;
    cursor: pointer;
}
.rp-video-task-title { margin: 8px 40px 8px; font-size: 22px; font-weight: 800; line-height: 1.25; }
.rp-video-task-lead { margin: 0 0 16px; font-size: 16px; line-height: 1.45; color: #c9cfe6; }
.rp-video-task-option {
    margin: 0 0 12px;
    padding: 18px 16px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    text-align: left;
}
.rp-video-task-option-icon { display: block; width: 28px; height: 28px; margin: 0 0 8px; }
.rp-video-task-option--premium .rp-video-task-option-icon { color: #ffd166; }
.rp-video-task-option--money .rp-video-task-option-icon { color: #6ee7b7; }
.rp-video-task-option-title { margin: 0 0 6px; font-size: 18px; font-weight: 800; line-height: 1.25; }
.rp-video-task-option-text { margin: 0 0 14px; font-size: 15px; line-height: 1.45; color: #c9cfe6; }
.rp-video-task-option-cta {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 10px 16px;
    border: 0;
    border-radius: 30px;
    background: var(--settings-accent, #7c3aed);
    color: var(--rp-video-cta-ink, #fff);
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}
.rp-video-task-option--money .rp-video-task-option-cta {
    background: transparent;
    color: #fff;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35);
}
.rp-video-task-close:focus-visible, .rp-video-task-option-cta:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    .rp-video-task-cta { transition: none; }
    .rp-video-task-overlay, .rp-video-task-sheet { transition: none; }
}
/* /content-report.css */
/*
 * Content report sheet (client/assets/js/content-report.js) and the small flag button
 * games put on their card. Shared component: games only set the --rp-report-* tokens.
 * Defaults sit in :where(:root) (zero specificity), so a game theme's :root tokens win whether
 * its stylesheet loads before or after this one.
 */
:where(:root) {
    --rp-report-surface: #1f2438;
    --rp-report-text: #ffffff;
    --rp-report-muted: #a7aec8;
    --rp-report-line: rgba(255, 255, 255, 0.14);
    --rp-report-chip: rgba(255, 255, 255, 0.08);
    --rp-report-accent: #ff3b6f;
    --rp-report-accent-ink: #ffffff;
    --rp-report-error: var(--rp-wrong, #ff8a9a);
    --rp-report-radius: 24px;
    --rp-report-button-radius: 30px;
    --rp-report-flag: rgba(255, 255, 255, 0.55);
}

/* Flag button on the card: 44 px hit area, quiet until pressed. */
.rp-report-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--rp-report-flag);
    font-size: 18px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color 150ms ease, background-color 150ms ease, transform 150ms ease;
}
.rp-report-flag:active { transform: scale(0.9); background: rgba(255, 255, 255, 0.08); }
.rp-report-flag:focus-visible { outline: 2px solid var(--rp-report-accent); outline-offset: 2px; }
@media (hover: hover) { .rp-report-flag:hover { color: var(--rp-report-text); } }

.rp-report {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
}
.rp-report.is-open { pointer-events: auto; }
.rp-report__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 200ms ease;
}
.rp-report.is-open .rp-report__backdrop { opacity: 1; }

.rp-report__sheet {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    padding: 24px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    border-radius: var(--rp-report-radius) var(--rp-report-radius) 0 0;
    background: var(--rp-report-surface);
    color: var(--rp-report-text);
    font-family: inherit;
    transform: translateY(100%);
    transition: transform 240ms cubic-bezier(.2, .9, .3, 1);
}
.rp-report.is-open .rp-report__sheet { transform: none; }
@media (min-width: 600px) and (min-height: 560px) {
    .rp-report { align-items: center; padding: 24px; }
    .rp-report__sheet { border-radius: var(--rp-report-radius); padding-bottom: 20px; }
}

.rp-report__title {
    margin: 0 0 8px;
    font-family: Unbounded, Manrope, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.2;
    text-wrap: balance;
}
.rp-report__card {
    margin: 0 0 16px;
    padding: 8px 12px;
    border-left: 3px solid var(--rp-report-accent);
    border-radius: 4px;
    background: var(--rp-report-chip);
    color: var(--rp-report-muted);
    font-size: 15px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.rp-report__reasons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.rp-report__chip {
    min-height: 44px;
    padding: 8px 16px;
    border: 1px solid var(--rp-report-line);
    border-radius: 999px;
    background: var(--rp-report-chip);
    color: var(--rp-report-text);
    font: inherit;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}
.rp-report__chip:active { transform: scale(0.96); }
.rp-report__chip[aria-pressed="true"] {
    border-color: var(--rp-report-accent);
    background: var(--rp-report-accent);
    color: var(--rp-report-accent-ink);
}
.rp-report__comment {
    display: block;
    width: 100%;
    min-height: 64px;
    padding: 12px;
    border: 1px solid var(--rp-report-line);
    border-radius: 16px;
    background: transparent;
    color: var(--rp-report-text);
    font: inherit;
    font-size: 16px;
    resize: vertical;
    box-sizing: border-box;
}
.rp-report__comment::placeholder { color: var(--rp-report-muted); opacity: 1; }
.rp-report__status {
    min-height: 20px;
    margin: 8px 0;
    color: var(--rp-report-error);
    font-size: 14px;
}
.rp-report__actions {
    display: flex;
    gap: 8px;
}
.rp-report__button {
    flex: 1;
    min-height: 48px;
    padding: 12px 16px;
    border: 1px solid transparent;
    border-radius: var(--rp-report-button-radius);
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 150ms ease, transform 150ms ease;
}
.rp-report__button:active:not(:disabled) { transform: scale(0.97); }
.rp-report__button--primary { background: var(--rp-report-accent); color: var(--rp-report-accent-ink); }
.rp-report__button--secondary { border-color: var(--rp-report-line); background: transparent; color: var(--rp-report-text); }
.rp-report__button:disabled { opacity: 0.45; cursor: default; }
.rp-report__chip:focus-visible,
.rp-report__button:focus-visible,
.rp-report__comment:focus-visible { outline: 2px solid var(--rp-report-accent); outline-offset: 2px; }

.rp-report__sheet.is-done {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding-top: 32px;
    text-align: center;
}
.rp-report__sheet.is-done .rp-report__button { flex: none; width: 100%; }
.rp-report__done-mark {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--rp-report-accent);
    position: relative;
}
.rp-report__done-mark::after {
    content: "";
    position: absolute;
    inset: 14px;
    background: var(--rp-report-accent-ink);
    -webkit-mask: var(--rp-icon-check, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E")) center / contain no-repeat;
    mask: var(--rp-icon-check, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E")) center / contain no-repeat;
}
.rp-report__done-text { margin: 0; font-size: 17px; line-height: 1.4; }

@media (prefers-reduced-motion: reduce) {
    .rp-report__backdrop,
    .rp-report__sheet,
    .rp-report-flag,
    .rp-report__chip,
    .rp-report__button { transition: none; }
}

/* Like / dislike under the card (ContentReport.attachVotes): quiet thumbs, filled when chosen. */
.rp-card-vote[hidden] { display: none; }
.rp-card-vote {
    display: flex;
    justify-content: center;
    gap: 6px;
}
.rp-card-vote__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--rp-report-flag);
    font-size: 20px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color 150ms ease, background-color 150ms ease, transform 150ms ease;
}
.rp-card-vote__btn--dislike .rp-icon { transform: rotate(180deg); }
.rp-card-vote__btn--report { margin-left: 6px; color: var(--rp-report-flag); font-size: 18px; }
.rp-card-vote__btn[aria-pressed="true"] { color: var(--rp-report-accent); }
.rp-card-vote__btn:active { transform: scale(0.88); background: rgba(255, 255, 255, 0.08); }
.rp-card-vote__btn:focus-visible { outline: 2px solid var(--rp-report-accent); outline-offset: 2px; }
@media (hover: hover) { .rp-card-vote__btn:hover:not([aria-pressed="true"]) { color: var(--rp-report-text); } }
/* Thumbs + flag as the last row inside a content card (word, task, location): one look in every game.
   The game sets --rp-report-flag on its card to a muted tone of the card's ink (light cards need a dark one). */
.rp-card-vote--in-card { margin: 14px -8px -14px; }
.rp-card-vote--in-card .rp-card-vote__btn--report { margin-left: 0; }
@media (prefers-reduced-motion: no-preference) {
    .rp-card-vote__btn[aria-pressed="true"] .rp-icon { animation: rp-card-vote-pop 260ms ease-out; }
    .rp-card-vote__btn--dislike[aria-pressed="true"] .rp-icon { animation-name: rp-card-vote-pop-down; }
}
@keyframes rp-card-vote-pop { 0% { transform: scale(0.7); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes rp-card-vote-pop-down { 0% { transform: rotate(180deg) scale(0.7); } 60% { transform: rotate(180deg) scale(1.18); } 100% { transform: rotate(180deg) scale(1); } }
/* /settings-popup.css */
/*
 * Settings popup. Game Themes recolour it through the --rp-dialog-* tokens shared with
 * confirm-dialog.css (see there), plus the controls:
 *   --rp-dialog-control-bg (selector track), --rp-dialog-control-btn-bg / -text / -active / -radius (−/+),
 *   --rp-dialog-value, --rp-dialog-toggle-bg / -text, --rp-dialog-toggle-on-bg / -on-text.
 * The primary «Готово» falls back to --settings-accent; fallbacks keep the original navy look.
 */
.settings-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--rp-dialog-overlay, rgba(0, 0, 0, 0.85));
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.settings-popup-overlay.active {
    display: flex;
}

.settings-popup-modal {
    background: var(--rp-dialog-bg, linear-gradient(135deg, #252b4a 0%, #1a2140 100%));
    /* Base text colour for currentColor parts such as «Предложить идею». */
    color: var(--rp-dialog-title, #ffffff);
    border: var(--rp-dialog-border, none);
    box-shadow: var(--rp-dialog-shadow, none);
    border-radius: var(--rp-dialog-radius, 24px);
    padding: 32px 24px;
    max-width: 380px;
    width: 100%;
    /* A tall sheet (many rows, a short phone): the title and «Готово» stay put and only the rows
       scroll; a fade at the bottom edge (.settings-popup-content--more) shows there is more below. */
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.settings-popup-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--rp-dialog-title, #ffffff);
    margin-bottom: 24px;
    text-align: center;
}

.settings-popup-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    /* Room for focus outlines at the clipped edges. */
    margin-inline: -4px;
    padding: 2px 4px;
}
.settings-popup-content > * { flex: none; }
.settings-popup-title,
.settings-popup-done { flex: none; }
.settings-popup-content--more {
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 56px), transparent);
    mask-image: linear-gradient(to bottom, #000 calc(100% - 56px), transparent);
}

.settings-popup-row {
    /* Rows sit directly on the modal surface: Game Themes recolour the modal,
       controls and text, never the row itself (a tinted row reads as a stray strip). */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* App-wide «Звуки» / «Вибрация» rows (ui-feedback.js) follow the game's own settings,
   separated by a thin divider in the label colour; when they are the only rows, no divider. */
.settings-popup-row-app-first:not(:first-child) {
    padding-top: 16px;
    border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent);
}

.settings-popup-label {
    font-size: 15px;
    color: var(--rp-dialog-text, #c0c8e0);
    flex: 1;
    min-width: 0;
}

.settings-popup-selector {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--rp-dialog-control-bg, rgba(255, 255, 255, 0.06));
    border-radius: 14px;
    padding: 4px;
    flex-shrink: 0;
}

.settings-popup-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: var(--rp-dialog-control-btn-radius, 12px);
    background: var(--rp-dialog-control-btn-bg, rgba(255, 255, 255, 0.08));
    color: var(--rp-dialog-control-btn-text, var(--rp-dialog-title, #ffffff));
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    font-family: inherit;
}

.settings-popup-btn:active {
    background: var(--rp-dialog-control-btn-active, rgba(255, 255, 255, 0.15));
}

.settings-popup-value {
    min-width: 60px;
    padding: 0 8px;
    white-space: nowrap;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--rp-dialog-value, var(--rp-dialog-title, #ffffff));
}

.settings-popup-row-choice {
    flex-wrap: wrap;
    gap: 8px;
}

.settings-popup-row-choice .settings-popup-label {
    flex-basis: 100%;
}

/* Segmented control for `type: 'choice'`: equal options, the chosen one in the primary colour. */
.settings-popup-choice {
    flex: 1 1 100%;
    flex-wrap: wrap;
    min-width: 0;
    gap: 4px;
}

.settings-popup-choice-option {
    /* Sized by their labels, so a short «Классика» leaves room for «Большинство»; a label set
       too long for one row wraps onto a second line instead of splitting a word. */
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    min-height: 44px;
    height: auto;
    padding: 6px 4px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.15;
    overflow-wrap: anywhere;
    background: transparent;
    color: var(--rp-dialog-text, #c0c8e0);
}

.settings-popup-choice-option.active {
    color: var(--rp-dialog-toggle-on-text, var(--rp-dialog-primary-text, #ffffff));
    background: var(--rp-dialog-toggle-on-bg, var(--rp-dialog-primary-bg, var(--settings-accent, #ff3b6f)));
}

/* Phones narrower than ~380 px can't fit three or more labels in a row: list them one under another. */
@media (max-width: 380px) {
    .settings-popup-choice:has(> :nth-child(3)) { flex-direction: column; align-items: stretch; }
    .settings-popup-choice:has(> :nth-child(3)) .settings-popup-choice-option { min-height: 40px; }
}

.settings-popup-choice-option:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

.settings-popup-choice-hint {
    flex-basis: 100%;
    margin: 0;
    font-size: 13px;
    line-height: 1.35;
    color: var(--rp-dialog-text, #c0c8e0);
    opacity: 0.8;
}

.settings-popup-toggle {
    min-width: 104px;
    min-height: 48px;
    padding: 4px 6px 4px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 0;
    border-radius: 24px;
    color: var(--rp-dialog-toggle-text, var(--rp-dialog-text, #c0c8e0));
    background: var(--rp-dialog-toggle-bg, rgba(255, 255, 255, 0.08));
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.settings-popup-toggle::after {
    content: '';
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
    transition: transform 0.2s ease;
}

.settings-popup-toggle.active {
    color: var(--rp-dialog-toggle-on-text, var(--rp-dialog-primary-text, #ffffff));
    background: var(--rp-dialog-toggle-on-bg, var(--rp-dialog-primary-bg, var(--settings-accent, #ff3b6f)));
}

.settings-popup-toggle.active::after {
    transform: scale(0.78);
}

.settings-popup-toggle:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
}

.settings-popup-done {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--rp-dialog-btn-radius, 30px);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    background: var(--rp-dialog-primary-bg, linear-gradient(135deg, var(--settings-accent, #ff3b6f), var(--settings-accent-dark, #cc2f59)));
    color: var(--rp-dialog-primary-text, white);
    box-shadow: var(--rp-dialog-primary-shadow, none);
}

.btn-additional-settings {
    width: 100%;
    background: transparent;
    border: 2px solid var(--settings-accent, #ff3b6f);
    color: var(--text-primary, #ffffff);
    padding: 16px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    margin-bottom: 12px;
}

.btn-additional-settings:hover {
    background: color-mix(in srgb, var(--settings-accent, #ff3b6f) 10%, transparent);
}

.btn-additional-settings:active {
    transform: scale(0.98);
}

/* «Предложить идею»: a quiet text button under the app rows, and the idea form drawn in the
   same modal. Colours come from currentColor so every Game Theme's modal palette applies. */
.settings-popup-row-idea { justify-content: center; }
.settings-popup-idea,
.settings-popup-idea-back {
    min-height: 44px;
    padding: 8px 12px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    opacity: 0.8;
    cursor: pointer;
}
.settings-popup-idea-back { align-self: center; }
.settings-popup-idea:focus-visible,
.settings-popup-idea-back:focus-visible,
.settings-popup-idea-text:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.settings-popup-idea-hint,
.settings-popup-idea-thanks {
    margin: 0;
    font-size: 15px;
    line-height: 1.4;
    text-align: center;
    opacity: 0.85;
}
.settings-popup-idea-thanks { font-size: 17px; opacity: 1; padding: 16px 0; }
.settings-popup-idea-text {
    width: 100%;
    min-height: 112px;
    padding: 12px;
    box-sizing: border-box;
    border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
    border-radius: 16px;
    background: color-mix(in srgb, currentColor 6%, transparent);
    color: inherit;
    font: inherit;
    font-size: 16px;
    resize: vertical;
}
.settings-popup-idea-text::placeholder { color: inherit; opacity: 0.55; }
.settings-popup-idea-status { margin: 0; min-height: 18px; font-size: 14px; color: var(--rp-wrong, #ff8a9a); text-align: center; }
.settings-popup-done:disabled { opacity: 0.5; cursor: default; }

/* `type: 'link'` row: opens a game's own sub-screen. Summary text + chevron, same control
   surface as the steppers so it reads as part of the same sheet. */
.settings-popup-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    max-width: 55%;
    min-height: 48px;
    padding: 4px 12px 4px 16px;
    border: 0;
    border-radius: 14px;
    background: var(--rp-dialog-control-bg, rgba(255, 255, 255, 0.06));
    color: var(--rp-dialog-value, var(--rp-dialog-title, #ffffff));
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.settings-popup-link-value {
    min-width: 0;
    overflow-wrap: anywhere;
    text-align: right;
}

.settings-popup-link::after {
    content: '';
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-right: 2.1px solid currentColor;
    border-top: 2.1px solid currentColor;
    border-radius: 1px;
    transform: rotate(45deg);
    margin-right: 4px;
}

.settings-popup-link:active {
    background: var(--rp-dialog-control-btn-active, rgba(255, 255, 255, 0.15));
}

.settings-popup-link:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 2px;
}

/* «Получи до 7 500 ₽ за рекомендацию RoomPlay. Как?»: the video task's quiet button (video-task.css) as a settings row. */
.settings-popup-row-earn { justify-content: center; }
.settings-popup-earn.rp-video-task-cta { margin: 0; justify-content: center; }
/* /pause-overlay.css */
/*
 * Shared round pause button + overlay (see pause-overlay.js). Load before the game's styles.css;
 * game themes keep overriding .btn-pause / .pause-overlay / .pause-overlay-text directly.
 * Per-game differences go through custom properties (fallbacks are the common look):
 *   --pause-btn-bg, --pause-btn-border, --pause-btn-color, --pause-btn-padding,
 *   --pause-btn-font-size, --pause-btn-hover-bg, --pause-btn-hover-color,
 *   --pause-overlay-bg, --pause-overlay-text-color.
 * Layout-only properties (align-self, flex-shrink, min-height, z-index) stay in the game.
 * The overlay is position:absolute — the game's screen must be its positioned ancestor.
 */
.btn-pause {
    background: var(--pause-btn-bg, rgba(255, 255, 255, 0.1));
    border: 1px solid var(--pause-btn-border, rgba(255, 255, 255, 0.2));
    color: var(--pause-btn-color, var(--text-secondary));
    padding: var(--pause-btn-padding, 6px 16px);
    border-radius: 16px;
    font-size: var(--pause-btn-font-size, 13px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

@media (hover: hover) {
    .btn-pause:hover {
        background: var(--pause-btn-hover-bg, rgba(255, 255, 255, 0.2));
        color: var(--pause-btn-hover-color, var(--text-primary));
    }
}

.pause-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--pause-overlay-bg, rgba(13, 19, 41, 0.95));
    z-index: 50;
    align-items: center;
    justify-content: center;
}

.pause-overlay.active {
    display: flex;
    cursor: pointer;
}

.pause-overlay-text {
    font-size: 32px;
    font-weight: 700;
    color: var(--pause-overlay-text-color, var(--text-secondary));
}

/*
 * Online games (shared/client/online-pause.ts): the host's «Пауза» button (in the round's header, else in the top right corner) and
 * the «Пауза» / «Ждём хоста…» screen every phone sees over the game. Same tokens as above.
 */
.rp-online-pause-btn {
    position: fixed;
    top: calc(20px + env(safe-area-inset-top, 0px));
    right: 16px;
    z-index: 60;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.rp-online-pause-btn[hidden] { display: none; }
/* Inside the round's .game-header: between the round title and the timer. */
.rp-online-pause-btn--inline {
    position: static;
    flex-shrink: 0;
    margin: 0 8px;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

#online-pause-overlay.pause-overlay--online,
#pause-overlay.pause-overlay--local,
.pause-overlay.pause-overlay--local.pause-overlay--local {
    /* One palette in every game (owner 2026-10-21: game themes made the title unreadable): a dark
       scrim with white text, whatever the game's own --text-* and --pause-* tokens are. */
    --rp-pause-ink: #ffffff;
    --rp-pause-muted: rgba(255, 255, 255, 0.74);
    --rp-pause-chip: rgba(255, 255, 255, 0.12);
    --rp-pause-line: rgba(255, 255, 255, 0.26);
    background: rgba(9, 11, 20, 0.9);
    color: var(--rp-pause-ink);
    position: fixed;
    z-index: 980;
    padding: 24px 16px;
    box-sizing: border-box;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.pause-overlay--online.active {
    cursor: default;
    animation: rp-pause-in 220ms ease-out;
}
.rp-pause-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 340px;
    text-align: center;
}
.rp-pause-badge {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    margin-bottom: 4px;
    border-radius: 50%;
    background: var(--rp-pause-chip);
    border: 1px solid var(--rp-pause-line);
    color: var(--rp-pause-ink);
    font-size: 30px;
}
.pause-overlay--away .rp-pause-badge .rp-icon { animation: rp-pause-wait 1.6s ease-in-out infinite; }
#online-pause-overlay .pause-overlay-text,
.pause-overlay--local .pause-overlay-text { color: var(--rp-pause-ink); }
/* One-phone games (pause-overlay.js): the same card; a tap anywhere still resumes. */
.pause-overlay--local.active { animation: rp-pause-in 220ms ease-out; }
/* «Ждём игрока…»: the player the game waits on, as an avatar chip. */
.rp-pause-player {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 4px 14px 4px 4px;
    border-radius: 999px;
    background: var(--rp-pause-chip);
    border: 1px solid var(--rp-pause-line);
    color: var(--rp-pause-ink);
    font-weight: 600;
}
.rp-pause-player[hidden] { display: none; }
.rp-pause-player-avatar {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--rp-pause-line);
    font-size: 13px;
    font-weight: 700;
}
.rp-pause-player-avatar img { width: 100%; height: 100%; object-fit: cover; }
.rp-pause-player-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-pause-hint {
    font-size: 15px;
    line-height: 1.4;
    color: var(--rp-pause-muted);
}
#online-pause-overlay .rp-pause-resume,
.pause-overlay--local .rp-pause-resume.rp-pause-resume {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
    /* The same light pill in every game, not the game's .btn-play colours. */
    background: var(--rp-pause-ink);
    color: #12131a;
    border: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.rp-pause-exit {
    margin-top: 4px;
    padding: 10px 16px;
    background: none;
    border: none;
    color: var(--rp-pause-muted);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.pause-overlay--online [hidden] { display: none; }

/* The game behind the pause stops on the spot: its animations hold until the game goes on. */
html.rp-game-paused .screen,
html.rp-game-paused .screen *,
html.rp-game-paused .screen *::before,
html.rp-game-paused .screen *::after {
    animation-play-state: paused !important;
}

@keyframes rp-pause-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes rp-pause-wait {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}
@media (prefers-reduced-motion: reduce) {
    .pause-overlay--online.active,
    .pause-overlay--away .rp-pause-badge .rp-icon { animation: none; }
}
/* /game-header.css */
/*
 * «Шапка игры» (shared/client/game-header.ts, bundle /game-header.js): one top bar in every game.
 *   [menu]   [cube + roomplay]   [timer]
 * Fixed at the top; on its screens the game's own back arrow, pause button and «Ещё игры» cube are
 * hidden ([data-rp-gh-hidden]). A game theme sets only tokens, never the classes:
 *   --rp-gh-ink         icons, logo text, timer text (default: the page's --text-primary, else white)
 *   --rp-gh-chip        button and timer background (default: the ink at 14 %)
 *   --rp-gh-line        button border (default: the ink at 24 %)
 *   --rp-gh-timer-bg / --rp-gh-timer-ink   the timer chip (default: chip / ink)
 *   --rp-gh-low         the timer at 5 s and less (default: #ff4d5e)
 *   --rp-gh-space       where the header's screens start (padding-top), under the bar
 * The menu card and the actions it adds to a pause card use the pause screen's fixed dark palette
 * (pause-overlay.css).
 */
:root {
    --rp-gh-space: calc(80px + env(safe-area-inset-top, 0px));
}

.rp-game-header {
    --rp-gh-ink-v: var(--rp-gh-ink, var(--text-primary, #ffffff));
    position: fixed;
    z-index: 70;
    top: calc(12px + env(safe-area-inset-top, 0px));
    left: 50%;
    transform: translateX(-50%);
    width: min(100%, 560px);
    box-sizing: border-box;
    padding: 0 16px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) minmax(44px, auto);
    align-items: center;
    gap: 8px;
    height: 48px;
    color: var(--rp-gh-ink-v);
    font-family: 'Manrope', var(--font-body, system-ui), sans-serif;
    pointer-events: none;
}
.rp-game-header[hidden] { display: none; }
.rp-game-header > * { pointer-events: auto; }

.rp-gh-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-color: var(--rp-gh-line, color-mix(in srgb, var(--rp-gh-ink-v) 24%, transparent));
    background: rgba(255, 255, 255, 0.14);
    background: var(--rp-gh-chip, color-mix(in srgb, var(--rp-gh-ink-v) 14%, transparent));
    color: inherit;
    display: grid;
    place-items: center;
    font-size: 22px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transition: transform 0.15s ease;
}
.rp-gh-btn:active { transform: scale(0.9); }

.rp-gh-brand {
    /* Centred on the screen whatever the timer's width. */
    position: absolute;
    left: 50%;
    top: 2px;
    transform: translateX(-50%);
    max-width: calc(100% - 2 * (16px + 44px + 12px));
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 44px;
    padding: 0 10px 0 4px;
    border: 0;
    border-radius: 22px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s ease;
}
.rp-gh-brand:active { transform: translateX(-50%) scale(0.94); }
.rp-gh-cube {
    width: 34px;
    height: 34px;
    object-fit: contain;
    flex: none;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}
.rp-gh-word {
    font-family: 'Unbounded', 'Manrope', system-ui, sans-serif;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rp-gh-timer {
    grid-column: 3;
    justify-self: end;
    min-width: 44px;
    height: 44px;
    box-sizing: border-box;
    padding: 0 10px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.14);
    background: var(--rp-gh-timer-bg, var(--rp-gh-chip, color-mix(in srgb, var(--rp-gh-ink-v) 14%, transparent)));
    color: var(--rp-gh-timer-ink, inherit);
    font-size: 18px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.rp-gh-timer[hidden] { display: none; }
.rp-gh-timer--low {
    background: var(--rp-gh-low, #ff4d5e);
    color: #ffffff;
    animation: rp-gh-low 1s ease-in-out infinite;
}
@keyframes rp-gh-low {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* The header's screens start under the bar, the same distance in every game (it replaces the room
   each game kept for its own back arrow). */
html.rp-has-game-header .screen.rp-gh-screen { padding-top: var(--rp-gh-space) !important; }
/* Online games pad their .screen-content instead; the round reveal (reveal-results.css) covers the
   screen absolutely. Both start under the bar too. */
html.rp-has-game-header .screen.rp-gh-screen > .screen-content { padding-top: 0 !important; }
html.rp-has-game-header .screen.rp-gh-screen .rr-container { top: var(--rp-gh-space); }
/* An in-flow reveal (.rr-flow) already sits under the bar with the content above it. */
html.rp-has-game-header .screen.rp-gh-screen .rr-flow > .rr-container { top: auto; }
/* The round row of the game template (.game-header: round badge, timer) kept room for the old back
   arrow on the left; the arrow is gone. */
html.rp-has-game-header .screen.rp-gh-screen .game-header { padding-left: 0 !important; }

/* What the header replaces on its screens. */
[data-rp-gh-hidden] { display: none !important; }

/* The menu card (guests, games without a pause) and the actions on every pause card. */
.rp-gh-menu-overlay.active { cursor: default; }
.rp-gh-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 2px;
}
.rp-gh-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 52px;
    padding: 0 18px;
    border-radius: 30px;
    border: 2px solid var(--rp-pause-line, rgba(255, 255, 255, 0.26));
    background: transparent;
    color: var(--rp-pause-ink, #ffffff);
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}
.rp-gh-exit {
    border-color: transparent;
    color: var(--rp-pause-muted, rgba(255, 255, 255, 0.74));
}
/* «Сообщить об ошибке»: a quiet link under the card's actions, not a third big button. */
.rp-gh-report {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    align-self: center;
    min-height: 40px;
    padding: 6px 12px;
    background: none;
    border: none;
    color: var(--rp-pause-muted, rgba(255, 255, 255, 0.74));
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    opacity: 0.8;
    cursor: pointer;
}
.rp-gh-report .rp-icon { font-size: 16px; }

/* The bug report form over the pause card (shared/client/bug-report.ts): the pause palette, above it. */
.rp-bug-overlay {
    --rp-pause-ink: #ffffff;
    --rp-pause-muted: rgba(255, 255, 255, 0.74);
    --rp-pause-chip: rgba(255, 255, 255, 0.12);
    --rp-pause-line: rgba(255, 255, 255, 0.26);
    position: fixed;
    inset: 0;
    z-index: 990;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
    box-sizing: border-box;
    overflow-y: auto;
    background: rgba(9, 11, 20, 0.94);
    color: var(--rp-pause-ink);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    animation: rp-pause-in 220ms ease-out;
}
.rp-bug-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 360px;
    margin: auto;
    text-align: center;
}
.rp-bug-card [hidden] { display: none !important; }
.rp-bug-title { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.25; color: var(--rp-pause-ink); }
.rp-bug-text {
    width: 100%;
    box-sizing: border-box;
    min-height: 104px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--rp-pause-line);
    background: var(--rp-pause-chip);
    color: var(--rp-pause-ink);
    font: inherit;
    font-size: 16px;
    line-height: 1.4;
    resize: vertical;
}
.rp-bug-text::placeholder { color: var(--rp-pause-muted); opacity: 0.8; }
.rp-bug-text:focus { outline: 2px solid var(--rp-pause-ink); outline-offset: 1px; }
.rp-bug-attach {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border-radius: 30px;
    border: 2px dashed var(--rp-pause-line);
    background: transparent;
    color: var(--rp-pause-ink);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}
.rp-bug-preview { position: relative; align-self: center; }
.rp-bug-thumb {
    display: block;
    max-width: 160px;
    max-height: 160px;
    border-radius: 12px;
    border: 1px solid var(--rp-pause-line);
}
.rp-bug-remove {
    position: absolute;
    top: -10px;
    right: -10px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--rp-pause-line);
    background: #12131a;
    color: var(--rp-pause-ink);
    cursor: pointer;
}
.rp-bug-status { margin: 0; font-size: 14px; color: #ffb4b4; }
.rp-bug-overlay .rp-bug-send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 4px;
    background: var(--rp-pause-ink);
    color: #12131a;
    border: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.rp-bug-overlay .rp-bug-send:disabled { opacity: 0.45; cursor: default; box-shadow: none; }

/* The header's «Выйти из игры» replaces the online pause's own exit link. */
.rp-pause-card:has(> .rp-gh-actions) > .rp-pause-exit { display: none; }

@media (prefers-reduced-motion: reduce) {
    .rp-gh-timer--low { animation: none; }
}
/* /post-game.css */
.quiz-post-game {
    width: 100%;
    display: grid;
    gap: 14px;
    margin: 4px 0 18px;
}

.qpg-card {
    width: 100%;
    padding: 18px;
    border: 1px solid rgba(139, 92, 246, 0.28);
    border-radius: 20px;
    background: rgba(26, 33, 64, 0.82);
    text-align: left;
}

.qpg-flow-screen {
    display: grid;
    gap: 14px;
}

.qpg-flow-screen[hidden] {
    display: none;
}

.qpg-flow-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 20px;
    line-height: 1.25;
}

.qpg-flow-next {
    width: 100%;
    min-height: 52px;
    padding: 12px 18px;
    border: 0;
    border-radius: 16px;
    background: #ff3b6f;
    color: #fff;
    font: inherit;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
}

.qpg-flow-next:active {
    transform: translateY(1px);
}

.qpg-recap {
    overflow: hidden;
    background:
        radial-gradient(circle at 92% 6%, rgba(255, 59, 111, 0.19), transparent 38%),
        linear-gradient(145deg, rgba(99, 102, 241, 0.20), rgba(26, 33, 64, 0.90));
}

.qpg-kicker {
    display: block;
    margin-bottom: 7px;
    color: #f9a8d4;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.qpg-recap-title,
.qpg-section-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 20px;
    line-height: 1.25;
}

.qpg-recap-copy,
.qpg-section-hint {
    margin: 7px 0 14px;
    color: #aeb7d8;
    font-size: 14px;
    line-height: 1.45;
}

.qpg-conversation {
    display: grid;
    gap: 10px;
    margin-bottom: 15px;
}

.qpg-message {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: qpg-message-in 360ms ease both;
}

.qpg-message[hidden] {
    display: none;
}

/* Awards: a title chip and the fact it is for, in the third person. */
.qpg-award {
    align-items: center;
}

.qpg-award-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
}

.qpg-award-title {
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;
}

.qpg-award-title[hidden] {
    display: none;
}

.qpg-award .qpg-message-name {
    color: var(--onboarding-accent, #c4b5fd);
    font-size: 12px;
    font-weight: 700;
}

.qpg-award-text {
    color: rgba(255, 255, 255, .72);
    font-size: 13px;
    line-height: 1.35;
}

/* The award is revealed: the row pops in. */
.qpg-message-bubble--sent {
    animation: qpg-bubble-sent 280ms cubic-bezier(.3, 1.4, .5, 1) both;
    transform-origin: 0 0;
}

.qpg-message-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #ff3b6f);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
}

.qpg-message-avatar:has(img) {
    background: rgba(255, 255, 255, .08);
}

/* Same framing as the leaderboard avatars, so a player looks identical in both. */
.qpg-message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qpg-message-body {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.qpg-message-name {
    color: #c4b5fd;
    font-size: 12px;
}

.qpg-message-bubble {
    position: relative;
    display: inline-block;
    padding: 10px 12px;
    border-radius: 4px 14px 14px 14px;
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
    font-size: 14px;
    line-height: 1.35;
}

.qpg-share-button,
.qpg-secondary-button {
    width: 100%;
    min-height: 48px;
    padding: 10px 16px;
    border: 0;
    border-radius: 14px;
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
}

.qpg-share-button {
    border: 1px solid rgba(167, 139, 250, 0.55);
    background: rgba(139, 92, 246, 0.13);
    color: #ddd6fe;
}

.qpg-share-button:disabled,
.qpg-secondary-button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.qpg-stars {
    display: grid;
    grid-template-columns: repeat(5, minmax(44px, 1fr));
    gap: 5px;
}

.qpg-star {
    min-width: 44px;
    min-height: 48px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.07);
    color: #59617f;
    font-size: 29px;
    line-height: 1;
    cursor: pointer;
}

.qpg-star.selected {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.12);
}

.qpg-feedback {
    margin-top: 15px;
}

.qpg-feedback[hidden] {
    display: none;
}

.qpg-feedback-title,
.qpg-rating-message,
.qpg-status-loading,
.qpg-access-unavailable {
    margin: 0 0 10px;
    color: #aeb7d8;
    font-size: 13px;
    line-height: 1.4;
}

.qpg-rating-message {
    margin: 11px 0 0;
    color: #c4b5fd;
}

.qpg-rating-modal {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: grid;
    place-items: center;
    padding: max(18px, env(safe-area-inset-top, 0px)) 18px max(18px, env(safe-area-inset-bottom, 0px));
    background: rgba(7, 10, 25, .76);
    backdrop-filter: blur(8px);
}

.qpg-rating-modal[hidden] {
    display: none;
}

.qpg-rating-dialog {
    position: relative;
    width: min(100%, 390px);
    max-height: calc(100dvh - 36px);
    overflow: auto;
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .48);
}

.qpg-rating-dialog .qpg-rating {
    margin: 0;
    padding-top: 54px;
}

.qpg-rating-modal-close {
    position: absolute;
    z-index: 1;
    top: 7px;
    right: 7px;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #aeb7d8;
    font: inherit;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.qpg-rating-success {
    min-height: 210px;
    margin: 0;
    padding: 32px 24px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    background: rgba(26, 33, 64, .98);
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    text-align: center;
}

.qpg-rating-success[hidden] {
    display: none;
}

.qpg-reasons {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 10px;
}

.qpg-reason {
    min-height: 48px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: #dbe1ff;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.qpg-reason.selected {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.20);
    color: #fff;
}

.qpg-comment {
    width: 100%;
    margin-bottom: 10px;
    padding: 12px;
    resize: vertical;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 12px;
    outline: none;
    background: rgba(8, 12, 30, 0.55);
    color: #fff;
    font: inherit;
    font-size: 16px;
    line-height: 1.4;
}

.qpg-comment:focus {
    border-color: #8b5cf6;
}

.qpg-secondary-button {
    border: 1px solid rgba(139, 92, 246, 0.55);
    background: rgba(139, 92, 246, 0.13);
    color: #ddd6fe;
}

.qpg-access-line {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qpg-access-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 15px;
    background: linear-gradient(135deg, #7c3aed, #ff3b6f);
    color: #fff;
    font-size: 20px;
    font-weight: 900;
}

.qpg-access-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.qpg-access-copy strong {
    color: #fff;
    font-size: 14px;
}

.qpg-access-copy span {
    color: #aeb7d8;
    font-size: 12px;
    line-height: 1.35;
}

.qpg-access-paywall {
    width: 100%;
    min-height: 48px;
    margin-top: 14px;
    border: 1px solid rgba(167, 139, 250, 0.55);
    border-radius: 14px;
    background: rgba(139, 92, 246, 0.13);
    color: #ddd6fe;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.qpg-replay-packs {
    display: grid;
    gap: 12px;
}

.qpg-replay-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.qpg-replay-pack {
    position: relative;
    min-width: 0;
    min-height: 48px;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 16px;
    background: #1a2140;
    color: #fff;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease;
}

.qpg-replay-pack.selected {
    border-color: var(--game-accent, #ff3b6f);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--game-accent, #ff3b6f) 34%, transparent);
}

.qpg-replay-pack:not(:disabled):active {
    transform: scale(.97);
}

.qpg-replay-pack:disabled {
    cursor: default;
    opacity: .68;
}

.qpg-replay-art {
    position: relative;
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    background: #0d1329;
}

.qpg-replay-art > img:first-child {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.qpg-replay-pack.locked .qpg-replay-art > img:first-child {
    filter: none;
}

/* Same as the pack screens: flat covers stay in full colour and a small flat
   lock sits in a corner (top-left here, the check mark owns top-right). */
.qpg-replay-lock {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 30px;
    height: 30px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(23, 25, 31, .35));
}

.qpg-replay-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, .9);
    border-radius: 50%;
    background: var(--game-accent, #ff3b6f);
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
    opacity: 0;
    transform: scale(.75);
    transition: opacity 140ms ease, transform 140ms ease;
}

.qpg-replay-pack.selected .qpg-replay-check {
    opacity: 1;
    transform: scale(1);
}

.qpg-replay-copy {
    display: grid;
    gap: 2px;
    padding: 10px 11px 12px;
}

.qpg-replay-copy strong {
    font-size: 14px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.qpg-replay-copy small {
    color: #aeb7d8;
    font-size: 12px;
}

.qpg-replay-pack.locked .qpg-replay-copy small {
    color: #fbbf24;
    font-weight: 800;
}

.qpg-replay-continue {
    width: 100%;
    min-height: 52px;
    padding: 12px 18px;
    border: 0;
    border-radius: 16px;
    background: var(--game-accent, #ff3b6f);
    color: #fff;
    font: inherit;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
}

.qpg-replay-continue:disabled {
    background: #59617f;
    cursor: default;
    opacity: .65;
}

/* «Сыграть ещё раз с набором «…»»: the pack name may need a second line. */
.qpg-replay-same {
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* The packs just played, above «Сыграть ещё раз с набором «…»»: covers, name, size. */
.qpg-replay-played {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.qpg-replay-played-covers {
    display: flex;
    flex: 0 0 auto;
}

.qpg-replay-played-covers img {
    width: 64px;
    height: 64px;
    display: block;
    border: 2px solid var(--game-accent, #ff3b6f);
    border-radius: 14px;
    background: #0d1329;
    object-fit: cover;
}

.qpg-replay-played-covers img + img {
    margin-left: -26px;
}

.qpg-replay-played-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.qpg-replay-played-copy strong {
    overflow: hidden;
    font-size: 16px;
    line-height: 1.2;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.qpg-replay-played-copy small {
    color: var(--text-secondary, #aeb7d8);
    font-size: 13px;
}

/* A free player: Premium covers and three 18+ cards of the game, as on the paywall (client/payment/style.css .paywall-samples). */
.qpg-replay-preview {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.qpg-replay-preview-covers {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.qpg-replay-preview-cover {
    position: relative;
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform 160ms ease;
}

.qpg-replay-preview-cover:active {
    transform: scale(.96);
}

.qpg-replay-preview-cover > img:first-child {
    width: 100%;
    aspect-ratio: 1;
    display: block;
    box-sizing: border-box;
    border: 2px solid transparent;
    border-radius: 12px;
    background: #0d1329;
    object-fit: cover;
}

.qpg-replay-preview-cover.selected > img:first-child {
    border-color: var(--game-accent, #ff3b6f);
}

.qpg-replay-preview-cover .qpg-replay-check {
    top: 5px;
    right: 5px;
    width: 22px;
    height: 22px;
    font-size: 13px;
}

.qpg-replay-preview-cover.selected .qpg-replay-check {
    opacity: 1;
    transform: scale(1);
}

.qpg-replay-preview-cover .qpg-replay-lock {
    top: 5px;
    left: 5px;
    width: 22px;
    height: 22px;
}

.qpg-replay-preview-cover small {
    overflow: hidden;
    font-size: 11px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qpg-replay-samples {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.qpg-replay-samples--edges {
    -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 18%, #000 88%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0, #000 18%, #000 88%, transparent 100%);
}

.qpg-replay-samples-head {
    margin: 0 0 2px 2px;
    overflow: hidden;
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qpg-replay-sample {
    overflow: hidden;
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    background: rgba(255, 255, 255, .07);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qpg-replay-sample--edge {
    max-height: 11px;
    filter: blur(2.5px);
}

/* «Попробовать новые наборы» / «Выбрать другие наборы»: secondary, opens the pack grid. */
.qpg-replay-other {
    width: 100%;
    min-height: 48px;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 16px;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
}

.qpg-replay-other:active {
    transform: translateY(1px);
}

/* «Выбрать другие наборы» under the free replay: a quiet link to the whole pack grid. */
.qpg-replay-link {
    justify-self: center;
    min-height: 36px;
    padding: 6px 12px;
    border: 0;
    background: transparent;
    color: var(--text-secondary, #aeb7d8);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

/* Guests see the host's packs but can't pick or start: one quiet line says who does. */
.qpg-replay-guest-note {
    margin: 4px 0 0;
    color: var(--text-secondary, #8892b0);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.qpg-replay-continue:not(:disabled):active {
    transform: translateY(1px);
}

@media (hover: hover) {
    .qpg-replay-pack:not(:disabled):hover {
        transform: translateY(-2px);
        border-color: rgba(255, 255, 255, .28);
    }
}

.qpg-recommendations {
    display: grid;
    gap: 8px;
}

.qpg-game-card {
    min-height: 60px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    text-decoration: none;
}

.qpg-game-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 12px;
    background: rgba(124, 58, 237, 0.18);
    font-size: 22px;
}

.qpg-game-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
    flex: 1;
}

.qpg-game-copy strong {
    font-size: 14px;
}

.qpg-game-copy small {
    overflow: hidden;
    color: #aeb7d8;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qpg-game-arrow {
    color: #a78bfa;
    font-size: 25px;
}

.qpg-recommendations--catalog {
    gap: 12px;
}

.qpg-game-card--catalog {
    position: relative;
    min-height: 118px;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0;
    padding: 14px;
    border-radius: 16px;
    background: #1a2140;
    transition: transform 180ms ease, background 180ms ease;
}

.qpg-game-card--catalog .qpg-game-image {
    width: 76px;
    height: 76px;
    margin-right: 14px;
    overflow: hidden;
    flex: 0 0 auto;
    border-radius: 13px;
}

.qpg-game-card--catalog .qpg-game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qpg-game-card--catalog .qpg-game-copy {
    padding-top: 2px;
}

.qpg-game-card--catalog .qpg-game-copy strong {
    color: #ff3b6f;
    font-size: 16px;
    line-height: 1.2;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.qpg-game-card--catalog .qpg-game-copy small {
    margin-top: 6px;
    color: #8892b0;
    font-size: 13px;
    line-height: 1.35;
    white-space: normal;
}

.qpg-game-tags {
    width: 100%;
    display: flex;
    gap: 6px;
    padding-left: 90px;
    margin-top: -18px;
}

.qpg-game-tags span {
    padding: 3px 7px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    background: rgba(255, 255, 255, .08);
    color: #8892b0;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

@media (hover: hover) {
    .qpg-game-card--catalog:hover {
        transform: translateX(4px);
        background: #252b4a;
    }
}

.qpg-game-card--catalog:active {
    transform: scale(.98);
}

@keyframes qpg-bubble-sent {
    from { opacity: .4; transform: scale(.86); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes qpg-message-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .qpg-message, .qpg-message-bubble--sent { animation: none; }
}

@media (max-width: 360px) {
    .qpg-card { padding: 15px; }
    .qpg-stars { gap: 3px; }
    .qpg-star { padding: 0; font-size: 25px; }
    .qpg-game-copy small { white-space: normal; }
}

@media (orientation: landscape) and (max-height: 560px) {
    .quiz-post-game { grid-template-columns: 1fr 1fr; }
    .qpg-recap,
    .qpg-more-games { grid-column: 1 / -1; }
}

/* A guest tapped a similar game: the note «Игру выбирает хост» pulses once. */
.qpg-recommendations-guest-note { margin-top: 10px; }
.qpg-guest-note-flash { animation: qpg-guest-note-flash 600ms ease both; }
@keyframes qpg-guest-note-flash {
    0% { transform: scale(1); }
    35% { transform: scale(1.06); color: var(--text-primary, #fff); }
    100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) { .qpg-guest-note-flash { animation: none; } }
.qpg-game-card[aria-disabled="true"] { cursor: default; }

/* Trustpilot review invite after a rating (shared/client/game-end/review-invite.ts). */
.qpg-review-invite {
    display: grid;
    gap: 10px;
    text-align: center;
}

.qpg-rating-dialog .qpg-review-invite {
    margin: 0;
    padding-top: 54px;
}

.qpg-review-invite--inline {
    flex-basis: 100%;
    margin-top: 12px;
    padding: 14px 0 0;
    border: 0;
    border-top: 1px solid rgba(139, 92, 246, 0.28);
    border-radius: 0;
    background: transparent;
}

.qpg-review-invite-text {
    margin: 0;
    color: #aeb7d8;
    font-size: 14px;
    line-height: 1.4;
}

.qpg-review-invite-link {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    text-decoration: none;
}

.qpg-review-invite-later {
    min-height: 44px;
    padding: 8px 16px;
    border: 0;
    background: transparent;
    color: #aeb7d8;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

/* The room's votes for the next game (a guest's tap on a card, «Предложить» on pause): «Голоса:» with
   the voters as «Аватарка с именем» chips under the card, the guest's own vote outlined. */
.qpg-game-voters {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    margin-top: 8px;
    color: var(--accent-text, #ff3b6f);
    font-size: 12px;
    font-weight: 700;
}
.qpg-game-card:has(.qpg-game-voters) { flex-wrap: wrap; }
.qpg-game-card--catalog .qpg-game-voters { padding-left: 90px; }
.qpg-game-voters-chips { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; color: var(--text-primary, #fff); }
.qpg-game-card--voted {
    box-shadow: inset 0 0 0 2px var(--accent-text, #ff3b6f);
}
/* /game-end.css */
/*
 * Shared game-end screen («Игра окончена» → «Что дальше?»): hero, results board,
 * AI recap, replay packs, similar games and the rating, on top of post-game.css.
 * Markup: .template-app > .dashboard[data-share-root] > .dashboard-hero,
 * .leaderboard-card, #post-game, .catalog-link (see client/mini-games/game-template).
 * Colours come from theme tokens: a game sets body[data-theme="<game>"] (or the
 * .rp-game-end layer from shared/client/game-end/screen.ts carries it) while the
 * screen is shown and gets its palette (COMMON/roomplay-palettes.html), fonts and
 * button shape below. Game Template is the reference page; Never Have I Ever
 * (online) is the first real game on it.
 */
/* Full-screen layer (shared/client/game-end/screen.ts) that opens this screen on top of any
   game. It carries the Game Template's default tokens, so a game without a theme block
   below still gets a readable screen. */
.rp-game-end {
  --bg-primary: #0d1329; --bg-end: #0a0f1f; --bg-secondary: #1a2140; --bg-card: #252b4a;
  --accent-pink: #ff3b6f; --accent-text: var(--accent-pink); --on-accent: #fff;
  --text-primary: #fff; --text-secondary: #8892b0;
  --game-end-primary: #ff3b6f; --game-end-secondary: #ffc93c;
  --line: rgba(255, 255, 255, .14); --row-hi: rgba(255, 59, 111, .15); --recap-tint: rgba(255, 59, 111, .14);
  --star: #fbbf24; --star-off: #59617f;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  --font-display: var(--font-body);
  --btn-radius: 30px; --btn-height: 56px; --btn-weight: 600;
  position: fixed;
  /* Above the game's screens, below its confirm dialog (1000), toasts and the paywall. */
  z-index: 990;
  inset: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-end) 100%);
  color: var(--text-primary);
  font-family: var(--font-body);
  text-align: left;
  -webkit-overflow-scrolling: touch;
}
.rp-game-end, .rp-game-end * { box-sizing: border-box; }
.rp-game-end[hidden], .rp-game-end [hidden] { display: none !important; }
html.rp-game-end-open, html.rp-game-end-open body { overflow: hidden; }
.rp-game-end .template-app { margin: 0 auto; }
.rp-game-end h1, .rp-game-end h2, .rp-game-end p { color: inherit; text-shadow: none; }
/* Games style .winner-icon, h1 and buttons for their own screens; the layer resets what leaks in
   (Alias and «Нарисуй и угадай» draw their mascot into .winner-icon). */
.rp-game-end .winner-icon {
  width: auto; height: auto; margin: 14px auto 4px; padding: 0;
  background: none; font-size: 48px; line-height: 1; text-align: center; animation: none;
}
.rp-game-end .winner-icon::before, .rp-game-end .winner-icon::after { content: none; }
.rp-game-end .dashboard h1 { letter-spacing: normal; text-transform: none; }
@media (max-width: 360px) { .rp-game-end .winner-icon { font-size: 60px; } }
.rp-game-end-back {
  position: absolute;
  z-index: 5;
  top: calc(18px + env(safe-area-inset-top, 0px));
  left: 16px;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--text-primary);
  font: inherit;
  font-size: 26px;
  cursor: pointer;
}
.rp-game-end-back--label { width: auto; padding: 0 12px; font-size: 16px; font-weight: 700; white-space: nowrap; }
/* «Итоги игры»: brings the layer back over a reveal screen (roles, board). It is the first child of
   that screen, in its flow, so it covers nothing; same tokens via data-theme. */
.rp-game-end-reopen {
  position: relative;
  z-index: 2;
  display: block;
  flex: 0 0 auto;
  align-self: center;
  min-height: 40px;
  margin: 0 auto 12px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--accent-pink, #ff3b6f);
  color: var(--on-accent, #fff);
  box-shadow: none;
  font: 700 14px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  cursor: pointer;
}
.rp-game-end-reopen[hidden] { display: none; }
.rp-game-end-back:focus-visible { outline: 3px solid var(--text-primary); outline-offset: 3px; }
/* Preview tabs take the palette of their game (COMMON/roomplay-palettes.html and each *-theme.css). */
:is(body, .rp-game-end, .rp-game-end-reopen)[data-theme="whosmostlikelyto"] {
  --game-end-primary: #e0336e; --game-end-secondary: #ff7aa2;
  --bg-primary: #171719; --bg-end: #171719; --bg-secondary: #323236; --bg-card: #262629;
  --text-primary: #fff; --text-secondary: #b4b3b8;
  --accent-pink: #a51043; --accent-text: #ff7aa2; --on-accent: #fff;
  --row-hi: rgba(224, 51, 110, .2); --recap-tint: rgba(165, 16, 67, .3);
  --star: #ffc93c; --star-off: #5c5b61; --line: rgba(255, 255, 255, .12);
  --font-display: 'Unbounded', var(--font-body);
  --btn-outline: rgba(228, 227, 229, .6);
}
:is(body, .rp-game-end, .rp-game-end-reopen)[data-theme="quiz"] {
  --game-end-primary: #d5ae58; --game-end-secondary: #6640ba;
  --bg-primary: #100f36; --bg-end: #0b0a28; --bg-secondary: #2c2172; --bg-card: #211759;
  --text-primary: #fff; --text-secondary: #d6cfe8;
  --accent-pink: #6640ba; --accent-text: #d5ae58; --on-accent: #fff;
  --row-hi: rgba(213, 174, 88, .16); --recap-tint: rgba(102, 64, 186, .35);
  --star: #d5ae58; --star-off: #4d4386; --line: rgba(255, 255, 255, .16);
  --font-display: 'Unbounded', var(--font-body);
  --btn-outline: rgba(255, 255, 255, .75);
}
:is(body, .rp-game-end, .rp-game-end-reopen)[data-theme="alias"] {
  --game-end-primary: #cb1731; --game-end-secondary: #ffd333;
  --bg-primary: #fff; --bg-end: #fff; --bg-secondary: #fff; --bg-card: #fbecef;
  --text-primary: #211d22; --text-secondary: #686068;
  --accent-pink: #cb1731; --accent-text: #b6102a; --on-accent: #fff;
  --row-hi: #ffd333; --recap-tint: #fbecef;
  --star: #e8a91c; --star-off: #d4c4c8; --line: #d4c4c8;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Unbounded', 'Manrope', sans-serif;
  --btn-radius: 16px; --btn-weight: 700; --btn-primary: #b6102a; --btn-outline: #211d22;
}
:is(body, .rp-game-end, .rp-game-end-reopen)[data-theme="secrethitler"] {
  --game-end-primary: #343431; --game-end-secondary: #79aeb7;
  --bg-primary: #ef6347; --bg-end: #ef6347; --bg-secondary: #fff8e8; --bg-card: #f3e2b8;
  --text-primary: #17191f; --text-secondary: #3a1410;
  --accent-pink: #343431; --accent-text: #7a1f14; --on-accent: #fff;
  --row-hi: #e9cf8e; --recap-tint: #f3e2b8;
  --star: #b07d00; --star-off: #c9b48a; --line: rgba(23, 25, 31, .18);
  --font-display: 'Unbounded', var(--font-body);
  --btn-outline: #343431;
}
:is(body, .rp-game-end, .rp-game-end-reopen)[data-theme="neverhaveiever"] {
  --game-end-primary: #bc2438; --game-end-secondary: #f1dadd;
  --bg-primary: #171316; --bg-end: #171316; --bg-secondary: #3a2831; --bg-card: #2a1d24;
  --text-primary: #fff; --text-secondary: #d9c4c8;
  --accent-pink: #bc2438; --accent-text: #fd7276; --on-accent: #fff;
  --row-hi: rgba(188, 36, 56, .22); --recap-tint: rgba(188, 36, 56, .3);
  --star: #ffc93c; --star-off: #5e4a52; --line: rgba(241, 218, 221, .16);
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Unbounded', 'Manrope', sans-serif;
  --btn-radius: 16px; --btn-height: 56px; --btn-weight: 800; --btn-outline: rgba(241, 218, 221, .6);
}

/* The rest of the games: generated from COMMON/roomplay-palettes.html (bg, surface, accent, secondary, text). */
:is(body, .rp-game-end, .rp-game-end-reopen)[data-theme="wouldyourather"] {
  --game-end-primary: #ca003d; --game-end-secondary: #00bce9;
  --bg-primary: #006bcb; --bg-end: #006bcb; --bg-secondary: #3665b7; --bg-card: #2458b1;
  --text-primary: #ffffff; --text-secondary: #b3d3ef;
  --accent-pink: #00bce9; --accent-text: #ffffff; --on-accent: #17191f;
  --row-hi: rgba(0, 188, 233, 0.2); --recap-tint: rgba(0, 188, 233, 0.22);
  --star: #ffc93c; --star-off: #5b82c5; --line: rgba(255, 255, 255, 0.14);
  --btn-outline: rgba(255, 255, 255, 0.6);
}
:is(body, .rp-game-end, .rp-game-end-reopen)[data-theme="knowme"] {
  --game-end-primary: #822d29; --game-end-secondary: #313555;
  --bg-primary: #b64035; --bg-end: #b64035; --bg-secondary: #b44d43; --bg-card: #ad3d33;
  --text-primary: #ffffff; --text-secondary: #e9c6c2;
  --accent-pink: #822d29; --accent-text: #ffffff; --on-accent: #ffffff;
  --row-hi: rgba(130, 45, 41, 0.2); --recap-tint: rgba(130, 45, 41, 0.22);
  --star: #ffc93c; --star-off: #c26e66; --line: rgba(255, 255, 255, 0.14);
  --btn-outline: rgba(255, 255, 255, 0.6);
}
:is(body, .rp-game-end, .rp-game-end-reopen)[data-theme="truth-detector"] {
  --game-end-primary: #272723; --game-end-secondary: #e88629;
  --bg-primary: #f0cb19; --bg-end: #f0cb19; --bg-secondary: #ccae1a; --bg-card: #dcbb1a;
  --text-primary: #17191f; --text-secondary: #584e1d;
  --accent-pink: #272723; --accent-text: #272723; --on-accent: #ffffff;
  --row-hi: rgba(39, 39, 35, 0.2); --recap-tint: rgba(39, 39, 35, 0.22);
  --star: #c98a00; --star-off: #ab931b; --line: rgba(23, 25, 31, 0.14);
  --btn-outline: rgba(23, 25, 31, 0.6);
}
:is(body, .rp-game-end, .rp-game-end-reopen)[data-theme="taboo"] {
  --game-end-primary: #cf4525; --game-end-secondary: #f8ca34;
  --bg-primary: #54277b; --bg-end: #54277b; --bg-secondary: #763d78; --bg-card: #6a2c6c;
  --text-primary: #ffffff; --text-secondary: #ccbed7;
  --accent-pink: #cf4525; --accent-text: #f8ca34; --on-accent: #ffffff;
  --row-hi: rgba(207, 69, 37, 0.2); --recap-tint: rgba(207, 69, 37, 0.22);
  --star: #ffc93c; --star-off: #8f6191; --line: rgba(255, 255, 255, 0.14);
  --btn-outline: rgba(255, 255, 255, 0.6);
}
:is(body, .rp-game-end, .rp-game-end-reopen)[data-theme="headsup"] {
  --game-end-primary: #096697; --game-end-secondary: #8bcfee;
  --bg-primary: #0879ba; --bg-end: #0879ba; --bg-secondary: #1c81ba; --bg-card: #0876b4;
  --text-primary: #ffffff; --text-secondary: #b5d7ea;
  --accent-pink: #8bcfee; --accent-text: #ffffff; --on-accent: #17191f;
  --row-hi: rgba(139, 207, 238, 0.2); --recap-tint: rgba(139, 207, 238, 0.22);
  --star: #ffc93c; --star-off: #4698c7; --line: rgba(255, 255, 255, 0.14);
  --btn-outline: rgba(255, 255, 255, 0.6);
}
:is(body, .rp-game-end, .rp-game-end-reopen)[data-theme="soobrazhariy"] {
  --game-end-primary: #ffcf39; --game-end-secondary: #f3e8be;
  --bg-primary: #125ca5; --bg-end: #125ca5; --bg-secondary: #254d7c; --bg-card: #123d71;
  --text-primary: #ffffff; --text-secondary: #b8cee4;
  --accent-pink: #ffcf39; --accent-text: #ffcf39; --on-accent: #17191f;
  --row-hi: rgba(255, 207, 57, 0.2); --recap-tint: rgba(255, 207, 57, 0.22);
  --star: #ffc93c; --star-off: #4d6e95; --line: rgba(255, 255, 255, 0.14);
  --btn-outline: rgba(255, 255, 255, 0.6);
}
:is(body, .rp-game-end, .rp-game-end-reopen)[data-theme="codenames"] {
  --game-end-primary: #252329; --game-end-secondary: #f29a37;
  --bg-primary: #9f265c; --bg-end: #9f265c; --bg-secondary: #923661; --bg-card: #892553;
  --text-primary: #ffffff; --text-secondary: #e2bece;
  --accent-pink: #252329; --accent-text: #f29a37; --on-accent: #ffffff;
  --row-hi: rgba(37, 35, 41, 0.2); --recap-tint: rgba(37, 35, 41, 0.22);
  --star: #ffc93c; --star-off: #a75c7e; --line: rgba(255, 255, 255, 0.14);
  --btn-outline: rgba(255, 255, 255, 0.6);
}
:is(body, .rp-game-end, .rp-game-end-reopen)[data-theme="decoder"] {
  --game-end-primary: #b62f35; --game-end-secondary: #266a8b;
  --bg-primary: #eae5d9; --bg-end: #eae5d9; --bg-secondary: #eae8e1; --bg-card: #fcfaf2;
  --text-primary: #17191f; --text-secondary: #565657;
  --accent-pink: #b62f35; --accent-text: #b62f35; --on-accent: #ffffff;
  --row-hi: rgba(182, 47, 53, 0.2); --recap-tint: rgba(182, 47, 53, 0.22);
  --star: #c98a00; --star-off: #c3c2bd; --line: rgba(23, 25, 31, 0.14);
  --btn-outline: rgba(23, 25, 31, 0.6);
}
:is(body, .rp-game-end, .rp-game-end-reopen)[data-theme="bunker"] {
  --game-end-primary: #282823; --game-end-secondary: #a6a488;
  --bg-primary: #f0c523; --bg-end: #f0c523; --bg-secondary: #cca923; --bg-card: #dcb523;
  --text-primary: #17191f; --text-secondary: #584d20;
  --accent-pink: #282823; --accent-text: #282823; --on-accent: #ffffff;
  --row-hi: rgba(40, 40, 35, 0.2); --recap-tint: rgba(40, 40, 35, 0.22);
  --star: #c98a00; --star-off: #ab8e22; --line: rgba(23, 25, 31, 0.14);
  --btn-outline: rgba(23, 25, 31, 0.6);
}
:is(body, .rp-game-end, .rp-game-end-reopen)[data-theme="spy"] {
  --game-end-primary: #b9232e; --game-end-secondary: #25262a;
  --bg-primary: #f8f7f2; --bg-end: #f8f7f2; --bg-secondary: #eceded; --bg-card: #ffffff;
  --text-primary: #17191f; --text-secondary: #5b5c5e;
  --accent-pink: #b9232e; --accent-text: #b9232e; --on-accent: #ffffff;
  --row-hi: rgba(185, 35, 46, 0.2); --recap-tint: rgba(185, 35, 46, 0.22);
  --star: #c98a00; --star-off: #c5c6c7; --line: rgba(23, 25, 31, 0.14);
  --btn-outline: rgba(23, 25, 31, 0.6);
}
:is(body, .rp-game-end, .rp-game-end-reopen)[data-theme="bunny"] {
  --game-end-primary: #7735d5; --game-end-secondary: #5f87e6;
  --bg-primary: #090719; --bg-end: #090719; --bg-secondary: #2b2940; --bg-card: #19162f;
  --text-primary: #ffffff; --text-secondary: #b5b5ba;
  --accent-pink: #7735d5; --accent-text: #5f87e6; --on-accent: #ffffff;
  --row-hi: rgba(119, 53, 213, 0.2); --recap-tint: rgba(119, 53, 213, 0.22);
  --star: #ffc93c; --star-off: #535063; --line: rgba(255, 255, 255, 0.14);
  --btn-outline: rgba(255, 255, 255, 0.6);
}
:is(body, .rp-game-end, .rp-game-end-reopen)[data-theme="werewords"] {
  --game-end-primary: #9f302d; --game-end-secondary: #e6c75d;
  --bg-primary: #2e2930; --bg-end: #2e2930; --bg-secondary: #513b40; --bg-card: #422a2f;
  --text-primary: #ffffff; --text-secondary: #c0bfc1;
  --accent-pink: #9f302d; --accent-text: #e6c75d; --on-accent: #ffffff;
  --row-hi: rgba(159, 48, 45, 0.2); --recap-tint: rgba(159, 48, 45, 0.22);
  --star: #ffc93c; --star-off: #715f63; --line: rgba(255, 255, 255, 0.14);
  --btn-outline: rgba(255, 255, 255, 0.6);
}
:is(body, .rp-game-end, .rp-game-end-reopen)[data-theme="100-to-1"] {
  --game-end-primary: #ffd43a; --game-end-secondary: #d63a39;
  --bg-primary: #1258ae; --bg-end: #1258ae; --bg-secondary: #294a80; --bg-card: #163a75;
  --text-primary: #ffffff; --text-secondary: #b8cde7;
  --accent-pink: #ffd43a; --accent-text: #ffd43a; --on-accent: #17191f;
  --row-hi: rgba(255, 212, 58, 0.2); --recap-tint: rgba(255, 212, 58, 0.22);
  --star: #ffc93c; --star-off: #506b98; --line: rgba(255, 255, 255, 0.14);
  --btn-outline: rgba(255, 255, 255, 0.6);
}
:is(body, .rp-game-end, .rp-game-end-reopen)[data-theme="5seconds"] {
  --game-end-primary: #f6cf35; --game-end-secondary: #225ba7;
  --bg-primary: #c3262e; --bg-end: #c3262e; --bg-secondary: #d05340; --bg-card: #cc442f;
  --text-primary: #ffffff; --text-secondary: #edbec0;
  --accent-pink: #f6cf35; --accent-text: #f6cf35; --on-accent: #17191f;
  --row-hi: rgba(246, 207, 53, 0.2); --recap-tint: rgba(246, 207, 53, 0.22);
  --star: #ffc93c; --star-off: #d97363; --line: rgba(255, 255, 255, 0.14);
  --btn-outline: rgba(255, 255, 255, 0.6);
}
:is(body, .rp-game-end, .rp-game-end-reopen)[data-theme="melody"] {
  --game-end-primary: #a677ef; --game-end-secondary: #edc945;
  --bg-primary: #45218a; --bg-end: #45218a; --bg-secondary: #3b2a65; --bg-card: #2a1758;
  --text-primary: #ffffff; --text-secondary: #c7bcdc;
  --accent-pink: #a677ef; --accent-text: #a677ef; --on-accent: #17191f;
  --row-hi: rgba(166, 119, 239, 0.2); --recap-tint: rgba(166, 119, 239, 0.22);
  --star: #ffc93c; --star-off: #5f5182; --line: rgba(255, 255, 255, 0.14);
  --btn-outline: rgba(255, 255, 255, 0.6);
}
:is(body, .rp-game-end, .rp-game-end-reopen)[data-theme="movie-frame"] {
  --game-end-primary: #f5c518; --game-end-secondary: #e9e9e9;
  --bg-primary: #121212; --bg-end: #121212; --bg-secondary: #363636; --bg-card: #242424;
  --text-primary: #ffffff; --text-secondary: #b8b8b8;
  --accent-pink: #f5c518; --accent-text: #f5c518; --on-accent: #17191f;
  --row-hi: rgba(245, 197, 24, 0.2); --recap-tint: rgba(245, 197, 24, 0.22);
  --star: #ffc93c; --star-off: #5b5b5b; --line: rgba(255, 255, 255, 0.14);
  --btn-outline: rgba(255, 255, 255, 0.6);
}
:is(body, .rp-game-end, .rp-game-end-reopen)[data-theme="geoguessr"] {
  --game-end-primary: #d63037; --game-end-secondary: #9bcb31;
  --bg-primary: #302778; --bg-end: #302778; --bg-secondary: #332e62; --bg-card: #211c54;
  --text-primary: #ffffff; --text-secondary: #c1bed7;
  --accent-pink: #d63037; --accent-text: #9bcb31; --on-accent: #ffffff;
  --row-hi: rgba(214, 48, 55, 0.2); --recap-tint: rgba(214, 48, 55, 0.22);
  --star: #ffc93c; --star-off: #59557f; --line: rgba(255, 255, 255, 0.14);
  --btn-outline: rgba(255, 255, 255, 0.6);
}
:is(body, .rp-game-end, .rp-game-end-reopen)[data-theme="wavelength"] {
  --game-end-primary: #ed755b; --game-end-secondary: #72b8b0;
  --bg-primary: #193e47; --bg-end: #193e47; --bg-secondary: #4e5759; --bg-card: #3f484b;
  --text-primary: #ffffff; --text-secondary: #bac5c8;
  --accent-pink: #ed755b; --accent-text: #ed755b; --on-accent: #17191f;
  --row-hi: rgba(237, 117, 91, 0.2); --recap-tint: rgba(237, 117, 91, 0.22);
  --star: #ffc93c; --star-off: #6f7678; --line: rgba(255, 255, 255, 0.14);
  --btn-outline: rgba(255, 255, 255, 0.6);
}
:is(body, .rp-game-end, .rp-game-end-reopen)[data-theme="fibbage"] {
  --game-end-primary: #eba332; --game-end-secondary: #9ba592;
  --bg-primary: #70292c; --bg-end: #70292c; --bg-secondary: #904e3e; --bg-card: #863f2d;
  --text-primary: #ffffff; --text-secondary: #d4bfc0;
  --accent-pink: #eba332; --accent-text: #eba332; --on-accent: #17191f;
  --row-hi: rgba(235, 163, 50, 0.2); --recap-tint: rgba(235, 163, 50, 0.22);
  --star: #ffc93c; --star-off: #a46f62; --line: rgba(255, 255, 255, 0.14);
  --btn-outline: rgba(255, 255, 255, 0.6);
}
:is(body, .rp-game-end, .rp-game-end-reopen)[data-theme="quiplash"] {
  --game-end-primary: #743cae; --game-end-secondary: #73c3b6;
  --bg-primary: #542580; --bg-end: #542580; --bg-secondary: #673a92; --bg-card: #5a2988;
  --text-primary: #ffffff; --text-secondary: #ccbed9;
  --accent-pink: #73c3b6; --accent-text: #73c3b6; --on-accent: #17191f;
  --row-hi: rgba(115, 195, 182, 0.2); --recap-tint: rgba(115, 195, 182, 0.22);
  --star: #ffc93c; --star-off: #835fa6; --line: rgba(255, 255, 255, 0.14);
  --btn-outline: rgba(255, 255, 255, 0.6);
}
:is(body, .rp-game-end, .rp-game-end-reopen)[data-theme="whatdoyoumeme"] {
  --game-end-primary: #267c86; --game-end-secondary: #7e3c9b;
  --bg-primary: #ffffff; --bg-end: #ffffff; --bg-secondary: #e0dfe5; --bg-card: #f1f0f6;
  --text-primary: #17191f; --text-secondary: #5d5e62;
  --accent-pink: #267c86; --accent-text: #267c86; --on-accent: #ffffff;
  --row-hi: rgba(38, 124, 134, 0.2); --recap-tint: rgba(38, 124, 134, 0.22);
  --star: #c98a00; --star-off: #bbbac0; --line: rgba(23, 25, 31, 0.14);
  --btn-outline: rgba(23, 25, 31, 0.6);
}
:is(body, .rp-game-end, .rp-game-end-reopen)[data-theme="jokinghazard"] {
  --game-end-primary: #236b92; --game-end-secondary: #77aa32;
  --bg-primary: #ffffff; --bg-end: #ffffff; --bg-secondary: #e4e4df; --bg-card: #f6f6f0;
  --text-primary: #17191f; --text-secondary: #5d5e62;
  --accent-pink: #236b92; --accent-text: #236b92; --on-accent: #ffffff;
  --row-hi: rgba(35, 107, 146, 0.2); --recap-tint: rgba(35, 107, 146, 0.22);
  --star: #c98a00; --star-off: #bebfbc; --line: rgba(23, 25, 31, 0.14);
  --btn-outline: rgba(23, 25, 31, 0.6);
}
:is(body, .rp-game-end, .rp-game-end-reopen)[data-theme="tower"] {
  --game-end-primary: #1d1b1a; --game-end-secondary: #8a5a32;
  --bg-primary: #f2782a; --bg-end: #e4572e; --bg-secondary: #fff4e2; --bg-card: #fff4e2;
  --text-primary: #1d1b1a; --text-secondary: #3d2a1c;
  --accent-pink: #1d1b1a; --accent-text: #1d1b1a; --on-accent: #ffffff;
  --row-hi: rgba(138, 90, 50, 0.2); --recap-tint: rgba(138, 90, 50, 0.22);
  --star: #8a5a32; --star-off: rgba(29, 27, 26, 0.3); --line: rgba(29, 27, 26, 0.16);
  --btn-outline: rgba(29, 27, 26, 0.6);
}
:is(body, .rp-game-end, .rp-game-end-reopen)[data-theme="detective"] {
  --game-end-primary: #e9a23b; --game-end-secondary: #c9577f;
  --bg-primary: #17363c; --bg-end: #10282d; --bg-secondary: #10282d; --bg-card: #10282d;
  --text-primary: #f7eedc; --text-secondary: #c9dad6;
  --accent-pink: #e9a23b; --accent-text: #e9a23b; --on-accent: #1b1612;
  --row-hi: rgba(233, 162, 59, 0.2); --recap-tint: rgba(233, 162, 59, 0.22);
  --star: #e9a23b; --star-off: rgba(247, 238, 220, 0.3); --line: rgba(247, 238, 220, 0.16);
  --btn-outline: rgba(247, 238, 220, 0.6);
}
:is(body, .rp-game-end, .rp-game-end-reopen)[data-theme="mix"] {
  --game-end-primary: #ffc94a; --game-end-secondary: #f45d84;
  --bg-primary: #2b2356; --bg-end: #221c47; --bg-secondary: #3a3170; --bg-card: #3a3170;
  --text-primary: #fff6ec; --text-secondary: #d9d2ee;
  --accent-pink: #ffc94a; --accent-text: #ffc94a; --on-accent: #1f1a3d;
  --row-hi: rgba(255, 201, 74, 0.2); --recap-tint: rgba(255, 201, 74, 0.2);
  --star: #ffc94a; --star-off: rgba(255, 246, 236, 0.3); --line: rgba(255, 246, 236, 0.16);
  --btn-outline: rgba(255, 246, 236, 0.6);
}
:is(body, .rp-game-end, .rp-game-end-reopen)[data-theme="crocodile"] {
  --game-end-primary: #487b18; --game-end-secondary: #b4d846;
  --bg-primary: #93dceb; --bg-end: #93dceb; --bg-secondary: #eceded; --bg-card: #ffffff;
  --text-primary: #17191f; --text-secondary: #3c545c;
  --accent-pink: #487b18; --accent-text: #487b18; --on-accent: #ffffff;
  --row-hi: rgba(72, 123, 24, 0.2); --recap-tint: rgba(72, 123, 24, 0.22);
  --star: #c98a00; --star-off: #c5c6c7; --line: rgba(23, 25, 31, 0.14);
  --btn-outline: rgba(23, 25, 31, 0.6);
}
:is(body, .rp-game-end, .rp-game-end-reopen)[data-theme="drawful"] {
  --game-end-primary: #c61d76; --game-end-secondary: #252525;
  --bg-primary: #f0eeeb; --bg-end: #f0eeeb; --bg-secondary: #eceded; --bg-card: #ffffff;
  --text-primary: #17191f; --text-secondary: #58595c;
  --accent-pink: #c61d76; --accent-text: #c61d76; --on-accent: #ffffff;
  --row-hi: rgba(198, 29, 118, 0.2); --recap-tint: rgba(198, 29, 118, 0.22);
  --star: #c98a00; --star-off: #c5c6c7; --line: rgba(23, 25, 31, 0.14);
  --btn-outline: rgba(23, 25, 31, 0.6);
}
:is(body, .rp-game-end, .rp-game-end-reopen)[data-theme="imaginarium"] {
  --game-end-primary: #422c35; --game-end-secondary: #72b3d9;
  --bg-primary: #de781b; --bg-end: #de781b; --bg-secondary: #ecdfbc; --bg-card: #fff0ca;
  --text-primary: #17191f; --text-secondary: #53361e;
  --accent-pink: #422c35; --accent-text: #422c35; --on-accent: #ffffff;
  --row-hi: rgba(66, 44, 53, 0.2); --recap-tint: rgba(66, 44, 53, 0.22);
  --star: #ffc93c; --star-off: #c5ba9f; --line: rgba(23, 25, 31, 0.14);
  --btn-outline: rgba(23, 25, 31, 0.6);
}
/* Cards and the second accent (whole palette on the shared screen, 2026-10-23). By default a
   card keeps the page colours; each game theme then gets its atlas surface with its own ink and
   the accents that read on it from the generated block below. Inside a card the usual tokens
   switch to these, so every rule further down stays written against --text-primary & co. */
.template-app {
  --card-bg: var(--bg-card); --card-ink: var(--text-primary); --card-ink-2: var(--text-secondary);
  --card-inner: var(--bg-secondary); --card-line: var(--line);
  --card-accent: var(--btn-primary, var(--accent-pink)); --on-card-accent: var(--on-accent);
  --card-accent-text: var(--accent-text); --card-accent-2-text: var(--game-end-secondary, var(--accent-text));
  --card-row-hi: var(--row-hi); --card-recap-tint: var(--recap-tint);
  --card-star: var(--star); --card-star-off: var(--star-off);
}
/* palette-roles:start — generated by scripts/generate-game-end-themes.js, do not edit by hand. */
:is(body, .rp-game-end)[data-theme="mix"] .template-app { --card-bg: #3A3170; --card-ink: #FFF6EC; --card-ink-2: #B0A7BA; --card-inner: #483F79; --card-line: rgba(255, 246, 236, 0.14); --card-accent: #FFC94A; --on-card-accent: #1F1A3D; --card-accent-text: #FFC94A; --card-accent-2-text: #F78BA3; --card-star: #FFC94A; --card-star-off: #9188A6; --card-row-hi: rgba(255, 201, 74, 0.16); --card-recap-tint: rgba(244, 93, 132, 0.24); }
:is(body, .rp-game-end)[data-theme="tower"] .template-app { --card-bg: #FFF4E2; --card-ink: #1D1B1A; --card-ink-2: #6E6962; --card-inner: #EFE5D4; --card-line: rgba(29, 27, 26, 0.14); --card-accent: #1D1B1A; --on-card-accent: #FFFFFF; --card-accent-text: #1D1B1A; --card-accent-2-text: #8A5A32; --card-star: #1D1B1A; --card-star-off: #8C857C; --card-row-hi: rgba(29, 27, 26, 0.16); --card-recap-tint: rgba(138, 90, 50, 0.24); }
:is(body, .rp-game-end)[data-theme="detective"] .template-app { --card-bg: #F2E6CE; --card-ink: #1B1612; --card-ink-2: #686156; --card-inner: #E3D7C1; --card-line: rgba(27, 22, 18, 0.14); --card-accent: #E9A23B; --on-card-accent: #1B1612; --card-accent-text: #95445E; --card-accent-2-text: #984F67; --card-star: #C9577F; --card-star-off: #857C6E; --card-row-hi: rgba(233, 162, 59, 0.16); --card-recap-tint: rgba(206, 104, 140, 0.24); }
:is(body, .rp-game-end)[data-theme="secrethitler"] .template-app { --card-bg: #F3E2B8; --card-ink: #17191F; --card-ink-2: #666156; --card-inner: #E4D4AD; --card-line: rgba(23, 25, 31, 0.14); --card-accent: #343431; --on-card-accent: #FFFFFF; --card-accent-text: #343431; --card-accent-2-text: #48646B; --card-star: #343431; --card-star-off: #837C6A; --card-row-hi: rgba(52, 52, 49, 0.16); --card-recap-tint: rgba(121, 174, 183, 0.24); }
:is(body, .rp-game-end)[data-theme="neverhaveiever"] .template-app { --card-bg: #2A1D24; --card-ink: #FFFFFF; --card-ink-2: #AAA5A7; --card-inner: #392D33; --card-line: rgba(255, 255, 255, 0.14); --card-accent: #BC2438; --on-card-accent: #FFFFFF; --card-accent-text: #F1DADD; --card-accent-2-text: #F1DADD; --card-star: #F1DADD; --card-star-off: #797175; --card-row-hi: rgba(188, 36, 56, 0.16); --card-recap-tint: rgba(241, 218, 221, 0.24); }
:is(body, .rp-game-end)[data-theme="wouldyourather"] .template-app { --card-bg: #FFFFFF; --card-ink: #17191F; --card-ink-2: #747579; --card-inner: #EFEFEF; --card-line: rgba(23, 25, 31, 0.14); --card-accent: #CA003D; --on-card-accent: #FFFFFF; --card-accent-text: #CA003D; --card-accent-2-text: #097B98; --card-star: #CA003D; --card-star-off: #888A8D; --card-row-hi: rgba(202, 0, 61, 0.16); --card-recap-tint: rgba(0, 188, 233, 0.24); }
:is(body, .rp-game-end)[data-theme="whosmostlikelyto"] .template-app { --card-bg: #262629; --card-ink: #FFFFFF; --card-ink-2: #A8A8A9; --card-inner: #353538; --card-line: rgba(255, 255, 255, 0.14); --card-accent: #A51043; --on-card-accent: #FFFFFF; --card-accent-text: #E4E3E5; --card-accent-2-text: #E4E3E5; --card-star: #E4E3E5; --card-star-off: #767678; --card-row-hi: rgba(165, 16, 67, 0.16); --card-recap-tint: rgba(228, 227, 229, 0.24); }
:is(body, .rp-game-end)[data-theme="knowme"] .template-app { --card-bg: #FFF2DC; --card-ink: #17191F; --card-ink-2: #6B6763; --card-inner: #EFE3CF; --card-line: rgba(23, 25, 31, 0.14); --card-accent: #822D29; --on-card-accent: #FFFFFF; --card-accent-text: #822D29; --card-accent-2-text: #313555; --card-star: #822D29; --card-star-off: #88837B; --card-row-hi: rgba(130, 45, 41, 0.16); --card-recap-tint: rgba(49, 53, 85, 0.24); }
:is(body, .rp-game-end)[data-theme="truth-detector"] .template-app { --card-bg: #272723; --card-ink: #FFFFFF; --card-ink-2: #A9A9A7; --card-inner: #363632; --card-line: rgba(255, 255, 255, 0.14); --card-accent: #E88629; --on-card-accent: #17191F; --card-accent-text: #E88629; --card-accent-2-text: #E88629; --card-star: #E88629; --card-star-off: #777774; --card-row-hi: rgba(232, 134, 41, 0.16); --card-recap-tint: rgba(232, 134, 41, 0.24); }
:is(body, .rp-game-end)[data-theme="alias"] .template-app { --card-bg: #CB1731; --card-ink: #FFFFFF; --card-ink-2: #F9E3E6; --card-inner: #CF273F; --card-line: rgba(255, 255, 255, 0.14); --card-accent: #FFD333; --on-card-accent: #17191F; --card-accent-text: #FFE585; --card-accent-2-text: #FFE585; --card-star: #FFD333; --card-star-off: #EDAEB7; --card-row-hi: rgba(255, 211, 51, 0.16); --card-recap-tint: rgba(255, 211, 51, 0.24); }
:is(body, .rp-game-end)[data-theme="taboo"] .template-app { --card-bg: #FFFFFF; --card-ink: #17191F; --card-ink-2: #747579; --card-inner: #EFEFEF; --card-line: rgba(23, 25, 31, 0.14); --card-accent: #CF4525; --on-card-accent: #FFFFFF; --card-accent-text: #CF4525; --card-accent-2-text: #88722A; --card-star: #CF4525; --card-star-off: #888A8D; --card-row-hi: rgba(207, 69, 37, 0.16); --card-recap-tint: rgba(248, 202, 52, 0.24); }
:is(body, .rp-game-end)[data-theme="headsup"] .template-app { --card-bg: #FFFFFF; --card-ink: #17191F; --card-ink-2: #747579; --card-inner: #EFEFEF; --card-line: rgba(23, 25, 31, 0.14); --card-accent: #096697; --on-card-accent: #FFFFFF; --card-accent-text: #096697; --card-accent-2-text: #517487; --card-star: #096697; --card-star-off: #888A8D; --card-row-hi: rgba(9, 102, 151, 0.16); --card-recap-tint: rgba(139, 207, 238, 0.24); }
:is(body, .rp-game-end)[data-theme="soobrazhariy"] .template-app { --card-bg: #123D71; --card-ink: #FFFFFF; --card-ink-2: #A0B1C6; --card-inner: #234B7B; --card-line: rgba(255, 255, 255, 0.14); --card-accent: #FFCF39; --on-card-accent: #17191F; --card-accent-text: #FFCF39; --card-accent-2-text: #F3E8BE; --card-star: #FFCF39; --card-star-off: #7A92B0; --card-row-hi: rgba(255, 207, 57, 0.16); --card-recap-tint: rgba(243, 232, 190, 0.24); }
:is(body, .rp-game-end)[data-theme="codenames"] .template-app { --card-bg: #FFF7E8; --card-ink: #17191F; --card-ink-2: #74726F; --card-inner: #EFE7DA; --card-line: rgba(23, 25, 31, 0.14); --card-accent: #252329; --on-card-accent: #FFFFFF; --card-accent-text: #252329; --card-accent-2-text: #9A662D; --card-star: #252329; --card-star-off: #888682; --card-row-hi: rgba(37, 35, 41, 0.16); --card-recap-tint: rgba(242, 154, 55, 0.24); }
:is(body, .rp-game-end)[data-theme="decoder"] .template-app { --card-bg: #FCFAF2; --card-ink: #17191F; --card-ink-2: #737373; --card-inner: #ECEAE3; --card-line: rgba(23, 25, 31, 0.14); --card-accent: #B62F35; --on-card-accent: #FFFFFF; --card-accent-text: #B62F35; --card-accent-2-text: #266A8B; --card-star: #B62F35; --card-star-off: #878887; --card-row-hi: rgba(182, 47, 53, 0.16); --card-recap-tint: rgba(38, 106, 139, 0.24); }
:is(body, .rp-game-end)[data-theme="bunker"] .template-app { --card-bg: #282823; --card-ink: #FFFFFF; --card-ink-2: #A9A9A7; --card-inner: #373732; --card-line: rgba(255, 255, 255, 0.14); --card-accent: #A6A488; --on-card-accent: #17191F; --card-accent-text: #A6A488; --card-accent-2-text: #A6A488; --card-star: #A6A488; --card-star-off: #787874; --card-row-hi: rgba(166, 164, 136, 0.16); --card-recap-tint: rgba(166, 164, 136, 0.24); }
:is(body, .rp-game-end)[data-theme="spy"] .template-app { --card-bg: #FFFFFF; --card-ink: #17191F; --card-ink-2: #747579; --card-inner: #EFEFEF; --card-line: rgba(23, 25, 31, 0.14); --card-accent: #B9232E; --on-card-accent: #FFFFFF; --card-accent-text: #B9232E; --card-accent-2-text: #25262A; --card-star: #B9232E; --card-star-off: #888A8D; --card-row-hi: rgba(185, 35, 46, 0.16); --card-recap-tint: rgba(37, 38, 42, 0.24); }
:is(body, .rp-game-end)[data-theme="bunny"] .template-app { --card-bg: #19162F; --card-ink: #FFFFFF; --card-ink-2: #A3A2AC; --card-inner: #29263E; --card-line: rgba(255, 255, 255, 0.14); --card-accent: #7735D5; --on-card-accent: #FFFFFF; --card-accent-text: #5F87E6; --card-accent-2-text: #5F87E6; --card-star: #5F87E6; --card-star-off: #6E6C7C; --card-row-hi: rgba(119, 53, 213, 0.16); --card-recap-tint: rgba(95, 135, 230, 0.24); }
:is(body, .rp-game-end)[data-theme="werewords"] .template-app { --card-bg: #EFE4C4; --card-ink: #17191F; --card-ink-2: #64625A; --card-inner: #E0D6B8; --card-line: rgba(23, 25, 31, 0.14); --card-accent: #9F302D; --on-card-accent: #FFFFFF; --card-accent-text: #9F302D; --card-accent-2-text: #6A5F38; --card-star: #9F302D; --card-star-off: #817C70; --card-row-hi: rgba(159, 48, 45, 0.16); --card-recap-tint: rgba(230, 199, 93, 0.24); }
:is(body, .rp-game-end)[data-theme="quiz"] .template-app { --card-bg: #211759; --card-ink: #FFFFFF; --card-ink-2: #A6A2BD; --card-inner: #312765; --card-line: rgba(255, 255, 255, 0.14); --card-accent: #6640BA; --on-card-accent: #FFFFFF; --card-accent-text: #D5AE58; --card-accent-2-text: #D5AE58; --card-star: #D5AE58; --card-star-off: #746D97; --card-row-hi: rgba(102, 64, 186, 0.16); --card-recap-tint: rgba(213, 174, 88, 0.24); }
:is(body, .rp-game-end)[data-theme="100-to-1"] .template-app { --card-bg: #163A75; --card-ink: #FFFFFF; --card-ink-2: #A2B0C8; --card-inner: #26487F; --card-line: rgba(255, 255, 255, 0.14); --card-accent: #FFD43A; --on-card-accent: #17191F; --card-accent-text: #FFD43A; --card-accent-2-text: #EB9D9C; --card-star: #FFD43A; --card-star-off: #7D91B1; --card-row-hi: rgba(255, 212, 58, 0.16); --card-recap-tint: rgba(214, 58, 57, 0.24); }
:is(body, .rp-game-end)[data-theme="5seconds"] .template-app { --card-bg: #FFF9E8; --card-ink: #17191F; --card-ink-2: #74736F; --card-inner: #EFE9DA; --card-line: rgba(23, 25, 31, 0.14); --card-accent: #225BA7; --on-card-accent: #FFFFFF; --card-accent-text: #225BA7; --card-accent-2-text: #225BA7; --card-star: #225BA7; --card-star-off: #888782; --card-row-hi: rgba(34, 91, 167, 0.16); --card-recap-tint: rgba(34, 91, 167, 0.24); }
:is(body, .rp-game-end)[data-theme="melody"] .template-app { --card-bg: #2A1758; --card-ink: #FFFFFF; --card-ink-2: #AAA2BC; --card-inner: #392764; --card-line: rgba(255, 255, 255, 0.14); --card-accent: #A677EF; --on-card-accent: #17191F; --card-accent-text: #A677EF; --card-accent-2-text: #EDC945; --card-star: #A677EF; --card-star-off: #796D96; --card-row-hi: rgba(166, 119, 239, 0.16); --card-recap-tint: rgba(237, 201, 69, 0.24); }
:is(body, .rp-game-end)[data-theme="movie-frame"] .template-app { --card-bg: #242424; --card-ink: #FFFFFF; --card-ink-2: #A7A7A7; --card-inner: #333333; --card-line: rgba(255, 255, 255, 0.14); --card-accent: #F5C518; --on-card-accent: #17191F; --card-accent-text: #F5C518; --card-accent-2-text: #E9E9E9; --card-star: #F5C518; --card-star-off: #757575; --card-row-hi: rgba(245, 197, 24, 0.16); --card-recap-tint: rgba(233, 233, 233, 0.24); }
:is(body, .rp-game-end)[data-theme="geoguessr"] .template-app { --card-bg: #211C54; --card-ink: #FFFFFF; --card-ink-2: #A6A4BB; --card-inner: #312C60; --card-line: rgba(255, 255, 255, 0.14); --card-accent: #D63037; --on-card-accent: #FFFFFF; --card-accent-text: #9BCB31; --card-accent-2-text: #9BCB31; --card-star: #D63037; --card-star-off: #747093; --card-row-hi: rgba(214, 48, 55, 0.16); --card-recap-tint: rgba(155, 203, 49, 0.24); }
:is(body, .rp-game-end)[data-theme="wavelength"] .template-app { --card-bg: #F0E4C9; --card-ink: #17191F; --card-ink-2: #65625C; --card-inner: #E1D6BD; --card-line: rgba(23, 25, 31, 0.14); --card-accent: #ED755B; --on-card-accent: #17191F; --card-accent-text: #975043; --card-accent-2-text: #456968; --card-star: #C2634F; --card-star-off: #817C72; --card-row-hi: rgba(237, 117, 91, 0.16); --card-recap-tint: rgba(114, 184, 176, 0.24); }
:is(body, .rp-game-end)[data-theme="fibbage"] .template-app { --card-bg: #F0E5C6; --card-ink: #17191F; --card-ink-2: #65635B; --card-inner: #E1D7BA; --card-line: rgba(23, 25, 31, 0.14); --card-accent: #EBA332; --on-card-accent: #17191F; --card-accent-text: #815E29; --card-accent-2-text: #595F59; --card-star: #AB7A2C; --card-star-off: #817D71; --card-row-hi: rgba(235, 163, 50, 0.16); --card-recap-tint: rgba(155, 165, 146, 0.24); }
:is(body, .rp-game-end)[data-theme="quiplash"] .template-app { --card-bg: #F4EFF8; --card-ink: #17191F; --card-ink-2: #66666D; --card-inner: #E5E0E9; --card-line: rgba(23, 25, 31, 0.14); --card-accent: #743CAE; --on-card-accent: #FFFFFF; --card-accent-text: #743CAE; --card-accent-2-text: #456E6B; --card-star: #743CAE; --card-star-off: #848289; --card-row-hi: rgba(116, 60, 174, 0.16); --card-recap-tint: rgba(115, 195, 182, 0.24); }
:is(body, .rp-game-end)[data-theme="whatdoyoumeme"] .template-app { --card-bg: #F1F0F6; --card-ink: #17191F; --card-ink-2: #65666C; --card-inner: #E2E1E7; --card-line: rgba(23, 25, 31, 0.14); --card-accent: #267C86; --on-card-accent: #FFFFFF; --card-accent-text: #7E3C9B; --card-accent-2-text: #7E3C9B; --card-star: #267C86; --card-star-off: #828389; --card-row-hi: rgba(38, 124, 134, 0.16); --card-recap-tint: rgba(126, 60, 155, 0.24); }
:is(body, .rp-game-end)[data-theme="jokinghazard"] .template-app { --card-bg: #F6F6F0; --card-ink: #17191F; --card-ink-2: #707173; --card-inner: #E6E7E1; --card-line: rgba(23, 25, 31, 0.14); --card-accent: #236B92; --on-card-accent: #FFFFFF; --card-accent-text: #236B92; --card-accent-2-text: #51702A; --card-star: #236B92; --card-star-off: #848685; --card-row-hi: rgba(35, 107, 146, 0.16); --card-recap-tint: rgba(119, 170, 50, 0.24); }
:is(body, .rp-game-end)[data-theme="crocodile"] .template-app { --card-bg: #FFFFFF; --card-ink: #17191F; --card-ink-2: #747579; --card-inner: #EFEFEF; --card-line: rgba(23, 25, 31, 0.14); --card-accent: #487B18; --on-card-accent: #FFFFFF; --card-accent-text: #487B18; --card-accent-2-text: #667933; --card-star: #487B18; --card-star-off: #888A8D; --card-row-hi: rgba(72, 123, 24, 0.16); --card-recap-tint: rgba(180, 216, 70, 0.24); }
:is(body, .rp-game-end)[data-theme="drawful"] .template-app { --card-bg: #FFFFFF; --card-ink: #17191F; --card-ink-2: #747579; --card-inner: #EFEFEF; --card-line: rgba(23, 25, 31, 0.14); --card-accent: #C61D76; --on-card-accent: #FFFFFF; --card-accent-text: #C61D76; --card-accent-2-text: #252525; --card-star: #C61D76; --card-star-off: #888A8D; --card-row-hi: rgba(198, 29, 118, 0.16); --card-recap-tint: rgba(37, 37, 37, 0.24); }
:is(body, .rp-game-end)[data-theme="imaginarium"] .template-app { --card-bg: #FFF0CA; --card-ink: #17191F; --card-ink-2: #6B665C; --card-inner: #EFE1BE; --card-line: rgba(23, 25, 31, 0.14); --card-accent: #422C35; --on-card-accent: #FFFFFF; --card-accent-text: #422C35; --card-accent-2-text: #45667C; --card-star: #422C35; --card-star-off: #888373; --card-row-hi: rgba(66, 44, 53, 0.16); --card-recap-tint: rgba(114, 179, 217, 0.24); }
/* palette-roles:end */
.template-app :is(.leaderboard-card, .qpg-card:not(.qpg-more-games), .qpg-game-card--catalog, .qpg-rating-success) {
  --bg-card: var(--card-bg); --bg-secondary: var(--card-inner);
  --text-primary: var(--card-ink); --text-secondary: var(--card-ink-2); --line: var(--card-line);
  --accent-pink: var(--card-accent); --btn-primary: var(--card-accent); --on-accent: var(--on-card-accent);
  --accent-text: var(--card-accent-text); --row-hi: var(--card-row-hi); --recap-tint: var(--card-recap-tint);
  --game-accent: var(--card-accent); --onboarding-accent: var(--card-accent-text);
  --btn-outline: var(--card-ink-2); --star: var(--card-star); --star-off: var(--card-star-off);
  color: var(--text-primary);
}
.template-app {
  position: relative;
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 24px calc(24px + env(safe-area-inset-bottom, 0px));
}

.dashboard { display: flex; flex-direction: column; }
.dashboard-hero { padding: 6px 0 12px; text-align: center; }
.winner-icon { margin: 14px 0 4px; font-size: 48px; line-height: 1; }
.result-kicker { margin: 0 0 2px; color: var(--text-secondary); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.qpg-rating--compact { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; padding: 10px 14px !important; }
.qpg-rating--compact .qpg-section-title { margin: 0; font-size: 16px; }
.qpg-rating--compact .qpg-stars { gap: 0; }
.qpg-rating--compact .qpg-star { width: 34px; min-width: 34px; height: 44px; min-height: 44px; font-size: 28px; }
.qpg-rating--compact .qpg-feedback, .qpg-rating--compact .qpg-rating-message { flex-basis: 100%; }
.qpg-rating--compact .qpg-rating-message:empty { display: none; }
.dashboard h1 { margin: 0; font-family: var(--font-display); font-size: 23px; line-height: 1.2; }
/* More room for the board and the awards (user decision 2026-10-09): no «<игра> · игра окончена»
   line, no «Первое место — …» headline (screen readers still get it) and no «Итог вашей партии»
   over the awards; the hero, board and awards say it. The share image keeps its own texts. */
.dashboard-hero .result-kicker, .qpg-recap .qpg-kicker { display: none; }
.dashboard-hero h1 {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.leaderboard-card {
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 16px;
  background: var(--bg-card);
}

.leaderboard-card h2 { margin: 0 0 8px; color: var(--text-secondary); font-size: 16px; font-weight: 600; text-align: center; }
.leaderboard { display: grid; gap: 6px; }

.leader-row {
  display: grid;
  grid-template-columns: 30px 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 4px 8px;
  border-radius: 10px;
  background: var(--bg-secondary);
}

.leader-row:first-child {
  border: 1px solid var(--accent-pink);
  background: var(--row-hi);
}

.rank {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
}

.leader-row:first-child .rank { background: var(--accent-pink); color: var(--on-accent); }
.leader-avatar { display: grid; width: 34px; height: 34px; overflow: hidden; place-items: center; border-radius: 50%; background: var(--bg-card); color: var(--text-primary); font-size: 14px; font-weight: 700; }
.leader-avatar img { width: 100%; height: 100%; object-fit: cover; }
.leader-name { min-width: 0; overflow: hidden; font-size: 16px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.leader-score { color: var(--card-accent-2-text); font-size: 17px; font-weight: 700; }
.leader-row:first-child .leader-score { color: var(--accent-text); }

#post-game { display: grid; gap: 10px; }
.leader-row.leader-row--team { grid-template-columns: 30px minmax(0, 1fr) auto; }
.qpg-game-card--catalog .qpg-game-copy small { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.qpg-card { border: 0 !important; border-radius: 20px !important; background: var(--bg-card) !important; }
.qpg-recap {
  padding: 12px !important;
  background: linear-gradient(145deg, var(--recap-tint), var(--bg-card) 70%) !important;
}
.qpg-recap .qpg-kicker { margin-bottom: 3px; font-size: 10px; }
/* Section headings sit on the centre line like «Результаты» above them. */
.qpg-recap .qpg-kicker, .qpg-more-games .qpg-section-title { text-align: center; }
.qpg-recap .qpg-recap-title { font-size: 18px; }
.qpg-recap .qpg-recap-copy { margin: 4px 0 8px; font-size: 13px; line-height: 1.35; }
/* «12 карточек · 3 наказания»: the summary of games without a board or awards (Я никогда не). */
.qpg-recap-facts { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 6px; margin-bottom: 8px; }
.qpg-recap-fact { display: grid; justify-items: center; gap: 2px; padding: 10px 6px; border-radius: 12px; background: var(--bg-secondary); text-align: center; }
.qpg-recap-fact-value { color: var(--card-accent-2-text); font-family: var(--font-display); font-size: 24px; line-height: 1.1; }
.qpg-recap-fact-label { color: var(--text-secondary); font-size: 12px; font-weight: 600; line-height: 1.2; }
.qpg-recap .qpg-recap-copy { color: var(--text-primary); text-align: center; }
.qpg-recap .qpg-conversation { gap: 5px; margin-bottom: 8px; }
.qpg-recap .qpg-message { gap: 7px; }
.qpg-recap .qpg-message-avatar { width: 34px; height: 34px; font-size: 13px; }
.qpg-recap .qpg-message-body { gap: 1px; }
.qpg-recap .qpg-message-name { font-size: 10px; }
.qpg-recap .qpg-message-bubble { padding: 6px 9px; border-radius: 3px 11px 11px; font-size: 12px; line-height: 1.25; }
.qpg-kicker, .qpg-message-name { color: var(--card-accent-2-text) !important; }
/* Primary: «Поделиться итогом», «Сыграть ещё раз», «Отправить». Secondary: «Продолжить», «Другие игры». */
.template-app :is(.qpg-share-button, .qpg-secondary-button, .qpg-replay-continue, .qpg-replay-other, .qpg-flow-next),
.template-app .dashboard[data-post-game-step="feedback"] .catalog-link {
  min-height: var(--btn-height) !important;
  padding: 4px 18px !important;
  border: 2px solid var(--btn-primary, var(--accent-pink)) !important;
  border-radius: var(--btn-radius) !important;
  background: var(--btn-primary, var(--accent-pink)) !important;
  color: var(--on-accent) !important;
  box-shadow: none !important;
  font-family: var(--font-body) !important;
  font-size: 16px !important;
  font-weight: var(--btn-weight) !important;
  letter-spacing: normal;
  text-transform: none;
}
.template-app .qpg-flow-next,
.template-app .qpg-replay-other,
.template-app .dashboard[data-post-game-step="feedback"] .catalog-link {
  border-color: var(--btn-outline, var(--line)) !important;
  background: transparent !important;
  color: var(--text-primary) !important;
}
.template-app .qpg-flow-next:active,
.template-app .qpg-replay-other:active,
.template-app .dashboard[data-post-game-step="feedback"] .catalog-link:active { background: var(--row-hi) !important; }
.qpg-reason { border-color: var(--line) !important; background: transparent !important; color: var(--text-primary) !important; }
.qpg-reason.selected { border-color: var(--accent-pink) !important; color: var(--text-primary) !important; }

/* The shared post-game styles are written for the dark default; the template
   points them at its theme tokens so light game themes stay readable. */
.template-app { --game-accent: var(--accent-pink); --onboarding-accent: var(--accent-text); }
.template-app .qpg-section-title, .template-app .qpg-flow-title { color: var(--text-primary); font-family: var(--font-display); }
.template-app .qpg-section-hint, .template-app .qpg-rating-message, .template-app .qpg-rating-modal-close { color: var(--text-secondary) !important; }
.template-app .qpg-award-title, .template-app .qpg-message-bubble { color: var(--text-primary) !important; }
.template-app .qpg-award-text { color: var(--text-secondary) !important; }
.template-app .qpg-message-avatar { background: var(--accent-pink); color: var(--on-accent); }
.template-app .qpg-message-avatar:has(img) { background: var(--bg-secondary); }
.template-app .qpg-comment { border-color: var(--line) !important; background: var(--bg-secondary) !important; color: var(--text-primary) !important; }
.template-app .qpg-rating-dialog .qpg-card, .template-app .qpg-rating-success { color: var(--text-primary); }
.template-app .qpg-rating-success { background: var(--bg-card) !important; }
.template-app .qpg-review-invite-text, .template-app .qpg-review-invite-later { color: var(--text-secondary) !important; }
.template-app .qpg-review-invite--inline { background: transparent !important; border-top: 1px solid var(--line) !important; border-radius: 0 !important; }
.template-app .qpg-replay-pack { border-color: var(--line) !important; background: var(--bg-secondary) !important; color: var(--text-primary) !important; }
.template-app .qpg-replay-pack.selected { border-color: var(--accent-pink) !important; }
.template-app .qpg-replay-art { background: var(--bg-card) !important; }
.template-app .qpg-replay-check { background: var(--accent-pink) !important; color: var(--on-accent) !important; }
.template-app .qpg-replay-copy small { color: var(--text-secondary) !important; }
.template-app .qpg-replay-pack.locked .qpg-replay-copy small { color: var(--accent-text) !important; }
.template-app .qpg-replay-continue:disabled { opacity: .5; }
.template-app .qpg-replay-played-covers img { border-color: var(--accent-pink); background: var(--bg-card); }
.template-app .qpg-replay-played-copy strong, .template-app .qpg-replay-preview, .template-app .qpg-replay-samples-head { color: var(--text-primary); }
.template-app .qpg-replay-played-copy small { color: var(--text-secondary); }
.template-app .qpg-replay-preview-cover > img:first-child { background: var(--bg-card); }
.template-app .qpg-replay-preview-cover.selected > img:first-child { border-color: var(--accent-pink); }
.template-app .qpg-replay-link { color: var(--text-secondary); }
.template-app .qpg-replay-sample { border-color: var(--line); background: var(--bg-secondary); color: var(--text-primary); }
.template-app .qpg-game-card--catalog { border-color: var(--line) !important; background: var(--bg-card) !important; color: var(--text-primary) !important; }
.template-app .qpg-game-card--catalog .qpg-game-copy strong { color: var(--accent-text) !important; }
.template-app .qpg-game-card--catalog .qpg-game-copy small { color: var(--text-secondary) !important; }
.template-app .qpg-game-tags span { border-color: var(--line) !important; background: var(--bg-secondary) !important; color: var(--text-secondary) !important; }
.template-app .qpg-game-voters { color: var(--accent-text) !important; }
.template-app .qpg-game-voters-chips { color: var(--text-primary) !important; }
.dashboard[data-post-game-step="feedback"] .qpg-game-card--catalog .qpg-game-voters { padding-left: 60px; margin-top: 6px; }
.template-app .qpg-game-card--voted { border-color: var(--accent-text) !important; box-shadow: inset 0 0 0 1px var(--accent-text); }
.qpg-more-games { padding: 18px 0 0 !important; background: transparent !important; }
.qpg-more-games .qpg-section-title { margin-bottom: 12px; }

.qpg-stars {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.qpg-star {
  width: 52px;
  min-width: 52px;
  height: 52px;
  min-height: 52px;
  padding: 0;
  border: 0 !important;
  border-radius: 50%;
  background: transparent !important;
  color: var(--star-off);
  font-size: 38px;
  transition: color 140ms ease, transform 140ms ease, filter 140ms ease;
}

.qpg-star.selected {
  background: transparent !important;
  color: var(--star) !important;
  filter: drop-shadow(0 3px 7px rgba(0, 0, 0, .18));
}

.qpg-star:active { transform: scale(.9); }

@media (hover: hover) {
  .qpg-star:hover { color: var(--star); transform: translateY(-2px); }
}

.dashboard[data-post-game-step="summary"] > .catalog-link {
  display: none;
}

.dashboard[data-post-game-step="feedback"] > .dashboard-hero,
.dashboard[data-post-game-step="feedback"] > .outcome-switcher,
.dashboard[data-post-game-step="feedback"] > .leaderboard-card {
  display: none;
}

.dashboard[data-post-game-step="feedback"] #post-game {
  padding-top: 5px;
}

.qpg-flow-feedback > .qpg-flow-title {
  min-height: 48px;
  margin-left: 40px;
  display: flex;
  align-items: center;
  font-size: 19px;
}

.qpg-rating-dialog .qpg-card { background: var(--bg-card) !important; }
.qpg-rating-modal-close:focus-visible { outline: 3px solid var(--text-primary); outline-offset: 1px; }

.catalog-link { display: grid; min-height: 48px; place-items: center; color: var(--text-secondary); font-size: 15px; text-decoration: none; }

.btn-back:focus-visible, .catalog-link:focus-visible, .qpg-game-card:focus-visible, .qpg-replay-pack:focus-visible, .qpg-replay-continue:focus-visible, .qpg-replay-other:focus-visible, .qpg-replay-preview-cover:focus-visible, .qpg-replay-link:focus-visible, .qpg-flow-next:focus-visible, .qpg-star:focus-visible { outline: 3px solid var(--text-primary); outline-offset: 3px; }

@media (max-width: 360px) {
  .template-app { padding-right: 16px; padding-left: 16px; }
  .winner-icon { font-size: 60px; }
  .leaderboard-card { padding: 14px; }
  .leader-row { grid-template-columns: 34px 38px minmax(0, 1fr) auto; padding-right: 9px; padding-left: 9px; }
  .leader-avatar, .qpg-recap .qpg-message-avatar { width: 38px; height: 38px; }
  .leader-score { font-size: 17px; }
  .qpg-rating-dialog .qpg-stars { gap: 4px; }
  .qpg-rating-dialog .qpg-star { width: 44px; min-width: 44px; height: 48px; min-height: 48px; font-size: 34px; }
}

@media (orientation: landscape) and (max-height: 560px) {
  .template-app { max-width: 760px; padding-top: calc(20px + env(safe-area-inset-top, 0px)); }
  .dashboard { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(320px, 1.2fr); gap: 14px; }
  .dashboard-hero { align-self: start; padding-top: 42px; }
  .leaderboard-card { grid-column: 1; }
  #post-game, .catalog-link { grid-column: 2; }
  #post-game { grid-row: 1 / span 3; }
}

/* Team rows show their players' avatars next to the team name. */
.team-avatars { display: inline-flex; margin-left: 10px; vertical-align: middle; }
.team-avatars img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--bg-card); border: 2px solid var(--bg-secondary); }
.team-avatars img + img { margin-left: -8px; }

/* One screen, no page scroll. The awards always get their full two lines, in
   a block whose height is fixed before the AI text arrives (no jumps); the
   leaderboard takes what is left and scrolls inside. If even that does not
   fit, the summary steps down through .fit-1….fit-3 (fitToScreen() in main.ts). */
.template-app .qpg-award[hidden] { display: flex !important; visibility: hidden; }
.template-app .qpg-award-head { flex-wrap: nowrap; min-height: 19px; overflow: hidden; }
.template-app .qpg-award-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.template-app .qpg-award .qpg-message-name { flex-shrink: 0; }
.template-app .qpg-award-text {
  display: -webkit-box;
  min-height: calc(2em * 1.35);
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.35;
}
.template-app .qpg-award-text[hidden] { display: -webkit-box !important; visibility: hidden; }
.template-app:has(.dashboard[data-post-game-step="summary"]:not([hidden])) {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
}
.dashboard[data-post-game-step="summary"] { flex: 1 1 auto; min-height: 0; }
.dashboard[data-post-game-step="summary"] > .leaderboard-card {
  display: flex;
  flex: 0 1 auto;
  flex-direction: column;
  min-height: 118px;
}
.dashboard[data-post-game-step="summary"] .leaderboard {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  /* The cut-off row fades out, so it reads as "scroll for more". */
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 18px), transparent);
  mask-image: linear-gradient(180deg, #000 calc(100% - 18px), transparent);
}
.dashboard[data-post-game-step="summary"] .leaderboard::-webkit-scrollbar { display: none; }
.dashboard[data-post-game-step="summary"] .leaderboard.is-scrolled-end { -webkit-mask-image: none; mask-image: none; }
.dashboard[data-post-game-step="summary"] > .dashboard-hero,
.dashboard[data-post-game-step="summary"] > .outcome-switcher,
.dashboard[data-post-game-step="summary"] > #post-game { flex-shrink: 0; }
.dashboard.fit-1 { --fit-gap: 6px; }
.fit-1 .dashboard-hero { padding: 0 0 8px; }
.fit-1 .ge-hero { min-height: 0; padding-top: 12px; }
.fit-1 .ge-hero-avatar { width: 68px; height: 68px; }
.fit-1 .ge-hero svg.ge-blob { width: 60px; height: auto; }
.fit-1 .winner-icon { margin: 4px 0 2px; }
.fit-1 h1 { font-size: 20px; }
.fit-1 .leaderboard-card { margin-bottom: 8px; padding: 8px 10px; }
.fit-1 .leaderboard-card h2 { margin-bottom: 6px; font-size: 14px; }
.fit-1 .leaderboard { gap: 4px; }
.fit-1 .leader-row { min-height: 38px; padding-top: 2px; padding-bottom: 2px; }
.fit-1 .leader-avatar, .fit-1 .qpg-recap .qpg-message-avatar { width: 30px; height: 30px; }
.fit-1 #post-game, .fit-1 .qpg-flow-summary { gap: 8px; }
.fit-1 .qpg-recap .qpg-conversation { gap: 4px; margin-bottom: 6px; }
.fit-2 .ge-hero-avatar { width: 52px; height: 52px; }
.fit-2 .ge-hero svg.ge-blob { width: 46px; }
.fit-2 .ge-hero { padding-top: 10px; }
.fit-2 .leaderboard-card h2, .fit-2 .qpg-recap .qpg-kicker { display: none; }
.fit-3 .winner-icon { display: none; }
.fit-3 .dashboard-hero { padding-top: 4px; }
.dashboard.fit-3[data-post-game-step="summary"] > .leaderboard-card { min-height: 80px; }
/* Only the tightest screens trade button height (56 → 48) for a visible leaderboard row. */
.dashboard.fit-3, .dashboard.next-fit-3 { --btn-height: 48px; }


/* «Что дальше?» fits one screen too: packs in one swipeable row, compact
   game cards without descriptions, the rating moved to a popup. */
.dashboard[data-post-game-step="feedback"] .qpg-replay-packs { gap: 10px; padding: 10px !important; }
.dashboard[data-post-game-step="feedback"] .qpg-replay-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
/* .next-fit-2 (small screens): the packs go back to one swipeable row. */
.dashboard.next-fit-2[data-post-game-step="feedback"] .qpg-replay-grid {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 20px) / 3.25);
  margin: 0 -10px;
  padding: 2px 10px 4px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 10px;
  scrollbar-width: none;
}
.dashboard[data-post-game-step="feedback"] .qpg-replay-grid::-webkit-scrollbar { display: none; }
.dashboard[data-post-game-step="feedback"] .qpg-replay-pack { scroll-snap-align: start; border-radius: 14px; }
.dashboard[data-post-game-step="feedback"] .qpg-replay-copy { padding: 6px 8px 8px; }
.dashboard[data-post-game-step="feedback"] .qpg-replay-copy strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard[data-post-game-step="feedback"] .qpg-replay-copy small { font-size: 11px; }
.dashboard[data-post-game-step="feedback"] .qpg-replay-lock { top: 6px; left: 6px; width: 24px; height: 24px; }
.dashboard[data-post-game-step="feedback"] .qpg-replay-check { top: 6px; right: 6px; width: 22px; height: 22px; font-size: 13px; }
.dashboard[data-post-game-step="feedback"] .qpg-replay-continue { padding-right: 12px !important; padding-left: 12px !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The pack's name may wrap: «Сыграть ещё раз с набором «Самые неловкие вопросы»». */
.dashboard[data-post-game-step="feedback"] .qpg-replay-same { line-height: 1.2; white-space: normal; text-overflow: clip; }
.dashboard[data-post-game-step="feedback"] .qpg-more-games { padding-top: 6px !important; }
.dashboard[data-post-game-step="feedback"] .qpg-more-games .qpg-section-title { margin-bottom: 8px; font-size: 18px; }
.dashboard[data-post-game-step="feedback"] .qpg-game-card--catalog { min-height: 0; align-items: center; padding: 8px 10px; }
.dashboard[data-post-game-step="feedback"] .qpg-game-card--catalog .qpg-game-image { width: 48px; height: 48px; margin-right: 12px; border-radius: 11px; }
.dashboard[data-post-game-step="feedback"] .qpg-game-card--catalog .qpg-game-copy small { margin-top: 2px; font-size: 12px; line-height: 1.3; -webkit-line-clamp: 2; }
.dashboard[data-post-game-step="feedback"] .qpg-game-tags { padding-left: 60px; margin-top: 6px; }
/* .next-fit-1: game cards drop their description first. */
.dashboard.next-fit-1[data-post-game-step="feedback"] .qpg-game-card--catalog .qpg-game-copy small { display: none; }
.dashboard.next-fit-1[data-post-game-step="feedback"] .qpg-game-tags { margin-top: -22px; }
.dashboard.next-fit-1[data-post-game-step="feedback"] .qpg-game-card--catalog .qpg-game-copy { padding: 0 0 22px; }
/* «Другие игры» is the game's secondary button (styled with the other buttons above). */
.dashboard[data-post-game-step="feedback"] .catalog-link { margin-top: 4px; }
.dashboard.next-fit-3[data-post-game-step="feedback"] .catalog-link { margin-top: 0; }
.dashboard.next-fit-3[data-post-game-step="feedback"] .qpg-more-games { padding-top: 0 !important; }
.dashboard.next-fit-3[data-post-game-step="feedback"] .qpg-more-games .qpg-section-title { margin-bottom: 4px; }
.dashboard[data-post-game-step="feedback"] .qpg-flow-feedback > .qpg-flow-title { min-height: 40px; }
.dashboard[data-post-game-step="feedback"] #post-game { padding-top: 0; }
/* /neverhaveiever/cutout-theme.css */
/* Game Theme: flat paper characters, using the existing RoomPlay screen contract. */
:root {
    /* Answer and gender tones: COMMON/roomplay-palettes.html / neverhaveiever (correct, wrong, male, female). */
    --rp-correct: #75c259;
    --rp-correct-ink: #17191f;
    --rp-wrong: #fd7276;
    --rp-wrong-ink: #17191f;
    --rp-male: #63b0fc;
    --rp-female: #f77cb0;
    --game-accent: #bc2438;
    --game-accent-strong: #bc2438;
    --game-yellow: #f1dadd;
    --game-leaf: #f1dadd;
    --game-ink: #171316;
    --game-paper: #f1dadd;
    --game-line: #2a1d24;
    --packs-feedback-rgb: 188, 36, 56;
    --bg-primary: #171316;
    --bg-secondary: #2a1d24;
    --bg-card: #2a1d24;
    --text-primary: #f1dadd;
    --text-secondary: #f1dadd;
    --onboarding-accent: var(--game-accent);
    --onboarding-accent-dark: var(--game-accent-strong);
    --onboarding-shadow: transparent;
    --onboarding-shadow-hover: transparent;
}

body, .page-loader { background: var(--bg-primary); }
.loader-spinner { border-top-color: var(--game-accent); }
.multiplayer-brand-mark span { background: var(--game-accent); }
.multiplayer-screen {
    --rp-bg: var(--bg-primary);
    --rp-panel: var(--bg-card);
    --rp-surface: var(--bg-secondary);
    --rp-line: var(--game-line);
    --rp-muted: var(--text-secondary);
    --game-accent: inherit;
    --game-accent-soft: var(--game-paper);
    --game-secondary: var(--game-paper);
    --game-positive: var(--game-accent);
    --game-warning: var(--game-paper);
    background: var(--bg-primary);
}
.title, .slide-title,
.multiplayer-screen h1, .modal-title {
    font-family: Unbounded, Manrope, sans-serif;
    font-style: normal;
    font-weight: 800;
    letter-spacing: -.035em;
}
.slide-title { color: var(--game-paper); }
/* Rules cast: animated SVG scenes, static copies under reduced motion (see index.html <picture>). */
.slide-icon {
    width: min(240px, 60vw);
    margin-bottom: 18px;
    font-size: 0;
    line-height: 0;
}
.slide-icon picture,
.slide-icon img { display: block; width: 100%; height: auto; }
.btn-next-slide, .btn-play, .btn-close-modal {
    color: var(--game-ink);
    background: var(--game-accent);
    border-radius: 16px;
    box-shadow: none;
    font-weight: 800;
    min-height: 48px;
}
.btn-skip { color: var(--text-secondary); border-radius: 16px; }
.dot.active { background: var(--game-accent); box-shadow: none; }
.btn-back { min-width: 48px; min-height: 48px; }

#packs-screen .bottom-section { background: var(--bg-primary); }
#packs-screen .packs-summary { margin-bottom: 4px; }
#packs-screen .packs-summary[hidden] { display: none; }
#packs-screen:has(#packs-summary[hidden]) .packs-container {
    flex-grow: 0;
    padding-bottom: 8px;
}
#packs-screen .bottom-section:has(#packs-summary[hidden]) { padding-top: 8px; }
#packs-screen .bottom-section:has(#packs-summary[hidden]) .packs-room-error:empty { display: none; }
#packs-screen .summary-text strong { color: var(--game-accent); }

/* The two original statement layouts retain their sizes and reading order. */
.statement-card, .split-statement-card {
    position: relative;
    border: 2px solid var(--game-ink);
    border-radius: 24px;
    color: var(--game-ink);
    background: var(--game-accent);
    box-shadow: 5px 5px 0 var(--game-leaf);
}
.statement-card::before, .split-statement-card::before {
    content: '';
    position: absolute;
    top: 8px;
    right: 12px;
    width: 48px;
    height: 32px;
    background:
        radial-gradient(ellipse at 37% 60%, var(--game-ink) 0 12%, transparent 14%),
        radial-gradient(ellipse at 79% 60%, var(--game-ink) 0 12%, transparent 14%),
        radial-gradient(ellipse at 26% 50%, var(--game-paper) 0 25%, transparent 27%),
        radial-gradient(ellipse at 73% 50%, var(--game-paper) 0 25%, transparent 27%);
    transform: rotate(8deg);
    pointer-events: none;
}
.split-statement-card::after { background: none; }
.card-header, .card-text, .split-statement-lead, .split-statement-text { color: var(--game-ink); }
.card-header { font-weight: 800; letter-spacing: .06em; }
.split-statement-divider span { height: 3px; background: var(--game-ink); box-shadow: none; }
.swipe-stamp.happened, .swipe-stamp.never {
    color: var(--game-ink);
    background: var(--game-paper);
    filter: none;
}
.round-pill { color: var(--game-yellow); background: var(--bg-secondary); border-color: var(--game-line); }
.life-player { background: var(--bg-secondary); }
.life-player.current { border-color: var(--game-accent); background: var(--bg-card); }
.life-avatar { color: var(--game-ink); background: var(--game-leaf); }
.life-heart.active { filter: none; }
.multiplayer-answer-button { border: 2px solid var(--game-accent); background: var(--bg-secondary); color: var(--game-accent); border-radius: 16px; }
.multiplayer-answer-button.never { border-color: var(--game-positive); color: var(--game-positive); }
.multiplayer-answer-button.selected { color: var(--game-ink); background: var(--game-accent); box-shadow: 0 3px 0 var(--game-paper); }
.multiplayer-answer-button.never.selected { color: var(--game-ink); background: var(--game-positive); }
.reveal-statement { background: var(--game-accent); color: var(--game-ink); border: 0; border-radius: 16px; }
.reveal-statement span { color: var(--game-ink); }
.choice-column.happened { background: var(--game-accent); }
.choice-column.never { background: var(--game-positive); }
.choice-column { border-radius: 16px; }
.choice-avatar { background: var(--game-ink); }
.next-round-track span { background: var(--game-accent); }
.btn-punishment, .punishment-complete-button { background: var(--game-yellow); color: var(--game-ink); border-radius: 16px; box-shadow: none; }
.punishment-task-card { border-radius: 16px; background: var(--bg-secondary); box-shadow: none; }
.punishment-task-card.current { box-shadow: none; }
.punishment-timebar span { background: var(--game-warning); }
.modal-content { background: var(--bg-secondary); border: 2px solid var(--game-accent); box-shadow: 6px 6px 0 var(--game-accent); border-radius: 24px; }
.modal-title { color: var(--game-accent); }
.ended-icon { color: var(--game-ink); background: var(--game-yellow); box-shadow: none; }
.connection-overlay { background: #171316; color: var(--text-secondary); }

button:focus-visible,
[role="button"]:focus-visible {
    outline: 3px solid var(--game-paper);
    outline-offset: 4px;
}
.btn-play:disabled, .btn-next-slide:disabled, .punishment-complete-button:disabled {
    color: var(--text-secondary); background: var(--bg-card); box-shadow: none;
}
@media (hover: hover) {
    .btn-play:hover:not(:disabled), .btn-next-slide:hover:not(:disabled), .btn-close-modal:hover {
        color: var(--game-ink); background: var(--game-accent-strong); box-shadow: none;
    }
    .btn-punishment:hover { background: var(--game-yellow); box-shadow: 0 4px 0 var(--game-ink); }
    .statement-card:hover { box-shadow: 7px 7px 0 var(--game-leaf); }
    .multiplayer-answer-button:hover:not(:disabled):not(.selected) { background: var(--bg-card); }
}
@media (max-height: 700px) {
    .slide-icon { width: 140px; margin-bottom: 10px; }
}
/* Keep the existing two-column landscape board inside its visible shell. */
@media (orientation: landscape) and (max-height: 620px) and (min-width: 620px) {
    #multiplayer-game-screen { width: 100%; max-width: 920px; }
    #multiplayer-game-screen.active { grid-template-columns: minmax(200px, .85fr) minmax(280px, 1.25fr); }
    #multiplayer-game-screen .split-statement-card { min-height: 200px; grid-template-rows: minmax(64px, .85fr) 16px minmax(90px, 1.15fr); }
    #multiplayer-game-screen .split-statement-lead,
    #multiplayer-game-screen .split-statement-text { font-size: 24px; padding: 16px 24px; }
}
/* Interaction motion follows existing classes; no extra timers or input locks. */
#packs-screen {
    --packs-cue-color: var(--game-yellow);
    --packs-cue-shadow: var(--game-paper);
}
.life-avatar img, .choice-avatar img { width: 100%; height: 100%; object-fit: cover; }
/* Button answers need the same visible confirmation as dragging the card. */
#multiplayer-game-screen:has(#multiplayer-happened.selected) .swipe-stamp.happened,
#multiplayer-game-screen:has(#multiplayer-never.selected) .swipe-stamp.never {
    opacity: 1;
}
@media (prefers-reduced-motion: no-preference) {
    :root {
        --game-press-duration: 100ms;
        --game-settle-duration: 240ms;
        --game-spring: cubic-bezier(.2, .9, .3, 1.25);
    }
    button:not(:disabled) {
        transition: scale var(--game-settle-duration) var(--game-spring),
            translate var(--game-settle-duration) var(--game-spring),
            background-color 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
    }
    button:not(:disabled):active {
        scale: .96;
        translate: 0 2px;
        transition-duration: var(--game-press-duration);
    }
    .btn-back:active, .multiplayer-icon-button:active { scale: .88; }
    .dot { transition: background-color 180ms ease, scale 180ms var(--game-spring); }
    .dot.active { scale: 1.12; }

    #packs-screen .pack-card.packs-touch-press:not(.locked) {
        transform: scale(.965);
        transition-duration: var(--game-press-duration);
    }
    #packs-screen .pack-card.packs-touch-pop:not(.locked) {
        animation: nhie-pack-pop 320ms var(--game-spring);
    }
    #packs-screen .pack-card.packs-touch-pop:not(.locked) .pack-art {
        animation: nhie-character-nod 360ms ease-out;
    }
    .onboarding-slide.active .slide-icon {
        animation: nhie-character-arrive 380ms var(--game-spring) both;
    }
    .statement-card { transition: transform 180ms var(--game-spring), box-shadow 180ms ease; }
    .statement-card:active { transform: translate(3px, 3px) scale(.985); box-shadow: 2px 2px 0 var(--game-leaf); }
    /* Existing controller swaps copy at 200ms and removes .flip at 400ms. */
    .statement-card.flip { animation: nhie-paper-turn 400ms ease-in-out; }
    .multiplayer-answer-button.selected { animation: nhie-answer-stamp 260ms var(--game-spring); }
    #multiplayer-game-screen:has(.multiplayer-answer-button.selected) .split-statement-card:not(.dragging):not(.swipe-out-left):not(.swipe-out-right):not(.answered) {
        animation: nhie-card-answer 440ms ease-out;
    }
    #multiplayer-game-screen:has(#multiplayer-happened.selected) .split-statement-card { --answer-direction: 1; }
    #multiplayer-game-screen:has(#multiplayer-never.selected) .split-statement-card { --answer-direction: -1; }
    #multiplayer-game-screen:has(#multiplayer-happened.selected) .swipe-stamp.happened,
    #multiplayer-game-screen:has(#multiplayer-never.selected) .swipe-stamp.never {
        animation: nhie-visible-stamp 360ms var(--game-spring);
    }
    #multiplayer-reveal-screen.active .reveal-statement,
    #multiplayer-reveal-screen.active .choice-column,
    #multiplayer-punishment-screen.active .punishment-task-card {
        animation: nhie-paper-arrive 280ms var(--game-spring) both;
    }
    #multiplayer-reveal-screen.active .choice-column.never { animation-delay: 60ms; }
    .modal.active .modal-content { animation: nhie-paper-arrive 280ms var(--game-spring); }
    .modal.active .modal-icon { animation: nhie-character-nod 360ms ease-out; }
    @media (hover: hover) {
        .btn-play:hover:not(:disabled), .btn-next-slide:hover:not(:disabled),
        .btn-punishment:hover, .btn-close-modal:hover { translate: 0 -2px; }

        .statement-card:not(.flip):hover::before { animation: nhie-eye-glance 420ms ease-in-out; }
    }
}
@keyframes nhie-pack-pop {
    0% { transform: scale(calc(1 - .035 * var(--rp-motion-pack-intensity, 1))); }
    55% { transform: scale(calc(1 + .018 * var(--rp-motion-pack-intensity, 1))); }
    100% { transform: scale(1); }
}
@keyframes nhie-card-answer {
    0%, 100% { transform: translateX(0) rotate(0); }
    35% { transform: translateX(calc(var(--answer-direction) * calc(12px * var(--rp-motion-answer-intensity, 1)))) rotate(calc(var(--answer-direction) * calc(3deg * var(--rp-motion-answer-intensity, 1)))); }
    70% { transform: translateX(calc(var(--answer-direction) * calc(-3px * var(--rp-motion-answer-intensity, 1)))) rotate(calc(var(--answer-direction) * -.5deg * var(--rp-motion-answer-intensity, 1))); }
}
@keyframes nhie-visible-stamp {
    from { opacity: 0; scale: calc(1 + .45 * var(--rp-motion-answer-intensity, 1)); }
    to { opacity: 1; scale: 1; }
}
@keyframes nhie-character-nod {
    0%, 100% { rotate: calc(0deg * var(--rp-motion-artwork-intensity, 1)); }
    35% { rotate: calc(-8deg * var(--rp-motion-artwork-intensity, 1)); }
    70% { rotate: calc(5deg * var(--rp-motion-artwork-intensity, 1)); }
}
@keyframes nhie-character-arrive {
    from { opacity: 0; scale: calc(1 - .18 * var(--rp-motion-artwork-intensity, 1)); rotate: calc(-10deg * var(--rp-motion-artwork-intensity, 1)); }
    to { opacity: 1; scale: 1; rotate: calc(0deg * var(--rp-motion-artwork-intensity, 1)); }
}
@keyframes nhie-paper-turn {
    0%, 100% { transform: translateY(0) rotate(0); opacity: 1; }
    45% { transform: translateY(-8px) rotate(-2deg) scale(.97); opacity: 0; }
    50% { transform: translateY(8px) rotate(2deg) scale(.97); opacity: 0; }
}
@keyframes nhie-answer-stamp {
    0% { scale: calc(1 - .06 * var(--rp-motion-answer-intensity, 1)); }
    65% { scale: calc(1 + .025 * var(--rp-motion-answer-intensity, 1)); }
    100% { scale: 1; }
}
@keyframes nhie-paper-arrive {
    from { opacity: 0; translate: 0 calc(12px * var(--rp-motion-screen-intensity, 1)); scale: calc(1 - .03 * var(--rp-motion-screen-intensity, 1)); }
    to { opacity: 1; translate: 0 0; scale: 1; }
}
@keyframes nhie-eye-glance {
    0%, 100% { translate: 0 0; }
    40%, 65% { translate: -4px 2px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}

/* Approved dark/red palette and RoomPlay type roles. */
:root {
    --nhie-font-body: Manrope, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --nhie-font-display: Unbounded, Manrope, sans-serif;
    --nhie-on-accent: #f1dadd;
    --nhie-accent-text: #f1dadd;
    --accent-pink: var(--game-accent);
    --accent-pink-dark: var(--game-accent-strong);
}
body, .multiplayer-screen, button, input, select, textarea,
.card-text, .split-statement-text, .multiplayer-answer-button,
.punishment-task-card p, .reveal-statement strong, .reveal-statement span {
    font-family: var(--nhie-font-body);
}
.title, .slide-title, .multiplayer-screen h1, .modal-title,
.split-statement-lead, .waiting-orbit span {
    font-family: var(--nhie-font-display);
    overflow-wrap: anywhere;
}
.btn-next-slide, .btn-play, .btn-close-modal,
.multiplayer-answer-button.selected:not(.never) { color: var(--nhie-on-accent); }
@media (hover: hover) {
    .btn-play:hover:not(:disabled), .btn-next-slide:hover:not(:disabled),
    .btn-close-modal:hover { color: var(--nhie-on-accent); }
}
.statement-card, .split-statement-card {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--game-line);
    box-shadow: 5px 5px 0 var(--game-accent);
}
.statement-card:hover { box-shadow: 7px 7px 0 var(--game-accent); }
.card-header, .card-text, .split-statement-lead, .split-statement-text {
    color: var(--text-primary);
}
.split-statement-divider span { background: var(--game-accent); }
.reveal-statement { background: var(--bg-secondary); color: var(--text-primary); }
.reveal-statement span, .modal-title, #packs-screen .summary-text strong {
    color: var(--nhie-accent-text);
}
.multiplayer-answer-button:not(.never):not(.selected) { color: var(--nhie-accent-text); }
.choice-column.happened { color: var(--nhie-on-accent); }
.choice-column.happened .choice-empty { color: var(--nhie-on-accent); }
.connection-overlay { background: var(--bg-primary); }
.btn-play:disabled, .btn-next-slide:disabled { color: var(--text-secondary); }

.choice-column.happened .choice-player { background: #2a1d24; }
.choice-column.never .choice-empty { color: var(--game-ink); }
.life-heart.active { color: var(--nhie-accent-text); }

/* Both answers are peers: only the selected state changes their presentation. */
.multiplayer-answer-button.happened, .multiplayer-answer-button.never {
    color: var(--game-paper);
    border-color: var(--game-accent);
    background: var(--bg-secondary);
}
.multiplayer-answer-button.happened.selected, .multiplayer-answer-button.never.selected {
    color: var(--game-paper);
    background: var(--game-accent);
}
.choice-column.happened, .choice-column.never {
    background: var(--game-accent);
    color: var(--game-paper);
}
.choice-column.happened .choice-player, .choice-column.never .choice-player {
    background: var(--bg-secondary);
    color: var(--game-paper);
}
.choice-column.happened .choice-empty, .choice-column.never .choice-empty {
    color: var(--game-paper);
}
:root {
    --success: var(--game-paper);
    --error: var(--game-paper);
    --text-placeholder: var(--game-paper);
    --accent-purple: var(--game-accent);
    --accent-purple-dark: var(--game-accent);
}
.multiplayer-screen, .punishment-phase-screen, .multiplayer-icon-button,
.modal-overlay { background: var(--bg-primary); }
.multiplayer-brand-mark strong, .answer-progress, .next-round-label,
.punishment-phase-copy, .punishment-task-status, .life-name,
.multiplayer-center p, .multiplayer-eyebrow, .ended-copy {
    color: var(--game-paper);
}
.waiting-orbit { background: var(--bg-secondary); border-color: var(--game-accent); box-shadow: none; }
.waiting-orbit::before { border-top-color: var(--game-accent); border-right-color: var(--game-accent); }
.multiplayer-room-code, .punishment-timebar, .next-round-track,
.punishment-task-card.done { background: var(--bg-secondary); color: var(--game-paper); border-color: var(--game-paper); }
.punishment-task-card, .punishment-task-card.current { border-color: var(--game-accent); }
.multiplayer-icon-button:focus-visible { outline-color: var(--game-paper); }
.life-heart { color: var(--bg-secondary); }
.life-heart.active { color: var(--game-paper); }
.choice-avatar { color: var(--game-paper); background: var(--game-ink); }
#packs-screen .pack-lock { color: var(--game-paper); background: var(--game-accent); border-color: var(--game-paper); }

.multiplayer-brand-mark { color: var(--game-paper); }
.play-icon, .btn-punishment, .ended-icon { font-variant-emoji: text; }
.modal-icon {
    font-size: 0;
    height: 80px;
    background: url('/neverhaveiever/assets/cutout-flower.svg?v=20260914-strict-palette') center / contain no-repeat;
}

.punishment-phase-status, .punishment-time-label { color: var(--game-paper); }

/* The shared exit dialog adopts this game's surface and typography.
   Colours go through the shared --rp-dialog-* tokens (assets/css/confirm-dialog.css). */
body {
    --rp-dialog-overlay: var(--bg-primary);
    --rp-dialog-bg: var(--bg-secondary);
    --rp-dialog-border: 2px solid var(--game-accent);
    --rp-dialog-shadow: 6px 6px 0 var(--game-accent);
    --rp-dialog-title: var(--game-paper);
    --rp-dialog-text: var(--game-paper);
    --rp-dialog-primary-bg: var(--game-accent);
    --rp-dialog-primary-text: var(--game-paper);
    --rp-dialog-btn-radius: 16px;
    --rp-dialog-secondary-bg: var(--bg-secondary);
    --rp-dialog-secondary-border: var(--game-paper);
}
.confirm-dialog-modal {
    color: var(--game-paper);
    max-height: calc(100dvh - 64px);
    overflow-y: auto;
    font-family: var(--nhie-font-body);
}
.confirm-dialog-title {
    font-family: var(--nhie-font-display);
    font-size: clamp(16px, 5vw, 20px);
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.confirm-dialog-subtitle { font-size: 16px; }
.confirm-dialog-btn {
    min-height: 48px;
    font-family: var(--nhie-font-body);
    font-weight: 800;
}

/* Studio motion controls preserve gesture input and immediate game actions. */
[data-rp-motion] button:not(:disabled) { transition-duration: var(--rp-motion-button-active-duration) !important; }
[data-rp-motion] button:not(:disabled):active {
    transform: none !important;
    scale: var(--rp-motion-button-scale);
    translate: 0 var(--rp-motion-button-offset);
}
[data-rp-motion] .dot { transition-duration: var(--rp-motion-onboarding-active-duration); }

[data-rp-motion] #multiplayer-reveal-screen.active .reveal-statement,
[data-rp-motion] #multiplayer-reveal-screen.active .choice-column,
[data-rp-motion] #multiplayer-punishment-screen.active .punishment-task-card {
    animation-name: var(--rp-motion-screen-name, nhie-paper-arrive);
    animation-duration: var(--rp-motion-screen-duration);
    animation-timing-function: var(--rp-motion-screen-easing, var(--game-spring));
}
[data-rp-motion] .split-statement-card:not(.dragging) { transition-duration: var(--rp-motion-answer-active-duration); }
@media (hover:hover) {
    [data-rp-motion] .btn-play:hover:not(:disabled), [data-rp-motion] .btn-next-slide:hover:not(:disabled),
    [data-rp-motion] .btn-punishment:hover, [data-rp-motion] .btn-close-modal:hover { translate: 0 calc(-1 * var(--rp-motion-button-offset)); }

    [data-rp-motion] .statement-card:not(.flip):hover::before { animation: none; }
}
/* Short landscape phones (e.g. 844×390): fit rules art, text and Skip/Next inside the viewport;
   the online room shell's 64px top offset otherwise pushes the buttons below the fold. */
@media (orientation: landscape) and (max-height: 500px) {
    #onboarding-screen,
    .nhie-online #onboarding-screen { padding-top: calc(8px + env(safe-area-inset-top, 0px)); }
    #onboarding-screen .onboarding-container { padding-top: 0; gap: 8px; }
    #onboarding-screen .onboarding-slides { padding-top: 0; min-height: 0; }
    #onboarding-screen .onboarding-slide { padding: 4px 72px; }
    #onboarding-screen .slide-icon { width: 96px; margin-bottom: 4px; }
    #onboarding-screen .slide-title { font-size: 19px; margin-bottom: 6px; }
    #onboarding-screen .slide-text { font-size: 14px; line-height: 1.35; max-width: 520px; }
    #onboarding-screen .onboarding-buttons { margin-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
}

/* One button shape in every Я никогда не screen: 16 px corners, 800 weight for main actions
   (the online waiting «Присоединиться», the punishment «Выполнено» and the ended-screen Play drifted). */
body[data-rp-game] :is(.btn-join, .punishment-complete-button, #multiplayer-ended-screen .btn-play) { border-radius: 16px; }
body[data-rp-game] .punishment-complete-button { font-weight: 800; }

/* One-phone like / dislike / report on the statement card (shared content-report.css). */
.nhie-card-vote { margin-top: 14px; }
.nhie-card-vote .rp-card-vote__btn { color: rgb(241 218 221 / 50%); }
.nhie-card-vote .rp-card-vote__btn[aria-pressed="true"] { color: var(--game-paper); }
.nhie-card-vote .rp-card-vote__btn:active { background: rgb(241 218 221 / 10%); }
/* «Сообщить об ошибке» in the card's bottom-right corner (the top-right one holds the eyes). */
.nhie-report-flag { position: absolute; right: 6px; bottom: 6px; z-index: 3; color: rgb(241 218 221 / 55%); }
.nhie-report-flag[hidden] { display: none; }
/* Online: the host swaps a silly statement for another one (top-left corner of the card). */
.nhie-refresh-card { position: absolute; left: 6px; top: 6px; z-index: 3; width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: rgb(241 218 221 / 55%); font-size: 20px; cursor: pointer; }
.nhie-refresh-card[hidden] { display: none; }
/* Like / dislike / «Сообщить об ошибке» inside the punishment card: the one-phone «Наказание!»
   modal and every online punishment card. Online: thumbs centred at the bottom, flag bottom-right. */
.punishment-task-card { position: relative; padding-bottom: 56px; }
/* In the «Наказание!» modal the thumbs sit right under the task, above «Понятно!», and the flag in the
   top-right corner. */
#punishment-modal .modal-content { position: relative; }
#punishment-modal .punishment-card-vote { position: static; transform: none; margin: -6px auto 14px; }
#punishment-modal .punishment-report-flag { top: 6px; bottom: auto; }
.punishment-card-vote { position: absolute; left: 50%; bottom: 4px; z-index: 2; margin: 0; transform: translateX(-50%); }
.punishment-report-flag { position: absolute; right: 6px; bottom: 6px; z-index: 2; }
.punishment-card-vote[hidden], .punishment-report-flag[hidden] { display: none; }
.punishment-card-vote .rp-card-vote__btn, .punishment-report-flag { color: rgb(241 218 221 / 55%); }
.punishment-card-vote .rp-card-vote__btn[aria-pressed="true"] { color: var(--game-paper); }
/* «Дополнительные настройки» shares «Начать игру»'s shape (one button shape per game). */
.btn-additional-settings { border-radius: 16px; border-width: 2px; }

/* Without Premium a sample statement of a premium pack (game.js / multiplayer.ts): a dark chip with the drawn
   crown names the pack, and the shared pearlescent «Хотите перейти на уровень выше?» (premium-cta.css) sits
   under the card. No emoji. */
.nhie-card-teaser[hidden], .nhie-upgrade[hidden] { display: none; }
/* Chip look and card glow are the shared .rp-premium-teaser / .rp-premium-teaser-card (premium-cta.css). */
.nhie-card-teaser { margin: 6px auto 4px; }
.nhie-upgrade { max-width: 420px; margin: 14px auto 0; }
/* Online the card is a grid of lead / divider / statement; the chip used to land in the divider's row and push
   the statement into an extra one, so the card grew and was half empty. The sample card gets four content-sized
   rows centred in the card: it stays the ordinary card's size and, with the button under it, fits 360×640. */
#multiplayer-game-screen .split-statement-card.nhie-card--teaser { grid-template-rows: auto auto 20px auto; align-content: center; }
#multiplayer-game-screen .split-statement-card .nhie-card-teaser { justify-self: center; align-self: start; margin: 0 8px; }
#multiplayer-game-screen .nhie-card--teaser .split-statement-lead { padding: 26px 24px 8px; }
#multiplayer-game-screen .nhie-card--teaser .split-statement-text { padding: 6px 24px 14px; }
.nhie-upgrade--online { width: calc(100% - 32px); margin: 10px auto 0; flex: none; }
/* Sample punishment (premium-teasers.js): the shared chip under the title or the player, centred. */
.nhie-punishment-teaser { display: flex; width: fit-content; margin: 8px auto; }
#multiplayer-punishment-upgrade { width: calc(100% - 8px); margin: 12px auto 4px; }

/* Online card screen with room to breathe (owner 2026-10-21: «почему так скученно выглядит?»). The rows above
   the card are tighter, the statement keeps clear of the like / dislike / flag row at the card's bottom edge,
   the swipe hint shows until the player's first answer (multiplayer.ts) and its empty line collapses, and the
   premium sample uses the compact chip and pearl button (premium-cta.css). The header is not touched here. */
#multiplayer-game-screen .multiplayer-topline { min-height: 28px; margin-bottom: 8px; }
#multiplayer-game-screen .multiplayer-lives { margin-bottom: 12px; }
#multiplayer-game-screen .split-statement-card { padding-bottom: 40px; }
#multiplayer-game-screen .multiplayer-answer-area { padding-top: 12px; }
#multiplayer-game-screen .multiplayer-answer-area > p:empty { display: none; }
#multiplayer-game-screen .nhie-upgrade--online { width: 100%; margin: 10px 0 0; }
/* The words fill the card instead of huddling round the divider (owner: «текст прижимается к центру, хотя места
   много»): «Я никогда не…» sits at the top under the refresh / eyes row, the premium chip and the divider follow it,
   and the statement takes all the space left, centred in it; a short statement is set larger. */
@media (orientation: portrait), (max-width: 619px) {
    #multiplayer-game-screen .split-statement-card,
    #multiplayer-game-screen .split-statement-card.nhie-card--teaser { grid-template-rows: auto auto 24px minmax(0, 1fr); align-content: stretch; }
    #multiplayer-game-screen .split-statement-lead,
    #multiplayer-game-screen .nhie-card--teaser .split-statement-lead { grid-row: 1; align-items: start; padding: 52px 24px 10px; }
    #multiplayer-game-screen .split-statement-card .nhie-card-teaser { grid-row: 2; margin: 0 8px 4px; }
    #multiplayer-game-screen .split-statement-divider { grid-row: 3; }
    #multiplayer-game-screen .split-statement-text,
    #multiplayer-game-screen .nhie-card--teaser .split-statement-text { grid-row: 4; align-items: center; padding: 8px 24px; font-size: clamp(27px, 8.4vw, 40px); }
    #multiplayer-game-screen .split-statement-text.nhie-statement--short { font-size: clamp(32px, 10vw, 46px); }
}
