@import url("https://fonts.googleapis.com/css2?family=Audiowide&family=Bungee&family=Cinzel:wght@700&family=Press+Start+2P&display=swap");

/* Arcade cabinet. The glass is a transparent hole in arcade-cabinet.png
   (571×1024). The play shell sits in that hole and nowhere else. */
body.arcade-cab:not(.game-menu-active) {
    background: #07060c !important;
}

body.arcade-cab:not(.game-menu-active)::before,
body.arcade-cab:not(.game-menu-active)::after {
    display: none !important;
}

body.arcade-cab:not(.game-menu-active) .game-screen.active {
    display: flex !important;
    min-height: 100vh;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    padding: 5rem 0 0.35rem;
    background: #07060c !important;
}

body.arcade-cab:not(.game-menu-active) .cab-stage {
    position: relative;
    aspect-ratio: 571 / 1024;
    height: min(calc(100vh - 5.35rem), calc(100vw * 1024 / 571));
    width: auto;
    max-width: 100vw;
    margin: 0 auto;
    flex: 0 0 auto;
    background: url("/games/shared/arcade-cabinet.png?v=20261122p") 0 0 / 100% 100% no-repeat;
    container-type: size;
}

body.arcade-cab:not(.game-menu-active) .cab-marquee {
    position: absolute;
    left: 19%;
    right: 19%;
    top: 9.4%;
    height: 7.6%;
    margin: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
}

body.arcade-cab.vault-tide .cab-marquee--tetris:not(i[class*="fa-"]):not(.fa):not(.fas):not(.far):not(.fab):not(.fa-solid):not(.fa-regular):not(.fa-brands):not(.mt-card[data-deck="disasters"] *) {
    font-family: "Press Start 2P", "Courier New", monospace !important;
    font-weight: 400 !important;
    font-size: 6cqw !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    color: #e23b32 !important;
    -webkit-text-fill-color: #e23b32 !important;
    text-shadow: 2px 2px 0 #14110e !important;
}

body.arcade-cab.vault-tide .cab-marquee--invaders:not(i[class*="fa-"]):not(.fa):not(.fas):not(.far):not(.fab):not(.fa-solid):not(.fa-regular):not(.fa-brands):not(.mt-card[data-deck="disasters"] *) {
    font-family: "Press Start 2P", "Courier New", monospace !important;
    font-weight: 400 !important;
    font-size: 3.4cqw !important;
    letter-spacing: 0 !important;
    text-transform: uppercase !important;
    color: #39ff14 !important;
    -webkit-text-fill-color: #39ff14 !important;
    text-shadow: 0 0 8px #39ff14, 2px 2px 0 #ff2bd6 !important;
}

body.arcade-cab.vault-tide .cab-marquee--sieve:not(i[class*="fa-"]):not(.fa):not(.fas):not(.far):not(.fab):not(.fa-solid):not(.fa-regular):not(.fa-brands):not(.mt-card[data-deck="disasters"] *) {
    font-family: Audiowide, "Arial Black", sans-serif !important;
    font-weight: 400 !important;
    font-size: 4.6cqw !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    color: #7ef6ff !important;
    -webkit-text-fill-color: #7ef6ff !important;
    text-shadow: 2px 2px 0 #7a4cff, 4px 4px 0 #e6b325 !important;
}

body.arcade-cab.vault-tide .cab-marquee--simon:not(i[class*="fa-"]):not(.fa):not(.fas):not(.far):not(.fab):not(.fa-solid):not(.fa-regular):not(.fa-brands):not(.mt-card[data-deck="disasters"] *) {
    font-family: Bungee, "Arial Black", sans-serif !important;
    font-weight: 400 !important;
    font-size: 7cqw !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    color: transparent !important;
    background: linear-gradient(90deg, #22c55e 0 25%, #ef4444 25% 50%, #facc15 50% 75%, #3b82f6 75% 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent !important;
    text-shadow: none !important;
    filter: drop-shadow(0 2px 0 #14110e);
}

body.arcade-cab:not(.game-menu-active) .cab-marquee--simon {
    width: max-content;
    max-width: 70%;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
}

body.arcade-cab.vault-tide .cab-marquee--pool:not(i[class*="fa-"]):not(.fa):not(.fas):not(.far):not(.fab):not(.fa-solid):not(.fa-regular):not(.fa-brands):not(.mt-card[data-deck="disasters"] *) {
    font-family: Cinzel, "Times New Roman", serif !important;
    font-weight: 700 !important;
    font-size: 4.8cqw !important;
    letter-spacing: 0.16em !important;
    text-transform: uppercase !important;
    color: #f3d48a !important;
    -webkit-text-fill-color: #f3d48a !important;
    text-shadow: 0 1px 0 #fff6d2, 0 2px 0 #8a5a12, 0 0 10px rgba(230, 179, 37, 0.75) !important;
}

body.arcade-cab:not(.game-menu-active) .cab-screen {
    position: absolute;
    left: 25.744%;
    top: 28.320%;
    width: 47.636%;
    height: 44.922%;
    overflow: hidden;
    background: #05060f;
    display: flex;
    flex-direction: column;
}

body.arcade-cab:not(.game-menu-active) .cab-screen > .tx-shell,
body.arcade-cab:not(.game-menu-active) .cab-screen > .mi-shell,
body.arcade-cab:not(.game-menu-active) .cab-screen > .pr-shell,
body.arcade-cab:not(.game-menu-active) .cab-screen > .si-shell,
body.arcade-cab:not(.game-menu-active) .cab-screen > .mp-shell {
    flex: 1 1 auto;
    min-height: 0;
    width: 100% !important;
    max-width: none !important;
    height: 100%;
    margin: 0 !important;
    padding: 3px 3px 2px !important;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: transparent !important;
}

body.arcade-cab:not(.game-menu-active) .tx-shell::before {
    display: none !important;
}

body.arcade-cab:not(.game-menu-active) .tx-hint,
body.arcade-cab:not(.game-menu-active) .tx-status,
body.arcade-cab:not(.game-menu-active) .pr-hint,
body.arcade-cab:not(.game-menu-active) .pr-status,
body.arcade-cab:not(.game-menu-active) .mi-hint,
body.arcade-cab:not(.game-menu-active) .si-hint,
body.arcade-cab:not(.game-menu-active) .si-status,
body.arcade-cab:not(.game-menu-active) .mp-hint,
body.arcade-cab:not(.game-menu-active) .mp-status {
    display: none !important;
}

body.arcade-cab:not(.game-menu-active) .tx-hud,
body.arcade-cab:not(.game-menu-active) .mi-hud,
body.arcade-cab:not(.game-menu-active) .pr-hud,
body.arcade-cab:not(.game-menu-active) .si-hud,
body.arcade-cab:not(.game-menu-active) .mp-hud {
    flex: 0 0 auto;
    margin: 0 0 2px !important;
    padding: 2px !important;
    gap: 2px !important;
    max-width: none !important;
    border-width: 2px !important;
}

body.arcade-cab:not(.game-menu-active) .tx-toolbar,
body.arcade-cab:not(.game-menu-active) .pr-toolbar,
body.arcade-cab:not(.game-menu-active) .si-toolbar,
body.arcade-cab:not(.game-menu-active) .mp-toolbar,
body.arcade-cab:not(.game-menu-active) .gc-toolbar {
    flex: 0 0 auto;
    margin: 0 0 2px !important;
    gap: 2px !important;
}

body.arcade-cab:not(.game-menu-active) .tx-tool-btn,
body.arcade-cab:not(.game-menu-active) .pr-tool-btn,
body.arcade-cab:not(.game-menu-active) .si-tool-btn,
body.arcade-cab:not(.game-menu-active) .mp-tool-btn {
    padding: 2px 4px !important;
    font-size: 8px !important;
    min-height: 0 !important;
}

/* Tetris: the well is the whole glass. Next floats over the top-right corner. */
body.arcade-cab.tx-page:not(.game-menu-active) .tx-shell {
    position: relative;
}

body.arcade-cab.tx-page:not(.game-menu-active) .tx-hud,
body.arcade-cab.tx-page:not(.game-menu-active) .tx-toolbar {
    position: absolute;
    left: 4px;
    z-index: 5;
    width: auto;
    margin: 0 !important;
    background: rgba(12, 9, 7, 0.78);
}

body.arcade-cab.tx-page:not(.game-menu-active) .tx-hud {
    top: 4px;
    right: 82px;
    max-width: none !important;
    justify-content: flex-start;
}

body.arcade-cab.tx-page:not(.game-menu-active) .tx-toolbar {
    top: 96px;
    max-width: calc(100% - 86px);
}

body.arcade-cab.tx-page:not(.game-menu-active) .tx-play {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    display: block;
}

body.arcade-cab.tx-page:not(.game-menu-active) .tx-well-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #1a120c;
    box-shadow: none;
}

body.arcade-cab.tx-page:not(.game-menu-active) #tetrisWell {
    width: auto;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    border-radius: 0;
}

body.arcade-cab.tx-page:not(.game-menu-active) .tx-next-pop {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 6;
    width: 58px;
    padding: 3px 3px 4px;
    background: rgba(12, 9, 7, 0.88);
    border: 2px solid #f4efe2;
    box-shadow: 3px 3px 0 #14110e;
    pointer-events: none;
}

body.arcade-cab.tx-page:not(.game-menu-active) .tx-next-pop h3 {
    margin: 0 0 2px;
    font-size: 7px;
    letter-spacing: 0;
    text-align: center;
    color: #f4efe2;
}

body.arcade-cab.tx-page:not(.game-menu-active) .tx-next-pop .tx-next-stack {
    gap: 1px;
}

body.arcade-cab.tx-page:not(.game-menu-active) .tx-next-pop .tx-mini {
    width: 50px !important;
    height: 32px !important;
    max-height: none;
    margin: 0 auto;
}

body.arcade-cab.tx-page:not(.game-menu-active) .tx-pad {
    position: absolute;
    left: 14%;
    right: 14%;
    bottom: 3%;
    z-index: 4;
    margin: 0;
    max-width: none;
    gap: 3px;
}

body.arcade-cab.tx-page:not(.game-menu-active) .tx-pad-btn {
    min-height: 0;
    padding: 4px 2px;
    font-size: 8px !important;
}

/* Invaders: the starfield is the picture; the pad stays under it, still in the glass. */
body.arcade-cab:not(.game-menu-active) .mi-arena {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

body.arcade-cab:not(.game-menu-active) .mi-playfield {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    border-radius: 0;
}

body.arcade-cab:not(.game-menu-active) .mi-controls {
    flex: 0 0 auto;
    gap: 2px;
}

body.arcade-cab:not(.game-menu-active) .mi-pad-btn {
    min-height: 22px !important;
    padding: 0 !important;
    font-size: 9px !important;
}

body.arcade-cab:not(.game-menu-active) .mi-answer,
body.arcade-cab:not(.game-menu-active) .mi-shoot-btn {
    min-height: 0;
    padding: 2px 4px;
}

/* Prime sieve field fills the glass. */
body.arcade-cab:not(.game-menu-active) .pr-board-wrap {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    padding: 0;
}

body.arcade-cab:not(.game-menu-active) .pr-field {
    flex: 1 1 auto;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
}

/* Simon pad is the picture, sized to the glass. */
body.arcade-cab:not(.game-menu-active) .si-pad-wrap {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    container-type: size;
}

body.arcade-cab:not(.game-menu-active) .si-pad {
    --si-size: min(100cqw, 100cqh);
    width: var(--si-size);
    height: var(--si-size);
    max-width: 100%;
    max-height: 100%;
}

/* Pool table sits in the glass at its own wide ratio. */
body.arcade-cab:not(.game-menu-active) .mp-board-wrap {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    padding: 0;
}

body.arcade-cab:not(.game-menu-active) .mp-table-frame {
    width: 100%;
    max-width: 100%;
    border-radius: 4px;
    padding: 3px;
}

body.arcade-cab:not(.game-menu-active) .mp-aim {
    flex: 0 0 auto;
    margin: 0;
    font-size: 9px;
}

body.arcade-cab:not(.game-menu-active) .mp-aim input[type="range"] {
    width: 100%;
}

/* Phones drop the cabinet. A portrait cabinet leaves the glass at under
   half the width, so the play shell takes the viewport instead. */
@media (max-width: 700px), (max-height: 520px) {
    /* The site header already inserts body padding on a phone. The play
       screen clears that header itself, so the padding must not stack. */
    html.gv-ios-app body.arcade-cab.with-game-header:not(.game-menu-active),
    body.arcade-cab.with-game-header:not(.game-menu-active) {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    body.arcade-cab:not(.game-menu-active) .game-screen.active {
        align-items: stretch;
        justify-content: flex-start;
        height: 100dvh;
        min-height: 100dvh;
        max-height: 100dvh;
        padding: calc(4.7rem + var(--gv-ios-top, 0px)) 0 calc(0.3rem + var(--gv-ios-bottom, 0px));
        overflow: hidden;
    }

    body.arcade-cab:not(.game-menu-active) .cab-stage {
        aspect-ratio: auto;
        height: auto;
        width: 100%;
        max-width: none;
        flex: 1 1 auto;
        min-height: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        background: none;
    }

    body.arcade-cab:not(.game-menu-active) .cab-marquee {
        position: relative;
        left: auto;
        right: auto;
        top: auto;
        width: auto;
        height: auto;
        flex: 0 0 auto;
        margin: 0;
        padding: 0.38rem 0.7rem 0.32rem;
        transform: none;
        background: #100d16;
        border-bottom: 3px solid rgba(244, 239, 226, 0.28);
    }

    body.arcade-cab:not(.game-menu-active) .cab-marquee--simon {
        width: max-content;
        max-width: calc(100% - 1rem);
        left: auto;
        right: auto;
        margin-left: auto;
        margin-right: auto;
        transform: none;
    }

    body.arcade-cab:not(.game-menu-active) .cab-marquee--tetris { border-bottom-color: #e23b32; }
    body.arcade-cab:not(.game-menu-active) .cab-marquee--invaders { border-bottom-color: #39ff14; }
    body.arcade-cab:not(.game-menu-active) .cab-marquee--sieve { border-bottom-color: #7ef6ff; }
    body.arcade-cab:not(.game-menu-active) .cab-marquee--simon { border-bottom-color: #facc15; }
    body.arcade-cab:not(.game-menu-active) .cab-marquee--pool { border-bottom-color: #e6b325; }

    body.arcade-cab.vault-tide .cab-marquee--tetris:not(i[class*="fa-"]):not(.fa):not(.fas):not(.far):not(.fab):not(.fa-solid):not(.fa-regular):not(.fa-brands):not(.mt-card[data-deck="disasters"] *) {
        font-size: clamp(12px, 3.4vw, 16px) !important;
    }

    body.arcade-cab.vault-tide .cab-marquee--invaders:not(i[class*="fa-"]):not(.fa):not(.fas):not(.far):not(.fab):not(.fa-solid):not(.fa-regular):not(.fa-brands):not(.mt-card[data-deck="disasters"] *) {
        font-size: clamp(8px, 2.5vw, 11px) !important;
    }

    body.arcade-cab.vault-tide .cab-marquee--sieve:not(i[class*="fa-"]):not(.fa):not(.fas):not(.far):not(.fab):not(.fa-solid):not(.fa-regular):not(.fa-brands):not(.mt-card[data-deck="disasters"] *) {
        font-size: clamp(14px, 4vw, 20px) !important;
    }

    body.arcade-cab.vault-tide .cab-marquee--simon:not(i[class*="fa-"]):not(.fa):not(.fas):not(.far):not(.fab):not(.fa-solid):not(.fa-regular):not(.fa-brands):not(.mt-card[data-deck="disasters"] *) {
        font-size: clamp(22px, 7vw, 32px) !important;
    }

    body.arcade-cab.vault-tide .cab-marquee--pool:not(i[class*="fa-"]):not(.fa):not(.fas):not(.far):not(.fab):not(.fa-solid):not(.fa-regular):not(.fa-brands):not(.mt-card[data-deck="disasters"] *) {
        font-size: clamp(15px, 4.4vw, 22px) !important;
        letter-spacing: 0.12em !important;
    }

    body.arcade-cab:not(.game-menu-active) .cab-screen {
        position: relative;
        left: auto;
        top: auto;
        width: 100%;
        height: auto;
        flex: 1 1 auto;
        min-height: 0;
    }

    body.arcade-cab:not(.game-menu-active) .cab-screen > .tx-shell,
    body.arcade-cab:not(.game-menu-active) .cab-screen > .mi-shell,
    body.arcade-cab:not(.game-menu-active) .cab-screen > .pr-shell,
    body.arcade-cab:not(.game-menu-active) .cab-screen > .si-shell,
    body.arcade-cab:not(.game-menu-active) .cab-screen > .mp-shell {
        padding: 6px 8px 6px !important;
    }

    body.arcade-cab.tx-page:not(.game-menu-active) .tx-hud,
    body.arcade-cab.tx-page:not(.game-menu-active) .tx-toolbar {
        position: relative;
        top: auto;
        right: auto;
        left: auto;
        width: 100%;
        max-width: none !important;
        margin: 0 0 4px !important;
    }

    body.arcade-cab.tx-page:not(.game-menu-active) .tx-play {
        position: relative;
        inset: auto;
        flex: 1 1 auto;
        width: 100%;
        height: 0;
        min-height: 0;
        display: block;
    }

    body.arcade-cab.tx-page:not(.game-menu-active) .tx-well-wrap {
        position: relative;
        inset: auto;
        height: 100%;
        display: grid;
        place-items: center;
    }

    body.arcade-cab.tx-page:not(.game-menu-active) #tetrisWell,
    body.arcade-cab.tx-page:not(.game-menu-active) .tx-next-pop {
        grid-area: 1 / 1;
    }

    body.arcade-cab.tx-page:not(.game-menu-active) .tx-next-pop {
        position: relative;
        top: auto;
        right: auto;
        justify-self: end;
        align-self: start;
        margin: 4px;
    }

    body.arcade-cab.tx-page:not(.game-menu-active) .tx-pad {
        position: relative;
        left: auto;
        right: auto;
        bottom: auto;
        display: grid !important;
        width: 100%;
        max-width: none;
        margin: 6px 0 0;
        gap: 6px;
    }

    body.arcade-cab.tx-page:not(.game-menu-active) .tx-pad-btn {
        min-height: 46px;
        padding: 6px 4px;
        font-size: 0.82rem !important;
    }

    body.arcade-cab:not(.game-menu-active) .pr-hud {
        display: grid;
        grid-template-columns: 1fr 1.35fr;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    body.arcade-cab:not(.game-menu-active) .pr-lcd,
    body.arcade-cab:not(.game-menu-active) .pr-chip {
        min-width: 0;
        font-size: 0.92rem;
    }

    body.arcade-cab:not(.game-menu-active) .pr-chip {
        padding: 0.28rem 0.35rem;
        text-align: center;
    }

    body.arcade-cab:not(.game-menu-active) .mi-pad-btn {
        min-height: 42px !important;
        padding: 4px 2px !important;
        font-size: 1rem !important;
    }

    body.arcade-cab:not(.game-menu-active) .mi-answer,
    body.arcade-cab:not(.game-menu-active) .mi-shoot-btn {
        min-height: 40px;
        padding: 4px 8px;
    }

    body.arcade-cab:not(.game-menu-active) .mp-aim {
        font-size: 0.85rem;
        gap: 0.35rem;
    }

    body.arcade-cab:not(.game-menu-active) #mpCanvas {
        display: block;
        margin: 0 auto;
    }
}

@media (max-height: 520px) {
    body.arcade-cab:not(.game-menu-active) .game-screen.active {
        padding-top: calc(5.6rem + var(--gv-ios-top, 0px));
    }

    body.arcade-cab:not(.game-menu-active) .cab-marquee {
        padding: 0.16rem 0.5rem 0.12rem;
    }

    body.arcade-cab.tx-page:not(.game-menu-active) .tx-shell {
        display: grid;
        grid-template-columns: min(44dvh, 46%) minmax(0, 1fr);
        grid-template-rows: auto auto minmax(0, 1fr);
        grid-template-areas:
            "play hud"
            "play tools"
            "play pad";
        column-gap: 8px;
        align-items: stretch;
    }

    body.arcade-cab.tx-page:not(.game-menu-active) .tx-play {
        grid-area: play;
        height: 100%;
        min-height: 0;
    }

    body.arcade-cab.tx-page:not(.game-menu-active) .tx-hud,
    body.arcade-cab.tx-page:not(.game-menu-active) .tx-toolbar {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        width: 100%;
        max-width: none !important;
        margin: 0 0 4px !important;
    }

    body.arcade-cab.tx-page:not(.game-menu-active) .tx-hud { grid-area: hud; }
    body.arcade-cab.tx-page:not(.game-menu-active) .tx-toolbar { grid-area: tools; }

    body.arcade-cab.tx-page:not(.game-menu-active) .tx-well-wrap {
        padding-top: 0;
        height: 100%;
    }

    body.arcade-cab.tx-page:not(.game-menu-active) .tx-pad {
        grid-area: pad;
        align-self: end;
        grid-template-columns: repeat(3, 1fr);
        width: 100%;
        margin-top: 0;
    }

    body.arcade-cab.tx-page:not(.game-menu-active) .tx-pad-btn {
        min-height: 40px;
    }

    body.arcade-cab:not(.game-menu-active) .mi-arena {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(210px, 46%);
        grid-template-rows: minmax(0, 1fr);
        align-items: stretch;
        gap: 6px;
    }

    body.arcade-cab:not(.game-menu-active) .mi-playfield,
    body.arcade-cab:not(.game-menu-active) .mi-controls {
        min-height: 0;
        min-width: 0;
    }

    body.arcade-cab:not(.game-menu-active) .mi-pad-btn {
        min-height: 32px !important;
        font-size: 0.9rem !important;
    }
}
