:root {
    color-scheme: dark;
    --bg: #030713;
    --glass: rgba(7, 18, 36, 0.72);
    --glass-strong: rgba(11, 27, 52, 0.9);
    --line: rgba(155, 219, 255, 0.28);
    --text: #f7fbff;
    --muted: #a7bdd3;
    --gold: #ffd36e;
    --cyan: #58d9ff;
    --green: #62f0b0;
    --red: #ff6c95;
    --violet: #c99cff;
    --cell: min(8vw, 82px);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", "Microsoft JhengHei", Arial, sans-serif;
    color: var(--text);
    background:
        linear-gradient(90deg, rgba(164, 220, 255, 0.08) 0 1px, transparent 1px 128px),
        radial-gradient(circle at 20% 14%, rgba(74, 172, 255, 0.28), transparent 28%),
        radial-gradient(circle at 78% 18%, rgba(255, 211, 110, 0.16), transparent 26%),
        radial-gradient(circle at 50% 82%, rgba(133, 87, 255, 0.22), transparent 34%),
        linear-gradient(145deg, #06172a 0%, #061121 48%, #120923 100%);
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(115deg, transparent 0 17%, rgba(255, 255, 255, 0.07) 17.2% 17.6%, transparent 18% 100%),
        linear-gradient(245deg, transparent 0 14%, rgba(255, 255, 255, 0.06) 14.2% 14.5%, transparent 15% 100%);
    opacity: 0.75;
}

button,
input {
    font: inherit;
}

.app-shell {
    position: relative;
    width: min(1180px, calc(100% - 28px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 14px 0 26px;
}

.top-hud {
    display: grid;
    grid-template-columns: 350px minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
}

.brand-block,
.meter-strip,
.side-panel,
.board-frame,
.control-dock {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(14, 35, 63, 0.88), rgba(5, 13, 27, 0.86));
    box-shadow:
        0 18px 48px rgba(0, 0, 0, 0.36),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(14px);
}

.brand-block {
    min-height: 118px;
    display: grid;
    align-content: center;
    padding: 18px 22px;
    border-radius: 18px 18px 10px 10px;
}

.brand-kicker {
    display: block;
    color: var(--cyan);
    font-size: 0.75rem;
    font-weight: 950;
    text-transform: uppercase;
    text-shadow: 0 0 12px rgba(88, 217, 255, 0.7);
}

h1,
h2,
p {
    margin: 0;
    letter-spacing: 0;
}

h1 {
    margin-top: 2px;
    color: #fff2a9;
    font-size: clamp(2.15rem, 5vw, 4.1rem);
    font-weight: 1000;
    line-height: 0.9;
    text-shadow:
        0 2px 0 #6c4212,
        0 5px 0 #2d1a05,
        0 0 24px rgba(255, 211, 110, 0.48);
}

.brand-block p {
    margin-top: 10px;
    color: #d7eeff;
    font-weight: 700;
}

.meter-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border-radius: 18px 18px 10px 10px;
}

.meter {
    display: grid;
    align-content: center;
    min-height: 118px;
    padding: 12px 15px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 48%),
        rgba(3, 11, 24, 0.44);
}

.meter span {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.meter strong {
    margin-top: 7px;
    color: var(--text);
    font-size: clamp(1rem, 1.7vw, 1.32rem);
    line-height: 1;
    text-shadow: 0 0 12px rgba(88, 217, 255, 0.18);
}

.meter.hot strong {
    color: var(--gold);
}

.meter.mult strong {
    color: var(--green);
}

.game-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 12px;
    margin-top: 12px;
}

.reel-stage {
    min-width: 0;
}

.space-gate {
    position: relative;
    display: grid;
    place-items: center;
    min-height: calc(var(--cell) * 5 + 210px);
    padding: 118px 28px 70px;
    border: 1px solid rgba(88, 217, 255, 0.32);
    border-radius: 22px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.12), transparent 18%, transparent 82%, rgba(255, 255, 255, 0.1)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.11), transparent 20%, transparent 78%, rgba(255, 255, 255, 0.08)),
        radial-gradient(ellipse at center, rgba(14, 82, 130, 0.54), rgba(4, 13, 28, 0.96) 64%);
    overflow: hidden;
    box-shadow: inset 0 0 52px rgba(88, 217, 255, 0.16), 0 24px 64px rgba(0, 0, 0, 0.36);
}

.title-plaque {
    position: absolute;
    z-index: 5;
    top: 18px;
    left: 50%;
    width: min(450px, calc(100% - 128px));
    transform: translateX(-50%);
    display: grid;
    justify-items: center;
    padding: 8px 18px 12px;
    border: 1px solid rgba(119, 203, 255, 0.55);
    border-radius: 28px;
    background:
        radial-gradient(circle at 50% 0%, rgba(88, 217, 255, 0.34), transparent 56%),
        linear-gradient(180deg, rgba(13, 41, 96, 0.98), rgba(20, 13, 62, 0.96));
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.28),
        0 0 22px rgba(88, 217, 255, 0.4),
        0 12px 24px rgba(0, 0, 0, 0.34);
}

.title-plaque span {
    color: #fff5c9;
    font-size: 0.92rem;
    font-weight: 1000;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.58);
}

.title-plaque strong {
    margin-top: -2px;
    color: #ffe18a;
    font-size: clamp(2rem, 4.3vw, 3.55rem);
    font-weight: 1000;
    line-height: 0.92;
    text-shadow:
        0 2px 0 #7d4611,
        0 5px 0 #2b1604,
        0 0 18px rgba(255, 211, 110, 0.5);
}

.title-plaque em {
    min-width: 76%;
    margin-top: 7px;
    padding: 4px 12px;
    border: 1px solid rgba(255, 91, 235, 0.48);
    border-radius: 999px;
    background: rgba(55, 15, 100, 0.74);
    color: #e9d8ff;
    font-size: 0.8rem;
    font-style: normal;
    font-weight: 850;
    text-align: center;
}

.space-mascot {
    position: absolute;
    z-index: 6;
    top: 46px;
    right: max(22px, 11%);
    width: 96px;
    height: 96px;
    border: 3px solid rgba(217, 247, 255, 0.78);
    border-radius: 50%;
    background:
        radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.95), transparent 18%),
        radial-gradient(circle at 50% 50%, rgba(91, 226, 255, 0.46), rgba(255, 255, 255, 0.14) 64%, rgba(103, 202, 255, 0.32));
    box-shadow: 0 0 32px rgba(88, 217, 255, 0.42);
}

.space-mascot::before {
    content: "";
    position: absolute;
    left: 20px;
    top: 24px;
    width: 56px;
    height: 44px;
    border-radius: 20px 20px 24px 24px;
    background: #ffc0c7;
    box-shadow: inset 0 -8px 0 rgba(184, 86, 105, 0.18);
}

.space-mascot::after {
    content: "";
    position: absolute;
    left: 12px;
    top: 66px;
    width: 72px;
    height: 28px;
    border-radius: 20px;
    background: linear-gradient(180deg, #f5f7ff, #9fb1c8);
}

.space-mascot .helmet {
    position: absolute;
    z-index: 2;
    right: 11px;
    top: 8px;
    color: var(--gold);
    font-size: 1.2rem;
}

.space-mascot .visor {
    position: absolute;
    z-index: 3;
    left: 28px;
    top: 34px;
    width: 42px;
    height: 15px;
    border-radius: 999px;
    background: #111527;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.18);
}

.side-arrow {
    position: absolute;
    z-index: 4;
    top: 54%;
    width: 48px;
    height: 76px;
    transform: translateY(-50%);
    border: 1px solid rgba(88, 217, 255, 0.62);
    background: linear-gradient(180deg, rgba(86, 205, 255, 0.36), rgba(26, 78, 141, 0.58));
    box-shadow: 0 0 28px rgba(88, 217, 255, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    clip-path: polygon(100% 0, 100% 100%, 0 50%);
}

.side-arrow.left {
    left: 18px;
}

.side-arrow.right {
    right: 18px;
    transform: translateY(-50%) scaleX(-1);
}

.space-gate::before {
    content: "";
    position: absolute;
    width: min(88%, 780px);
    aspect-ratio: 1 / 0.72;
    border: 22px solid rgba(180, 225, 255, 0.15);
    border-radius: 50%;
    box-shadow:
        inset 0 0 0 2px rgba(88, 217, 255, 0.25),
        0 0 0 16px rgba(255, 255, 255, 0.04),
        0 0 70px rgba(88, 217, 255, 0.2);
}

.space-gate.feature-rotating::before {
    animation: portal-spin 0.68s ease both;
}

@keyframes portal-spin {
    0% {
        transform: rotate(0deg) scale(1);
        filter: brightness(1);
    }
    50% {
        transform: rotate(-90deg) scale(1.04);
        filter: brightness(1.35);
    }
    100% {
        transform: rotate(-90deg) scale(1);
        filter: brightness(1.08);
    }
}

.space-gate::after {
    content: "";
    position: absolute;
    inset: auto 8% 20px;
    height: 72px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(1, 8, 18, 0.6));
    clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%);
}

.board-frame {
    position: relative;
    z-index: 1;
    padding: 13px;
    border-radius: 22px;
    background:
        linear-gradient(145deg, rgba(172, 224, 255, 0.24), rgba(8, 22, 42, 0.94) 42%, rgba(255, 211, 110, 0.14));
}

.board-frame::before {
    content: "";
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    pointer-events: none;
}

.board {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, var(--cell));
    grid-template-rows: repeat(5, var(--cell));
    width: calc(var(--cell) * 5);
    height: calc(var(--cell) * 5);
    border: 1px solid rgba(88, 217, 255, 0.55);
    border-radius: 12px;
    background:
        linear-gradient(rgba(88, 217, 255, 0.18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(88, 217, 255, 0.18) 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, rgba(13, 60, 108, 0.92), rgba(2, 7, 21, 0.98));
    background-size: var(--cell) var(--cell), var(--cell) var(--cell), 100% 100%;
    box-shadow: inset 0 0 28px rgba(88, 217, 255, 0.2);
    overflow: hidden;
}

.board.rotating {
    animation: board-turn 0.98s cubic-bezier(0.2, 0.82, 0.22, 1) both;
    transform-origin: 50% 50%;
}

.board.spin-mode .symbol {
    opacity: 0.18;
    filter: blur(1px) brightness(0.7);
}

.reel-overlay {
    position: absolute;
    z-index: 30;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    overflow: hidden;
    background: rgba(4, 12, 28, 0.28);
    pointer-events: none;
}

.reel-column {
    position: relative;
    overflow: hidden;
    border-right: 1px solid rgba(88, 217, 255, 0.12);
    mask-image: linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent);
}

.reel-strip {
    position: absolute;
    left: 7px;
    right: 7px;
    top: -420%;
    display: grid;
    grid-auto-rows: var(--cell);
    animation: reel-rush var(--reel-duration) linear infinite;
    animation-delay: calc(var(--reel-delay) * -1);
}

.reel-overlay.stopping .reel-strip {
    animation: reel-stop 0.62s cubic-bezier(0.13, 0.82, 0.19, 1) forwards;
    animation-delay: var(--reel-delay);
}

.reel-tile {
    display: grid;
    place-items: center;
    margin: 6px 0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    background:
        radial-gradient(circle at 34% 20%, rgba(255, 255, 255, 0.38), transparent 30%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.16), rgba(5, 12, 26, 0.82));
    color: #fff07e;
    font-size: clamp(1.35rem, 3vw, 2.2rem);
    font-weight: 1000;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.54), 0 0 12px currentColor;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 16px rgba(0, 0, 0, 0.28);
}

.reel-tile svg {
    width: 74%;
    height: 74%;
}

.reel-tile.mid {
    color: #64dcff;
}

.reel-tile.high {
    color: #ff90df;
}

.reel-tile.wild {
    color: #79ffbc;
}

.reel-tile.scatter {
    color: #c99cff;
}

.board.dropping .symbol {
    animation: symbol-drop 0.62s cubic-bezier(0.12, 0.84, 0.22, 1.14) both;
    animation-delay: var(--drop-delay);
}

.board.rotation-landed {
    animation: board-impact 0.32s ease both;
}

@keyframes reel-rush {
    0% {
        transform: translateY(0);
        filter: blur(0.5px);
    }
    100% {
        transform: translateY(42%);
        filter: blur(2.2px);
    }
}

@keyframes reel-stop {
    0% {
        transform: translateY(0);
        filter: blur(2px) brightness(1.25);
    }
    68% {
        transform: translateY(338%);
        filter: blur(0.8px) brightness(1.12);
    }
    100% {
        transform: translateY(320%);
        filter: blur(0) brightness(1);
    }
}

@keyframes symbol-drop {
    0% {
        transform: translateY(var(--drop-y)) scaleY(1.08);
        opacity: 0;
        filter: blur(1.6px);
    }
    58% {
        transform: translateY(14px) scaleY(0.94);
        opacity: 1;
        filter: blur(0);
    }
    78% {
        transform: translateY(-5px) scaleY(1.03);
        opacity: 1;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes board-impact {
    0% {
        transform: scale(1);
        filter: brightness(1.2);
    }
    45% {
        transform: scale(1.025);
        filter: brightness(1.34);
    }
    100% {
        transform: scale(1);
        filter: brightness(1);
    }
}

@keyframes board-turn {
    0% {
        transform: rotate(0deg) scale(1);
        filter: brightness(1);
    }
    42% {
        transform: rotate(-90deg) scale(0.95);
        filter: brightness(1.38) saturate(1.25);
    }
    58% {
        transform: rotate(-90deg) scale(0.95);
        filter: brightness(1.48) saturate(1.35);
    }
    100% {
        transform: rotate(-90deg) scale(1);
        filter: brightness(1.15);
    }
}

.symbol {
    position: relative;
    display: grid;
    place-items: center;
    margin: 6px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 18px;
    color: #fff;
    background:
        radial-gradient(circle at 32% 18%, rgba(255, 255, 255, 0.42), transparent 28%),
        linear-gradient(155deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04) 46%, rgba(0, 0, 0, 0.18));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        inset 0 -12px 18px rgba(0, 0, 0, 0.22),
        0 10px 18px rgba(0, 0, 0, 0.3);
    transition: transform 0.22s ease, opacity 0.22s ease, filter 0.22s ease;
}

.symbol strong {
    display: grid;
    place-items: center;
    width: 74%;
    height: 74%;
    font-size: clamp(1.35rem, 3.2vw, 2.22rem);
    line-height: 1;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5), 0 0 14px currentColor;
}

.symbol svg {
    width: 100%;
    height: 100%;
    overflow: visible;
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.35));
}

.symbol small {
    position: absolute;
    right: 8px;
    bottom: 7px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.64rem;
    font-weight: 950;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
}

.symbol.large {
    z-index: 3;
    margin: 8px;
    border-color: rgba(255, 211, 110, 0.58);
    border-radius: 24px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -18px 26px rgba(0, 0, 0, 0.22),
        0 0 28px rgba(255, 211, 110, 0.22),
        0 16px 28px rgba(0, 0, 0, 0.36);
}

.symbol.large strong {
    width: 66%;
    height: 66%;
}

.symbol.winning {
    z-index: 5;
    animation: win-pulse 0.5s ease infinite alternate;
    filter: saturate(1.35) brightness(1.18);
}

@keyframes win-pulse {
    from {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(255, 211, 110, 0);
    }
    to {
        transform: scale(1.08);
        box-shadow: 0 0 30px rgba(255, 211, 110, 0.78);
    }
}

.symbol.low {
    color: #fff07e;
}

.symbol.mid {
    color: #64dcff;
}

.symbol.high {
    color: #ff90df;
}

.symbol.wild {
    color: #79ffbc;
}

.symbol.scatter {
    color: #c99cff;
}

.cascade-banner {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    min-width: min(420px, calc(100% - 48px));
    padding: 10px 18px;
    border: 1px solid rgba(255, 211, 110, 0.5);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(16, 26, 43, 0.9), rgba(3, 10, 22, 0.9));
    color: var(--gold);
    text-align: center;
    font-weight: 950;
    box-shadow: 0 0 28px rgba(255, 211, 110, 0.12);
}

.control-dock {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
    padding: 13px 16px;
    border-radius: 10px 10px 22px 22px;
}

.spin-button,
.stepper {
    border: 0;
    cursor: pointer;
    color: #07111e;
    font-weight: 1000;
}

.spin-button {
    width: 118px;
    height: 118px;
    border-radius: 50%;
    background: radial-gradient(circle at 36% 22%, #fff8c4, #ffbf3d 42%, #b15f0c 100%);
    box-shadow:
        0 0 0 8px rgba(255, 211, 110, 0.18),
        0 18px 32px rgba(0, 0, 0, 0.45),
        inset 0 3px 0 rgba(255, 255, 255, 0.54);
    font-size: 1.22rem;
}

.spin-button:hover {
    filter: brightness(1.08);
}

.spin-button:disabled {
    cursor: wait;
    filter: grayscale(0.4) brightness(0.72);
}

.stepper {
    width: 62px;
    height: 62px;
    border-radius: 16px;
    background: linear-gradient(180deg, #93e4ff, #2677ad);
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45), 0 10px 18px rgba(0, 0, 0, 0.28);
    font-size: 1.8rem;
}

.side-panel {
    min-width: 0;
    padding: 16px;
    border-radius: 14px;
}

.panel-section + .panel-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.panel-section h2 {
    font-size: 1.02rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.stat-grid div {
    min-height: 68px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.stat-grid span {
    color: var(--muted);
    font-size: 0.7rem;
}

.stat-grid strong {
    display: block;
    margin-top: 7px;
    color: var(--gold);
    font-size: 1.18rem;
}

.rule-list {
    margin: 12px 0 0;
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.58;
    font-size: 0.88rem;
}

.event-log {
    display: grid;
    gap: 8px;
    max-height: 230px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    overflow: auto;
}

.event-log li {
    padding: 9px 10px;
    border-left: 3px solid rgba(88, 217, 255, 0.66);
    border-radius: 0 8px 8px 0;
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.36;
}

@media (max-width: 900px) {
    :root {
        --cell: min(16vw, 82px);
    }

    .top-hud,
    .game-layout {
        grid-template-columns: 1fr;
    }

    .meter-strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .meter,
    .brand-block {
        min-height: 92px;
    }
}

body.orientation-portrait.compact-viewport {
    background:
        radial-gradient(circle at 50% 8%, rgba(214, 240, 255, 0.38), transparent 30%),
        radial-gradient(circle at 50% 84%, rgba(88, 217, 255, 0.2), transparent 30%),
        linear-gradient(180deg, #dcebf7 0%, #95b7d4 16%, #06152a 40%, #090e22 100%);
}

body.orientation-portrait.compact-viewport .app-shell {
    width: min(100% - 10px, 460px);
    padding-top: 6px;
}

body.orientation-portrait.compact-viewport .top-hud {
    display: block;
}

body.orientation-portrait.compact-viewport .brand-block {
    min-height: 92px;
    padding: 12px 16px;
    border-radius: 18px;
    text-align: center;
}

body.orientation-portrait.compact-viewport .brand-kicker {
    font-size: 0.68rem;
}

body.orientation-portrait.compact-viewport h1 {
    font-size: clamp(2.15rem, 13vw, 3.55rem);
}

body.orientation-portrait.compact-viewport .brand-block p {
    margin-top: 4px;
    font-size: 0.82rem;
}

body.orientation-portrait.compact-viewport .meter-strip {
    grid-template-columns: repeat(4, 1fr);
    margin-top: 6px;
    border-radius: 14px;
}

body.orientation-portrait.compact-viewport .meter {
    min-height: 58px;
    padding: 8px 6px;
}

body.orientation-portrait.compact-viewport .meter span {
    font-size: 0.62rem;
}

body.orientation-portrait.compact-viewport .meter strong {
    font-size: clamp(0.76rem, 3.6vw, 1rem);
}

body.orientation-portrait.compact-viewport .game-layout {
    display: block;
    margin-top: 7px;
}

body.orientation-portrait.compact-viewport .space-gate {
    min-height: calc(var(--cell) * 5 + 178px);
    padding: 104px 7px 58px;
    border-radius: 24px;
}

body.orientation-portrait.compact-viewport .title-plaque {
    top: 12px;
    width: min(338px, calc(100% - 72px));
    padding: 7px 12px 10px;
}

body.orientation-portrait.compact-viewport .title-plaque span {
    font-size: 0.72rem;
}

body.orientation-portrait.compact-viewport .title-plaque strong {
    font-size: clamp(1.85rem, 10vw, 3rem);
}

body.orientation-portrait.compact-viewport .title-plaque em {
    min-width: 86%;
    font-size: 0.68rem;
}

body.orientation-portrait.compact-viewport .space-mascot {
    top: 44px;
    right: 18px;
    width: 70px;
    height: 70px;
}

body.orientation-portrait.compact-viewport .space-mascot::before {
    left: 15px;
    top: 18px;
    width: 40px;
    height: 31px;
}

body.orientation-portrait.compact-viewport .space-mascot::after {
    left: 9px;
    top: 48px;
    width: 52px;
    height: 20px;
}

body.orientation-portrait.compact-viewport .space-mascot .visor {
    left: 20px;
    top: 25px;
    width: 31px;
    height: 11px;
}

body.orientation-portrait.compact-viewport .side-arrow {
    width: 32px;
    height: 56px;
}

body.orientation-portrait.compact-viewport .side-arrow.left {
    left: 4px;
}

body.orientation-portrait.compact-viewport .side-arrow.right {
    right: 4px;
}

body.orientation-portrait.compact-viewport .control-dock {
    margin-top: 7px;
    padding: 10px;
    border-radius: 18px;
}

body.orientation-portrait.compact-viewport .side-panel {
    margin-top: 7px;
    padding: 12px;
    border-radius: 18px;
}

body.orientation-portrait.compact-viewport .panel-section:nth-of-type(2) {
    display: none;
}

body.orientation-portrait.compact-viewport .event-log {
    max-height: 116px;
}

body.orientation-landscape.compact-viewport {
    overflow: hidden;
}

body.orientation-landscape.compact-viewport .app-shell {
    width: min(100% - 12px, 1080px);
    padding-top: 6px;
}

body.orientation-landscape.compact-viewport .top-hud {
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 8px;
}

body.orientation-landscape.compact-viewport .brand-block {
    min-height: 64px;
    padding: 8px 14px;
    border-radius: 14px;
}

body.orientation-landscape.compact-viewport .brand-kicker,
body.orientation-landscape.compact-viewport .brand-block p {
    display: none;
}

body.orientation-landscape.compact-viewport h1 {
    font-size: clamp(1.75rem, 5.4vw, 2.8rem);
}

body.orientation-landscape.compact-viewport .meter-strip {
    grid-template-columns: repeat(4, 1fr);
    border-radius: 14px;
}

body.orientation-landscape.compact-viewport .meter {
    min-height: 64px;
    padding: 8px 10px;
}

body.orientation-landscape.compact-viewport .meter span {
    font-size: 0.62rem;
}

body.orientation-landscape.compact-viewport .meter strong {
    font-size: clamp(0.78rem, 2vw, 1rem);
}

body.orientation-landscape.compact-viewport .game-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 8px;
    margin-top: 8px;
}

body.orientation-landscape.compact-viewport .space-gate {
    min-height: calc(var(--cell) * 5 + 92px);
    padding: 58px 8px 38px;
    border-radius: 18px;
}

body.orientation-landscape.compact-viewport .title-plaque {
    top: 6px;
    width: min(280px, calc(100% - 92px));
    padding: 5px 10px 7px;
}

body.orientation-landscape.compact-viewport .title-plaque span,
body.orientation-landscape.compact-viewport .title-plaque em {
    display: none;
}

body.orientation-landscape.compact-viewport .title-plaque strong {
    font-size: clamp(1.45rem, 4vw, 2.18rem);
}

body.orientation-landscape.compact-viewport .space-mascot {
    top: 18px;
    right: 34px;
    width: 58px;
    height: 58px;
}

body.orientation-landscape.compact-viewport .space-mascot::before {
    left: 13px;
    top: 15px;
    width: 33px;
    height: 26px;
}

body.orientation-landscape.compact-viewport .space-mascot::after {
    left: 7px;
    top: 39px;
    width: 44px;
    height: 17px;
}

body.orientation-landscape.compact-viewport .space-mascot .visor {
    left: 18px;
    top: 22px;
    width: 25px;
    height: 9px;
}

body.orientation-landscape.compact-viewport .side-panel {
    padding: 10px;
    border-radius: 14px;
}

body.orientation-landscape.compact-viewport .panel-section:nth-of-type(2) {
    display: none;
}

body.orientation-landscape.compact-viewport .panel-section + .panel-section {
    margin-top: 10px;
    padding-top: 10px;
}

body.orientation-landscape.compact-viewport .stat-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

body.orientation-landscape.compact-viewport .stat-grid div {
    min-height: 50px;
    padding: 7px;
}

body.orientation-landscape.compact-viewport .event-log {
    max-height: 180px;
}

body.orientation-landscape.compact-viewport .control-dock {
    margin-top: 8px;
    padding: 8px;
}

body.orientation-landscape.compact-viewport .spin-button {
    width: 82px;
    height: 82px;
    font-size: 1rem;
}

body.orientation-landscape.compact-viewport .stepper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
}

@media (max-width: 620px) {
    :root {
        --cell: calc((100vw - 72px) / 5);
    }

    .app-shell {
        width: min(100% - 14px, 1180px);
        padding-top: 7px;
    }

    .brand-block {
        padding: 13px 15px;
    }

    .meter {
        min-height: 70px;
        padding: 9px 10px;
    }

    .space-gate {
        min-height: calc(var(--cell) * 5 + 88px);
        padding: 16px 8px 50px;
    }

    .space-gate::before {
        border-width: 9px;
    }

    .board-frame {
        padding: 7px;
        border-radius: 14px;
    }

    .symbol {
        margin: 4px;
        border-radius: 12px;
    }

    .symbol.large {
        margin: 5px;
        border-radius: 18px;
    }

    .symbol small {
        display: none;
    }

    .spin-button {
        width: 98px;
        height: 98px;
    }

    .stepper {
        width: 56px;
        height: 56px;
    }
}
