/* Arcade Pro — shared macOS-style game shell and responsive controls. */
#gamesWindow {
    --arcade-cyan: #72f7ff;
    --arcade-blue: #4f8cff;
    --arcade-violet: #9c7cff;
    --arcade-amber: #ffd166;
    --arcade-danger: #ff5f73;
    min-width: min(680px, calc(100vw - 24px));
    min-height: min(560px, calc(100vh - 54px));
}

#gamesWindow .music-player-content {
    overscroll-behavior: contain;
}

#gamesWindow .arcade-pro-gallery {
    align-items: stretch;
}

#gamesWindow .game-card {
    position: relative;
    isolation: isolate;
    min-height: 138px;
    overflow: hidden;
    outline: none;
}

#gamesWindow .game-card[hidden],
#gamesWindow .game-card.is-arcade-unavailable {
    display: none !important;
}

#gamesWindow .game-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 50% 0%, rgba(114, 247, 255, 0.12), transparent 62%);
    opacity: 0;
    transition: opacity 180ms ease;
}

#gamesWindow .game-card:hover::after,
#gamesWindow .game-card:focus-visible::after {
    opacity: 1;
}

#gamesWindow .game-card:focus-visible {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow), 0 12px 30px rgba(0, 0, 0, 0.2);
}

#gamesWindow .game-card-featured {
    border-color: color-mix(in srgb, var(--arcade-cyan) 55%, var(--glass-border));
    background:
        radial-gradient(circle at 50% 30%, rgba(114, 247, 255, 0.15), transparent 45%),
        linear-gradient(145deg, rgba(79, 140, 255, 0.12), rgba(156, 124, 255, 0.08)),
        var(--glass-card);
}

#gamesWindow .game-card-featured::before {
    content: "";
    position: absolute;
    inset: -40%;
    z-index: -1;
    background: conic-gradient(from 90deg, transparent, rgba(114, 247, 255, 0.15), transparent 22%);
    animation: arcadeCardScan 8s linear infinite;
}

#gamesWindow .light-relay-icon {
    background:
        radial-gradient(circle, rgba(114, 247, 255, 0.2) 0 15%, transparent 16% 30%, rgba(114, 247, 255, 0.16) 31% 34%, transparent 35%),
        linear-gradient(145deg, rgba(79, 140, 255, 0.2), rgba(156, 124, 255, 0.12));
    border: 1px solid rgba(114, 247, 255, 0.32);
    border-radius: 20px;
    box-shadow: inset 0 0 18px rgba(114, 247, 255, 0.12), 0 0 20px rgba(114, 247, 255, 0.15);
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
}

#gamesWindow .light-relay-glyph {
    color: var(--arcade-cyan);
    font: 700 46px/1 Georgia, serif;
    text-shadow: 0 0 9px rgba(114, 247, 255, 0.9), 0 0 22px rgba(79, 140, 255, 0.7);
    transform: translateY(-1px);
}

#gamesWindow .curveball-icon {
    position: relative;
    width: 68px;
    height: 68px;
    border: 1px solid rgba(156, 124, 255, 0.42);
    border-radius: 20px;
    background: radial-gradient(circle at 50% 42%, rgba(156, 124, 255, 0.24), transparent 56%), #08101f;
    box-shadow: inset 0 0 20px rgba(79, 140, 255, 0.18), 0 0 22px rgba(156, 124, 255, 0.16);
    overflow: hidden;
}

#gamesWindow .curveball-tunnel,
#gamesWindow .curveball-tunnel::before,
#gamesWindow .curveball-tunnel::after {
    position: absolute;
    border: 1px solid rgba(114, 247, 255, 0.72);
    content: "";
    transform: translate(-50%, -50%);
}

#gamesWindow .curveball-tunnel {
    top: 50%;
    left: 50%;
    width: 48px;
    height: 42px;
}

#gamesWindow .curveball-tunnel::before {
    top: 50%;
    left: 50%;
    width: 29px;
    height: 25px;
}

#gamesWindow .curveball-tunnel::after {
    top: 50%;
    left: 50%;
    width: 12px;
    height: 10px;
}

#gamesWindow .curveball-orb {
    position: absolute;
    top: 27px;
    left: 21px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 7px #fff, 0 0 16px var(--arcade-cyan), 9px 8px 18px rgba(156, 124, 255, 0.85);
}

#gamesWindow .game-card-kicker {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 6px;
    border: 1px solid color-mix(in srgb, var(--arcade-cyan) 45%, transparent);
    border-radius: 999px;
    color: color-mix(in srgb, var(--arcade-cyan) 74%, var(--text-primary));
    background: color-mix(in srgb, var(--window-bg) 82%, transparent);
    font: 700 8px/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    letter-spacing: 0.1em;
}

#gamesWindow .game-card-meta {
    position: absolute;
    bottom: 8px;
    left: 50%;
    max-width: calc(100% - 18px);
    transform: translateX(-50%);
    color: var(--text-tertiary);
    font: 650 8px/1.2 ui-monospace, "SFMono-Regular", Menlo, monospace;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

#gamesWindow .arcade-pro-header {
    gap: 12px !important;
    flex-wrap: wrap;
}

#gamesWindow .arcade-pro-toolbar {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 10px;
    min-height: 32px;
}

#gamesWindow .arcade-pro-title {
    margin-right: auto;
    min-width: 0;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#gamesWindow .arcade-pro-high-score {
    padding: 5px 9px;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    color: var(--text-secondary);
    background: var(--glass-card);
    font: 650 11px/1.2 ui-monospace, "SFMono-Regular", Menlo, monospace;
    white-space: nowrap;
}

#gamesWindow .arcade-pro-btn {
    min-width: 32px;
    height: 30px;
    padding: 0 10px;
    border: 1px solid var(--glass-border);
    border-radius: 7px;
    color: var(--text-primary);
    background: var(--glass-card);
    font: 600 11px/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    cursor: pointer;
    transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

#gamesWindow .arcade-pro-btn:hover:not(:disabled) {
    border-color: color-mix(in srgb, var(--accent) 55%, var(--glass-border));
    background: var(--glass-card-hover);
}

#gamesWindow .arcade-pro-btn:active:not(:disabled) {
    transform: scale(0.96);
}

#gamesWindow .arcade-pro-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

#gamesWindow .arcade-pro-btn:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

#gamesWindow #gameCanvas.arcade-pro-host {
    position: relative;
    width: 100%;
    aspect-ratio: 12 / 7;
    background: #040710 !important;
    border: 1px solid rgba(114, 247, 255, 0.16);
    border-radius: 11px !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035), 0 12px 40px rgba(0, 0, 0, 0.24);
    overflow: hidden;
    touch-action: none;
}

#gamesWindow #gameCanvas.arcade-pro-ruffle-host {
    width: 100%;
    min-width: 0;
    max-width: 630px;
    aspect-ratio: 7 / 5;
    margin-inline: auto;
    box-sizing: border-box;
    background: #000 !important;
    border-color: rgba(0, 255, 135, 0.24);
    box-shadow: inset 0 0 0 1px rgba(0, 255, 135, 0.04), 0 16px 46px rgba(0, 0, 0, 0.34);
}

#gamesWindow .arcade-pro-stage {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: #040710;
}

#gamesWindow .arcade-pro-ruffle-stage {
    isolation: isolate;
    overflow: hidden;
    background: #000;
}

#gamesWindow ruffle-player.arcade-pro-ruffle-player {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    outline: none;
    background: #000;
    touch-action: none;
}

#gamesWindow ruffle-player.arcade-pro-ruffle-player:focus-visible {
    box-shadow: inset 0 0 0 3px rgba(0, 255, 135, 0.68);
}

#gamesWindow .arcade-pro-ruffle-loading,
#gamesWindow .arcade-pro-ruffle-paused {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 9px;
    padding: 24px;
    color: #ecfff8;
    background:
        radial-gradient(circle at 50% 46%, rgba(0, 255, 135, 0.12), transparent 34%),
        #000;
    text-align: center;
}

#gamesWindow .arcade-pro-ruffle-loading[hidden],
#gamesWindow .arcade-pro-ruffle-paused[hidden] {
    display: none;
}

#gamesWindow .arcade-pro-ruffle-loading > span {
    width: 34px;
    height: 34px;
    border: 2px solid rgba(0, 255, 135, 0.18);
    border-top-color: #00ff87;
    border-radius: 50%;
    box-shadow: 0 0 16px rgba(0, 255, 135, 0.26);
    animation: arcadeRuffleSpin 760ms linear infinite;
}

#gamesWindow .arcade-pro-ruffle-loading strong,
#gamesWindow .arcade-pro-ruffle-paused strong {
    font: 750 clamp(13px, 2.1vw, 18px)/1.1 ui-monospace, "SFMono-Regular", Menlo, monospace;
    letter-spacing: 0.08em;
}

#gamesWindow .arcade-pro-ruffle-loading small,
#gamesWindow .arcade-pro-ruffle-paused span {
    color: rgba(221, 255, 241, 0.64);
    font: 600 11px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
}

#gamesWindow .arcade-pro-ruffle-paused {
    z-index: 4;
    background: rgba(0, 8, 5, 0.82);
    backdrop-filter: blur(8px);
    pointer-events: none;
}

#gamesWindow .arcade-pro-three-stage {
    isolation: isolate;
    background:
        radial-gradient(circle at 50% 55%, rgba(79, 140, 255, 0.13), transparent 45%),
        #02050e;
}

#gamesWindow .arcade-pro-three-canvas {
    position: absolute;
    inset: 0;
}

#gamesWindow .neon-relay-hud {
    position: absolute;
    inset: 0;
    z-index: 3;
    padding: clamp(12px, 2.4vw, 22px);
    color: rgba(232, 252, 255, 0.92);
    font: 700 clamp(9px, 1.35vw, 12px)/1.2 ui-monospace, "SFMono-Regular", Menlo, monospace;
    letter-spacing: 0.1em;
    pointer-events: none;
    text-shadow: 0 0 12px rgba(114, 247, 255, 0.65);
}

#gamesWindow .neon-relay-hud-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

#gamesWindow .neon-relay-timer,
#gamesWindow .neon-relay-objective {
    padding: 6px 9px;
    border: 1px solid rgba(114, 247, 255, 0.2);
    border-radius: 7px;
    background: rgba(2, 7, 20, 0.42);
    backdrop-filter: blur(7px);
}

#gamesWindow .neon-relay-overdrive {
    position: absolute;
    right: clamp(12px, 2.4vw, 22px);
    bottom: clamp(12px, 2.4vw, 22px);
    left: clamp(12px, 2.4vw, 22px);
    display: grid;
    grid-template-columns: auto minmax(90px, 290px) 44px;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#gamesWindow .neon-relay-overdrive-track {
    height: 5px;
    border: 1px solid rgba(114, 247, 255, 0.28);
    border-radius: 999px;
    background: rgba(3, 8, 22, 0.62);
    box-shadow: 0 0 14px rgba(79, 140, 255, 0.2);
    overflow: hidden;
}

#gamesWindow .neon-relay-overdrive-track i {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--arcade-blue), var(--arcade-cyan));
    box-shadow: 0 0 12px rgba(114, 247, 255, 0.88);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 100ms linear;
}

#gamesWindow .neon-relay-overdrive strong {
    text-align: right;
}

#gamesWindow .neon-relay-loadout {
    position: absolute;
    top: clamp(48px, 8vw, 66px);
    left: 50%;
    padding: 5px 9px;
    border: 1px solid rgba(114,247,255,.16);
    border-radius: 999px;
    color: rgba(226,250,255,.72);
    background: rgba(2,7,20,.34);
    transform: translateX(-50%);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    white-space: nowrap;
}

#gamesWindow .neon-relay-hud.is-overdrive {
    color: #ffe6a8;
    text-shadow: 0 0 13px rgba(255, 209, 102, 0.78);
}

#gamesWindow .neon-relay-hud.is-overdrive .neon-relay-overdrive-track i {
    background: linear-gradient(90deg, #ff9f43, var(--arcade-amber), #fff3c2);
    box-shadow: 0 0 16px rgba(255, 209, 102, 0.94);
}

#gamesWindow .neon-relay-live {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    overflow: hidden;
    white-space: nowrap;
}

#gamesWindow .neon-relay-intro {
    position: absolute;
    z-index: 3;
    top: 18%;
    left: 50%;
    display: grid;
    gap: 8px;
    width: min(84%, 560px);
    color: #fff;
    text-align: center;
    text-shadow: 0 0 20px rgba(114, 247, 255, 0.84);
    transform: translateX(-50%);
    opacity: 1;
    transition: opacity 600ms ease, transform 600ms ease, filter 600ms ease;
    pointer-events: none;
}

#gamesWindow .neon-relay-intro strong {
    font: 800 clamp(22px, 4.5vw, 44px)/0.95 -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
    letter-spacing: -0.035em;
}

#gamesWindow .neon-relay-intro span {
    color: var(--arcade-cyan);
    font: 700 clamp(8px, 1.3vw, 11px)/1.2 ui-monospace, "SFMono-Regular", Menlo, monospace;
    letter-spacing: 0.18em;
}

#gamesWindow .neon-relay-intro.is-leaving {
    opacity: 0;
    filter: blur(5px);
    transform: translate(-50%, -12px) scale(1.04);
}

#gamesWindow .neon-relay-upgrades {
    position: absolute;
    z-index: 9;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    box-sizing: border-box;
    color: #fff;
    background: rgba(1,4,12,.64);
    -webkit-backdrop-filter: blur(18px) saturate(135%);
    backdrop-filter: blur(18px) saturate(135%);
}

#gamesWindow .neon-relay-upgrades[hidden] { display: none !important; }

#gamesWindow .neon-relay-upgrade-card {
    width: min(760px, 100%);
    padding: clamp(20px, 4vw, 34px);
    box-sizing: border-box;
    border: 1px solid rgba(255,255,255,.17);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(18,27,52,.9), rgba(6,9,22,.93));
    box-shadow: inset 0 1px rgba(255,255,255,.12), 0 28px 70px rgba(0,0,0,.48), 0 0 70px rgba(79,140,255,.12);
    text-align: center;
}

#gamesWindow .neon-relay-upgrade-card > span {
    color: #72f7ff;
    font: 760 10px/1.2 ui-monospace, "SFMono-Regular", Menlo, monospace;
    letter-spacing: .16em;
}

#gamesWindow .neon-relay-upgrade-card h3 {
    margin: 8px 0 6px;
    font: 760 clamp(25px,4vw,38px)/1 -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
    letter-spacing: -.04em;
}

#gamesWindow .neon-relay-upgrade-card > p {
    margin: 0;
    color: rgba(255,255,255,.55);
    font-size: 12px;
}

#gamesWindow .neon-relay-upgrade-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 12px;
    margin-top: 24px;
}

#gamesWindow .neon-relay-upgrade-grid button {
    position: relative;
    display: grid;
    justify-items: start;
    min-height: 132px;
    padding: 17px;
    border: 1px solid rgba(114,247,255,.16);
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(145deg, rgba(114,247,255,.09), rgba(128,109,255,.08));
    text-align: left;
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

#gamesWindow .neon-relay-upgrade-grid button:hover,
#gamesWindow .neon-relay-upgrade-grid button:focus-visible {
    border-color: rgba(114,247,255,.52);
    background: linear-gradient(145deg, rgba(114,247,255,.18), rgba(128,109,255,.15));
    transform: translateY(-2px);
}

#gamesWindow .neon-relay-upgrade-grid i {
    color: #72f7ff;
    font: normal 28px/1 -apple-system, sans-serif;
    text-shadow: 0 0 18px rgba(114,247,255,.72);
}

#gamesWindow .neon-relay-upgrade-grid strong { margin-top: 15px; font-size: 13px; }
#gamesWindow .neon-relay-upgrade-grid small { margin-top: 5px; color: rgba(255,255,255,.5); font-size: 10px; line-height: 1.35; }
#gamesWindow .neon-relay-upgrade-grid kbd { position: absolute; top: 13px; right: 13px; color: rgba(255,255,255,.32); font: 700 9px/1 ui-monospace, monospace; }

@media (max-width: 700px), (max-height: 610px) {
    #gamesWindow .neon-relay-upgrades { padding: 12px; }
    #gamesWindow .neon-relay-upgrade-card { padding: 18px; }
    #gamesWindow .neon-relay-upgrade-grid { gap: 8px; margin-top: 15px; }
    #gamesWindow .neon-relay-upgrade-grid button { min-height: 108px; padding: 13px; }
    #gamesWindow .neon-relay-upgrade-grid i { font-size: 22px; }
    #gamesWindow .neon-relay-upgrade-grid strong { margin-top: 10px; font-size: 11px; }
}

@media (max-width: 520px) {
    #gamesWindow .neon-relay-upgrade-grid { grid-template-columns: 1fr; }
    #gamesWindow .neon-relay-upgrade-grid button { grid-template-columns: 32px 1fr; min-height: 68px; align-items: center; column-gap: 10px; }
    #gamesWindow .neon-relay-upgrade-grid i { grid-row: 1 / span 2; }
    #gamesWindow .neon-relay-upgrade-grid strong { margin-top: 0; }
    #gamesWindow .neon-relay-upgrade-grid small { margin-top: 1px; }
}

#gamesWindow .arcade-pro-fallback-note {
    flex-basis: 100%;
    color: var(--text-tertiary);
    font-size: 10px;
}

#gamesWindow .arcade-pro-canvas {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    outline: none;
    cursor: crosshair;
}

#gamesWindow .arcade-pro-canvas:focus-visible {
    box-shadow: inset 0 0 0 3px rgba(114, 247, 255, 0.7);
}

#gamesWindow .arcade-pro-status {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    padding: 28px;
    color: #fff;
    background: rgba(2, 5, 14, 0.72);
    backdrop-filter: blur(7px);
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease;
}

#gamesWindow .arcade-pro-status.is-visible {
    opacity: 1;
    pointer-events: auto;
}

#gamesWindow .arcade-pro-status-card {
    max-width: 440px;
}

#gamesWindow .arcade-pro-status-eyebrow {
    margin-bottom: 8px;
    color: var(--arcade-cyan);
    font: 700 10px/1.2 ui-monospace, "SFMono-Regular", Menlo, monospace;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

#gamesWindow .arcade-pro-status h3 {
    margin: 0 0 8px;
    font-size: clamp(24px, 4vw, 40px);
    line-height: 1;
}

#gamesWindow .arcade-pro-status p {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    line-height: 1.5;
}

#gamesWindow .arcade-pro-toast {
    position: absolute;
    z-index: 6;
    top: 18px;
    left: 50%;
    display: grid;
    gap: 2px;
    min-width: 150px;
    padding: 9px 15px;
    border: 1px solid rgba(114, 247, 255, 0.36);
    border-radius: 999px;
    color: #fff;
    background: rgba(4, 10, 24, 0.78);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.28), 0 0 24px rgba(114, 247, 255, 0.16);
    backdrop-filter: blur(12px);
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -10px) scale(0.94);
    transition: opacity 180ms ease, transform 280ms cubic-bezier(.2, .8, .2, 1);
}

#gamesWindow .arcade-pro-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
}

#gamesWindow .arcade-pro-toast strong {
    color: var(--arcade-cyan);
    font: 800 12px/1.1 ui-monospace, "SFMono-Regular", Menlo, monospace;
    letter-spacing: 0.12em;
}

#gamesWindow .arcade-pro-toast span {
    color: rgba(255, 255, 255, 0.7);
    font: 650 9px/1.1 ui-monospace, "SFMono-Regular", Menlo, monospace;
    letter-spacing: 0.05em;
}

#gamesWindow .arcade-pro-touch {
    position: absolute;
    z-index: 5;
    right: 12px;
    bottom: 12px;
    left: 12px;
    display: none;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    pointer-events: none;
}

#gamesWindow .arcade-pro-dpad {
    display: grid;
    grid-template-columns: repeat(3, 40px);
    grid-template-rows: repeat(3, 40px);
    gap: 3px;
}

#gamesWindow .arcade-pro-touch-actions {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

#gamesWindow .arcade-pro-touch-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    color: #fff;
    background: rgba(10, 18, 34, 0.58);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.12), 0 4px 14px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    font: 700 17px/1 -apple-system, BlinkMacSystemFont, sans-serif;
    pointer-events: auto;
    touch-action: none;
    user-select: none;
}

#gamesWindow .arcade-pro-touch-btn[data-key="ArrowUp"] { grid-area: 1 / 2; }
#gamesWindow .arcade-pro-touch-btn[data-key="ArrowLeft"] { grid-area: 2 / 1; }
#gamesWindow .arcade-pro-touch-btn[data-key="ArrowDown"] { grid-area: 2 / 2; }
#gamesWindow .arcade-pro-touch-btn[data-key="ArrowRight"] { grid-area: 2 / 3; }
#gamesWindow .arcade-pro-touch-btn[data-key="Space"] {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border-color: rgba(114, 247, 255, 0.7);
    color: var(--arcade-cyan);
}

#gamesWindow .arcade-pro-touch-btn.is-pressed {
    transform: scale(0.93);
    background: rgba(79, 140, 255, 0.5);
}

#gamesWindow .arcade-pro-tip {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    align-items: center;
}

#gamesWindow .arcade-pro-tip kbd {
    min-width: 22px;
    padding: 2px 5px;
    border: 1px solid var(--glass-border);
    border-bottom-width: 2px;
    border-radius: 5px;
    color: var(--text-primary);
    background: var(--glass-card);
    font: 600 10px/1.3 ui-monospace, "SFMono-Regular", Menlo, monospace;
}

#gamesWindow .arcade-pro-doom-note {
    margin-right: auto;
    color: var(--text-secondary);
    font-size: 11px;
}

#gamesWindow.arcade-pro-doom-active {
    width: min(1240px, calc(100vw - 40px)) !important;
    height: min(920px, calc(100vh - 64px)) !important;
    max-width: none !important;
    max-height: none !important;
}

#gamesWindow.arcade-pro-doom-active .music-player-content {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 12px !important;
    overflow: hidden !important;
}

#gamesWindow.arcade-pro-doom-active #gameContainer {
    display: flex !important;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    margin-top: 0 !important;
}

#gamesWindow #gameCanvas.arcade-pro-doom-host {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    border: 1px solid rgba(255, 102, 0, 0.38);
    border-radius: 9px !important;
    background: #000 !important;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

#gamesWindow #gameCanvas.arcade-pro-doom-host > div,
#gamesWindow #gameCanvas.arcade-pro-doom-host .dosbox-container {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
}

#gamesWindow #gameCanvas.arcade-pro-doom-host canvas {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    image-rendering: pixelated;
    outline: none;
}

@keyframes arcadeCardScan {
    to { transform: rotate(1turn); }
}

@keyframes arcadeRuffleSpin {
    to { transform: rotate(1turn); }
}

@media (pointer: coarse), (max-width: 760px) {
    #gamesWindow .arcade-pro-touch { display: flex; }
    #gamesWindow .arcade-pro-direct-touch .arcade-pro-touch { display: none; }
    #gamesWindow .arcade-pro-canvas { cursor: default; }
    #gamesWindow .neon-relay-overdrive {
        right: 76px;
        bottom: 18px;
        left: 76px;
        grid-template-columns: minmax(70px, 1fr) 38px;
    }
    #gamesWindow .neon-relay-overdrive > span:first-child { display: none; }
}

@media (max-width: 760px) {
    #gamesWindow {
        min-width: 0;
        min-height: 0;
        width: calc(100vw - 16px) !important;
        height: calc(100vh - 56px) !important;
        left: 8px !important;
        top: 30px !important;
    }

    #gamesWindow.arcade-pro-doom-active {
        width: calc(100vw - 16px) !important;
        height: calc(100vh - 56px) !important;
        left: 8px !important;
        top: 30px !important;
    }

    #gamesWindow .music-player-content {
        width: 100%;
        min-width: 0;
        padding: 12px !important;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    #gamesWindow #gameContainer {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
    #gamesWindow #gameCanvas.arcade-pro-ruffle-host { max-width: 100%; }
    #gamesWindow .arcade-pro-toolbar { flex-wrap: wrap; }
    #gamesWindow .arcade-pro-title { flex-basis: 100%; }
    #gamesWindow .arcade-pro-high-score { margin-right: auto; }
    #gamesWindow .arcade-pro-dpad {
        grid-template-columns: repeat(3, 36px);
        grid-template-rows: repeat(3, 36px);
    }
    #gamesWindow .arcade-pro-touch-btn { width: 36px; height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
    #gamesWindow .game-card-featured::before { animation: none; }
    #gamesWindow .game-card,
    #gamesWindow .arcade-pro-btn,
    #gamesWindow .arcade-pro-status { transition: none; }
    #gamesWindow .neon-relay-overdrive-track i,
    #gamesWindow .neon-relay-intro { transition: none; }
    #gamesWindow .arcade-pro-ruffle-loading > span { animation: none; }
}

/* --------------------------------------------------------------------------
   Games for macOS — editorial browser shell
   -------------------------------------------------------------------------- */
#gamesWindow.games-app-window {
    --games-accent: #72f7ff;
    --games-accent-2: #806dff;
    --games-accent-rgb: 114, 247, 255;
    position: fixed !important;
    isolation: isolate;
    container: games-window / inline-size;
    width: min(1120px, calc(100vw - 32px));
    height: min(760px, calc(100vh - 72px));
    min-width: min(680px, calc(100vw - 16px));
    min-height: min(520px, calc(100vh - 48px));
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    color: #f7f7f8;
    background: #111113;
    box-shadow: 0 35px 100px rgba(0, 0, 0, 0.52), 0 3px 16px rgba(0, 0, 0, 0.3), inset 0 1px rgba(255, 255, 255, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, sans-serif;
}

#gamesWindow [hidden],
#gamesWindow #gamesLaunchRegistry {
    display: none !important;
}

#gamesWindow button,
#gamesWindow input,
#gamesWindow select {
    font: inherit;
}

#gamesWindow button {
    -webkit-tap-highlight-color: transparent;
}

#gamesWindow button:focus-visible,
#gamesWindow input:focus-visible,
#gamesWindow select:focus-visible {
    outline: 3px solid #0a84ff;
    outline-offset: 3px;
}

#gamesWindow .games-app-titlebar {
    position: absolute;
    z-index: 50;
    inset: 0 0 auto;
    display: grid;
    grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr);
    align-items: center;
    width: 100%;
    height: 68px;
    padding: 0 20px;
    box-sizing: border-box;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(5, 5, 9, 0.56), rgba(5, 5, 9, 0.14) 70%, transparent);
    box-shadow: none;
    cursor: move;
}

#gamesWindow .project-window-traffic {
    position: static;
    z-index: 2;
    grid-column: 1;
    justify-self: start;
    align-self: start;
    margin-top: 15px;
}

#gamesWindow .project-window-traffic,
#gamesWindow .games-app-wordmark,
#gamesWindow .games-app-nav,
#gamesWindow .games-app-profile {
    grid-row: 1;
}

#gamesWindow .games-app-wordmark {
    grid-column: 1;
    justify-self: end;
    margin-right: 18px;
    color: rgba(255, 255, 255, 0.64);
    font-size: 12px;
    font-weight: 650;
    letter-spacing: -0.01em;
}

#gamesWindow .games-app-nav {
    grid-column: 2;
    display: flex;
    align-items: center;
    gap: 2px;
    min-height: 42px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(31, 31, 35, 0.47);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.16), 0 9px 30px rgba(0, 0, 0, 0.2);
    -webkit-backdrop-filter: blur(30px) saturate(155%);
    backdrop-filter: blur(30px) saturate(155%);
    cursor: default;
}

#gamesWindow .games-app-nav-item {
    display: grid;
    place-items: center;
    min-width: 66px;
    height: 34px;
    padding: 0 13px;
    border: 0;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.68);
    background: transparent;
    font-size: 12px;
    font-weight: 590;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

#gamesWindow .games-app-nav-item.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.17);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.2), 0 3px 10px rgba(0, 0, 0, 0.16);
}

#gamesWindow .games-app-nav-search {
    min-width: 34px;
    width: 34px;
    padding: 0;
}

#gamesWindow .games-app-nav-search svg,
#gamesWindow .games-search-wrap > svg,
#gamesWindow .games-local-note > svg,
#gamesWindow .games-detail-back svg,
#gamesWindow #backToGamesBtn svg,
#gamesWindow .arcade-pro-fullscreen svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#gamesWindow .games-app-profile {
    grid-column: 3;
    justify-self: end;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 50%;
    color: #fff;
    background:
        radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.8), transparent 16%),
        linear-gradient(145deg, var(--games-accent), var(--games-accent-2));
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.45), 0 7px 20px rgba(0, 0, 0, 0.25), 0 0 24px rgba(var(--games-accent-rgb), 0.18);
    font-size: 10px;
    font-weight: 760;
    cursor: pointer;
}

#gamesWindow .games-app-content {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    color: #f7f7f8;
    background: #111113 !important;
    scrollbar-color: rgba(255, 255, 255, 0.26) transparent;
    scrollbar-width: thin;
    scroll-behavior: smooth;
}

#gamesWindow .games-app-content::-webkit-scrollbar { width: 9px; }
#gamesWindow .games-app-content::-webkit-scrollbar-track { background: transparent; }
#gamesWindow .games-app-content::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 99px; background: rgba(255, 255, 255, 0.28); background-clip: padding-box; }

#gamesWindow .games-app-ambient {
    position: fixed;
    z-index: -1;
    inset: 0;
    background:
        radial-gradient(90% 65% at 76% -5%, rgba(var(--games-accent-rgb), 0.18), transparent 68%),
        radial-gradient(65% 55% at 15% 18%, color-mix(in srgb, var(--games-accent-2) 14%, transparent), transparent 72%);
    pointer-events: none;
    transition: background 500ms ease;
}

#gamesWindow .games-app-browser,
#gamesWindow .games-detail-view {
    position: relative;
    z-index: 1;
    min-height: 100%;
}

#gamesWindow .games-app-panel {
    min-height: 100%;
    animation: gamesViewArrive 360ms cubic-bezier(.2, .75, .2, 1) both;
}

#gamesWindow .games-home-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    height: clamp(350px, 42cqi, 470px);
    min-height: 390px;
    padding: 100px 46px 62px;
    box-sizing: border-box;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 76% 42%, rgba(114, 247, 255, 0.24), transparent 27%),
        radial-gradient(ellipse at 82% 36%, rgba(128, 109, 255, 0.28), transparent 48%),
        linear-gradient(118deg, #070917 4%, #11112c 42%, #1b1745 74%, #08090f 100%);
}

#gamesWindow .games-hero-media {
    position: absolute;
    z-index: 0;
    inset: 0;
    opacity: 0;
    background-repeat: no-repeat;
    background-size: cover;
    transform: scale(1.015);
    filter: saturate(1.04) contrast(1.03);
    transition: opacity 520ms ease, transform 9s cubic-bezier(.18,.7,.22,1);
    pointer-events: none;
}

#gamesWindow .games-home-hero.has-featured-image .games-hero-media {
    opacity: 1;
    transform: scale(1.045);
}

#gamesWindow .games-home-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.32;
    background-image:
        linear-gradient(rgba(114, 247, 255, 0.13) 1px, transparent 1px),
        linear-gradient(90deg, rgba(114, 247, 255, 0.09) 1px, transparent 1px);
    background-size: 54px 54px;
    transform: perspective(460px) rotateX(61deg) scale(1.4) translateY(33%);
    transform-origin: center bottom;
    mask-image: linear-gradient(transparent 15%, #000 68%);
}

#gamesWindow .games-home-hero.has-featured-image::before {
    z-index: 2;
    opacity: 1;
    background:
        linear-gradient(90deg, rgba(4, 5, 10, .92) 0%, rgba(4, 5, 10, .74) 31%, rgba(4, 5, 10, .22) 61%, rgba(4, 5, 10, .06) 100%),
        linear-gradient(180deg, rgba(2, 3, 8, .38), transparent 38%, rgba(5, 6, 12, .28));
    background-size: auto;
    transform: none;
    mask-image: none;
}

#gamesWindow .games-home-hero::after {
    content: "";
    position: absolute;
    z-index: 5;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 150px;
    background: linear-gradient(transparent, #111113 94%);
    pointer-events: none;
}

#gamesWindow .games-hero-copy {
    position: relative;
    z-index: 9;
    width: min(46%, 470px);
    padding-bottom: 18px;
    transition: opacity 220ms ease, transform 300ms cubic-bezier(.2,.75,.2,1);
}

#gamesWindow .games-home-hero.is-changing .games-hero-copy {
    opacity: 0;
    transform: translateY(7px);
}

#gamesWindow .games-home-hero.is-changing .games-hero-media { opacity: 0; }

#gamesWindow .games-hero-eyebrow,
#gamesWindow .games-page-eyebrow,
#gamesWindow .games-section-kicker,
#gamesWindow .games-challenge-kicker,
#gamesWindow .games-editorial-label {
    display: block;
    color: color-mix(in srgb, var(--games-accent) 78%, #fff);
    font-size: 10px;
    font-weight: 740;
    letter-spacing: 0.13em;
    line-height: 1.2;
    text-transform: uppercase;
}

#gamesWindow .games-hero-copy h1 {
    margin: 10px 0 14px;
    color: #fff;
    font-size: clamp(42px, 5.1cqi, 62px);
    font-weight: 760;
    letter-spacing: -0.055em;
    line-height: 0.89;
    text-wrap: balance;
}

#gamesWindow .games-hero-copy h1 span {
    display: block;
}

#gamesWindow .games-hero-copy h1 .games-hero-title-main {
    color: #fff;
}

#gamesWindow .games-hero-copy h1 .games-hero-title-accent {
    color: transparent;
    background: linear-gradient(90deg, #fff, #a7fbff 45%, #afa4ff);
    -webkit-background-clip: text;
    background-clip: text;
}

#gamesWindow .games-home-hero.has-long-title .games-hero-copy h1 {
    font-size: clamp(38px, 4.5cqi, 54px);
}

#gamesWindow .games-hero-copy p {
    max-width: 390px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.45;
}

#gamesWindow .games-hero-actions,
#gamesWindow .games-detail-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

#gamesWindow .games-primary-button,
#gamesWindow .games-glass-button,
#gamesWindow .games-inline-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 17px;
    border-radius: 999px;
    color: #111113;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.76);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), inset 0 1px rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-weight: 690;
    cursor: pointer;
}

#gamesWindow .games-primary-button svg,
#gamesWindow .games-round-play svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

#gamesWindow .games-glass-button {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

#gamesWindow .games-hero-art {
    position: absolute;
    z-index: 3;
    top: 58px;
    right: -1%;
    bottom: 30px;
    width: 58%;
    filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.42));
    transition: opacity 320ms ease, visibility 320ms ease;
}

#gamesWindow .games-home-hero.has-featured-image .games-hero-art {
    opacity: 0;
    visibility: hidden;
}

#gamesWindow .games-hero-orbit {
    position: absolute;
    top: 50%;
    left: 57%;
    border: 1px solid rgba(143, 247, 255, 0.42);
    border-radius: 50%;
    box-shadow: inset 0 0 32px rgba(114, 247, 255, 0.08), 0 0 34px rgba(114, 247, 255, 0.08);
    transform: translate(-50%, -50%) rotate(-18deg);
}

#gamesWindow .games-hero-orbit-a { width: 330px; height: 330px; animation: gamesOrbit 14s linear infinite; }
#gamesWindow .games-hero-orbit-b { width: 230px; height: 230px; border-color: rgba(167, 139, 255, 0.55); animation: gamesOrbitReverse 10s linear infinite; }

#gamesWindow .games-hero-orbit::after {
    content: "";
    position: absolute;
    top: -5px;
    left: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 14px #fff, 0 0 34px var(--games-accent);
}

#gamesWindow .games-hero-prism {
    position: absolute;
    top: 50%;
    left: 57%;
    width: 150px;
    height: 176px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), #8af8ff 24%, #6e62e9 55%, #171734 78%);
    clip-path: polygon(50% 0, 94% 24%, 82% 82%, 50% 100%, 18% 82%, 6% 24%);
    box-shadow: inset 0 0 40px rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%) rotate(8deg);
    animation: gamesPrismFloat 5.5s ease-in-out infinite;
}

#gamesWindow .games-hero-prism::after {
    content: "";
    position: absolute;
    inset: 12%;
    background: radial-gradient(circle at 40% 30%, #fff, #72f7ff 8%, #343078 48%, #090b18 70%);
    clip-path: inherit;
}

#gamesWindow .games-hero-ship {
    position: absolute;
    top: 61%;
    left: 30%;
    width: 74px;
    height: 34px;
    background: linear-gradient(90deg, transparent, #b8fcff 28%, #fff 47%, #7268da 49%, #1a183e 72%);
    clip-path: polygon(0 45%, 38% 12%, 100% 50%, 38% 88%);
    transform: rotate(-9deg);
    filter: drop-shadow(-20px 0 10px rgba(114, 247, 255, 0.72));
    animation: gamesShipDrift 4.8s ease-in-out infinite;
}

#gamesWindow .games-hero-horizon {
    position: absolute;
    right: -10%;
    bottom: 6%;
    width: 82%;
    height: 36%;
    border-top: 1px solid rgba(114, 247, 255, 0.45);
    border-radius: 50%;
    background: radial-gradient(ellipse at 50% 0%, rgba(114, 247, 255, 0.18), transparent 60%);
    transform: rotate(-5deg);
}

#gamesWindow .games-hero-navigation {
    position: absolute;
    z-index: 11;
    bottom: 27px;
    left: 50%;
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translateX(-50%);
}

#gamesWindow .games-hero-pager {
    display: flex;
    align-items: center;
    gap: 1px;
    padding: 2px 5px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 999px;
    background: rgba(7,8,13,.27);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
    backdrop-filter: blur(18px) saturate(145%);
}

#gamesWindow .games-hero-pager button {
    position: relative;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
    transition: width 220ms ease;
}

#gamesWindow .games-hero-pager button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255,255,255,.4);
    transform: translate(-50%,-50%);
    transition: width 220ms ease, background 220ms ease;
}

#gamesWindow .games-hero-pager button.is-active { width: 28px; }
#gamesWindow .games-hero-pager button.is-active::after { width: 16px; border-radius: 99px; background: rgba(255,255,255,.92); }

#gamesWindow .games-hero-arrow {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 50%;
    color: rgba(255,255,255,.86);
    background: rgba(7,8,13,.32);
    box-shadow: inset 0 1px rgba(255,255,255,.12);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
    backdrop-filter: blur(18px) saturate(145%);
    cursor: pointer;
}

#gamesWindow .games-hero-arrow svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#gamesWindow .games-app-section {
    position: relative;
    padding: 18px 38px 30px;
}

#gamesWindow .games-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 17px;
}

#gamesWindow .games-section-heading h2,
#gamesWindow .games-detail-body h2 {
    margin: 4px 0 0;
    color: #f7f7f8;
    font-size: 23px;
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.1;
}

#gamesWindow .games-section-heading > button {
    min-width: 44px;
    min-height: 34px;
    padding: 0 5px;
    border: 0;
    color: rgba(255, 255, 255, 0.58);
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

#gamesWindow .games-app-shelf {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 3px 2px 10px;
    margin: 0 -2px;
    scroll-snap-type: x proximity;
    touch-action: pan-x;
    scrollbar-width: none;
}

#gamesWindow .games-app-shelf::-webkit-scrollbar { display: none; }

#gamesWindow .games-shelf-card {
    position: relative;
    display: flex;
    flex: 0 0 clamp(210px, 23cqi, 264px);
    align-items: center;
    min-width: 0;
    padding: 3px 9px 3px 3px;
    border-radius: 19px;
    background: rgba(255, 255, 255, 0.045);
    scroll-snap-align: start;
}

#gamesWindow .games-shelf-detail,
#gamesWindow .games-catalog-main,
#gamesWindow .games-library-main {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    min-width: 0;
    padding: 0;
    border: 0;
    color: inherit;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

#gamesWindow .games-app-game-icon {
    position: relative;
    isolation: isolate;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 72px;
    height: 72px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    color: #fff;
    background:
        radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.28), transparent 23%),
        linear-gradient(145deg, color-mix(in srgb, var(--game-accent, var(--games-accent)) 80%, #161620), color-mix(in srgb, var(--game-accent-2, var(--games-accent-2)) 76%, #08080d));
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.22), 0 9px 25px rgba(0, 0, 0, 0.32), 0 0 24px rgba(var(--game-rgb, var(--games-accent-rgb)), 0.12);
}

#gamesWindow .games-app-game-icon::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.14), transparent 38% 68%, rgba(0, 0, 0, 0.18));
}

#gamesWindow .games-app-game-icon .games-icon-source,
#gamesWindow .games-app-game-icon .game-icon {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    padding: 17px;
    box-sizing: border-box;
    color: #fff;
    background: transparent;
    border: 0;
    border-radius: inherit;
    box-shadow: none;
}

#gamesWindow .games-app-game-icon .curveball-icon,
#gamesWindow .games-app-game-icon .light-relay-icon { padding: 3px; }
#gamesWindow .games-app-game-icon svg { width: 100%; height: 100%; fill: currentColor; }
#gamesWindow .games-app-game-icon img { width: 100%; height: 100%; object-fit: contain; }
#gamesWindow .games-app-game-icon .games-icon-source-doom {
    padding: 6px;
    background: radial-gradient(circle at 50% 20%, #20242b, #050607 72%);
}
#gamesWindow .games-app-game-icon .light-relay-glyph { font-size: 46px; }

#gamesWindow .games-shelf-copy,
#gamesWindow .games-catalog-copy,
#gamesWindow .games-library-copy {
    display: grid;
    min-width: 0;
    gap: 4px;
    padding: 0 11px;
}

#gamesWindow .games-shelf-copy strong,
#gamesWindow .games-catalog-copy strong,
#gamesWindow .games-library-copy strong {
    overflow: hidden;
    color: #f6f6f7;
    font-size: 13px;
    font-weight: 650;
    letter-spacing: -0.015em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#gamesWindow .games-shelf-copy small,
#gamesWindow .games-catalog-copy small,
#gamesWindow .games-library-copy small {
    overflow: hidden;
    color: rgba(255, 255, 255, 0.47);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#gamesWindow .games-round-play {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #f8f8f9;
    background: rgba(255, 255, 255, 0.11);
    cursor: pointer;
}

#gamesWindow .games-shelf-loading { display: flex; gap: 14px; }
#gamesWindow .games-shelf-loading span { width: 240px; height: 78px; border-radius: 18px; background: rgba(255, 255, 255, 0.05); animation: gamesLoadingPulse 1.3s ease-in-out infinite alternate; }

#gamesWindow .games-editorial-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

#gamesWindow .games-editorial-card {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    aspect-ratio: 16 / 10;
    min-height: 180px;
    padding: 22px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: #fff;
    background: #17171a;
    text-align: left;
    cursor: pointer;
}

#gamesWindow .games-editorial-card::before,
#gamesWindow .games-editorial-card::after { content: ""; position: absolute; z-index: -1; pointer-events: none; }
#gamesWindow .games-editorial-card strong { margin-top: 7px; font-size: clamp(22px, 2.5cqi, 31px); line-height: .95; letter-spacing: -.05em; }
#gamesWindow .games-editorial-card small { margin-top: 9px; color: rgba(255, 255, 255, 0.57); font-size: 10px; }

#gamesWindow .games-editorial-curve { background: linear-gradient(145deg, #061b19, #0b4336 62%, #07120f); }
#gamesWindow .games-editorial-curve::before { inset: -45% -5% 14% 32%; border: 1px solid rgba(92, 255, 197, 0.48); transform: perspective(380px) rotateY(-48deg); box-shadow: inset 0 0 30px rgba(33, 239, 159, .14); }
#gamesWindow .games-editorial-curve::after { top: 22%; right: 22%; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 0 15px #fff, 0 0 40px #21ef9f; }

#gamesWindow .games-editorial-spectrum { background: linear-gradient(145deg, #281039, #7a1f61 58%, #25112f); }
#gamesWindow .games-editorial-spectrum::before { inset: 8% -8% 38% 30%; background: repeating-linear-gradient(90deg, #ff765c 0 13%, #ffcc5c 13% 26%, #5cf7ff 26% 39%, #816cff 39% 52%, transparent 52% 58%); transform: rotate(-12deg); filter: saturate(1.25); }

#gamesWindow .games-editorial-doom { background: linear-gradient(145deg, #180b06, #6e2713 58%, #1b0d07); }
#gamesWindow .games-editorial-doom::before { top: -22%; right: -10%; width: 72%; height: 110%; background: radial-gradient(circle at 50% 45%, #ff8b35, #7e1e0d 36%, transparent 68%); filter: blur(2px); }
#gamesWindow .games-editorial-doom::after { top: 12%; right: 14%; width: 38%; height: 44%; background: linear-gradient(145deg, #21120d, #ba4a20); clip-path: polygon(50% 0, 100% 100%, 0 100%); opacity: .8; }

#gamesWindow .games-page-header {
    position: relative;
    padding: 116px 42px 30px;
}

#gamesWindow .games-page-header h1 {
    margin: 7px 0 8px;
    color: #fff;
    font-size: clamp(42px, 6cqi, 68px);
    font-weight: 740;
    letter-spacing: -0.06em;
    line-height: 0.95;
}

#gamesWindow .games-page-header > p,
#gamesWindow .games-friends-header > p {
    max-width: 610px;
    margin: 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: 14px;
    line-height: 1.5;
}

#gamesWindow .games-arcade-feature {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    min-height: 220px;
    margin: 0 38px;
    padding: 28px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 24px;
    background:
        linear-gradient(90deg, rgba(3, 19, 18, 0.98) 0 38%, rgba(3, 19, 18, 0.3) 74%),
        repeating-linear-gradient(118deg, rgba(33, 239, 159, 0.07) 0 1px, transparent 1px 28px),
        radial-gradient(circle at 74% 42%, #d9fff3 0 2%, #21ef9f 3%, rgba(33, 239, 159, 0.3) 5%, transparent 16%),
        linear-gradient(145deg, #052622, #04201d);
}

#gamesWindow .games-arcade-feature::before,
#gamesWindow .games-arcade-feature::after {
    content: "";
    position: absolute;
    z-index: -1;
    top: 50%;
    right: 12%;
    width: 270px;
    height: 176px;
    border: 1px solid rgba(75, 255, 193, 0.4);
    transform: translateY(-50%) perspective(400px) rotateY(-42deg);
}

#gamesWindow .games-arcade-feature::after { right: 19%; width: 145px; height: 94px; opacity: .68; }
#gamesWindow .games-arcade-feature > div { max-width: 420px; }
#gamesWindow .games-arcade-feature > div > span { color: #58f4bd; font-size: 10px; font-weight: 720; letter-spacing: .12em; text-transform: uppercase; }
#gamesWindow .games-arcade-feature h2 { margin: 8px 0 7px; font-size: clamp(28px, 4cqi, 42px); line-height: 1; letter-spacing: -.05em; }
#gamesWindow .games-arcade-feature p { margin: 0; color: rgba(255, 255, 255, .56); font-size: 12px; line-height: 1.5; }

#gamesWindow .games-app-section-page { padding-top: 32px; }

#gamesWindow .games-catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 14px;
}

#gamesWindow .games-catalog-card {
    display: flex;
    align-items: center;
    min-width: 0;
    padding: 8px 10px 8px 8px;
    border-radius: 21px;
    background: rgba(255, 255, 255, 0.04);
    transition: background 180ms ease, transform 180ms ease;
}

#gamesWindow .games-catalog-card .games-app-game-icon { width: 78px; height: 78px; border-radius: 17px; }

#gamesWindow .games-friends-header { padding-bottom: 18px; text-align: center; }
#gamesWindow .games-friends-header > p { margin-inline: auto; }

#gamesWindow .games-friends-avatars {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    margin: 0 0 26px;
    padding-left: 18px;
}

#gamesWindow .games-friends-avatars span {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-left: -14px;
    border: 3px solid #111113;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(145deg, #ffce5c, #ff5a82);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
    font-size: 11px;
    font-weight: 740;
}

#gamesWindow .games-friends-avatars span:nth-child(2) { background: linear-gradient(145deg, #5ce7ff, #4e69ff); }
#gamesWindow .games-friends-avatars span:nth-child(3) { background: linear-gradient(145deg, #b77aff, #ff69b1); }
#gamesWindow .games-friends-avatars span:nth-child(4) { background: linear-gradient(145deg, #62ef9f, #168a7a); }

#gamesWindow .games-challenge-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 0 38px 24px;
}

#gamesWindow .games-challenge-card {
    position: relative;
    min-height: 210px;
    padding: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 22px;
    background:
        radial-gradient(circle at 110% -10%, rgba(var(--game-rgb), .24), transparent 46%),
        linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.02));
}

#gamesWindow .games-challenge-card::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -70px;
    width: 210px;
    height: 210px;
    border: 1px solid rgba(var(--game-rgb), .24);
    border-radius: 50%;
    box-shadow: inset 0 0 50px rgba(var(--game-rgb), .06);
}

#gamesWindow .games-challenge-number { position: absolute; top: 18px; right: 20px; color: rgba(255,255,255,.12); font-size: 40px; font-weight: 760; letter-spacing: -.06em; }
#gamesWindow .games-challenge-card h2 { margin: 12px 0 9px; font-size: 28px; letter-spacing: -.045em; }
#gamesWindow .games-challenge-card p { max-width: 78%; margin: 0; color: rgba(255,255,255,.52); font-size: 12px; line-height: 1.5; }
#gamesWindow .games-challenge-card > div { position: absolute; z-index: 2; right: 22px; bottom: 20px; left: 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#gamesWindow .games-challenge-card > div > span { color: rgba(255,255,255,.44); font-size: 10px; font-weight: 650; }
#gamesWindow .games-challenge-card .games-inline-play { min-height: 32px; padding-inline: 15px; }

#gamesWindow .games-local-note {
    display: flex;
    align-items: center;
    gap: 13px;
    max-width: 520px;
    margin: 0 auto 42px;
    padding: 14px 17px;
    border-radius: 17px;
    color: rgba(255,255,255,.62);
    background: rgba(255,255,255,.045);
}
#gamesWindow .games-local-note > svg { flex: 0 0 auto; color: #8d8d95; }
#gamesWindow .games-local-note > div { display: grid; gap: 2px; }
#gamesWindow .games-local-note strong { color: rgba(255,255,255,.84); font-size: 11px; }
#gamesWindow .games-local-note span { font-size: 10px; }

#gamesWindow .games-library-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
}

#gamesWindow .games-sort-control {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,.45);
    font-size: 10px;
}

#gamesWindow .games-sort-control select {
    min-height: 34px;
    padding: 0 30px 0 12px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 999px;
    color: #fff;
    background: #252529;
    font-size: 11px;
}

#gamesWindow .games-library-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0 38px 24px;
}

#gamesWindow .games-library-summary > div {
    display: grid;
    gap: 4px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255,255,255,.045);
}
#gamesWindow .games-library-summary strong { font-size: 24px; letter-spacing: -.04em; }
#gamesWindow .games-library-summary span { color: rgba(255,255,255,.43); font-size: 10px; }

#gamesWindow .games-library-list,
#gamesWindow .games-search-results {
    display: grid;
    gap: 6px;
    padding: 0 38px 42px;
}

#gamesWindow .games-library-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 100px auto;
    align-items: center;
    min-height: 82px;
    padding: 7px 10px 7px 7px;
    border-radius: 19px;
    background: rgba(255,255,255,.035);
}

#gamesWindow .games-library-row .games-app-game-icon { width: 68px; height: 68px; border-radius: 15px; }
#gamesWindow .games-library-score { display: grid; gap: 3px; text-align: right; }
#gamesWindow .games-library-score small { color: rgba(255,255,255,.38); font-size: 9px; }
#gamesWindow .games-library-score strong { color: rgba(255,255,255,.78); font-size: 12px; font-variant-numeric: tabular-nums; }
#gamesWindow .games-library-row .games-inline-play { min-height: 30px; margin-left: 16px; padding-inline: 16px; }

#gamesWindow .games-app-search-panel { padding-top: 116px; }
#gamesWindow .games-search-wrap {
    display: flex;
    align-items: center;
    gap: 11px;
    max-width: 760px;
    margin: 0 auto 36px;
    padding: 0 17px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 17px;
    background: rgba(255,255,255,.07);
    box-shadow: inset 0 1px rgba(255,255,255,.06), 0 16px 44px rgba(0,0,0,.18);
}
#gamesWindow .games-search-wrap > svg { flex: 0 0 auto; color: rgba(255,255,255,.5); }
#gamesWindow .games-search-wrap input { flex: 1 1 auto; height: 54px; min-width: 0; border: 0; outline: 0; color: #fff; background: transparent; font-size: 17px; }
#gamesWindow .games-search-wrap input::placeholder { color: rgba(255,255,255,.34); }
#gamesWindow .games-search-wrap kbd { padding: 4px 7px; border: 1px solid rgba(255,255,255,.12); border-radius: 6px; color: rgba(255,255,255,.35); background: rgba(0,0,0,.18); font: 600 9px/1 ui-monospace, monospace; }
#gamesWindow .games-search-intro { padding: 62px 30px; color: rgba(255,255,255,.3); text-align: center; }
#gamesWindow .games-search-intro span { color: rgba(255,255,255,.72); font-size: 18px; font-weight: 650; }
#gamesWindow .games-search-intro p { margin: 7px 0 0; font-size: 12px; }
#gamesWindow .games-search-count { padding: 10px 2px 7px; color: rgba(255,255,255,.38); font-size: 10px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
#gamesWindow .games-search-empty { display: grid; gap: 6px; padding: 70px 20px; text-align: center; }
#gamesWindow .games-search-empty strong { color: rgba(255,255,255,.76); font-size: 18px; }
#gamesWindow .games-search-empty span { color: rgba(255,255,255,.35); font-size: 11px; }

#gamesWindow .games-profile-popover {
    position: absolute;
    z-index: 80;
    top: 58px;
    right: 18px;
    width: 300px;
    padding: 18px;
    box-sizing: border-box;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 22px;
    color: #fff;
    background: rgba(35,35,39,.82);
    box-shadow: 0 24px 70px rgba(0,0,0,.42), inset 0 1px rgba(255,255,255,.12);
    -webkit-backdrop-filter: blur(34px) saturate(150%);
    backdrop-filter: blur(34px) saturate(150%);
}
#gamesWindow .games-profile-identity { display: flex; align-items: center; gap: 12px; }
#gamesWindow .games-profile-large { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(145deg,var(--games-accent),var(--games-accent-2)); font-size: 12px; font-weight: 760; }
#gamesWindow .games-profile-identity > div { display: grid; gap: 3px; }
#gamesWindow .games-profile-identity strong { font-size: 13px; }
#gamesWindow .games-profile-identity small { color: rgba(255,255,255,.45); font-size: 10px; }
#gamesWindow .games-profile-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; margin: 16px 0 12px; }
#gamesWindow .games-profile-stats > div { display: grid; gap: 3px; padding: 10px 4px; border-radius: 12px; background: rgba(255,255,255,.06); text-align: center; }
#gamesWindow .games-profile-stats strong { font-size: 13px; font-variant-numeric: tabular-nums; }
#gamesWindow .games-profile-stats span { color: rgba(255,255,255,.38); font-size: 8px; }
#gamesWindow .games-profile-popover > p { margin: 0; color: rgba(255,255,255,.4); font-size: 9px; text-align: center; }

#gamesWindow .games-detail-view {
    min-height: 100%;
    background: #111113;
    animation: gamesViewArrive 360ms cubic-bezier(.2,.75,.2,1) both;
}

#gamesWindow .games-detail-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 430px;
    padding: 112px 46px 54px;
    box-sizing: border-box;
    overflow: hidden;
    background:
        radial-gradient(circle at 73% 38%, rgba(var(--game-rgb), .35), transparent 29%),
        radial-gradient(circle at 76% 45%, color-mix(in srgb, var(--game-accent-2) 38%, transparent), transparent 48%),
        linear-gradient(135deg, color-mix(in srgb, var(--game-accent) 16%, #08080c), #121218 55%, #09090b);
}

#gamesWindow .games-detail-hero::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 110px;
    background: linear-gradient(transparent, #111113);
}

#gamesWindow .games-detail-back {
    position: absolute;
    z-index: 4;
    top: 82px;
    left: 28px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 50%;
    color: #fff;
    background: rgba(255,255,255,.09);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    cursor: pointer;
}

#gamesWindow .games-detail-orbit {
    position: absolute;
    top: 48%;
    right: 13%;
    width: 310px;
    height: 310px;
    border: 1px solid rgba(var(--game-rgb), .32);
    border-radius: 50%;
    transform: translateY(-50%) rotate(-14deg);
    animation: gamesDetailOrbit 18s linear infinite;
}
#gamesWindow .games-detail-orbit::before,
#gamesWindow .games-detail-orbit::after { content:""; position:absolute; inset: 18%; border: 1px solid rgba(255,255,255,.12); border-radius:50%; }
#gamesWindow .games-detail-orbit::after { inset: 35%; border-color: rgba(var(--game-rgb),.34); }
#gamesWindow .games-detail-orbit i { position:absolute; width:9px; height:9px; border-radius:50%; background:#fff; box-shadow:0 0 18px var(--game-accent); }
#gamesWindow .games-detail-orbit i:nth-child(1){top:-5px;left:50%}.games-detail-orbit i:nth-child(2){right:9%;bottom:21%}.games-detail-orbit i:nth-child(3){bottom:7%;left:18%}

#gamesWindow .games-detail-identity {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 132px minmax(0, 520px);
    align-items: center;
    gap: 28px;
}

#gamesWindow .games-detail-icon.games-app-game-icon { width: 132px; height: 132px; border-radius: 28px; }
#gamesWindow .games-detail-identity h1 { margin: 7px 0 8px; outline: 0; font-size: clamp(38px, 5.4cqi, 62px); line-height: .94; letter-spacing: -.06em; }
#gamesWindow .games-detail-identity p { max-width: 560px; margin: 0 0 17px; color: rgba(255,255,255,.58); font-size: 13px; line-height: 1.5; }
#gamesWindow .games-detail-actions > span { color: rgba(255,255,255,.45); font-size: 10px; font-variant-numeric:tabular-nums; }

#gamesWindow .games-detail-body { padding: 0 40px 54px; }
#gamesWindow .games-detail-facts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:0 0 34px; }
#gamesWindow .games-detail-facts > div { display:grid; gap:4px; padding:15px 17px; border-radius:16px; background:rgba(255,255,255,.04); }
#gamesWindow .games-detail-facts span { color:rgba(255,255,255,.36); font-size:9px; text-transform:uppercase; letter-spacing:.08em; }
#gamesWindow .games-detail-facts strong { overflow:hidden; color:rgba(255,255,255,.82); font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
#gamesWindow .games-detail-body section { margin-top:30px; }
#gamesWindow .games-detail-previews { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
#gamesWindow .games-detail-preview { position:relative; aspect-ratio:16/10; overflow:hidden; border:1px solid rgba(255,255,255,.09); border-radius:17px; background:radial-gradient(circle at 62% 42%,rgba(var(--game-rgb),.35),transparent 20%),linear-gradient(145deg,color-mix(in srgb,var(--game-accent) 22%,#08090d),#09090d); }
#gamesWindow .games-detail-preview::before { content:""; position:absolute; inset:15%; border:1px solid rgba(var(--game-rgb),.4); transform:perspective(240px) rotateY(-28deg); }
#gamesWindow .games-detail-preview span { position:absolute; top:45%; left:55%; width:20px; height:20px; border-radius:50%; background:#fff; box-shadow:0 0 12px #fff,0 0 32px var(--game-accent); }
#gamesWindow .games-detail-preview i { position:absolute; right:-18%; bottom:-38%; width:85%; aspect-ratio:1; border:1px solid rgba(var(--game-rgb),.22); border-radius:50%; }
#gamesWindow .games-detail-preview-1 { filter:hue-rotate(32deg); }
#gamesWindow .games-detail-preview-2 { filter:hue-rotate(-34deg); }
#gamesWindow .games-detail-about { max-width:720px; }
#gamesWindow .games-detail-about p { margin:10px 0 0; color:rgba(255,255,255,.5); font-size:13px; line-height:1.62; }

#gamesWindow.games-app-is-playing .games-app-titlebar {
    background: linear-gradient(180deg, rgba(11,11,14,.9), rgba(11,11,14,.55));
    -webkit-backdrop-filter: blur(22px) saturate(140%);
    backdrop-filter: blur(22px) saturate(140%);
}

#gamesWindow.games-app-is-playing .games-app-content { overflow:hidden !important; }

#gamesWindow.games-app-is-playing #gameContainer {
    display: flex !important;
    flex: 1 1 auto;
    flex-direction: column;
    width:100%;
    height:100%;
    min-width:0;
    min-height:0;
    margin:0 !important;
    padding:78px 18px 16px;
    box-sizing:border-box;
    background:
        radial-gradient(ellipse at 50% -10%, rgba(var(--games-accent-rgb),.13), transparent 52%),
        #0c0c0e;
}

#gamesWindow .games-player-bar {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    min-height:40px;
    margin:0 0 8px;
}

#gamesWindow #backToGamesBtn {
    display:inline-flex;
    align-items:center;
    gap:5px;
    min-width:76px;
    height:34px;
    padding:0 12px 0 9px;
    border:1px solid rgba(255,255,255,.13);
    border-radius:999px;
    color:rgba(255,255,255,.88);
    background:rgba(255,255,255,.07);
    cursor:pointer;
}
#gamesWindow #backToGamesBtn svg { width:16px; height:16px; }
#gamesWindow #backToGamesBtn span { font-size:11px; font-weight:620; }

#gamesWindow #gameHud {
    display:flex;
    align-items:center;
    gap:18px;
    min-height:34px;
    color:rgba(255,255,255,.76);
    font:650 11px/1.1 ui-monospace,"SFMono-Regular",Menlo,monospace;
    font-variant-numeric:tabular-nums;
}
#gamesWindow #gameScore { color:#fff; font-size:13px; }
#gamesWindow #gameLives { color:#ff6484; }

#gamesWindow .arcade-pro-toolbar {
    min-height:36px;
    margin:0 0 9px;
    padding:0 3px;
}
#gamesWindow .arcade-pro-title { color:rgba(255,255,255,.85); }
#gamesWindow .arcade-pro-high-score { border-color:rgba(255,255,255,.1); color:rgba(255,255,255,.48); background:rgba(255,255,255,.05); }
#gamesWindow .arcade-pro-btn {
    min-width:36px;
    height:32px;
    border-color:rgba(255,255,255,.11);
    border-radius:999px;
    color:rgba(255,255,255,.76);
    background:rgba(255,255,255,.065);
}
#gamesWindow .arcade-pro-fullscreen { width:34px; padding:0; }
#gamesWindow .arcade-pro-fullscreen.is-active { color:#fff; background:rgba(var(--games-accent-rgb),.2); }

#gamesWindow.games-app-is-playing #gameCanvas {
    flex:1 1 0;
    align-self:center;
    width:auto;
    height:auto;
    min-height:0;
    max-width:100%;
    margin-inline:auto;
    border-color:rgba(var(--games-accent-rgb),.18);
    outline:none;
}

#gamesWindow.games-app-is-playing #gameCanvas.arcade-pro-host:not(.arcade-pro-doom-host) {
    width:auto !important;
    max-height:100%;
    aspect-ratio:12/7;
}
#gamesWindow.games-app-is-playing #gameInstructions { flex:0 0 auto; margin:9px 0 0; color:rgba(255,255,255,.43); font-size:10px; text-align:center; }
#gamesWindow.games-app-is-playing .arcade-pro-tip kbd { border-color:rgba(255,255,255,.12); color:rgba(255,255,255,.72); background:rgba(255,255,255,.06); }

#gamesWindow.arcade-pro-doom-active .games-app-content { padding:0 !important; }
#gamesWindow.arcade-pro-doom-active #gameContainer { padding:72px 12px 12px !important; }
#gamesWindow.arcade-pro-doom-active #gameCanvas.arcade-pro-doom-host { border-radius:14px !important; }

@media (hover:hover) and (pointer:fine) {
    #gamesWindow .games-app-nav-item:hover { color:#fff; background:rgba(255,255,255,.09); }
    #gamesWindow .games-primary-button:hover,
    #gamesWindow .games-glass-button:hover,
    #gamesWindow .games-inline-play:hover,
    #gamesWindow .games-round-play:hover { transform:scale(1.035); }
    #gamesWindow .games-shelf-card:hover,
    #gamesWindow .games-catalog-card:hover { background:rgba(255,255,255,.075); }
    #gamesWindow .games-catalog-card:hover { transform:translateY(-2px); }
    #gamesWindow .games-editorial-card:hover { transform:translateY(-3px); box-shadow:0 18px 40px rgba(0,0,0,.24); }
    #gamesWindow .games-library-row:hover { background:rgba(255,255,255,.06); }
}

@container games-window (max-width: 900px) {
    #gamesWindow .games-app-wordmark { display:none; }
    #gamesWindow .games-hero-copy { width:54%; }
    #gamesWindow .games-hero-art { right:-8%; width:58%; }
    #gamesWindow .games-editorial-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    #gamesWindow .games-editorial-card:last-child { grid-column:span 2; aspect-ratio:16/6; }
    #gamesWindow .games-catalog-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    #gamesWindow .games-detail-orbit { right:5%; opacity:.65; }
}

@container games-window (max-width: 700px) {
    #gamesWindow .games-app-titlebar { grid-template-columns:82px 1fr 42px; padding-inline:12px; }
    #gamesWindow .games-app-nav { gap:0; padding:3px; }
    #gamesWindow .games-app-nav-item { min-width:0; padding-inline:9px; font-size:10px; }
    #gamesWindow .games-app-nav-search { min-width:32px; padding:0; }
    #gamesWindow .games-home-hero { min-height:430px; height:430px; padding:96px 24px 50px; }
    #gamesWindow .games-hero-copy { width:70%; }
    #gamesWindow .games-hero-art { right:-26%; opacity:.72; }
    #gamesWindow .games-app-section { padding-inline:22px; }
    #gamesWindow .games-editorial-grid { grid-template-columns:1fr; }
    #gamesWindow .games-editorial-card:last-child { grid-column:auto; aspect-ratio:16/10; }
    #gamesWindow .games-page-header { padding:104px 24px 25px; }
    #gamesWindow .games-arcade-feature { margin-inline:22px; }
    #gamesWindow .games-catalog-grid { grid-template-columns:1fr; }
    #gamesWindow .games-challenge-grid { grid-template-columns:1fr; padding-inline:22px; }
    #gamesWindow .games-library-summary { margin-inline:22px; }
    #gamesWindow .games-library-list,
    #gamesWindow .games-search-results { padding-inline:22px; }
    #gamesWindow .games-library-row { grid-template-columns:minmax(0,1fr) auto; }
    #gamesWindow .games-library-score { display:none; }
    #gamesWindow .games-search-wrap { margin-inline:22px; }
    #gamesWindow .games-detail-hero { min-height:500px; padding:118px 26px 48px; }
    #gamesWindow .games-detail-identity { grid-template-columns:96px minmax(0,1fr); gap:18px; }
    #gamesWindow .games-detail-icon.games-app-game-icon { width:96px; height:96px; border-radius:21px; }
    #gamesWindow .games-detail-orbit { right:-20%; opacity:.45; }
    #gamesWindow .games-detail-body { padding-inline:24px; }
    #gamesWindow .games-detail-previews { display:flex; overflow-x:auto; scroll-snap-type:x proximity; }
    #gamesWindow .games-detail-preview { flex:0 0 78%; scroll-snap-align:start; }
}

@media (pointer:coarse) {
    #gamesWindow .games-app-nav-item,
    #gamesWindow .games-primary-button,
    #gamesWindow .games-glass-button,
    #gamesWindow .games-inline-play { min-height:44px; }
    #gamesWindow .games-round-play,
    #gamesWindow .arcade-pro-btn { min-width:44px; height:44px; }
    #gamesWindow .arcade-pro-touch-btn { width:44px; height:44px; }
    #gamesWindow .arcade-pro-dpad { grid-template-columns:repeat(3,44px); grid-template-rows:repeat(3,44px); }
}

@media (max-width: 760px) {
    #gamesWindow.games-app-window {
        width:calc(100vw - 12px) !important;
        height:calc(100dvh - 106px - env(safe-area-inset-bottom)) !important;
        min-width:0;
        min-height:0;
        left:6px !important;
        top:26px !important;
        border-radius:14px;
    }
    #gamesWindow .games-app-content { padding:0 !important; }
}

@media (max-width: 520px) {
    #gamesWindow .games-app-titlebar { grid-template-columns:1fr auto; height:66px; }
    #gamesWindow .project-window-traffic { display:none; }
    #gamesWindow .games-app-nav { grid-column:1; justify-self:start; }
    #gamesWindow .games-app-profile { grid-column:2; }
    #gamesWindow .games-app-nav-item { padding-inline:7px; font-size:9px; }
    #gamesWindow .games-hero-copy { width:86%; }
    #gamesWindow .games-hero-copy h1 { font-size:40px; }
    #gamesWindow .games-hero-copy p { font-size:12px; }
    #gamesWindow .games-hero-art { right:-43%; opacity:.52; }
    #gamesWindow .games-editorial-card { min-height:180px; }
    #gamesWindow .games-library-header { align-items:start; flex-direction:column; }
    #gamesWindow .games-library-summary { grid-template-columns:1fr; }
    #gamesWindow .games-library-summary > div { grid-template-columns:auto 1fr; align-items:center; }
    #gamesWindow .games-detail-identity { grid-template-columns:1fr; }
    #gamesWindow .games-detail-identity p { display:none; }
    #gamesWindow .games-detail-facts { grid-template-columns:1fr; }
    #gamesWindow .games-player-bar { flex-wrap:wrap; }
    #gamesWindow #gameHud { margin-left:auto; gap:9px; }
}

#gamesWindow.games-app-compact-height .games-home-hero { min-height:330px; height:330px; }
#gamesWindow.games-app-compact-height .games-hero-copy p { display:none; }
#gamesWindow.games-app-compact-height .games-hero-copy h1 { font-size:40px; }
#gamesWindow.games-app-compact-height .games-detail-hero { min-height:350px; }

@keyframes gamesViewArrive { from { opacity:0; transform:translateY(9px); } to { opacity:1; transform:none; } }
@keyframes gamesOrbit { to { transform:translate(-50%,-50%) rotate(342deg); } }
@keyframes gamesOrbitReverse { to { transform:translate(-50%,-50%) rotate(-378deg); } }
@keyframes gamesDetailOrbit { to { transform:translateY(-50%) rotate(346deg); } }
@keyframes gamesPrismFloat { 0%,100% { transform:translate(-50%,-50%) rotate(8deg); } 50% { transform:translate(-50%,-54%) rotate(4deg); } }
@keyframes gamesShipDrift { 0%,100% { transform:translate(0,0) rotate(-9deg); } 50% { transform:translate(10px,-8px) rotate(-7deg); } }
@keyframes gamesLoadingPulse { to { opacity:.45; } }

@media (prefers-reduced-motion: reduce) {
    #gamesWindow .games-app-content { scroll-behavior:auto; }
    #gamesWindow .games-app-panel,
    #gamesWindow .games-detail-view,
    #gamesWindow .games-hero-orbit,
    #gamesWindow .games-hero-prism,
    #gamesWindow .games-hero-ship,
    #gamesWindow .games-detail-orbit,
    #gamesWindow .games-shelf-loading span { animation:none !important; }
    #gamesWindow .games-catalog-card,
    #gamesWindow .games-editorial-card,
    #gamesWindow .games-primary-button,
    #gamesWindow .games-glass-button,
    #gamesWindow .games-inline-play,
    #gamesWindow .games-round-play { transition:none !important; }
}

/* --------------------------------------------------------------------------
   Neon Relay: Overdrive — perimeter flight instrumentation
   -------------------------------------------------------------------------- */
#gamesWindow #gameCanvas.arcade-pro-neon-host,
#gamesWindow.games-app-is-playing #gameCanvas.arcade-pro-host.arcade-pro-neon-host:not(.arcade-pro-doom-host) {
    --nr-ink: #020611;
    --nr-panel: rgba(5, 12, 30, .68);
    --nr-line: rgba(127, 247, 255, .28);
    --nr-cyan: #7ff7ff;
    --nr-azure: #359bff;
    --nr-violet: #8f7cff;
    --nr-amber: #ffd27a;
    --nr-danger: #ff5c80;
    width: auto !important;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 16 / 9;
    border-color: rgba(127, 247, 255, .22);
    border-radius: 10px !important;
    background: var(--nr-ink) !important;
    box-shadow:
        0 22px 60px rgba(0, 0, 0, .46),
        0 0 0 1px rgba(255, 255, 255, .025) inset,
        0 0 45px rgba(53, 155, 255, .08) inset;
}

#gamesWindow .arcade-pro-three-stage.nr-stage {
    isolation: isolate;
    overflow: hidden;
    color: #effdff;
    background:
        radial-gradient(ellipse at 50% 46%, rgba(53, 155, 255, .16), transparent 34%),
        var(--nr-ink, #020611);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
    color-scheme: dark;
}

#gamesWindow .nr-stage .arcade-pro-three-canvas {
    z-index: 0;
    cursor: crosshair;
}

#gamesWindow .nr-interface {
    position: absolute;
    inset: 0;
    z-index: 3;
    overflow: hidden;
    pointer-events: none;
}

#gamesWindow .nr-interface [hidden] {
    display: none !important;
}

#gamesWindow .nr-hud {
    position: absolute;
    inset: 0;
    z-index: 5;
    padding: clamp(10px, 1.55vw, 18px);
    box-sizing: border-box;
    color: rgba(232, 253, 255, .9);
    font: 680 clamp(7px, .82vw, 10px)/1.15 ui-monospace, "SFMono-Regular", Menlo, monospace;
    font-variant-numeric: tabular-nums;
    letter-spacing: .1em;
    text-shadow: 0 0 13px rgba(127, 247, 255, .3);
    pointer-events: none;
}

#gamesWindow .nr-panel {
    position: absolute;
    width: clamp(116px, 16.5vw, 178px);
    padding: clamp(8px, 1.05vw, 12px);
    box-sizing: border-box;
    border: 1px solid var(--nr-line);
    clip-path: polygon(0 8px, 8px 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
    background:
        linear-gradient(135deg, rgba(127, 247, 255, .08), transparent 42%),
        var(--nr-panel);
    box-shadow: 0 14px 28px rgba(0, 0, 0, .18), inset 0 1px rgba(255, 255, 255, .055);
    -webkit-backdrop-filter: blur(10px) saturate(130%);
    backdrop-filter: blur(10px) saturate(130%);
}

#gamesWindow .nr-panel > span,
#gamesWindow .nr-overdrive-panel span,
#gamesWindow .nr-relay-meter > span {
    color: rgba(208, 248, 255, .56);
    font-size: .88em;
    letter-spacing: .16em;
}

#gamesWindow .nr-score-panel {
    top: clamp(10px, 1.55vw, 18px);
    left: clamp(10px, 1.55vw, 18px);
}

#gamesWindow .nr-score-panel > strong {
    display: block;
    margin: 4px 0 6px;
    color: #fff;
    font: 720 clamp(17px, 2.1vw, 25px)/.96 ui-monospace, "SFMono-Regular", Menlo, monospace;
    letter-spacing: -.055em;
    text-shadow: 0 0 18px rgba(127, 247, 255, .46);
}

#gamesWindow .nr-score-panel > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-top: 1px solid rgba(127, 247, 255, .12);
    padding-top: 6px;
}

#gamesWindow .nr-score-panel b {
    color: var(--nr-cyan);
    font-size: 1.08em;
}

#gamesWindow .nr-score-panel small {
    color: rgba(230, 252, 255, .56);
    font-size: .78em;
}

#gamesWindow .nr-objective {
    position: absolute;
    top: clamp(10px, 1.55vw, 18px);
    left: 50%;
    display: grid;
    justify-items: center;
    width: min(36%, 330px);
    min-width: 190px;
    transform: translateX(-50%);
    text-align: center;
}

#gamesWindow .nr-objective::before,
#gamesWindow .nr-objective::after {
    position: absolute;
    top: 12px;
    width: clamp(22px, 5vw, 68px);
    height: 1px;
    content: "";
    background: linear-gradient(90deg, transparent, rgba(127, 247, 255, .54));
    box-shadow: 0 0 8px rgba(127, 247, 255, .38);
}

#gamesWindow .nr-objective::before { right: calc(100% + 10px); }
#gamesWindow .nr-objective::after { left: calc(100% + 10px); transform: scaleX(-1); }

#gamesWindow .nr-objective > span {
    color: var(--nr-cyan);
    font-size: .82em;
    letter-spacing: .24em;
}

#gamesWindow .nr-objective > strong {
    max-width: 100%;
    margin: 4px 0 7px;
    overflow: hidden;
    color: #f5feff;
    font: 650 clamp(10px, 1.15vw, 14px)/1.15 -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    letter-spacing: .01em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#gamesWindow .nr-objective > i,
#gamesWindow .nr-systems-panel > i,
#gamesWindow .nr-relay-meter > i,
#gamesWindow .nr-overdrive-panel > i {
    position: relative;
    display: block;
    width: 100%;
    height: 3px;
    overflow: hidden;
    border: 1px solid rgba(127, 247, 255, .2);
    background: rgba(0, 8, 20, .66);
    box-shadow: 0 0 12px rgba(53, 155, 255, .1) inset;
}

#gamesWindow .nr-objective > i > b,
#gamesWindow .nr-systems-panel > i > b,
#gamesWindow .nr-relay-meter > i > b,
#gamesWindow .nr-overdrive-panel > i > b {
    position: absolute;
    inset: 0;
    display: block;
    background: linear-gradient(90deg, var(--nr-azure), var(--nr-cyan));
    box-shadow: 0 0 10px rgba(127, 247, 255, .8);
    transform: scaleX(0);
    transform-origin: left center;
    will-change: transform;
}

#gamesWindow .nr-threat-panel {
    top: clamp(10px, 1.55vw, 18px);
    right: clamp(10px, 1.55vw, 18px);
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    column-gap: 6px;
}

#gamesWindow .nr-threat-panel > span,
#gamesWindow .nr-threat-panel > strong { grid-column: 1; }
#gamesWindow .nr-threat-panel > strong { margin-top: 5px; color: #fff; font-size: 1.03em; }

#gamesWindow .nr-threat-panel canvas {
    grid-column: 2;
    grid-row: 1 / span 2;
    width: clamp(48px, 6.8vw, 76px);
    height: auto;
    opacity: .9;
    filter: drop-shadow(0 0 7px rgba(127, 247, 255, .3));
}

#gamesWindow .nr-systems-panel {
    bottom: clamp(10px, 1.55vw, 18px);
    left: clamp(10px, 1.55vw, 18px);
}

#gamesWindow .nr-systems-panel label {
    display: flex;
    justify-content: space-between;
    margin: 0 0 4px;
    color: rgba(216, 251, 255, .66);
    font-size: .82em;
}

#gamesWindow .nr-systems-panel > i { margin-bottom: 7px; }
#gamesWindow .nr-systems-panel [data-nr-heat] b { background: linear-gradient(90deg, var(--nr-cyan), var(--nr-amber), var(--nr-danger)); }
#gamesWindow .nr-systems-panel [data-nr-heat].is-critical { border-color: rgba(255, 92, 128, .72); }
#gamesWindow .nr-systems-panel [data-nr-heat].is-critical b { box-shadow: 0 0 12px rgba(255, 92, 128, .9); }

#gamesWindow .nr-dash {
    display: flex;
    gap: 5px;
    margin-top: 8px;
}

#gamesWindow .nr-dash > * {
    width: 18px;
    height: 3px;
    border: 1px solid rgba(127, 247, 255, .34);
    background: rgba(127, 247, 255, .08);
}

#gamesWindow .nr-dash > .is-ready,
#gamesWindow .nr-dash > [data-ready="true"] {
    background: var(--nr-cyan);
    box-shadow: 0 0 8px rgba(127, 247, 255, .78);
}

#gamesWindow .nr-overdrive-panel {
    position: absolute;
    right: clamp(10px, 1.55vw, 18px);
    bottom: clamp(10px, 1.55vw, 18px);
    width: clamp(145px, 19vw, 220px);
    padding: 9px 11px;
    box-sizing: border-box;
    border-right: 2px solid rgba(255, 210, 122, .45);
    background: linear-gradient(90deg, transparent, rgba(9, 14, 30, .68));
    text-align: right;
}

#gamesWindow .nr-overdrive-panel > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

#gamesWindow .nr-overdrive-panel strong { color: #fff; }
#gamesWindow .nr-overdrive-panel > i > b { background: linear-gradient(90deg, var(--nr-violet), var(--nr-cyan), var(--nr-amber)); }
#gamesWindow .nr-overdrive-panel small { display: block; margin-top: 5px; color: rgba(255, 222, 158, .72); font-size: .72em; letter-spacing: .15em; }

#gamesWindow .nr-stage[data-relay-phase="overdrive"] .nr-overdrive-panel {
    border-color: var(--nr-amber);
    filter: drop-shadow(0 0 12px rgba(255, 210, 122, .28));
}

#gamesWindow .nr-stage[data-relay-phase="overdrive"] .nr-overdrive-panel > i > b {
    background: linear-gradient(90deg, #ff9459, var(--nr-amber), #fff8dc);
    box-shadow: 0 0 13px rgba(255, 210, 122, .95);
}

#gamesWindow .nr-relay-meter {
    position: absolute;
    bottom: clamp(12px, 1.7vw, 20px);
    left: 50%;
    display: grid;
    grid-template-columns: auto minmax(90px, 180px) 34px;
    align-items: center;
    gap: 8px;
    width: min(44%, 360px);
    transform: translateX(-50%);
}

#gamesWindow .nr-relay-meter > i > b { background: linear-gradient(90deg, var(--nr-danger), var(--nr-amber), var(--nr-cyan)); }
#gamesWindow .nr-relay-meter > strong { color: #fff; text-align: right; }
#gamesWindow .nr-relay-meter.is-critical { color: var(--nr-danger); filter: drop-shadow(0 0 9px rgba(255, 92, 128, .42)); }
#gamesWindow .nr-interface.is-critical .nr-systems-panel { border-color: rgba(255, 92, 128, .56); }
#gamesWindow .nr-interface.is-overdrive .nr-panel { border-color: rgba(255, 210, 122, .3); text-shadow: 0 0 13px rgba(255, 210, 122, .3); }

#gamesWindow .nr-settings-button {
    position: absolute;
    right: clamp(10px, 1.55vw, 18px);
    top: clamp(92px, 10vw, 118px);
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    padding: 0;
    border: 1px solid rgba(127, 247, 255, .2);
    border-radius: 50%;
    color: rgba(224, 252, 255, .7);
    background: rgba(4, 11, 27, .58);
    -webkit-backdrop-filter: blur(9px);
    backdrop-filter: blur(9px);
    cursor: pointer;
    pointer-events: auto;
}

#gamesWindow .nr-settings-button:hover { color: #fff; border-color: rgba(127, 247, 255, .54); background: rgba(53, 155, 255, .2); }

#gamesWindow .nr-live {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

#gamesWindow .nr-screen,
#gamesWindow .nr-settings,
#gamesWindow .nr-results {
    position: absolute;
    inset: 0;
    z-index: 18;
    display: grid;
    place-items: center;
    padding: clamp(14px, 3vw, 32px);
    box-sizing: border-box;
    color: #f5feff;
    background:
        radial-gradient(ellipse at 50% 48%, rgba(53, 155, 255, .13), transparent 32%),
        linear-gradient(180deg, rgba(2, 6, 17, .4), rgba(2, 6, 17, .82));
    -webkit-backdrop-filter: blur(5px) saturate(120%);
    backdrop-filter: blur(5px) saturate(120%);
    pointer-events: auto;
}

#gamesWindow .nr-screen { opacity: 0; visibility: hidden; transition: opacity 380ms ease, visibility 380ms ease; }
#gamesWindow .nr-screen.is-visible { opacity: 1; visibility: visible; }

#gamesWindow .nr-screen-card,
#gamesWindow .nr-results-card {
    position: relative;
    width: min(560px, 82%);
    padding: clamp(22px, 4vw, 42px);
    box-sizing: border-box;
    border-block: 1px solid rgba(127, 247, 255, .22);
    text-align: center;
}

#gamesWindow .nr-title-card::before,
#gamesWindow .nr-title-card::after {
    position: absolute;
    top: 50%;
    width: min(18vw, 180px);
    height: 1px;
    content: "";
    background: linear-gradient(90deg, transparent, rgba(127, 247, 255, .52));
}

#gamesWindow .nr-title-card::before { right: 100%; }
#gamesWindow .nr-title-card::after { left: 100%; transform: scaleX(-1); }

#gamesWindow .nr-title-logo {
    width: min(78%, 390px);
    min-height: 72px;
    margin: 0 auto 8px;
    background-repeat: no-repeat;
    filter: drop-shadow(0 0 18px rgba(127, 247, 255, .38));
    animation: nrLogoBreathe 4.8s ease-in-out infinite;
}

#gamesWindow .nr-kicker {
    color: var(--nr-cyan);
    font: 720 clamp(8px, 1vw, 11px)/1.2 ui-monospace, "SFMono-Regular", Menlo, monospace;
    letter-spacing: .22em;
}

#gamesWindow .nr-screen-card h2,
#gamesWindow .nr-results-card h3,
#gamesWindow .nr-settings-card h3 {
    margin: 8px 0 10px;
    color: #fff;
    font: 730 clamp(28px, 5vw, 54px)/.9 -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
    letter-spacing: -.055em;
    text-wrap: balance;
}

#gamesWindow .nr-screen-card p,
#gamesWindow .nr-results-card p {
    max-width: 440px;
    margin: 0 auto;
    color: rgba(224, 247, 255, .62);
    font-size: clamp(10px, 1.3vw, 13px);
    line-height: 1.5;
}

#gamesWindow .nr-screen-card > small {
    display: block;
    margin-top: 15px;
    color: rgba(220, 248, 255, .42);
    font: 620 clamp(7px, .95vw, 9px)/1.55 ui-monospace, "SFMono-Regular", Menlo, monospace;
    letter-spacing: .035em;
}

#gamesWindow .nr-screen-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: clamp(16px, 2.5vw, 26px);
}

#gamesWindow .nr-screen-actions button,
#gamesWindow .nr-results-card button {
    min-height: 36px;
    padding: 0 17px;
    border: 1px solid rgba(127, 247, 255, .26);
    border-radius: 999px;
    color: #edfefe;
    background: rgba(127, 247, 255, .09);
    box-shadow: inset 0 1px rgba(255, 255, 255, .07);
    font-size: 11px;
    font-weight: 650;
    cursor: pointer;
}

#gamesWindow .nr-screen-actions button:first-child {
    color: #021017;
    border-color: transparent;
    background: linear-gradient(135deg, #dcffff, var(--nr-cyan));
    box-shadow: 0 0 25px rgba(127, 247, 255, .2);
}

#gamesWindow .nr-screen-actions button:disabled { opacity: .38; cursor: wait; }
#gamesWindow .nr-screen-actions button:not(:disabled):hover { transform: translateY(-1px); filter: brightness(1.08); }

#gamesWindow .nr-settings {
    z-index: 24;
    background: rgba(1, 5, 14, .72);
    -webkit-backdrop-filter: blur(18px) saturate(125%);
    backdrop-filter: blur(18px) saturate(125%);
}

#gamesWindow .nr-settings-card {
    width: min(520px, 94%);
    max-height: 92%;
    padding: clamp(16px, 2.8vw, 28px);
    overflow: auto;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 14px;
    background: linear-gradient(155deg, rgba(20, 31, 57, .95), rgba(5, 9, 22, .96));
    box-shadow: 0 30px 80px rgba(0, 0, 0, .54), inset 0 1px rgba(255, 255, 255, .1);
}

#gamesWindow .nr-settings-card header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

#gamesWindow .nr-settings-card h3 { margin: 5px 0 0; font-size: clamp(24px, 3.5vw, 34px); }

#gamesWindow .nr-settings-card header > button {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 50%;
    color: rgba(255, 255, 255, .78);
    background: rgba(255, 255, 255, .07);
    cursor: pointer;
}

#gamesWindow .nr-settings-card > label:not(.nr-setting-toggle) {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px;
    margin: 11px 0;
    color: rgba(239, 251, 255, .78);
    font-size: 11px;
}

#gamesWindow .nr-settings-card output {
    color: var(--nr-cyan);
    font: 680 10px/1 ui-monospace, "SFMono-Regular", Menlo, monospace;
}

#gamesWindow .nr-settings-card input[type="range"] {
    grid-column: 1 / -1;
    width: 100%;
    height: 3px;
    margin: 2px 0 0;
    accent-color: var(--nr-cyan);
}

#gamesWindow .nr-setting-toggle {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 30px;
    color: rgba(239, 251, 255, .76);
    font-size: 11px;
}

#gamesWindow .nr-setting-toggle input { accent-color: var(--nr-cyan); }

#gamesWindow .nr-settings-card fieldset {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    margin: 14px 0 0;
    padding: 12px;
    border: 1px solid rgba(127, 247, 255, .13);
}

#gamesWindow .nr-settings-card legend {
    padding: 0 6px;
    color: rgba(220, 248, 255, .5);
    font: 680 8px/1 ui-monospace, "SFMono-Regular", Menlo, monospace;
    letter-spacing: .14em;
}

#gamesWindow .nr-settings-card fieldset button {
    display: grid;
    gap: 4px;
    min-height: 48px;
    padding: 7px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 8px;
    color: rgba(239, 251, 255, .68);
    background: rgba(255, 255, 255, .045);
    font-size: 9px;
    cursor: pointer;
}

#gamesWindow .nr-settings-card kbd {
    color: var(--nr-cyan);
    font: 700 10px/1 ui-monospace, "SFMono-Regular", Menlo, monospace;
}

#gamesWindow .nr-results { z-index: 22; background: rgba(1, 5, 14, .76); -webkit-backdrop-filter: blur(15px); backdrop-filter: blur(15px); }
#gamesWindow .nr-results-card h3 { color: var(--nr-cyan); font-size: clamp(38px, 7vw, 72px); text-shadow: 0 0 28px rgba(127, 247, 255, .35); }

#gamesWindow .nr-results-card dl {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    margin: 20px 0 0;
    background: rgba(127, 247, 255, .12);
}

#gamesWindow .nr-results-card dl > div { padding: 10px 5px; background: rgba(4, 10, 25, .94); }
#gamesWindow .nr-results-card dt { color: rgba(220, 248, 255, .48); font-size: 7px; letter-spacing: .1em; text-transform: uppercase; }
#gamesWindow .nr-results-card dd { margin: 5px 0 0; color: #fff; font: 680 11px/1 ui-monospace, "SFMono-Regular", Menlo, monospace; }

#gamesWindow .nr-stage .neon-relay-upgrades {
    z-index: 23;
    background: rgba(1, 5, 14, .72);
    -webkit-backdrop-filter: blur(18px) saturate(130%);
    backdrop-filter: blur(18px) saturate(130%);
    pointer-events: auto;
}

#gamesWindow .nr-stage .neon-relay-upgrade-card {
    border-radius: 12px;
    border-color: rgba(127, 247, 255, .2);
    background: linear-gradient(145deg, rgba(14, 25, 50, .96), rgba(4, 8, 20, .97));
}

#gamesWindow .nr-stage .neon-relay-upgrade-grid button {
    clip-path: polygon(0 8px, 8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
    border-radius: 0;
    background: linear-gradient(145deg, rgba(127, 247, 255, .075), rgba(143, 124, 255, .06));
}

#gamesWindow .nr-stage > .arcade-pro-touch { z-index: 14; }
#gamesWindow .nr-stage[data-relay-state="boot"] > .arcade-pro-touch,
#gamesWindow .nr-stage[data-relay-state="title"] > .arcade-pro-touch,
#gamesWindow .nr-stage[data-relay-state="results"] > .arcade-pro-touch,
#gamesWindow .nr-stage[data-relay-state="defeat"] > .arcade-pro-touch { opacity: 0; pointer-events: none; }

#gamesWindow .arcade-pro-touch-relay .arcade-pro-touch-actions { align-items: center; }

#gamesWindow .arcade-pro-touch-relay .arcade-pro-touch-btn[data-key="ShiftLeft"],
#gamesWindow .arcade-pro-touch-relay .arcade-pro-touch-btn[data-key="KeyE"] {
    width: 48px;
    height: 32px;
    border-radius: 999px;
    font: 720 8px/1 ui-monospace, "SFMono-Regular", Menlo, monospace;
    letter-spacing: .06em;
}

#gamesWindow .arcade-pro-touch-relay .arcade-pro-touch-btn[data-key="KeyE"] {
    border-color: rgba(255, 210, 122, .62);
    color: var(--nr-amber, #ffd27a);
}

@media (pointer: coarse), (max-width: 760px) {
    #gamesWindow.games-app-is-playing #gameCanvas.arcade-pro-host.arcade-pro-neon-host:not(.arcade-pro-doom-host) {
        flex: 0 0 auto;
        width: 100% !important;
        height: auto !important;
        max-height: none;
        aspect-ratio: 16 / 9;
    }
    #gamesWindow .nr-stage .nr-systems-panel,
    #gamesWindow .nr-stage .nr-overdrive-panel { bottom: 70px; }
    #gamesWindow .nr-stage .nr-relay-meter { bottom: 76px; width: 38%; }
    #gamesWindow .nr-stage .nr-settings-button { top: 80px; }
    #gamesWindow .arcade-pro-touch-relay .arcade-pro-touch-actions { flex-wrap: wrap; justify-content: flex-end; width: 106px; }
    #gamesWindow .arcade-pro-touch-relay .arcade-pro-touch-btn[data-key="Space"] { order: -1; }
}

@media (max-width: 620px), (max-height: 540px) {
    #gamesWindow .nr-panel { width: 112px; padding: 7px; }
    #gamesWindow .nr-score-panel > strong { font-size: 16px; }
    #gamesWindow .nr-threat-panel canvas { display: none; }
    #gamesWindow .nr-threat-panel { display: block; }
    #gamesWindow .nr-objective { width: 39%; min-width: 148px; }
    #gamesWindow .nr-objective::before,
    #gamesWindow .nr-objective::after { display: none; }
    #gamesWindow .nr-overdrive-panel { width: 130px; }
    #gamesWindow .nr-relay-meter { grid-template-columns: minmax(60px, 1fr) 30px; }
    #gamesWindow .nr-relay-meter > span { display: none; }
    #gamesWindow .nr-settings-button { display: none; }
    #gamesWindow .nr-title-logo { min-height: 48px; }
    #gamesWindow .nr-screen-card { padding-block: 18px; }
    #gamesWindow .nr-screen-card > small { display: none; }
    #gamesWindow .nr-results-card dl { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 430px) {
    #gamesWindow .nr-objective { top: 8px; }
    #gamesWindow .nr-score-panel,
    #gamesWindow .nr-threat-panel { top: 47px; }
    #gamesWindow .nr-score-panel > div,
    #gamesWindow .nr-threat-panel > span { display: none; }
    #gamesWindow .nr-systems-panel { display: none; }
    #gamesWindow .nr-overdrive-panel { right: 8px; bottom: 67px; }
    #gamesWindow .nr-relay-meter { left: 8px; bottom: 70px; width: 36%; transform: none; }
    #gamesWindow .nr-settings-card fieldset { grid-template-columns: 1fr; }
    #gamesWindow .nr-results-card dl { grid-template-columns: repeat(2, 1fr); }
}

@media (max-height: 260px) {
    #gamesWindow .nr-screen { padding: 4px; }
    #gamesWindow .nr-screen-card {
        width: 96%;
        padding: 3px 10px 5px;
        border-block-color: rgba(127, 247, 255, .18);
    }
    #gamesWindow .nr-title-logo {
        width: min(38%, 180px);
        min-height: 30px;
        margin-bottom: 0;
    }
    #gamesWindow .nr-kicker { font-size: 6px; letter-spacing: .18em; }
    #gamesWindow .nr-screen-card h2 {
        margin: 2px 0 3px;
        font-size: clamp(17px, 6.3vw, 24px);
        line-height: .92;
    }
    #gamesWindow .nr-screen-card p,
    #gamesWindow .nr-screen-card > small { display: none; }
    #gamesWindow .nr-screen-actions { gap: 5px; margin-top: 6px; }
    #gamesWindow .nr-screen-actions button {
        min-height: 25px;
        padding-inline: 10px;
        font-size: 8px;
    }
    #gamesWindow .nr-title-card::before,
    #gamesWindow .nr-title-card::after { display: none; }
    #gamesWindow .nr-objective { top: 5px; padding: 4px 8px 5px; }
    #gamesWindow .nr-objective strong { font-size: 7px; }
    #gamesWindow .nr-score-panel { top: 35px; left: 6px; }
    #gamesWindow .nr-threat-panel { display: none; }
    #gamesWindow .nr-overdrive-panel { right: 6px; bottom: 48px; width: 112px; padding: 5px 7px; }
    #gamesWindow .nr-relay-meter { bottom: 50px; }
}

/* The game can be a short 16:9 island inside a tall phone viewport, so its
   compact presentation must follow the stage height rather than viewport height. */
#gamesWindow .nr-stage.nr-compact .nr-screen { padding: 4px; }
#gamesWindow .nr-stage.nr-compact .nr-screen-card {
    width: 96%;
    padding: 3px 10px 5px;
    border-block-color: rgba(127, 247, 255, .18);
}
#gamesWindow .nr-stage.nr-compact .nr-title-logo {
    width: min(38%, 180px);
    min-height: 30px;
    margin-bottom: 0;
}
#gamesWindow .nr-stage.nr-compact .nr-kicker { font-size: 6px; letter-spacing: .18em; }
#gamesWindow .nr-stage.nr-compact .nr-screen-card h2 {
    margin: 2px 0 3px;
    font-size: clamp(17px, 6.3vw, 24px);
    line-height: .92;
}
#gamesWindow .nr-stage.nr-compact .nr-screen-card p,
#gamesWindow .nr-stage.nr-compact .nr-screen-card > small { display: none; }
#gamesWindow .nr-stage.nr-compact .nr-screen-actions { gap: 5px; margin-top: 6px; }
#gamesWindow .nr-stage.nr-compact .nr-screen-actions button {
    min-height: 25px;
    padding-inline: 10px;
    font-size: 8px;
}
#gamesWindow .nr-stage.nr-compact .nr-title-card::before,
#gamesWindow .nr-stage.nr-compact .nr-title-card::after { display: none; }
#gamesWindow .nr-stage.nr-compact .nr-objective { top: 5px; padding: 4px 8px 5px; }
#gamesWindow .nr-stage.nr-compact .nr-objective strong { font-size: 7px; }
#gamesWindow .nr-stage.nr-compact .nr-score-panel { top: 35px; left: 6px; }
#gamesWindow .nr-stage.nr-compact .nr-threat-panel { display: none; }
#gamesWindow .nr-stage.nr-compact .nr-overdrive-panel { right: 6px; bottom: 48px; width: 112px; padding: 5px 7px; }
#gamesWindow .nr-stage.nr-compact .nr-relay-meter { bottom: 50px; }

@keyframes nrLogoBreathe {
    0%, 100% { opacity: .88; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
    #gamesWindow .nr-title-logo { animation: none; }
    #gamesWindow .nr-screen,
    #gamesWindow .nr-screen-actions button,
    #gamesWindow .nr-objective > i > b,
    #gamesWindow .nr-systems-panel > i > b,
    #gamesWindow .nr-relay-meter > i > b,
    #gamesWindow .nr-overdrive-panel > i > b { transition: none !important; }
}
