/**
 * Desktop-Ansicht (ab 921 px): Das Spiel laeuft auf einem abgenutzten Handy, das quer auf dem Kneipentisch liegt.
 *
 * - Markup: .phone > .phone-screen (Statusleiste, HUD, Canvas, Hinweis) + .phone-deco (Kamera, Sprung, Tape, Sticker).
 *   Unter 921 px sind die Huellen layout-neutral (siehe game.css).
 * - Masse innerhalb des Handys in cqw (1 % der Bildschirmbreite), damit alles mit dem Handy skaliert.
 * - Bewusst statisch: keine animierten Filter, kein backdrop-filter, keine Drehung des Canvas
 *   (Spieltext bliebe sonst nicht scharf, Punkte-Flugziel waere verschoben).
 * - Farben, Tape, Edding, Zettel: theme.css; Ziel-Tape-Optik global in game.css, hier nur Masse.
 */
@media (min-width: 921px) {
    /* ===== Spiel-Screen (Tisch: body bzw. #game-screen, game.css) ===== */

    #game-screen {
        padding: 0;
        align-items: center;
        justify-content: center;
    }

    .phone {
        --phone-ratio: 2.1;
        /* Hoehe laesst unten Platz fuer die Sound-Buttons auf dem Tisch (je ~90 px Rand oben/unten) */
        --phone-w: min(88vw, 1320px, calc((100dvh - 180px) * var(--phone-ratio)));
        display: block;
        position: relative;
        container-type: inline-size;
        width: var(--phone-w);
        aspect-ratio: var(--phone-ratio);
        padding: calc(var(--phone-w) * 0.016) calc(var(--phone-w) * 0.034);
        border-radius: calc(var(--phone-w) * 0.058);
        background:
            url('/assets/static/phone/scratches.svg') center / 100% 100% no-repeat,
            linear-gradient(162deg, #2d2c2b 0%, #1d1c1b 48%, #121110 100%);
        box-shadow:
            inset 0 0 0 calc(var(--phone-w) * 0.0022) #45423e,
            inset 0 0 0 calc(var(--phone-w) * 0.0055) #0d0c0b,
            14px 18px 0 rgba(0, 0, 0, 0.38),
            30px 44px 70px rgba(0, 0, 0, 0.5);
    }

    /* Seitentasten an der oberen Kante (Lautstaerke, Power) */
    .phone::before,
    .phone::after {
        content: '';
        position: absolute;
        top: calc(var(--phone-w) * -0.004);
        height: calc(var(--phone-w) * 0.006);
        border-radius: calc(var(--phone-w) * 0.003) calc(var(--phone-w) * 0.003) 0 0;
        background: #262523;
        box-shadow: inset 0 1px 0 #3d3a36;
    }

    .phone::before {
        right: 20%;
        width: 10%;
    }

    .phone::after {
        right: 34%;
        width: 5%;
    }

    .phone-screen {
        display: flex;
        flex-direction: column;
        position: relative;
        width: 100%;
        height: 100%;
        overflow: hidden;
        border-radius: 2.4cqw;
        background: radial-gradient(ellipse 90% 70% at 50% 0%, #2b2723 0%, #15120f 75%);
        box-shadow: inset 0 0 0 0.15cqw rgba(0, 0, 0, 0.9);
    }

    /* Statusleiste: spaete Uhrzeit, Spaeti-WLAN, fast leerer Akku */
    .phone-statusbar {
        display: flex;
        align-items: center;
        gap: 1.6cqw;
        padding: 1cqw 3cqw 0;
        font: 600 1.15cqw/1 var(--font-sans);
        letter-spacing: 0.02em;
        color: rgba(255, 255, 255, 0.7);
    }

    .phone-time {
        margin-right: auto;
    }

    .phone-net::before {
        content: '';
        display: inline-block;
        width: 1.5cqw;
        height: 1cqw;
        margin-right: 0.5cqw;
        vertical-align: -0.1cqw;
        background:
            linear-gradient(currentColor, currentColor) 0 100% / 0.28cqw 35% no-repeat,
            linear-gradient(currentColor, currentColor) 0.4cqw 100% / 0.28cqw 60% no-repeat,
            linear-gradient(rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.22)) 0.8cqw 100% / 0.28cqw 80% no-repeat,
            linear-gradient(rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.22)) 1.2cqw 100% / 0.28cqw 100% no-repeat;
    }

    .phone-battery {
        color: #ff8a78;
    }

    .phone-battery::after {
        content: '';
        display: inline-block;
        width: 2.2cqw;
        height: 1.05cqw;
        margin-left: 0.5cqw;
        vertical-align: -0.15cqw;
        border: 0.12cqw solid rgba(255, 255, 255, 0.7);
        border-radius: 0.25cqw;
        background: linear-gradient(90deg, #e0483e 0 14%, transparent 14%) 0.12cqw 50% / calc(100% - 0.24cqw) 70% no-repeat;
    }

    /* HUD: Kronkorken-Score links, Ziel als Gaffa-Tape rechts */
    .phone-hud {
        display: flex;
        flex: 1;
        align-items: center;
        gap: 2.4cqw;
        min-height: 0;
        padding: 0 3cqw;
    }

    #game-screen .score-display {
        position: relative;
        top: auto;
        left: auto;
        flex: none;
        width: 7.6cqw;
        height: 7.6cqw;
        transform: rotate(-9deg);
    }

    #game-screen .score-display span {
        font-size: 2.6cqw;
    }

    #game-screen .game-header {
        position: static;
        display: flex;
        flex: 1;
        justify-content: flex-end;
        font-size: 1.5cqw;
    }

    #game-screen .target {
        flex: 0 1 48cqw;
        max-width: none;
        gap: 1.4cqw;
    }

    #game-screen .target > span:first-child,
    #game-screen .progress-text {
        font-size: 2.1cqw;
    }

    #game-screen .progress-container {
        gap: 1.4cqw;
    }

    #game-screen .progress-text {
        min-width: 0;
    }

    #game-screen .progress-bar {
        height: 2.8cqw;
    }

    #game-canvas-container {
        flex: none;
        width: 100%;
        background: #e8f4f8;
    }

    /* Hoehe folgt dem Seitenverhaeltnis des Backing-Stores (1400 x 350 * DPR) */
    #game-canvas {
        width: 100%;
        height: auto;
        max-width: none;
        max-height: none;
        box-shadow: none;
    }

    .phone-hint {
        display: block;
        padding: 1.2cqw 0 1.5cqw;
        text-align: center;
        font: 1.7cqw/1 var(--font-hand);
        color: rgba(239, 232, 218, 0.5);
    }

    /* ===== Deko auf dem Gehaeuse (nie ueber dem Spielbereich) ===== */

    .phone-deco {
        display: block;
        position: absolute;
        inset: 0;
        pointer-events: none;
    }

    /* Kamera-Loch im linken Rand */
    .phone-deco::before {
        content: '';
        position: absolute;
        left: 1.1%;
        top: 50%;
        width: 1.2cqw;
        height: 1.2cqw;
        transform: translateY(-50%);
        border-radius: 50%;
        background: radial-gradient(circle at 36% 34%, #43546a 0 16%, #0a0c0f 42%);
        box-shadow: 0 0 0 0.25cqw #0c0b0a;
    }

    /* Flach gehalten: reicht nur ueber Rand und Hinweiszeile, nicht ins Spielfeld */
    .phone-crack {
        position: absolute;
        right: 2%;
        bottom: 1.2%;
        width: 18cqw;
        height: 6cqw;
        background: url('/assets/static/phone/crack.svg') center / 100% 100% no-repeat;
    }

    .phone-tape {
        position: absolute;
        right: -2.2%;
        bottom: 5%;
        width: 12cqw;
        height: 3.2cqw;
        transform: rotate(-38deg);
        opacity: 0.97;
        background: var(--tape);
        clip-path: var(--tape-clip);
    }

    .phone-sticker {
        position: absolute;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.4cqw;
        padding: 0.55cqw 1.1cqw;
        border-radius: 0.8cqw;
        font-family: var(--font-display);
        font-weight: 700;
        line-height: 1;
        text-transform: uppercase;
        white-space: nowrap;
        box-shadow:
            0 0 0 0.32cqw var(--cream),
            0.35cqw 0.5cqw 0 0.32cqw rgba(0, 0, 0, 0.35);
    }

    .phone-sticker--so36 {
        left: -2.6%;
        top: -5%;
        font-size: 2.7cqw;
        letter-spacing: 0.05em;
        color: var(--cream);
        background: var(--ink-deep);
        transform: rotate(-13deg);
    }

    .phone-sticker--spaeti {
        top: -6%;
        right: 24%;
        font-size: 2cqw;
        color: var(--ink-deep);
        background: var(--yellow);
        transform: rotate(4deg);
    }

    .phone-sticker--spaeti small {
        padding: 0.15cqw 0.35cqw;
        border-radius: 0.3cqw;
        font-size: 0.8em;
        color: var(--yellow);
        background: var(--ink-deep);
    }

    .phone-sticker--leela {
        left: -1.8%;
        bottom: -6%;
        padding: 0.5cqw 1.3cqw;
        border-radius: 2cqw;
        font-family: var(--font-hand);
        font-weight: normal;
        font-size: 2.8cqw;
        text-transform: none;
        color: #fff4f0;
        background: var(--brick);
        transform: rotate(7deg);
    }

    /* ===== Sound-Buttons: liegen wie Kronkorken auf dem Tisch ===== */

    .sound-controls {
        bottom: 24px;
        right: 28px;
        gap: 14px;
    }

    .sound-btn {
        --tilt: -8deg;
        width: 52px;
        height: 52px;
        transform: rotate(var(--tilt));
        filter: drop-shadow(3px 4px 0 rgba(0, 0, 0, 0.45));
    }

    .sound-btn + .sound-btn {
        --tilt: 11deg;
    }

    .sound-btn:hover {
        transform: rotate(var(--tilt)) scale(1.1);
    }

    .sound-btn:active {
        transform: rotate(var(--tilt)) scale(0.95);
    }

    /* ===== Intro: Zettel auf dem Tisch (Optik: .k-paper + .k-taped, theme.css) ===== */

    #intro-screen .intro-content {
        min-height: 0;
        max-width: 560px;
        padding: 44px 40px 32px;
        rotate: -1.5deg;
    }
}
