:root {
    --ink: #15151a;
    --paper: #f7f4ee;
    --panel: #ffffff;
    --line: #ded7ca;
    --coral: #f25f4c;
    --cyan: #2cb3c6;
    --gold: #ffbd3e;
    --green: #7ac943;
    --violet: #6d5dfc;
    --shadow: 0 24px 70px rgba(21, 21, 26, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--ink);
    background:
        linear-gradient(135deg, rgba(44, 179, 198, 0.16), transparent 34%),
        linear-gradient(315deg, rgba(242, 95, 76, 0.16), transparent 36%),
        var(--paper);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 56px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
    align-items: center;
    min-height: min(720px, calc(100vh - 64px));
    gap: 44px;
}

.hero-copy h1 {
    max-width: 11ch;
    margin: 0;
    font-size: clamp(48px, 8vw, 92px);
    line-height: 0.9;
    letter-spacing: 0;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--coral);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.lead {
    max-width: 640px;
    margin: 22px 0 0;
    color: #494642;
    font-size: 20px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.lead.small {
    font-size: 16px;
}

.hero-actions,
.lobby-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    padding: 0 18px;
    color: var(--ink);
    background: var(--panel);
    box-shadow: 5px 5px 0 var(--ink);
    font-weight: 800;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.button:hover {
    transform: translate(2px, 2px);
    box-shadow: 3px 3px 0 var(--ink);
}

.button.primary {
    background: var(--gold);
}

.button.ghost,
.button.ghost-dark {
    background: transparent;
}

.button.compact {
    min-height: 42px;
    padding-inline: 14px;
}

.hero-art {
    display: grid;
    place-items: center;
}

.hero-art img {
    width: min(100%, 440px);
    filter: drop-shadow(0 24px 30px rgba(21, 21, 26, 0.18));
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin: 52px 0 18px;
}

.section-heading h2 {
    margin: 0;
    font-size: 36px;
    letter-spacing: 0;
}

.section-note {
    color: #5e5a55;
    font-weight: 800;
}

.stats-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 10px;
}

.stats-strip div {
    border: 2px solid var(--ink);
    border-radius: 8px;
    padding: 16px;
    background: #fff;
    box-shadow: 5px 5px 0 var(--ink);
}

.stats-strip strong,
.stats-strip span {
    display: block;
}

.stats-strip strong {
    font-size: 34px;
    line-height: 1;
}

.stats-strip span {
    margin-top: 6px;
    color: #5e5a55;
    font-weight: 800;
}

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

.game-card {
    display: flex;
    min-height: 260px;
    flex-direction: column;
    justify-content: space-between;
    border: 2px solid var(--ink);
    border-radius: 8px;
    padding: 22px;
    background: var(--panel);
    box-shadow: 8px 8px 0 var(--ink);
}

.game-card.hot {
    background: linear-gradient(150deg, #fff, #ffe2dd);
}

.game-card.cool {
    background: linear-gradient(150deg, #fff, #dcf7fb);
}

.game-card.lime {
    background: linear-gradient(150deg, #fff, #e7ffd5);
}

.game-card.gold {
    background: linear-gradient(150deg, #fff, #fff0c7);
}

.game-card.ink {
    background: linear-gradient(150deg, #fff, #ece9ff);
}

.game-card-top,
.game-meta,
.score-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.game-icon {
    display: grid;
    width: 54px;
    aspect-ratio: 1;
    place-items: center;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background: var(--gold);
    font-weight: 900;
}

.badge,
.muted {
    color: #5e5a55;
    font-size: 13px;
    font-weight: 800;
}

.game-card h3 {
    margin: 24px 0 10px;
    font-size: 28px;
    letter-spacing: 0;
}

.game-card p {
    margin: 0;
    color: #504c47;
    line-height: 1.5;
}

.icon-button {
    display: grid;
    width: 42px;
    aspect-ratio: 1;
    place-items: center;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background: var(--coral);
    color: #fff;
    font-size: 24px;
    font-weight: 900;
}

.play-body {
    background:
        linear-gradient(90deg, rgba(122, 201, 67, 0.14), transparent),
        linear-gradient(180deg, rgba(255, 189, 62, 0.18), transparent),
        var(--paper);
}

.play-shell {
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto;
    padding: 24px 0 48px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.back-link,
.brand-mark {
    font-weight: 900;
}

.brand-mark {
    display: grid;
    width: 58px;
    aspect-ratio: 1;
    place-items: center;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background: var(--cyan);
    color: #fff;
}

.play-layout {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.lobby-panel,
.board-panel {
    min-width: 0;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow);
}

.lobby-panel {
    padding: 24px;
}

.lobby-panel h1 {
    max-width: 11ch;
    margin: 0;
    font-size: clamp(38px, 5vw, 54px);
    line-height: 0.95;
    letter-spacing: 0;
}

.lobby-actions {
    flex-direction: column;
}

.room-label {
    display: block;
    margin: 8px 0 6px;
    color: #5e5a55;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.join-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

input {
    width: 100%;
    min-height: 42px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    padding: 0 12px;
    background: #fff;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.word-field input,
.guess-box input {
    text-transform: none;
}

.room-tools {
    display: grid;
    gap: 12px;
    margin-top: 28px;
}

.room-tools strong {
    display: block;
    font-size: 34px;
    letter-spacing: 0;
}

.board-panel {
    padding: 22px;
}

.score-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 20px;
}

.score-strip div {
    min-width: 0;
    border: 2px solid var(--ink);
    border-radius: 8px;
    padding: 12px;
    background: #fff;
}

.score-strip span {
    display: block;
    color: #5e5a55;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.score-strip strong {
    display: block;
    overflow: hidden;
    margin-top: 4px;
    font-size: 20px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board {
    display: grid;
    grid-template-columns: repeat(3, minmax(72px, 1fr));
    gap: 12px;
    width: min(100%, 560px);
    margin: 0 auto;
    aspect-ratio: 1;
}

.word-game {
    display: grid;
    gap: 18px;
}

.letter-card {
    display: grid;
    width: min(100%, 240px);
    margin: 0 auto;
    place-items: center;
    border: 3px solid var(--ink);
    border-radius: 8px;
    padding: 18px;
    background: var(--gold);
    box-shadow: 6px 6px 0 var(--ink);
}

.letter-card span {
    color: #5e5a55;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.letter-card strong {
    font-size: 74px;
    line-height: 1;
}

.word-form {
    display: grid;
    gap: 14px;
}

.word-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.word-field {
    display: grid;
    gap: 6px;
    color: #5e5a55;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.result-table {
    overflow-x: auto;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background: #fff;
}

.result-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 2px solid var(--ink);
    padding: 12px;
    font-weight: 900;
}

.result-table table {
    width: 100%;
    border-collapse: collapse;
}

.result-table th,
.result-table td {
    border-bottom: 1px solid var(--line);
    padding: 10px;
    text-align: left;
}

.result-table tbody tr:last-child th,
.result-table tbody tr:last-child td {
    border-bottom: 0;
}

.solo-layout {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.solo-stage {
    display: grid;
    min-height: 360px;
    align-content: center;
    gap: 12px;
}

.canvas-stage {
    position: relative;
    justify-items: center;
    align-content: center;
}

.canvas-stage::before {
    content: "";
    position: absolute;
    inset: 8px 4px auto;
    height: 120px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(242, 95, 76, 0.22), rgba(44, 179, 198, 0.24), rgba(255, 189, 62, 0.2));
    filter: blur(28px);
    pointer-events: none;
}

.arcade-canvas {
    position: relative;
    z-index: 1;
    width: min(100%, 760px);
    aspect-ratio: 12 / 7;
    height: auto;
    border: 3px solid var(--ink);
    border-radius: 8px;
    background: #111116;
    box-shadow: 8px 8px 0 var(--ink), 0 0 38px rgba(44, 179, 198, 0.26);
    touch-action: none;
}

.canvas-help {
    position: relative;
    z-index: 1;
    width: min(100%, 760px);
    color: #5e5a55;
    font-size: 14px;
    font-weight: 850;
    line-height: 1.4;
    text-align: center;
}

.canvas-controls {
    position: relative;
    z-index: 1;
    width: min(100%, 520px);
}

.canvas-controls button {
    background: linear-gradient(180deg, #ffffff, #fff0c7);
}

.memory-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.memory-card,
.mine-cell {
    display: grid;
    aspect-ratio: 1;
    place-items: center;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background: #fff;
    box-shadow: 4px 4px 0 var(--ink);
    font-weight: 950;
    cursor: pointer;
}

.memory-card.open {
    background: var(--cyan);
    color: #fff;
}

.guess-box {
    grid-template-columns: minmax(0, 1fr) auto;
    align-content: center;
}

.choice-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-content: center;
}

.mine-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: min(100%, 460px);
    margin: 0 auto;
}

.mine-cell:disabled {
    background: #fff0c7;
    cursor: default;
}

.duel-game {
    display: grid;
    gap: 16px;
}

.connect-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.connect-cell,
.claim-cell,
.tile-2048 {
    display: grid;
    aspect-ratio: 1;
    place-items: center;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background: #fff;
    box-shadow: 3px 3px 0 var(--ink);
    font-weight: 950;
}

.claim-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    width: min(100%, 520px);
    margin: 0 auto;
}

.duel-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
}

.duel-actions button {
    min-height: 42px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background: #fff;
    box-shadow: 3px 3px 0 var(--ink);
    font-weight: 900;
    cursor: pointer;
}

.duel-score,
.race-box div,
.duel-log,
.quiz-box {
    border: 2px solid var(--ink);
    border-radius: 8px;
    padding: 12px;
    background: #fff;
}

.duel-score,
.race-box div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.race-box {
    display: grid;
    gap: 12px;
}

.race-box progress {
    width: 100%;
    height: 18px;
}

.duel-log {
    display: grid;
    gap: 6px;
}

.notice.inline {
    margin: 0;
}

.empty-duel {
    border: 2px dashed var(--ink);
    border-radius: 8px;
    padding: 28px;
    text-align: center;
    font-weight: 900;
}

.mini-grid {
    display: grid;
    gap: 8px;
    width: min(100%, 420px);
    margin: 0 auto;
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.grid-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.mini-grid button,
.sudoku-grid input,
.balloon,
.runner-track span {
    display: grid;
    aspect-ratio: 1;
    place-items: center;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background: #fff;
    box-shadow: 3px 3px 0 var(--ink);
    font-weight: 950;
}

.tile-2048:not(:empty),
.filled,
.snake-on {
    background: var(--cyan) !important;
    color: #fff;
}

.food-on,
.go {
    background: var(--green) !important;
}

.wall {
    background: var(--ink) !important;
}

.sudoku-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: min(100%, 360px);
    margin: 0 auto;
}

.sudoku-grid input {
    width: auto;
    min-height: 0;
    text-align: center;
}

.hangman-box,
.word-search-box,
.reaction-box,
.simon-box,
.balloons-box,
.runner-box,
.tetris-box {
    align-content: center;
}

.word-display,
.letter-board {
    border: 2px solid var(--ink);
    border-radius: 8px;
    padding: 16px;
    background: #fff;
    font-size: 28px;
    font-weight: 950;
    text-align: center;
    line-height: 1.6;
}

.letter-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(42px, 1fr));
    gap: 8px;
}

.letter-buttons button,
.reaction-target {
    min-height: 46px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background: #fff;
    box-shadow: 3px 3px 0 var(--ink);
    font-weight: 900;
}

.balloons-box {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.balloon {
    min-height: 80px;
    color: var(--coral);
    font-size: 34px;
}

.runner-track {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}

.battle-wrap {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.battle-wrap h3 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 16px;
    text-transform: uppercase;
}

.battle-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border: 3px solid #08080a;
    border-radius: 22px;
    background:
        radial-gradient(circle at 30% 25%, rgba(255,255,255,.2), transparent 18%),
        linear-gradient(135deg, #155a7a, #1fbad0);
}

.battle-cell {
    display: grid;
    aspect-ratio: 1;
    place-items: center;
    border: 3px solid #08080a;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 3px 3px 0 #08080a;
    color: #101016;
    font-size: 22px;
    font-weight: 1000;
}

.battle-cell.ship {
    background: #ffc247;
}

.battle-cell.hit {
    background: #ff5b4f;
    color: #fff;
}

.battle-cell.miss {
    background: #dffbff;
    color: #128ea0;
}

.claim-cell.bonus {
    background:
        radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.95), transparent 30%),
        #ffc247;
    color: #111116;
}

.claim-cell.bonus:not(.mark-x):not(.mark-o) {
    animation: bonusPulse 1.8s ease-in-out infinite;
}

@keyframes bonusPulse {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(1px, 1px) scale(1.03); }
}

.cell {
    display: grid;
    min-width: 0;
    min-height: 0;
    place-items: center;
    border: 3px solid var(--ink);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-size: clamp(52px, 10vw, 108px);
    font-weight: 950;
    line-height: 1;
    cursor: pointer;
}

.cell:not(:disabled):hover {
    background: #fff0c7;
}

.cell:not(:disabled),
.claim-cell:not(:disabled),
.connect-cell:not(:disabled),
.battle-cell:not(:disabled),
.memory-card:not(:disabled),
.mine-cell:not(:disabled),
.duel-actions button:not(:disabled),
.button:not(:disabled) {
    cursor: pointer;
}

.cell:not(:disabled):hover,
.claim-cell:not(:disabled):hover,
.connect-cell:not(:disabled):hover,
.battle-cell:not(:disabled):hover,
.memory-card:not(:disabled):hover,
.mine-cell:not(:disabled):hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #08080a;
    filter: brightness(1.04);
}

.cell:disabled {
    cursor: default;
}

.mark-x {
    color: var(--coral);
}

.mark-o {
    color: var(--cyan);
}

.notice {
    min-height: 28px;
    margin: 18px 0 0;
    color: #46423e;
    font-weight: 800;
    text-align: center;
}

.notice[data-tone="error"] {
    color: #b62020;
}

.notice[data-tone="done"] {
    color: #327319;
}

.is-hidden {
    display: none !important;
}

@media (max-width: 860px) {
    .hero,
    .play-layout,
    .solo-layout,
    .game-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
        padding: 36px 0 18px;
    }

    .hero-copy h1 {
        font-size: 56px;
    }

    .hero-art {
        order: -1;
    }

    .hero-art img {
        width: min(100%, 320px);
    }

    .score-strip {
        grid-template-columns: 1fr;
    }

    .stats-strip {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .shell,
    .play-shell {
        width: 100%;
        max-width: none;
        padding-right: 10px;
        padding-left: 10px;
    }

    .hero-copy h1,
    .lobby-panel h1 {
        font-size: 44px;
    }

    .lead {
        font-size: 17px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .button {
        width: 100%;
    }

    .section-heading {
        align-items: start;
        flex-direction: column;
    }

    .join-row {
        grid-template-columns: 1fr;
    }

    .board-panel,
    .lobby-panel {
        width: calc(100vw - 20px);
        max-width: calc(100vw - 20px);
        padding: 16px;
    }

    .board {
        gap: 8px;
        width: min(100%, calc(100vw - 54px));
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .cell {
        font-size: clamp(42px, 18vw, 82px);
    }

    .word-fields,
    .guess-box,
    .choice-row {
        grid-template-columns: 1fr;
    }

    .memory-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Premium arcade redesign */
:root {
    --ink: #111116;
    --paper: #f6f3ea;
    --panel: #fffaf0;
    --line: rgba(17, 17, 22, 0.16);
    --coral: #ff5b4f;
    --cyan: #21c3d6;
    --gold: #ffc247;
    --green: #73d44f;
    --violet: #7b61ff;
    --night: #16151d;
    --night-2: #25212e;
    --cream: #fff6df;
    --shadow: 0 22px 0 rgba(17, 17, 22, 0.92);
    --soft-shadow: 0 24px 70px rgba(17, 17, 22, 0.24);
}

body {
    color: var(--ink);
    background:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(135deg, #17151f 0%, #25212f 46%, #3a2632 100%);
    background-size: 34px 34px, 34px 34px, auto;
}

.shell {
    width: min(1240px, calc(100% - 34px));
    padding: 22px 0 72px;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 62px;
    margin-bottom: 18px;
    color: #fff;
}

.site-nav > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 0 14px;
    background: rgba(255, 255, 255, 0.08);
    font-weight: 900;
}

.site-nav .logo {
    gap: 10px;
    border: 0;
    background: transparent;
    padding: 0;
    font-size: 18px;
}

.logo span {
    display: grid;
    width: 42px;
    aspect-ratio: 1;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 12px;
    background: var(--gold);
    color: var(--ink);
    box-shadow: 4px 4px 0 #000;
}

.hero {
    position: relative;
    min-height: min(720px, calc(100vh - 100px));
    border: 3px solid #060608;
    border-radius: 28px;
    overflow: hidden;
    padding: clamp(28px, 5vw, 64px);
    background:
        linear-gradient(115deg, rgba(255, 194, 71, 0.96) 0 34%, rgba(255, 250, 240, 0.98) 34% 72%, rgba(33, 195, 214, 0.92) 72% 100%);
    box-shadow: 0 18px 0 #060608, 0 36px 70px rgba(0, 0, 0, 0.45);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(45deg, rgba(17, 17, 22, 0.08) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(17, 17, 22, 0.08) 25%, transparent 25%);
    background-size: 42px 42px;
    pointer-events: none;
}

.hero-copy,
.hero-art {
    position: relative;
    z-index: 1;
}

.hero-copy h1 {
    max-width: 9ch;
    color: #111116;
    font-size: clamp(64px, 9vw, 124px);
    text-transform: uppercase;
    text-wrap: balance;
    text-shadow: 5px 5px 0 rgba(255, 255, 255, 0.52);
}

.eyebrow {
    color: #e63f36;
}

.hero .eyebrow {
    color: #111116;
}

.lead {
    color: rgba(17, 17, 22, 0.78);
    font-weight: 650;
}

.button {
    border: 3px solid #08080a;
    border-radius: 14px;
    box-shadow: 6px 6px 0 #08080a;
    font-weight: 950;
}

.button.primary {
    background: var(--gold);
}

.button.ghost,
.button.ghost-dark {
    background: #fff;
}

.hero-device {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 420px;
}

.hero-device img {
    width: min(100%, 500px);
    transform: rotate(2deg);
    filter: drop-shadow(18px 22px 0 rgba(0, 0, 0, 0.82));
}

.hero-chip {
    position: absolute;
    display: grid;
    min-height: 44px;
    place-items: center;
    border: 3px solid #09090b;
    border-radius: 999px;
    padding: 0 16px;
    background: #fff;
    box-shadow: 5px 5px 0 #09090b;
    font-weight: 950;
}

.hero-chip.one {
    top: 38px;
    right: 12px;
    background: var(--coral);
    color: #fff;
}

.hero-chip.two {
    left: 0;
    bottom: 82px;
    background: var(--green);
}

.hero-chip.three {
    right: 60px;
    bottom: 24px;
    background: var(--violet);
    color: #fff;
}

.stats-strip {
    margin-top: 48px;
}

.stats-strip div {
    border: 3px solid #08080a;
    border-radius: 18px;
    background: var(--cream);
    box-shadow: 7px 7px 0 #08080a;
}

.stats-strip strong {
    font-size: 42px;
}

.section-heading {
    color: #fff;
}

.section-heading h2 {
    font-size: clamp(34px, 4.4vw, 58px);
    text-transform: uppercase;
}

.section-note {
    color: rgba(255, 255, 255, 0.72);
}

.game-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.game-card {
    position: relative;
    min-height: 360px;
    overflow: hidden;
    border: 3px solid #08080a;
    border-radius: 22px;
    padding: 16px;
    background: var(--cream);
    box-shadow: 8px 8px 0 #08080a;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 10px 14px 0 #08080a;
}

.game-card.hot,
.game-card.cool,
.game-card.lime,
.game-card.gold,
.game-card.ink {
    background: var(--cream);
}

.game-visual {
    position: relative;
    display: grid;
    height: 136px;
    place-items: center;
    overflow: hidden;
    border: 3px solid #08080a;
    border-radius: 18px;
    margin-bottom: 14px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent 45%),
        var(--cyan);
}

.game-visual::before {
    content: "";
    position: absolute;
    inset: 12px;
    border: 2px dashed rgba(8, 8, 10, 0.32);
    border-radius: 14px;
}

.game-token {
    position: relative;
    z-index: 2;
    display: grid;
    width: 76px;
    aspect-ratio: 1;
    place-items: center;
    border: 3px solid #08080a;
    border-radius: 20px;
    background: #fff;
    box-shadow: 6px 6px 0 #08080a;
    font-size: 24px;
    font-weight: 1000;
}

.game-visual i {
    position: absolute;
    display: block;
    border: 3px solid #08080a;
    background: #fff;
}

.game-visual i:nth-child(2) {
    width: 54px;
    height: 18px;
    left: 20px;
    top: 28px;
    border-radius: 999px;
    background: var(--gold);
}

.game-visual i:nth-child(3) {
    width: 36px;
    height: 36px;
    right: 24px;
    top: 22px;
    border-radius: 50%;
    background: var(--coral);
}

.game-visual i:nth-child(4) {
    width: 70px;
    height: 32px;
    right: 32px;
    bottom: 20px;
    transform: rotate(-8deg);
    background: var(--green);
}

.art-xox,
.art-rps,
.art-rps-online,
.art-reaction,
.art-runner {
    background-color: var(--coral);
}

.art-isim-sehir,
.art-words,
.art-word-search,
.art-math {
    background-color: var(--green);
}

.art-connect-four,
.art-quiz,
.art-simon,
.art-2048,
.art-flappy-2048 {
    background-color: var(--gold);
}

.art-battleship,
.art-memory,
.art-memory-vs,
.art-snake,
.art-balloons {
    background-color: var(--cyan);
}

.art-chess,
.art-number-vs,
.art-mines,
.art-maze,
.art-bomber-grid,
.art-space-defender {
    background-color: var(--violet);
}

.art-brick-breaker {
    background-color: var(--coral);
}

.game-card-top {
    margin-bottom: 12px;
}

.game-icon {
    width: 48px;
    border-radius: 14px;
    background: #111116;
    color: #fff;
}

.badge {
    border: 2px solid #08080a;
    border-radius: 999px;
    padding: 7px 10px;
    background: var(--green);
    color: #111116;
}

.game-card h3 {
    min-height: 68px;
    margin-top: 0;
    font-size: 24px;
    line-height: 1.08;
}

.game-card p {
    min-height: 72px;
    color: rgba(17, 17, 22, 0.72);
    font-weight: 650;
}

.icon-button {
    width: 48px;
    border: 3px solid #08080a;
    border-radius: 15px;
    box-shadow: 4px 4px 0 #08080a;
    background: var(--coral);
}

.play-body {
    background:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(135deg, #17151f 0%, #2b2433 52%, #3a2d22 100%);
    background-size: 34px 34px, 34px 34px, auto;
}

.play-shell {
    width: min(1220px, calc(100% - 34px));
}

.topbar {
    color: #fff;
}

.back-link {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 0 14px;
    background: rgba(255, 255, 255, 0.08);
}

.brand-mark {
    border: 3px solid #050506;
    border-radius: 16px;
    background: var(--gold);
    color: var(--ink);
    box-shadow: 5px 5px 0 #050506;
}

.lobby-panel,
.board-panel {
    border: 3px solid #050506;
    border-radius: 24px;
    background: var(--cream);
    box-shadow: 10px 12px 0 #050506;
}

.lobby-panel {
    position: sticky;
    top: 18px;
}

.lobby-panel h1 {
    max-width: 12ch;
    font-size: clamp(36px, 4.8vw, 62px);
    text-transform: uppercase;
}

.score-strip div,
.room-tools .button,
.join-row input,
.word-field input,
.guess-box input,
input {
    border: 3px solid #08080a;
    border-radius: 14px;
}

.score-strip div {
    background: #fff;
}

.board,
.claim-grid,
.connect-grid,
.mini-grid {
    padding: 10px;
    border: 3px solid #08080a;
    border-radius: 22px;
    background: #1d1a24;
}

.cell,
.claim-cell,
.connect-cell,
.memory-card,
.mine-cell,
.mini-grid button,
.sudoku-grid input,
.balloon,
.runner-track span {
    border: 3px solid #08080a;
    border-radius: 16px;
    box-shadow: 4px 4px 0 #08080a;
}

.cell {
    background: #fffaf0;
}

.mark-x {
    background: #ffe4df !important;
    color: var(--coral);
}

.mark-o {
    background: #ddfbff !important;
    color: #128ea0;
}

.letter-card {
    border: 3px solid #08080a;
    border-radius: 22px;
    background: var(--gold);
}

.result-table,
.duel-score,
.race-box div,
.duel-log,
.quiz-box,
.word-display,
.letter-board {
    border: 3px solid #08080a;
    border-radius: 18px;
}

.notice {
    color: rgba(17, 17, 22, 0.76);
}

@media (max-width: 1080px) {
    .game-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .hero {
        padding: 24px;
        border-radius: 22px;
    }

    .hero-copy h1 {
        font-size: 58px;
    }

    .game-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lobby-panel {
        position: static;
    }
}

@media (max-width: 560px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .shell {
        width: min(calc(100% - 24px), 1120px);
        padding-top: 22px;
    }

    .play-shell {
        width: min(calc(100% - 36px), 1120px);
        padding-right: 0;
        padding-left: 0;
    }

    .site-nav,
    .site-nav > div {
        align-items: stretch;
        flex-direction: column;
    }

    .site-nav > div {
        display: grid;
        width: 100%;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .site-nav a {
        justify-content: center;
        padding-inline: 10px;
        font-size: 13px;
        white-space: normal;
    }

    .hero {
        display: block;
        width: 100%;
        overflow: hidden;
        padding: 20px;
    }

    .hero-copy,
    .hero-art {
        min-width: 0;
        max-width: 100%;
    }

    .hero-art {
        width: 100%;
        overflow: hidden;
    }

    .hero-copy h1 {
        max-width: 7ch;
        font-size: 42px;
    }

    .hero-device {
        width: 100%;
        min-height: 280px;
    }

    .hero-device img {
        width: min(92vw, 330px);
        transform: rotate(1deg);
    }

    .hero-actions .button {
        width: 100%;
    }

    .hero-chip {
        display: none;
    }

    .game-grid {
        grid-template-columns: 1fr;
    }

    .game-card {
        min-height: auto;
    }

    .game-card h3,
    .game-card p {
        min-height: 0;
    }

    .play-layout,
    .solo-layout,
    .board-panel,
    .lobby-panel,
    .solo-stage {
        min-width: 0;
        width: 100%;
        max-width: 100%;
    }

    .board-panel,
    .lobby-panel {
        padding: 16px;
        box-shadow: 3px 3px 0 #08080a;
    }

    .score-strip {
        grid-template-columns: 1fr;
    }

    .battle-wrap {
        grid-template-columns: 1fr;
    }
}
