        :root {
            color-scheme: light;
            font-family: "Nunito", "Trebuchet MS", "Arial Rounded MT Bold", Arial, sans-serif;
            background: #64d5f3;
            color: #63300b;
        }

        * {
            box-sizing: border-box;
        }

        html,
        body {
            width: 100%;
            min-width: 320px;
            min-height: 100%;
            margin: 0;
        }

        body {
            min-height: 100svh;
            display: grid;
            place-items: center;
            overflow: hidden;
            background: #44c7ed;
        }

        button {
            font: inherit;
            -webkit-tap-highlight-color: transparent;
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            user-select: none;
        }

        a {
            -webkit-tap-highlight-color: transparent;
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            user-select: none;
        }

        .game-screen {
            position: relative;
            width: min(100vw, 1024px);
            height: min(100svh, 1366px);
            overflow: hidden;
            isolation: isolate;
            container-type: size;
            background: #44c7ed url("assets/background.webp") center center / cover no-repeat;
            box-shadow: 0 0 3vh rgba(10, 89, 128, .18);
            -webkit-tap-highlight-color: transparent;
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            user-select: none;
        }

        .asset {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: contain;
            user-select: none;
            -webkit-user-drag: none;
            -webkit-user-select: none;
            -webkit-touch-callout: none;
            -webkit-tap-highlight-color: transparent;
            pointer-events: none;
        }

        img {
            user-select: none;
            -webkit-user-select: none;
            -webkit-user-drag: none;
            -webkit-touch-callout: none;
            -webkit-tap-highlight-color: transparent;
            pointer-events: none;
        }

        .profile {
            position: absolute;
            z-index: 2;
            top: 1.1%;
            left: 2.5%;
            width: 43%;
            height: 7%;
            display: flex;
            align-items: center;
            gap: 2%;
            padding: 1.4% 2%;
            border: .45cqw solid rgba(255, 255, 255, .95);
            border-radius: 999px;
            background: linear-gradient(135deg, #fff4e2, #f8d4a9);
            box-shadow: 0 .45cqh .4cqh rgba(79, 45, 17, .4), inset 0 .35cqh .4cqh #fff;
            color: inherit;
            cursor: pointer;
            text-decoration: none;
        }

        .avatar {
            flex: 0 0 5.5cqh;
            width: 5.5cqh;
            height: 5.5cqh;
            margin-left: 0;
            border: .3cqh solid white;
            border-radius: 50%;
            background: radial-gradient(circle at 50% 35%, #ffe6c3 0 45%, #e88745 46% 65%, #2ca9f0 66%);
            box-shadow: 0 .25cqh .4cqh rgba(48, 77, 102, .45);
            object-fit: cover;
        }

        .player-copy {
            min-width: 0;
            display: grid;
            gap: .3cqh;
            text-shadow: 0 .1cqh white;
        }

        .player-name {
            font-size: clamp(11px, 1.75cqh, 32px);
            font-weight: 900;
            letter-spacing: -.025em;
            line-height: 1;
        }

        .player-level {
            color: #7d4117;
            font-size: clamp(10px, 1.12cqh, 21px);
            font-weight: 800;
            white-space: nowrap;
        }

        .player-level .fa-star {
            color: #ffb915;
            font-size: .9em;
        }

        .icon-button {
            position: absolute;
            z-index: 2;
            top: 1.8%;
            right: 2.7%;
            width: 5.5cqh;
            height: 5.5%;
            display: grid;
            place-items: center;
            border: .55cqw solid #fff4db;
            border-radius: 28%;
            background: linear-gradient(145deg, #fff9ee, #f2c99b);
            box-shadow: 0 .4cqh .35cqh rgba(75, 43, 17, .45), inset 0 .3cqh .4cqh white;
            color: #60330f;
            font-size: clamp(20px, 3cqh, 54px);
            cursor: pointer;
        }

        .quick-link {
            position: absolute;
            z-index: 2;
            top: 9.2%;
            width: min(16%, 8cqh);
            height: 6.4%;
            display: grid;
            place-items: center;
            align-content: center;
            gap: .2cqh;
            border: .5cqw solid #fff4df;
            border-radius: 25%;
            background: linear-gradient(145deg, #fff9ec, #f5d0a6);
            box-shadow: 0 .35cqh .35cqh rgba(71, 48, 23, .42), inset 0 .3cqh .35cqh white;
            color: #61300e;
            font-size: clamp(9px, 1cqh, 20px);
            font-weight: 900;
            line-height: 1.05;
            text-align: center;
            text-decoration: none;
        }

        .quick-link .fa-solid {
            font-size: clamp(18px, 3cqh, 54px);
            line-height: 1;
        }

        .player-level .fa-star {
            color: #ffb915;
        }

        .leaderboard-link {
            left: 2.2%;
        }

        .results-link {
            right: 2.2%;
        }

        .brand {
            position: absolute;
            top: 8.1%;
            left: 15%;
            width: 70%;
            height: 22.8%;
        }

        .tagline {
            position: absolute;
            top: 27.5%;
            left: 24%;
            width: 52%;
            height: 4.2%;
            display: grid;
            place-items: center;
            clip-path: polygon(3% 15%, 50% 0, 97% 15%, 94% 85%, 50% 100%, 6% 85%);
            background: linear-gradient(180deg, #ffe331, #ffae00);
            color: #42220c;
            font-family: "Trebuchet MS", cursive;
            font-size: clamp(13px, 2.15cqh, 42px);
            font-style: italic;
            font-weight: 900;
            transform: rotate(-1deg);
            text-shadow: 0 .15cqh rgba(255, 255, 255, .65);
        }

        .section-heading {
            position: absolute;
            left: 19%;
            width: 62%;
            height: 5.2%;
            margin: 0;
        }

        .section-heading .asset {
            object-fit: contain;
        }

        .modes-title {
            top: 33.8%;
        }

        .mode-cards {
            position: absolute;
            top: 39.1%;
            left: 4%;
            width: 92%;
            height: 16.8%;
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1.5%;
        }

        .mode-cards .image-control,
        .challenge-cards .image-control {
            border-radius: 0;
        }

        .mode-cards .asset,
        .challenge-cards .asset {
            object-fit: contain;
        }

        .image-control {
            min-width: 0;
            min-height: 0;
            padding: 0;
            overflow: hidden;
            border: 0;
            border-radius: 12%;
            background: transparent;
            cursor: pointer;
            transition: transform .16s ease;
            -webkit-tap-highlight-color: transparent;
        }

        .image-control:active {
            transform: scale(.97);
        }

        .image-control:focus-visible,
        .icon-button:focus-visible,
        .quick-link:focus-visible {
            outline: .45cqw solid white;
            outline-offset: .25cqw;
        }

        .star-match {
            position: absolute;
            top: 57.8%;
            left: 3.5%;
            width: 93%;
            height: 10.5%;
            padding: 0;
            border: 0;
            background: transparent;
            cursor: pointer;
            transition: transform .16s ease;
        }

        .star-match:active {
            transform: scale(.97);
        }

        .challenge-title {
            top: 68.5%;
        }

        .challenge-cards {
            position: absolute;
            top: 73.9%;
            left: 5%;
            width: 90%;
            height: 13.8%;
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1.3%;
        }

        .bottom-nav {
            position: absolute;
            left: 3%;
            bottom: 1.1%;
            width: 94%;
            height: 8.2%;
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 1.5%;
        }

        .bottom-nav .image-control {
            padding: 1.75%;
        }

        .bottom-nav .asset {
            object-fit: contain;
        }

        .auth-screen {
            position: fixed;
            z-index: 10;
            inset: 0;
            display: grid;
            place-items: center;
            overflow: auto;
            background: #44c7ed url("assets/background.webp") center center / cover no-repeat;
        }

        .auth-screen[hidden] {
            display: none;
        }

        .auth-stage {
            position: relative;
            flex: none;
            width: min(100vw, 44.444svh, 768px);
            height: min(100svh, 1728px);
            overflow: hidden;
            isolation: isolate;
            container-type: size;
            color: #62330f;
            -webkit-tap-highlight-color: transparent;
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            user-select: none;
        }

        .auth-brand {
            position: absolute;
            z-index: 2;
            top: 1.6%;
            left: 3.5%;
            width: 33%;
            height: 5%;
            display: flex;
            align-items: center;
            gap: 5%;
            padding: 1% 2%;
            border: .7cqw solid white;
            border-radius: 999px;
            background: linear-gradient(145deg, #fff8eb, #f8d7b1);
            box-shadow: 0 .4cqh .4cqh rgba(79, 45, 17, .35), inset 0 .25cqh .35cqh white;
            color: inherit;
            text-decoration: none;
        }

        .auth-brand .fa-crown {
            color: #ffb900;
            font-size: clamp(20px, 6cqw, 48px);
            filter: drop-shadow(0 .25cqh .15cqh #9c4a0b);
        }

        .auth-brand-copy {
            display: grid;
            line-height: 1.05;
            white-space: nowrap;
        }

        .auth-brand-copy strong {
            font-size: clamp(10px, 2.6cqw, 20px);
            font-weight: 900;
        }

        .auth-brand-copy span {
            margin-top: .2cqh;
            font-size: clamp(8px, 1.8cqw, 14px);
            font-weight: 800;
        }

        .auth-settings {
            position: absolute;
            z-index: 2;
            top: 1.7%;
            right: 4%;
            width: 11%;
            height: 4.8%;
            display: grid;
            place-items: center;
            border: .7cqw solid white;
            border-radius: 28%;
            background: linear-gradient(145deg, #fff9ee, #f2c99b);
            box-shadow: 0 .4cqh .35cqh rgba(75, 43, 17, .4), inset 0 .25cqh .35cqh white;
            color: #60330f;
            font-size: clamp(20px, 5cqw, 38px);
        }

        .auth-logo {
            position: absolute;
            top: 6.1%;
            left: 14%;
            width: 72%;
            height: 22.5%;
            object-fit: contain;
        }

        .auth-panel {
            position: absolute;
            z-index: 2;
            left: 1.5%;
            width: 97%;
        }

        .auth-panel[hidden] {
            display: none;
        }

        .auth-panel-login {
            top: 35%;
            height: 38.5%;
        }

        .auth-panel-signup {
            top: 34.5%;
            height: 46%;
        }

        .auth-panel-art {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: fill;
            pointer-events: none;
            -webkit-user-drag: none;
        }

        .auth-tabs {
            position: absolute;
            z-index: 2;
            top: 0;
            left: 7%;
            width: 86%;
            height: 17%;
            display: flex;
        }

        .auth-form {
            position: absolute;
            inset: 0;
        }

        .auth-tab {
            flex: 1;
            border: 0;
            background: transparent;
            color: transparent;
            cursor: pointer;
        }

        .auth-fields {
            position: absolute;
            left: 9.5%;
            width: 81%;
            height: 17%;
            display: flex;
            align-items: center;
            gap: 3%;
            padding: 0 5%;
            border: .45cqw solid rgba(151, 119, 96, .36);
            border-radius: 999px;
            background: rgba(255, 255, 255, .18);
        }

        .auth-panel-login .auth-field-phone {
            top: 25%;
        }

        .auth-panel-login .auth-field-password {
            top: 47%;
        }

        .auth-panel-signup .auth-fields {
            height: 12.5%;
        }

        .auth-panel-signup .auth-field-name {
            top: 21%;
        }

        .auth-panel-signup .auth-field-phone {
            top: 37%;
        }

        .auth-panel-signup .auth-field-password {
            top: 53%;
        }

        .auth-fields>.fa-solid {
            flex: 0 0 9%;
            color: #0782f6;
            font-size: clamp(18px, 5cqw, 38px);
            text-align: center;
        }

        .auth-fields input {
            min-width: 0;
            width: 100%;
            height: 70%;
            border: 0;
            outline: 0;
            background: transparent;
            color: #63300b;
            font: 800 clamp(12px, 2.45cqh, 24px) "Nunito", Arial, sans-serif;
        }

        .auth-fields input::placeholder {
            color: #8b8790;
            opacity: 1;
        }

        .auth-password-toggle {
            flex: 0 0 10%;
            padding: 0;
            border: 0;
            background: transparent;
            color: #77747b;
            font-size: clamp(17px, 4.4cqw, 34px);
        }

        .auth-submit {
            position: absolute;
            left: 9.5%;
            width: 81%;
            height: 17%;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 4%;
            border: .75cqw solid rgba(255, 255, 255, .8);
            border-radius: 999px;
            background: linear-gradient(180deg, #1ba7ff, #0864ed);
            box-shadow: 0 .9cqh .8cqh rgba(117, 64, 18, .35), inset 0 .4cqh .45cqh rgba(255, 255, 255, .55);
            color: white;
            font: 900 clamp(17px, 3.2cqh, 32px) "Nunito", Arial, sans-serif;
            text-shadow: 0 .25cqh .3cqh rgba(13, 61, 146, .5);
            cursor: pointer;
        }

        .auth-panel-login .auth-submit {
            top: 70%;
        }

        .auth-panel-signup .auth-submit {
            top: 68%;
            height: 14%;
            font-size: clamp(14px, 2.8cqh, 28px);
        }

        .auth-panel-signup .auth-fields,
        .auth-panel-signup .auth-submit {
            transform: translateY(14px);
        }

        .auth-good-luck {
            position: absolute;
            top: 73.8%;
            left: 23%;
            width: 54%;
            color: #143b7b;
            font-family: "Trebuchet MS", cursive;
            font-size: clamp(18px, 4.2cqh, 40px);
            font-style: italic;
            font-weight: 900;
            text-align: center;
            transform: rotate(-4deg);
        }

        .auth-good-luck::after {
            position: absolute;
            right: 15%;
            bottom: -20%;
            left: 15%;
            height: .45cqh;
            border-radius: 50%;
            background: #0876f4;
            content: "";
            transform: rotate(-4deg);
        }

        .auth-screen.is-signup .auth-good-luck {
            display: none;
        }

        .auth-notice {
            position: absolute;
            z-index: 3;
            right: 5%;
            bottom: 1%;
            left: 5%;
            margin: 0;
            color: #63300b;
            font-size: clamp(10px, 1.7cqh, 16px);
            text-align: center;
        }

        .auth-screen .image-control,
        .auth-screen button,
        .auth-screen a {
            -webkit-tap-highlight-color: transparent;
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            user-select: none;
        }

        .match-screen {
            position: fixed;
            z-index: 12;
            inset: 0;
            display: grid;
            place-items: center;
            overflow: hidden;
            background: #45bde8 url("assets/background.webp") center center / cover no-repeat;
            -webkit-tap-highlight-color: transparent;
        }

        .match-screen[hidden] {
            display: none;
        }

        .leaderboard-screen {
            position: fixed;
            z-index: 11;
            inset: 0;
            display: grid;
            place-items: center;
            overflow: hidden;
            background: #45bde8 url("assets/background.webp") center center / cover no-repeat;
        }

        .leaderboard-screen[hidden] {
            display: none;
        }

        .leaderboard-stage {
            position: relative;
            flex: none;
            width: min(100vw, 44.444svh, 768px);
            height: min(100svh, 1728px);
            overflow: hidden;
            isolation: isolate;
            container-type: size;
            color: #69330f;
        }

        .leaderboard-stage::after {
            position: absolute;
            z-index: -1;
            inset: 86% 0 0;
            background:
                repeating-linear-gradient(0deg, transparent 0 2.8cqh, rgba(128, 65, 20, .28) 2.9cqh 3.05cqh),
                repeating-linear-gradient(90deg, transparent 0 31%, rgba(128, 65, 20, .22) 31.3% 31.7%, transparent 32% 67%, rgba(128, 65, 20, .22) 67.3% 67.7%, transparent 68%),
                linear-gradient(180deg, #f8c56d, #d47c2d 52%, #ad5b1c);
            box-shadow: inset 0 .45cqh .6cqh rgba(255, 239, 177, .75);
            content: "";
        }

        .leaderboard-top-button {
            position: absolute;
            z-index: 2;
            top: 1.8%;
            width: 11.5%;
            height: 5.1%;
            display: grid;
            place-items: center;
            padding: 0;
            border: .65cqw solid #fff4dc;
            border-radius: 27%;
            background: linear-gradient(145deg, #fff8e9, #f3c793);
            box-shadow: 0 .45cqh .4cqh rgba(94, 51, 15, .35), inset 0 .3cqh .3cqh white;
            color: #69330f;
            font-size: clamp(18px, 5cqw, 38px);
            cursor: pointer;
        }

        .leaderboard-back {
            left: 3.5%;
        }

        .leaderboard-settings {
            right: 3.5%;
        }

        .leaderboard-title-art {
            position: absolute;
            top: 3.5%;
            left: 7%;
            width: 86%;
            height: 17.5%;
            object-fit: contain;
        }

        .leaderboard-tabs {
            position: absolute;
            top: 22.2%;
            left: 4%;
            width: 92%;
            height: 5.1%;
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            overflow: hidden;
            border: .65cqw solid #fff0d6;
            border-radius: 999px;
            background: linear-gradient(180deg, #fff8e8, #f5d6ac);
            box-shadow: 0 .4cqh .4cqh rgba(84, 49, 18, .28), inset 0 .25cqh .35cqh white;
        }

        .leaderboard-tab {
            min-width: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5%;
            padding: 0 2%;
            border: .3cqw solid rgba(192, 123, 48, .24);
            border-radius: 999px;
            background: linear-gradient(180deg, #fff9ec, #f4d4a9);
            color: #714017;
            font-size: clamp(10px, 2.15cqw, 19px);
            font-weight: 900;
            white-space: nowrap;
            cursor: pointer;
        }

        .leaderboard-tab .fa-solid,
        .leaderboard-tab .fa-regular {
            font-size: 1.25em;
        }

        .leaderboard-tab.is-active {
            border-color: #b6ecff;
            background: linear-gradient(180deg, #25c6ff, #0879ed);
            box-shadow: inset 0 .3cqh .35cqh rgba(255, 255, 255, .7), 0 .25cqh .35cqh rgba(24, 93, 177, .35);
            color: #fff;
            text-shadow: 0 1px 2px rgba(13, 69, 150, .4);
        }

        .leaderboard-panel {
            position: absolute;
            top: 28.1%;
            left: 1.7%;
            width: 96.6%;
            height: 59.3%;
            padding: 1.1cqh 2.3cqw;
            overflow-y: auto;
            border: .8cqw solid #fff3dc;
            border-radius: 5.5cqw;
            background: linear-gradient(180deg, #fff6e3, #fffaf0 45%, #ffe9c8);
            box-shadow: 0 .8cqh .8cqh rgba(86, 51, 22, .32), inset 0 .35cqh .5cqh white;
            overscroll-behavior: contain;
            scrollbar-color: #d49b50 #fff1d8;
            scrollbar-width: thin;
            touch-action: pan-y;
        }

        .leaderboard-panel::-webkit-scrollbar {
            width: 6px;
        }

        .leaderboard-panel::-webkit-scrollbar-track {
            border-radius: 999px;
            background: #fff1d8;
        }

        .leaderboard-panel::-webkit-scrollbar-thumb {
            border-radius: 999px;
            background: #d49b50;
        }

        .leaderboard-list {
            width: 100%;
            height: auto;
            display: grid;
            grid-auto-rows: clamp(42px, 4.9cqh, 84px);
            gap: .75cqh;
            margin: 0;
            padding: 0;
            list-style: none;
        }

        .leaderboard-row,
        .leaderboard-self-row {
            min-width: 0;
            display: grid;
            grid-template-columns: 13% 17% minmax(0, 1fr) 24%;
            align-items: center;
            gap: 1.2%;
            padding: 0 3.2% 0 1.5%;
            border: .38cqw solid #f4d6ae;
            border-radius: 999px;
            background: linear-gradient(105deg, #fff8ed, #fffaf4 45%, #fff0dc);
            box-shadow: 0 .2cqh .25cqh rgba(119, 70, 27, .16), inset 0 .2cqh .25cqh white;
        }

        .leaderboard-row.is-first {
            border-color: #ffce42;
            background: linear-gradient(100deg, #ffe783, #fff4b7 48%, #ffdf71);
            box-shadow: 0 .3cqh .35cqh rgba(185, 113, 9, .3), inset 0 .25cqh .3cqh #fffde0;
        }

        .leaderboard-medal {
            justify-self: start;
            width: 78%;
            height: 78%;
            min-width: 0;
            min-height: 0;
            object-fit: contain;
        }

        .leaderboard-rank {
            width: min(5.2cqh, 78%);
            aspect-ratio: 1;
            display: grid;
            place-items: center;
            justify-self: start;
            border: .25cqh solid #f7d8a6;
            border-radius: 50%;
            background: linear-gradient(145deg, #fff4d8, #ffdda0);
            color: #66350f;
            font-size: clamp(12px, 2.25cqh, 34px);
            font-weight: 1000;
            line-height: 1;
        }

        .leaderboard-avatar {
            width: min(4.5cqh, 88%);
            aspect-ratio: 1;
            justify-self: center;
            border: .3cqh solid #fff5e3;
            border-radius: 50%;
            background-color: #47baf1;
            box-shadow: 0 .2cqh .3cqh rgba(95, 55, 24, .3);
            object-fit: cover;
        }

        .avatar-blue {
            box-shadow: 0 0 0 .2cqh #38aefa, 0 .2cqh .3cqh rgba(95, 55, 24, .3);
        }

        .avatar-pink {
            box-shadow: 0 0 0 .2cqh #ef829d, 0 .2cqh .3cqh rgba(95, 55, 24, .3);
        }

        .avatar-green {
            box-shadow: 0 0 0 .2cqh #58cba2, 0 .2cqh .3cqh rgba(95, 55, 24, .3);
        }

        .avatar-orange {
            box-shadow: 0 0 0 .2cqh #efa35c, 0 .2cqh .3cqh rgba(95, 55, 24, .3);
        }

        .avatar-purple {
            box-shadow: 0 0 0 .2cqh #ad88db, 0 .2cqh .3cqh rgba(95, 55, 24, .3);
        }

        .leaderboard-name {
            min-width: 0;
            overflow: hidden;
            color: #60331d;
            font-size: clamp(10px, 1.75cqh, 27px);
            font-weight: 1000;
            letter-spacing: -.035em;
            line-height: 1;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .leaderboard-score {
            min-width: 0;
            height: 70%;
            min-height: 0;
            align-self: center;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8%;
            padding: 0 5%;
            border: .25cqw solid #f3d09a;
            border-radius: 999px;
            background: linear-gradient(180deg, #fff1cf, #ffdaa0);
            color: #613716;
            font-size: clamp(10px, 1.7cqh, 26px);
            font-weight: 1000;
            line-height: 1;
            white-space: nowrap;
        }

        .leaderboard-score .fa-trophy {
            flex: none;
            color: #ffb813;
            font-size: 1.15em;
            filter: drop-shadow(0 .1cqh .1cqh #ae6211);
        }

        .leaderboard-your-rank {
            position: absolute;
            z-index: 1;
            top: 86.3%;
            left: 31%;
            width: 38%;
            height: 4.7%;
            display: grid;
            place-items: center;
            clip-path: polygon(0 20%, 14% 20%, 14% 0, 86% 0, 86% 20%, 100% 20%, 91% 55%, 100% 90%, 0 90%, 9% 55%);
            background: linear-gradient(180deg, #34c5ff, #0870e9);
            box-shadow: 0 .35cqh .4cqh rgba(19, 70, 146, .35);
            color: #fff;
            font-size: clamp(12px, 2.25cqh, 34px);
            font-weight: 1000;
            text-shadow: 0 .15cqh .2cqh #15549c;
        }

        .leaderboard-self-row {
            position: absolute;
            top: 89.4%;
            left: 7%;
            width: 86%;
            height: 7.1%;
            border-width: .55cqw;
            border-color: #ffe0a2;
            background: linear-gradient(100deg, #fff2cc, #fffaf0 45%, #ffe4a8);
            box-shadow: 0 .35cqh .4cqh rgba(118, 71, 20, .28), inset 0 .3cqh .35cqh white;
        }

        .settings-screen {
            position: fixed;
            z-index: 13;
            inset: 0;
            display: grid;
            place-items: center;
            overflow: hidden;
            background: #45bde8 url("assets/background.webp") center center / cover no-repeat;
        }

        .settings-screen[hidden] {
            display: none;
        }

        .settings-stage {
            position: relative;
            flex: none;
            width: min(100vw, 44.444svh, 768px);
            height: min(100svh, 1728px);
            overflow: hidden;
            isolation: isolate;
            container-type: size;
            color: #69330f;
        }

        .settings-top-button {
            position: absolute;
            z-index: 1;
            top: 1.8%;
            left: 3.5%;
            width: 11.5%;
            height: 5.1%;
            display: grid;
            place-items: center;
            padding: 0;
            border: .65cqw solid #fff4dc;
            border-radius: 27%;
            background: linear-gradient(145deg, #fff8e9, #f3c793);
            box-shadow: 0 .45cqh .4cqh rgba(94, 51, 15, .35), inset 0 .3cqh .3cqh white;
            color: #69330f;
            font-size: clamp(18px, 5cqw, 38px);
            cursor: pointer;
        }

        .settings-title {
            position: absolute;
            top: 2.1%;
            left: 21%;
            width: 58%;
            height: 7.3%;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5%;
            margin: 0;
            border: .8cqw solid #ffe6aa;
            border-radius: 18px;
            background:
                radial-gradient(circle at 5% 50%, #87390c 0 1.2%, #ffc55e 1.4% 2.5%, transparent 2.7%),
                radial-gradient(circle at 95% 50%, #87390c 0 1.2%, #ffc55e 1.4% 2.5%, transparent 2.7%),
                linear-gradient(145deg, #ffd77d, #e99a3f 58%, #b95819);
            box-shadow: 0 .55cqh 0 #87370b, 0 .8cqh .8cqh rgba(34, 18, 7, .35), inset 0 .35cqh .5cqh #fff1b8;
            color: #69330f;
            font-size: clamp(20px, 5cqw, 36px);
            font-weight: 1000;
            text-shadow: 0 1px #fff3c9;
        }

        .settings-title i {
            font-size: .85em;
        }

        .settings-content {
            position: absolute;
            top: 11.5%;
            left: 4%;
            width: 92%;
            height: 85.5%;
            overflow-y: auto;
            padding: 2.5cqw 2.5cqw 3cqh;
            border: .8cqw solid #fff3dc;
            border-radius: 5.5cqw;
            background: linear-gradient(180deg, #fff6e3, #fffaf0 48%, #ffe9c8);
            box-shadow: 0 .8cqh .8cqh rgba(86, 51, 22, .32), inset 0 .35cqh .5cqh white;
            overscroll-behavior: contain;
            scrollbar-color: #d49b50 #fff1d8;
            scrollbar-width: thin;
        }

        .settings-content::-webkit-scrollbar {
            width: 6px;
        }

        .settings-content::-webkit-scrollbar-track {
            border-radius: 999px;
            background: #fff1d8;
        }

        .settings-content::-webkit-scrollbar-thumb {
            border-radius: 999px;
            background: #d49b50;
        }

        .settings-preferences,
        .settings-actions {
            display: grid;
            gap: clamp(8px, 1.2cqh, 16px);
        }

        .settings-row {
            min-width: 0;
            min-height: clamp(62px, 8cqh, 82px);
            display: grid;
            grid-template-columns: 12% minmax(0, 1fr) auto;
            align-items: center;
            gap: 2.5%;
            padding: 1.5% 3%;
            border: .55cqw solid #f3d09a;
            border-radius: 20px;
            background: linear-gradient(105deg, #fff8ed, #fffaf4 48%, #fff0dc);
            box-shadow: 0 .25cqh .3cqh rgba(119, 70, 27, .18), inset 0 .25cqh .3cqh white;
        }

        .settings-row-icon {
            width: clamp(34px, 8.5cqw, 54px);
            aspect-ratio: 1;
            display: grid;
            place-items: center;
            justify-self: center;
            border: .45cqw solid #fff0c8;
            border-radius: 28%;
            background: linear-gradient(145deg, #ffd77d, #d98331);
            box-shadow: inset 0 .25cqh .3cqh #fff7db, 0 .25cqh .3cqh rgba(88, 42, 12, .28);
            color: #71320c;
            font-size: clamp(15px, 4cqw, 24px);
        }

        .settings-copy {
            min-width: 0;
            display: grid;
            gap: .35cqh;
        }

        .settings-copy strong {
            overflow: hidden;
            color: #60331d;
            font-size: clamp(13px, 2.25cqh, 25px);
            font-weight: 1000;
            line-height: 1.05;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .settings-row-notification .settings-copy strong {
            font-size: clamp(12px, 1.8cqh, 21px);
        }

        .settings-copy small {
            overflow: hidden;
            color: #8a5c36;
            font-size: clamp(10px, 1.45cqh, 18px);
            font-weight: 800;
            line-height: 1.05;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .settings-switch {
            position: relative;
            width: clamp(42px, 11cqw, 58px);
            height: clamp(24px, 5.6cqh, 32px);
            padding: 0;
            border: 1px solid rgba(98, 48, 16, .45);
            border-radius: 999px;
            background: #a97644;
            box-shadow: inset 0 .2cqh .3cqh rgba(58, 28, 8, .45);
            cursor: pointer;
            transition: background .18s ease;
        }

        .settings-switch>span {
            position: absolute;
            top: 50%;
            left: 2px;
            width: clamp(18px, 4.5cqw, 24px);
            aspect-ratio: 1;
            border-radius: 50%;
            background: linear-gradient(145deg, #fff8e7, #e4c28f);
            box-shadow: 0 .15cqh .2cqh rgba(54, 29, 9, .45);
            transform: translateY(-50%);
            transition: left .18s ease;
        }

        .settings-switch[aria-checked="true"] {
            background: linear-gradient(180deg, #64c655, #369b3f);
        }

        .settings-switch[aria-checked="true"]>span {
            left: calc(100% - clamp(18px, 4.5cqw, 24px) - 2px);
        }

        .settings-permission-button {
            min-width: clamp(50px, 14cqw, 74px);
            min-height: clamp(34px, 6cqh, 44px);
            display: grid;
            place-items: center;
            padding: 0;
            border: .5cqw solid #fff0c8;
            border-radius: 999px;
            background: linear-gradient(180deg, #b8e3a0, #4f9a43);
            box-shadow: 0 .25cqh .3cqh rgba(36, 71, 27, .3), inset 0 .2cqh .25cqh #f1ffe9;
            color: #173c1d;
            font-size: clamp(16px, 3cqw, 22px);
            font-weight: 1000;
            cursor: pointer;
        }

        .settings-permission-button:disabled {
            cursor: default;
            opacity: .8;
        }

        .settings-actions {
            margin-top: clamp(12px, 2cqh, 22px);
        }

        .settings-action {
            width: 100%;
            min-height: clamp(48px, 7.2cqh, 64px);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 3%;
            padding: 1% 4%;
            border: .6cqw solid #fff0c8;
            border-radius: 18px;
            background: linear-gradient(180deg, #ffe2a1, #d98331);
            box-shadow: 0 .35cqh .35cqh rgba(88, 42, 12, .32), inset 0 .25cqh .3cqh #fff7db;
            color: #69330f;
            font-size: clamp(14px, 2cqh, 22px);
            font-weight: 1000;
            cursor: pointer;
        }

        .settings-action-clear {
            background: linear-gradient(180deg, #ffe2a1, #d98331);
        }

        .settings-action-delete {
            border-color: #ffe1da;
            background: linear-gradient(180deg, #f5b0a5, #bf4f40);
            color: #561c19;
            box-shadow: 0 .35cqh .35cqh rgba(88, 42, 12, .32), inset 0 .25cqh .3cqh #fff0eb;
        }

        .settings-action-logout {
            border-color: #e8ffd9;
            background: linear-gradient(180deg, #b8e3a0, #4f9a43);
            color: #173c1d;
            box-shadow: 0 .35cqh .35cqh rgba(36, 71, 27, .3), inset 0 .25cqh .3cqh #f1ffe9;
        }

        .settings-status {
            min-height: 1.2em;
            margin: clamp(8px, 1.5cqh, 16px) 2% 0;
            color: #69330f;
            font-size: clamp(11px, 1.55cqh, 17px);
            font-weight: 900;
            line-height: 1.2;
            text-align: center;
        }

        .settings-dialog-overlay {
            position: absolute;
            z-index: 5;
            inset: 0;
            display: grid;
            place-items: center;
            padding: 7%;
            background: rgba(31, 18, 8, .58);
            backdrop-filter: blur(3px);
        }

        .settings-dialog-overlay[hidden] {
            display: none;
        }

        .settings-dialog {
            width: min(100%, 380px);
            padding: clamp(20px, 5cqw, 30px) clamp(16px, 5cqw, 28px);
            border: .9cqw solid #ffdc85;
            border-radius: 8%;
            background: linear-gradient(145deg, #ffd77d, #e99a3f 58%, #b95819);
            box-shadow: 0 .9cqh 0 #87370b, 0 1.6cqh 1.4cqh rgba(34, 18, 7, .45), inset 0 .5cqh .7cqh #fff1b8, inset 0 -.5cqh .6cqh #a44310;
            color: #69330f;
        }

        .settings-dialog-message {
            margin: 0 0 clamp(16px, 3cqh, 24px);
            padding: 3% 2% 0;
            font-size: clamp(16px, 4.2cqw, 22px);
            font-weight: 1000;
            line-height: 1.25;
            text-align: center;
        }

        .settings-dialog-actions {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: clamp(10px, 3cqw, 18px);
        }

        .settings-dialog-button {
            min-height: clamp(42px, 7cqh, 56px);
            border: .6cqw solid #fff0c8;
            border-radius: 999px;
            background: linear-gradient(180deg, #ffe2a1, #d98331);
            box-shadow: 0 .4cqh .4cqh rgba(88, 42, 12, .38), inset 0 .25cqh .35cqh #fff7db;
            color: #69330f;
            font-size: clamp(15px, 4cqw, 20px);
            font-weight: 1000;
            cursor: pointer;
        }

        .settings-dialog-confirm {
            border-color: #e8ffd9;
            background: linear-gradient(180deg, #b8e3a0, #4f9a43);
            color: #173c1d;
        }

        .settings-dialog-cancel {
            border-color: #ffe1da;
            background: linear-gradient(180deg, #f5b0a5, #bf4f40);
            color: #561c19;
        }

        .match-stage {
            position: relative;
            flex: none;
            width: min(100vw, 44.444svh, 768px);
            height: min(100svh, 1728px);
            overflow: hidden;
            isolation: isolate;
            container-type: size;
            color: #69330f;
            -webkit-user-select: none;
            user-select: none;
        }

        .match-top-button {
            position: absolute;
            z-index: 2;
            top: 2%;
            width: 11%;
            height: 5%;
            display: grid;
            place-items: center;
            border: .7cqw solid #fff4dc;
            border-radius: 27%;
            background: linear-gradient(145deg, #fff8e9, #f3c793);
            box-shadow: 0 .45cqh .4cqh rgba(94, 51, 15, .35), inset 0 .3cqh .3cqh white;
            color: #69330f;
            font-size: clamp(20px, 5cqw, 38px);
            cursor: pointer;
        }

        .match-back {
            left: 4%;
        }

        .match-settings {
            right: 4%;
        }

        .match-players {
            position: absolute;
            top: 15%;
            left: 50%;
            width: min(94%, 52cqh);
            height: 9.5%;
            display: grid;
            grid-template-columns: 1fr .32fr 1fr;
            align-items: center;
            gap: 1%;
            transform: translateX(-50%);
        }

        .match-player {
            position: relative;
            min-width: 0;
            height: 76%;
            display: flex;
            align-items: center;
            gap: 3%;
            padding: 2%;
            border: .75cqw solid rgba(255, 255, 255, .92);
            border-radius: 13cqh;
            background: linear-gradient(135deg, #fff6e8, #f5cf9f);
            box-shadow: 0 .5cqh .6cqh rgba(89, 49, 18, .38), inset 0 .25cqh .35cqh white;
        }

        .match-player::after {
            position: absolute;
            top: 50%;
            right: 10%;
            width: clamp(8px, 2.2cqw, 12px);
            aspect-ratio: 1;
            border-radius: 50%;
            background: transparent;
            content: "";
            transform: translateY(-50%);
            transition: background .18s ease;
        }

        .match-player-o::after {
            right: auto;
            left: 10%;
        }

        .match-player-x.is-active-turn::after {
            background: var(--match-accent);
        }

        .match-player-o.is-active-turn::after {
            background: var(--match-accent);
        }

        .match-player-x {
            --match-accent: #22c2eb;
            border-color: var(--match-accent);
            box-shadow: 0 0 .8cqh .25cqh #078cfa, 0 .6cqh .7cqh rgba(29, 68, 122, .38), inset 0 .3cqh .35cqh white;
        }

        .match-player-o {
            --match-accent: #ff7632;
            flex-direction: row-reverse;
            border-color: var(--match-accent);
            box-shadow: 0 0 .8cqh .25cqh #ff544b, 0 .6cqh .7cqh rgba(29, 68, 122, .3), inset 0 .3cqh .35cqh white;
        }

        .match-avatar {
            flex: 0 0 clamp(26px, 11cqw, 44px);
            width: clamp(26px, 11cqw, 44px);
            height: auto;
            aspect-ratio: 1;
            display: grid;
            place-items: center;
            overflow: hidden;
            border: .6cqw solid white;
            border-radius: 50%;
            background: #a7e4ff;
            object-fit: cover;
        }

        .match-player-x .match-avatar {
            margin-left: clamp(1px, .8cqw, 4px);
        }

        .match-player-o .match-avatar {
            margin-right: clamp(1px, .8cqw, 4px);
        }

        .match-player-info {
            min-width: 0;
            flex: 1;
            display: grid;
            gap: 5%;
            text-align: center;
        }

        .match-player-x .match-player-info {
            text-align: left;
        }

        .match-player-o .match-player-info {
            text-align: right;
        }

        .match-player-name {
            overflow: hidden;
            color: #69330f;
            font-size: clamp(9px, 3.2cqw, 20px);
            font-weight: 900;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .match-score {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8%;
            padding: 0;
            background: transparent;
            color: #69330f;
            font-size: clamp(14px, 4cqw, 20px);
            font-weight: 900;
        }

        .match-player-x .match-score {
            justify-content: flex-start;
        }

        .match-player-o .match-score {
            justify-content: flex-end;
        }

        .match-player-x .match-score {
            color: #0755b6;
        }

        .match-player-o .match-score {
            color: #a73728;
        }

        .match-score .fa-trophy {
            color: #b97700;
            font-size: .9em;
            filter: drop-shadow(0 .15cqh .15cqh #81400a);
        }

        .match-versus {
            display: block;
            width: min(100%, clamp(24px, 12cqw, 58px));
            height: auto;
            justify-self: center;
            filter: drop-shadow(0 .3cqh .35cqh rgba(78, 35, 10, .45));
        }

        .match-round-status {
            position: absolute;
            top: 29%;
            left: 8%;
            width: 84%;
            color: #fff9e6;
            font-size: clamp(12px, 4cqw, 20px);
            font-weight: 900;
            text-align: center;
            text-shadow: 0 .35cqh .4cqh rgba(75, 43, 13, .8), 0 0 .4cqh #3c8ac6;
            white-space: nowrap;
        }

        .match-board {
            position: absolute;
            top: 35%;
            left: 50%;
            width: min(94%, 44.444cqh);
            aspect-ratio: 1;
            padding: 5.2%;
            border: .85cqw solid #ffda7a;
            border-radius: 6%;
            background:
                radial-gradient(circle at 5% 5%, #9b440c 0 1.4%, #ffc55e 1.6% 3.5%, transparent 3.7%),
                radial-gradient(circle at 95% 5%, #9b440c 0 1.4%, #ffc55e 1.6% 3.5%, transparent 3.7%),
                radial-gradient(circle at 5% 95%, #9b440c 0 1.4%, #ffc55e 1.6% 3.5%, transparent 3.7%),
                radial-gradient(circle at 95% 95%, #9b440c 0 1.4%, #ffc55e 1.6% 3.5%, transparent 3.7%),
                linear-gradient(155deg, #ffcf69, #ff9f31 54%, #e87517);
            box-shadow: 0 .9cqh 0 #9c3d0c, 0 1.5cqh 1.2cqh rgba(70, 38, 15, .42), inset 0 .45cqh .55cqh #fff0a8, inset 0 -.5cqh .6cqh #cb5b0d;
            transform: translateX(-50%);
        }

        .match-grid {
            width: 100%;
            height: 100%;
            display: grid;
            grid-template-columns: repeat(var(--grid-cols, 5), minmax(0, 1fr));
            grid-template-rows: repeat(var(--grid-rows, 5), minmax(0, 1fr));
            gap: 1.2%;
            padding: 1%;
            border: .6cqw solid #91410f;
            border-radius: 4%;
            background: linear-gradient(145deg, #a94a12, #70310e);
            box-shadow: inset 0 .45cqh .5cqh rgba(58, 24, 5, .8), 0 .3cqh .3cqh rgba(255, 227, 151, .65);
        }

        .match-cell {
            min-width: 0;
            min-height: 0;
            display: grid;
            place-items: center;
            padding: 0;
            border: .45cqw solid #8a3c11;
            border-radius: 6%;
            background:
                repeating-linear-gradient(0deg, transparent 0 18%, rgba(201, 111, 28, .09) 19% 20%),
                linear-gradient(145deg, #ffc66a, #f9ad4b);
            box-shadow: inset 0 .3cqh .4cqh rgba(255, 244, 200, .8), 0 .2cqh .25cqh rgba(63, 26, 6, .45);
            color: #087ded;
            font-family: "Nunito", Arial, sans-serif;
            font-size: clamp(10px, calc(46cqw / var(--grid-cols, 5)), 72px);
            font-weight: 1000;
            line-height: 1;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
            transition: transform .12s ease, filter .12s ease;
        }

        .match-cell:active:not(:disabled) {
            transform: scale(.93);
        }

        .match-cell:disabled {
            cursor: default;
        }

        .match-cell.mark-x {
            color: #078af7;
            text-shadow: 0 .2cqh 0 white, 0 .45cqh .25cqh #124888;
            -webkit-text-stroke: .18cqw white;
        }

        .match-cell.mark-o {
            color: #ee3030;
            text-shadow: 0 .2cqh 0 white, 0 .45cqh .25cqh #791c12;
            -webkit-text-stroke: .18cqw white;
        }

        .match-cell.is-winning {
            background: linear-gradient(145deg, #fff2a1, #ffc64e);
            box-shadow: inset 0 0 0 .6cqw #fff9d9, 0 0 .8cqh #fff7b2;
        }

        .match-new-round {
            position: absolute;
            bottom: 3.2%;
            left: 50%;
            min-width: 36%;
            max-width: 90%;
            min-height: 5.4%;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 7%;
            padding: 1.5% 5%;
            border: .7cqw solid #fff0c8;
            border-radius: 999px;
            background: linear-gradient(180deg, #ffca50, #ee811a);
            box-shadow: 0 .55cqh .55cqh rgba(90, 43, 11, .38), inset 0 .3cqh .35cqh #fff6cd;
            color: #68300c;
            font-size: clamp(13px, 3cqh, 25px);
            font-weight: 900;
            transform: translateX(-50%);
            cursor: pointer;
            white-space: nowrap;
        }

        .match-modal {
            position: absolute;
            z-index: 10;
            inset: 0;
            display: grid;
            place-items: center;
            padding: 6%;
            background: rgba(31, 18, 8, .58);
            backdrop-filter: blur(3px);
        }

        .match-modal[hidden] {
            display: none;
        }

        .match-modal-panel {
            position: relative;
            width: min(88%, 380px);
            max-height: 88%;
            overflow: auto;
            padding: clamp(20px, 5cqw, 30px) clamp(14px, 5cqw, 28px);
            border: .9cqw solid #ffdc85;
            border-radius: 8%;
            background:
                radial-gradient(circle at 5% 5%, #87390c 0 1.2%, #ffc55e 1.4% 2.4%, transparent 2.6%),
                radial-gradient(circle at 95% 5%, #87390c 0 1.2%, #ffc55e 1.4% 2.4%, transparent 2.6%),
                radial-gradient(circle at 5% 95%, #87390c 0 1.2%, #ffc55e 1.4% 2.4%, transparent 2.6%),
                radial-gradient(circle at 95% 95%, #87390c 0 1.2%, #ffc55e 1.4% 2.4%, transparent 2.6%),
                linear-gradient(145deg, #ffd77d, #e99a3f 58%, #b95819);
            box-shadow: 0 .9cqh 0 #87370b, 0 1.6cqh 1.4cqh rgba(34, 18, 7, .45), inset 0 .5cqh .7cqh #fff1b8, inset 0 -.5cqh .6cqh #a44310;
            color: #69330f;
        }

        .match-modal-close {
            position: absolute;
            top: 3%;
            right: 3%;
            width: clamp(30px, 8cqw, 42px);
            height: clamp(30px, 8cqw, 42px);
            display: grid;
            place-items: center;
            padding: 0;
            border: .5cqw solid #fff0c8;
            border-radius: 28%;
            background: linear-gradient(145deg, #fff8e9, #efbd7c);
            box-shadow: 0 .3cqh .3cqh rgba(87, 43, 13, .4), inset 0 .2cqh .3cqh white;
            color: #69330f;
            font-size: clamp(16px, 4cqw, 22px);
            cursor: pointer;
        }

        .match-menu-title {
            margin: 0;
            padding: 0 12% 4%;
            color: #71320c;
            font-size: clamp(18px, 5cqw, 26px);
            font-weight: 1000;
            text-align: center;
            text-shadow: 0 1px #fff3c9, 0 2px #c46c1d;
        }

        .match-menu-actions {
            display: grid;
            gap: clamp(8px, 1.6cqh, 14px);
        }

        .match-menu-action {
            width: 100%;
            min-height: clamp(44px, 7.5cqh, 60px);
            display: grid;
            grid-template-columns: 1.2em minmax(0, 1fr) auto;
            align-items: center;
            gap: .65em;
            padding: .45em .7em;
            border: .6cqw solid #fff0c8;
            border-radius: 16px;
            background: linear-gradient(180deg, #ffe2a1, #d98331);
            box-shadow: 0 .45cqh .4cqh rgba(88, 42, 12, .38), inset 0 .25cqh .35cqh #fff7db;
            color: #69330f;
            font-size: clamp(14px, 4.2cqw, 20px);
            font-weight: 900;
            text-align: left;
            cursor: pointer;
        }

        .match-menu-action>i {
            color: #80400f;
            text-align: center;
        }

        .match-menu-action:active,
        .match-confirm-action:active {
            transform: scale(.97);
        }

        .match-mute-switch {
            position: relative;
            width: clamp(36px, 10cqw, 46px);
            height: clamp(21px, 5cqh, 25px);
            display: block;
            border: 1px solid rgba(98, 48, 16, .45);
            border-radius: 999px;
            background: #a97644;
            box-shadow: inset 0 .2cqh .3cqh rgba(58, 28, 8, .45);
            transition: background .18s ease;
        }

        .match-mute-knob {
            position: absolute;
            top: 50%;
            left: 2px;
            width: clamp(15px, 4cqw, 19px);
            aspect-ratio: 1;
            border-radius: 50%;
            background: linear-gradient(145deg, #fff8e7, #e4c28f);
            box-shadow: 0 .15cqh .2cqh rgba(54, 29, 9, .45);
            transform: translateY(-50%);
            transition: left .18s ease;
        }

        .match-mute-toggle.is-muted .match-mute-switch {
            background: #784020;
        }

        .match-mute-toggle.is-muted .match-mute-knob {
            left: calc(100% - clamp(15px, 4cqw, 19px) - 2px);
        }

        .match-exit-question {
            margin: 0 0 clamp(16px, 3cqh, 24px);
            padding: 5% 2% 0;
            color: #69330f;
            font-size: clamp(16px, 4.5cqw, 22px);
            font-weight: 900;
            line-height: 1.2;
            text-align: center;
        }

        .match-confirm-actions {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: clamp(10px, 3cqw, 18px);
        }

        .match-confirm-action {
            min-height: clamp(42px, 7cqh, 56px);
            border: .6cqw solid #fff0c8;
            border-radius: 999px;
            background: linear-gradient(180deg, #ffe2a1, #d98331);
            box-shadow: 0 .4cqh .4cqh rgba(88, 42, 12, .38), inset 0 .25cqh .35cqh #fff7db;
            color: #69330f;
            font-size: clamp(15px, 4.2cqw, 20px);
            font-weight: 900;
            cursor: pointer;
        }

        #match-exit-no {
            border-color: #ffe1da;
            background: linear-gradient(180deg, #f5b0a5, #bf4f40);
            color: #561c19;
            box-shadow: 0 .4cqh .4cqh rgba(88, 42, 12, .38), inset 0 .25cqh .35cqh #fff0eb;
        }

        #match-exit-yes {
            border-color: #e8ffd9;
            background: linear-gradient(180deg, #b8e3a0, #4f9a43);
            color: #173c1d;
            box-shadow: 0 .4cqh .4cqh rgba(36, 71, 27, .38), inset 0 .25cqh .35cqh #f1ffe9;
        }

        .match-screen button {
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            user-select: none;
        }

        @media (min-width: 200px) and (max-width: 650px) {

            html,
            body {
                min-width: 0;
            }

            .auth-stage {
                width: 100vw;
                height: 100svh;
            }

            .auth-panel {
                left: 50%;
                transform: translateX(-50%);
            }

            .auth-panel-login {
                width: min(97%, 44.444cqh);
                height: min(38.5%, 86.2cqw);
            }

            .auth-panel-signup {
                width: min(97%, 41cqh);
                height: min(46%, 45.4cqh, 108.4cqw);
            }

            .game-screen {
                width: 100vw;
                height: 100svh;
            }

            .match-stage {
                width: 100vw;
                height: 100svh;
            }

            .leaderboard-stage {
                width: 100vw;
                height: 100svh;
            }

            .settings-stage {
                width: 100vw;
                height: 100svh;
            }

            .profile {
                width: min(54%, 240px);
            }

            .quick-link {
                width: min(28%, clamp(56px, 8cqh, 80px));
            }

            .mode-cards,
            .challenge-cards {
                left: 50%;
                transform: translateX(-50%);
            }

            .mode-cards {
                width: min(92%, 44.444cqh);
            }

            .challenge-cards {
                width: min(90%, 44.444cqh);
            }
        }

        @media (prefers-reduced-motion: reduce) {

            *,
            *::before,
            *::after {
                scroll-behavior: auto !important;
                transition-duration: .01ms !important;
            }
        }


        /* ====================================================================
           ADDITIONAL STYLES: DEVELOPER CREDIT, RESULTS / ADMIN, MODALS & BANNERS
           Developer: DS TUSHAR
           ==================================================================== */

        .developer-credit {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            padding: 4px 14px;
            border-radius: 999px;
            border: 2px solid #ffda7a;
            background: linear-gradient(135deg, #fff3dc, #ffd187);
            color: #63300b;
            font-size: clamp(10px, 1.8cqh, 13px);
            font-weight: 900;
            text-decoration: none;
            box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15), inset 0 1px 2px #fff;
            letter-spacing: .5px;
            user-select: none;
            pointer-events: auto;
            z-index: 10;
        }

        .auth-developer-bar {
            position: absolute;
            bottom: 2%;
            left: 50%;
            transform: translateX(-50%);
            white-space: nowrap;
        }

        .home-developer-bar {
            position: absolute;
            bottom: 11%;
            left: 50%;
            transform: translateX(-50%);
            white-space: nowrap;
        }

        /* Results / Admin Screen */
        .results-screen {
            position: relative;
            width: min(100vw, 1024px);
            height: min(100svh, 1366px);
            overflow: hidden;
            container-type: size;
            background: #44c7ed url("assets/background.webp") center center / cover no-repeat;
            box-shadow: 0 0 3vh rgba(10, 89, 128, .18);
        }

        .results-screen[hidden] {
            display: none;
        }

        .results-stage {
            position: relative;
            width: 100%;
            height: 100%;
            overflow-y: auto;
            overflow-x: hidden;
            padding: clamp(12px, 3cqh, 24px) clamp(12px, 4cqw, 24px) clamp(24px, 5cqh, 40px);
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: clamp(10px, 2cqh, 18px);
        }

        .results-header {
            width: 100%;
            max-width: 650px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
        }

        .results-title {
            margin: 0;
            color: #fff9e6;
            font-size: clamp(18px, 4.5cqw, 28px);
            font-weight: 1000;
            text-shadow: 0 .35cqh .4cqh rgba(75, 43, 13, .8), 0 0 .4cqh #3c8ac6;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .admin-kpi-grid {
            width: 100%;
            max-width: 650px;
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
        }

        .kpi-card {
            border: .4cqw solid #ffda7a;
            border-radius: 14px;
            background: linear-gradient(145deg, #fff3dc, #ffd187);
            box-shadow: 0 .4cqh .4cqh rgba(79, 45, 17, .25), inset 0 .25cqh .3cqh #fff;
            padding: clamp(8px, 2cqh, 14px) 6px;
            text-align: center;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .kpi-val {
            font-size: clamp(16px, 4cqw, 24px);
            font-weight: 1000;
            color: #63300b;
        }

        .kpi-label {
            font-size: clamp(9px, 2.2cqw, 12px);
            font-weight: 800;
            color: #8c4c1d;
            text-transform: uppercase;
        }

        .results-card-container {
            width: 100%;
            max-width: 650px;
            border: .75cqw solid #ffda7a;
            border-radius: 20px;
            background: linear-gradient(155deg, #ffcf69, #ff9f31 54%, #e87517);
            box-shadow: 0 .9cqh 0 #9c3d0c, 0 1.5cqh 1.2cqh rgba(70, 38, 15, .42), inset 0 .45cqh .55cqh #fff0a8;
            padding: clamp(10px, 2.5cqh, 18px);
            display: flex;
            flex-direction: column;
            gap: 8px;
            max-height: 55cqh;
            overflow-y: auto;
        }

        .match-record-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            padding: clamp(8px, 1.8cqh, 12px);
            border-radius: 12px;
            background: rgba(255, 248, 230, 0.94);
            border: 2px solid #fff;
            box-shadow: 0 2px 4px rgba(79, 45, 17, 0.15);
        }

        .match-record-main {
            display: flex;
            flex-direction: column;
            gap: 2px;
            min-width: 0;
        }

        .match-record-title {
            font-weight: 900;
            color: #63300b;
            font-size: clamp(12px, 2.8cqw, 15px);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .match-record-detail {
            font-size: clamp(10px, 2.2cqw, 12px);
            color: #8c4c1d;
            font-weight: 700;
        }

        .match-record-badge {
            padding: 4px 10px;
            border-radius: 999px;
            font-weight: 900;
            font-size: clamp(10px, 2.2cqw, 12px);
            white-space: nowrap;
        }

        .match-badge-x {
            background: #d4f0ff;
            color: #0755b6;
            border: 1px solid #7eccff;
        }

        .match-badge-o {
            background: #ffe3de;
            color: #b72a19;
            border: 1px solid #ffa498;
        }

        .match-badge-draw {
            background: #f0e6ff;
            color: #6322ad;
            border: 1px solid #cca1ff;
        }

        /* Generic Modal Overlay */
        .app-modal-overlay {
            position: absolute;
            z-index: 100;
            inset: 0;
            display: grid;
            place-items: center;
            padding: clamp(12px, 4cqw, 28px);
            background: rgba(20, 12, 5, 0.65);
            backdrop-filter: blur(4px);
        }

        .app-modal-overlay[hidden] {
            display: none !important;
        }

        .app-modal-card {
            width: min(100%, 420px);
            border: .85cqw solid #ffda7a;
            border-radius: 24px;
            background: linear-gradient(155deg, #ffd77d, #e99a3f 58%, #b95819);
            box-shadow: 0 .9cqh 0 #87370b, 0 1.6cqh 1.4cqh rgba(34, 18, 7, .45), inset 0 .5cqh .7cqh #fff1b8;
            color: #69330f;
            padding: clamp(18px, 4cqw, 28px);
            display: flex;
            flex-direction: column;
            gap: clamp(12px, 2.5cqh, 20px);
            text-align: center;
            position: relative;
        }

        .modal-header-title {
            margin: 0;
            font-size: clamp(18px, 4.8cqw, 24px);
            font-weight: 1000;
            color: #5a2505;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
        }

        .modal-close-btn {
            position: absolute;
            top: 14px;
            right: 14px;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            border: 2px solid #fff;
            background: #ff544b;
            color: #fff;
            display: grid;
            place-items: center;
            cursor: pointer;
            font-weight: 900;
            font-size: 14px;
        }

        /* Match Starting Alert Animation */
        .countdown-number {
            font-size: clamp(54px, 18cqw, 96px);
            font-weight: 1000;
            color: #fff;
            text-shadow: 0 0 20px #ffbd2e, 0 6px 0 #b74f07;
            animation: pulse-countdown .9s ease-in-out infinite;
        }

        @keyframes pulse-countdown {
            0% {
                transform: scale(0.6);
                opacity: 0;
            }

            50% {
                transform: scale(1.15);
                opacity: 1;
            }

            100% {
                transform: scale(1.0);
                opacity: 1;
            }
        }

        .match-alert-sub {
            font-size: clamp(14px, 3.8cqw, 18px);
            font-weight: 900;
            color: #fff8e1;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
        }

        /* Profile & Stylish Banners */
        .profile-banners-box {
            display: flex;
            flex-direction: column;
            gap: 12px;
            align-items: center;
        }

        .stylish-banner {
            width: 100%;
            border-radius: 16px;
            padding: 12px 14px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            color: #fff;
            position: relative;
            overflow: hidden;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
        }

        /* TOP 3 GOLDEN LEGENDARY BANNER */
        .banner-top3 {
            background: linear-gradient(135deg, #ff9000, #ffd700 45%, #ff7700 85%);
            border: 3px solid #fff7b8;
            box-shadow: 0 0 18px rgba(255, 215, 0, 0.6), inset 0 0 12px rgba(255, 255, 255, 0.6);
            animation: banner-glow 2.5s ease-in-out infinite alternate;
        }

        @keyframes banner-glow {
            0% {
                box-shadow: 0 0 10px rgba(255, 215, 0, 0.5), inset 0 0 8px #fff;
            }

            100% {
                box-shadow: 0 0 24px rgba(255, 230, 80, 0.95), inset 0 0 16px #fff;
            }
        }

        .banner-top3::after {
            content: "âœ¨ âœ¨";
            position: absolute;
            top: 2px;
            right: 8px;
            font-size: 14px;
            opacity: 0.85;
            animation: banner-sparkle 1.8s infinite alternate;
        }

        @keyframes banner-sparkle {
            0% {
                transform: translateY(0) scale(0.9);
                opacity: 0.5;
            }

            100% {
                transform: translateY(-3px) scale(1.15);
                opacity: 1;
            }
        }

        /* TOP 10 MASTER BANNER */
        .banner-top10 {
            background: linear-gradient(135deg, #0984e3, #00cec9 60%, #6c5ce7);
            border: 3px solid #e0f7fa;
            box-shadow: 0 0 14px rgba(0, 206, 201, 0.5), inset 0 0 8px rgba(255, 255, 255, 0.5);
        }

        .banner-normal {
            background: linear-gradient(135deg, #fdcb6e, #e17055);
            border: 2px solid #ffeaa7;
        }

        .banner-left {
            display: flex;
            align-items: center;
            gap: 10px;
            text-align: left;
        }

        .banner-icon {
            font-size: clamp(24px, 6cqw, 32px);
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
        }

        .banner-title {
            font-weight: 1000;
            font-size: clamp(12px, 3cqw, 15px);
            text-transform: uppercase;
            letter-spacing: .5px;
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
        }

        .banner-sub {
            font-size: clamp(10px, 2.2cqw, 12px);
            font-weight: 800;
            opacity: 0.95;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
        }

        /* Room Modal Controls */
        .room-actions-box {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .room-code-display {
            font-size: clamp(20px, 5cqw, 28px);
            font-weight: 1000;
            letter-spacing: 4px;
            background: #fff3dc;
            border: 2px dashed #91410f;
            border-radius: 12px;
            padding: 8px 12px;
            color: #63300b;
        }

        .room-input {
            width: 100%;
            height: clamp(40px, 6cqh, 48px);
            border-radius: 999px;
            border: 2px solid #ffda7a;
            padding: 0 18px;
            font-size: clamp(14px, 3.5cqw, 16px);
            font-weight: 800;
            text-align: center;
            text-transform: uppercase;
            box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .room-btn-primary {
            min-height: clamp(42px, 6.5cqh, 52px);
            border-radius: 999px;
            border: .4cqw solid #fff;
            background: linear-gradient(180deg, #ffd564, #ea8a19);
            box-shadow: 0 .4cqh .4cqh rgba(88, 42, 12, .38), inset 0 .25cqh .35cqh #fff7db;
            color: #69330f;
            font-size: clamp(14px, 3.5cqw, 17px);
            font-weight: 1000;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .room-btn-secondary {
            min-height: clamp(38px, 5.5cqh, 46px);
            border-radius: 999px;
            border: 2px solid #ffdc85;
            background: linear-gradient(180deg, #b8e3a0, #4f9a43);
            color: #173c1d;
            box-shadow: 0 .4cqh .4cqh rgba(36, 71, 27, .38);
            font-size: clamp(13px, 3.2cqw, 15px);
            font-weight: 900;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }

        .custom-slider-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            font-weight: 900;
            color: #5a2505;
        }

        .custom-slider-row input[type="range"] {
            flex: 1;
            accent-color: #ff9f31;
        }