* { box-sizing: border-box; margin: 0; padding: 0; }



html {

    height: 100%;

    overflow-x: hidden;

}



body {

    min-height: 100%;

    min-height: 100dvh;

    font-family: "Press Start 2P", monospace;

    background:

        radial-gradient(ellipse 90% 50% at 50% 100%, rgba(90, 60, 40, 0.15) 0%, transparent 50%),

        radial-gradient(ellipse at 50% 0%, rgba(255, 45, 106, 0.08), transparent 55%),

        linear-gradient(180deg, #1a1410 0%, #0d0a08 40%, #080604 100%);

    padding:

        max(0.5rem, env(safe-area-inset-top))

        max(0.5rem, env(safe-area-inset-right))

        max(0.5rem, env(safe-area-inset-bottom))

        max(0.5rem, env(safe-area-inset-left));

    overflow-x: hidden;

}



:root {

    /* Vertical space reserved for marquee, bezels, HUD, keyboard, gaps */

    --fit-chrome: 15.5rem;

    --fit-hud: 0rem;

    --game-aspect: 640 / 480;

    --game-max-w: min(96vw, 1280px);

}



body.shift-active {

    --fit-hud: 5.75rem;

}



body.shift-active.interact-active {

    --fit-hud: 9rem;

}



/* ── Page title marquee ── */

.retro-page {

    width: min(99vw, 1440px);

    margin: 0 auto;

    display: flex;

    flex-direction: column;

    gap: clamp(0.35rem, 1.5vh, 0.75rem);

    min-height: calc(100dvh - 1rem);

    max-height: 100dvh;

}



.game-marquee {

    text-align: center;

    padding: clamp(0.25rem, 1vh, 0.5rem) 0.5rem 0.15rem;

    flex-shrink: 0;

}



.game-marquee__glow {

    font-size: clamp(0.32rem, 1.2vw, 0.42rem);

    color: #42ff42;

    letter-spacing: 0.15em;

    margin-bottom: 0.5rem;

    animation: blink-slow 2s step-end infinite;

}



.game-marquee__title {

    font-size: clamp(0.85rem, 3.5vw, 1.6rem);

    color: #ff2d6a;

    text-shadow:

        0 0 20px rgba(255, 45, 106, 0.6),

        0 0 40px rgba(255, 45, 106, 0.3),

        2px 2px 0 #1a0820;

    line-height: 1.6;

    letter-spacing: 0.08em;

}



.game-marquee__sub {

    font-size: clamp(0.34rem, 1.3vw, 0.46rem);

    color: #8899cc;

    margin-top: 0.5rem;

    line-height: 2;

}



@keyframes blink-slow {

    50% { opacity: 0.4; }

}



/* ── Desk ambiance (outside the monitor) ── */



.desk-scene {

    flex: 1 1 auto;

    min-height: 0;

    position: relative;

    display: flex;

    flex-direction: column;

    border-radius: 10px;

    overflow: hidden;

    box-shadow:

        0 12px 40px rgba(0, 0, 0, 0.55),

        inset 0 1px 0 rgba(255, 220, 180, 0.06);

}



.desk-scene__wall {

    position: absolute;

    inset: 0 0 0;

    z-index: 0;

    background:

        repeating-linear-gradient(

            90deg,

            rgba(255, 255, 255, 0.015) 0px,

            rgba(255, 255, 255, 0.015) 1px,

            transparent 1px,

            transparent 48px

        ),

        repeating-linear-gradient(

            0deg,

            rgba(255, 255, 255, 0.01) 0px,

            rgba(255, 255, 255, 0.01) 1px,

            transparent 1px,

            transparent 48px

        ),

        linear-gradient(175deg, #1e1a2e 0%, #141220 45%, #0e0c16 100%);

    border-bottom: 2px solid rgba(90, 80, 70, 0.35);

}



.desk-wall-art {

    position: absolute;

    top: clamp(0.5rem, 3vh, 1.25rem);

    left: clamp(0.75rem, 4vw, 2rem);

    image-rendering: pixelated;

    image-rendering: crisp-edges;

    filter: drop-shadow(3px 4px 0 rgba(0, 0, 0, 0.45));

    opacity: 0.92;

}



.desk-scene__shelf {

    position: absolute;

    top: clamp(3.5rem, 12vh, 5rem);

    right: clamp(0.75rem, 5vw, 2.5rem);

    width: clamp(4.5rem, 12vw, 6.5rem);

    height: 6px;

    background: linear-gradient(180deg, #6a5040, #4a3828);

    border-radius: 1px;

    box-shadow: 0 4px 0 #3a2a20, 0 6px 12px rgba(0, 0, 0, 0.35);

}



.desk-scene__shelf-label {

    position: absolute;

    top: -14px;

    right: 0;

    font-size: clamp(0.22rem, 0.9vw, 0.28rem);

    color: rgba(136, 153, 204, 0.55);

    letter-spacing: 0.08em;

    white-space: nowrap;

}



.desk-scene__lamp-glow {

    position: absolute;

    top: -10%;

    left: -5%;

    width: 55%;

    height: 70%;

    z-index: 1;

    pointer-events: none;

    background: radial-gradient(ellipse at 20% 30%, rgba(255, 200, 120, 0.14) 0%, transparent 55%);

    animation: lamp-flicker 6s ease-in-out infinite;

}



.desk-scene__monitor-glow {

    position: absolute;

    top: 20%;

    left: 50%;

    transform: translateX(-50%);

    width: min(70%, 520px);

    height: 45%;

    z-index: 1;

    pointer-events: none;

    background:

        radial-gradient(ellipse at 50% 40%, rgba(0, 240, 255, 0.07) 0%, transparent 50%),

        radial-gradient(ellipse at 50% 60%, rgba(255, 45, 106, 0.05) 0%, transparent 45%);

}



@keyframes lamp-flicker {

    0%, 100% { opacity: 1; }

    48% { opacity: 0.92; }

    50% { opacity: 0.85; }

    52% { opacity: 0.95; }

}



.desk-scene__surface {

    position: relative;

    z-index: 2;

    flex: 1 1 auto;

    min-height: 0;

    display: flex;

    flex-direction: column;

    margin-top: clamp(2.5rem, 10vh, 4rem);

    padding: clamp(0.35rem, 1.5vh, 0.75rem) clamp(0.35rem, 1.5vw, 0.75rem) clamp(0.5rem, 1.5vh, 1rem);

    background:

        repeating-linear-gradient(

            93deg,

            transparent,

            transparent 28px,

            rgba(0, 0, 0, 0.04) 28px,

            rgba(0, 0, 0, 0.04) 29px

        ),

        linear-gradient(180deg, #5c4434 0%, #4a3628 6%, #3d2c22 55%, #35261e 100%);

    border-top: 2px solid rgba(255, 220, 180, 0.12);

    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.04);

}



.desk-scene__surface::before {

    content: "";

    position: absolute;

    inset: 0;

    pointer-events: none;

    background: radial-gradient(ellipse 80% 40% at 50% 0%, rgba(255, 220, 160, 0.06) 0%, transparent 60%);

}



/* ── Desk layout ── */

.desk-layout {

    flex: 1 1 auto;

    min-height: 0;

    display: flex;

    align-items: flex-end;

    justify-content: center;

    gap: clamp(0.35rem, 1.5vw, 1.5rem);

    padding: 0;

    position: relative;

    z-index: 1;

}



.desk-props {

    display: flex;

    flex-direction: column;

    justify-content: flex-end;

    align-items: center;

    gap: clamp(0.65rem, 2vh, 1.25rem);

    padding-bottom: clamp(0.25rem, 1vh, 0.5rem);

    flex-shrink: 0;

}



.desk-props--left { align-items: flex-end; }

.desk-props--right { align-items: flex-start; }



.desk-prop {

    display: block;

    image-rendering: pixelated;

    image-rendering: crisp-edges;

    filter: drop-shadow(2px 3px 0 rgba(0, 0, 0, 0.45));

    transition: transform 0.2s ease;

}



.desk-prop--lamp {

    filter: drop-shadow(2px 3px 0 rgba(0, 0, 0, 0.5)) drop-shadow(0 0 12px rgba(255, 200, 100, 0.25));

}



.desk-prop:hover {

    transform: translateY(-2px);

}



.desk-prop--inline {

    flex-shrink: 0;

    margin-left: 0.75rem;

}



/* ── Retro computer / monitor ── */

.retro-computer {

    flex: 1 1 auto;

    min-width: 0;

    min-height: 0;

    max-width: var(--game-max-w);

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: flex-end;

    position: relative;

    z-index: 2;

    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.5));

}



.monitor-stand {

    width: 42%;

    max-width: 220px;

    height: clamp(8px, 1.5vh, 12px);

    margin: -1px auto 0;

    flex-shrink: 0;

    background: linear-gradient(180deg, #7a7568 0%, #5a5548 40%, #4a4540 100%);

    border-radius: 0 0 3px 3px;

    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.35);

    position: relative;

}



.monitor-stand::after {

    content: "";

    display: block;

    width: 130%;

    height: clamp(5px, 1vh, 8px);

    margin: 0 auto;

    margin-left: -15%;

    background: linear-gradient(180deg, #4a4540, #3a3830);

    border-radius: 0 0 8px 8px;

    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);

}



.monitor {

    width: 100%;

    flex: 1 1 auto;

    min-height: 0;

    display: flex;

    flex-direction: column;

}



.monitor__bezel-top {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 0.5rem;

    padding: clamp(0.35rem, 1.2vh, 0.6rem) clamp(0.5rem, 2vw, 1rem);

    background: linear-gradient(180deg, #c8c0b0 0%, #9a9488 50%, #7a7568 100%);

    border: 4px solid #5a5548;

    border-bottom: none;

    border-radius: 12px 12px 0 0;

    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35);

    flex-shrink: 0;

}



.monitor__brand {

    font-size: clamp(0.32rem, 1.1vw, 0.42rem);

    color: #2a2820;

}



.monitor__title {

    font-size: clamp(0.34rem, 1.2vw, 0.44rem);

    color: #1a1810;

    letter-spacing: 0.06em;

    text-align: center;

    flex: 1;

}



.monitor__pwr {

    font-size: clamp(0.28rem, 1vw, 0.36rem);

    color: #333;

    display: flex;

    align-items: center;

    gap: 4px;

}



.pwr-led {

    display: inline-block;

    width: 8px;

    height: 8px;

    background: #42ff42;

    border-radius: 50%;

    box-shadow: 0 0 8px #42ff42;

    animation: blink-slow 3s ease-in-out infinite;

}



.monitor__frame {

    padding: clamp(6px, 1.2vw, 16px);

    background: linear-gradient(145deg, #b8b0a0, #8a8478);

    border-left: 4px solid #5a5548;

    border-right: 4px solid #5a5548;

    box-shadow:

        inset 0 0 0 3px #3a3830,

        inset 0 0 24px rgba(0, 0, 0, 0.35);

    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 0;

    flex: 1 1 auto;

    min-height: 0;

}



.monitor__screen {

    position: relative;

    width: min(100%, calc((100dvh - var(--fit-chrome) - var(--fit-hud)) * 640 / 480));

    max-width: 100%;

    aspect-ratio: var(--game-aspect);

    flex-shrink: 1;

    min-height: 0;

    background: #0a1020;

    border: 3px solid #1a1810;

    border-radius: clamp(5px, 1.2vw, 12px);

    box-shadow:

        inset 0 0 48px rgba(0, 0, 0, 0.8),

        inset 0 0 120px rgba(20, 80, 60, 0.06),

        0 0 24px rgba(66, 255, 120, 0.04);

    overflow: hidden;

    filter: contrast(1.03) saturate(1.05) brightness(0.97);

}



/* ── CRT screen effects (subtle) ── */

.crt-fx {

    position: absolute;

    inset: 0;

    pointer-events: none;

    z-index: 5;

    border-radius: inherit;

    overflow: hidden;

}



.crt-fx > * {

    position: absolute;

    inset: 0;

    pointer-events: none;

    border-radius: inherit;

}



.crt-phosphor {

    background:

        radial-gradient(ellipse 90% 80% at 50% 48%, rgba(120, 255, 200, 0.045) 0%, transparent 65%),

        radial-gradient(ellipse 100% 100% at 50% 50%, rgba(0, 240, 255, 0.02) 0%, transparent 70%);

    mix-blend-mode: screen;

}



.crt-scanlines {

    background: repeating-linear-gradient(

        0deg,

        transparent,

        transparent 2px,

        rgba(0, 0, 0, 0.07) 2px,

        rgba(0, 0, 0, 0.07) 4px

    );

    opacity: 0.85;

}



.crt-vignette {

    box-shadow:

        inset 0 0 90px rgba(0, 0, 0, 0.42),

        inset 0 0 24px rgba(0, 0, 0, 0.25);

}



.crt-grain {

    opacity: 0.028;

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

    background-size: 180px 180px;

}



.crt-glass {

    background:

        linear-gradient(145deg, rgba(255, 255, 255, 0.06) 0%, transparent 38%),

        linear-gradient(325deg, rgba(255, 255, 255, 0.02) 0%, transparent 28%);

}



.crt-flicker {

    background: rgba(255, 255, 255, 0.015);

    animation: crt-flicker 5.5s ease-in-out infinite;

}



@keyframes crt-flicker {

    0%, 100% { opacity: 0.35; }

    48% { opacity: 0.5; }

    49% { opacity: 0.2; }

    50% { opacity: 0.45; }

    88% { opacity: 0.38; }

}



@media (prefers-reduced-motion: reduce) {

    .crt-flicker {

        animation: none;

        opacity: 0.3;

    }

}



#gameCanvas {

    display: block;

    width: 100%;

    height: 100%;

    image-rendering: pixelated;

    image-rendering: crisp-edges;

    background: #0a1020;

    outline: none;

    vertical-align: top;

    border-radius: inherit;

}



.monitor__bezel-bottom {

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: clamp(0.35rem, 1vh, 0.5rem) clamp(0.5rem, 2vw, 1rem) clamp(0.4rem, 1.2vh, 0.75rem);

    background: linear-gradient(0deg, #9a9488 0%, #c8c0b0 100%);

    border: 4px solid #5a5548;

    border-top: 2px solid #6a6558;

    border-radius: 0 0 12px 12px;

    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);

    flex-shrink: 0;

}



.monitor__hint,

.monitor__model {

    font-size: clamp(0.28rem, 1vw, 0.36rem);

    color: #3a3830;

}



/* ── Decorative keyboard ── */

.keyboard-deco {

    display: flex;

    align-items: flex-end;

    justify-content: center;

    margin-top: clamp(0.15rem, 0.8vh, 0.5rem);

    width: min(92%, calc((100dvh - var(--fit-chrome) - var(--fit-hud)) * 640 / 480));

    max-width: 720px;

    flex-shrink: 0;

    position: relative;

    z-index: 1;

}



.keyboard-deco__body {

    flex: 1;

    height: clamp(32px, 5vw, 48px);

    background: linear-gradient(180deg, #e0d8d0 0%, #c8c0b8 35%, #a8a098 100%);

    border: 3px solid #6a6558;

    border-radius: 6px 6px 10px 10px;

    padding: 6px 8px 8px;

    box-shadow:

        0 6px 0 #4a4540,

        0 10px 20px rgba(0, 0, 0, 0.45),

        inset 0 1px 0 rgba(255, 255, 255, 0.35);

    position: relative;

}



.keyboard-deco__body::before {

    content: "";

    position: absolute;

    top: 5px;

    left: 8px;

    right: 8px;

    height: 35%;

    background:

        repeating-linear-gradient(90deg,

            #d8d0c8 0px, #d8d0c8 7px,

            #b8b0a8 7px, #b8b0a8 8px);

    border-radius: 2px;

    opacity: 0.85;

}



.keyboard-deco__keys {

    height: 55%;

    margin-top: auto;

    background:

        repeating-linear-gradient(90deg,

            #ece4dc 0px, #ece4dc 9px,

            #c8c0b8 9px, #c8c0b8 10px);

    border-radius: 2px;

    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);

    opacity: 0.95;

    position: relative;

}



.keyboard-deco__keys::after {

    content: "";

    position: absolute;

    bottom: 2px;

    left: 20%;

    right: 20%;

    height: 4px;

    background: #b0a8a0;

    border-radius: 1px;

    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);

}



.hidden { display: none !important; }



#gameShell {

    position: relative;

}



.game-error {

    position: absolute;

    inset: 0;

    background: #400;

    color: #fff;

    padding: 1rem;

    font-size: 0.5rem;

    line-height: 2;

    z-index: 9999;

}



.overlay-panel {

    position: absolute;

    inset: 0;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    background: rgba(0, 0, 0, 0.9);

    text-align: center;

    padding: clamp(0.5rem, 2vw, 1.5rem);

    gap: clamp(0.35rem, 1.5vh, 0.75rem);

    z-index: 10;

    overflow-y: auto;

    overscroll-behavior: contain;

    -webkit-overflow-scrolling: touch;

}



.title-glow {

    font-size: clamp(0.5rem, 2vw, 0.7rem);

    color: #00f0ff;

    letter-spacing: 0.2em;

}



.overlay-panel h1 {

    font-size: clamp(1rem, 4.5vw, 1.8rem);

    color: #ff2d6a;

    line-height: 1.5;

}



.role { font-size: clamp(0.4rem, 1.8vw, 0.55rem); color: #ffd700; line-height: 2; }

.subtitle { font-size: clamp(0.4rem, 1.6vw, 0.5rem); color: #8899cc; line-height: 2; }



.title-status {

    font-size: clamp(0.38rem, 1.5vw, 0.48rem);

    color: #42ff42;

    line-height: 2;

}



.end-thanks {

    font-size: clamp(0.36rem, 1.4vw, 0.46rem);

    color: #c8d4f0;

    line-height: 1.85;

    margin-bottom: 0.5rem;

    max-width: 28rem;

}



.end-teams {

    list-style: none;

    margin: 0 0 0.5rem;

    padding: 0.5rem 0.65rem;

    max-width: 28rem;

    background: rgba(0, 240, 255, 0.06);

    border: 1px solid rgba(0, 240, 255, 0.25);

    text-align: left;

}



.end-teams li {

    font-size: clamp(0.28rem, 1.1vw, 0.36rem);

    color: #8899cc;

    line-height: 1.75;

    padding: 0.15rem 0;

    border-bottom: 1px solid rgba(136, 153, 204, 0.12);

}



.end-teams li:last-child {

    border-bottom: none;

}



.end-teams li::before {

    content: "♥ ";

    color: #ff2d6a;

}



.end-signoff {

    font-size: clamp(0.34rem, 1.3vw, 0.44rem);

    color: #ffd700;

    line-height: 1.8;

    margin-bottom: 0.35rem;

    letter-spacing: 0.04em;

}



.end-shift {

    font-size: clamp(0.35rem, 1.35vw, 0.45rem);

    color: #42ff42;

    line-height: 2;

    letter-spacing: 0.04em;

}



.end-screen {

    z-index: 14;

    gap: 0.55rem;

    background:

        radial-gradient(ellipse 80% 60% at 50% 35%, rgba(255, 45, 106, 0.12) 0%, transparent 55%),

        radial-gradient(ellipse 90% 70% at 50% 100%, rgba(0, 240, 255, 0.08) 0%, transparent 50%),

        rgba(4, 6, 18, 0.94);

    animation: endScreenIn 1.1s ease-out both;

}



.end-screen__kicker {

    animation: endKickerPulse 2.4s ease-in-out infinite;

}



.end-badge {

    font-size: clamp(0.38rem, 1.5vw, 0.48rem);

    color: #42ff42;

    border: 2px solid #42ff42;

    padding: 0.35rem 0.75rem;

    background: rgba(66, 255, 66, 0.08);

    letter-spacing: 0.08em;

    animation: endBadgePop 0.7s cubic-bezier(0.34, 1.4, 0.64, 1) 0.15s both;

}



.end-screen h1 {

    animation: endSlideUp 0.8s ease-out 0.25s both;

}



.end-screen .role {

    animation: endSlideUp 0.8s ease-out 0.35s both;

}



.end-screen .end-shift {

    animation: endSlideUp 0.8s ease-out 0.45s both;

}



.end-screen .end-thanks {

    animation: endSlideUp 0.8s ease-out 0.55s both;

}



.end-screen .end-teams {

    animation: endSlideUp 0.8s ease-out 0.62s both;

}



.end-screen .end-signoff {

    animation: endSlideUp 0.8s ease-out 0.7s both;

}



.end-screen .end-contact {

    animation: endSlideUp 0.8s ease-out 0.65s both;

}



.end-screen__btn {

    animation: endSlideUp 0.8s ease-out 0.8s both;

    margin-top: 0.35rem;

}



@keyframes endScreenIn {

    from { opacity: 0; }

    to { opacity: 1; }

}



@keyframes endSlideUp {

    from { opacity: 0; transform: translateY(12px); }

    to { opacity: 1; transform: translateY(0); }

}



@keyframes endBadgePop {

    from { opacity: 0; transform: scale(0.7); }

    to { opacity: 1; transform: scale(1); }

}



@keyframes endKickerPulse {

    0%, 100% { opacity: 0.85; text-shadow: 0 0 8px rgba(0, 240, 255, 0.4); }

    50% { opacity: 1; text-shadow: 0 0 16px rgba(0, 240, 255, 0.7); }

}



.end-contact {

    display: flex;

    flex-direction: column;

    align-items: stretch;

    gap: 0.5rem;

    padding: 0.9rem 1.1rem 1rem;

    margin: 0.35rem 0 0.6rem;

    border: 2px solid #ffd700;

    background: rgba(0, 0, 0, 0.55);

    box-shadow: 0 0 18px rgba(255, 215, 0, 0.18);

    max-width: 24rem;

    width: 100%;

}



.end-contact .contact-heading {

    width: auto;

    margin-bottom: 0.1rem;

}



.contact-grid {

    display: flex;

    flex-direction: column;

    gap: 0.4rem;

}



.contact-row {

    display: flex;

    align-items: baseline;

    justify-content: space-between;

    gap: 0.75rem;

    padding: 0.5rem 0.65rem;

    border: 1px solid rgba(0, 240, 255, 0.35);

    background: rgba(0, 240, 255, 0.06);

    text-decoration: none;

    transition: background 0.2s, border-color 0.2s, transform 0.15s;

}



.contact-row:hover,

.contact-row:focus-visible {

    background: rgba(0, 240, 255, 0.16);

    border-color: #00f0ff;

    transform: translateX(2px);

}



.contact-row__label {

    font-size: clamp(0.3rem, 1.1vw, 0.38rem);

    color: #ffd700;

    letter-spacing: 0.05em;

    text-transform: uppercase;

    white-space: nowrap;

}



.contact-row__value {

    font-size: clamp(0.34rem, 1.3vw, 0.44rem);

    color: #00f0ff;

    text-align: right;

    word-break: break-word;

    transition: color 0.2s;

}



.contact-row:hover .contact-row__value,

.contact-row:focus-visible .contact-row__value {

    color: #ffd700;

}



.play-notices {

    display: flex;

    flex-wrap: wrap;

    align-items: stretch;

    justify-content: center;

    gap: 0.5rem;

    max-width: 95%;

}



.play-notices .sound-warning {

    flex: 1 1 12rem;

    margin: 0;

}



.sound-warning {

    font-size: clamp(0.38rem, 1.5vw, 0.48rem);

    color: #ffd700;

    background: rgba(255, 45, 106, 0.2);

    border: 2px solid #ffd700;

    padding: 0.75rem 1rem;

    line-height: 2;

    max-width: 95%;

}



.hint, .controls {

    font-size: clamp(0.35rem, 1.4vw, 0.45rem);

    color: #888;

    line-height: 2;

}



.pixel-btn {

    font-family: inherit;

    font-size: clamp(0.5rem, 2vw, 0.65rem);

    padding: 1rem 1.75rem;

    margin-top: 0.5rem;

    background: #1a0a2e;

    color: #ff2d6a;

    border: 3px solid #ff2d6a;

    cursor: pointer;

}



.pixel-btn:hover { background: #ff2d6a; color: #fff; }

.pixel-btn:focus-visible {

    outline: 2px solid #ffd700;

    outline-offset: 3px;

}



.hud {

    display: none;

}



/* Status bar — below canvas, never over gameplay */

.status-bar {

    flex-shrink: 0;

    width: min(100%, calc((100dvh - var(--fit-chrome) - var(--fit-hud)) * 640 / 480));

    max-width: 100%;

    background: linear-gradient(180deg, #0c1020 0%, #080c18 100%);

    border: 2px solid #2a3048;

    border-top: 2px solid #ff2d6a;

    padding: clamp(5px, 1.2vw, 8px) clamp(6px, 1.5vw, 10px) clamp(4px, 1vw, 6px);

    box-shadow: inset 0 1px 0 rgba(255, 45, 106, 0.15);

}



.status-bar.hidden {

    display: none;

}



.status-bar__main {

    display: flex;

    align-items: flex-start;

    gap: 12px;

    margin-bottom: 6px;

}



.status-integrity {

    display: flex;

    align-items: center;

    gap: 6px;

    flex-shrink: 0;

    min-width: 88px;

}



.status-label {

    font-size: clamp(0.3rem, 1.1vw, 0.38rem);

    color: #00f0ff;

    letter-spacing: 0.06em;

}



.integrity-pct {

    font-size: clamp(0.3rem, 1.1vw, 0.38rem);

    color: #00f0ff;

    min-width: 2.2em;

}



.integrity-track {

    width: 56px;

    height: 8px;

    background: #1a1a2e;

    border: 1px solid #00f0ff;

    flex-shrink: 0;

}



.integrity-fill {

    height: 100%;

    width: 0%;

    background: linear-gradient(90deg, #00f0ff, #42ff42);

    transition: width 0.4s ease;

}



.status-task {

    flex: 1;

    min-width: 0;

    border-left: 2px solid rgba(255, 45, 106, 0.35);

    padding-left: 10px;

}



.status-task__head {

    display: flex;

    flex-wrap: wrap;

    align-items: center;

    gap: 6px 10px;

    margin-bottom: 3px;

}



.task-num {

    font-size: clamp(0.34rem, 1.3vw, 0.42rem);

    color: #00f0ff;

    letter-spacing: 0.04em;

    white-space: nowrap;

}



.task-location {

    font-size: clamp(0.3rem, 1.15vw, 0.38rem);

    color: #ffd700;

    background: rgba(255, 215, 0, 0.1);

    border: 1px solid rgba(255, 215, 0, 0.35);

    padding: 2px 6px;

    white-space: nowrap;

}



.status-objective {

    font-size: clamp(0.36rem, 1.4vw, 0.46rem);

    color: #fff;

    line-height: 1.5;

    margin: 0 0 2px;

}



.status-hint {

    font-size: clamp(0.3rem, 1.15vw, 0.38rem);

    color: #42ff42;

    line-height: 1.4;

    margin: 0;

}



.action-panel {

    margin-top: 6px;

    padding: 8px 10px;

    background: rgba(8, 12, 28, 0.95);

    border: 2px solid #00f0ff;

    box-shadow: 0 0 14px rgba(0, 240, 255, 0.15);

}



.action-panel.hidden {

    display: none;

}



.action-panel--miss {

    border-color: #ff4444;

    animation: action-miss-flash 0.2s ease;

}



@keyframes action-miss-flash {

    0% { background: rgba(80, 16, 16, 0.95); }

    100% { background: rgba(8, 12, 28, 0.95); }

}



.action-panel__label {

    font-size: clamp(0.32rem, 1.2vw, 0.42rem);

    color: #ffd700;

    line-height: 1.5;

    margin: 0 0 6px;

}



.action-panel__detail {

    font-size: clamp(0.28rem, 1.05vw, 0.36rem);

    color: #8899cc;

    line-height: 1.4;

    margin: 6px 0 0;

}



.action-timing__track {

    position: relative;

    display: flex;

    gap: 2px;

    height: 24px;

    align-items: stretch;

}



.action-timing__slot {

    flex: 1;

    background: #1a2040;

    border: 1px solid #2a3050;

    border-radius: 1px;

}



.action-timing__slot--zone {

    background: rgba(66, 255, 66, 0.35);

    border-color: #42ff42;

    box-shadow: inset 0 0 6px rgba(66, 255, 66, 0.2);

}



.action-timing__cursor {

    position: absolute;

    top: -2px;

    left: 0;

    width: 6px;

    height: 28px;

    background: #ff2d6a;

    box-shadow: 0 0 8px rgba(255, 45, 106, 0.6);

    transform: translateX(-50%);

    pointer-events: none;

    transition: left 0.03s linear;

    z-index: 2;

}



.action-progress {

    height: 16px;

    background: #1a2040;

    border: 1px solid #2a4060;

    border-radius: 2px;

    overflow: hidden;

}



.action-progress__fill {

    height: 100%;

    width: 0%;

    background: linear-gradient(90deg, #00f0ff, #42ff42);

    transition: width 0.08s linear;

}



.action-progress--mash .action-progress__fill {

    background: linear-gradient(90deg, #ff2d6a, #ffd700);

}



.action-sequence {

    display: flex;

    flex-wrap: wrap;

    gap: 6px;

    margin-top: 2px;

}



.action-sequence__key {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-width: 28px;

    height: 28px;

    padding: 0 6px;

    font-size: clamp(0.34rem, 1.4vw, 0.44rem);

    color: #fff;

    background: #1a2040;

    border: 2px solid #444;

    border-radius: 2px;

}



.action-sequence__key--done {

    background: rgba(66, 255, 66, 0.25);

    border-color: #42ff42;

    color: #42ff42;

}



.action-sequence__key--current {

    background: rgba(255, 45, 106, 0.25);

    border-color: #ffd700;

    color: #ffd700;

    box-shadow: 0 0 10px rgba(255, 215, 0, 0.35);

}



.action-sequence__key--wrong {

    border-color: #ff4444;

    color: #ff4444;

}



.status-checklist {

    display: flex;

    align-items: center;

    gap: 8px;

    padding-top: 4px;

    border-top: 1px solid rgba(136, 153, 204, 0.2);

}



.status-checklist__label {

    font-size: clamp(0.28rem, 1vw, 0.34rem);

    color: #8899cc;

    letter-spacing: 0.1em;

    flex-shrink: 0;

}



.quest-list--compact {

    display: flex;

    flex-wrap: wrap;

    gap: 4px;

    list-style: none;

    margin: 0;

    padding: 0;

    flex: 1;

}



.quest-list--compact li {

    font-size: clamp(0.28rem, 1vw, 0.34rem);

    color: #555;

    padding: 2px 6px;

    border: 1px solid #333;

    border-radius: 2px;

    line-height: 1.4;

    white-space: nowrap;

    transition: color 0.2s, background 0.2s, border-color 0.2s;

}



.quest-list {

    list-style: none;

    font-size: clamp(0.34rem, 1.35vw, 0.44rem);

    color: #666;

    line-height: 2;

}



.quest-list li {

    padding: 2px 6px;

    border-left: 3px solid transparent;

    transition: color 0.2s, background 0.2s;

}



.quest-active {

    color: #fff !important;

    background: rgba(255, 45, 106, 0.25) !important;

    border-color: #ff2d6a !important;

    font-weight: bold;

}



.quest-list:not(.quest-list--compact) .quest-active {

    border-left-color: #ff2d6a !important;

}



.quest-partial {

    color: #ffd700 !important;

    background: rgba(255, 215, 0, 0.12) !important;

    border-color: #ffd700 !important;

}



.quest-done {

    color: #42ff42 !important;

    text-decoration: line-through;

    opacity: 0.85;

    border-color: #42ff42 !important;

}



.quest-pending { color: #555 !important; }



.toast {

    position: absolute;

    top: clamp(6px, 1.5vh, 12px);

    left: clamp(6px, 1.5vw, 12px);

    right: clamp(6px, 1.5vw, 12px);

    max-height: 35%;

    overflow-y: auto;

    background: rgba(0, 0, 0, 0.94);

    border: 2px solid #42ff42;

    box-shadow: 0 0 20px rgba(66, 255, 66, 0.2);

    color: #fff;

    padding: clamp(6px, 1.5vw, 12px) clamp(8px, 2vw, 14px);

    font-size: clamp(0.3rem, 2.8vw, 0.52rem);

    line-height: 1.7;

    z-index: 15;

    white-space: pre-line;

    pointer-events: none;

}



.action-panel--screen {

    margin-top: 10px;

    padding: 12px 14px;

    border-width: 2px;

    background: rgba(4, 8, 20, 0.95);

}



.action-panel--screen .action-timing__track {

    height: 36px;

}



.action-panel--screen .action-timing__cursor {

    height: 40px;

    width: 10px;

}



.action-panel--screen .action-progress {

    height: 24px;

}



.action-panel--screen .action-sequence__key {

    min-width: 40px;

    height: 40px;

    font-size: clamp(0.48rem, 2.2vw, 0.62rem);

}



.action-panel--screen .action-panel__detail {

    font-size: clamp(0.4rem, 1.8vw, 0.5rem);

    color: #a8c8ff;

    margin-top: 10px;

}



.screen-action {

    position: absolute;

    left: 0;

    right: 0;

    bottom: 0;

    z-index: 30;

    pointer-events: none;

    padding: 12px 14px 14px;

    background: rgba(2, 4, 14, 0.97);

    border-top: 3px solid #00f0ff;

    box-shadow: 0 -10px 32px rgba(0, 0, 0, 0.65);

}



.screen-action.hidden {

    display: none;

}



.screen-action--press {

    border-top-color: #42ff42;

    animation: screen-action-pulse 1.3s ease-in-out infinite;

}



.screen-action--task {

    top: 0;

    bottom: auto;

    border-top: none;

    border-bottom: 3px solid #ffd700;

    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.65);

    animation: screen-action-task-pulse 1.6s ease-in-out infinite;

}



.screen-action__row {

    display: flex;

    align-items: center;

    gap: clamp(10px, 2.5vw, 16px);

}



.screen-action__text {

    flex: 1;

    min-width: 0;

}



.screen-action__primary {

    margin: 0;

    font-size: clamp(0.58rem, 4.8vw, 0.95rem);

    color: #42ff42;

    line-height: 1.45;

    letter-spacing: 0.06em;

    text-shadow: 0 0 14px rgba(66, 255, 66, 0.45);

}



.screen-action--task .screen-action__primary {

    color: #ffd700;

    text-shadow: 0 0 14px rgba(255, 215, 0, 0.4);

}



.screen-action--press .screen-action__primary {

    animation: screen-action-text-pulse 1.3s ease-in-out infinite;

}



.screen-action__secondary {

    margin: 6px 0 0;

    font-size: clamp(0.36rem, 2.2vw, 0.52rem);

    color: #c8d8f0;

    line-height: 1.5;

}



.screen-action__key {

    flex-shrink: 0;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-width: clamp(48px, 11vw, 68px);

    height: clamp(48px, 11vw, 68px);

    font-size: clamp(0.7rem, 4.2vw, 1rem);

    color: #42ff42;

    background: linear-gradient(180deg, #1a3020 0%, #0a180a 100%);

    border: 3px solid #42ff42;

    border-radius: 4px;

    box-shadow:

        0 0 18px rgba(66, 255, 66, 0.45),

        0 4px 0 #0a200a;

    animation: screen-action-key-pulse 1.3s ease-in-out infinite;

}



.screen-action--task .screen-action__key {

    color: #ffd700;

    border-color: #ffd700;

    background: linear-gradient(180deg, #302a10 0%, #181008 100%);

    box-shadow:

        0 0 18px rgba(255, 215, 0, 0.4),

        0 4px 0 #201808;

    animation: screen-action-key-pulse 1.1s ease-in-out infinite;

}



.screen-action__key.hidden {

    display: none;

}



@keyframes screen-action-pulse {

    0%, 100% { box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.55), 0 0 0 rgba(66, 255, 66, 0); }

    50% { box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.55), 0 0 20px rgba(66, 255, 66, 0.25); }

}



@keyframes screen-action-text-pulse {

    0%, 100% { opacity: 1; }

    50% { opacity: 0.82; }

}



@keyframes screen-action-key-pulse {

    0%, 100% { transform: scale(1); }

    50% { transform: scale(1.06); }

}



@keyframes screen-action-task-pulse {

    0%, 100% { box-shadow: 0 10px 32px rgba(0, 0, 0, 0.65), 0 0 0 rgba(255, 215, 0, 0); }

    50% { box-shadow: 0 10px 36px rgba(0, 0, 0, 0.65), 0 0 22px rgba(255, 215, 0, 0.2); }

}



@media (prefers-reduced-motion: reduce) {

    .screen-action--press,

    .screen-action--task,

    .screen-action__key,

    .screen-action--press .screen-action__primary {

        animation: none;

    }

}



#bgmEmbed {

    position: absolute;

    width: 0;

    height: 0;

    opacity: 0;

}



.contact-panel {

    position: absolute;

    bottom: 0;

    left: 0;

    right: 0;

    display: flex;

    flex-wrap: wrap;

    align-items: center;

    justify-content: center;

    gap: 0.75rem 1.5rem;

    padding: 0.75rem 1rem;

    background: linear-gradient(0deg, rgba(0,0,0,0.95), rgba(0,0,0,0.7));

    border-top: 2px solid #ffd700;

    z-index: 12;

    pointer-events: auto;

}



.contact-heading {

    width: 100%;

    text-align: center;

    font-size: clamp(0.35rem, 1.4vw, 0.45rem);

    color: #ff2d6a;

    margin-bottom: 0.25rem;

}



/* ── Responsive: fit viewport on all screen sizes ── */



@media (max-width: 900px) {

    :root { --fit-chrome: 13.5rem; }

}



@media (max-width: 720px) {

    :root { --fit-chrome: 11.5rem; }

    .desk-props { display: none; }

    .desk-wall-art,

    .desk-scene__shelf { display: none; }

    .desk-scene__surface { margin-top: clamp(1rem, 4vh, 2rem); }

    .desk-scene__lamp-glow { width: 80%; opacity: 0.7; }

    .retro-computer { max-width: 100%; }

    .retro-page { max-height: none; min-height: 100dvh; }

    .game-marquee__title { font-size: clamp(0.65rem, 5vw, 1rem); }

    .monitor__bezel-top,

    .monitor__bezel-bottom { padding-left: 0.5rem; padding-right: 0.5rem; }

}



@media (max-width: 480px) {

    :root { --fit-chrome: 10.5rem; }

    .status-bar__main {

        flex-direction: column;

        gap: 6px;

    }

    .status-task {

        border-left: none;

        padding-left: 0;

        border-top: 1px solid rgba(255, 45, 106, 0.25);

        padding-top: 6px;

    }

    .status-checklist {

        flex-wrap: wrap;

        align-items: flex-start;

    }

    .quest-list--compact li {

        font-size: clamp(0.24rem, 2.8vw, 0.3rem);

        padding: 2px 4px;

    }

    .overlay-panel h1 { font-size: clamp(0.75rem, 6vw, 1.2rem); }

    .overlay-panel .controls { font-size: clamp(0.28rem, 2.5vw, 0.35rem); line-height: 1.6; }

    .end-contact { max-width: 100%; padding: 0.5rem 0.65rem; }

}



@media (max-height: 720px) {

    :root { --fit-chrome: 10rem; }

    .keyboard-deco { display: none; }

    .game-marquee__sub { display: none; }

    .game-marquee__glow { margin-bottom: 0.25rem; }

}



@media (max-height: 600px) {

    :root { --fit-chrome: 8.5rem; }

    .game-marquee__glow { display: none; }

    .game-marquee { padding-top: 0.15rem; }

    .monitor__bezel-bottom .monitor__hint { display: none; }

    .overlay-panel .hint,

    .overlay-panel .play-notices,

    .overlay-panel .sound-warning,

    .overlay-panel .subtitle { display: none; }

    .end-screen .end-thanks,
    .end-screen .end-teams { display: none; }

    .end-screen .end-signoff { font-size: clamp(0.3rem, 1.2vw, 0.38rem); }

}



@media (max-height: 500px) {

    :root { --fit-chrome: 7rem; }

    .game-marquee { display: none; }

    .monitor__bezel-top { padding: 0.35rem 0.5rem; }

    .monitor__bezel-bottom { padding: 0.3rem 0.5rem 0.4rem; }

    .status-checklist { display: none; }

}



@media (min-width: 1400px) {

    .retro-computer { max-width: 1280px; }

}



@media (min-width: 1600px) and (min-height: 900px) {

    :root { --fit-chrome: 17rem; }

}

