/* =====================================================
   CSS CUSTOM PROPERTIES (Variables)
   ===================================================== */
:root {
    /* Primary Brand Colors */
    --color-primary: #398d98;
    --color-primary-dark: #1f7985;
    --color-primary-light: #88fdfd;
    --color-primary-lighter: #dcffff;
    --color-gradient-purple: #9198e5;

    /* Text Colors */
    --color-text: black;
    --color-text-dark: #333;
    --color-text-medium: #555;
    --color-text-light: #666;
    --color-text-muted: #999;
    --color-text-inverse: white;

    /* Success Colors */
    --color-success: #19692c;
    --color-success-bg: #d4edda;
    --color-success-bg-light: #eaffea;
    --color-success-text: #060;
    --color-success-bright: #2ecc71;

    /* Error/Danger Colors */
    --color-error: #c00;
    --color-error-bg: #ffeaea;
    --color-danger: #b42318;

    /* Warning Colors */
    --color-warning-bg: #fff3cd;
    --color-warning-text: #856404;

    /* OAuth Provider Colors */
    --color-discord: #5865F2;
    --color-discord-hover: #7289da;
    --color-twitch: #9146FF;
    --color-twitch-hover: #a970ff;

    /* Neutral Colors */
    --color-white: #ffffff;
    --color-gray-lightest: #f0f0f0;
    --color-gray-lighter: #eee;
    --color-gray-light: #ccc;
    --color-gray: #6c757d;
    --color-black: #000000;

    /* Accent Colors */
    --color-accent: #42BDE3;
    --color-copy-btn: #4a9c5d;
    --color-copy-btn-hover: #3d8550;
    --color-copy-btn-border: #2d6b3a;

    /* Semantic Aliases */
    --color-bg-page: var(--color-primary);
    --color-bg-panel: var(--color-primary-light);
    --color-bg-input: var(--color-primary-lighter);
    --color-border: var(--color-black);
}

.age-declaration-dialog {
    width: min(32rem, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    margin: auto;
    padding: 1.25rem;
    color: var(--color-text);
    background: var(--color-white);
    border: 2px solid var(--color-border);
}

.age-declaration-dialog::backdrop {
    background: rgb(0 0 0 / 55%);
}

.age-declaration-dialog form {
    display: grid;
    gap: 0.85rem;
}

.age-declaration-dialog select {
    width: 100%;
    min-height: 2.5rem;
}

@font-face {
    font-family: 'Choko';
    src: url('fonts/choko/ttf/Choko.ttf') format('truetype');
}

body {
    margin: 0;
    padding: 0;
    font-family:
            system-ui,
            -apple-system,
            BlinkMacSystemFont,
            "Segoe UI",
            "Apple Color Emoji",
            "Segoe UI Emoji",
            "Noto Color Emoji",
            serif;
}

/* Localized UI text must never depend on the Latin-only Londrina font. */
body,
button,
input,
select,
textarea {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.emoji-art {
    display: inline-block;
    width: 1em;
    height: 1em;
    min-width: 1rem;
    min-height: 1rem;
    flex: 0 0 auto;
    max-width: 100%;
    object-fit: contain;
    vertical-align: -0.12em;
    pointer-events: none;
}

.emoji-art > svg {
    display: block;
    width: 100%;
    height: 100%;
}

.emoji-native-fallback {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 3px solid #101010;
    outline-offset: 3px;
}

div.canvas-border {
    background: var(--color-black);
    width: calc(100vw);
    height: calc(100vh - 12rem);
    display: block;
    margin: 0;
    padding: 0;
}

div.canvas {
    overflow: hidden;
    background: linear-gradient(30deg, var(--color-primary), var(--color-gradient-purple));
    position: relative;
    top: 1%;
    width: 98%;
    height: 90%;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

div.emoji {
    display: block;
    position: absolute;
    z-index: 1;
    font-size: medium;
}

div.emoji div {
    margin: 0;
    cursor: url("move.svg") 24 24, auto;
    border-radius: 16px;
    border: 4px solid transparent;
}


div.emoji div:hover {
    border: 4px dashed var(--color-black);
}

div.emoji.remote-emoji div:hover {
    border: 4px solid transparent;
}

div.emoji span:after {

}

div.emoji-selector {
    background: var(--color-white);
    color: var(--color-text);
    font-size: larger;
    padding: 1rem;
    position: relative;
}

div.emoji-selector input {
    width: 80%;
    display: block;
    height: 8rem;
    font-size: 400%;
    font-family:
            Choko,
            system-ui,
            -apple-system,
            BlinkMacSystemFont,
            "Segoe UI",
            "Apple Color Emoji",
            "Segoe UI Emoji",
            "Noto Color Emoji",
            serif;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    border-radius: 2rem;
    border: 4px dotted purple;
}

div.clock {
    position: absolute;
    top: 2rem;
    right: 3rem;
    display: block;
    width: 100px;
    height: 100px;

}

#mute-btn {
    position: absolute;
    top: 2.5rem;
    right: calc(3rem + 115px);
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.7;
}

#mute-btn:hover {
    opacity: 1;
}

div.emoji-palette {
    text-align: center;
    z-index: 8;
    background: darkgrey;
    height: 4rem;
}

div.logo {
    pointer-events: none;
    padding-top: 8rem;
    width: 20rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.45);
    position: fixed;
    top: -2rem;
    right: -6.5rem;

    z-index: 9;
    rotate: 45deg;
    font-size: 120%;
    cursor: crosshair;
}

div.bubble:hover {
    background: rgba(173, 173, 173, 0.7);


}

div.bubble {
    user-select: none;
    cursor: crosshair;
    font-size: 400%;
    display: inline-block;
    border-radius: 16rem;
    padding: 2rem;
    position: relative;
    z-index: 3;
    top: -4.5rem;
    margin: 1rem;
    background: rgba(108, 108, 108, 0.4);
    transition: 0.5s;
}

div.footer {
    position: fixed;
    bottom: 0;
    width: 100vw;
    z-index: 4;
}

table {
    border-spacing: 0;
    user-select: none;
    padding: 0;
    margin: 0;
}

.resizer {
    cursor: url("scale.svg") 24 24, col-resize;
    min-width: 12px;
    min-height: 12px;
}

.rotator {
    cursor: url("rotate.svg") 24 24, pointer;
    min-width: 12px;
    min-height: 12px;
}
table:hover .rotator:after, table:hover .resizer:after {
    border: 1px solid red;
}

.rotator:after, .resizer:after {
    width:12px;
    height: 12px;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0);
    position: relative;
    left: calc(50% - 6px);
    top: calc(50% - 6px);
    border-radius: 50%;
    content: " ";
}

tr {
    height: 8px;
}

div.categories {
    visibility: collapse;
    display: block;
    position: fixed;
    z-index: 7;
    right: 0;
    top: 0;
    background: ivory;
    height: 80%;
    width: 16rem;
}

div.header {
    pointer-events: none;

    display: block;
    text-align: center;
    position: fixed;
    z-index: 8;
    top: 0;
    left: calc(50% - 20rem);
    width: 40rem;
    background: ivory;
    font-size: 250%;
    min-height: 98px;
    border-bottom: 3px solid ivory;
    filter: drop-shadow(12px 4px 4px var(--color-black));
}

div.header:before {
    pointer-events: none;

    content: '';
    line-height: 0;
    font-size: 0;
    width: 0;
    height: 0;
    border-top: 50px solid ivory;
    border-bottom: 50px solid transparent;
    border-left: 30px solid transparent;
    border-right: 30px solid ivory;
    position: absolute;
    top: 0;
    left: -60px;
}

div.header:after {
    pointer-events: none;
    content: '';
    line-height: 0;
    font-size: 0;
    width: 0;
    height: 0;
    border-top: 50px solid ivory;
    border-bottom: 50px solid transparent;
    border-left: 30px solid ivory;
    border-right: 30px solid transparent;
    position: absolute;
    top: 0;
    right: -60px;
}


div.main-logo {

    display: grid;
    grid-template-columns: 8rem auto 8rem;
    margin: 2rem;
}

div.main-logo h1 {
    text-align: center;
    font-size: xx-large;
}

div.language-selector {
    display: inline-block;
    border: 4px solid var(--color-black);
    border-radius: 1rem;
    padding: 0.5rem;
    text-align: center;
    font-size: x-large;
    margin-top: auto;
    margin-bottom: auto;
    background: var(--color-primary-lighter);
}

.language-selector-popup {
    visibility: hidden;
    position: absolute;
}

.language-selector-popup li {
    display: inline-block;
}

div.language-selector:hover .language-selector-popup {
    visibility: visible;
}


body.index {
    background: var(--color-primary);
    border-top: 16px solid var(--color-black);
    min-height: 100vh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

div.start-game {
    width: 80vw;
    margin-right: auto;
    margin-left: auto;
    display: grid;
    grid-template-rows: auto auto;
}

div.main-logo img {
    height: 1rlh;
}

div.tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    grid-column-gap: 2px;
}

div.tab {
    border: 4px solid var(--color-black);
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
    padding: 1rem;
    cursor: pointer;
    background: var(--color-primary-lighter);
    transition: ease-in-out 0.3s;
    text-align: center;
    font-size: large;
}

div.tab.selected {
    background: var(--color-primary-light);
    border-bottom: 4px solid transparent;
}

div.lb {
    display: grid;
    grid-template-columns: 30% 70%;

}

div.wheelbox {
    overflow: hidden;

}

div.wheel {
    background: linear-gradient(90deg, rgba(2,0,36,1) 0%, rgba(9,9,121,1) 35%, rgba(0,212,255,1) 100%);
    width: 16rem;
    height: 16rem;
    border-radius: 16rem;
    position: relative;
    left: -8rem;
    top: calc(50% - 8rem);
    animation: infinite;
    animation-name: spin;
    animation-duration: 4s;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(180deg);
    }
    100% {
        transform: rotate(360deg);
    }
}


div.panel {
    background: var(--color-primary-light);
    min-height: 395px;
    border: 4px solid var(--color-black);
    border-radius: 1rem 1rem 2px 2px;
    padding: 3rem;
    overflow-y: scroll;
}

div.login {
    background: var(--color-primary-light);
    height: 340px;
    border: 4px solid var(--color-black);
    border-top: 0;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    padding: 3rem;

}

div.main-panels {
    display: grid;
    grid-template-columns: auto auto;
    grid-column-gap: 1rem;
}

div.viewport {
    overflow: hidden;
    width: 100%;
    border: 1px solid var(--color-black);
    border-radius: 1rem;
    position: relative;
    height: 330px;
}

div.moving {
    transition: ease-in-out 0.3s;
    position: relative;
    top: 0;
    height: 300px;
    display: grid;
    grid-template-rows: auto auto auto;
    grid-auto-flow: row;
    grid-row-gap: 1rem;
    padding: 1rem;

    background: var(--color-primary-lighter);
    text-align: center;
    font-size: larger;
    align-content: center;
}

div.authenticated-start, div.anonymous-start {

}

button {
    font-family:
            system-ui,
            -apple-system,
            BlinkMacSystemFont,
            "Segoe UI",
            "Apple Color Emoji",
            "Segoe UI Emoji",
            "Noto Color Emoji",
            serif;
    border: 2px solid var(--color-black);
    border-radius: 1rem;
    background: var(--color-primary-dark);
    color: var(--color-text-inverse);
    font-size: x-large;
    padding: 1rem;
}

button:hover {
    background: var(--color-primary-light);
    color: var(--color-text);
}

div.login button img {
    height: 1rlh;
}

div.subscription {
    font-family:
            system-ui,
            -apple-system,
            BlinkMacSystemFont,
            "Segoe UI",
            "Apple Color Emoji",
            "Segoe UI Emoji",
            "Noto Color Emoji",
            serif;
    position: fixed;
    bottom: 0;
    border-top: 4px solid var(--color-black);
    padding: 1rem 2rem 0;
    background: var(--color-primary-lighter);
    width: 100%;

}

div.close {
    display: block;
    position: absolute;
    width: 5rem;
    right: 5rem;
    top: 0;
    text-align: right;
}

div.subscription li {
    padding-left: 0.5rem;
}

div.subscription li:first-child {
    list-style-type: "🥰";
}

div.subscription li:nth-child(2) {
    list-style-type: "🥸";
}

div.subscription li:nth-child(3) {
    list-style-type: "🥵";
}

div.subscription li:nth-child(4) {
    list-style-type: "🫠";
}

.lobby-code {
    text-align: center;
    letter-spacing: 6px;
    font-size: x-large;
    line-height: normal;
}

div.room-code {
    text-align: center;
    letter-spacing: 6px;
    font-size: x-large;
    line-height: normal;
    position: absolute;
    top: 4rem;
    left: 3rem;
    display: block;
    width: 100px;
    height: 100px;
}

.split-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-column-gap: 1rem;
    * {
        padding: 0.5rem;
        margin: 0.5rem;
    }
}

div.slot {
    border-radius: 8px;
    border: 4px solid var(--color-black);
    margin:1rem;
    padding:1rem;
    height: 6rem;
    background: var(--color-primary-lighter);
    font-size: x-large;
    display: grid;
    grid-template-columns: auto 3rem;
}

div.pflex {
    display: grid;
    grid-template-columns: 3fr 3fr 3fr;
    grid-template-rows: 3fr 3fr 3fr;
    min-height: 330px;
}

span.lobby-button-place {
    display: grid;
}

span.lobby-button {
    height: 2rem;
    cursor: pointer;
    border-radius: 8px;
    border: 4px solid var(--color-black);
    width: 2rem;
    text-align: center;
    margin-bottom: 1rem;
}

span.kick {

}

div.wide {
    width: 100%;
    text-align: center;
}

.copy-link-btn {
    background: var(--color-copy-btn);
    color: var(--color-text-inverse);
    border: 2px solid var(--color-copy-btn-border);
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

.copy-link-btn:hover {
    background: var(--color-copy-btn-hover);
}

#code-form {
    display: none;
}

#code-form:target {
    display: block;
}

#have-code {
    display: none;
}

#have-code ~ label {
    user-select: none;

}

.code-form {
    transition: ease-in-out 1s;
    overflow: hidden;
    display: block;
}

#have-code ~ .has-code {
    height: 0;
}

#have-code ~ .no-code {
    height: auto;
}

#have-code:checked ~ .has-code {
    height: auto;

}

#have-code:checked ~ .no-code {
    height: 0;
}

.code-label {

}

button.selected {
    background: antiquewhite;
    color: var(--color-text);
}

span.lobby-button.inactive {

    opacity: 0.5;
    cursor: default;
    transition: 0.5s;
}

@media screen and (max-width: 1100px) {
    div.panel {
        height: calc(100vh - 30rem);

    }
    div.pflex {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    div.panel h2 {
        z-index: 1;
        padding: 1rem;
        background: var(--color-primary-lighter);
        position: sticky;
        top: -2rem;
    }
}

/* =====================================================
   INDEX PAGE REDESIGN - Mobile-first styles
   ===================================================== */

/* Header */
.index-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    position: relative;
    z-index: 10;
}

.sign-in-btn {
    font-size: 1rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 2px solid var(--color-black);
    color: var(--color-text);
}

.sign-in-btn:hover {
    background: var(--color-primary-lighter);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-email {
    font-size: 0.9rem;
    color: var(--color-text-dark);
}

.masked-email-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.masked-email {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reveal-email-btn {
    flex: 0 0 auto;
    min-height: 1.9rem;
    padding: 0.25rem 0.65rem;
    border: 1px solid var(--ui-line, rgba(0,0,0,0.16));
    border-radius: 8px;
    background: var(--ui-paper, #fff);
    color: var(--ui-ink, #2f2118);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 900;
    cursor: pointer;
}

.logout-form {
    margin: 0;
}

.logout-btn {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
    background: transparent;
    border: 2px solid var(--color-text-light);
    color: var(--color-text-light);
    cursor: pointer;
}

.logout-btn:hover {
    background: var(--color-error-bg);
    border-color: var(--color-error);
    color: var(--color-error);
}

.index-header .language-selector {
    position: relative;
    font-size: 1rem;
    padding: 0.4rem 0.6rem;
    margin: 0;
}

/* Index Container */
.index-container {
    max-width: 100%;
    padding: 0 1rem 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Logo */
.index-logo {
    text-align: center;
    padding: 1rem 0;
}

.index-logo h1 {
    font-size: 1.75rem;
    margin: 0;
    letter-spacing: 0.1rem;
}

/* Main Content - Mobile stacked */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex: 1;
}

/* Demo Section */
.demo-section {
    width: 100%;
}

.demo-canvas {
    background: linear-gradient(30deg, var(--color-primary), var(--color-gradient-purple));
    border: 4px solid var(--color-black);
    border-radius: 1rem;
    position: relative;
    height: 200px;
    overflow: hidden;
}

/* Demo Phases */
.demo-phase {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    pointer-events: none;
}

.demo-phase.active {
    opacity: 1;
}

.demo-label {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--color-text-inverse);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    z-index: 5;
}

/* Phase 1: Placing emojis */
.demo-emoji {
    position: absolute;
    font-size: 2rem;
    opacity: 0;
}

.demo-phase-1 .demo-emoji-1 { animation: placeEmoji1 5s infinite; }
.demo-phase-1 .demo-emoji-2 { animation: placeEmoji2 5s infinite; }
.demo-phase-1 .demo-emoji-3 { animation: placeEmoji3 5s infinite; }

@keyframes placeEmoji1 {
    0%, 10% { opacity: 0; transform: translate(15px, 25px) scale(0.5); }
    20%, 100% { opacity: 1; transform: translate(15px, 25px) scale(1); }
}

@keyframes placeEmoji2 {
    0%, 30% { opacity: 0; transform: translate(70px, 50px) scale(0.5); }
    40%, 100% { opacity: 1; transform: translate(70px, 50px) scale(1); }
}

@keyframes placeEmoji3 {
    0%, 50% { opacity: 0; transform: translate(40px, 90px) scale(0.5); }
    60%, 100% { opacity: 1; transform: translate(40px, 90px) scale(1); }
}

.demo-cursor-place {
    position: absolute;
    width: 32px;
    height: 32px;
    animation: cursorPlace 5s infinite;
}

@keyframes cursorPlace {
    0% { top: 50px; left: 25px; opacity: 1; }
    15% { top: 35px; left: 30px; opacity: 1; }
    20% { opacity: 0; }
    25% { top: 80px; left: 80px; opacity: 1; }
    35% { top: 60px; left: 85px; opacity: 1; }
    40% { opacity: 0; }
    45% { top: 120px; left: 50px; opacity: 1; }
    55% { top: 100px; left: 55px; opacity: 1; }
    60%, 100% { opacity: 0; }
}

.demo-guess {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: var(--color-primary-lighter);
    border: 2px solid var(--color-black);
    border-radius: 0.5rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    opacity: 0;
    animation: showGuess 5s infinite;
}

.demo-guess-check {
    color: green;
    font-weight: bold;
    margin-left: 0.25rem;
}

@keyframes showGuess {
    0%, 70% { opacity: 0; transform: translateY(10px); }
    80%, 95% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; }
}

/* Phase 2: Resizing emoji */
.demo-emoji-resize {
    position: absolute;
    top: 50%;
    left: 50%;
    font-size: 2rem;
    transform: translate(-50%, -50%);
    animation: resizeEmoji 5s infinite;
}

@keyframes resizeEmoji {
    0%, 10% { font-size: 2rem; }
    30% { font-size: 4rem; }
    50% { font-size: 2.5rem; }
    70% { font-size: 3.5rem; }
    90%, 100% { font-size: 3rem; }
}

.demo-resize-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--color-white);
    border: 2px solid var(--color-black);
    border-radius: 2px;
    animation: resizeHandle 5s infinite;
}

@keyframes resizeHandle {
    0%, 10% { top: calc(50% + 20px); left: calc(50% + 20px); }
    30% { top: calc(50% + 45px); left: calc(50% + 45px); }
    50% { top: calc(50% + 25px); left: calc(50% + 25px); }
    70% { top: calc(50% + 40px); left: calc(50% + 40px); }
    90%, 100% { top: calc(50% + 35px); left: calc(50% + 35px); }
}

.demo-cursor-resize {
    position: absolute;
    width: 32px;
    height: 32px;
    animation: cursorResize 5s infinite;
}

@keyframes cursorResize {
    0%, 10% { top: calc(50% + 25px); left: calc(50% + 25px); opacity: 1; }
    30% { top: calc(50% + 50px); left: calc(50% + 50px); opacity: 1; }
    50% { top: calc(50% + 30px); left: calc(50% + 30px); opacity: 1; }
    70% { top: calc(50% + 45px); left: calc(50% + 45px); opacity: 1; }
    90%, 100% { top: calc(50% + 40px); left: calc(50% + 40px); opacity: 1; }
}

/* Phase 3: Rotating emoji */
.demo-emoji-rotate {
    position: absolute;
    top: 50%;
    left: 50%;
    font-size: 3rem;
    transform-origin: center;
    animation: rotateEmoji 5s infinite;
}

@keyframes rotateEmoji {
    0%, 10% { transform: translate(-50%, -50%) rotate(0deg); }
    30% { transform: translate(-50%, -50%) rotate(45deg); }
    50% { transform: translate(-50%, -50%) rotate(-30deg); }
    70% { transform: translate(-50%, -50%) rotate(90deg); }
    90%, 100% { transform: translate(-50%, -50%) rotate(45deg); }
}

.demo-rotate-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--color-primary-light);
    border: 2px solid var(--color-black);
    border-radius: 50%;
    animation: rotateHandle 5s infinite;
}

@keyframes rotateHandle {
    0%, 10% { top: calc(50% - 45px); left: calc(50% + 25px); }
    30% { top: calc(50% - 25px); left: calc(50% + 45px); }
    50% { top: calc(50% - 50px); left: calc(50% - 10px); }
    70% { top: calc(50% + 25px); left: calc(50% + 45px); }
    90%, 100% { top: calc(50% - 25px); left: calc(50% + 45px); }
}

.demo-cursor-rotate {
    position: absolute;
    width: 32px;
    height: 32px;
    animation: cursorRotate 5s infinite;
}

@keyframes cursorRotate {
    0%, 10% { top: calc(50% - 40px); left: calc(50% + 30px); opacity: 1; }
    30% { top: calc(50% - 20px); left: calc(50% + 50px); opacity: 1; }
    50% { top: calc(50% - 45px); left: calc(50% - 5px); opacity: 1; }
    70% { top: calc(50% + 30px); left: calc(50% + 50px); opacity: 1; }
    90%, 100% { top: calc(50% - 20px); left: calc(50% + 50px); opacity: 1; }
}

/* Info Overlay */
.demo-info {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(220, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    pointer-events: none;
}

.demo-info.active {
    opacity: 1;
    pointer-events: auto;
}

.demo-info h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    text-align: center;
}

.demo-info ul {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.85rem;
}

.demo-info li {
    margin-bottom: 0.3rem;
}

.demo-info li strong {
    color: var(--color-primary-dark);
}

.demo-replay-btn {
    margin-top: 0.75rem;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    align-self: center;
}

/* Demo Progress Dots */
.demo-progress {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.demo-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-primary-lighter);
    border: 2px solid var(--color-black);
    cursor: pointer;
    transition: background 0.2s;
}

.demo-dot:hover {
    background: var(--color-primary-light);
}

.demo-dot.active {
    background: var(--color-primary-dark);
}

/* Form Section */
.form-section {
    width: 100%;
}

.game-form {
    background: var(--color-primary-light);
    border: 4px solid var(--color-black);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-label {
    font-size: 1.1rem;
    font-weight: normal;
}

.form-input {
    font-family: inherit;
    font-size: 1.25rem;
    padding: 0.75rem 1rem;
    border: 2px solid var(--color-black);
    border-radius: 0.5rem;
    background: var(--color-primary-lighter);
    width: 100%;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary-dark);
    box-shadow: 0 0 0 3px rgba(31, 121, 133, 0.3);
}

/* Mode Toggle */
.mode-toggle {
    flex-direction: row;
    gap: 0;
}

.mode-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.mode-option input[type="radio"] {
    display: none;
}

.mode-label {
    height: 2.5rem;
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.75rem;
    background: var(--color-primary-lighter);
    border: 2px solid var(--color-black);
    font-size: 1rem;
    transition: background 0.2s, color 0.2s;
}

.mode-option:first-child .mode-label {
    border-radius: 0.5rem 0 0 0.5rem;
    border-right: 1px solid var(--color-black);
}

.mode-option:last-child .mode-label {
    border-radius: 0 0.5rem 0.5rem 0;
    border-left: 1px solid var(--color-black);
}

.mode-option input[type="radio"]:checked + .mode-label {
    background: var(--color-primary-dark);
    color: var(--color-text-inverse);
}

/* Code Input - Hidden by default */
.code-input-group {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s, opacity 0.3s, margin 0.3s;
    margin: 0;
}

.code-input-group.visible {
    max-height: 100px;
    opacity: 1;
    margin-top: 0.5rem;
}

.code-input {
    text-transform: uppercase;
    letter-spacing: 0.3rem;
    text-align: center;
    font-size: 1.5rem;
}

/* Time Pills */
.time-pills {
    display: flex;
    gap: 0.5rem;
}

.time-pills input {
    display: none;
}

.time-pill {
    flex: 1;
    text-align: center;
    font-size: 1rem;
    padding: 0.6rem;
    background: var(--color-primary-lighter);
    border: 2px solid var(--color-black);
    border-radius: 2rem;
    cursor: pointer;
    color: var(--color-text);
    transition: background 0.2s, color 0.2s;
}

.time-pill:hover {
    background: var(--color-primary-light);
}

.time-pill.selected {
    background: var(--color-primary-dark);
    color: var(--color-text-inverse);
}

/* Streamer Mode Checkbox */
.streamer-mode-group {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
}

.streamer-mode-group.visible {
    max-height: 50px;
    opacity: 1;
    margin-top: 0.5rem;
}

/* Round Time Group - only visible when creating */
.round-time-group {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
}

.round-time-group.visible {
    max-height: 100px;
    opacity: 1;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
}

.checkbox-label input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
}

.checkbox-text {
    color: var(--color-text-dark);
}

/* CTA Button */
.cta-button {
    font-size: 1.5rem;
    padding: 1rem;
    background: var(--color-primary-dark);
    color: var(--color-text-inverse);
    border: 3px solid var(--color-black);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: background 0.1s, color 0.1s, box-shadow 0.1s;
    margin-top: 0.5rem;
}

.cta-button:hover {
    background: var(--color-primary-light);
    color: var(--color-text);
    box-shadow: 0 4px 0 var(--color-black);
}

.cta-button:active {
    box-shadow: none;
}

/* Footer */
.index-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--color-primary-lighter);
    border-top: 3px solid var(--color-black);
    font-size: 0.9rem;
    margin-top: auto;
}

.subscribe-link {
    color: var(--color-text);
    text-decoration: none;
    font-size: 1rem;
}

.subscribe-link:hover {
    text-decoration: underline;
}

.copyright {
    color: var(--color-text-medium);
    font-size: 0.85rem;
}

.copyright a {
    color: var(--color-primary-dark);
}

/* Login Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.open {
    display: flex;
}

.modal-content {
    background: var(--color-primary-light);
    border: 4px solid var(--color-black);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    position: relative;
}

.modal-content--wide {
    max-width: 600px;
}

.modal-content--narrow {
    max-width: 340px;
    text-align: center;
}

.cancel-modal-warning {
    font-size: 0.9rem;
    opacity: 0.7;
    margin: 0 0 1.25rem;
}

.cancel-modal-error {
    font-size: 0.85rem;
    color: var(--color-error, #c00);
    margin: 0 0 1rem;
}

.cancel-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.cancel-modal-actions button {
    padding: 0.45rem 1rem;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}

.cancel-modal-actions #cancel-sub-keep {
    background: none;
    border: 1px solid rgba(0,0,0,0.25);
}

.cancel-modal-actions #cancel-sub-keep:hover {
    background: rgba(0,0,0,0.06);
}

.cancel-sub-confirm-btn {
    background: var(--color-danger);
    color: white;
    border: none;
}

.cancel-sub-confirm-btn:hover {
    opacity: 0.85;
}

/* Settings modal sections */
.settings-section {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.settings-section h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text);
    opacity: 0.6;
    margin: 0 0 0.75rem;
}

.settings-muted {
    font-size: 0.875rem;
    margin: 0;
}

.profile-name-form {
    display: grid;
    gap: 0.45rem;
}

.profile-name-form + .masked-email-wrap {
    margin-top: 0.75rem;
}

.profile-name-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
    align-items: center;
}

.profile-save-btn {
    min-height: 2.35rem;
    padding: 0 0.9rem;
    border: 1px solid var(--ui-accent-border, rgba(24, 189, 180, 0.45));
    border-radius: 10px;
    background: var(--ui-accent, #18bdb4);
    color: var(--ui-on-accent, #fff);
    font-weight: 900;
}

/* Subscription table */
.sub-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.sub-table th {
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.6;
    padding: 0 0.75rem 0.4rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.12);
    font-weight: 600;
}

.sub-table td {
    padding: 0.45rem 0.75rem 0.45rem 0;
    vertical-align: middle;
}

.sub-table tr + tr td {
    border-top: 1px solid rgba(0,0,0,0.06);
}

.sub-status-active  { color: var(--color-success); font-weight: 600; }
.sub-status-canceled { opacity: 0.5; }
.sub-status-expired  { opacity: 0.5; }

.cancel-sub-btn {
    background: none;
    border: 1px solid var(--color-danger);
    color: var(--color-danger);
    border-radius: 4px;
    padding: 0.2rem 0.55rem;
    font-size: 0.78rem;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}

.cancel-sub-btn:hover {
    background: var(--color-danger);
    color: white;
}

.sub-upgrade-link {
    margin: 0.6rem 0 0;
    font-size: 0.85rem;
}

/* Linked accounts */
.linked-account {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    padding: 0.3rem 0;
}

.provider-name { font-weight: 600; }

.linked-status.not-linked { opacity: 0.5; font-size: 0.8rem; }

.unlink-btn {
    background: var(--ui-danger-soft, #ffe4e4);
    border: 1px solid rgba(239, 98, 98, 0.35);
    border-radius: 10px;
    color: var(--ui-danger, #ef6262);
    padding: 0.2rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.unlink-btn:hover {
    background: var(--ui-danger, #ef6262);
    border-color: var(--ui-danger, #ef6262);
    color: #fff;
}

/* Danger zone */
.danger-zone h3 { color: var(--color-danger); opacity: 1; }

.warning-text {
    font-size: 0.825rem;
    opacity: 0.7;
    margin: 0 0 0.6rem;
}

.delete-confirm {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.delete-confirm label { font-size: 0.825rem; }

.delete-btn {
    background: var(--color-danger);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.4rem 0.9rem;
    font-size: 0.875rem;
    cursor: pointer;
    font-family: inherit;
    align-self: flex-start;
}

.delete-btn:disabled { opacity: 0.4; cursor: default; }

.modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    padding: 0;
    line-height: 1;
    color: var(--color-text);
}

.modal-close:hover {
    background: none;
    color: var(--color-primary-dark);
}

.modal-title {
    text-align: center;
    margin: 0 0 1.5rem;
    font-size: 1.5rem;
}

.login-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.last-login-hint {
    margin: 0.65rem 0 0;
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--ui-line, rgba(0,0,0,0.16));
    border-radius: 12px;
    background: var(--ui-paper-wash, rgba(255,255,255,0.82));
    color: var(--ui-muted, #74665d);
    font-size: 0.86rem;
    font-weight: 650;
    text-align: center;
}

.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    line-height: 1.15;
    padding: 0.75rem;
    width: 100%;
    box-sizing: border-box;
    text-decoration: none;
    font-family: inherit;
    min-height: 3rem;
    border-radius: 40px;
    border: 1px solid black;
    transform: none;
}

.login-btn img {
    height: 1.5rem;
    width: 1.5rem;
    flex-shrink: 0;
}

.discord-btn {
    background: var(--color-discord);
}

.discord-btn:hover {
    background: var(--color-discord-hover);
}

.twitch-btn {
    background: var(--color-twitch);
}

.twitch-btn:hover {
    background: var(--color-twitch-hover);
}

.email-btn {
    background: var(--color-primary-dark);
}

.otp-btn {
    background: var(--color-primary-lighter);
    color: var(--color-text);
    border-color: var(--color-primary-dark);
}

.otp-btn:hover {
    background: var(--color-primary-light);
}

/* Email Form in Modal */
.email-form {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s, opacity 0.3s, margin 0.3s;
}

.email-form.visible {
    max-height: 300px;
    opacity: 1;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--color-black);
}

.email-form .form-input {
    background: var(--color-white);
}

.email-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.login-submit-btn {
    flex: 1;
    font-size: 1rem;
    padding: 0.6rem;
}

.signup-btn {
    background: var(--color-primary-lighter);
    color: var(--color-text);
}

.forgot-password {
    font-size: 0.85rem;
    text-align: center;
    margin: 0.75rem 0 0;
}

.text-btn {
    background: none;
    border: none;
    color: var(--color-primary-dark);
    text-decoration: underline;
    font-size: inherit;
    cursor: pointer;
    padding: 0;
}

.text-btn:hover {
    background: none;
    color: var(--color-text);
}

/* Auth message styles */
.auth-message {
    display: none;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 0.9rem;
}

.auth-message.error {
    background: var(--color-error-bg);
    color: var(--color-error);
    border: 1px solid var(--color-error);
}

.auth-message.success {
    background: var(--color-success-bg-light);
    color: var(--color-success-text);
    border: 1px solid var(--color-success-text);
}

/* Register form */
.register-form {
    padding-top: 0.5rem;
}

.register-form .form-input {
    background: var(--color-white);
}

.form-hint {
    font-size: 0.75rem;
    color: var(--color-text-light);
    margin-top: 0.25rem;
    display: block;
}

.auth-switch {
    font-size: 0.9rem;
    text-align: center;
    margin: 1rem 0 0;
}

/* OAuth divider */
.oauth-divider {
    text-align: center;
    margin: 1.5rem 0 1rem;
    position: relative;
}

.oauth-divider span {
    background: var(--color-primary-light);
    padding: 0 0.75rem;
    position: relative;
    z-index: 1;
    color: var(--color-text-medium);
    font-size: 0.85rem;
}

.oauth-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--color-text-muted);
}

/* Small OAuth buttons */
.oauth-small {
    flex-direction: row;
}

.oauth-small .login-btn {
    flex: 1;
    font-size: 0.9rem;
    padding: 0.5rem;
}

.oauth-small .login-btn img {
    height: 1.25rem;
}

/* Make login-btn work as both links and buttons */
a.login-btn,
button.login-btn {
    text-decoration: none;
    color: var(--color-text);
    box-sizing: border-box;
}

/* =====================================================
   TABLET BREAKPOINT (768px+)
   ===================================================== */
@media screen and (min-width: 768px) {
    .index-header {
        padding: 1rem 2rem;
    }

    .index-container {
        max-width: 900px;
        margin: 0 auto;
        padding: 0 2rem 2rem;
    }

    .index-logo h1 {
        font-size: 2.5rem;
    }

    .main-content {
        flex-direction: row;
        gap: 2rem;
        align-items: flex-start;
    }

    .demo-section {
        flex: 1;
    }

    .demo-canvas {
        height: 300px;
    }

    .demo-label {
        font-size: 0.85rem;
        padding: 0.3rem 0.6rem;
    }

    .demo-emoji {
        font-size: 2.5rem;
    }

    @keyframes placeEmoji1 {
        0%, 10% { opacity: 0; transform: translate(30px, 40px) scale(0.5); }
        20%, 100% { opacity: 1; transform: translate(30px, 40px) scale(1); }
    }

    @keyframes placeEmoji2 {
        0%, 30% { opacity: 0; transform: translate(120px, 80px) scale(0.5); }
        40%, 100% { opacity: 1; transform: translate(120px, 80px) scale(1); }
    }

    @keyframes placeEmoji3 {
        0%, 50% { opacity: 0; transform: translate(70px, 160px) scale(0.5); }
        60%, 100% { opacity: 1; transform: translate(70px, 160px) scale(1); }
    }

    @keyframes cursorPlace {
        0% { top: 70px; left: 45px; opacity: 1; }
        15% { top: 50px; left: 50px; opacity: 1; }
        20% { opacity: 0; }
        25% { top: 120px; left: 135px; opacity: 1; }
        35% { top: 95px; left: 140px; opacity: 1; }
        40% { opacity: 0; }
        45% { top: 200px; left: 85px; opacity: 1; }
        55% { top: 175px; left: 90px; opacity: 1; }
        60%, 100% { opacity: 0; }
    }

    .demo-emoji-resize {
        font-size: 2.5rem;
    }

    @keyframes resizeEmoji {
        0%, 10% { font-size: 2.5rem; }
        30% { font-size: 5rem; }
        50% { font-size: 3rem; }
        70% { font-size: 4.5rem; }
        90%, 100% { font-size: 4rem; }
    }

    .demo-emoji-rotate {
        font-size: 4rem;
    }

    .demo-info {
        padding: 1.5rem;
    }

    .demo-info h3 {
        font-size: 1.3rem;
    }

    .demo-info ul {
        font-size: 0.95rem;
    }

    .demo-info li {
        margin-bottom: 0.4rem;
    }

    .demo-guess {
        font-size: 0.9rem;
        padding: 0.3rem 0.6rem;
    }

    .form-section {
        flex: 1;
        max-width: 400px;
    }

    .index-footer {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* =====================================================
   DESKTOP BREAKPOINT (1024px+)
   ===================================================== */
@media screen and (min-width: 1024px) {
    .index-container {
        max-width: 1100px;
    }

    .index-logo h1 {
        font-size: 3rem;
    }

    .demo-canvas {
        height: 350px;
    }

    .demo-label {
        font-size: 0.9rem;
        padding: 0.4rem 0.75rem;
    }

    .demo-emoji {
        font-size: 3rem;
    }

    @keyframes placeEmoji1 {
        0%, 10% { opacity: 0; transform: translate(50px, 50px) scale(0.5); }
        20%, 100% { opacity: 1; transform: translate(50px, 50px) scale(1); }
    }

    @keyframes placeEmoji2 {
        0%, 30% { opacity: 0; transform: translate(180px, 100px) scale(0.5); }
        40%, 100% { opacity: 1; transform: translate(180px, 100px) scale(1); }
    }

    @keyframes placeEmoji3 {
        0%, 50% { opacity: 0; transform: translate(100px, 200px) scale(0.5); }
        60%, 100% { opacity: 1; transform: translate(100px, 200px) scale(1); }
    }

    @keyframes cursorPlace {
        0% { top: 85px; left: 65px; opacity: 1; }
        15% { top: 65px; left: 70px; opacity: 1; }
        20% { opacity: 0; }
        25% { top: 145px; left: 195px; opacity: 1; }
        35% { top: 120px; left: 200px; opacity: 1; }
        40% { opacity: 0; }
        45% { top: 250px; left: 115px; opacity: 1; }
        55% { top: 220px; left: 120px; opacity: 1; }
        60%, 100% { opacity: 0; }
    }

    .demo-emoji-resize {
        font-size: 3rem;
    }

    @keyframes resizeEmoji {
        0%, 10% { font-size: 3rem; }
        30% { font-size: 6rem; }
        50% { font-size: 3.5rem; }
        70% { font-size: 5.5rem; }
        90%, 100% { font-size: 5rem; }
    }

    .demo-emoji-rotate {
        font-size: 5rem;
    }

    .demo-info h3 {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .demo-info ul {
        font-size: 1rem;
    }

    .demo-info li {
        margin-bottom: 0.5rem;
    }

    .demo-replay-btn {
        font-size: 0.95rem;
        padding: 0.5rem 1rem;
    }

    .form-section {
        max-width: 450px;
    }

    .game-form {
        padding: 2rem;
    }
}

/* =====================================================
   PLAYER STATUS LIST - Shows who has guessed correctly
   ===================================================== */
.player-status-list {
    position: fixed;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: 3px solid var(--color-black);
    border-radius: 0.75rem;
    padding: 0.5rem;
    min-width: 120px;
    max-width: 180px;
    z-index: 10;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
}

.player-status-header {
    font-size: 0.9rem;
    font-weight: bold;
    text-align: center;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-gray-light);
    margin-bottom: 0.5rem;
}

.player-status-items {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.player-status-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.35rem 0.5rem;
    border-radius: 0.5rem;
    background: var(--color-gray-lightest);
    font-size: 0.85rem;
    transition: background 0.3s ease;
}

.player-status-item.guessed-correctly {
    background: var(--color-success-bg);
}

.player-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.correct-indicator {
    color: var(--color-success);
    font-weight: bold;
    margin-left: 0.5rem;
    font-size: 1rem;
}

.drawer-indicator {
    color: var(--color-gray);
    margin-left: 0.5rem;
    font-size: 0.9rem;
}

/* =====================================================
   LEADERBOARD OVERLAY - Shows at end of round
   ===================================================== */
.leaderboard-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.leaderboard-modal {
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary-lighter));
    border: 4px solid var(--color-black);
    border-radius: 1.5rem;
    padding: 2rem;
    min-width: 350px;
    max-width: 500px;
    box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.leaderboard-header {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--color-primary-dark);
}

.leaderboard-answer {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    padding: 0.75rem;
    background: var(--color-white);
    border-radius: 0.75rem;
    border: 2px solid var(--color-black);
}

.leaderboard-answer span {
    font-weight: bold;
    color: var(--color-primary-dark);
}

.leaderboard-category {
    text-align: center;
    font-size: 1rem;
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-white);
    border-radius: 0.75rem;
    overflow: hidden;
    border: 2px solid var(--color-black);
}

.leaderboard-table thead {
    background: var(--color-primary-dark);
    color: var(--color-text-inverse);
}

.leaderboard-table th {
    padding: 0.75rem 0.5rem;
    text-align: left;
    font-size: 0.9rem;
}

.leaderboard-table th:first-child {
    width: 40px;
    text-align: center;
}

.leaderboard-table th:nth-child(3),
.leaderboard-table th:nth-child(4) {
    text-align: right;
    width: 70px;
}

.player-score-row td {
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid var(--color-gray-lighter);
}

.player-score-row:last-child td {
    border-bottom: none;
}

.player-score-row td:first-child {
    text-align: center;
    font-weight: bold;
    color: var(--color-text-light);
}

.player-score-row.drawer-row {
    background: var(--color-warning-bg);
}

.player-score-row.guessed-row {
    background: var(--color-success-bg);
}

.player-score-row.drawer-row.guessed-row {
    background: linear-gradient(90deg, var(--color-warning-bg) 50%, var(--color-success-bg) 50%);
}

.round-score {
    text-align: right;
    color: var(--color-success);
    font-weight: bold;
}

.total-score {
    text-align: right;
    font-weight: bold;
    font-size: 1.1rem;
}

.role-badge {
    display: inline-block;
    font-size: 0.75rem;
    margin-left: 0.25rem;
}

.drawer-badge {
    color: var(--color-warning-text);
}

.correct-badge {
    color: var(--color-success);
}

.leaderboard-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 1.1rem;
    color: var(--color-text-light);
}


.word {
    line-height: 1.4em;
    color: white;filter:
    drop-shadow(0px 0px 2px #000000);
}

.hidden {
    display: none;
}

/* Common base style for all accents */
.accent {
    position: relative;
    display: inline-block;
}

.accent::after {
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    text-align: right;
    color: var(--color-accent);
    pointer-events: none;
    font-size: 150%;
    text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.35);
}

.tilde::after {
    content: "˜";
    right: 0.8rem;
}

.acute::after {
    content: " ́";
    right: 0.8rem;
}

.grave::after {
    content: "`";
}

.diaeresis::after {
    content: " ̈";
    right: 1.6rem;
}
.double-acute::after {
    content: " ̋";
    right: 1.7rem;
}


/* Responsive adjustments for player status list */
@media screen and (max-width: 768px) {
    .player-status-list {
        left: 0.5rem;
        min-width: 100px;
        max-width: 140px;
        padding: 0.35rem;
    }

    .player-status-header {
        font-size: 0.8rem;
    }

    .player-status-item {
        font-size: 0.75rem;
        padding: 0.25rem 0.35rem;
    }

    .leaderboard-modal {
        min-width: 280px;
        padding: 1.5rem;
        margin: 1rem;
    }

    .leaderboard-header {
        font-size: 1.5rem;
    }

    .leaderboard-answer {
        font-size: 1.25rem;
    }
}

/* Kicked banner */
.kicked-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--color-danger);
    color: var(--color-text-inverse);
    padding: 1rem;
    text-align: center;
    font-size: 1.2rem;
    z-index: 9999;
    animation: slideDown 0.3s ease-out, fadeOut 0.5s ease-in 4.5s forwards;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Player status for disconnected/reconnected */
.player-status-item.player-disconnected .player-name {
    opacity: 0.5;
    text-decoration: line-through;
}

.player-status-item.player-kicked .player-name {
    opacity: 0.3;
    color: var(--color-danger);
}

.player-status-item.player-reconnected .player-name {
    animation: reconnectPulse 1s ease-in-out;
}

@keyframes reconnectPulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; color: var(--color-success-bright); }
    100% { opacity: 1; }
}

/* =====================================================
   SUBSCRIPTION PAGE
   ===================================================== */

.strike {
    position: relative;
    display: inline-block;
}

.strike::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    border-top: 2px solid red;
    transform: rotate(-9deg);
    transform-origin: center;
}

.pricetag {
    background: green;
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
}

.tier-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    margin-top: 1rem;
}

.tier-card {
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    width: 250px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.05);
    text-align: center;
}

.tier-card h2 {
    margin: 0 0 0.5rem;
    font-size: 1.4rem;
}

.tier-card .price {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.tier-card button {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.tier-card button:hover:not(:disabled) {
    background: #555;
}

.tier-card button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

@media (max-width: 600px) {
    .tier-card {
        width: 100%;
    }
}

.subscription-status {
    text-align: center;
    padding: 1rem;
}

.badge-subscribed {
    background: var(--color-success, #28a745);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 1rem;
}

.badge-coming-soon {
    display: inline-block;
    background: #888;
    color: #fff;
    padding: 0.4rem 0.9rem;
    border-radius: 4px;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
}

.refund-policy-panel {
    font-size: 0.9rem;
}

.refund-policy-text {
    color: var(--color-text-light, #666);
    margin-bottom: 0.75rem;
}

.refund-consent-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
}

.consent-required-hint {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--color-error, #c00);
}

/* Legal pages */
.legal-page {
    box-sizing: border-box;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    overflow-wrap: anywhere;
}
.legal-page h1 { margin-bottom: 0.5rem; }
.legal-page .updated { color: #666; margin-bottom: 2rem; }
.legal-page h2 { margin-top: 2rem; }
.legal-page p, .legal-page li { line-height: 1.6; }
.legal-page ul { margin-left: 1.5rem; }
.legal-nav { margin-bottom: 2rem; }
.legal-nav a { margin-right: 1rem; }
.lang-switch { float: right; }
.lang-switch a { margin-left: 0.5rem; }

/* =====================================================
   EMOJINE REDESIGN OVERRIDES
   Inspired by the Figma/NotebookLM design exploration.
   Keeps existing IDs/classes for server-side flows and tests.
   ===================================================== */

:root {
    --ui-cream: #fff8f0;
    --ui-paper: #ffffff;
    --ui-ink: #0a0718;
    --ui-muted: #747184;
    --ui-line: #e8e1dc;
    --ui-soft: #f2f1f6;
    --ui-yellow: #ffd60a;
    --ui-coral: #ff5757;
    --ui-teal: #00c2b8;
    --ui-violet: #8b5cf6;
    --ui-green: #22c55e;
    --ui-bluewash: #dff5ff;
    --ui-radius: 22px;
    --ui-shadow: 0 16px 42px rgba(30, 22, 10, 0.12);
    --ui-shadow-soft: 0 8px 24px rgba(30, 22, 10, 0.10);
}

html {
    background: var(--ui-cream);
}

body,
body.index,
body.game-page {
    min-height: 100vh;
    color: var(--ui-ink);
    background:
            radial-gradient(circle at 10% 20%, rgba(255, 214, 10, 0.12), transparent 22rem),
            radial-gradient(circle at 88% 14%, rgba(255, 87, 87, 0.09), transparent 18rem),
            radial-gradient(circle at 9% 88%, rgba(34, 197, 94, 0.10), transparent 20rem),
            var(--ui-cream);
    letter-spacing: 0;
}

body.index::before {
    content: "🎮  💎  🌈  🏆  🎉  ✨";
    position: fixed;
    inset: 8% 4% auto 4%;
    height: 80vh;
    pointer-events: none;
    color: rgba(10, 7, 24, 0.10);
    font-size: clamp(1.8rem, 4vw, 4rem);
    word-spacing: 18vw;
    line-height: 3.8;
    z-index: 0;
}

button,
input,
select {
    font: inherit;
}

button,
.login-btn,
.cta-button,
.subscribe-link,
.copy-link-btn,
.leave-lobby-btn,
#begin-game,
.subscribe-btn,
.buy-pack-btn {
    border-radius: 18px;
    transition: box-shadow 0.15s ease, filter 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.index-header {
    position: relative;
    z-index: 2;
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1.1rem 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.25rem;
}

.index-header::before,
.main-logo .header h1::before,
.index-logo h1::before {
    content: "🎯 EMOJINE";
    font-family: Choko, system-ui, sans-serif;
    font-size: 1.15rem;
    color: var(--ui-coral);
    text-shadow: 12px 0 0 var(--ui-yellow), 24px 0 0 var(--ui-green), 36px 0 0 var(--ui-teal);
    white-space: nowrap;
}

.index-header::before {
    margin-right: auto;
}

.language-selector,
.user-info {
    position: relative;
    z-index: 5;
}

.lang-current,
.sign-in-btn,
.logout-btn,
.settings-btn {
    background: transparent;
    border: 0;
    color: var(--ui-ink);
    font-weight: 800;
}

.sign-in-btn,
.logout-btn {
    padding: 0.65rem 0.9rem;
}

.subscribe-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--ui-violet);
    color: #fff;
    text-decoration: none;
    font-weight: 900;
    padding: 0.7rem 1.15rem;
    box-shadow: var(--ui-shadow-soft);
}

.language-selector-popup {
    border: 1px solid var(--ui-line);
    border-radius: 16px;
    box-shadow: var(--ui-shadow-soft);
    overflow: hidden;
}

.language-selector-popup ul {
    margin: 0;
    padding: 0.35rem;
}

.language-selector-popup button {
    border: 0;
    background: #fff;
    padding: 0.55rem 0.8rem;
    width: 100%;
    text-align: left;
}

.index-container {
    position: relative;
    z-index: 1;
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto 5rem;
    padding: clamp(1rem, 3vw, 3rem) 0 2rem;
}

.index-logo {
    text-align: center;
    margin: 0 auto 2rem;
}

.index-logo h1 {
    margin: 0;
    font-size: 0;
}

.index-logo h1::before {
    display: block;
    font-size: clamp(3.4rem, 9vw, 6.8rem);
    line-height: 1;
    text-shadow: none;
    background: linear-gradient(90deg, var(--ui-coral), var(--ui-yellow), var(--ui-green), var(--ui-teal), var(--ui-violet), var(--ui-coral));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.index-logo::after {
    content: "Draw with emojis. Guess with friends. 🎨✨";
    display: block;
    margin-top: 1rem;
    color: var(--ui-muted);
    font-size: clamp(1.35rem, 2.8vw, 2rem);
    font-weight: 900;
    line-height: 1.15;
}

.main-content {
    display: grid;
    grid-template-columns: minmax(320px, 1.1fr) minmax(300px, 0.9fr);
    gap: clamp(1.25rem, 4vw, 3rem);
    align-items: stretch;
}

.demo-section,
.form-section,
.panel,
.modal-content {
    background: rgba(255, 255, 255, 0.90);
    border: 1px solid var(--ui-line);
    border-radius: var(--ui-radius);
    box-shadow: var(--ui-shadow);
}

.demo-section {
    padding: 0.75rem;
    order: 2;
}

.demo-status {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--ui-muted);
    font-weight: 900;
    margin: 0.35rem 0 0.75rem;
}

.demo-status-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--ui-green);
    flex: 0 0 auto;
}

.demo-canvas {
    min-height: 310px;
    border-radius: 18px;
    background: var(--ui-bluewash);
    border: 1px solid #c9e8f7;
    overflow: hidden;
}

.demo-label {
    background: rgba(255, 255, 255, 0.72);
    border: 1px dashed #b9bdca;
    border-radius: 999px;
    color: var(--ui-muted);
    font-weight: 900;
    padding: 0.45rem 1rem;
}

.demo-emoji,
.demo-emoji-resize,
.demo-emoji-rotate {
    filter: drop-shadow(0 7px 6px rgba(30, 22, 10, 0.18));
}

.demo-guess {
    border-radius: 999px;
    background: #e8fff2;
    border: 1px solid #a7efc3;
    color: #067a38;
    box-shadow: none;
}

.form-section {
    order: 1;
    padding: clamp(1.25rem, 3vw, 2rem);
}

.game-form {
    display: grid;
    gap: 1rem;
}

.form-label {
    font-weight: 900;
    color: var(--ui-ink);
    margin-bottom: 0.4rem;
}

.form-input,
.email-form input,
.register-form input,
.forgot-password-form input,
.otp-form input,
.form-group select,
.emoji-selector input {
    border: 1px solid #d7d5df;
    background: #f1f0f5;
    color: var(--ui-ink);
    border-radius: 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.form-input:focus,
.email-form input:focus,
.register-form input:focus,
.forgot-password-form input:focus,
.otp-form input:focus,
.emoji-selector input:focus {
    outline: 3px solid rgba(0, 194, 184, 0.18);
    border-color: var(--ui-teal);
}

.mode-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
}

.mode-option {
    background: #fff;
    border: 1px solid var(--ui-line);
    border-radius: 18px;
    padding: 0.9rem;
    box-shadow: 0 4px 14px rgba(30, 22, 10, 0.06);
}

.mode-option:has(input:checked) {
    color: #fff;
    background: var(--ui-ink);
    border-color: var(--ui-ink);
}

.mode-option input {
    accent-color: var(--ui-teal);
}

.time-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.time-pill {
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--ui-line);
    padding: 0.55rem 0.9rem;
    font-weight: 900;
}

.time-pills input:checked + .time-pill,
.time-pill.selected {
    background: var(--ui-teal);
    color: #fff;
    border-color: var(--ui-teal);
}

.checkbox-label,
.refund-consent-label {
    align-items: flex-start;
    background: rgba(242, 241, 246, 0.8);
    border-radius: 14px;
    padding: 0.75rem;
}

.checkbox-label input,
.refund-consent-label input {
    accent-color: var(--ui-teal);
}

.cta-button,
.login-submit-btn,
#begin-game {
    background: var(--ui-ink);
    color: #fff;
    border: 0;
    box-shadow: var(--ui-shadow-soft);
    font-weight: 900;
    padding: 0.95rem 1.25rem;
}

.cta-button::after,
#begin-game::before {
    content: " 🚀";
}

.index-footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    width: min(1120px, calc(100% - 2rem));
    margin: 2rem auto;
    color: var(--ui-muted);
}

.index-footer a {
    color: var(--ui-ink);
    font-weight: 800;
}

.modal-overlay {
    background: rgba(10, 7, 24, 0.48);
    backdrop-filter: blur(2px);
}

.modal-content {
    width: min(460px, calc(100vw - 2rem));
    padding: 2rem;
    overflow: hidden;
}

.modal-content::before {
    content: "🎯 EMOJINE";
    display: block;
    text-align: center;
    color: var(--ui-coral);
    font-family: Choko, system-ui, sans-serif;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.modal-content::after {
    content: "";
    position: absolute;
    width: 8rem;
    height: 8rem;
    right: -3rem;
    top: -3rem;
    border-radius: 999px;
    background: rgba(255, 87, 87, 0.12);
    pointer-events: none;
}

.modal-close {
    z-index: 2;
    background: transparent;
    color: var(--ui-ink);
    font-size: 1.6rem;
}

.modal-title {
    color: var(--ui-ink);
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.modal-title::after {
    content: "Jump back into the game 🎮";
    display: block;
    margin-top: 0.4rem;
    color: var(--ui-muted);
    font-family: system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 500;
}

.login-options {
    gap: 0.75rem;
}

.login-btn {
    border: 0;
    box-shadow: 0 7px 18px rgba(30, 22, 10, 0.10);
    font-weight: 900;
}

.email-btn,
.otp-btn {
    background: var(--ui-soft);
    color: var(--ui-ink);
}

.oauth-divider {
    color: var(--ui-muted);
}

.text-btn {
    color: var(--ui-ink);
    font-weight: 900;
}

/* Subscription page */
body.index > h1 {
    position: relative;
    z-index: 1;
    max-width: min(900px, calc(100% - 2rem));
    margin: 2.5rem auto 0.4rem;
    text-align: center;
    color: var(--ui-ink);
    font-size: clamp(2.2rem, 5vw, 4rem);
}

body.index > h1::after {
    content: " ✨";
}

body.index > .panel {
    position: relative;
    z-index: 1;
    width: min(880px, calc(100% - 2rem));
    margin: 1.4rem auto;
    padding: clamp(1rem, 2.6vw, 1.6rem);
}

body.index > .panel:has(.tier-grid) {
    width: min(1040px, calc(100% - 2rem));
}

.tier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.25rem;
}

.tier-card {
    width: auto;
    border: 1px solid var(--ui-line);
    border-radius: 22px;
    padding: 1.35rem;
    text-align: left;
    box-shadow: var(--ui-shadow-soft);
}

.tier-card:nth-child(2) {
    border-color: var(--ui-teal);
    box-shadow: 0 0 0 2px rgba(0, 194, 184, 0.12), var(--ui-shadow-soft);
}

.tier-card h2 {
    font-size: 1.65rem;
    margin: 0 0 0.35rem;
}

.tier-card h2::before {
    content: "⭐ ";
}

.tier-card:nth-child(3n) h2::before {
    content: "💎 ";
}

.tier-card .price {
    color: var(--ui-ink);
    font-size: 1.7rem;
    margin: 1rem 0;
}

.pricetag {
    background: var(--ui-soft);
    color: var(--ui-ink);
    border-radius: 999px;
}

.subscribe-btn,
.buy-pack-btn {
    display: inline-flex;
    justify-content: center;
    width: 100%;
    margin-top: 0.65rem;
    padding: 0.8rem 1rem;
    background: var(--ui-ink);
    color: #fff;
    font-weight: 900;
    border: 0;
}

.badge-subscribed,
.badge-coming-soon {
    border-radius: 999px;
    font-weight: 900;
}

.refund-policy-panel,
.subscription-status {
    background: #eef6ff;
    border-color: #b8d7ff;
}

.billing-details-panel {
    background: var(--ui-paper);
}

.billing-details-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.billing-details-form label {
    display: grid;
    gap: 0.25rem;
    font-weight: 800;
}

.billing-details-form input {
    min-height: 42px;
    border: 1px solid var(--ui-line);
    border-radius: 8px;
    padding: 0.55rem 0.7rem;
    background: #fff;
    color: var(--ui-ink);
}

.billing-address-line {
    grid-column: 1 / -1;
}

/* Lobby */
body.index > .logo,
body.game-page > .logo {
    display: none;
}

.start-game {
    position: relative;
    z-index: 1;
    width: min(660px, calc(100% - 2rem));
    margin: 2rem auto 5rem;
    padding: 0;
}

.main-logo .header {
    background: transparent;
    box-shadow: none;
    color: var(--ui-ink);
    padding: 0;
    margin-bottom: 1.5rem;
    text-align: center;
}

.main-logo .header h1 {
    font-size: 0;
}

.main-logo .header h1::before {
    display: inline-block;
    text-shadow: none;
}

.start-game .panel {
    padding: clamp(1.1rem, 3vw, 1.8rem);
}

.start-game .panel h2 {
    text-align: center;
    color: var(--ui-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.lobby-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0.4rem auto 0;
    padding: 0.85rem 1.6rem;
    min-width: 9rem;
    border-radius: 18px;
    background: var(--ui-soft);
    color: var(--ui-ink);
    border: 1px dashed #c9c7d1;
    font-size: 2rem;
    letter-spacing: 0.1em;
}

.pflex {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin: 1.25rem 0;
}

.slot {
    min-height: 4.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: space-between;
    background: #faf9fc;
    border: 1px solid var(--ui-line);
    border-radius: 18px;
    padding: 0.75rem 0.9rem;
    box-shadow: 0 4px 12px rgba(30, 22, 10, 0.04);
}

.slot::before {
    content: "👤";
    display: inline-flex;
    width: 2.2rem;
    height: 2.2rem;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #e6f5ff;
}

.display-name {
    flex: 1;
    font-weight: 900;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-label {
    flex: 1;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.verified-badge {
    display: none;
    width: 1.15rem;
    height: 1.15rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--ui-accent);
    color: var(--ui-on-accent);
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1;
}

.display-name:not(:empty) + .verified-badge {
    display: inline-flex;
}

.display-name:empty::after {
    content: "Waiting...";
    color: #b7b3c0;
    font-style: italic;
    font-weight: 500;
}

.lobby-button.kick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: #ffe7ea;
}

.lobby-button.kick.inactive {
    opacity: 0;
    pointer-events: none;
}

.wide {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.copy-link-btn,
.leave-lobby-btn {
    border: 0;
    background: var(--ui-soft);
    color: var(--ui-ink);
    font-weight: 900;
    padding: 0.8rem 1rem;
}

.leave-lobby-btn {
    background: transparent;
}

/* Game surface */
body.game-page {
    height: 100vh;
    overflow: hidden;
    display: grid;
    grid-template-columns: 220px 1fr 220px;
    grid-template-rows: 4.8rem 1fr auto;
    gap: 0;
    background: #fffaf4;
}

body.game-page .header {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: stretch;
    position: static;
    width: auto;
    margin: 0.8rem;
    padding: 0.8rem 1rem;
    background: var(--ui-soft);
    color: var(--ui-ink);
    border-radius: 999px;
    text-align: center;
    box-shadow: none;
    font-size: 1rem;
    font-weight: 900;
}

body.game-page .header .word {
    color: var(--ui-coral);
}

.canvas-border {
    grid-column: 2;
    grid-row: 2;
    width: auto;
    height: auto;
    margin: 0.8rem;
    padding: 0.7rem;
    background: #fff;
    border: 1px solid var(--ui-line);
    border-radius: 18px;
    box-shadow: var(--ui-shadow-soft);
}

.canvas {
    top: auto;
    width: 100%;
    height: 100%;
    border-radius: 14px;
    background: var(--ui-bluewash);
    border: 1px solid #a9cfdf;
}

.player-status-list {
    grid-column: 1;
    grid-row: 1 / 4;
    position: static;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 1rem 0.85rem;
    background: rgba(255, 255, 255, 0.62);
    border: 0;
    border-right: 1px solid var(--ui-line);
    box-shadow: none;
    border-radius: 0;
    align-self: stretch;
}

.player-status-header {
    color: var(--ui-muted);
    letter-spacing: 0.09em;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin: 0.2rem 0 0.8rem;
}

.player-status-items {
    display: grid;
    gap: 0.55rem;
}

.player-status-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: transparent;
    border: 0;
    border-radius: 16px;
    color: var(--ui-ink);
    padding: 0.7rem;
}

.player-status-item::before {
    content: "🧑";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 12px;
    background: #e9fbf7;
}

.player-status-item.guessed-correctly {
    background: #eafff1;
    color: #067a38;
}

.correct-indicator {
    color: var(--ui-green);
    margin-left: auto;
}

.drawer-indicator {
    color: var(--ui-yellow);
    margin-left: auto;
}

body.game-page .footer {
    grid-column: 2;
    grid-row: 3;
    position: static;
    width: auto;
    z-index: 4;
    margin: 0 0.8rem 0.8rem;
}

.emoji-selector {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.8rem;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--ui-line);
    box-shadow: var(--ui-shadow-soft);
}

.emoji-selector form {
    grid-column: 1;
}

.emoji-selector input {
    width: 100%;
    height: auto;
    min-height: 3rem;
    font-size: 1rem;
    text-align: left;
    padding: 0 1rem;
    border-radius: 14px;
}

.room-code {
    grid-column: 2;
    color: var(--ui-muted);
    font-weight: 900;
    background: var(--ui-soft);
    border-radius: 999px;
    padding: 0.55rem 0.85rem;
}

#mute-btn {
    grid-column: 3;
    position: static;
    width: 2.7rem;
    height: 2.7rem;
    border-radius: 999px;
    background: var(--ui-soft);
    opacity: 1;
}

.clock {
    position: fixed;
    top: 0.7rem;
    right: 1rem;
    width: 4.4rem;
    height: 4.4rem;
    border-radius: 999px;
    background: #fff;
    box-shadow: var(--ui-shadow-soft);
}

.clock svg circle:first-child {
    stroke: #edeaf2;
}

.clock svg circle:nth-child(2) {
    stroke: var(--ui-teal);
}

#countdown {
    fill: var(--ui-teal);
    font-weight: 900;
}

.emoji-palette {
    margin-bottom: 0.7rem;
    height: auto;
    min-height: 3.8rem;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--ui-line);
    box-shadow: var(--ui-shadow-soft);
    overflow-x: auto;
    white-space: nowrap;
    padding: 0.55rem;
}

.bubble {
    top: auto;
    font-size: 1.8rem;
    padding: 0.45rem;
    margin: 0.2rem;
    background: transparent;
    border-radius: 12px;
    cursor: pointer;
}

.bubble:hover {
    background: var(--ui-soft);
}

.categories {
    grid-column: 3;
    grid-row: 1 / 4;
    position: static;
    width: auto;
    max-width: none;
    background: rgba(255, 255, 255, 0.62);
    border-left: 1px solid var(--ui-line);
    padding: 5.5rem 0.8rem 1rem;
    overflow: auto;
}

.categories ul {
    display: grid;
    gap: 0.45rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.categories li {
    border-radius: 999px;
    padding: 0.55rem 0.75rem;
    color: var(--ui-muted);
    font-weight: 900;
}

.categories li:first-child {
    background: var(--ui-coral);
    color: #fff;
}

.leaderboard-overlay {
    backdrop-filter: blur(2px);
}

.leaderboard-modal {
    border-radius: 24px;
    border: 1px solid var(--ui-line);
    box-shadow: var(--ui-shadow);
}

@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .demo-section,
    .form-section {
        order: initial;
    }

    body.game-page {
        overflow: auto;
        min-height: 100vh;
        height: auto;
        display: block;
        padding-bottom: 1rem;
    }

    .player-status-list,
    .categories {
        display: none;
    }

    body.game-page .header,
    .canvas-border,
    body.game-page .footer {
        margin: 0.75rem;
    }

    .canvas-border {
        height: min(58vh, 34rem);
    }

    .emoji-selector {
        grid-template-columns: 1fr auto;
    }

    .room-code {
        display: none;
    }

    #mute-btn {
        grid-column: 2;
    }

    .clock {
        width: 3.8rem;
        height: 3.8rem;
    }
}

@media (max-width: 640px) {
    .index-header {
        justify-content: center;
        gap: 0.6rem;
    }

    .index-header::before {
        width: 100%;
        text-align: center;
        margin: 0 0 0.3rem;
    }

    .index-header,
    .index-footer {
        flex-wrap: wrap;
    }

    .mode-toggle,
    .pflex {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 1.4rem;
    }

    body.index > h1 {
        font-size: 2.2rem;
    }

    .start-game {
        margin-top: 1rem;
    }
}

/* =====================================================
   REDESIGN VIEWPORT CORRECTIONS
   ===================================================== */

body.landing-page {
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    border-top: 0;
}

body.landing-page .index-header {
    height: 4.25rem;
    padding: 0.65rem 0;
}

body.landing-page .index-header::before {
    color: var(--ui-coral);
    text-shadow: none;
}

body.landing-page .language-selector {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--ui-line);
    border-radius: 999px;
    box-shadow: var(--ui-shadow-soft);
    padding: 0.45rem 0.7rem;
}

body.landing-page .lang-current {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

body.landing-page .index-container {
    height: calc(100vh - 7.5rem);
    margin: 0 auto;
    padding: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}

body.landing-page .index-logo {
    margin: 0 auto 0.85rem;
    padding: 0;
}

body.landing-page .index-logo h1::before {
    font-size: clamp(3rem, 7vw, 5.5rem);
}

body.landing-page .index-logo::after {
    margin-top: 0.5rem;
    font-size: clamp(1.15rem, 2vw, 1.65rem);
}

body.landing-page .main-content {
    min-height: 0;
    grid-template-columns: minmax(300px, 0.92fr) minmax(360px, 1fr);
    gap: clamp(1.2rem, 4vw, 4rem);
}

body.landing-page .form-section,
body.landing-page .demo-section {
    align-self: stretch;
    height: 100%;
}

body.landing-page .form-section {
    padding: 1.1rem;
}

body.landing-page .game-form {
    gap: 0.75rem;
    padding: 1.25rem;
    background: transparent;
    border: 0;
    box-shadow: none;
}

body.landing-page .form-input {
    min-height: 2.75rem;
    font-size: 1rem;
}

body.landing-page .mode-option {
    padding: 0.65rem;
}

body.landing-page .mode-option,
body.landing-page .mode-option:has(input:checked) {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: var(--ui-ink);
}

body.landing-page .mode-label {
    height: auto;
    min-height: 2.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0.8rem;
    background: #eefdfb;
    border: 1px solid #c8eeea;
    border-radius: 14px;
    color: var(--ui-ink);
    box-shadow: 0 5px 16px rgba(30, 22, 10, 0.06);
}

body.landing-page .mode-option:first-child .mode-label,
body.landing-page .mode-option:last-child .mode-label {
    border: 1px solid #c8eeea;
    border-radius: 14px;
}

body.landing-page .mode-option input[type="radio"]:checked + .mode-label {
    background: var(--ui-ink);
    border-color: var(--ui-ink);
    color: #fff;
    box-shadow: 0 8px 18px rgba(10, 7, 24, 0.18);
}

body.landing-page .round-time-group.visible,
body.landing-page .streamer-mode-group.visible {
    max-height: none;
    overflow: visible;
}

body.landing-page .time-pill {
    background: #fff;
    border: 1px solid var(--ui-line);
    box-shadow: none;
    color: var(--ui-ink);
    padding: 0.42rem 0.85rem;
}

body.landing-page .time-pills input:checked + .time-pill,
body.landing-page .time-pill.selected {
    background: var(--ui-teal);
    border-color: var(--ui-teal);
    color: #fff;
}

body.landing-page .checkbox-label {
    border: 1px solid transparent;
    padding: 0.55rem 0.7rem;
}

body.landing-page .cta-button {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 10px 22px rgba(10, 7, 24, 0.16);
    padding: 0.8rem 1rem;
}

body.landing-page .cta-button:hover {
    background: #221a36;
    color: #fff;
    box-shadow: 0 12px 24px rgba(10, 7, 24, 0.18);
}

body.landing-page .cta-button:active {
    box-shadow: 0 5px 12px rgba(10, 7, 24, 0.16);
}

body.landing-page .demo-section {
    padding: 0.8rem;
}

body.landing-page .demo-canvas {
    height: clamp(240px, 40vh, 350px);
    min-height: 0;
}

body.landing-page .index-footer {
    position: fixed;
    left: 50%;
    bottom: 0.75rem;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100% - 2rem);
    min-height: 3.25rem;
    margin: 0;
    padding: 0.35rem 0.6rem;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--ui-line);
    border-radius: 999px;
    box-shadow: var(--ui-shadow-soft);
}

body.landing-page::before {
    inset: 6% 4% auto 4%;
    height: 70vh;
    line-height: 3.1;
}

body.subscription-page,
body.lobby-page {
    border-top: 0;
    display: block;
    min-height: 100vh;
}

body.lobby-page::before {
    display: none;
}

body.subscription-page > .panel,
body.lobby-page .start-game .panel,
body.subscription-page .game-form,
body.lobby-page .game-form {
    min-height: 0;
    overflow: visible;
    border: 1px solid var(--ui-line);
    background: rgba(255, 255, 255, 0.92);
}

body.subscription-page > .logo,
body.subscription-page .start-game > .main-logo {
    display: none;
}

body.subscription-page > h1 {
    margin-top: 1.5rem;
}

body.subscription-page > .panel:has(.tier-grid) {
    width: min(1040px, calc(100% - 2rem));
}

body.lobby-page .start-game {
    margin: 0.75rem auto 1rem;
    width: min(960px, calc(100% - 1.5rem));
}

body.lobby-page .main-logo .header {
    margin-bottom: 0.35rem;
}

body.lobby-page .main-logo .header h1::before {
    font-size: 1.2rem;
}

body.lobby-page #begin-game,
body.lobby-page .copy-link-btn,
body.lobby-page .leave-lobby-btn,
body.subscription-page .subscribe-btn,
body.subscription-page .buy-pack-btn {
    border: 0;
    box-shadow: var(--ui-shadow-soft);
}

body.lobby-page .pflex {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

body.lobby-page .slot {
    min-height: 3.3rem;
    padding: 0.7rem 0.85rem;
}

body.lobby-page .wide {
    margin-top: 0.7rem;
}

.lobby-start-hint {
    width: 100%;
    margin: 0 0 0.55rem;
    color: var(--ui-muted);
    font-size: 0.92rem;
    font-weight: 650;
    text-align: center;
}

.lobby-start-hint.ready {
    color: var(--ui-green);
}

.lobby-start-hint.error {
    color: var(--ui-coral);
}

body.lobby-page #begin-game:disabled,
body.lobby-page #begin-game.is-disabled {
    cursor: not-allowed;
    opacity: 0.58;
    transform: none;
    box-shadow: none;
}

@media (max-width: 760px) {
    body.lobby-page .pflex {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    body.landing-page {
        height: auto;
        overflow: auto;
    }

    body.landing-page .index-container {
        height: auto;
        display: block;
        padding-bottom: 1rem;
    }

    body.landing-page .main-content {
        grid-template-columns: 1fr;
    }

    body.landing-page .demo-canvas {
        height: 260px;
    }
}

@media (min-width: 901px) and (max-height: 820px) {
    body.landing-page .index-header {
        height: 3.4rem;
        padding: 0.45rem 0;
    }

    body.landing-page .index-container {
        height: calc(100vh - 4rem);
        grid-template-rows: auto minmax(0, 1fr);
    }

    body.landing-page .index-logo {
        margin-bottom: 0.35rem;
    }

    body.landing-page .index-logo h1::before {
        font-size: clamp(2.8rem, 6vw, 4.4rem);
    }

    body.landing-page .index-logo::after {
        margin-top: 0.25rem;
        font-size: 1.25rem;
    }

    body.landing-page .main-content {
        align-items: start;
        gap: clamp(1rem, 4vw, 3rem);
        padding-top: 0.8rem;
    }

    body.landing-page .form-section {
        padding: 0.85rem;
    }

    body.landing-page .game-form {
        gap: 0.55rem;
        padding: 0.6rem;
    }

    body.landing-page .form-label {
        margin-bottom: 0.25rem;
    }

    body.landing-page .form-input {
        min-height: 2.35rem;
    }

    body.landing-page .mode-option {
        padding: 0.45rem;
        min-height: 0;
    }

    body.landing-page .mode-label {
        min-height: 2.2rem;
        padding: 0.45rem 0.6rem;
    }

    body.landing-page .time-pill {
        padding: 0.3rem 0.75rem;
    }

    body.landing-page .checkbox-label {
        padding: 0.42rem 0.6rem;
    }

    body.landing-page .cta-button {
        padding: 0.6rem 1rem;
    }

    body.landing-page .demo-canvas {
        height: clamp(220px, 34vh, 275px);
    }

    body.landing-page .index-footer {
        left: auto;
        right: 1rem;
        bottom: 0.7rem;
        transform: none;
        min-height: 0;
        padding: 0.35rem 0.5rem;
        gap: 0.55rem;
        font-size: 0.78rem;
    }

    body.landing-page .index-footer .subscribe-link {
        padding: 0.55rem 0.75rem;
    }
}

/* =====================================================
   PRE-LAUNCH LAYOUT CORRECTIONS
   ===================================================== */

:root {
    --ui-cream: #fff8ee;
    --ui-paper: #ffffff;
    --ui-ink: #2f2118;
    --ui-muted: #74665d;
    --ui-line: #eadfd3;
    --ui-soft: #f7f1e8;
    --ui-accent: #08776f;
    --ui-accent-dark: #075f59;
    --ui-accent-soft: #e5fbf8;
    --ui-danger: #b42318;
    --ui-danger-soft: #ffe4e4;
    --ui-success: #19692c;
    --ui-on-accent: #ffffff;
    --ui-paper-strong: rgba(255, 255, 255, 0.94);
    --ui-paper-wash: rgba(255, 255, 255, 0.82);
    --ui-paper-soft: rgba(255, 255, 255, 0.62);
    --ui-accent-border: rgba(24, 189, 180, 0.45);
    --ui-accent-focus: rgba(24, 189, 180, 0.18);
    --ui-accent-shadow: rgba(24, 189, 180, 0.20);
    --ui-canvas-grid: rgba(24, 189, 180, 0.045);
    --ui-canvas-line: #bde5e1;
    --ui-canvas-bg: #f3fffd;
    --ui-slot-line: #d8cbbd;
    --ui-shadow: 0 14px 32px rgba(47, 33, 24, 0.12);
    --ui-shadow-soft: 0 7px 18px rgba(47, 33, 24, 0.10);
}

body,
body.index,
body.game-page {
    color: var(--ui-ink);
    background:
            radial-gradient(circle at 18% 20%, rgba(24, 189, 180, 0.12), transparent 18rem),
            radial-gradient(circle at 86% 72%, rgba(239, 98, 98, 0.08), transparent 18rem),
            var(--ui-cream);
}

body.index::before {
    color: rgba(47, 33, 24, 0.055);
}

.index-header {
    min-height: 4.25rem;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}

.index-header::before,
.main-logo .header h1::before,
.index-logo h1::before {
    color: var(--ui-accent-dark);
    text-shadow: none;
}

body.landing-page .index-header::before {
    align-self: center;
}

body.landing-page .index-logo {
    padding-top: 0.35rem;
}

body.landing-page .index-logo h1::before {
    background: none;
    color: var(--ui-accent-dark);
    text-shadow: 0 3px 0 rgba(255, 255, 255, 0.75);
}

.subscribe-link,
.cta-button,
.login-submit-btn,
#begin-game {
    background: var(--ui-accent);
    color: var(--ui-on-accent);
}

.cta-button:hover,
#begin-game:hover,
.login-submit-btn:hover {
    background: var(--ui-accent-dark);
}

body.lobby-page #begin-game:disabled,
body.lobby-page #begin-game.is-disabled,
body.lobby-page #begin-game:disabled:hover,
body.lobby-page #begin-game.is-disabled:hover {
    background: var(--ui-paper-wash);
    color: var(--ui-muted);
    border: 1px solid var(--ui-line);
    box-shadow: none;
    cursor: not-allowed;
    opacity: 1;
    transform: none;
}

.sign-in-btn,
.logout-btn,
.settings-btn,
.lang-current {
    color: var(--ui-ink);
}

.language-selector {
    color: var(--ui-ink);
}

.language-selector-popup {
    background: var(--ui-paper);
    color: var(--ui-ink);
    z-index: 20;
}

.language-selector-popup button,
.language-selector-popup button.language {
    color: var(--ui-ink);
    background: var(--ui-paper);
}

.language-selector-popup button:hover,
.language-selector-popup button.language:hover {
    background: var(--ui-accent-soft);
    color: var(--ui-ink);
}

body.landing-page .form-section,
body.landing-page .demo-section {
    border-color: var(--ui-line);
    box-shadow: var(--ui-shadow);
}

body.landing-page .mode-label {
    background: var(--ui-paper);
    border-color: var(--ui-line);
    color: var(--ui-ink);
}

body.landing-page .mode-option input[type="radio"]:checked + .mode-label {
    background: var(--ui-accent);
    border-color: var(--ui-accent);
    color: var(--ui-on-accent);
    box-shadow: 0 8px 18px var(--ui-accent-shadow);
}

body.landing-page .form-input:focus,
body.landing-page .emoji-selector input:focus {
    outline-color: var(--ui-accent-focus);
    border-color: var(--ui-accent);
}

body.landing-page .game-form {
    grid-template-rows: auto auto minmax(5.4rem, auto) minmax(5.4rem, auto) auto;
    min-height: 25.5rem;
}

body.landing-page .code-input-group,
body.landing-page .round-time-group,
body.landing-page .streamer-mode-group {
    min-height: 5.4rem;
}

body.landing-page .code-input-group:not(.visible),
body.landing-page .round-time-group:not(.visible),
body.landing-page .streamer-mode-group:not(.visible) {
    display: flex;
    flex-direction: column;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    max-height: none;
    overflow: hidden;
}

body.landing-page .code-input-group.visible,
body.landing-page .round-time-group.visible,
body.landing-page .streamer-mode-group.visible {
    visibility: visible;
    opacity: 1;
}

body.landing-page .time-pills input:checked + .time-pill,
body.landing-page .time-pill.selected {
    background: var(--ui-accent);
    border-color: var(--ui-accent);
}

body.lobby-page {
    overflow-x: hidden;
}

body.lobby-page .start-game {
    width: min(820px, calc(100% - 1.5rem));
}

body.lobby-page .main-logo {
    display: none;
}

body.lobby-page .lobby-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin: 0 0 0.9rem;
    color: var(--ui-ink);
    line-height: 1;
}

body.lobby-page .lobby-brand-icon,
body.lobby-page .lobby-brand-mark {
    font-size: clamp(1.35rem, 2vw, 1.8rem);
}

body.lobby-page .lobby-brand-name {
    font-family:
            Choko,
            system-ui,
            sans-serif;
    font-size: clamp(1.25rem, 2vw, 1.7rem);
    font-weight: 900;
    letter-spacing: 0;
}

body.lobby-page .start-game .panel {
    padding: clamp(1rem, 2vw, 1.45rem);
}

body.lobby-page .lobby-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    margin: 0 0 0.85rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--ui-line);
}

body.lobby-page .start-game .panel h2 {
    margin: 0;
    color: var(--ui-muted);
    letter-spacing: 0;
    text-transform: none;
    font-size: 1rem;
}

body.lobby-page .lobby-code-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--ui-muted);
    font-weight: 900;
}

body.lobby-page .lobby-code {
    margin: 0;
    min-width: 7rem;
    padding: 0.45rem 0.75rem;
    border: 0;
    border-radius: 12px;
    background: var(--ui-soft);
    color: var(--ui-ink);
    font-size: 1.35rem;
    letter-spacing: 0.08em;
}

body.lobby-page .pflex {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: none;
    min-height: 0;
    gap: 0.7rem;
    margin: 0.75rem 0;
}

body.lobby-page .slot {
    height: auto;
    min-height: 4.15rem;
    margin: 0;
    padding: 0.7rem;
    display: flex;
    align-items: center;
    border: 1px dashed var(--ui-slot-line);
    border-radius: 16px;
    background: var(--ui-paper-soft);
    box-shadow: none;
    font-size: 1rem;
}

body.lobby-page .slot:has(.display-name:not(:empty)) {
    border-style: solid;
    border-color: var(--ui-accent-border);
    background: var(--ui-accent-soft);
    box-shadow: 0 4px 12px var(--ui-accent-focus);
}

body.lobby-page .slot::before {
    background: var(--ui-paper);
}

body.lobby-page .display-name:empty::after {
    content: "Empty";
}

body.lobby-page .lobby-language {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--ui-muted);
    font-size: 0.9rem;
    font-weight: 900;
}

.language-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.75rem;
    padding: 0.3rem 0.55rem;
    border: 1px solid var(--ui-accent-border);
    border-radius: 999px;
    background: var(--ui-accent-soft);
    color: var(--ui-accent-dark);
    font-weight: 900;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

body.game-page .game-language {
    margin-left: 0.45rem;
    min-height: 1.45rem;
    padding: 0.18rem 0.45rem;
    font-size: 0.78rem;
    vertical-align: middle;
}

body.lobby-page .lobby-button.kick {
    width: 1.75rem;
    height: 1.75rem;
    border: 0;
    background: var(--ui-danger-soft);
    color: var(--ui-danger);
}

body.lobby-page .wide {
    margin-top: 0.65rem;
}

body.lobby-page .copy-link-btn,
body.lobby-page .leave-lobby-btn {
    border: 1px solid var(--ui-line);
    background: var(--ui-paper);
}

body.lobby-page .lobby-start-hint.ready {
    color: var(--ui-success);
}

body.lobby-page .lobby-start-hint.error {
    color: var(--ui-danger);
}

body.lobby-page {
    height: 100svh;
    min-height: 0;
    overflow: hidden;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: stretch;
}

body.lobby-page .start-game {
    width: min(820px, calc(100% - 1.5rem));
    height: 100%;
    min-height: 0;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.lobby-page .start-game .panel {
    width: 100%;
    max-height: calc(100svh - 4rem);
    overflow: hidden;
}

body.lobby-page .lobby-brand {
    margin-bottom: 0.65rem;
}

body.lobby-page .pflex {
    gap: 0.55rem;
    margin: 0.55rem 0;
}

body.lobby-page .slot {
    min-height: 3.65rem;
    padding: 0.6rem 0.7rem;
}

body.lobby-page .wide {
    margin-top: 0.5rem;
}

body.lobby-page .index-footer {
    width: 100%;
    margin: 0;
    padding: 0.45rem 0.75rem 0.6rem;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: 0.8rem;
    gap: 0.6rem;
}

body.lobby-page .index-footer .subscribe-link {
    font-size: 0.85rem;
}

body.game-page {
    width: 100vw;
    height: 100vh;
    min-height: 0;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(10rem, 14rem) minmax(0, 1fr) minmax(9rem, 12rem);
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--ui-cream);
}

body.game-page > .logo {
    display: none;
}

body.game-page .header {
    grid-column: 2;
    grid-row: 1;
    align-self: stretch;
    min-height: 3.35rem;
    margin: 0;
    padding: 0.55rem 4.25rem 0.55rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ui-line);
    border-radius: 16px;
    background: var(--ui-paper-strong);
    box-shadow: var(--ui-shadow-soft);
    font-size: 0.98rem;
    line-height: 1.15;
}

body.game-page .header .word {
    display: block;
    margin-top: 0.1rem;
    color: var(--ui-accent-dark);
    font-size: 1.5rem;
}

body.game-page .canvas-border {
    grid-column: 2;
    grid-row: 2;
    align-self: stretch;
    min-width: 0;
    min-height: 0;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0.45rem;
    border: 1px solid var(--ui-line);
    border-radius: 16px;
    background: var(--ui-paper);
    box-shadow: var(--ui-shadow-soft);
    overflow: hidden;
}

body.game-page .canvas {
    position: relative;
    inset: auto;
    top: auto;
    width: 100%;
    height: 100%;
    margin: 0;
    border: 1px solid var(--ui-canvas-line);
    border-radius: 12px;
    background:
            linear-gradient(var(--ui-canvas-grid) 1px, transparent 1px),
            linear-gradient(90deg, var(--ui-canvas-grid) 1px, transparent 1px),
            var(--ui-canvas-bg);
    background-size: 28px 28px;
    overflow: hidden;
}

body.game-page .player-status-list,
body.game-page .categories {
    grid-row: 1 / 4;
    align-self: stretch;
    min-height: 0;
    overflow: hidden;
    padding: 0.8rem;
    border: 1px solid var(--ui-line);
    border-radius: 16px;
    background: var(--ui-paper-wash);
}

body.game-page .player-status-list {
    grid-column: 1;
}

body.game-page .categories {
    grid-column: 3;
    padding-top: 0.8rem;
}

body.game-page .categories ul {
    gap: 0.35rem;
}

body.game-page .categories li {
    border-radius: 12px;
    padding: 0.48rem 0.6rem;
    color: var(--ui-muted);
    background: transparent;
    font-size: 0.9rem;
}

body.game-page .categories li:first-child {
    background: var(--ui-accent-soft);
    color: var(--ui-accent-dark);
}

body.game-page .player-status-item {
    border-radius: 12px;
    padding: 0.55rem;
    background: var(--ui-soft);
}

body.game-page .footer {
    grid-column: 2;
    grid-row: 3;
    min-width: 0;
    margin: 0;
}

body.game-page .emoji-palette {
    max-height: 4.4rem;
    height: 4.4rem;
    min-height: 0;
    margin: 0 0 0.5rem;
    overflow-x: auto;
    overflow-y: hidden;
}

body.game-page .emoji-selector {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    padding: 0.55rem;
    border-radius: 16px;
}

body.game-page .emoji-selector form {
    grid-column: 2;
    min-width: 0;
}

body.game-page .emoji-selector input {
    min-height: 2.65rem;
    border: 1px solid var(--ui-line);
    border-radius: 12px;
    background: var(--ui-soft);
}

body.game-page .room-code {
    position: static;
    grid-column: 1;
    width: auto;
    height: auto;
    letter-spacing: 0.06em;
    font-size: 1rem;
}

body.game-page #mute-btn {
    position: static;
    grid-column: 3;
}

body.game-page .clock {
    grid-column: 4;
    grid-row: 1;
}

body.game-page .clock {
    top: 1.2rem;
    right: calc(12rem + 1.35rem);
    width: 3.6rem;
    height: 3.6rem;
    z-index: 6;
    pointer-events: none;
}

body.game-page .clock svg {
    width: 100%;
    height: 100%;
}

body.game-page .header::before,
body.game-page .header::after {
    display: none;
}

body.game-page .header {
    position: static;
    filter: none;
    width: auto;
    color: var(--ui-ink);
}

body.game-page .footer {
    position: static;
    width: auto;
    min-width: 0;
    z-index: 4;
    display: grid;
    grid-template-rows: auto auto;
    gap: 0.45rem;
}

body.game-page .emoji-palette {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.45rem;
    padding: 0.25rem;
    border: 1px solid var(--ui-line);
    border-radius: 14px;
    background: var(--ui-paper-wash);
}

body.game-page .bubble {
    flex: 0 0 auto;
    top: auto;
    margin: 0;
    padding: 0.38rem 0.5rem;
    border-radius: 12px;
    background: var(--ui-soft);
    font-size: 1.65rem;
    cursor: pointer;
    transition: background 0.12s ease, transform 0.12s ease;
}

body.game-page .bubble:hover {
    background: var(--ui-accent-soft);
    transform: translateY(-1px);
}

body.game-page .emoji-selector {
    display: grid;
    align-items: center;
    gap: 0.55rem;
    grid-auto-flow: column;
    grid-auto-rows: 1fr;
    border: 1px solid var(--ui-line);
    background: var(--ui-paper-strong);
    box-shadow: var(--ui-shadow-soft);
}

body.game-page .game-input-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

body.game-page .emoji-selector input {
    width: 100%;
    height: auto;
    min-height: 2.65rem;
    margin: 0;
    padding: 0 0.85rem;
    border: 1px solid var(--ui-line);
    border-radius: 12px;
    background: var(--ui-soft);
    color: var(--ui-ink);
    font-family: system-ui, sans-serif;
    font-size: 1.15rem;
    text-align: left;
}

body.game-page .game-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    min-width: 2.4rem;
    padding: 0;
    border: 1px solid var(--ui-line);
    border-radius: 10px;
    background: var(--ui-accent);
    color: var(--ui-on-accent);
    font-size: 1rem;
    line-height: 1;
}

body.game-page .game-submit-btn:hover {
    background: var(--ui-accent-dark);
}

body.game-page .emoji-selector input::placeholder {
    color: var(--ui-muted);
}

body.game-page .room-code {
    padding: 0.45rem 0.55rem;
    border-radius: 10px;
    background: var(--ui-accent-soft);
    color: var(--ui-accent-dark);
    font-weight: 900;
    white-space: nowrap;
}

body.game-page #mute-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    min-width: 2.4rem;
    border: 1px solid var(--ui-line);
    border-radius: 10px;
    background: var(--ui-paper);
    color: var(--ui-ink);
    font-size: 1.1rem;
    opacity: 1;
}

body.game-page .clock {
    position: static;
    inset: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--ui-paper-strong);
    box-shadow: var(--ui-shadow-soft);
    width: 2.55rem;
    height: 2.55rem;
    min-width: 2.55rem;
}

/* =====================================================
   VISUAL CONSISTENCY PASS
   ===================================================== */

html {
    overflow-x: clip;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body,
body.index,
body.game-page {
    --ui-backdrop-a: rgba(24, 189, 180, 0.12);
    --ui-backdrop-b: rgba(239, 98, 98, 0.08);
    background:
            radial-gradient(circle at 18% 20%, var(--ui-backdrop-a), transparent 18rem),
            radial-gradient(circle at 86% 72%, var(--ui-backdrop-b), transparent 18rem),
            var(--ui-cream);
}

body.index::before {
    color: rgba(47, 33, 24, 0.055);
}

body.landing-page {
    width: 100%;
    min-width: 0;
    height: 100svh;
    min-height: 0;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

body.landing-page .index-header {
    position: static;
    height: auto;
    min-height: 3.55rem;
    padding: 0.45rem max(0.75rem, env(safe-area-inset-left)) 0.35rem max(0.75rem, env(safe-area-inset-right));
}

body.landing-page .index-container {
    width: min(960px, calc(100% - 1.5rem));
    height: auto;
    min-height: 0;
    margin: 0 auto;
    padding: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
}

body.landing-page .index-logo {
    margin: 0 auto 0.35rem;
}

body.landing-page .index-logo h1::before {
    font-size: clamp(2.3rem, 5.2vw, 4.2rem);
}

body.landing-page .index-logo::after {
    margin-top: 0.2rem;
    font-size: clamp(1rem, 1.7vw, 1.35rem);
}

body.landing-page .main-content {
    width: 100%;
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: clamp(0.75rem, 1.4vw, 1.15rem);
    overflow: hidden;
}

body.landing-page .form-section,
body.landing-page .demo-section {
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 0;
    height: auto;
    border-color: var(--ui-line);
    box-shadow: var(--ui-shadow);
}

body.landing-page .form-section {
    overflow: hidden;
    padding: clamp(0.7rem, 1.5vw, 1rem);
}

body.landing-page .game-form {
    height: 100%;
    min-height: 0;
    grid-template-rows: auto auto minmax(4.55rem, auto) minmax(4.55rem, auto) auto;
    gap: clamp(0.45rem, 1vh, 0.65rem);
    padding: clamp(0.55rem, 1.2vw, 0.85rem);
}

body.landing-page .code-input-group,
body.landing-page .round-time-group,
body.landing-page .streamer-mode-group {
    min-height: 4.55rem;
}

body.landing-page .form-input {
    min-height: 2.35rem;
}

body.landing-page .mode-option {
    min-width: 0;
    padding: 0.25rem;
}

body.landing-page .mode-label {
    min-height: 2.25rem;
    padding: 0.45rem 0.55rem;
    border-color: var(--ui-accent-border);
    background: var(--ui-accent-soft);
    box-shadow: var(--ui-shadow-soft);
}

body.landing-page .mode-option:first-child .mode-label,
body.landing-page .mode-option:last-child .mode-label {
    border-color: var(--ui-accent-border);
}

body.landing-page .mode-option input[type="radio"]:checked + .mode-label,
body.landing-page .time-pills input:checked + .time-pill,
body.landing-page .time-pill.selected {
    background: var(--ui-accent);
    border-color: var(--ui-accent);
    color: var(--ui-on-accent);
}

body.landing-page .cta-button {
    padding: 0.65rem 0.85rem;
    background: var(--ui-accent);
    color: var(--ui-on-accent);
    box-shadow: var(--ui-shadow-soft);
}

body.landing-page .cta-button:hover {
    background: var(--ui-accent-dark);
    color: var(--ui-on-accent);
    box-shadow: var(--ui-shadow-soft);
}

body.landing-page .demo-section {
    padding: clamp(0.55rem, 1.2vw, 0.8rem);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
}

body.landing-page .demo-canvas {
    height: auto;
    min-height: 0;
}

body.landing-page .index-footer {
    position: static;
    transform: none;
    width: min(100%, 760px);
    max-width: calc(100% - 1.5rem);
    min-height: 0;
    margin: 0.35rem auto 0.5rem;
    padding: 0.35rem 0.55rem;
    background: var(--ui-paper-wash);
    border-color: var(--ui-line);
    box-shadow: var(--ui-shadow-soft);
    font-size: 0.78rem;
    gap: 0.45rem;
}

body.landing-page .index-footer a,
.legal-nav a,
.lang-switch a {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding-block: 0.2rem;
}

body.landing-page .index-footer .subscribe-link {
    padding: 0.45rem 0.65rem;
    background: var(--ui-accent);
    color: var(--ui-on-accent);
}

body.landing-page .language-selector {
    background: var(--ui-paper-wash);
}

@media (max-width: 900px) {
    body.landing-page {
        height: 100svh;
        overflow: hidden;
    }

    body.landing-page .index-container {
        width: min(100% - 1rem, 620px);
    }

    body.landing-page .index-logo h1::before {
        font-size: clamp(2rem, 9vw, 3rem);
    }

    body.landing-page .index-logo::after {
        font-size: 1rem;
    }

    body.landing-page .main-content {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 0.72fr) minmax(0, 1fr);
        gap: 0.55rem;
    }

    body.landing-page .form-section,
    body.landing-page .demo-section {
        width: 100%;
        max-width: none;
    }

    body.landing-page .demo-section {
        padding: 0.5rem;
    }

    body.landing-page .demo-status,
    body.landing-page .demo-progress {
        display: none;
    }

    body.landing-page .demo-canvas {
        min-height: 0;
    }

    body.landing-page .form-section {
        padding: 0.55rem;
    }

    body.landing-page .game-form {
        gap: 0.35rem;
        padding: 0.45rem;
        grid-template-rows: auto auto minmax(3.75rem, auto) minmax(3.75rem, auto) auto;
    }

    body.landing-page .code-input-group,
    body.landing-page .round-time-group,
    body.landing-page .streamer-mode-group {
        min-height: 3.75rem;
    }

    body.landing-page .form-label {
        margin-bottom: 0.15rem;
        font-size: 0.9rem;
    }

    body.landing-page .form-input {
        min-height: 2rem;
        padding: 0.35rem 0.65rem;
        font-size: 0.95rem;
    }

    body.landing-page .mode-label {
        min-height: 2rem;
        padding: 0.35rem 0.45rem;
        font-size: 0.9rem;
    }

    body.landing-page .checkbox-label {
        padding: 0.3rem 0.4rem;
        font-size: 0.82rem;
    }

    body.landing-page .time-pill {
        padding: 0.25rem 0.5rem;
        font-size: 0.86rem;
    }

    body.landing-page .cta-button {
        min-height: 2.25rem;
        padding: 0.45rem 0.65rem;
    }

    body.landing-page .index-footer {
        max-width: calc(100% - 1rem);
        margin-bottom: 0.35rem;
        padding: 0.25rem 0.4rem;
        font-size: 0.72rem;
    }
}

@media (max-width: 480px) {
    body.landing-page .index-header {
        min-height: 3.1rem;
    }

    body.landing-page .index-logo {
        margin-bottom: 0.2rem;
    }

    body.landing-page .index-container {
        grid-template-rows: auto minmax(0, 1fr);
    }

    body.landing-page .index-logo h1::before {
        font-size: clamp(1.9rem, 8vw, 2.4rem);
    }

    body.landing-page .index-logo::after {
        font-size: 0.9rem;
    }

    body.landing-page .main-content {
        grid-template-rows: minmax(0, 1fr);
    }

    body.landing-page .demo-section {
        display: none;
    }

    body.landing-page .form-section {
        align-self: stretch;
        padding: 0.45rem;
    }

    body.landing-page .game-form {
        grid-template-rows: auto auto minmax(2.6rem, auto) minmax(3.2rem, auto) auto;
        gap: 0.28rem;
        padding: 0.35rem;
    }

    body.landing-page .code-input-group,
    body.landing-page .round-time-group,
    body.landing-page .streamer-mode-group {
        min-height: 2.6rem;
    }

    body.landing-page .form-input {
        min-height: 1.95rem;
    }

    body.landing-page .mode-toggle {
        gap: 0.3rem;
    }

    body.landing-page .mode-option {
        padding: 0.15rem;
    }

    body.landing-page .mode-label {
        min-height: 1.9rem;
    }

    body.landing-page .streamer-mode-group {
        gap: 0.2rem;
    }

    body.landing-page .checkbox-label {
        min-height: 0;
        padding: 0.22rem 0.35rem;
        line-height: 1.1;
    }

    body.landing-page .cta-button {
        min-height: 2.05rem;
    }

    body.landing-page .index-footer {
        justify-content: center;
        margin-top: 0.25rem;
        margin-bottom: 0.3rem;
    }

    body.landing-page .index-footer .subscribe-link {
        display: none;
    }

    body.lobby-page {
        grid-template-rows: minmax(0, 1fr) auto;
    }

    body.lobby-page .start-game {
        width: min(100% - 1rem, 430px);
        align-items: stretch;
        padding-top: 0.5rem;
        padding-bottom: 0.35rem;
    }

    body.lobby-page .start-game .panel {
        height: 100%;
        max-height: none;
        display: grid;
        grid-template-rows: auto auto auto minmax(0, 1fr) auto;
        padding: 0.75rem;
        overflow: hidden;
    }

    body.lobby-page .lobby-brand {
        margin-bottom: 0.35rem;
    }

    body.lobby-page .lobby-bar {
        gap: 0.45rem;
        margin-bottom: 0.45rem;
        padding-bottom: 0.45rem;
    }

    body.lobby-page .start-game .panel h2 {
        font-size: 0.95rem;
    }

    body.lobby-page .pflex {
        min-height: 0;
        margin: 0.45rem 0;
        overflow: hidden;
        grid-template-columns: 1fr;
        grid-auto-rows: minmax(2.35rem, 1fr);
        gap: 0.4rem;
    }

    body.lobby-page .slot {
        min-height: 0;
        padding: 0.45rem 0.55rem;
    }

    body.lobby-page #players > .empty-slot-wrapper:nth-child(n+5) {
        display: none;
    }

    body.lobby-page .wide {
        margin-top: 0.35rem;
    }

    body.lobby-page .index-footer {
        padding: 0.3rem 0.5rem 0.45rem;
        gap: 0.35rem;
    }
}

/* Accessibility safeguards intentionally live last so older theme blocks cannot undo them. */
:root {
    --ui-accent: #08776f;
    --ui-accent-dark: #075f59;
}

body.landing-page .index-footer .subscribe-link,
body.lobby-page .index-footer .subscribe-link,
body.subscription-page .subscribe-link,
.subscribe-link > span {
    color: #ffffff;
}

.index-footer a,
.legal-nav a,
.lang-switch a {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding-block: 0.2rem;
}

.modal-title {
    padding-inline: 2.75rem;
}

@media (max-width: 1050px) {
    body.game-page {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr) auto;
    }

    body.game-page .player-status-list,
    body.game-page .categories {
        display: none;
    }

    body.game-page .header,
    body.game-page .canvas-border,
    body.game-page .footer {
        grid-column: 1;
    }

    body.game-page .clock {
        right: 1.25rem;
    }
}

@media (max-width: 760px) {
    body.lobby-page .lobby-bar {
        align-items: stretch;
        flex-direction: column;
    }

    body.lobby-page .lobby-code-wrap {
        justify-content: space-between;
    }

    body.lobby-page .pflex {
        grid-template-columns: 1fr;
    }

    body.game-page {
        padding: 0.5rem;
        gap: 0.5rem;
    }

    body.game-page .header {
        padding-right: 3.8rem;
        font-size: 0.9rem;
    }

    body.game-page .canvas-border {
        min-height: 0;
    }

    body.game-page .emoji-selector {
        grid-template-columns: auto minmax(0, 1fr) auto auto;
        gap: 0.35rem;
        padding: 0.45rem;
    }

    body.game-page .room-code {
        display: block;
        grid-column: 1;
        max-width: 4.7rem;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 0.82rem;
        padding: 0.4rem 0.45rem;
    }

    body.game-page .emoji-selector .game-input-form {
        grid-column: 2;
    }

    body.game-page #mute-btn {
        grid-column: 3;
        width: 2.25rem;
        height: 2.25rem;
        min-width: 2.25rem;
    }

    body.game-page .clock {
        grid-column: 4;
        grid-row: 1;
        width: 2.35rem;
        height: 2.35rem;
        min-width: 2.35rem;
    }

    body.game-page .game-input-form {
        gap: 0.3rem;
    }

    body.game-page .emoji-selector input {
        min-height: 2.25rem;
        padding: 0 0.55rem;
        font-size: 0.95rem;
    }

    body.game-page .game-submit-btn {
        width: 2.25rem;
        height: 2.25rem;
        min-width: 2.25rem;
    }
}
