/* =========================================================
   Omiga — offline mini games
   A small, dependency-free design system.
   ========================================================= */

@font-face {
    font-family: 'VT323';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/vt323-latin-400-normal.woff2') format('woff2');
}

:root {
    --font-display: 'VT323', 'Courier New', ui-monospace, monospace;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

    --bg: #f4eddd;
    --bg-deep: #eadfc7;
    --surface: #fffaf0;
    --surface-2: #efe4cf;
    --ink: #171225;
    --muted: #62596f;
    --border: #171225;
    --shadow-color: #171225;
    --dot: rgba(23, 18, 37, 0.13);

    --lime: #c9f45b;
    --purple: #7a5cff;
    --coral: #ff7a6b;
    --cyan: #20c7dd;
    --yellow: #ffd84d;
    --focus: #7a5cff;

    --board-bg: #e9e1d1;
    --board-grid: rgba(23, 18, 37, 0.14);
    --board-ghost: rgba(23, 18, 37, 0.18);
    --exp-cell: rgba(23, 18, 37, 0.1);
    --exp-board: #e9e1d1;

    --radius: 20px;
    --shadow: 6px 6px 0 var(--shadow-color);
    --shadow-sm: 3px 3px 0 var(--shadow-color);
    --header-height: 76px;
}

[data-theme='dark'] {
    --bg: #0f0d1a;
    --bg-deep: #090811;
    --surface: #191527;
    --surface-2: #221c36;
    --ink: #f6f1ff;
    --muted: #b3a9c9;
    --border: #463b66;
    --shadow-color: #2e2546;
    --dot: rgba(255, 255, 255, 0.07);

    --lime: #c9f45b;
    --purple: #9b84ff;
    --coral: #ff8b7d;
    --cyan: #3bdfee;
    --yellow: #ffdf67;
    --focus: #c9f45b;

    --board-bg: #07060d;
    --board-grid: rgba(201, 244, 91, 0.1);
    --board-ghost: rgba(246, 241, 255, 0.16);
    --exp-cell: rgba(255, 255, 255, 0.055);
    --exp-board: #0b0914;
}

html[data-theme='light'] { color-scheme: light; }
html[data-theme='dark'] { color-scheme: dark; }

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(var(--dot) 1px, transparent 1px);
    background-size: 22px 22px;
    content: '';
    pointer-events: none;
}

body.game-open { overflow: hidden; }

[hidden] { display: none !important; }

::selection {
    background: var(--lime);
    color: #12101f;
}

img,
svg,
canvas { max-width: 100%; }

button,
input,
select,
textarea { font: inherit; }

button { color: inherit; }

a { color: inherit; }

h1,
h2,
h3,
p { margin-top: 0; }

h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 0.95;
    text-transform: uppercase;
}

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

.shell {
    width: min(1180px, calc(100% - 3rem));
    margin-inline: auto;
}

.svg-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.icon {
    flex: 0 0 auto;
    width: 1.15em;
    height: 1.15em;
    vertical-align: -0.15em;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.skip-link {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 300;
    padding: 0.6rem 1rem;
    border: 2px solid var(--border);
    border-radius: 999px;
    background: var(--lime);
    color: #12101f;
    font-family: var(--font-display);
    font-size: 1.15rem;
    text-decoration: none;
    text-transform: uppercase;
    transform: translateY(-200%);
}

.skip-link:focus { transform: translateY(0); }

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 2px solid var(--border);
    background: var(--bg);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    height: var(--header-height);
}

.brand {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.6rem;
    color: var(--ink);
    text-decoration: none;
}

.brand__mark {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3px;
    width: 25px;
    height: 25px;
    transform: rotate(-4deg);
}

.brand__mark i {
    border-radius: 2px;
    background: var(--lime);
    box-shadow: inset 0 0 0 1px rgba(18, 16, 31, 0.28);
}

.brand__mark i:nth-child(2) { background: var(--purple); }
.brand__mark i:nth-child(3) { background: var(--cyan); }

.brand__word {
    font-family: var(--font-display);
    font-size: 2rem;
    letter-spacing: 0.06em;
    line-height: 1;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    margin-left: auto;
}

.site-nav a {
    position: relative;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 0.05em;
    text-decoration: none;
    text-transform: uppercase;
}

.site-nav a::after {
    position: absolute;
    right: 0;
    bottom: -5px;
    left: 0;
    height: 3px;
    background: var(--lime);
    content: '';
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 160ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after { transform: scaleX(1); }

.header-tools {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.55rem;
}

.lang-switch {
    display: inline-flex;
    overflow: hidden;
    border: 2px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    box-shadow: 2px 2px 0 var(--shadow-color);
}

.lang-switch button {
    min-width: 34px;
    padding: 0.25rem 0.5rem;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 1.05rem;
    line-height: 1.2;
    text-transform: uppercase;
}

.lang-switch button[aria-pressed='true'] {
    background: var(--ink);
    color: var(--bg);
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 2px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 120ms ease;
}

.icon-button:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--shadow-color); }
.icon-button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow-color); }
.icon-button:disabled { opacity: 0.4; cursor: default; }
.icon-button:disabled:hover { transform: none; box-shadow: var(--shadow-sm); }

.icon-button .icon { width: 1.2rem; height: 1.2rem; }

.icon-button--tiny {
    width: 30px;
    height: 30px;
    border-width: 1.5px;
    box-shadow: none;
}

.theme-icon--sun { display: none; }
[data-theme='dark'] .theme-icon--moon { display: none; }
[data-theme='dark'] .theme-icon--sun { display: block; }

/* ---------- App launcher ---------- */

.app-strip {
    position: relative;
    z-index: 10;
    border-bottom: 2px solid var(--border);
    background: var(--surface);
}

.app-strip__inner {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 3vw, 2.4rem);
    padding-block: 0.8rem;
}

.app-strip__label {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 1.05rem;
    letter-spacing: 0.15em;
    line-height: 1;
    text-transform: uppercase;
}

.app-strip__dot {
    width: 9px;
    height: 9px;
    border: 2px solid var(--border);
    border-radius: 50%;
    background: var(--purple);
}

.app-strip__list {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: clamp(0.3rem, 2vw, 1.4rem);
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.app-strip__list::-webkit-scrollbar { display: none; }
.app-strip__list li { flex: 0 0 auto; }

.app-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    width: 92px;
    padding: 0.25rem 0.2rem;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    text-align: center;
}

.app-icon__tile {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border: 2px solid var(--border);
    border-radius: 15px;
    box-shadow: 3px 4px 0 var(--shadow-color);
    transition: transform 140ms ease, box-shadow 140ms ease;
}

.app-icon__glyph {
    width: 30px;
    height: 30px;
}

.app-icon__name {
    max-width: 100%;
    font-family: var(--font-display);
    font-size: 0.92rem;
    letter-spacing: 0.05em;
    line-height: 1;
    text-transform: uppercase;
}

.app-icon:hover .app-icon__tile,
.app-icon:focus-visible .app-icon__tile {
    transform: translate(-1px, -3px);
    box-shadow: 4px 7px 0 var(--shadow-color);
}

.app-icon:active .app-icon__tile {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 var(--shadow-color);
}

.app-icon--falling .app-icon__tile { background: #7a5cff; color: #c9f45b; }
.app-icon--order .app-icon__tile { background: #20c7dd; color: #12101f; }
.app-icon--shooter .app-icon__tile { background: #ff7a6b; color: #12101f; }
.app-icon--exponential .app-icon__tile { background: #ffd84d; color: #12101f; }
.app-icon--jumping .app-icon__tile { background: var(--coral); color: #12101f; }

/* ---------- Buttons ---------- */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 50px;
    padding: 0.65rem 1.25rem;
    border: 2px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: 4px 4px 0 var(--shadow-color);
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 1.3rem;
    letter-spacing: 0.04em;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
    transition: transform 120ms ease, box-shadow 120ms ease;
}

.button:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--shadow-color); }
.button:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--shadow-color); }

.button--primary {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--bg);
}

[data-theme='dark'] .button--primary {
    border-color: var(--lime);
    background: var(--lime);
    color: #12101f;
}

.button--ghost,
.button--ink { background: var(--surface); color: var(--ink); }

.button--small {
    min-height: 42px;
    padding: 0.45rem 0.9rem;
    font-size: 1.08rem;
}

.button .icon { width: 1.05em; height: 1.05em; }

/* ---------- Labels and shared bits ---------- */

.eyebrow {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 0.16em;
    line-height: 1;
    text-transform: uppercase;
}

.eyebrow__dot {
    width: 9px;
    height: 9px;
    border: 2px solid var(--border);
    border-radius: 50%;
    background: var(--lime);
    animation: blink 3.2s steps(1, end) infinite;
}

@keyframes blink {
    0%, 92%, 100% { opacity: 1; }
    94%, 98% { opacity: 0.35; }
}

.section {
    padding-block: clamp(4rem, 8vw, 7rem);
    border-top: 2px dashed var(--border);
    scroll-margin-top: calc(var(--header-height) + 1rem);
}

.section__head { max-width: 780px; }

.section__title {
    margin-bottom: 1rem;
    font-size: clamp(2.6rem, 6vw, 4.6rem);
    letter-spacing: 0.01em;
}

.section__lede {
    max-width: 62ch;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 1.06rem;
}

/* ---------- Hero ---------- */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
    align-items: center;
    gap: clamp(2rem, 5vw, 5rem);
    min-height: calc(100vh - var(--header-height));
    min-height: calc(100svh - var(--header-height));
    padding-block: clamp(3rem, 7vw, 6rem);
}

.hero__copy { max-width: 660px; }

.hero__title {
    margin-bottom: 1.4rem;
    font-size: clamp(4.2rem, 10.5vw, 8.6rem);
    letter-spacing: 0.005em;
    line-height: 0.8;
}

.hero__title-accent {
    display: inline-block;
    padding-inline: 0.04em;
    background-image: linear-gradient(180deg, transparent 62%, var(--lime) 62%, var(--lime) 93%, transparent 93%);
    color: var(--purple);
}

[data-theme='dark'] .hero__title-accent {
    background-image: none;
    color: var(--lime);
    text-shadow: 0 0 28px rgba(201, 244, 91, 0.25);
}

.hero__lede {
    max-width: 52ch;
    margin-bottom: 1.8rem;
    color: var(--muted);
    font-size: 1.1rem;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.hero__micro {
    margin-bottom: 0;
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 1.02rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.hero__art {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.2rem 1.4rem;
}

.arcade-card {
    position: relative;
    width: min(330px, 100%);
    padding: 0.8rem;
    border: 3px solid var(--border);
    border-radius: 26px;
    background: var(--surface);
    box-shadow: 10px 10px 0 var(--shadow-color);
    transform: rotate(2.5deg);
}

.arcade-card__bar,
.arcade-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-size: 0.92rem;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

.arcade-card__bar {
    margin-bottom: 0.6rem;
    padding: 0.35rem 0.45rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--surface-2);
}

.arcade-led {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--lime);
    box-shadow: 0 0 8px var(--lime);
}

.arcade-card__screen {
    position: relative;
    overflow: hidden;
    padding: 8px;
    border: 2px solid var(--border);
    border-radius: 14px;
    background: #0b0914;
}

.arcade-board {
    display: block;
    width: 100%;
    height: auto;
    color: var(--lime);
    background: #0b0914;
}

.arcade-glare {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 42%);
    pointer-events: none;
}

.arcade-card__foot {
    margin-top: 0.55rem;
    color: var(--muted);
}

.arcade-card__foot span:last-child { color: var(--ink); }

.arcade-card__insert {
    display: block;
    margin-top: 0.3rem;
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-align: center;
    text-transform: uppercase;
}

.block--lime { fill: #c9f45b; }
.block--purple { fill: #9b84ff; }
.block--cyan { fill: #3bdfee; }
.block--orange { fill: #ff9a4d; }
.block--yellow { fill: #ffd84d; }

.block { stroke: rgba(0, 0, 0, 0.35); stroke-width: 0.6; }

.arcade-fall {
    animation: piece-drop 5.4s cubic-bezier(0.5, 0, 0.75, 1) infinite;
    will-change: transform, opacity;
}

.arcade-ghost { opacity: 0.22; }

@keyframes piece-drop {
    0%, 5% { opacity: 0; transform: translateY(0); }
    9% { opacity: 1; }
    60% { opacity: 1; transform: translateY(120px); }
    67%, 100% { opacity: 0; transform: translateY(120px); }
}

.sticker {
    position: absolute;
    z-index: 2;
    padding: 0.3rem 0.7rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--lime);
    color: #12101f;
    box-shadow: 3px 3px 0 var(--shadow-color);
    font-family: var(--font-display);
    font-size: 1.05rem;
    letter-spacing: 0.06em;
    line-height: 1.1;
    text-transform: uppercase;
}

.sticker--offline {
    top: 0.3rem;
    right: -0.3rem;
    transform: rotate(7deg);
}

.sticker--est {
    bottom: 0.2rem;
    left: -0.4rem;
    background: var(--surface);
    color: var(--ink);
    transform: rotate(-6deg);
}

/* ---------- Featured game ---------- */

.game-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.game-feature {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 3px solid var(--border);
    border-radius: 28px;
    background: var(--surface);
    box-shadow: 10px 10px 0 var(--shadow-color);
}

.game-feature__art {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 320px;
    padding: 1.8rem;
    border-bottom: 3px solid var(--border);
    background-color: var(--purple);
    background-image: radial-gradient(rgba(255, 255, 255, 0.18) 1.2px, transparent 1.2px);
    background-size: 14px 14px;
}

.game-feature__art--order { background-color: var(--cyan); }

.game-feature__art--order .game-feature__no { color: rgba(18, 16, 31, 0.22); }
.game-feature--order .game-feature__screen { width: min(220px, 72%); }

.game-feature__art--shooter { background-color: #221a4d; }
.game-feature__art--shooter .game-feature__no { color: rgba(255, 255, 255, 0.22); }
.game-feature--shooter .game-feature__screen { width: min(180px, 62%); }

.game-feature__art--exponential {
    background-color: var(--yellow);
}
.game-feature__art--exponential .game-feature__no { color: rgba(18, 16, 31, 0.24); }
.game-feature--exponential .game-feature__screen {
    width: min(224px, 72%);
    transform: rotate(2.5deg);
}

.game-feature__art--jumping { background-color: var(--coral); }
.game-feature__art--jumping .game-feature__no { color: rgba(18, 16, 31, 0.24); }
.game-feature--jumping {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}
.game-feature--jumping .game-feature__art {
    height: 100%;
    min-height: 420px;
    border-right: 3px solid var(--border);
    border-bottom: 0;
}
.game-feature--jumping .game-feature__body {
    justify-content: center;
    padding: clamp(2rem, 4vw, 3rem);
}
.game-feature--jumping .game-feature__screen {
    width: min(360px, 76%);
    transform: rotate(1.5deg);
}

.jumping-block-art {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    background: #0b0914;
}

.exp-art {
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 5px;
    border-radius: 10px;
    background: #0b0914;
    container-type: inline-size;
}

.exp-art__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(4, minmax(0, 1fr));
    gap: 5px;
    width: 100%;
    height: 100%;
    padding: 5px;
    border-radius: 7px;
    background: #1b1630;
}

.exp-art__cell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.065);
    color: var(--tile-ink, #f6f1ff);
    font-family: var(--font-display);
    font-size: 10cqw;
    line-height: 1;
    letter-spacing: -0.02em;
}

.exp-art__cell.is-filled {
    background: var(--tile-bg, #2d2545);
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.15);
}

.exp-art__cell[data-exp-value='1024'],
.exp-art__cell[data-exp-value='2048'] { font-size: 7.6cqw; }

.pixel-shooter-art {
    display: block;
    width: 100%;
    height: auto;
    background: #05040c;
    border-radius: 10px;
}

.game-feature__no {
    position: absolute;
    top: 0.6rem;
    left: 1rem;
    color: rgba(255, 255, 255, 0.34);
    font-family: var(--font-display);
    font-size: 5rem;
    line-height: 1;
}

.game-feature__screen {
    position: relative;
    width: min(180px, 66%);
    padding: 7px;
    border: 3px solid var(--border);
    border-radius: 16px;
    background: #0b0914;
    box-shadow: 7px 7px 0 rgba(18, 16, 31, 0.38);
    transform: rotate(-2.5deg);
}

.arcade-board--card {
    border-radius: 10px;
}

.game-feature__screen .arcade-fall {
    animation: none;
    opacity: 1;
    transform: translateY(120px);
}

.game-feature__sticker {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.35rem 0.8rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--lime);
    color: #12101f;
    box-shadow: 3px 3px 0 rgba(18, 16, 31, 0.38);
    font-family: var(--font-display);
    font-size: 1.15rem;
    line-height: 1;
    text-transform: uppercase;
    transform: rotate(5deg);
}

.game-feature__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.85rem;
    padding: clamp(1.4rem, 2.6vw, 2rem);
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.badge {
    padding: 0.18rem 0.62rem;
    border: 2px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    font-family: var(--font-display);
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    line-height: 1.35;
    text-transform: uppercase;
}

.badge--lime { background: var(--lime); color: #12101f; }

.game-feature__title {
    margin: 0;
    font-size: clamp(2rem, 3.2vw, 2.7rem);
}

.game-feature__tagline {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.42rem;
    line-height: 1.15;
}

.game-feature__description {
    max-width: 54ch;
    margin: 0;
    color: var(--muted);
}

.game-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1.2rem;
    margin: 0.2rem 0 0.4rem;
    padding: 0;
    list-style: none;
}

.game-meta li {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.game-meta__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--purple);
}

.coming-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.4rem;
    margin-top: 1.4rem;
}

.coming-card {
    position: relative;
    padding: 1.6rem;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.coming-card__no {
    position: absolute;
    top: 0.9rem;
    right: 1.1rem;
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 1.1rem;
}

.coming-card__icon {
    width: 1.6rem;
    height: 1.6rem;
    margin-bottom: 0.6rem;
}

.coming-card h3 {
    margin-bottom: 0.4rem;
    font-size: 1.75rem;
}

.coming-card p {
    max-width: 38ch;
    margin-bottom: 1rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.coming-card__badge {
    display: inline-block;
    padding: 0.12rem 0.6rem;
    border: 2px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.coming-card--dark {
    border-style: solid;
    background: var(--purple);
    color: #ffffff;
}

.coming-card--dark p { color: rgba(255, 255, 255, 0.82); }
.coming-card--dark .coming-card__no { color: rgba(255, 255, 255, 0.7); }
.coming-card--dark .coming-card__badge { background: var(--lime); color: #12101f; }

/* ---------- About ---------- */

.about__head { max-width: 760px; }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.4rem;
    margin-top: 2.5rem;
}

.feature {
    padding: 1.5rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 4px 4px 0 var(--shadow-color);
}

.feature__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    margin-bottom: 1.1rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--lime);
    color: #12101f;
}

.feature__icon .icon { width: 1.5rem; height: 1.5rem; }

.feature h3 {
    margin-bottom: 0.45rem;
    font-size: 1.8rem;
}

.feature p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.96rem;
}

.offline-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.6rem;
    padding: 1rem 1.2rem;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.offline-banner p {
    flex: 1;
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.3rem;
    letter-spacing: 0.03em;
    line-height: 1.1;
    text-transform: uppercase;
}

.offline-banner__signal {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    width: 38px;
    height: 28px;
}

.offline-banner__signal i {
    display: block;
    flex: 1;
    border: 2px solid var(--border);
    border-radius: 2px;
    background: var(--purple);
}

.offline-banner__signal i:nth-child(1) { height: 30%; }
.offline-banner__signal i:nth-child(2) { height: 50%; background: var(--cyan); }
.offline-banner__signal i:nth-child(3) { height: 70%; background: var(--lime); }
.offline-banner__signal i:nth-child(4) { height: 92%; background: var(--coral); }

/* ---------- Footer ---------- */

.site-footer {
    border-top: 2px solid var(--border);
    padding-block: 2.2rem;
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 2rem;
}

.site-footer__brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.brand--footer .brand__word { font-size: 1.6rem; }

.site-footer__brand p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.site-footer__meta {
    margin: 0;
    margin-left: auto;
    color: var(--muted);
    font-size: 0.85rem;
}

.connection {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    padding: 0.2rem 0.65rem;
    border: 2px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.connection__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--lime);
    box-shadow: 0 0 0 2px rgba(201, 244, 91, 0.2);
}

.connection.is-offline .connection__dot {
    background: var(--coral);
    box-shadow: 0 0 0 2px rgba(255, 122, 107, 0.2);
}

/* ---------- Game ---------- */

.game {
    position: fixed;
    inset: 0;
    z-index: 100;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--bg);
}

.game:focus { outline: none; }

.game::before {
    position: fixed;
    inset: 0;
    background-image: radial-gradient(var(--dot) 1px, transparent 1px);
    background-size: 22px 22px;
    content: '';
    pointer-events: none;
}

.game__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: min(980px, 100%);
    min-height: 100vh;
    min-height: 100dvh;
    margin-inline: auto;
    padding:
        max(1rem, env(safe-area-inset-top))
        max(1rem, env(safe-area-inset-right))
        max(1rem, env(safe-area-inset-bottom))
        max(1rem, env(safe-area-inset-left));
}

.game__header {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--border);
}

.game__back { flex: 0 0 auto; }

.game__heading {
    flex: 1;
    min-width: 0;
}

.game__eyebrow {
    margin-bottom: 0.25rem;
    font-size: 0.92rem;
    letter-spacing: 0.12em;
}

.game__title {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    letter-spacing: 0.02em;
    line-height: 0.9;
}

.game__tools {
    display: flex;
    gap: 0.5rem;
}

.game__tools .icon-play { display: none; }
.game.is-paused .game__tools .icon-pause { display: none; }
.game.is-paused .game__tools .icon-play { display: block; }

.game__layout {
    display: grid;
    grid-template-columns: 106px auto;
    align-content: center;
    align-items: start;
    justify-content: center;
    gap: 1rem;
    flex: 1;
}

.game__rail {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-width: 0;
}

.game__stat {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.45rem 0.55rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.game__stat-label {
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

.game__stat-value {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-variant-numeric: tabular-nums;
    line-height: 0.95;
}

.game__stat-value--small { font-size: 1.3rem; }

.game__stat-value.is-pop {
    animation: score-pop 220ms ease;
}

.game__stage.is-shaking {
    animation: board-shake 200ms linear;
}

@keyframes score-pop {
    0% { transform: scale(1); }
    40% { transform: scale(1.18); color: var(--purple); }
    100% { transform: scale(1); }
}

@keyframes board-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-3px); }
    40% { transform: translateX(3px); }
    60% { transform: translateX(-2px); }
    80% { transform: translateX(2px); }
}

.game__mini-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
}

.game__mini-stats > div {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    padding: 0.35rem 0.4rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

.game__panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.game__panel--next {
    flex: 1;
    min-height: 0;
}

.game__panel--hold {
    cursor: pointer;
    color: inherit;
}

.game__panel-label {
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

.game__preview {
    display: block;
    width: 100%;
    height: auto;
    background: transparent;
}

.game__panel--next .game__preview { height: 96px; }
.game__panel--hold .game__preview { height: 54px; }

.game__stage-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.game__stage {
    position: relative;
    width: auto;
    height: min(64vh, 600px);
    height: min(64dvh, 600px);
    aspect-ratio: 1 / 2;
    overflow: hidden;
    border: 3px solid var(--border);
    border-radius: 12px;
    background: var(--board-bg);
    box-shadow: 8px 8px 0 var(--shadow-color);
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.game__board {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.game__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 1rem;
    background: rgba(18, 16, 31, 0.82);
    color: #f6f1ff;
    text-align: center;
}

[data-theme='light'] .game__overlay {
    background: rgba(255, 250, 240, 0.9);
    color: var(--ink);
}

[data-theme='dark'] .game__overlay-kicker { color: var(--lime); }

.game__overlay-kicker {
    margin: 0;
    color: var(--purple);
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.game__overlay-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 2.8rem);
    line-height: 0.9;
    text-transform: uppercase;
}

.game__overlay-score {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.25rem;
}

.game__overlay .button { margin-top: 0.4rem; }

.game__touch {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.45rem;
    width: 100%;
}

.game__touch-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 46px;
    padding: 0;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    touch-action: manipulation;
    transition: transform 90ms ease, background 90ms ease;
}

.game__touch-button:hover { background: var(--surface-2); }
.game__touch-button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow-color); }
.game__touch-button .icon { width: 1.25rem; height: 1.25rem; }

.game__touch-button--accent {
    background: var(--lime);
    color: #12101f;
}

.game__touch-button--drop {
    background: var(--purple);
    color: #ffffff;
}

.game__hint {
    margin: 0;
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 0.95rem;
    line-height: 1.2;
    text-align: center;
}

.game__keys {
    display: block;
    margin-top: 0.1rem;
    font-size: 0.82rem;
    opacity: 0.8;
}

/* ---------- Order Blocks ---------- */

.game--order-blocks { --order-size: min(88vw, 50vh, 520px); }
.game--order-blocks .game__inner { max-width: 680px; }

.order {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    min-height: 0;
}

.order__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    width: var(--order-size);
}

.order__stats .game__stat {
    align-items: center;
    text-align: center;
}

.order__stats .game__stat-value {
    font-size: 2.45rem;
}

.order__stats .game__stat-value--small {
    font-size: 1.7rem;
}

.order__stage {
    position: relative;
    width: var(--order-size);
    height: var(--order-size);
    overflow: hidden;
    border: 3px solid var(--border);
    border-radius: 14px;
    background: var(--board-bg);
    box-shadow: 8px 8px 0 var(--shadow-color);
}


.order__board {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--board-bg);
    cursor: pointer;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    transition: filter 350ms ease;
}

.order__stage.is-game-over {
    animation: order-end 500ms ease-out;
}

.order__stage.is-game-over .order__board {
    filter: saturate(0.25) brightness(0.82);
}

.order__float-score {
    position: absolute;
    top: 14%;
    left: 50%;
    z-index: 1;
    padding: 0.18rem 0.8rem;
    border: 2px solid var(--border);
    border-radius: 999px;
    background: var(--lime);
    color: #12101f;
    box-shadow: 3px 3px 0 var(--shadow-color);
    font-family: var(--font-display);
    font-size: 2.1rem;
    line-height: 1;
    letter-spacing: 0.02em;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 0);
    will-change: transform, opacity;
}

.order__float-score.is-showing {
    animation: order-score-gain 900ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.game--order-blocks .game__overlay:not([hidden]) {
    animation: order-overlay-in 320ms ease-out both;
}

.game--order-blocks .game__overlay:not([hidden]) .game__overlay-title {
    animation: order-title-in 460ms cubic-bezier(0.2, 0.8, 0.2, 1.1) both;
}

.game--order-blocks .game__overlay:not([hidden]) .game__overlay-score {
    animation: order-score-in 460ms 60ms ease-out both;
}

.game--order-blocks .game__overlay:not([hidden]) .button {
    animation: order-button-in 460ms 100ms ease-out both;
}

@keyframes order-score-gain {
    0% { opacity: 0; transform: translate(-50%, 14px) scale(0.75); }
    15% { opacity: 1; transform: translate(-50%, 0) scale(1.06); }
    32% { transform: translate(-50%, 0) scale(1); }
    70% { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -56px) scale(1); }
}

@keyframes order-end {
    0% { transform: scale(1); }
    35% { transform: scale(0.985); }
    100% { transform: scale(1); }
}

@keyframes order-overlay-in {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes order-title-in {
    from { opacity: 0; transform: translateY(12px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes order-score-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes order-button-in {
    from { opacity: 0; transform: translateY(10px) scale(0.94); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.order__tray {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    width: var(--order-size);
}

.order__slot {
    position: relative;
    aspect-ratio: 1 / 1;
    min-width: 0;
    padding: 6px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    cursor: grab;
    touch-action: none;
    -webkit-touch-callout: none;
    user-select: none;
    -webkit-user-select: none;
    transition: transform 100ms ease, box-shadow 100ms ease, opacity 100ms ease;
}

.order__slot canvas {
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.order__slot:hover:not(:disabled) {
    background: var(--surface-2);
    transform: translateY(-2px);
}

.order__slot:active:not(:disabled) { cursor: grabbing; }

.order__slot.is-empty {
    border-style: dashed;
    background: transparent;
    box-shadow: none;
    opacity: 0.45;
}

.order__slot.is-blocked { opacity: 0.4; }

.order__slot.is-selected {
    border-color: var(--focus);
    background: var(--surface-2);
    box-shadow: 0 0 0 3px var(--focus), 3px 3px 0 var(--shadow-color);
    transform: translateY(-2px);
}

.order__slot.is-dragging { opacity: 0.28; }

.order__slot:disabled { cursor: default; }

.order__hint {
    width: var(--order-size);
    max-width: 100%;
    margin: 0;
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 0.96rem;
    line-height: 1.2;
    text-align: center;
}

.order__hint--keys {
    font-size: 0.82rem;
    opacity: 0.82;
}

.order__drag {
    position: fixed;
    z-index: 220;
    pointer-events: none;
    opacity: 0.96;
    filter: drop-shadow(0 7px 10px rgba(0, 0, 0, 0.35));
}

/* ---------- Pixel Shooter ---------- */

.game--pixel-shooter { --shooter-width: min(92vw, 52vh, 500px); }
.game--pixel-shooter .game__inner { max-width: 620px; }

.shooter {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 0;
}

.shooter__stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.4rem;
    width: var(--shooter-width);
}

.shooter__stats .game__stat {
    align-items: center;
    padding: 0.4rem 0.3rem;
    text-align: center;
}

.shooter__stage {
    position: relative;
    width: var(--shooter-width);
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border: 3px solid var(--border);
    border-radius: 14px;
    background: #05040c;
    box-shadow: 8px 8px 0 var(--shadow-color);
    touch-action: none;
}

.shooter__stage::after {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: repeating-linear-gradient(
        0deg,
        rgba(255, 255, 255, 0.028) 0,
        rgba(255, 255, 255, 0.028) 1px,
        transparent 1px,
        transparent 3px
    );
    content: '';
    pointer-events: none;
}

.shooter__canvas {
    display: block;
    width: 100%;
    height: 100%;
    background: #05040c;
    cursor: crosshair;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.game--pixel-shooter .game__overlay {
    z-index: 2;
    background: rgba(5, 4, 12, 0.88);
    color: #f6f1ff;
}

.game--pixel-shooter .game__overlay-kicker { color: var(--lime); }

.game--pixel-shooter .game__overlay .button--primary {
    border-color: var(--lime);
    background: var(--lime);
    color: #12101f;
}

.shooter__hint {
    width: var(--shooter-width);
    max-width: 100%;
    margin: 0;
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 0.96rem;
    line-height: 1.2;
    text-align: center;
}

.shooter__hint--keys {
    font-size: 0.82rem;
    opacity: 0.82;
}


/* ---------- Exponential Blocks ---------- */

[data-exp-value='2'] { --tile-bg: #f7ecd7; --tile-ink: #554960; }
[data-exp-value='4'] { --tile-bg: #eddab9; --tile-ink: #554960; }
[data-exp-value='8'] { --tile-bg: #ffd84d; --tile-ink: #12101f; }
[data-exp-value='16'] { --tile-bg: #ffb35c; --tile-ink: #12101f; }
[data-exp-value='32'] { --tile-bg: #ff8b7d; --tile-ink: #12101f; }
[data-exp-value='64'] { --tile-bg: #ff6b5d; --tile-ink: #ffffff; }
[data-exp-value='128'] { --tile-bg: #3bdfee; --tile-ink: #12101f; }
[data-exp-value='256'] { --tile-bg: #20c7dd; --tile-ink: #12101f; }
[data-exp-value='512'] { --tile-bg: #7a5cff; --tile-ink: #ffffff; }
[data-exp-value='1024'] { --tile-bg: #6236ff; --tile-ink: #ffffff; }
[data-exp-value='2048'] { --tile-bg: #c9f45b; --tile-ink: #12101f; }
[data-exp-value='4096'] { --tile-bg: #ff4f9a; --tile-ink: #ffffff; }
[data-exp-value='8192'] { --tile-bg: #171225; --tile-ink: #c9f45b; }
[data-exp-value='16384'],
[data-exp-value='32768'],
[data-exp-value='65536'],
[data-exp-value='131072'] { --tile-bg: #090811; --tile-ink: #3bdfee; }

[data-theme='dark'] [data-exp-value='2'] { --tile-bg: #2d2545; --tile-ink: #f6f1ff; }
[data-theme='dark'] [data-exp-value='4'] { --tile-bg: #3b3159; --tile-ink: #f6f1ff; }
[data-theme='dark'] [data-exp-value='8192'] { --tile-bg: #c9f45b; --tile-ink: #12101f; }

.game--exponential-blocks {
    --exp-size: min(88vw, 52vh, 500px);
    --exp-pad: clamp(8px, 1.6vw, 12px);
    --exp-gap: clamp(6px, 1.25vw, 9px);
}
.game--exponential-blocks .game__inner { max-width: 680px; }

.exp {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    min-height: 0;
}

.exp__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    width: var(--exp-size);
}

.exp__stats .game__stat {
    align-items: center;
    text-align: center;
}

.exp__stats .game__stat-value { font-size: 2.35rem; }
.exp__stats .game__stat-value--small { font-size: 1.7rem; }

.exp__stage-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
}

.exp__stage {
    position: relative;
    width: var(--exp-size);
    max-width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 3px solid var(--border);
    border-radius: 16px;
    background: var(--exp-board);
    background-image: radial-gradient(var(--dot) 1px, transparent 1px);
    background-size: 18px 18px;
    box-shadow: 8px 8px 0 var(--shadow-color);
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.exp__grid {
    position: absolute;
    inset: var(--exp-pad);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(4, minmax(0, 1fr));
    gap: var(--exp-gap);
}

.exp__cell {
    min-width: 0;
    border-radius: 8px;
    background: var(--exp-cell);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.exp__tiles {
    position: absolute;
    inset: var(--exp-pad);
    pointer-events: none;
}

.exp-tile {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    transition: transform 140ms cubic-bezier(0.2, 0.75, 0.25, 1);
    will-change: transform;
}

.exp-tile__face {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 8px;
    background: var(--tile-bg, #251c44);
    color: var(--tile-ink, #f6f1ff);
    box-shadow:
        inset 0 -3px 0 rgba(0, 0, 0, 0.14),
        inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    font-family: var(--font-display);
    font-size: clamp(0.95rem, 8.2cqw, 2.7rem);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    letter-spacing: -0.03em;
    text-align: center;
}

.exp__stage { container-type: inline-size; }

.exp-tile[data-exp-value='2048'] .exp-tile__face {
    box-shadow:
        0 0 0 2px var(--lime),
        0 0 18px rgba(201, 244, 91, 0.38),
        inset 0 -3px 0 rgba(0, 0, 0, 0.14);
}

.exp-tile.is-new .exp-tile__face { animation: exp-spawn 210ms cubic-bezier(0.2, 0.8, 0.3, 1.2) both; }
.exp-tile.is-merged .exp-tile__face { animation: exp-merge 200ms cubic-bezier(0.2, 0.8, 0.3, 1.2) both; }

.exp-tile.is-removing {
    z-index: 0;
    opacity: 0;
    transition: opacity 90ms ease;
}

.exp-tile.is-removing .exp-tile__face {
    transform: scale(0.55);
    transition: transform 90ms ease;
}

@keyframes exp-spawn {
    from { opacity: 0.3; transform: scale(0.25); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes exp-merge {
    0% { transform: scale(1); }
    55% { transform: scale(1.16); }
    100% { transform: scale(1); }
}

.exp__score-gain {
    position: absolute;
    top: 12%;
    left: 50%;
    z-index: 1;
    padding: 0.16rem 0.75rem;
    border: 2px solid var(--border);
    border-radius: 999px;
    background: var(--lime);
    color: #12101f;
    box-shadow: 3px 3px 0 var(--shadow-color);
    font-family: var(--font-display);
    font-size: 1.9rem;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 0);
    will-change: transform, opacity;
}

.exp__score-gain.is-showing {
    animation: exp-score-gain 800ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes exp-score-gain {
    0% { opacity: 0; transform: translate(-50%, 12px) scale(0.75); }
    18% { opacity: 1; transform: translate(-50%, 0) scale(1.05); }
    35% { transform: translate(-50%, 0) scale(1); }
    72% { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -52px) scale(1); }
}

.exp__pad {
    display: grid;
    grid-template-columns: repeat(3, 42px);
    grid-template-rows: repeat(2, 42px);
    gap: 0.35rem;
}

.exp__pad-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    touch-action: manipulation;
    transition: transform 90ms ease, background 90ms ease;
}

.exp__pad-button:hover { background: var(--surface-2); }
.exp__pad-button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow-color); }
.exp__pad-button .icon { width: 1.2rem; height: 1.2rem; }
.exp__pad-button--up { grid-column: 2; grid-row: 1; }
.exp__pad-button--left { grid-column: 1; grid-row: 2; }
.exp__pad-button--down { grid-column: 2; grid-row: 2; }
.exp__pad-button--right { grid-column: 3; grid-row: 2; }

.exp__hint {
    width: var(--exp-size);
    max-width: 100%;
    margin: 0;
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 0.96rem;
    line-height: 1.2;
    text-align: center;
}

.exp__hint--keys {
    font-size: 0.82rem;
    opacity: 0.82;
}

.game--exponential-blocks .game__overlay {
    background: rgba(255, 250, 240, 0.96);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

[data-theme='dark'] .game--exponential-blocks .game__overlay {
    background: rgba(18, 16, 31, 0.94);
}

.game--exponential-blocks .game__overlay:not([hidden]) {
    animation: exp-overlay-in 300ms ease-out both;
}

.game--exponential-blocks .game__overlay:not([hidden]) .game__overlay-title {
    animation: order-title-in 420ms cubic-bezier(0.2, 0.8, 0.2, 1.1) both;
}

.game--exponential-blocks .game__overlay:not([hidden]) .game__overlay-score {
    animation: order-score-in 420ms 60ms ease-out both;
}

.game--exponential-blocks .game__overlay:not([hidden]) .exp__overlay-actions {
    animation: order-button-in 420ms 100ms ease-out both;
}

@keyframes exp-overlay-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.exp__overlay-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem;
    margin-top: 0.4rem;
}

.exp__overlay-actions .button { margin-top: 0; }

/* ---------- Jumping Block ---------- */

.game--jumping-block { --jump-width: min(94vw, 840px); }
.game--jumping-block .game__inner { max-width: 980px; }

.jump {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 0;
}

.jump__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
    width: var(--jump-width);
}

.jump__stats .game__stat {
    align-items: center;
    padding: 0.4rem 0.5rem;
    text-align: center;
}

.jump__stats .game__stat-value { font-size: 2rem; }
.jump__stats .game__stat-value--small { font-size: 1.35rem; }

.jump__stage {
    position: relative;
    width: var(--jump-width);
    aspect-ratio: 960 / 420;
    overflow: hidden;
    border: 3px solid var(--border);
    border-radius: 16px;
    background: #0b0914;
    box-shadow: 8px 8px 0 var(--shadow-color);
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.jump__stage::after {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: repeating-linear-gradient(
        0deg,
        rgba(255, 255, 255, 0.026) 0,
        rgba(255, 255, 255, 0.026) 1px,
        transparent 1px,
        transparent 3px
    );
    content: '';
    pointer-events: none;
}

.jump__canvas {
    display: block;
    width: 100%;
    height: 100%;
    background: #0b0914;
    cursor: pointer;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.jump__stage .game__overlay {
    z-index: 2;
    background: rgba(5, 4, 12, 0.88);
    color: #f6f1ff;
}

.jump__stage .game__overlay-kicker { color: var(--lime); }

.jump__stage .game__overlay .button--primary {
    border-color: var(--lime);
    background: var(--lime);
    color: #12101f;
}

.jump__controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    width: min(420px, 100%);
}

.jump__control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 50px;
    padding: 0.45rem 1rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 1.25rem;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
    touch-action: manipulation;
    transition: transform 90ms ease, background 90ms ease;
}

.jump__control:hover { background: var(--surface-2); }
.jump__control:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow-color); }
.jump__control .icon { width: 1.25rem; height: 1.25rem; }
.jump__control--jump { background: var(--lime); color: #12101f; }
.jump__control--jump:hover { background: #d7ff77; }

.jump__hint {
    width: var(--jump-width);
    max-width: 100%;
    margin: 0;
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 0.96rem;
    line-height: 1.2;
    text-align: center;
}

.jump__hint--keys {
    font-size: 0.82rem;
    opacity: 0.82;
}

@media (max-width: 900px) {
    .game-feature--jumping .game-feature__screen { width: min(300px, 74%); }
}

@media (max-width: 760px) {
    .game-feature--jumping {
        display: flex;
        flex-direction: column;
        grid-column: auto;
    }
    .game-feature--jumping .game-feature__art {
        height: 270px;
        min-height: 0;
        border-right: 0;
        border-bottom: 3px solid var(--border);
    }
    .game-feature--jumping .game-feature__body { padding: 1.4rem; }
}

@media (max-width: 640px) {
    .game--jumping-block { --jump-width: min(94vw, 560px); }
    .game-feature--jumping .game-feature__screen { width: min(245px, 76%); }
    .jump { gap: 0.5rem; }
    .jump__stats { gap: 0.35rem; }
    .jump__stats .game__stat { padding: 0.35rem 0.25rem; }
    .jump__stats .game__stat-value { font-size: 1.55rem; }
    .jump__stats .game__stat-value--small { font-size: 1.08rem; }
    .jump__stage { box-shadow: 5px 5px 0 var(--shadow-color); }
    .jump__controls { gap: 0.4rem; }
    .jump__control { min-height: 44px; font-size: 1.05rem; }
    .jump__hint { font-size: 0.82rem; }
    .jump__hint--keys { font-size: 0.75rem; }
}

@media (max-width: 640px) and (max-height: 680px) {
    .jump__hint--keys { display: none; }
}

/* ---------- Toast ---------- */

.toast {
    position: fixed;
    bottom: max(1rem, env(safe-area-inset-bottom));
    left: 50%;
    z-index: 250;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    width: min(440px, calc(100% - 2rem));
    padding: 0.75rem 0.8rem 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 14px;
    background: var(--ink);
    color: var(--bg);
    box-shadow: 5px 5px 0 var(--shadow-color);
    transform: translateX(-50%);
    animation: toast-in 180ms ease both;
}

[data-theme='dark'] .toast {
    background: var(--surface);
    color: var(--ink);
}

.toast p {
    flex: 1;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.35;
}

.toast .icon-button {
    border-color: currentColor;
    background: transparent;
    color: inherit;
}

@keyframes toast-in {
    from { opacity: 0; transform: translate(-50%, 12px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- Standalone app ---------- */

@media (display-mode: standalone) {
    .js-install { display: none !important; }
}

body.is-standalone .js-install { display: none !important; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .site-nav { display: none; }
    .header-tools { margin-left: auto; }

    .hero {
        grid-template-columns: 1fr;
        min-height: 0;
        text-align: left;
    }

    .hero__copy { max-width: 720px; }
    .hero__art { padding-block: 1rem 2rem; }
    .arcade-card { transform: rotate(1.5deg); }

    .game-feature__art {
        height: 300px;
        border-bottom: 3px solid var(--border);
    }
    .game-feature__screen { width: min(175px, 58%); }

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

@media (max-width: 640px) {
    .shell { width: min(100% - 1.5rem, 1180px); }

    :root { --header-height: 66px; }

    .site-header__inner { gap: 0.5rem; }
    .brand__word { font-size: 1.65rem; }
    .brand__mark { width: 21px; height: 21px; }
    .header-tools { gap: 0.4rem; }
    .install-label { display: none; }
    .header-tools .button--small { width: 42px; min-height: 42px; padding: 0; }
    .lang-switch button { min-width: 30px; padding-inline: 0.35rem; }
    .icon-button { width: 42px; height: 42px; }

    .app-strip__inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.4rem;
        padding-block: 0.65rem 0.8rem;
    }
    .app-strip__label { font-size: 0.92rem; }
    .app-strip__list { width: 100%; justify-content: space-between; gap: 0.1rem; }
    .app-strip__list li { flex: 1 1 0; }
    .app-icon { width: auto; padding-inline: 0; }
    .app-icon__tile { width: 46px; height: 46px; border-radius: 13px; }
    .app-icon__glyph { width: 26px; height: 26px; }
    .app-icon__name { font-size: 0.72rem; letter-spacing: 0.03em; }

    .hero { padding-block: 2.6rem 3.2rem; gap: 1rem; }
    .hero__title { font-size: clamp(3.6rem, 17vw, 5.6rem); }
    .hero__lede { font-size: 1rem; }
    .hero__micro { font-size: 0.94rem; letter-spacing: 0.05em; }
    .hero__actions { gap: 0.6rem; }
    .hero__actions .button { width: 100%; }
    .hero__art { padding-inline: 0.7rem; }
    .arcade-card { width: min(300px, 92%); }
    .sticker--offline { right: 0; }
    .sticker--est { left: 0; }

    .section { padding-block: 3.2rem; }
    .section__title { font-size: clamp(2.3rem, 11vw, 3.4rem); }

    .game-grid { grid-template-columns: 1fr; }
    .game-feature__art { height: 270px; padding: 1.5rem 1rem; }
    .game-feature__screen { width: min(165px, 60%); }
    .game-feature--order .game-feature__screen { width: min(200px, 68%); }
    .game-feature--exponential .game-feature__screen { width: min(205px, 68%); }
    .game-feature__no { font-size: 3.6rem; }
    .game-feature__body { padding: 1.4rem; gap: 0.8rem; }
    .game-feature__title { font-size: 2.4rem; }
    .game-feature__tagline { font-size: 1.25rem; }

    .coming-grid { grid-template-columns: 1fr; }
    .coming-card { padding: 1.3rem; }

    .offline-banner { align-items: flex-start; flex-wrap: wrap; }
    .offline-banner p { flex-basis: calc(100% - 60px); font-size: 1.1rem; }
    .offline-banner .button { margin-left: 52px; }

    .site-footer__inner { align-items: flex-start; flex-direction: column; }
    .site-footer__meta { margin-left: 0; }

    .game__inner { gap: 0.7rem; }
    .game__header { gap: 0.6rem; }
    .game__title { font-size: 1.5rem; }
    .game__eyebrow { display: none; }
    .game__layout { grid-template-columns: 82px minmax(0, 1fr); gap: 0.65rem; }
    .game__stage { height: min(60dvh, 540px); box-shadow: 5px 5px 0 var(--shadow-color); }
    .game__stat { padding: 0.35rem 0.4rem; }
    .game__stat-value { font-size: 1.45rem; }
    .game__stat-value--small { font-size: 1.1rem; }
    .game__stat-label { font-size: 0.68rem; }
    .game__mini-stats { gap: 0.3rem; }
    .game__mini-stats > div { padding: 0.25rem 0.3rem; }
    .game__panel-label { font-size: 0.7rem; }
    .game__panel--next .game__preview { height: 72px; }
    .game__panel--hold .game__preview { height: 42px; }
    .game__touch { gap: 0.3rem; }
    .game__touch-button { min-height: 42px; }
    .game__hint { font-size: 0.82rem; }

    .game--order-blocks { --order-size: min(90vw, 50vh, 480px); }
    .order { gap: 0.55rem; }
    .order__stats { gap: 0.35rem; }
    .order__stats .game__stat { padding: 0.4rem 0.3rem; }
    .order__stats .game__stat-value { font-size: 1.8rem; }
    .order__stats .game__stat-value--small { font-size: 1.3rem; }
    .order__float-score { font-size: 1.7rem; }
    .order__tray { gap: 0.4rem; }
    .order__slot { padding: 4px; }
    .order__hint { font-size: 0.82rem; }
    .order__hint--keys { font-size: 0.75rem; }

    .game--exponential-blocks { --exp-size: min(90vw, 47vh, 460px); --exp-pad: 8px; --exp-gap: 6px; }
    .exp { gap: 0.55rem; }
    .exp__stats { gap: 0.35rem; }
    .exp__stats .game__stat { padding: 0.4rem 0.3rem; }
    .exp__stats .game__stat-value { font-size: 1.8rem; }
    .exp__stats .game__stat-value--small { font-size: 1.3rem; }
    .exp__score-gain { font-size: 1.6rem; }
    .exp__pad { grid-template-columns: repeat(3, 36px); grid-template-rows: repeat(2, 36px); gap: 0.28rem; }
    .exp__pad-button { border-radius: 9px; box-shadow: 2px 2px 0 var(--shadow-color); }
    .exp__pad-button .icon { width: 1rem; height: 1rem; }
    .exp__hint { font-size: 0.82rem; }
    .exp__hint--keys { font-size: 0.75rem; }

    .game--pixel-shooter { --shooter-width: min(94vw, 50vh, 480px); }
    .shooter { gap: 0.55rem; }
    .shooter__stats { gap: 0.3rem; }
    .shooter__stats .game__stat { padding: 0.35rem 0.25rem; }
    .shooter__stats .game__stat-value { font-size: 1.35rem; }
    .shooter__stats .game__stat-value--small { font-size: 1.05rem; }
    .shooter__stats .game__stat-label { font-size: 0.66rem; }
    .shooter__hint { font-size: 0.82rem; }
    .shooter__hint--keys { font-size: 0.75rem; }
}

@media (max-width: 380px) {
    .brand__word { font-size: 1.45rem; }
    .header-tools .icon-button { width: 38px; height: 38px; }
    .header-tools .button--small { width: 38px; min-height: 38px; }
    .lang-switch button { min-width: 27px; font-size: 0.95rem; }
    .hero__title { font-size: 3.4rem; }
    .game__layout { grid-template-columns: 74px minmax(0, 1fr); }
    .game__stat-value { font-size: 1.3rem; }
    .game__header { gap: 0.4rem; }
    .game__title { font-size: 1.25rem; }
    .game__tools { gap: 0.3rem; }
    .game__tools .icon-button { width: 38px; height: 38px; }
}

@media (max-width: 760px) {
    .game-grid { grid-template-columns: 1fr; }
}

@media (max-height: 680px) and (min-width: 641px) {
    .game__stage { height: min(66vh, 440px); }
    .game__hint { display: none; }
}

@media (max-width: 640px) and (max-height: 680px) {
    .exp { gap: 0.4rem; }
    .exp__hint--keys { display: none; }
    .exp__stage-wrap { gap: 0.45rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .arcade-fall {
        animation: none;
        opacity: 1;
        transform: translateY(120px);
    }
}

/* ---------- Matching Blocks ---------- */

.block--coral { fill: #ff7a6b; }
.block--blue { fill: #5b9dff; }

.app-icon--matching .app-icon__tile { background: #ff4d8d; color: #12101f; }

.game-feature__art--matching { background-color: #2a1a52; }
.game-feature__art--matching .game-feature__no { color: rgba(255, 255, 255, 0.22); }
.game-feature--matching {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.game-feature--matching .game-feature__art {
    grid-column: 2;
    grid-row: 1;
    height: 100%;
    min-height: 420px;
    border-right: 0;
    border-bottom: 0;
    border-left: 3px solid var(--border);
}

.game-feature--matching .game-feature__body {
    grid-column: 1;
    grid-row: 1;
    justify-content: center;
    padding: clamp(2rem, 4vw, 3rem);
}

.game-feature--matching .game-feature__screen {
    width: min(300px, 78%);
    transform: rotate(-1.5deg);
}

.match-art {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    box-shadow: 0 12px 26px rgba(5, 4, 12, 0.38);
}

.match-art__tile {
    transform-box: fill-box;
    transform-origin: center;
    animation: match-art-float 4.6s ease-in-out infinite;
}

.match-art__glow { animation: match-art-glow 2.6s ease-in-out infinite; }
.match-art__spark { animation: match-art-spark 3s ease-in-out infinite; }

@keyframes match-art-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-1.6px); }
}

@keyframes match-art-glow {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

@keyframes match-art-spark {
    0%, 100% { opacity: 0.55; transform: scale(0.96); }
    50% { opacity: 1; transform: scale(1.05); }
}

.game--matching-blocks {
    --match-size: min(92vw, 52vh, 520px);
    --match-board: #100d1d;
}
.game--matching-blocks .game__inner { max-width: 700px; }

.match {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 0;
}

.match__hud {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    width: var(--match-size);
}

.match__hud .game__stat {
    align-items: center;
    padding: 0.4rem 0.5rem;
    text-align: center;
}

.match__hud .game__stat-value { font-size: 2.3rem; }
.match__hud .game__stat-value--small { font-size: 1.55rem; }

.match__meter {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.55rem;
    width: var(--match-size);
}

.match__meter-label {
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    line-height: 1;
    text-transform: uppercase;
}

.match__meter-track {
    position: relative;
    height: 14px;
    overflow: hidden;
    border: 2px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
}

.match__meter-fill {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--cyan), var(--lime));
    transition: width 120ms linear, background 300ms ease;
}

.match__meter-value {
    min-width: 3.4ch;
    font-family: var(--font-display);
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.match__meter.is-low .match__meter-fill { background: var(--coral); }

.match__meter.is-low .match__meter-value {
    color: var(--coral);
    animation: match-alarm 760ms ease-in-out infinite;
}

@keyframes match-alarm {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.14); }
}

.match__stage {
    position: relative;
    width: var(--match-size);
    height: var(--match-size);
    overflow: hidden;
    border: 3px solid var(--border);
    border-radius: 16px;
    background: var(--match-board);
    box-shadow: 8px 8px 0 var(--shadow-color);
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.match__board {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--match-board);
    cursor: pointer;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    transition: filter 320ms ease;
}

.match__stage.is-game-over .match__board {
    filter: saturate(0.3) brightness(0.78);
}

.match__banner {
    position: absolute;
    top: 7%;
    left: 50%;
    z-index: 2;
    padding: 0.16rem 0.9rem;
    border: 2px solid var(--border);
    border-radius: 999px;
    background: var(--lime);
    color: #12101f;
    box-shadow: 3px 3px 0 var(--shadow-color);
    font-family: var(--font-display);
    font-size: 1.4rem;
    letter-spacing: 0.04em;
    line-height: 1.1;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
}

.match__banner.is-showing { animation: match-banner 1400ms ease both; }

@keyframes match-banner {
    0% { opacity: 0; transform: translate(-50%, 10px) scale(0.9); }
    12% { opacity: 1; transform: translate(-50%, 0) scale(1); }
    78% { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -10px) scale(0.98); }
}

.match__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    width: min(420px, 100%);
}

.match__control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 48px;
    padding: 0.4rem 1rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
    touch-action: manipulation;
    transition: transform 90ms ease, background 90ms ease;
}

.match__control:hover { background: var(--surface-2); }
.match__control:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow-color); }
.match__control .icon { width: 1.15rem; height: 1.15rem; }
.match__control--primary { background: var(--lime); color: #12101f; }
.match__control--primary:hover { background: #d7ff77; }

.match__hint {
    width: var(--match-size);
    max-width: 100%;
    margin: 0;
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 0.96rem;
    line-height: 1.2;
    text-align: center;
}

.match__hint--keys { font-size: 0.82rem; opacity: 0.82; }

.game--matching-blocks .game__overlay:not([hidden]) {
    animation: match-overlay-in 260ms ease-out both;
}

@keyframes match-overlay-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 900px) {
    .game-feature--matching .game-feature__screen { width: min(280px, 76%); }
}

@media (max-width: 760px) {
    .game-feature--matching { display: flex; }
    .game-feature--matching .game-feature__art {
        height: 280px;
        min-height: 0;
        border-left: 0;
        border-bottom: 3px solid var(--border);
    }
    .game-feature--matching .game-feature__body { padding: 1.4rem; }
    .game-feature--matching .game-feature__screen { width: min(240px, 72%); transform: rotate(-1.5deg); }
}

@media (max-width: 640px) {
    .game--matching-blocks { --match-size: min(94vw, 47vh, 460px); }
    .match__hud .game__stat-value { font-size: 1.85rem; }
    .match__hud .game__stat-value--small { font-size: 1.25rem; }
    .match__hint--keys { display: none; }
    .match__actions { width: var(--match-size); }
}

/* ---------- Share ---------- */

.section--share { padding-block: clamp(3.2rem, 6vw, 5rem); }

.share {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(1.6rem, 4vw, 3.5rem);
    padding: clamp(1.5rem, 3.5vw, 2.8rem);
    overflow: hidden;
    border: 3px solid var(--border);
    border-radius: 28px;
    background: var(--surface);
    box-shadow: 10px 10px 0 var(--shadow-color);
}

.share::before {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--dot) 1.2px, transparent 1.2px);
    background-size: 16px 16px;
    content: '';
    opacity: 0.7;
    pointer-events: none;
}

.share__copy,
.share__qr { position: relative; }

.share__copy .eyebrow { margin-bottom: 0.7rem; }
.share .section__title { margin-bottom: 0.55rem; font-size: clamp(2.2rem, 5vw, 3.6rem); }
.share .section__lede { max-width: 58ch; }

.share__link {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin-top: 1.5rem;
}

.share__domain {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0.35rem 1rem;
    border: 2px dashed var(--border);
    border-radius: 12px;
    background: var(--bg);
    font-family: var(--font-display);
    font-size: clamp(1.05rem, 2.5vw, 1.3rem);
    letter-spacing: 0.03em;
    line-height: 1.1;
    user-select: all;
    -webkit-user-select: all;
}

.share__status {
    min-height: 1.5em;
    margin: 0.6rem 0 0;
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 1rem;
    line-height: 1.2;
}

.share__note {
    margin: 0.15rem 0 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.share.is-copied .share__copy-button { animation: share-copied 420ms ease; }

@keyframes share-copied {
    0% { transform: scale(1); }
    40% { transform: scale(1.05) rotate(-1deg); }
    100% { transform: scale(1); }
}

.share__qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.share__qr-frame {
    padding: 12px;
    border: 3px solid var(--border);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.share__qr-canvas {
    display: block;
    width: clamp(140px, 17vw, 176px);
    height: auto;
    aspect-ratio: 1 / 1;
    image-rendering: pixelated;
}

.share__qr-caption {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 0.95rem;
    letter-spacing: 0.07em;
    line-height: 1;
    text-transform: uppercase;
}

.share__qr-caption .icon { width: 1.05rem; height: 1.05rem; }

@media (max-width: 760px) {
    .share {
        grid-template-columns: minmax(0, 1fr);
        text-align: left;
    }

    .share__qr { justify-self: center; }
    .share__qr-canvas { width: clamp(150px, 42vw, 190px); }
    .share__link { gap: 0.55rem; }
    .share__domain { flex: 1 1 auto; }
    .share__copy-button { flex: 0 0 auto; }
}
