        :root {
            color-scheme: light;
            font-family: "Nunito", "Trebuchet MS", "Arial Rounded MT Bold", Arial, sans-serif;
            background: #64d5f3;
            color: #63300b;
        }

        * {
            box-sizing: border-box;
            scrollbar-color: #d49b50 #fff1d8;
            scrollbar-width: thin;
        }

        *::-webkit-scrollbar {
            width: 8px;
            height: 8px;
        }

        *::-webkit-scrollbar-track {
            border-radius: 999px;
            background: rgba(255, 241, 216, .78);
        }

        *::-webkit-scrollbar-thumb {
            border: 2px solid rgba(255, 241, 216, .8);
            border-radius: 999px;
            background: linear-gradient(180deg, #edc276, #a95a20);
        }

        *::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, #ffd983, #8d3e13);
        }

        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: min(50%, 440px);
            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;
            flex: 1;
            display: grid;
            gap: .3cqh;
            text-shadow: 0 .1cqh white;
        }

        .player-name {
            min-width: 0;
            overflow: hidden;
            font-size: clamp(11px, 1.75cqh, 32px);
            font-weight: 900;
            letter-spacing: -.025em;
            line-height: 1;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .player-level {
            min-width: 0;
            overflow: hidden;
            color: #7d4117;
            font-size: clamp(10px, 1.12cqh, 21px);
            font-weight: 800;
            text-overflow: ellipsis;
            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;
        }

        .customize-button {
            position: absolute;
            z-index: 2;
            top: 16.6%;
            right: 2.2%;
            width: min(16%, 8cqh);
            height: 6.4%;
            display: grid;
            place-items: center;
            padding: 0;
            border: .5cqw solid #fff4df;
            border-radius: 25%;
            background: linear-gradient(145deg, #fff4ce, #f0c05e 58%, #d7862d);
            box-shadow: 0 .4cqh .35cqh rgba(75, 43, 17, .4), inset 0 .3cqh .4cqh white;
            color: #69330f;
            font-size: clamp(18px, 2.8cqh, 48px);
            cursor: pointer;
            transition: transform .16s ease, filter .16s ease;
        }

        .customize-button:active {
            transform: scale(.94);
            filter: brightness(.96);
        }

        .customize-button:focus-visible {
            outline: .45cqw solid white;
            outline-offset: .25cqw;
        }

        .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%;
            padding-inline: 2px;
            font-size: clamp(7px, .82cqh, 16px);
            letter-spacing: -.04em;
        }

        .friends-link {
            top: 16.5%;
            left: 2.2%;
        }

        .results-link {
            right: 2.2%;
        }

        .brand {
            position: absolute;
            top: 8.5%;
            left: 20%;
            width: 60%;
            height: 19.5%;
        }

        .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;
        }

        .player-name-with-badge {
            min-width: 0;
            max-width: 100%;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            overflow: hidden;
            vertical-align: middle;
            white-space: nowrap;
        }

        .player-name-with-badge > span:first-child {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .inline-name-badge {
            width: 22px;
            height: 22px;
            flex: 0 0 22px;
        }

        .friend-list-name,
        .friend-search-name {
            display: inline-flex;
            align-items: center;
            gap: 5px;
        }

        .friend-list-name {
            flex: 1;
        }

        .friend-search-name {
            flex: 1;
            color: inherit;
        }

        .friend-invite-picker input[type="range"] {
            width: 100%;
            margin: 6px 0 14px;
            accent-color: #82502c;
        }

        .modes-title {
            top: calc(31.7% - 20px);
        }

        .mode-cards {
            position: absolute;
            top: calc(37% - 20px);
            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,
        .customize-button:focus-visible,
        .quick-link:focus-visible {
            outline: .45cqw solid white;
            outline-offset: .25cqw;
        }

        .star-match {
            position: absolute;
            top: calc(55.8% - 20px);
            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: calc(66.5% - 20px);
        }

        .challenge-cards {
            position: absolute;
            top: calc(71.9% - 20px);
            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-screen.has-seo {
            align-content: start;
            justify-items: center;
        }

        .auth-screen.has-seo .auth-stage {
            align-self: start;
        }

        .seo-content {
            width: min(calc(100vw - 32px), 960px);
            margin: 24px auto 40px;
            padding: clamp(22px, 5vw, 48px);
            border: 2px solid rgba(255, 220, 133, .9);
            border-radius: 22px;
            background: linear-gradient(155deg, rgba(255, 249, 235, .98), rgba(247, 224, 185, .98));
            box-shadow: 0 16px 38px rgba(37, 45, 50, .26), inset 0 1px 0 #fff;
            color: #4b2b15;
            line-height: 1.65;
        }

        .seo-content h1,
        .seo-content h2,
        .seo-content p {
            margin-top: 0;
        }

        .seo-eyebrow {
            margin-bottom: 6px;
            color: #8a5018;
            font-size: 12px;
            font-weight: 1000;
            letter-spacing: .12em;
            text-transform: uppercase;
        }

        .seo-content h1 {
            margin-bottom: 12px;
            color: #5b2c0f;
            font-size: clamp(30px, 6vw, 46px);
            line-height: 1.12;
        }

        .seo-intro {
            max-width: 760px;
            margin-bottom: 16px;
            font-size: clamp(16px, 2.2vw, 19px);
        }

        .seo-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-bottom: 28px;
        }

        .seo-actions a {
            display: inline-flex;
            min-height: 44px;
            align-items: center;
            justify-content: center;
            padding: 9px 16px;
            border: 2px solid #fff0c8;
            border-radius: 11px;
            background: linear-gradient(145deg, #ffeaa6, #e99a3f 58%, #b95819);
            box-shadow: 0 3px 0 #71320d;
            color: #60300e;
            font-weight: 1000;
            text-decoration: none;
        }

        .seo-actions a:focus-visible,
        .seo-faq summary:focus-visible {
            outline: 3px solid #175a7a;
            outline-offset: 3px;
        }

        .seo-feature-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 12px;
        }

        .seo-feature-grid article {
            padding: 16px;
            border: 1px solid rgba(104, 51, 15, .22);
            border-radius: 14px;
            background: rgba(255, 255, 255, .54);
        }

        .seo-feature-grid h2,
        .seo-how-to-play h2,
        .seo-faq h2 {
            margin-bottom: 8px;
            color: #65340f;
            font-size: clamp(18px, 3vw, 22px);
            line-height: 1.25;
        }

        .seo-feature-grid p,
        .seo-how-to-play p,
        .seo-faq p {
            margin-bottom: 0;
        }

        .seo-how-to-play,
        .seo-faq {
            margin-top: 28px;
        }

        .seo-faq details {
            padding: 13px 0;
            border-bottom: 1px solid rgba(104, 51, 15, .2);
        }

        .seo-faq summary {
            color: #5b2c0f;
            font-weight: 1000;
            cursor: pointer;
        }

        .seo-faq details p {
            padding-top: 8px;
        }

        .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-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);
            text-decoration: none;
            transition: transform .18s ease, box-shadow .18s ease;
        }

        .auth-settings:hover,
        .auth-settings:focus-visible {
            transform: translateY(-2px);
            box-shadow: 0 .55cqh .45cqh rgba(75, 43, 17, .45), inset 0 .25cqh .35cqh white;
        }

        .auth-settings:focus-visible {
            outline: 3px solid #60330f;
            outline-offset: 3px;
        }

        .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: 11% 15% minmax(0, 1fr) 32%;
            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: center;
            width: 78%;
            height: 78%;
            min-width: 0;
            min-height: 0;
            object-fit: contain;
        }

        .leaderboard-avatar-wrap {
            position: relative;
            width: min(4.4cqh, 88%);
            height: min(4.4cqh, 88%);
            aspect-ratio: 1;
            place-self: center;
            margin: 0;
            transform: translateX(-3px);
        }

        .leaderboard-rank {
            width: min(5.2cqh, 78%);
            aspect-ratio: 1;
            display: grid;
            place-items: center;
            justify-self: center;
            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.4cqh, 88%);
            height: min(4.4cqh, 88%);
            aspect-ratio: 1;
            place-self: center;
            margin: 0;
            border: .3cqh solid #fff5e3;
            border-radius: 50%;
            background-color: #47baf1;
            box-shadow: 0 .2cqh .3cqh rgba(95, 55, 24, .3);
            object-fit: cover;
        }

        .leaderboard-avatar-wrap .leaderboard-avatar {
            width: 100%;
            height: 100%;
        }

        .leaderboard-row > .leaderboard-avatar {
            transform: translateX(-3px);
        }

        .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-wrap {
            min-width: 0;
            width: 100%;
            height: 70%;
            align-self: center;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 3px;
        }

        .leaderboard-score-wrap.has-badge .leaderboard-score {
            width: auto;
            flex: 1 1 0;
        }

        .leaderboard-score {
            min-width: 0;
            width: 80%;
            height: 100%;
            flex: 0 1 80%;
            min-height: 0;
            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-score-wrap > .leaderboard-score-badge {
            width: clamp(22px, 3.2cqh, 28px);
            height: clamp(22px, 3.2cqh, 28px);
            flex: 0 0 clamp(22px, 3.2cqh, 28px);
        }

        .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: 3.2%;
            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-section-label {
            margin: 4px 2% 0;
            color: #9a5a21;
            font-size: clamp(11px, 1.7cqh, 16px);
            font-weight: 1000;
            letter-spacing: .12em;
            text-transform: uppercase;
        }

        .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: clip;
            white-space: normal;
        }

        .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-room-tools {
            position: absolute;
            z-index: 4;
            top: 25%;
            left: 50%;
            width: max-content;
            max-width: min(94%, 420px);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: clamp(4px, 1.4cqw, 10px);
            padding: 3px 8px;
            border: 1px solid rgba(255, 232, 188, .48);
            border-radius: 999px;
            background: rgba(57, 30, 17, .72);
            box-shadow: inset 0 1px 2px rgba(255, 232, 188, .18), 0 2px 6px rgba(30, 16, 8, .25);
            transform: translateX(-50%);
        }

        .match-room-tool,
        .match-opponent-mic-status {
            min-width: 0;
            width: clamp(32px, 5cqh, 44px);
            height: clamp(32px, 5cqh, 44px);
            flex: none;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            border: 0;
            border-radius: 50%;
            background: transparent;
            box-shadow: none;
            color: #fff0cf;
            font-size: clamp(15px, 2.5cqw, 21px);
            font-weight: 900;
            line-height: 1;
            white-space: nowrap;
        }

        .match-room-tool {
            cursor: pointer;
        }

        .match-room-tool[aria-pressed="true"] {
            color: #b9f2a4;
        }

        .match-room-tool:hover:not(:disabled) {
            color: #ffd887;
        }

        .match-room-tool:focus-visible {
            outline: 2px solid #fff0cf;
            outline-offset: 1px;
        }

        .match-room-tool:disabled {
            cursor: not-allowed;
            color: #b9a98e;
            opacity: .48;
        }

        .match-opponent-mic-status {
            color: #b9a98e;
        }

        .match-opponent-mic-status span {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            clip-path: inset(50%);
            border: 0;
            white-space: nowrap;
        }

        .match-opponent-mic-status.is-enabled {
            color: #b9f2a4;
        }

        .match-room-tool-label {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            clip-path: inset(50%);
            border: 0;
            white-space: nowrap;
        }

        .match-room-tool-status {
            position: absolute;
            top: 100%;
            left: 50%;
            width: 100%;
            margin: 2px 0 0;
            color: #fff9e6;
            font-size: clamp(9px, 1.65cqw, 12px);
            font-weight: 800;
            text-align: center;
            text-shadow: 0 1px 3px rgba(41, 20, 6, .9);
            transform: translateX(-50%);
            pointer-events: none;
        }

        .match-side-alert,
        .match-restart-alert {
            position: absolute;
            z-index: 8;
            left: 50%;
            width: min(88%, 390px);
            padding: clamp(10px, 2.5cqw, 18px);
            border: .7cqw solid #ffdc85;
            border-radius: 14px;
            background: linear-gradient(145deg, #ffe5a7, #d98331);
            box-shadow: 0 .7cqh 0 #87370b, 0 1.2cqh 1cqh rgba(34, 18, 7, .4), inset 0 .35cqh .45cqh #fff1b8;
            color: #69330f;
            font-size: clamp(12px, 3cqw, 18px);
            font-weight: 900;
            text-align: center;
        }

        .match-side-alert {
            top: 79%;
            display: grid;
            gap: 8px;
            opacity: 0;
            transform: translate(120%, 0);
            transition: opacity .28s ease, transform .34s cubic-bezier(.2,.8,.25,1);
        }

        .match-side-alert.is-visible {
            opacity: 1;
            transform: translate(-50%, 0);
        }

        .match-side-alert-actions,
        .match-restart-alert-actions {
            display: flex;
            justify-content: center;
            gap: 8px;
        }

        .match-side-alert-action {
            min-height: 32px;
            padding: 4px 14px;
            border: 1px solid #fff0c8;
            border-radius: 999px;
            background: linear-gradient(180deg, #f5b0a5, #bf4f40);
            color: #561c19;
            font: inherit;
            font-size: .82em;
            cursor: pointer;
        }

        .match-side-alert-action.accept {
            border-color: #e8ffd9;
            background: linear-gradient(180deg, #b8e3a0, #4f9a43);
            color: #173c1d;
        }

        .match-restart-alert {
            top: 42%;
            transform: translate(-50%, -50%);
        }

        .match-restart-alert p {
            margin: 0 0 12px;
        }

        @media (max-width: 420px) {
            .match-room-tools {
                max-width: 96%;
                gap: 3px;
                padding-inline: 5px;
            }
        }

        .match-board.is-your-turn {
            border-color: #fff3a0;
            box-shadow:
                0 0 1.5cqh .45cqh rgba(255, 226, 91, .9),
                0 0 3.2cqh 1cqh rgba(255, 169, 34, .6),
                0 .9cqh 0 #9c3d0c,
                0 1.5cqh 1.2cqh rgba(70, 38, 15, .42),
                inset 0 .45cqh .55cqh #fff0a8,
                inset 0 -.5cqh .6cqh #cb5b0d;
            animation: board-turn-glow 1.8s ease-in-out infinite alternate;
        }

        .match-board.is-turn-warning {
            border-color: #ffe1de;
            box-shadow: 0 0 1.3cqh .45cqh rgba(255, 42, 34, .95),
                0 0 3cqh 1cqh rgba(255, 30, 25, .75),
                0 .9cqh 0 #8e1e17,
                0 1.5cqh 1.2cqh rgba(70, 38, 15, .42),
                inset 0 .45cqh .55cqh #ffe2dc,
                inset 0 -.5cqh .6cqh #bc281d;
            animation: board-timeout-warning .55s ease-in-out infinite alternate;
        }

        @keyframes board-timeout-warning {
            from {
                filter: brightness(.92);
                box-shadow: 0 0 .8cqh .2cqh rgba(255, 42, 34, .7),
                    0 0 2cqh .6cqh rgba(255, 30, 25, .5),
                    0 .9cqh 0 #8e1e17,
                    0 1.5cqh 1.2cqh rgba(70, 38, 15, .42),
                    inset 0 .45cqh .55cqh #ffe2dc,
                    inset 0 -.5cqh .6cqh #bc281d;
            }
            to {
                filter: brightness(1.12);
            }
        }

        @keyframes board-turn-glow {
            from {
                filter: brightness(1);
            }
            to {
                filter: brightness(1.09);
            }
        }

        .turn-glow-disabled .match-board.is-your-turn {
            animation: none;
            filter: none;
            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;
        }

        .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-right::after {
            right: auto;
            left: 10%;
        }

        .match-player.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;
            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-player-right {
            flex-direction: row-reverse;
        }

        .match-avatar-wrap {
            position: relative;
            flex: 0 0 clamp(26px, 11cqw, 44px);
            width: clamp(26px, 11cqw, 44px);
            aspect-ratio: 1;
        }

        .match-avatar {
            width: 100%;
            height: 100%;
            display: grid;
            place-items: center;
            overflow: hidden;
            border: .6cqw solid white;
            border-radius: 50%;
            background: #a7e4ff;
            box-shadow: none;
            object-fit: cover;
        }

        .match-player-left .match-avatar-wrap {
            margin-left: clamp(1px, .8cqw, 4px);
        }

        .match-player-right .match-avatar-wrap {
            margin-right: clamp(1px, .8cqw, 4px);
        }

        .match-player-info {
            min-width: 0;
            flex: 1;
            display: grid;
            gap: 5%;
            text-align: center;
        }

        .match-player-left .match-player-info {
            text-align: left;
        }

        .match-player-right .match-player-info {
            text-align: right;
        }

        .match-player-name {
            min-width: 0;
            display: flex;
            align-items: center;
            gap: 4px;
            overflow: hidden;
            color: #69330f;
            font-size: clamp(9px, 3.2cqw, 20px);
            font-weight: 900;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .match-player-name > span {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .match-player-left .match-player-name {
            justify-content: flex-start;
        }

        .match-player-right .match-player-name {
            justify-content: flex-end;
        }

        .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-left .match-score {
            justify-content: flex-start;
        }

        .match-player-right .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-turn-clock {
            position: absolute;
            z-index: 2;
            top: 31.5%;
            left: 50%;
            width: auto;
            min-width: 0;
            padding: 0;
            transform: translateX(-50%);
            color: #fff9e6;
            font-size: clamp(11px, 2.7cqw, 18px);
            font-weight: 1000;
            text-align: center;
            white-space: nowrap;
            text-shadow: 0 0 .4cqh rgba(75, 43, 13, .8);
        }

        .match-turn-clock.is-warning {
            color: #ff3028;
            text-shadow: 0 0 .35cqh #fff1e0, 0 0 .9cqh #ff3028;
            animation: match-countdown-pulse .65s ease-in-out infinite alternate;
        }

        @keyframes match-countdown-pulse {
            from {
                opacity: .58;
                transform: translateX(-50%) scale(.94);
            }
            to {
                opacity: 1;
                transform: translateX(-50%) scale(1.08);
            }
        }

        .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(5, minmax(0, 1fr));
            grid-template-rows: repeat(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(22px, 12cqw, 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 {
            position: relative;
            z-index: 1;
            background: linear-gradient(145deg, #fff2a1, #ffc64e);
            box-shadow: inset 0 0 0 .6cqw #fff9d9, 0 0 1.2cqh #fff7b2, 0 0 0 .25cqw #fff0a8;
            animation: winning-cell-reveal .38s cubic-bezier(.2,.8,.25,1) both;
            animation-delay: calc(var(--winning-order, 0) * 170ms);
        }

        @keyframes winning-cell-reveal {
            0% {
                opacity: .35;
                filter: brightness(1.7);
                transform: scale(.72);
            }
            70% {
                opacity: 1;
                filter: brightness(1.35);
                transform: scale(1.1);
            }
            100% {
                opacity: 1;
                filter: brightness(1.08);
                transform: scale(1.02);
            }
        }

        .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;
        }

        .match-grid {
            --cell-count: 5;
        }

        .match-cell {
            font-size: clamp(18px, calc(44cqw / var(--cell-count)), 72px);
        }

        .extra-screen {
            position: fixed;
            z-index: 20;
            inset: 0;
            display: grid;
            place-items: start center;
            overflow-x: hidden;
            overflow-y: auto;
            padding: 2vh 0;
            background: #28170e url("Assets/background.webp") center / cover fixed;
        }

        .extra-screen[hidden],
        .wood-overlay[hidden] {
            display: none;
        }

        .extra-stage {
            width: min(100vw, 44.444svh, 768px);
            min-height: min(100svh, 1728px);
            display: flex;
            flex-direction: column;
            gap: clamp(14px, 2.4vh, 24px);
            padding: clamp(20px, 5vw, 38px);
            overflow: auto;
            border: 1px solid rgba(255, 239, 191, .45);
            background: linear-gradient(180deg, rgba(91, 42, 14, .88), rgba(55, 27, 11, .96));
            color: #fff3d4;
            container-type: inline-size;
        }

        .extra-header {
            display: grid;
            grid-template-columns: 44px 1fr 44px;
            align-items: center;
            gap: 12px;
        }

        .extra-header h1 {
            margin: 0;
            color: #ffdf91;
            font-size: clamp(22px, 7cqw, 34px);
            text-align: center;
            text-shadow: 0 2px 3px #371506;
        }

        .extra-back {
            width: 42px;
            height: 42px;
            border: 2px solid #fff0c8;
            border-radius: 14px;
            background: linear-gradient(145deg, #fff8e9, #efbd7c);
            color: #69330f;
            font-size: 18px;
            cursor: pointer;
        }

        .extra-content {
            display: grid;
            gap: 14px;
            align-content: start;
        }

        .friends-search-panel,
        .friends-section {
            width: min(100%, 460px);
            margin-inline: auto;
            padding: clamp(16px, 4vw, 22px);
            border: 2px solid rgba(255, 229, 166, .75);
            border-radius: 22px;
            background: linear-gradient(150deg, #ffe1a0, #e99a3f 58%, #b95819);
            box-shadow: 0 6px 0 #87370b, inset 0 3px 4px #fff3c9;
            color: #69330f;
        }

        .friends-search-panel {
            aspect-ratio: 1;
            max-height: min(72svh, 620px);
            display: grid;
            grid-template-rows: auto auto minmax(0, 1fr);
            gap: 12px;
        }

        .friends-search-panel h2,
        .friends-section h2 {
            margin: 0;
            color: #69330f;
            font-size: clamp(19px, 5cqw, 26px);
            text-align: center;
            text-shadow: 0 1px #fff2c7;
        }

        .friends-search-hint {
            margin: -5px 0 0;
            color: #75451f;
            font-size: 13px;
            font-weight: 800;
            text-align: center;
        }

        .friends-search-input {
            width: 100%;
            min-height: 48px;
            padding: 0 16px;
            border: 2px solid #fff0c8;
            border-radius: 15px;
            outline-color: #8e4514;
            background: #fffaf0;
            color: #49270e;
            font: 800 15px "Nunito", Arial, sans-serif;
            box-shadow: inset 0 2px 4px rgba(87, 47, 15, .15);
        }

        .friends-search-results {
            min-height: 0;
            display: grid;
            grid-auto-rows: min-content;
            align-content: start;
            gap: 9px;
            overflow-y: auto;
            padding: 2px 3px 5px;
            overscroll-behavior: contain;
        }

        .friend-search-result {
            width: 100%;
            min-height: 58px;
            display: flex;
            align-items: center;
            gap: 13px;
            padding: 7px 13px;
            border: 2px solid rgba(255, 248, 226, .9);
            border-radius: 999px;
            background: linear-gradient(110deg, #fff8e9, #f9d9a8);
            box-shadow: 0 3px 5px rgba(95, 48, 10, .2), inset 0 2px 3px white;
            color: #62330f;
            font: 900 15px "Nunito", Arial, sans-serif;
            text-align: left;
            cursor: pointer;
        }

        .friend-search-result:hover,
        .friend-list-card:hover {
            filter: brightness(1.04);
        }

        .friend-search-result img,
        .friend-list-avatar {
            width: 42px;
            height: 42px;
            flex: 0 0 42px;
            border: 3px solid #fff8e9;
            border-radius: 50%;
            background: #ffd28b;
            box-shadow: 0 0 0 2px #c5792a, 0 2px 4px rgba(73, 37, 10, .32);
            object-fit: cover;
        }

        .friends-list-stack {
            display: grid;
            gap: 9px;
        }

        .friend-list-card {
            min-width: 0;
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            align-items: center;
            gap: 12px;
            padding: 10px 0;
            border-bottom: 1px solid rgba(255, 232, 187, .26);
            color: #fff3d4;
        }

        .friend-list-profile {
            min-width: 0;
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 0;
            border: 0;
            background: transparent;
            color: inherit;
            font: inherit;
            text-align: left;
            cursor: pointer;
        }

        .friend-list-profile:focus-visible {
            outline: 2px solid #fff3d4;
            outline-offset: 3px;
            border-radius: 8px;
        }

        .friend-list-name {
            min-width: 0;
            overflow: hidden;
            color: inherit;
            font-size: 15px;
            font-weight: 1000;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .friend-list-actions {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: flex-end;
            gap: 6px;
        }

        .friend-action {
            min-height: 34px;
            padding: 5px 10px;
            border: 1px solid #a8581d;
            border-radius: 11px;
            background: linear-gradient(145deg, #fff4d8, #eeb369);
            color: #62330f;
            font: 900 12px "Nunito", Arial, sans-serif;
            cursor: pointer;
        }

        .friend-action.accept {
            border-color: #276445;
            background: linear-gradient(145deg, #efffe9, #9bd58c);
            color: #214e2d;
        }

        .friends-empty,
        .friends-status {
            margin: 0;
            color: #75451f;
            font-size: 13px;
            font-weight: 800;
            text-align: center;
        }

        .friend-profile-overlay {
            z-index: 60;
            padding: 18px;
        }

        .friend-profile-dialog {
            position: relative;
            width: min(100%, 430px, 82svh);
            aspect-ratio: 1;
            display: grid;
            grid-template-rows: 34% 1fr;
            overflow: hidden;
            border: 4px solid #ffdc85;
            border-radius: 27px;
            background: linear-gradient(150deg, #ffe2a3, #e99a3f 58%, #b95819);
            box-shadow: 0 9px 0 #87370b, 0 18px 26px rgba(34, 18, 7, .45), inset 0 4px 6px #fff1b8;
            color: #69330f;
        }

        .friend-profile-banner {
            border-bottom: 4px solid #fff0c8;
            background: linear-gradient(135deg, #9b6841, #edb568 55%, #8a451b);
        }

        .friend-profile-banner[data-banner="forest"] {
            background: linear-gradient(135deg, #173b28, #559251 52%, #152e21);
        }

        .friend-profile-banner[data-banner="royal"] {
            background: linear-gradient(135deg, #32235c, #8965c9 52%, #281b49);
        }

        .friend-profile-banner[data-banner="legendary"] {
            background: linear-gradient(135deg, #271d4e, #8b3caa 48%, #f0ad3b);
        }

        .friend-profile-body {
            position: relative;
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            grid-template-rows: auto auto auto 1fr;
            align-content: start;
            align-items: center;
            gap: 4px 10px;
            padding: 17px clamp(14px, 5vw, 24px) 14px;
        }

        .friend-profile-avatar {
            position: absolute;
            top: -48px;
            left: 22px;
            width: 96px;
            height: 96px;
            border: 5px solid #fff5dc;
            border-radius: 50%;
            background: #b7e5f4;
            box-shadow: 0 3px 9px rgba(61, 34, 11, .38);
            object-fit: cover;
        }

        .friend-profile-body h2 {
            grid-column: 1;
            margin: 49px 0 0;
            overflow: hidden;
            color: #60300f;
            font-size: clamp(19px, 5.5vw, 27px);
            font-weight: 1000;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .friend-profile-level,
        .friend-profile-id {
            grid-column: 1 / -1;
            margin: 0;
            font-size: 13px;
            font-weight: 900;
        }

        .friend-profile-level {
            grid-column: 1;
            grid-row: 2;
        }

        .friend-profile-id {
            grid-row: 3;
            overflow-wrap: anywhere;
            color: #70431d;
            font-size: 10px;
        }

        .friend-profile-actions {
            grid-column: 2;
            grid-row: 1 / 4;
            display: flex;
            flex-direction: column;
            justify-content: center;
            gap: 9px;
            align-self: center;
        }

        .friend-profile-actions .friend-action {
            min-height: 42px;
            width: clamp(92px, 27vw, 126px);
            padding: 6px 9px;
            font-size: clamp(11px, 3vw, 14px);
        }

        .friend-profile-status {
            grid-column: 1 / -1;
            grid-row: 4;
            min-height: 18px;
            margin: 0;
            color: #69330f;
            font-size: 12px;
            font-weight: 900;
            text-align: center;
        }

        .friend-profile-close {
            z-index: 2;
        }

        .leaderboard-row[data-player-id] {
            cursor: pointer;
        }

        .leaderboard-row[data-player-id]:focus-visible {
            outline: .5cqw solid #0879ed;
            outline-offset: .25cqw;
        }

        .match-avatar.is-player-profile {
            cursor: pointer;
            pointer-events: auto;
        }

        .match-avatar.is-player-profile:focus-visible {
            outline: .45cqw solid white;
            outline-offset: .25cqw;
        }

        .match-board.is-turn-warning .match-grid {
            box-shadow: inset 0 0 1cqh .2cqh rgba(255, 49, 39, .75);
        }

        .reduce-motion .match-board.is-turn-warning {
            animation: none;
            filter: brightness(1.08);
        }

        .reduce-motion .match-turn-clock.is-warning {
            animation: none;
        }

        .reduce-motion .match-side-alert {
            transition: none;
        }

        .admin-status {
            margin: 0;
            padding: 10px 14px;
            border: 1px solid rgba(255, 220, 133, .7);
            border-radius: 12px;
            background: rgba(91, 42, 14, .78);
            color: #fff3d4;
            font-weight: 800;
        }

        .admin-status.is-error {
            border-color: #ff9a79;
            color: #ffe0d3;
        }

        .admin-toolbar {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            align-items: center;
            gap: 12px;
        }

        .admin-tabs {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 8px;
        }

        .admin-tabs button,
        .admin-player-row {
            min-width: 0;
            border: 2px solid #ffdc85;
            border-radius: 12px;
            background: linear-gradient(145deg, #f8d48c, #c5742d);
            color: #63300b;
            font: inherit;
            font-weight: 900;
            cursor: pointer;
        }

        .admin-tabs button {
            min-height: 44px;
            padding: 8px;
        }

        .admin-tabs button[aria-selected="true"],
        .admin-player-row.is-selected {
            background: linear-gradient(145deg, #fff1b8, #e99a3f);
            box-shadow: inset 0 0 0 2px rgba(111, 54, 17, .24);
        }

        .admin-pane {
            display: grid;
            gap: 14px;
            min-width: 0;
        }

        .admin-pane[hidden],
        .admin-editor[hidden],
        .admin-certificate-editor[hidden] {
            display: none;
        }

        .admin-filter-panel {
            display: grid;
            gap: 12px;
            padding: 14px;
            border: 2px solid #ffdc85;
            border-radius: 16px;
            background: linear-gradient(145deg, #ffd77d, #e99a3f 58%, #b95819);
            box-shadow: 0 5px 0 #87370b, inset 0 2px 3px #fff1b8;
            color: #69330f;
        }

        .admin-filter-panel h2 {
            margin: 0;
            font-size: 17px;
        }

        .admin-filters {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 10px;
        }

        .admin-filters label,
        .admin-user-search {
            display: grid;
            gap: 6px;
            min-width: 0;
            color: #69330f;
            font-size: 12px;
            font-weight: 1000;
        }

        .admin-filters select,
        .admin-user-search select {
            width: 100%;
            min-width: 0;
            min-height: 42px;
            padding: 9px 11px;
            border: 2px solid #e8b866;
            border-radius: 10px;
            background: #fff8e9;
            color: #4b260e;
            font: inherit;
            font-weight: 800;
        }

        .admin-user-info {
            display: grid;
            gap: 4px;
            padding: 10px 12px;
            border: 1px solid rgba(104, 51, 15, .35);
            border-radius: 10px;
            background: rgba(255, 248, 233, .75);
            overflow-wrap: anywhere;
        }

        .admin-user-info[hidden] {
            display: none;
        }

        .admin-user-info span,
        .admin-user-info small {
            font-size: 12px;
            line-height: 1.4;
        }

        .admin-search {
            display: grid;
            gap: 7px;
            color: #fff0c8;
            font-size: 13px;
            font-weight: 900;
        }

        .admin-search > div {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            gap: 8px;
        }

        .admin-search input,
        .admin-editor input,
        .admin-editor select {
            width: 100%;
            min-width: 0;
            min-height: 42px;
            padding: 9px 11px;
            border: 2px solid #e8b866;
            border-radius: 10px;
            background: #fff8e9;
            color: #4b260e;
            font: inherit;
            font-weight: 800;
        }

        .admin-layout {
            display: grid;
            grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
            align-items: start;
            gap: 14px;
        }

        .admin-directory {
            display: grid;
            gap: 10px;
            min-width: 0;
            padding: 14px;
            border: 2px solid #ffdc85;
            border-radius: 16px;
            background: rgba(83, 39, 13, .78);
        }

        .admin-directory h2,
        .admin-editor h2 {
            margin: 0;
            color: #ffdf91;
            font-size: clamp(17px, 4.5cqw, 23px);
        }

        .admin-record-list {
            display: grid;
            gap: 10px;
            min-width: 0;
            max-height: 58vh;
            overflow: auto;
            overscroll-behavior: contain;
        }

        .admin-player-row {
            display: grid;
            gap: 4px;
            padding: 11px;
            text-align: left;
        }

        .admin-player-row span,
        .admin-player-row small,
        .admin-editor-id,
        .admin-help {
            overflow-wrap: anywhere;
            font-size: 12px;
            line-height: 1.4;
        }

        .admin-player-row small {
            color: #713e1d;
        }

        .admin-editor {
            min-width: 0;
            max-height: 76vh;
            overflow: auto;
            overscroll-behavior: contain;
        }

        .admin-editor-id,
        .admin-help {
            margin: 0;
        }

        .admin-field-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
        }

        .admin-field-grid label {
            display: grid;
            gap: 5px;
            min-width: 0;
            color: #6c3815;
            font-size: 12px;
            font-weight: 1000;
        }

        .admin-grants {
            min-width: 0;
            margin: 0;
            padding: 12px;
            border: 2px solid rgba(124, 66, 21, .5);
            border-radius: 12px;
        }

        .admin-grants legend {
            padding: 0 6px;
            font-weight: 1000;
        }

        .admin-grants p {
            margin: 0 0 9px;
            font-size: 11px;
            line-height: 1.4;
        }

        .admin-grant-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 7px;
        }

        .admin-grant-option {
            display: flex;
            align-items: center;
            gap: 7px;
            min-width: 0;
            padding: 7px;
            border: 1px solid rgba(104, 51, 15, .3);
            border-radius: 8px;
            font-size: 11px;
            font-weight: 900;
            overflow-wrap: anywhere;
        }

        .admin-grant-option input {
            width: 17px;
            min-width: 17px;
            height: 17px;
            min-height: 17px;
            margin: 0;
            accent-color: #81400f;
        }

        .admin-grant-option span {
            flex: 1;
            min-width: 0;
        }

        .admin-grant-option select {
            width: auto;
            min-width: 105px;
            min-height: 36px;
            padding: 5px 7px;
            border: 1px solid rgba(104, 51, 15, .45);
            border-radius: 7px;
            background: #fff8e9;
            color: #4b260e;
            font: inherit;
        }

        .admin-grant-option small {
            margin-left: auto;
            color: #704015;
        }

        .admin-account-control,
        .admin-record-actions {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 8px;
        }

        .admin-record-actions > a.wood-secondary {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            text-decoration: none;
        }

        .admin-account-control {
            justify-content: space-between;
            padding: 9px;
            border: 1px solid rgba(255, 220, 133, .45);
            border-radius: 10px;
            color: #fff3d4;
        }

        .admin-certificate-editor {
            display: grid;
            gap: 9px;
            padding: 12px;
            border: 1px solid rgba(104, 51, 15, .35);
            border-radius: 10px;
            background: rgba(255, 248, 233, .55);
        }

        .admin-certificate-editor label {
            display: grid;
            gap: 5px;
            font-size: 12px;
            font-weight: 900;
        }

        .admin-certificate-editor input {
            width: 100%;
            min-width: 0;
            min-height: 40px;
            padding: 8px 10px;
            border: 1px solid #e8b866;
            border-radius: 8px;
            background: #fff8e9;
            color: #4b260e;
            font: inherit;
        }

        .admin-certificate-status.is-suspended {
            color: #8f1400;
        }

        .admin-certificate-status.is-active {
            color: #20551d;
        }

        .admin-pagination {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            flex-wrap: wrap;
            color: #fff3d4;
            font-size: 12px;
            font-weight: 900;
        }

        .admin-pagination button:disabled {
            opacity: .48;
            cursor: not-allowed;
        }

        .admin-record {
            overflow-wrap: anywhere;
        }

        #admin-screen .extra-stage {
            overflow: visible;
        }

        #admin-screen .admin-record-list,
        #admin-screen .admin-editor {
            max-height: none;
            overflow: visible;
            overscroll-behavior: auto;
        }

        .admin-record strong {
            font-size: clamp(14px, 4cqw, 19px);
        }

        .admin-record span,
        .admin-record small {
            line-height: 1.4;
        }

        .wood-card {
            display: grid;
            gap: 10px;
            padding: clamp(16px, 4cqw, 24px);
            border: 3px solid #ffdc85;
            border-radius: 20px;
            background: linear-gradient(145deg, #ffd77d, #e99a3f 58%, #b95819);
            box-shadow: 0 7px 0 #87370b, inset 0 3px 4px #fff1b8;
            color: #69330f;
            font-weight: 900;
        }

        .extra-empty,
        .extra-loading {
            margin: 0;
            padding: 22px 16px;
            border: 2px solid #ffdc85;
            border-radius: 18px;
            background: rgba(116, 55, 17, .8);
            color: #fff3d4;
            font-weight: 800;
            line-height: 1.45;
            text-align: center;
        }

        .result-history-card {
            grid-template-columns: 1fr auto;
            align-items: center;
        }

        .result-history-card strong {
            font-size: clamp(15px, 4.5cqw, 20px);
        }

        .result-history-card span {
            font-size: clamp(11px, 3.2cqw, 14px);
        }

        .result-history-card .outcome-win {
            color: #125d22;
        }

        .result-history-card .outcome-loss {
            color: #7e2118;
        }

        .result-history-card .outcome-draw {
            color: #514113;
        }

        .certificate-actions {
            display: flex;
            grid-column: 1 / -1;
            flex-wrap: wrap;
            gap: 8px;
        }

        .certificate-actions[hidden] {
            display: none;
        }

        .result-certificate-actions {
            justify-content: center;
        }

        .legendary-award {
            width: 100%;
            display: grid;
            grid-template-columns: auto minmax(0, 1fr);
            align-items: center;
            gap: 10px 12px;
            padding: 14px;
            border: 2px solid #d59a3d;
            border-radius: 16px;
            background:
                radial-gradient(circle at 0 0, rgba(255, 229, 153, .95), transparent 58%),
                linear-gradient(145deg, #fff4d2, #f1d29a);
            box-shadow: inset 0 1px 0 #fff, 0 5px 12px rgba(89, 46, 12, .14);
            text-align: left;
        }

        .legendary-award[hidden] {
            display: none;
        }

        .legendary-award-icon {
            width: 44px;
            height: 44px;
            display: grid;
            place-items: center;
            border: 2px solid #f6d88c;
            border-radius: 50%;
            background: linear-gradient(145deg, #eab849, #95521b);
            box-shadow: inset 0 0 0 2px #b97925, 0 3px 7px rgba(76, 35, 7, .22);
            color: #fff4d0;
            font-size: 19px;
        }

        .legendary-award-copy {
            min-width: 0;
            display: grid;
            gap: 4px;
        }

        .legendary-award-label {
            color: #8a5018;
            font-size: 10px;
            font-weight: 1000;
            letter-spacing: .12em;
        }

        .legendary-award-copy > strong {
            color: #55290c;
            font-size: clamp(14px, 4cqw, 18px);
            line-height: 1.2;
        }

        .legendary-award-copy > p {
            margin: 0;
            color: #754a27;
            font-size: 12px;
            font-weight: 800;
            line-height: 1.4;
        }

        .legendary-award .certificate-actions {
            grid-column: 1 / -1;
            justify-content: center;
            padding-top: 8px;
            border-top: 1px solid rgba(133, 78, 20, .2);
        }

        .certificate-action {
            display: inline-flex;
            min-height: 38px;
            align-items: center;
            justify-content: center;
            padding: 8px 13px;
            border: 2px solid #fff0c8;
            border-radius: 10px;
            background: linear-gradient(145deg, #ffeaa6, #e99a3f 58%, #b95819);
            box-shadow: 0 3px 0 #71320d;
            color: #60300e;
            font: 900 12px "Trebuchet MS", Arial, sans-serif;
            text-align: center;
            text-decoration: none;
        }

        .certificate-download-status {
            align-self: center;
            color: #60300e;
            font-size: 11px;
            font-weight: 800;
        }

        @media (max-width: 640px) {
            .admin-layout {
                grid-template-columns: minmax(0, 1fr);
            }

            .admin-field-grid {
                grid-template-columns: minmax(0, 1fr);
            }

            .admin-filters {
                grid-template-columns: minmax(0, 1fr);
            }

        }

        @media (max-width: 700px) {
            .seo-feature-grid {
                grid-template-columns: minmax(0, 1fr);
            }
        }

        @media (max-width: 899px) {
            #admin-screen .extra-stage {
                width: calc(100vw - 24px);
                min-height: calc(100svh - 24px);
                padding: clamp(16px, 4vw, 28px);
                border-radius: 16px;
            }

            .admin-toolbar {
                grid-template-columns: minmax(0, 1fr);
            }

            .admin-layout,
            .admin-pane[data-admin-pane="matches"] {
                grid-template-columns: minmax(0, 1fr);
            }
        }

        @media (min-width: 900px) {
            #admin-screen .extra-stage {
                width: min(calc(100vw - 64px), 1680px);
                min-height: calc(100svh - 4vh);
                border-radius: 20px;
            }

            #admin-screen .extra-header h1 {
                font-size: 34px;
                text-align: left;
            }

            #admin-screen .extra-content {
                gap: 20px;
            }

            .admin-tabs {
                grid-template-columns: repeat(4, minmax(120px, 210px));
                justify-content: start;
                gap: 10px;
            }

            .admin-toolbar > #admin-refresh {
                min-width: 190px;
                white-space: nowrap;
            }

            .admin-layout {
                grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr);
                gap: 20px;
            }

            .admin-pane[data-admin-pane="matches"] {
                grid-template-columns: minmax(230px, .65fr) minmax(0, 1.35fr);
                align-items: start;
                gap: 18px;
            }

            .admin-pane[data-admin-pane="matches"] > .admin-filter-panel {
                grid-column: 2;
                grid-row: 1;
                grid-template-columns: repeat(4, minmax(0, 1fr));
                align-items: end;
            }

            .admin-pane[data-admin-pane="matches"] > .admin-filter-panel h2 {
                grid-column: 1 / -1;
            }

            .admin-pane[data-admin-pane="matches"] > .admin-filter-panel .admin-filters {
                grid-column: 1 / 4;
            }

            .admin-pane[data-admin-pane="matches"] > .admin-filter-panel .admin-user-search {
                grid-column: 4;
            }

            .admin-pane[data-admin-pane="matches"] > .admin-filter-panel .admin-user-info {
                grid-column: 1 / -1;
            }

            .admin-pane[data-admin-pane="matches"] > .admin-search {
                grid-column: 1;
                align-self: start;
            }

            .admin-pane[data-admin-pane="matches"] > #admin-match-list {
                grid-column: 1 / -1;
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 14px;
            }
        }

        @media (min-width: 1500px) {
            .admin-pane[data-admin-pane="matches"] > #admin-match-list {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }
        }

        .profile-card {
            display: grid;
            grid-template-columns: minmax(0, 1fr);
            gap: clamp(22px, 5.5cqw, 28px);
            margin-bottom: clamp(24px, 6vh, 40px);
            padding: clamp(16px, 4.5cqw, 22px);
            padding-bottom: clamp(24px, 6cqw, 32px);
            border: 1px solid rgba(255, 239, 199, .7);
            border-radius: 22px;
            background: linear-gradient(160deg, rgba(255, 244, 220, .98), rgba(246, 220, 178, .98));
            box-shadow: 0 12px 28px rgba(30, 13, 5, .3), inset 0 1px 2px #fff;
            color: #61300f;
            text-align: left;
        }

        .profile-hero {
            position: relative;
            display: grid;
            gap: 0;
            padding-bottom: 2px;
        }

        .profile-card .profile-banner-preview {
            width: 100%;
            min-height: clamp(88px, 23cqw, 120px);
            display: flex;
            align-items: flex-start;
            justify-content: flex-end;
            padding: 11px 12px;
            overflow: hidden;
            border: 2px solid rgba(255, 242, 210, .9);
            border-radius: 17px;
            box-shadow: inset 0 0 20px rgba(255, 237, 177, .2);
            font: inherit;
            text-align: left;
            cursor: pointer;
        }

        .profile-card .profile-banner-preview:focus-visible,
        .profile-avatar-button:focus-visible {
            outline: 3px solid #fff;
            outline-offset: 3px;
        }

        .profile-banner-title {
            padding: 6px 11px;
            border: 1px solid rgba(255, 246, 220, .6);
            border-radius: 999px;
            background: rgba(54, 27, 11, .38);
            color: #fff5d8;
            font-size: clamp(10px, 3cqw, 13px);
            font-weight: 1000;
            text-shadow: 0 1px 3px rgba(45, 20, 7, .8);
        }

        .profile-identity {
            position: relative;
            display: flex;
            align-items: flex-start;
            gap: 12px;
            margin-top: -25px;
            padding: 0 8px;
        }

        .profile-avatar-button {
            flex: 0 0 clamp(68px, 19cqw, 82px);
            width: clamp(68px, 19cqw, 82px);
            aspect-ratio: 1;
            margin: 0;
            padding: 0;
            overflow: hidden;
            border: 0;
            border-radius: 50%;
            background: transparent;
            cursor: pointer;
        }

        .profile-card .profile-avatar {
            width: 100%;
            height: 100%;
            display: block;
            margin: 0;
            border: 3px solid #fff7e5;
            border-radius: 50%;
            background: #75431f;
            box-shadow: 0 4px 12px rgba(50, 23, 8, .3);
            object-fit: cover;
        }

        .profile-name-block {
            min-width: 0;
            flex: 1;
            display: grid;
            justify-items: start;
            gap: 5px;
            padding-top: 30px;
        }

        .profile-identity.has-great-badge .profile-name-block {
            padding-right: 40px;
        }

        .profile-great-winner-badge {
            width: 58px;
            height: 58px;
            flex: 0 0 58px;
            position: absolute;
            top: 50%;
            right: 8px;
            transform: translateY(-50%);
        }

        .profile-card h2 {
            max-width: 100%;
            overflow: hidden;
            margin: 0;
            color: #51270f;
            font-size: clamp(18px, 5.2cqw, 25px);
            font-weight: 1000;
            line-height: 1.05;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .profile-level {
            color: #754015;
            font-size: 13px;
            font-weight: 1000;
        }

        .profile-phone,
        .profile-user-id {
            color: #754015;
            font-size: 12px;
            font-weight: 800;
        }

        .profile-rank-chip {
            min-width: 0;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 5px 9px;
            border: 1px solid rgba(166, 112, 43, .25);
            border-radius: 999px;
            background: #f5e4bd;
            color: #69330f;
            font-size: 10px;
            font-weight: 900;
        }

        .certificate-action:hover,
        .certificate-action:focus-visible {
            filter: brightness(1.05);
            transform: translateY(-1px);
        }

        .certificate-action:focus-visible {
            outline: 3px solid #754015;
            outline-offset: 3px;
        }

        .profile-rank-chip > span {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .profile-level-card,
        .profile-stat {
            display: grid;
            gap: 10px;
            padding: 14px 15px;
            border: 1px solid rgba(166, 112, 43, .18);
            border-radius: 15px;
            background: rgba(255, 255, 255, .43);
            box-shadow: inset 0 1px 1px rgba(255,255,255,.8);
        }

        .profile-level-card > div:first-child,
        .profile-record > div:first-child {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 8px;
        }

        .profile-level-card strong,
        .profile-record strong {
            color: #60300f;
            font-size: 15px;
            font-weight: 1000;
        }

        .profile-level-card span,
        .profile-record span {
            color: #89552c;
            font-size: 11px;
            font-weight: 800;
            line-height: 1.4;
        }

        .profile-progress {
            height: 10px;
            overflow: hidden;
            border: 1px solid #ad6b30;
            border-radius: 999px;
            background: #e7c39a;
            box-shadow: inset 0 2px 3px rgba(83, 42, 15, .25);
        }

        .profile-progress > span {
            height: 100%;
            display: block;
            border-radius: inherit;
            background: linear-gradient(90deg, #48bd6c, #17874b);
            box-shadow: 0 0 8px rgba(41, 154, 76, .55);
        }

        .profile-stats {
            width: 100%;
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
        }

        .profile-stat {
            min-width: 0;
            min-height: 64px;
            display: grid;
            grid-template-columns: auto 1fr;
            align-items: center;
            column-gap: 8px;
            row-gap: 3px;
            padding: 11px 12px;
            border: 1px solid rgba(166, 112, 43, .18);
            border-radius: 15px;
            background: rgba(255, 255, 255, .52);
        }

        .profile-stat i {
            grid-row: span 2;
            color: #a45b19;
            font-size: 17px;
        }

        .profile-stat b {
            color: #582b10;
            font-size: clamp(17px, 5cqw, 22px);
            line-height: 1;
        }

        .profile-stat span {
            color: #89552c;
            font-size: 11px;
            font-weight: 900;
            line-height: 1.15;
        }

        .profile-record {
            padding: 10px 2px 0;
            border-top: 1px solid rgba(110, 67, 25, .16);
            color: #60300f;
        }

        .profile-record strong {
            font-size: 13px;
        }

        .profile-record > div:first-child > span {
            text-align: right;
        }

        .profile-actions {
            display: grid;
            gap: 9px;
        }

        .profile-action {
            min-width: 0;
            min-height: 48px;
            display: grid;
            grid-template-columns: 32px minmax(0, 1fr) 18px;
            align-items: center;
            gap: 8px;
            padding: 8px 12px;
            border: 1px solid rgba(166, 112, 43, .2);
            border-radius: 13px;
            background: rgba(255, 255, 255, .58);
            color: #66330f;
            font-size: 13px;
            font-weight: 900;
            text-align: left;
            cursor: pointer;
        }

        .profile-action > i:first-child {
            color: #a45b19;
            font-size: 17px;
            text-align: center;
        }

        .profile-action > i:last-child {
            font-size: 11px;
        }

        .profile-card p {
            margin: 0;
        }

        .wood-primary,
        .wood-secondary,
        .wood-danger {
            min-height: 46px;
            padding: 10px 16px;
            border: 2px solid #fff0c8;
            border-radius: 999px;
            background: linear-gradient(180deg, #ffe2a1, #d98331);
            box-shadow: 0 4px 5px rgba(88, 42, 12, .32), inset 0 3px 4px #fff7db;
            color: #69330f;
            font: inherit;
            font-weight: 1000;
            cursor: pointer;
        }

        .wood-primary:disabled,
        .wood-secondary:disabled {
            opacity: .6;
            cursor: default;
        }

        .wood-secondary {
            border-color: #ffe1da;
            background: linear-gradient(180deg, #f5b0a5, #bf4f40);
            color: #561c19;
        }

        .wood-danger {
            border-color: #ffe1da;
            background: linear-gradient(180deg, #f5b0a5, #bf4f40);
            color: #561c19;
        }

        /* ═══════════════════════════════════════════════════════
           GAMING PROFILE PAGE  (profile-page-screen scope)
           ═══════════════════════════════════════════════════════ */
        #profile-screen.profile-page-screen .extra-stage {
            width: 100vw;
            max-width: 100vw;
            padding: 0;
            border-radius: 0;
            background: #07080f;
        }

        #profile-screen.profile-page-screen .extra-content {
            padding: 0;
            display: flex;
            flex-direction: column;
        }

        .profile-gaming-card {
            display: flex;
            flex-direction: column;
            gap: 0;
            margin: 0;
            padding: 0;
            border: 0;
            border-radius: 0;
            background: #07080f;
            box-shadow: none;
            color: #e8eaf6;
            text-align: left;
        }

        /* ── Hero Banner ── */
        .profile-hero-gaming {
            position: relative;
            display: flex;
            flex-direction: column;
        }

        .profile-banner-gaming {
            position: relative;
            width: 100%;
            min-height: 180px;
            display: flex;
            align-items: flex-start;
            justify-content: flex-end;
            padding: 14px 16px;
            border: 0;
            border-radius: 0;
            background: linear-gradient(120deg, #78411c, #df9237, #78411c);
            cursor: pointer;
            font: inherit;
            overflow: hidden;
            transition: filter .2s;
        }

        .profile-banner-gaming::after {
            content: "";
            position: absolute;
            inset: 0;
            background:
                linear-gradient(180deg, transparent 55%, rgba(7, 8, 15, .92) 100%),
                repeating-linear-gradient(135deg, transparent 0 20px, rgba(255,255,255,.04) 21px 22px);
            pointer-events: none;
        }

        .profile-banner-gaming:hover { filter: brightness(1.08); }

        .profile-banner-badge {
            position: relative;
            z-index: 2;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 13px;
            border: 1px solid rgba(255, 248, 229, .45);
            border-radius: 999px;
            background: rgba(10, 12, 24, .58);
            color: #fff9ee;
            font-size: 11px;
            font-weight: 900;
            letter-spacing: .06em;
            text-transform: uppercase;
            backdrop-filter: blur(6px);
        }

        .profile-banner-title {
            position: absolute;
            bottom: 14px;
            left: 16px;
            z-index: 2;
            padding: 5px 11px;
            border: 1px solid rgba(255, 246, 220, .4);
            border-radius: 999px;
            background: rgba(7, 8, 15, .55);
            color: #fff5d8;
            font-size: 11px;
            font-weight: 900;
            letter-spacing: .07em;
            text-shadow: 0 1px 3px rgba(0,0,0,.8);
            backdrop-filter: blur(5px);
        }

        /* ── Identity Block ── */
        .profile-identity-gaming {
            display: flex;
            align-items: flex-end;
            gap: 16px;
            padding: 0 20px 20px;
            margin-top: -50px;
            position: relative;
            z-index: 3;
        }

        .profile-avatar-gaming {
            position: relative;
            flex: 0 0 auto;
            width: clamp(80px, 22vw, 108px);
            aspect-ratio: 1;
            padding: 0;
            border: 0;
            border-radius: 50%;
            background: transparent;
            cursor: pointer;
        }

        .profile-avatar-gaming .profile-avatar {
            width: 100%;
            height: 100%;
            border: 3px solid #3d4fff;
            border-radius: 50%;
            object-fit: cover;
            background: #1a1d2e;
            box-shadow: 0 0 0 2px #07080f, 0 0 20px rgba(61, 79, 255, .5);
        }

        .avatar-edit-chip {
            position: absolute;
            bottom: 2px;
            right: 2px;
            width: 28px;
            aspect-ratio: 1;
            display: grid;
            place-items: center;
            border: 2px solid #07080f;
            border-radius: 50%;
            background: linear-gradient(135deg, #3d4fff, #7c3aed);
            color: #fff;
            font-size: 11px;
            pointer-events: none;
        }

        .profile-name-block-gaming {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 8px;
            padding-bottom: 2px;
        }

        .profile-name-row {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }

        .profile-username {
            margin: 0;
            font-size: clamp(20px, 5.5vw, 30px);
            font-weight: 1000;
            line-height: 1.05;
            background: linear-gradient(90deg, #e8eaf6, #7986ff 60%, #c084fc);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .profile-tier-badge {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 4px 10px;
            border: 1px solid rgba(99, 102, 241, .4);
            border-radius: 999px;
            background: rgba(99, 102, 241, .15);
            color: #a5b4fc;
            font-size: 10px;
            font-weight: 900;
            letter-spacing: .05em;
            text-transform: uppercase;
            white-space: nowrap;
        }

        .profile-chips-row {
            display: flex;
            flex-wrap: wrap;
            gap: 7px;
        }

        .profile-level-chip {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 4px 10px;
            border: 1px solid rgba(251, 191, 36, .35);
            border-radius: 999px;
            background: rgba(251, 191, 36, .12);
            color: #fbbf24;
            font-size: 11px;
            font-weight: 900;
        }

        .profile-rank-chip {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 4px 10px;
            border: 1px solid rgba(167, 139, 250, .3);
            border-radius: 999px;
            background: rgba(167, 139, 250, .1);
            color: #a78bfa;
            font-size: 11px;
            font-weight: 900;
            min-width: 0;
        }

        .profile-rank-chip > span {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .profile-user-id {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 4px 10px;
            border: 1px solid rgba(100, 116, 139, .28);
            border-radius: 999px;
            background: rgba(100, 116, 139, .1);
            color: #94a3b8;
            font-size: 11px;
            font-weight: 800;
            cursor: pointer;
            transition: color .15s;
        }

        .profile-user-id:hover { color: #e2e8f0; }

        .profile-phone-chip {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 4px 10px;
            border: 1px solid rgba(100, 116, 139, .22);
            border-radius: 999px;
            background: rgba(100, 116, 139, .08);
            color: #94a3b8;
            font-size: 11px;
            font-weight: 800;
        }

        /* ── Dashboard Grid ── */
        .profile-dashboard-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 16px;
            padding: 20px;
        }

        .profile-dashboard-col {
            display: flex;
            flex-direction: column;
            gap: 14px;
            min-width: 0;
        }

        /* ── XP / Level card ── */
        .profile-level-gaming {
            display: flex;
            flex-direction: column;
            gap: 12px;
            padding: 16px 18px;
            border: 1px solid rgba(99, 102, 241, .2);
            border-radius: 16px;
            background: rgba(13, 15, 30, .9);
            box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
        }

        .profile-xp-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 10px;
            flex-wrap: wrap;
        }

        .profile-xp-kicker {
            display: block;
            color: #6366f1;
            font-size: 10px;
            font-weight: 900;
            letter-spacing: .1em;
            text-transform: uppercase;
            margin-bottom: 2px;
        }

        .profile-level-gaming strong {
            color: #e2e8f0;
            font-size: 14px;
        }

        .profile-xp-value {
            color: #94a3b8;
            font-size: 11px;
            font-weight: 800;
            white-space: nowrap;
        }

        .profile-xp-value small {
            color: #64748b;
        }

        .profile-progress-gaming {
            height: 10px;
            overflow: hidden;
            border-radius: 999px;
            background: rgba(255,255,255,.07);
        }

        .profile-progress-gaming > span {
            display: block;
            height: 100%;
            border-radius: inherit;
            background: linear-gradient(90deg, #6366f1, #22d3ee);
            box-shadow: 0 0 10px rgba(99, 102, 241, .6);
            transition: width .6s ease;
        }

        /* ── Action Buttons ── */
        .profile-actions-gaming {
            display: flex;
            flex-direction: column;
            gap: 9px;
        }

        .profile-action-btn {
            display: grid;
            grid-template-columns: 38px minmax(0, 1fr) 16px;
            align-items: center;
            gap: 10px;
            padding: 13px 14px;
            border: 1px solid rgba(99, 102, 241, .18);
            border-radius: 14px;
            background: rgba(13, 15, 30, .9);
            color: #cbd5e1;
            font: inherit;
            font-size: 13px;
            text-align: left;
            cursor: pointer;
            transition: transform .15s, border-color .15s, background .15s;
        }

        .profile-action-btn:hover {
            transform: translateY(-2px);
            border-color: rgba(99, 102, 241, .5);
            background: rgba(20, 24, 50, .95);
        }

        .profile-action-primary {
            border-color: rgba(99, 102, 241, .5);
            background: linear-gradient(135deg, rgba(79, 70, 229, .22), rgba(124, 58, 237, .15));
        }

        .profile-action-primary:hover {
            background: linear-gradient(135deg, rgba(79, 70, 229, .35), rgba(124, 58, 237, .25));
        }

        .action-btn-icon {
            display: grid;
            place-items: center;
            width: 38px;
            aspect-ratio: 1;
            border-radius: 10px;
            background: rgba(99, 102, 241, .18);
            color: #818cf8;
            font-size: 16px;
        }

        .profile-action-primary .action-btn-icon {
            background: rgba(99, 102, 241, .28);
            color: #a5b4fc;
        }

        .action-btn-copy strong {
            display: block;
            color: #e2e8f0;
            font-size: 13px;
            font-weight: 900;
        }

        .action-btn-copy small {
            display: block;
            color: #64748b;
            font-size: 11px;
            margin-top: 2px;
        }

        .action-arrow {
            color: #475569;
            font-size: 11px;
        }

        /* ── Stats Grid ── */
        .profile-stats-gaming {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
        }

        .profile-stat-box {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 13px 12px;
            border: 1px solid rgba(255,255,255,.07);
            border-radius: 14px;
            background: rgba(13, 15, 30, .9);
            min-width: 0;
        }

        .stat-icon-wrap {
            flex: 0 0 auto;
            width: 36px;
            aspect-ratio: 1;
            display: grid;
            place-items: center;
            border-radius: 10px;
            font-size: 15px;
        }

        .stat-trophies .stat-icon-wrap { background: rgba(251, 191, 36, .15); color: #fbbf24; }
        .stat-wins     .stat-icon-wrap { background: rgba(34, 197, 94, .15);  color: #22c55e; }
        .stat-winrate  .stat-icon-wrap { background: rgba(34, 211, 238, .15); color: #22d3ee; }
        .stat-legendary .stat-icon-wrap { background: rgba(167, 139, 250, .15); color: #a78bfa; }

        .stat-text {
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 1px;
        }

        .stat-text b {
            font-size: clamp(16px, 4.5vw, 22px);
            line-height: 1;
            color: #e2e8f0;
        }

        .stat-text span {
            font-size: 10px;
            font-weight: 800;
            color: #64748b;
            letter-spacing: .03em;
        }

        /* ── Match Record Card ── */
        .profile-record-gaming {
            padding: 15px 18px;
            border: 1px solid rgba(255,255,255,.07);
            border-radius: 14px;
            background: rgba(13, 15, 30, .9);
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .record-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            flex-wrap: wrap;
        }

        .record-title {
            color: #e2e8f0;
            font-size: 13px;
            font-weight: 900;
            display: inline-flex;
            align-items: center;
            gap: 7px;
        }

        .record-title i { color: #6366f1; }

        .record-total {
            color: #64748b;
            font-size: 11px;
            font-weight: 800;
        }

        .record-breakdown {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .record-pill {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 5px 11px;
            border-radius: 999px;
            font-size: 12px;
            font-weight: 900;
        }

        .pill-win  { background: rgba(34, 197, 94, .12);  color: #4ade80; border: 1px solid rgba(34,197,94,.22); }
        .pill-loss { background: rgba(239, 68, 68, .12);  color: #f87171; border: 1px solid rgba(239,68,68,.22); }
        .pill-draw { background: rgba(100, 116, 139, .12); color: #94a3b8; border: 1px solid rgba(100,116,139,.22); }

        .pill-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
        }

        .pill-win .pill-dot  { background: #22c55e; }
        .pill-loss .pill-dot { background: #ef4444; }
        .pill-draw .pill-dot { background: #64748b; }

        .record-bar-visual {
            height: 8px;
            border-radius: 999px;
            overflow: hidden;
            display: flex;
            background: rgba(255,255,255,.05);
        }

        .bar-win  { background: linear-gradient(90deg, #22c55e, #16a34a); transition: flex .5s; }
        .bar-loss { background: linear-gradient(90deg, #ef4444, #dc2626); transition: flex .5s; }
        .bar-draw { background: rgba(100, 116, 139, .4); transition: flex .5s; }

        /* ── Mobile responsive ── */
        @media (max-width: 540px) {
            .profile-dashboard-grid {
                grid-template-columns: 1fr;
                gap: 12px;
                padding: 14px;
            }
            .profile-banner-gaming {
                min-height: 130px;
            }
            .profile-identity-gaming {
                padding: 0 14px 16px;
                margin-top: -38px;
            }
        }

        /* ═══════════════════════════════════════════════════════
           GAMING BANNERS & AVATARS PAGE  (banners-page-screen)
           ═══════════════════════════════════════════════════════ */
        #banners-screen.banners-page-screen .extra-stage {
            background: #07080f;
        }

        #banners-screen.banners-page-screen .extra-content {
            background:
                radial-gradient(ellipse at 10% 0, rgba(79, 70, 229, .18), transparent 40%),
                radial-gradient(ellipse at 90% 80%, rgba(220, 38, 38, .1), transparent 36%),
                #07080f;
        }

        #banners-screen.banners-page-screen .collectible-section h2 {
            background: linear-gradient(90deg, #e2e8f0, #818cf8);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            text-shadow: none;
        }

        #banners-screen.banners-page-screen .collectible-section > p {
            color: #94a3b8;
        }

        #banners-screen.banners-page-screen .collectible-tile {
            border: 2px solid rgba(99, 102, 241, .25);
            background: linear-gradient(145deg, rgba(20, 24, 50, .95), rgba(13, 15, 30, .98));
            box-shadow: 0 4px 14px rgba(0,0,0,.35);
        }

        #banners-screen.banners-page-screen .collectible-tile .collectible-art {
            border-color: rgba(99, 102, 241, .2);
            background: #111827;
        }

        #banners-screen.banners-page-screen .collectible-tile.is-selected {
            border-color: #6366f1;
            box-shadow: 0 0 0 2px rgba(99, 102, 241, .4), 0 4px 14px rgba(0,0,0,.35);
        }

        #banners-screen.banners-page-screen .collectible-tile.is-locked {
            border-color: rgba(55, 65, 81, .5);
            background: linear-gradient(145deg, rgba(15, 17, 28, .9), rgba(10, 11, 20, .95));
        }

        #banners-screen.banners-page-screen .collectible-tile-banner {
            border: 1px solid rgba(99, 102, 241, .28);
            background: #0d0f1e;
            box-shadow: 0 10px 24px rgba(0,0,0,.45);
            transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
        }

        #banners-screen.banners-page-screen .collectible-tile-banner:hover:not(:disabled) {
            transform: translateY(-4px);
            border-color: rgba(99, 102, 241, .6);
            box-shadow: 0 16px 32px rgba(0,0,0,.55), 0 0 20px rgba(99, 102, 241, .2);
        }

        #banners-screen.banners-page-screen .collectible-tile-banner.is-selected {
            border-color: #6366f1;
            box-shadow: 0 0 0 2px rgba(99, 102, 241, .5), 0 10px 24px rgba(0,0,0,.45), 0 0 24px rgba(99, 102, 241, .25);
        }

        #banners-screen.banners-page-screen .collectible-tile-banner.is-locked {
            filter: grayscale(.7) brightness(.6);
        }

        #banners-screen.banners-page-screen .collectible-mark {
            border-color: rgba(99, 102, 241, .4);
            background: #1e1b4b;
            color: #a5b4fc;
        }

        #banners-screen.banners-page-screen .collectible-check {
            background: #166534;
            color: #bbf7d0;
        }

        #banners-screen.banners-page-screen .collectible-label {
            color: #cbd5e1;
        }

        #banners-screen.banners-page-screen .collectible-detail {
            color: #64748b;
        }

        #banners-screen.banners-page-screen .collectible-status:not(:empty) {
            border-color: rgba(99, 102, 241, .3);
            background: rgba(30, 27, 75, .6);
            color: #c7d2fe;
        }

        /* Enhanced banner art for gaming page */
        #banners-screen .collectible-art.banner-starter {
            background:
                radial-gradient(ellipse at 20% 20%, rgba(255, 200, 100, .35) 0 15%, transparent 16%),
                radial-gradient(ellipse at 80% 80%, rgba(200, 140, 60, .2) 0 18%, transparent 19%),
                repeating-linear-gradient(135deg, transparent 0 18px, rgba(255,255,255,.06) 19px 20px),
                linear-gradient(125deg, #1a0f04, #6b3a17 45%, #c77c38 100%);
        }

        #banners-screen .collectible-art.banner-forest {
            background:
                radial-gradient(ellipse at 25% 15%, rgba(150, 230, 170, .4) 0 12%, transparent 13%),
                radial-gradient(ellipse at 75% 85%, rgba(100, 180, 120, .2) 0 16%, transparent 17%),
                repeating-linear-gradient(155deg, transparent 0 16px, rgba(200,255,220,.07) 17px 18px),
                linear-gradient(125deg, #071a12, #0e5940 45%, #2d8c5a 75%, #89b96d 100%);
        }

        #banners-screen .collectible-art.banner-royal {
            background:
                radial-gradient(circle at 75% 20%, rgba(255, 220, 100, .55) 0 7%, transparent 8%),
                radial-gradient(ellipse at 20% 80%, rgba(130, 100, 200, .3) 0 18%, transparent 19%),
                repeating-linear-gradient(135deg, transparent 0 20px, rgba(200,190,255,.07) 21px 22px),
                linear-gradient(125deg, #09091f, #2a1f5e 40%, #5b46b2 70%, #c8a847 100%);
        }

        #banners-screen .collectible-art.banner-legendary {
            background:
                radial-gradient(ellipse at 75% 15%, rgba(255, 200, 80, .65) 0 10%, transparent 11%),
                radial-gradient(ellipse at 25% 85%, rgba(220, 60, 20, .4) 0 18%, transparent 19%),
                repeating-linear-gradient(145deg, transparent 0 15px, rgba(255,200,120,.09) 16px 17px),
                linear-gradient(125deg, #120409, #6b0f1e 40%, #c82a24 68%, #f5a623 100%);
        }

        .banner-card {
            grid-template-columns: 1fr auto;
            align-items: center;
        }

        .banner-preview {
            grid-column: 1 / -1;
            min-height: 96px;
            display: grid;
            place-items: center;
            border: 4px solid #fff0c8;
            border-radius: 16px;
            background: linear-gradient(120deg, #78411c, #df9237, #78411c);
            color: #ffdc85;
            font-size: 34px;
        }

        .banner-preview.banner-legendary {
            background: linear-gradient(120deg, #471816, #d04424 52%, #ffb02e);
            color: #fff0a3;
        }

        .profile[data-banner="forest"] {
            background: linear-gradient(135deg, #e6f4d0, #9fc778);
        }

        .profile[data-banner="royal"] {
            background: linear-gradient(135deg, #fff0c1, #c9a2df);
        }

        .profile[data-banner="legendary"] {
            border-color: #ffd98c;
            background: linear-gradient(115deg, #24151d 0%, #4a1c27 48%, #732a21 76%, #a65024 100%);
            box-shadow: 0 .45cqh .4cqh rgba(34, 15, 11, .55), inset 0 1px rgba(255, 242, 206, .2);
            color: #fff9ee;
        }

        .profile[data-banner="legendary"] .player-copy {
            text-shadow: 0 1px 3px rgba(20, 6, 8, .95);
        }

        .profile[data-banner="legendary"] .player-name,
        .profile[data-banner="legendary"] .player-level {
            color: #fff9ee;
        }

        .profile[data-banner="legendary"] .player-level .fa-star {
            color: #ffd36f;
        }

        .profile[data-banner="legendary"] .avatar {
            border-color: #ffdf97;
            box-shadow: 0 0 0 2px rgba(46, 14, 17, .8);
        }

        .banner-preview.banner-forest {
            background: linear-gradient(125deg, #102d28, #17735d 55%, #a1b988);
            color: #fff8df;
        }

        .banner-preview.banner-royal {
            background: linear-gradient(125deg, #171a39, #5949a0 55%, #c2a65e);
            color: #fff5d8;
        }

        .match-player[data-banner="forest"] {
            background: linear-gradient(135deg, #eff9dc, #b5d791);
        }

        .match-player[data-banner="royal"] {
            background: linear-gradient(135deg, #fff4d5, #d2b4e1);
        }

        .match-player[data-banner="legendary"] {
            background: linear-gradient(135deg, #4a1b18, #d04424 62%, #ffb02e);
            color: #fff5d9;
        }

        .match-player[data-banner="legendary"] .match-player-name,
        .match-player[data-banner="legendary"] .match-score {
            color: #fff5d9;
        }

        .collectible-section {
            display: grid;
            gap: 8px;
        }

        .collectible-section h2 {
            margin: 0;
            color: #ffdf91;
            font-size: clamp(18px, 5.5cqw, 25px);
            text-shadow: 0 2px 3px #371506;
        }

        .collectible-section > p {
            margin: 0;
            color: #ffe9c3;
            font-size: clamp(12px, 3.5cqw, 15px);
            line-height: 1.4;
        }

        .collectible-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(min(100%, 104px), 1fr));
            gap: clamp(9px, 2.5cqw, 14px);
        }

        .collectible-grid.banner-collectible-grid {
            grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
            gap: clamp(12px, 3cqw, 18px);
        }

        .collectible-item {
            min-width: 0;
            display: grid;
            align-content: start;
            gap: 5px;
            text-align: center;
        }

        .collectible-tile {
            position: relative;
            width: 100%;
            aspect-ratio: 1;
            overflow: hidden;
            padding: 5px;
            border: 3px solid #d88a3c;
            border-radius: clamp(12px, 3.5cqw, 18px);
            background: linear-gradient(145deg, #ffe7b0, #a9551e);
            box-shadow: 0 4px 0 #67300f, inset 0 2px 3px #fff3cc;
            cursor: pointer;
        }

        .collectible-tile.is-selected {
            border-color: #ffe783;
            box-shadow: 0 0 0 2px #fff3c4, 0 4px 0 #67300f, inset 0 2px 3px #fff3cc;
        }

        .collectible-tile.is-locked {
            border-color: #8d7055;
            background: linear-gradient(145deg, #c9b396, #68513d);
            cursor: not-allowed;
        }

        .collectible-tile:focus-visible {
            outline: 3px solid #fff3a6;
            outline-offset: 3px;
        }

        .collectible-tile-banner {
            aspect-ratio: 2.1;
            min-height: 132px;
            padding: 0;
            border: 1px solid rgba(255, 242, 210, .55);
            border-radius: 16px;
            background: #222638;
            box-shadow: 0 8px 18px rgba(27, 14, 8, .35);
            transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
        }

        .collectible-tile-banner:hover:not(:disabled) {
            transform: translateY(-3px);
            box-shadow: 0 12px 22px rgba(27, 14, 8, .4);
        }

        .collectible-tile-banner.is-selected {
            border-color: #f5d17d;
            box-shadow: 0 0 0 2px rgba(245, 209, 125, .7), 0 8px 18px rgba(27, 14, 8, .35);
        }

        .collectible-tile-banner.is-locked {
            filter: grayscale(.65) brightness(.72);
        }

        .collectible-art {
            position: absolute;
            inset: 5px;
            display: grid;
            place-items: center;
            overflow: hidden;
            border: 2px solid rgba(255, 242, 210, .88);
            border-radius: clamp(8px, 2.4cqw, 13px);
            background: #422818;
            color: #ffdf91;
            font-size: clamp(26px, 10cqw, 48px);
        }

        .collectible-art.banner-preview {
            grid-column: auto;
            min-height: 0;
            border-radius: clamp(8px, 2.4cqw, 13px);
        }

        .collectible-art.banner-starter {
            background:
                radial-gradient(ellipse at 82% 18%, rgba(255, 222, 164, .6) 0 8%, transparent 8.5%),
                repeating-linear-gradient(135deg, transparent 0 18px, rgba(255, 255, 255, .08) 19px 20px),
                linear-gradient(115deg, #22283b, #5c4051 54%, #bd8054);
        }

        .collectible-art.banner-forest {
            background:
                radial-gradient(ellipse at 78% 24%, rgba(206, 232, 173, .48) 0 10%, transparent 10.5%),
                repeating-linear-gradient(155deg, transparent 0 16px, rgba(217, 255, 226, .09) 17px 18px),
                linear-gradient(115deg, #102d28, #17735d 55%, #a1b988);
        }

        .collectible-art.banner-royal {
            background:
                radial-gradient(circle at 78% 24%, rgba(255, 226, 151, .65) 0 5%, transparent 5.5%),
                repeating-linear-gradient(135deg, transparent 0 20px, rgba(230, 220, 255, .1) 21px 22px),
                linear-gradient(115deg, #171a39, #5949a0 55%, #c2a65e);
        }

        .collectible-art.banner-legendary {
            background:
                radial-gradient(ellipse at 78% 24%, rgba(255, 211, 105, .68) 0 9%, transparent 9.5%),
                repeating-linear-gradient(145deg, transparent 0 15px, rgba(255, 218, 172, .12) 16px 17px),
                linear-gradient(115deg, #250d16, #8d1e29 52%, #ef9b36);
        }

        .collectible-art.banner-preview::before {
            position: absolute;
            inset: 0;
            background:
                linear-gradient(130deg, transparent 0 44%, rgba(255, 255, 255, .11) 44.5% 45%, transparent 45.5%),
                linear-gradient(35deg, transparent 0 72%, rgba(11, 14, 29, .2) 72.5% 73%, transparent 73.5%);
            content: "";
            pointer-events: none;
        }

        .collectible-art.banner-preview::after {
            position: absolute;
            right: auto;
            bottom: 12px;
            left: 13px;
            max-width: calc(100% - 26px);
            padding: 6px 10px;
            overflow: hidden;
            border: 1px solid rgba(255, 248, 229, .35);
            border-radius: 999px;
            background: rgba(15, 17, 26, .62);
            color: #fff9ee;
            content: attr(data-label);
            font-size: clamp(10px, 2.7vw, 13px);
            font-weight: 900;
            letter-spacing: .08em;
            text-overflow: ellipsis;
            text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
            white-space: nowrap;
            backdrop-filter: blur(5px);
        }

        .collectible-tile-banner .collectible-art.banner-preview {
            inset: 0;
            border: 0;
            border-radius: inherit;
            box-shadow: none;
        }

        .collectible-tile-banner .collectible-mark {
            top: 8px;
            right: 8px;
            width: 23px;
            font-size: 11px;
        }

        .collectible-art img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .collectible-art img.is-rank-badge {
            padding: 9%;
            object-fit: contain;
        }

        .collectible-mark {
            position: absolute;
            z-index: 1;
            top: 5px;
            right: 5px;
            width: clamp(25px, 7cqw, 32px);
            aspect-ratio: 1;
            display: grid;
            place-items: center;
            border: 2px solid #fff6d8;
            border-radius: 50%;
            background: #71320f;
            color: #fff5d1;
            font-size: clamp(12px, 3.8cqw, 17px);
        }

        .collectible-mark[hidden] {
            display: none;
        }

        .collectible-check {
            background: #277b38;
            color: #fff;
        }

        .collectible-label {
            overflow-wrap: anywhere;
            color: #fff0cf;
            font-size: clamp(11px, 3.1cqw, 14px);
            line-height: 1.2;
        }

        .collectible-detail {
            min-height: 1.2em;
            color: #e8c99e;
            font-size: clamp(10px, 2.8cqw, 12px);
            line-height: 1.25;
        }

        .collectible-status:empty {
            display: none;
        }

        .collectible-status:not(:empty) {
            margin: 0;
            padding: 10px 12px;
            border: 1px solid #f4a19a;
            border-radius: 12px;
            background: rgba(91, 24, 20, .8);
            color: #ffe1da;
            font-weight: 800;
        }

        .profile-banner-preview {
            grid-column: 1 / -1;
            width: 100%;
            min-height: clamp(68px, 18cqw, 112px);
            display: flex;
            align-items: flex-start;
            justify-content: flex-end;
            padding: 10px;
            border: 3px solid #fff0c8;
            border-radius: 16px;
            background: linear-gradient(120deg, #78411c, #df9237, #78411c);
            color: #ffdc85;
            font-size: clamp(24px, 8cqw, 40px);
        }

        .profile-banner-preview.banner-forest {
            background: linear-gradient(135deg, #243d25, #76a34f 55%, #c3d58b);
        }

        .profile-banner-preview.banner-royal {
            background: linear-gradient(135deg, #352049, #79519b 55%, #e0b768);
        }

        .profile-banner-preview.banner-legendary {
            background: linear-gradient(120deg, #471816, #d04424 52%, #ffb02e);
        }

        .match-player[data-banner="starter"] {
            background: linear-gradient(135deg, #fff1d3, #dfaa69 60%, #8e4a20);
        }

        .match-player,
        .match-player[data-banner] {
            background: linear-gradient(135deg, #f7e5c4, #dfbd8c);
            box-shadow: none;
            color: #633f22;
        }

        .match-player.match-player-x,
        .match-player.match-player-o {
            box-shadow: none;
        }

        .match-player[data-banner="legendary"] .match-player-name,
        .match-player[data-banner="legendary"] .match-score {
            color: #633f22;
        }

        .profile-avatar {
            width: clamp(68px, 20cqw, 92px);
            aspect-ratio: 1;
            margin: -38px 0 0 12px;
            border: 4px solid #fff0c8;
            border-radius: 50%;
            background: #75431f;
            object-fit: cover;
        }

        .wood-overlay {
            position: fixed;
            z-index: 50;
            inset: 0;
            display: grid;
            place-items: center;
            overflow: auto;
            padding: 5vw;
            background: rgba(31, 18, 8, .68);
            backdrop-filter: blur(4px);
        }

        .wood-dialog {
            position: relative;
            width: min(100%, 440px);
            max-height: 92svh;
            display: grid;
            gap: 14px;
            overflow: auto;
            padding: clamp(26px, 6vw, 36px);
            border: 1px solid rgba(164, 112, 57, .72);
            border-radius: 24px;
            background:
                radial-gradient(ellipse at 10% 0, rgba(255, 255, 255, .92), transparent 44%),
                radial-gradient(circle at 100% 100%, rgba(221, 177, 115, .15), transparent 36%),
                linear-gradient(155deg, #fffaf1, #f3e6d2 60%, #ead4b5);
            box-shadow: 0 20px 46px rgba(22, 16, 11, .38), inset 0 1px 0 rgba(255, 255, 255, .95);
            color: #493324;
            text-align: center;
        }

        .wood-dialog h2 {
            margin: 0;
            padding: 0 20px;
            font-size: clamp(21px, 6vw, 29px);
            font-weight: 1000;
            letter-spacing: -.025em;
            color: #3e2a1e;
            text-shadow: none;
        }

        .wood-close {
            position: absolute;
            z-index: 2;
            top: 6px;
            right: 6px;
            width: 34px;
            height: 34px;
            border: 1px solid #c9a36c;
            border-radius: 50%;
            background: linear-gradient(145deg, #fffdf8, #e9d8bd);
            box-shadow: 0 2px 6px rgba(73, 47, 24, .2);
            color: #493324;
            font-size: 16px;
            cursor: pointer;
        }

        .wood-close:focus-visible {
            outline: 2px solid #8e5b2c;
            outline-offset: 2px;
        }

        .wood-help {
            margin: 0;
            font-weight: 800;
            line-height: 1.4;
        }

        .wood-error {
            color: #6d1d16;
        }

        .choice-group {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 8px;
        }

        .choice-group[hidden] {
            display: none;
        }

        .online-match-actions {
            display: grid;
            gap: 8px;
        }

        .online-match-actions[hidden] {
            display: none;
        }

        .room-tabs {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 5px;
            padding: 5px;
            border: 2px solid #9a5525;
            border-radius: 999px;
            background: rgba(99, 46, 17, .24);
        }

        .room-tab {
            min-height: 40px;
            padding: 7px 10px;
            border: 1px solid transparent;
            border-radius: 999px;
            background: transparent;
            color: #69330f;
            font: inherit;
            font-weight: 900;
            cursor: pointer;
        }

        .room-tab[aria-selected="true"] {
            border-color: #fff0c8;
            background: linear-gradient(180deg, #ffe2a1, #d98331);
            box-shadow: inset 0 2px 3px #fff7db;
        }

        .room-panel {
            display: grid;
            gap: 8px;
        }

        .room-panel[hidden] {
            display: none;
        }

        .room-join-label {
            color: #69330f;
            font-weight: 900;
        }

        .room-join-controls {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            gap: 8px;
        }

        .room-join-controls input {
            min-width: 0;
            padding: 8px 10px;
            border: 2px solid #bd7a3d;
            border-radius: 12px;
            background: #fff8e9;
            color: #60331d;
            font: inherit;
            font-weight: 800;
            text-transform: uppercase;
        }

        .choice-group button {
            min-height: 42px;
            padding: 7px 5px;
            border: 2px solid #fff0c8;
            border-radius: 12px;
            background: rgba(255, 244, 216, .76);
            color: #69330f;
            font: inherit;
            font-size: clamp(12px, 3.5vw, 15px);
            font-weight: 900;
            cursor: pointer;
        }

        .choice-group button.is-selected {
            border-color: #f5d6b8;
            background: linear-gradient(145deg, #edc9a8, #d28d62 58%, #b86b49);
            color: #4a2b1d;
            box-shadow: 0 3px 0 #804228, inset 0 2px 3px rgba(255, 246, 230, .65);
        }

        .board-choices {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .board-choices button {
            min-height: 68px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 6px;
            padding: 8px;
            border: 1px solid #d5b784;
            border-radius: 13px;
            background: linear-gradient(155deg, #fffdf8, #f1e4d0);
            box-shadow: 0 3px 0 #c6a579, inset 0 1px 2px rgba(255, 255, 255, .95);
            color: #4a3525;
            text-align: left;
            transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
        }

        .board-choices button:hover {
            border-color: #b9894d;
            transform: translateY(-1px);
        }

        .board-choices button.is-selected {
            border-color: #ffe6aa;
            background: linear-gradient(145deg, #ffd77d, #e99a3f 58%, #b95819);
            color: #69330f;
            box-shadow: 0 3px 0 #87370b, 0 5px 8px rgba(34, 18, 7, .2),
                inset 0 2px 3px #fff1b8;
        }

        .board-choices button:focus-visible {
            outline: 2px solid #9a6a34;
            outline-offset: 2px;
        }

        .board-choice-details {
            display: grid;
            flex: 0 0 auto;
            gap: 2px;
        }

        .board-choice-details strong {
            font-size: clamp(15px, 4vw, 18px);
            line-height: 1;
            white-space: nowrap;
        }

        .board-choice-details span {
            font-size: 8px;
            font-weight: 900;
            letter-spacing: .12em;
            opacity: .72;
            white-space: nowrap;
        }

        .board-choice-connect {
            flex: 0 0 auto;
            padding: 5px 7px;
            border: 1px solid rgba(113, 79, 45, .2);
            border-radius: 8px;
            background: rgba(148, 105, 58, .08);
            color: inherit;
            font-size: 9px;
            font-weight: 900;
            line-height: 1.2;
            text-align: center;
            white-space: nowrap;
        }

        .board-choices button.is-selected .board-choice-connect {
            border-color: rgba(112, 72, 29, .28);
            background: rgba(255, 249, 235, .48);
        }

        .wood-feature-icon {
            color: #9d5014;
            font-size: 34px;
        }

        .queue-countdown {
            color: #7c360e;
            font-size: 38px;
            text-shadow: 0 1px #fff3c9;
        }

        .queue-room-code {
            color: #7c360e;
            font-size: clamp(24px, 8vw, 36px);
            letter-spacing: .16em;
        }

        .wood-actions {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
        }

        .result-reward {
            color: #245c22;
            font-size: 17px;
        }

        .leaderboard-row .leaderboard-name {
            text-overflow: ellipsis;
        }

        .reduce-motion *,
        .reduce-motion *::before,
        .reduce-motion *::after {
            scroll-behavior: auto !important;
            animation-duration: .01ms !important;
            animation-delay: 0ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: .01ms !important;
        }

        @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;
            }

            .extra-screen {
                padding: 0;
            }

            .extra-stage {
                width: 100%;
                min-height: 100svh;
                border: 0;
            }

            .profile {
                width: min(54%, 240px);
            }

            .quick-link,
            .customize-button {
                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);
            }
        }

        .friends-page-screen {
            padding: 0;
        }

        .friends-page-screen .extra-stage {
            width: min(100%, 1280px);
            min-height: 100svh;
            margin-inline: auto;
            padding: clamp(18px, 4vw, 48px);
            overflow: visible;
            border: 0;
            border-inline: 1px solid rgba(255, 239, 191, .45);
            border-radius: 0;
            background: linear-gradient(180deg, rgba(91, 48, 22, .97), rgba(50, 26, 13, .99));
        }

        .friends-page-screen .extra-content {
            width: 100%;
            gap: 16px;
        }

        .friends-search-panel {
            width: 100%;
            max-height: none;
            aspect-ratio: auto;
            grid-template-rows: auto auto auto;
            gap: 16px;
            padding: clamp(18px, 3vw, 30px);
            border-color: #f7d997;
            border-radius: 24px;
            background: linear-gradient(150deg, #fff0c8, #eab96f 65%, #ca8740);
            box-shadow: 0 6px 0 #87370b, inset 0 3px 4px #fff8df;
        }

        .friends-search-panel h2 {
            font-size: clamp(21px, 3vw, 30px);
        }

        .friends-search-input {
            width: min(100%, 820px);
            min-height: 54px;
            margin-inline: auto;
            border-color: #b97638;
            border-radius: 14px;
            font-size: 16px;
        }

        .friends-tabs {
            width: min(100%, 820px);
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 8px;
            margin-inline: auto;
            padding: 7px;
            border: 2px solid #b97638;
            border-radius: 17px;
            background: linear-gradient(180deg, #d69a58, #ae6b32);
            box-shadow: inset 0 2px 4px rgba(73, 37, 10, .25);
        }

        .friends-tabs button {
            min-height: 46px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 8px 12px;
            border: 1px solid #d5a469;
            border-radius: 11px;
            background: linear-gradient(145deg, #fff3d4, #e9bd7d);
            color: #693b18;
            font: 900 14px "Nunito", Arial, sans-serif;
            cursor: pointer;
            transition: filter .15s ease, box-shadow .15s ease;
        }

        .friends-tabs button:hover:not(:disabled) {
            filter: brightness(1.06);
        }

        .friends-page-screen .friends-controls .friends-tabs button[aria-selected="true"] {
            position: relative;
            border-color: #ffe4a3;
            background: linear-gradient(145deg, #76502f, #4b2d1a);
            box-shadow: 0 3px 6px rgba(55, 27, 8, .36), inset 0 1px 2px rgba(255, 242, 205, .42);
            color: #fff3d4;
            text-shadow: 0 1px 2px rgba(36, 18, 7, .55);
        }

        .friends-tabs button:disabled {
            cursor: not-allowed;
            filter: saturate(.55);
            opacity: .7;
        }

        .friends-tabs button:focus-visible,
        .friends-load-more:focus-visible,
        .friend-action.add-friend:focus-visible {
            outline: 3px solid #fff4d8;
            outline-offset: 3px;
        }

        .friends-status {
            color: #ffe8bb;
        }

        .friends-view-label {
            width: min(100%, 760px);
            display: flex;
            align-items: center;
            gap: 8px;
            margin: -7px 0 0;
            padding: 8px 12px;
            border-left: 3px solid #f2c56f;
            border-radius: 0 9px 9px 0;
            background: rgba(255, 232, 187, .1);
            color: #ffe8bb;
            font-size: 14px;
            font-weight: 900;
        }

        .friends-view-label i {
            color: #ffd77d;
        }

        .friends-tab-panel {
            width: 100%;
            display: grid;
            align-content: start;
            gap: 16px;
        }

        .friends-tab-panel[hidden] {
            display: none;
        }

        .friends-requests-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 16px;
        }

        .friends-section {
            width: 100%;
            margin: 0;
            padding: clamp(16px, 2.4vw, 26px);
            border-color: #f7d99d;
            border-radius: 18px;
            background: linear-gradient(145deg, #fff0cf, #ecc17e 70%, #d99a55);
            box-shadow: 0 4px 0 #8e511f, inset 0 2px 4px #fff8e4;
        }

        .friends-main-list {
            min-height: 300px;
        }

        .friends-main-list h2,
        .friends-requests-grid h2 {
            margin-bottom: 16px;
            font-size: clamp(19px, 2.4vw, 25px);
        }

        .friends-list-stack {
            grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
            align-items: start;
        }

        .friends-directory-list {
            width: 100%;
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
            align-content: start;
            gap: 12px;
        }

        .friends-empty-state {
            min-height: 245px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 10px;
            padding: 24px;
            color: #72451e;
            text-align: center;
        }

        .friends-empty-state[hidden] {
            display: none;
        }

        .friends-empty-state i {
            color: #a76b32;
            font-size: clamp(56px, 9vw, 90px);
            filter: drop-shadow(0 3px 0 rgba(255, 248, 224, .8));
        }

        .friends-empty-state strong {
            font-size: clamp(20px, 3vw, 28px);
            font-weight: 1000;
        }

        .friends-empty-state p {
            max-width: 420px;
            margin: 0;
            font-size: 15px;
            font-weight: 800;
        }

        .friends-empty {
            grid-column: 1 / -1;
            padding: 20px;
            color: #75451f;
        }

        .friends-directory-list .friends-empty {
            color: #ffe8bb;
        }

        .friends-load-more {
            justify-self: center;
            min-height: 44px;
            padding: 9px 22px;
            border: 2px solid #f7d99d;
            border-radius: 13px;
            background: linear-gradient(145deg, #fff3d4, #e9bd7d);
            box-shadow: 0 3px 0 #8e511f, inset 0 2px 3px #fff;
            color: #693b18;
            font: 900 14px "Nunito", Arial, sans-serif;
            cursor: pointer;
        }

        .friends-load-more[hidden] {
            display: none;
        }

        .friend-action.add-friend {
            border: 1px solid #b6783b;
            background: linear-gradient(145deg, #fff3d4, #e6b66f);
            box-shadow: 0 2px 3px rgba(86, 46, 15, .2), inset 0 2px 3px #fff9e9;
            color: #60330f;
        }

        .friend-action.friend-unfriend {
            width: 38px;
            min-width: 38px;
            min-height: 38px;
            padding: 0;
            border-color: rgba(255, 232, 187, .5);
            background: rgba(255, 243, 212, .1);
            color: #ffe2aa;
            font-size: 15px;
        }

        .friend-action.friend-unfriend:hover {
            border-color: #ffb9a8;
            background: rgba(191, 61, 43, .22);
            color: #ffd1c4;
        }

        .friends-tab-panel {
            min-height: 0;
            padding: 4px 0;
        }

        .friends-tab-panel .friends-list-stack {
            grid-template-columns: repeat(auto-fill, minmax(min(100%, 370px), 1fr));
            gap: 0 28px;
        }

        @media (max-width: 650px) {
            .friends-page-screen .extra-stage {
                padding: 16px 12px 24px;
                border: 0;
            }

            .friends-requests-grid {
                grid-template-columns: minmax(0, 1fr);
            }

            .friends-tabs {
                gap: 5px;
                padding: 5px;
            }

            .friends-tabs button {
                min-height: 44px;
                flex-direction: column;
                gap: 3px;
                padding: 6px 3px;
                font-size: 12px;
            }

            .friend-list-card {
                grid-template-columns: minmax(0, 1fr);
                gap: 9px;
            }

            .friend-list-actions {
                justify-content: flex-end;
            }
        }

        .friends-page-screen .extra-stage {
            width: min(calc(100vw - 32px), 1280px);
        }

        .friends-controls {
            width: 100%;
            display: grid;
            justify-items: center;
            gap: 16px;
            padding: 2px 0 6px;
        }

        .friends-search-bar {
            width: min(100%, 760px);
            min-height: 56px;
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 5px 18px;
            border: 2px solid #e8bc78;
            border-radius: 17px;
            background: linear-gradient(145deg, #fff4d8, #eac17d);
            box-shadow: 0 4px 0 #87370b, inset 0 2px 4px #fff;
            color: #79471d;
        }

        .friends-search-bar > i {
            font-size: 19px;
        }

        .friends-search-bar .friends-search-input {
            width: 100%;
            min-height: 42px;
            padding: 0 4px;
            border: 0;
            outline: 0;
            background: transparent;
            box-shadow: none;
        }

        .friends-search-bar:focus-within {
            outline: 3px solid rgba(255, 230, 178, .62);
            outline-offset: 3px;
        }

        .friends-controls .friends-tabs {
            width: min(100%, 760px);
            margin: 0;
            border-color: #9e602a;
            background: linear-gradient(180deg, #d69a58, #a96730);
        }

        .friends-controls .friends-tabs button {
            position: relative;
            min-height: 50px;
            background: linear-gradient(145deg, #fff3d4, #e9bd7d);
        }

        .friends-tab-dots,
        .friends-notification-dots {
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .friends-tab-dots {
            position: absolute;
            top: 4px;
            right: 7px;
        }

        .friends-notification-dots {
            position: absolute;
            top: 1px;
            right: 1px;
        }

        .friends-tab-dot {
            width: 10px;
            height: 10px;
            display: inline-block;
            flex: 0 0 10px;
            border: 1px solid rgba(255, 255, 255, .86);
            border-radius: 50%;
            box-shadow: 0 1px 3px rgba(32, 18, 8, .52);
        }

        .friends-tab-dot.requests-dot {
            background: #e33f35;
        }

        .friends-tab-dot.acceptances-dot {
            background: #49b85a;
        }

        .friends-tab-dot[hidden],
        .friends-notification-dots[hidden] {
            display: none;
        }

        .friends-link {
            position: absolute;
        }

        .friends-list-stack {
            grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
            align-content: start;
        }

        .friends-requests-panel {
            min-height: 370px;
            align-content: start;
        }

        .friends-request-group {
            min-width: 0;
            padding: 4px 0 18px;
        }

        .friends-request-group + .friends-request-group {
            padding-top: 20px;
            border-top: 1px solid rgba(255, 232, 187, .35);
        }

        .friends-request-group h2 {
            margin: 0 0 13px;
            color: #ffe2aa;
            font-size: clamp(18px, 2.5vw, 23px);
        }

        .friends-request-group .friends-list-stack {
            grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
        }

        .friends-empty-state {
            min-height: 340px;
            color: #ffe8bb;
        }

        .friends-empty-state i {
            color: #f1c47b;
        }

        .requests-empty-state {
            color: #ffe8bb;
        }

        .requests-empty-state i {
            color: #f1c47b;
        }

        .friends-page-screen .friends-directory-list .friends-empty {
            color: #ffe8bb;
        }

        @media (max-width: 650px) {
            .friends-page-screen .extra-stage {
                width: 100%;
            }

            .friends-controls {
                gap: 13px;
            }

            .friends-search-bar {
                min-height: 50px;
                padding-inline: 14px;
            }

            .friends-controls .friends-tabs button {
                min-height: 48px;
            }

            .friends-tab-dots {
                top: 1px;
                right: 3px;
            }

            .friends-tab-dot {
                width: 8px;
                height: 8px;
                flex-basis: 8px;
            }

            .friends-empty-state {
                min-height: 300px;
            }
        }

        .friend-invite-overlay {
            z-index: 80;
            padding: 20px;
            background: rgba(26, 13, 6, .76);
            backdrop-filter: blur(5px);
        }

        .friend-invite-dialog,
        .friend-invite-picker {
            position: relative;
            width: min(100%, 430px);
            padding: 34px 26px 26px;
            border: 4px solid #ffdc85;
            border-radius: 27px;
            background: linear-gradient(150deg, #fff0c8, #e9b568 62%, #b96c2d);
            box-shadow: 0 9px 0 #78390f, 0 18px 26px rgba(34, 18, 7, .45), inset 0 4px 6px #fff5d5;
            color: #62300f;
            text-align: center;
        }

        .friend-invite-banner {
            position: absolute;
            inset: 0 0 auto;
            height: 110px;
            border-radius: 22px 22px 0 0;
            background: linear-gradient(135deg, #5c321b, #b9783f 50%, #513019);
        }

        .friend-invite-avatar {
            position: relative;
            width: 96px;
            height: 96px;
            margin: 4px auto 10px;
            border: 5px solid #fff3d1;
            border-radius: 50%;
            background: #f0c47e;
            box-shadow: 0 3px 8px rgba(57, 30, 11, .38);
            object-fit: cover;
        }

        .friend-invite-mark,
        .friend-invite-picker-icon {
            position: relative;
            display: block;
            margin: 0 auto 10px;
            color: #8d4e1f;
            font-size: 27px;
        }

        .friend-invite-dialog h2,
        .friend-invite-picker h2 {
            position: relative;
            margin: 8px 0;
            font-size: clamp(21px, 5vw, 27px);
            text-shadow: 0 1px #fff2ca;
        }

        .friend-invite-mode,
        .friend-invite-picker-name {
            margin: 9px 0 16px;
            font-size: 16px;
            font-weight: 1000;
        }

        .friend-invite-status,
        .friend-invite-picker-status {
            min-height: 20px;
            margin: 8px 0;
            color: #743311;
            font-size: 13px;
            font-weight: 900;
        }

        .friend-invite-actions {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 10px;
            margin-top: 18px;
        }

        .friend-invite-actions .friend-action {
            min-height: 44px;
            padding-inline: 16px;
            font-size: 14px;
        }

        .friend-invite-board-sizes {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 8px;
            margin: 18px 0;
        }

        .friend-invite-board-sizes button {
            min-height: 44px;
            border: 2px solid #b6783b;
            border-radius: 12px;
            background: linear-gradient(145deg, #fff3d4, #e4b46c);
            color: #62330f;
            font: 900 14px "Nunito", Arial, sans-serif;
            cursor: pointer;
        }

        .friend-invite-board-sizes button[aria-pressed="true"] {
            border-color: #fff3d1;
            background: linear-gradient(145deg, #81502c, #4f2c17);
            color: #fff0c8;
        }

        .friend-invite-send {
            width: min(100%, 250px);
            min-height: 46px;
            font-size: 15px;
        }

        .friend-invite-picker .wood-help {
            margin-block: 8px;
        }

        @media (prefers-reduced-motion: reduce) {
            *,
            *::before,
            *::after {
                scroll-behavior: auto !important;
                animation-duration: .01ms !important;
                animation-delay: 0ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: .01ms !important;
            }
        }

        .friends-page-screen .friends-tab-panel .friends-directory-list {
            grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
            gap: 10px 12px;
        }

        .friends-page-screen .friends-tab-panel .friends-list-stack {
            gap: 10px 12px;
        }

        .friends-page-screen .friend-search-result {
            min-width: 0;
            min-height: 52px;
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            gap: 8px;
            padding: 5px 9px;
            border: 1px solid #c78642;
            border-radius: 14px;
            background: linear-gradient(145deg, #855331, #603a1f);
            box-shadow: none;
            color: #fff0d4;
        }

        .friend-search-profile {
            min-width: 0;
            display: flex;
            align-items: center;
            gap: 9px;
            padding: 0;
            border: 0;
            background: transparent;
            color: inherit;
            font: inherit;
            text-align: left;
            cursor: pointer;
        }

        .friend-search-profile span {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .friend-search-profile img {
            width: 38px;
            height: 38px;
            flex: 0 0 38px;
            border: 2px solid #f3d09a;
            box-shadow: none;
        }

        .friend-search-profile img.inline-name-badge {
            width: 22px;
            height: 22px;
            flex: 0 0 22px;
            border: 0;
            border-radius: 0;
            background: transparent;
        }

        .friend-search-actions {
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .friend-list-card {
            min-height: 58px;
            gap: 7px;
            padding: 7px 9px;
            border: 1px solid rgba(241, 190, 118, .7);
            border-radius: 15px;
            background:
                linear-gradient(145deg, rgba(255, 215, 159, .12), transparent 55%),
                linear-gradient(145deg, #855331, #603a1f);
            box-shadow: inset 0 1px 0 rgba(255, 239, 209, .22), 0 3px 8px rgba(32, 16, 5, .28);
        }

        .friend-list-avatar {
            width: 38px;
            height: 38px;
            flex-basis: 38px;
            border-width: 2px;
            box-shadow: 0 0 0 1px #c5792a;
        }

        .friend-search-profile > img.is-online,
        .friend-list-avatar.is-online {
            border-color: #adf5b5;
            box-shadow: 0 0 0 2px #43bf5e, 0 0 10px 3px rgba(67, 220, 94, .55);
        }

        .friend-list-profile {
            gap: 8px;
        }

        .friend-list-actions {
            flex-wrap: nowrap;
            gap: 5px;
        }

        .friend-list-actions .friend-action {
            min-height: 30px;
            padding: 3px 8px;
            border-radius: 10px;
            white-space: nowrap;
        }

        .friend-request-card.incoming {
            border-left: 4px solid #79cc6a;
        }

        .friend-request-card.outgoing {
            border-left: 4px solid #e6b458;
        }

        .room-invite-overlay {
            z-index: 90;
            padding: 14px;
            background: rgba(25, 13, 6, .82);
            backdrop-filter: blur(6px);
        }

        .room-invite-dialog {
            position: relative;
            width: min(100%, 560px);
            max-height: min(88vh, 760px);
            display: flex;
            flex-direction: column;
            gap: 10px;
            padding: 30px 20px 18px;
            border: 4px solid #f0c47e;
            border-radius: 24px;
            background: linear-gradient(145deg, #fff1cd, #e6b469 65%, #b77437);
            box-shadow: 0 9px 0 #673c1c, 0 18px 34px rgba(0, 0, 0, .45);
            color: #4d2b14;
        }

        .room-invite-dialog h2 {
            margin: 0;
            text-align: center;
            font-size: clamp(22px, 5vw, 29px);
        }

        .room-invite-dialog .wood-help,
        .room-invite-status {
            margin: 0;
            text-align: center;
            font-weight: 800;
        }

        .room-invite-search {
            width: 100%;
            min-height: 44px;
            padding: 8px 12px;
            border: 2px solid #a56832;
            border-radius: 12px;
            background: #fff8e9;
            color: #45240e;
            font: 800 14px "Nunito", Arial, sans-serif;
        }

        .room-invite-tabs {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 7px;
        }

        .room-invite-tabs button,
        .room-invite-more {
            min-height: 39px;
            border: 1px solid #99602e;
            border-radius: 11px;
            background: linear-gradient(145deg, #fff5dc, #e4b46c);
            color: #5e3518;
            font: 900 13px "Nunito", Arial, sans-serif;
        }

        .room-invite-tabs button[aria-pressed="true"] {
            background: linear-gradient(145deg, #754a2a, #4a2d19);
            color: #fff0ce;
        }

        .room-invite-status {
            min-height: 18px;
            color: #663717;
            font-size: 13px;
        }

        .room-invite-list {
            min-height: 80px;
            display: grid;
            align-content: start;
            gap: 7px;
            overflow-y: auto;
            padding: 2px 3px 4px;
        }

        .room-invite-player {
            min-height: 52px;
            display: grid;
            grid-template-columns: 38px minmax(0, 1fr) auto;
            align-items: center;
            gap: 9px;
            padding: 5px 9px;
            border: 1px solid #c48b4b;
            border-radius: 13px;
            background: linear-gradient(145deg, #8b5a34, #62401f);
            color: #fff0d4;
        }

        .room-invite-player > img {
            width: 38px;
            height: 38px;
            border: 2px solid #f2d19f;
            border-radius: 50%;
            object-fit: cover;
        }

        .room-invite-player > img.is-online {
            border-color: #adf5b5;
            box-shadow: 0 0 0 2px #43bf5e, 0 0 10px 3px rgba(67, 220, 94, .55);
        }

        .room-invite-player-name {
            min-width: 0;
            flex: 1;
            overflow: hidden;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            font-weight: 1000;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .room-invite-player-actions {
            display: flex;
            gap: 6px;
        }

        .room-invite-icon {
            width: 34px;
            height: 34px;
            display: grid;
            place-items: center;
            border: 1px solid #d3a05d;
            border-radius: 10px;
            background: linear-gradient(145deg, #fff2d1, #dba45e);
            color: #613918;
            cursor: pointer;
        }

        .room-invite-icon.friend {
            background: linear-gradient(145deg, #ffeab0, #c98737);
        }

        .room-invite-icon:disabled {
            opacity: .58;
            cursor: not-allowed;
        }

        .room-invite-more {
            width: 100%;
            flex: 0 0 auto;
        }

        .challenge-info-open {
            width: fit-content;
            margin: 0 auto 10px;
            padding: 7px 12px;
            border: 1px solid #a56832;
            border-radius: 999px;
            background: linear-gradient(145deg, #fff1cf, #e9b568);
            color: #5e3518;
            font: 900 13px "Nunito", Arial, sans-serif;
        }

        .challenge-info-overlay {
            z-index: 75;
        }

        .challenge-info-dialog {
            max-height: 88vh;
            overflow-y: auto;
        }

        .challenge-reward-list {
            display: grid;
            gap: 12px;
            padding-left: 22px;
            color: #59351d;
            line-height: 1.5;
        }

        .room-range-label {
            display: flex;
            justify-content: space-between;
            gap: 10px;
            color: #673c1c;
            font-weight: 900;
        }

        #create-room-panel input[type="range"] {
            width: 100%;
            accent-color: #82502c;
        }

        #create-room-panel #create-friend-room {
            margin-top: 12px;
        }

        .settings-action-clear,
        .settings-action-logout {
            border-color: #c18442;
            background: linear-gradient(180deg, #f8d69a, #b67735);
            color: #4a2a12;
            box-shadow: 0 .35cqh .35cqh rgba(65, 34, 12, .32), inset 0 .25cqh .3cqh #fff1d2;
        }

        .great-winner-badge {
            width: 32px;
            height: 32px;
            flex: 0 0 32px;
            border: 0;
            border-radius: 0;
            background: transparent;
            box-shadow: none;
            object-fit: contain;
        }

        .leaderboard-avatar-wrap > .great-winner-badge,
        .match-avatar-wrap > .great-winner-badge {
            position: absolute;
            z-index: 2;
            top: 0;
            left: 0;
            transform: translate(-24%, -24%);
            pointer-events: none;
        }

        .match-player-right .match-avatar-wrap > .great-winner-badge {
            top: 0;
            right: 0;
            left: auto;
            width: 26px;
            height: 26px;
            flex-basis: 26px;
            transform: translate(24%, -24%);
        }

        .leaderboard-name {
            min-width: 0;
            display: flex;
            align-items: center;
            gap: 6px;
            overflow: hidden;
        }

        .collectible-new-dot {
            width: 11px;
            height: 11px;
            border: 2px solid #fff2d6;
            border-radius: 50%;
            background: #29c95c;
            box-shadow: 0 0 9px rgba(38, 255, 110, .9);
        }

        .collectible-new-dot {
            position: absolute;
            top: 7px;
            right: 7px;
        }

        .collectible-new-dot[hidden] {
            display: none;
        }

        .customize-button.has-new-unlocks::after {
            position: absolute;
            top: 4px;
            right: 4px;
            width: 7px;
            height: 7px;
            border: 1px solid #fff2d6;
            border-radius: 50%;
            background: #29c95c;
            box-shadow: 0 0 4px rgba(38, 255, 110, .7);
            content: "";
        }

        .friends-realtime-toast {
            position: fixed;
            z-index: 110;
            right: max(16px, env(safe-area-inset-right));
            bottom: max(16px, env(safe-area-inset-bottom));
            max-width: min(90vw, 380px);
            padding: 13px 18px;
            border: 2px solid #f0c47e;
            border-radius: 14px;
            background: linear-gradient(145deg, #70421f, #422713);
            box-shadow: 0 6px 20px rgba(0, 0, 0, .4);
            color: #fff0d4;
            font-weight: 900;
        }

        .friends-realtime-toast[hidden] {
            display: none;
        }

        .friends-page-screen .friend-list-card {
            grid-template-columns: minmax(0, 1fr) auto;
        }

        .friends-page-screen .friend-list-profile {
            min-width: 0;
        }

        .friends-page-screen .friend-list-name {
            flex: 1;
        }

        .friends-page-screen .friend-list-actions {
            flex-wrap: nowrap;
        }

        .friends-page-screen .friends-requests-panel .friends-list-stack {
            gap: 10px 28px;
        }

        .friends-page-screen .friend-request-card .friend-action {
            min-width: 54px;
            padding-inline: 7px;
        }

        /* ===== ADMIN99 COMMAND CENTER (DESKTOP-FIRST, RESPONSIVE TABLET & MOBILE) ===== */
        #admin-screen.admin-command-center {
            --adm-bg: #070b14;
            --adm-surface: rgba(15, 23, 42, 0.86);
            --adm-surface-2: rgba(30, 41, 59, 0.72);
            --adm-border: rgba(148, 163, 184, 0.18);
            --adm-border-strong: rgba(99, 102, 241, 0.45);
            --adm-text: #f8fafc;
            --adm-muted: #94a3b8;
            --adm-accent: #6366f1;
            --adm-cyan: #22d3ee;
            --adm-danger: #fb7185;
            --adm-success: #34d399;
            background:
                radial-gradient(circle at 12% 10%, rgba(99, 102, 241, 0.22), transparent 38%),
                radial-gradient(circle at 88% 85%, rgba(34, 211, 238, 0.14), transparent 40%),
                linear-gradient(165deg, #050811 0%, #0b1222 55%, #070b14 100%);
            color: var(--adm-text);
            font-family: "Inter", "Nunito", system-ui, -apple-system, sans-serif;
            padding: 18px clamp(12px, 2.5vw, 28px) 32px;
        }

        #admin-screen.admin-command-center .extra-stage {
            width: min(100%, 1380px);
            max-width: 1380px;
            margin: 0 auto;
            gap: 14px;
        }

        #admin-screen.admin-command-center .extra-header {
            background: var(--adm-surface);
            border: 1px solid var(--adm-border);
            border-radius: 18px;
            padding: 12px 18px;
            box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
            backdrop-filter: blur(16px);
        }

        #admin-screen.admin-command-center .extra-header h1 {
            color: var(--adm-text);
            text-shadow: none;
            font-size: clamp(20px, 2vw, 26px);
            letter-spacing: -0.03em;
            background: linear-gradient(135deg, #fff 15%, #c7d2fe 60%, #67e8f9 100%);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }

        #admin-screen.admin-command-center .extra-back {
            background: rgba(30, 41, 59, 0.9);
            border: 1px solid var(--adm-border);
            box-shadow: none;
            color: var(--adm-text);
            border-radius: 12px;
        }

        #admin-screen.admin-command-center .extra-back:hover {
            border-color: var(--adm-cyan);
            color: var(--adm-cyan);
        }

        #admin-screen.admin-command-center .extra-content {
            background: transparent;
            border: 0;
            box-shadow: none;
            padding: 0;
        }

        #admin-screen.admin-command-center .admin-shell-grid {
            display: grid;
            grid-template-columns: 260px minmax(0, 1fr);
            gap: 18px;
            align-items: start;
        }

        #admin-screen.admin-command-center .admin-sidebar {
            position: sticky;
            top: 16px;
            display: grid;
            gap: 14px;
            padding: 16px;
            border-radius: 22px;
            border: 1px solid var(--adm-border);
            background: var(--adm-surface);
            backdrop-filter: blur(20px);
            box-shadow: 0 20px 44px rgba(0, 0, 0, 0.4);
        }

        #admin-screen.admin-command-center .admin-brand-card {
            padding: 14px;
            border-radius: 16px;
            background: linear-gradient(145deg, rgba(99, 102, 241, 0.18), rgba(15, 23, 42, 0.6));
            border: 1px solid rgba(99, 102, 241, 0.3);
            display: grid;
            gap: 4px;
        }

        #admin-screen.admin-command-center .admin-live-pill {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            width: fit-content;
            padding: 4px 10px;
            border-radius: 999px;
            background: rgba(34, 211, 238, 0.12);
            border: 1px solid rgba(34, 211, 238, 0.32);
            color: var(--adm-cyan);
            font-size: 11px;
            font-weight: 800;
            letter-spacing: 0.08em;
        }

        #admin-screen.admin-command-center .admin-live-dot {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: var(--adm-cyan);
            box-shadow: 0 0 8px var(--adm-cyan);
        }

        #admin-screen.admin-command-center .admin-brand-title {
            margin-top: 4px;
            font-size: 16px;
            font-weight: 800;
            color: var(--adm-text);
        }

        #admin-screen.admin-command-center .admin-brand-sub {
            font-size: 12px;
            color: var(--adm-muted);
        }

        #admin-screen.admin-command-center .admin-tabs {
            display: grid;
            grid-template-columns: 1fr;
            gap: 6px;
        }

        #admin-screen.admin-command-center .admin-tabs button {
            display: flex;
            align-items: center;
            gap: 11px;
            width: 100%;
            min-height: 44px;
            padding: 10px 14px;
            border-radius: 12px;
            border: 1px solid transparent;
            background: transparent;
            box-shadow: none;
            color: var(--adm-muted);
            font-size: 14px;
            font-weight: 700;
            text-align: left;
            transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
        }

        #admin-screen.admin-command-center .admin-tabs button:hover {
            background: rgba(148, 163, 184, 0.1);
            color: var(--adm-text);
        }

        #admin-screen.admin-command-center .admin-tabs button[aria-selected="true"] {
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.28), rgba(14, 165, 233, 0.2));
            border-color: rgba(99, 102, 241, 0.55);
            color: #ffffff;
            box-shadow: 0 8px 20px rgba(79, 70, 229, 0.22);
        }

        #admin-screen.admin-command-center .admin-sidebar-footer {
            display: grid;
            gap: 8px;
            padding-top: 10px;
            border-top: 1px solid var(--adm-border);
        }

        #admin-screen.admin-command-center .admin-refresh-btn,
        #admin-screen.admin-command-center .admin-logout-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            min-height: 42px;
            width: 100%;
            border-radius: 12px;
            font-size: 13px;
            font-weight: 700;
            cursor: pointer;
        }

        #admin-screen.admin-command-center .admin-logout-btn {
            border: 1px solid rgba(251, 113, 133, 0.35);
            background: rgba(251, 113, 133, 0.1);
            color: #fda4af;
        }

        #admin-screen.admin-command-center .admin-logout-btn:hover {
            background: rgba(251, 113, 133, 0.2);
        }

        #admin-screen.admin-command-center .admin-workspace {
            display: grid;
            gap: 16px;
            min-width: 0;
        }

        #admin-screen.admin-command-center .admin-toolbar {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
            gap: 14px;
            padding: 16px 20px;
            border-radius: 20px;
            border: 1px solid var(--adm-border);
            background: var(--adm-surface);
            backdrop-filter: blur(18px);
        }

        #admin-screen.admin-command-center .admin-kicker {
            display: block;
            font-size: 11px;
            font-weight: 800;
            letter-spacing: 0.1em;
            color: var(--adm-cyan);
        }

        #admin-screen.admin-command-center .admin-status {
            margin: 4px 0 0;
            color: var(--adm-text);
            font-size: 14px;
            font-weight: 600;
            text-shadow: none;
        }

        #admin-screen.admin-command-center .admin-status.is-error {
            color: var(--adm-danger);
        }

        #admin-screen.admin-command-center .admin-kpi-strip {
            display: flex;
            gap: 10px;
        }

        #admin-screen.admin-command-center .admin-kpi {
            min-width: 96px;
            padding: 8px 14px;
            border-radius: 14px;
            background: rgba(15, 23, 42, 0.72);
            border: 1px solid var(--adm-border);
            display: grid;
            gap: 2px;
        }

        #admin-screen.admin-command-center .admin-kpi span {
            font-size: 11px;
            color: var(--adm-muted);
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        #admin-screen.admin-command-center .admin-kpi strong {
            font-size: 15px;
            color: var(--adm-text);
            font-weight: 800;
        }

        #admin-screen.admin-command-center .admin-pane {
            display: grid;
            gap: 16px;
            padding: 20px;
            border-radius: 22px;
            border: 1px solid var(--adm-border);
            background: var(--adm-surface);
            backdrop-filter: blur(18px);
            box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
        }

        #admin-screen.admin-command-center .wood-card,
        #admin-screen.admin-command-center .admin-filter-panel,
        #admin-screen.admin-command-center .admin-directory,
        #admin-screen.admin-command-center .admin-record,
        #admin-screen.admin-command-center .admin-grants,
        #admin-screen.admin-command-center .admin-account-control,
        #admin-screen.admin-command-center .admin-user-info {
            background: var(--adm-surface-2);
            border: 1px solid var(--adm-border);
            border-radius: 16px;
            box-shadow: none;
            color: var(--adm-text);
        }

        #admin-screen.admin-command-center .admin-directory,
        #admin-screen.admin-command-center .admin-editor,
        #admin-screen.admin-command-center .admin-filter-panel {
            padding: 18px;
        }

        #admin-screen.admin-command-center h2,
        #admin-screen.admin-command-center legend,
        #admin-screen.admin-command-center label,
        #admin-screen.admin-command-center strong {
            color: var(--adm-text);
            text-shadow: none;
        }

        #admin-screen.admin-command-center p,
        #admin-screen.admin-command-center span,
        #admin-screen.admin-command-center small,
        #admin-screen.admin-command-center .admin-help,
        #admin-screen.admin-command-center .admin-editor-id {
            color: var(--adm-muted);
            text-shadow: none;
        }

        #admin-screen.admin-command-center input,
        #admin-screen.admin-command-center select {
            background: rgba(15, 23, 42, 0.92);
            border: 1px solid rgba(148, 163, 184, 0.25);
            border-radius: 11px;
            color: var(--adm-text);
            min-height: 44px;
            padding: 9px 12px;
        }

        #admin-screen.admin-command-center input:focus-visible,
        #admin-screen.admin-command-center select:focus-visible {
            outline: none;
            border-color: var(--adm-cyan);
            box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2);
        }

        #admin-screen.admin-command-center .wood-primary {
            background: linear-gradient(135deg, #6366f1 0%, #4f46e5 55%, #0ea5e9 100%);
            border: 0;
            border-radius: 11px;
            box-shadow: 0 8px 20px rgba(79, 70, 229, 0.32);
            color: #ffffff;
            text-shadow: none;
        }

        #admin-screen.admin-command-center .wood-secondary {
            background: rgba(30, 41, 59, 0.92);
            border: 1px solid var(--adm-border);
            border-radius: 11px;
            box-shadow: none;
            color: var(--adm-text);
            text-shadow: none;
        }

        #admin-screen.admin-command-center .wood-secondary:hover:not(:disabled) {
            border-color: var(--adm-cyan);
            color: var(--adm-cyan);
        }

        #admin-screen.admin-command-center .admin-layout {
            display: grid;
            grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
            gap: 18px;
            align-items: start;
        }

        #admin-screen.admin-command-center .admin-player-row {
            background: rgba(15, 23, 42, 0.72);
            border: 1px solid var(--adm-border);
            border-radius: 14px;
            box-shadow: none;
            padding: 12px 14px;
            text-align: left;
            transition: border-color 0.15s ease, background 0.15s ease;
        }

        #admin-screen.admin-command-center .admin-player-row:hover {
            border-color: rgba(99, 102, 241, 0.55);
        }

        #admin-screen.admin-command-center .admin-player-row.is-selected {
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.24), rgba(14, 165, 233, 0.15));
            border-color: var(--adm-cyan);
        }

        #admin-screen.admin-command-center .admin-field-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px;
        }

        #admin-screen.admin-command-center .admin-filters {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 12px;
        }

        #admin-screen.admin-command-center .admin-grant-option {
            background: rgba(15, 23, 42, 0.72);
            border: 1px solid var(--adm-border);
            border-radius: 12px;
        }

        #admin-screen.admin-command-center .admin-certificate-status.is-active {
            color: var(--adm-success);
        }

        #admin-screen.admin-command-center .admin-certificate-status.is-suspended {
            color: var(--adm-danger);
        }

        #admin-screen.admin-command-center .extra-loading,
        #admin-screen.admin-command-center .extra-empty {
            color: var(--adm-muted);
            background: rgba(15, 23, 42, 0.55);
            border: 1px dashed var(--adm-border);
            border-radius: 14px;
            padding: 18px;
        }

        @media (max-width: 1023px) {
            #admin-screen.admin-command-center .admin-shell-grid {
                grid-template-columns: 1fr;
            }
            #admin-screen.admin-command-center .admin-sidebar {
                position: static;
            }
            #admin-screen.admin-command-center .admin-tabs {
                grid-template-columns: repeat(4, minmax(0, 1fr));
            }
            #admin-screen.admin-command-center .admin-tabs button {
                justify-content: center;
                text-align: center;
                padding: 10px 8px;
                font-size: 13px;
            }
            #admin-screen.admin-command-center .admin-sidebar-footer {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
            #admin-screen.admin-command-center .admin-layout {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 639px) {
            #admin-screen.admin-command-center {
                padding: 10px 10px 24px;
            }
            #admin-screen.admin-command-center .admin-tabs {
                display: flex;
                overflow-x: auto;
                padding-bottom: 4px;
            }
            #admin-screen.admin-command-center .admin-tabs button {
                flex: 0 0 auto;
                white-space: nowrap;
                padding: 10px 14px;
            }
            #admin-screen.admin-command-center .admin-pane {
                padding: 14px;
            }
            #admin-screen.admin-command-center .admin-field-grid,
            #admin-screen.admin-command-center .admin-filters,
            #admin-screen.admin-command-center .admin-sidebar-footer {
                grid-template-columns: 1fr;
            }
            #admin-screen.admin-command-center .admin-search > div {
                flex-direction: column;
                align-items: stretch;
            }
            #admin-screen.admin-command-center .admin-kpi-strip {
                width: 100%;
            }
            #admin-screen.admin-command-center .admin-kpi {
                flex: 1;
            }
        }

        [hidden] {
            display: none !important;
        }