﻿/* RESET & BASE */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #050505;
    color: #e0e0e0;
    font-family: 'Courier Prime', monospace;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* HIDDEN UTILS */
.hidden {
    display: none !important;
}

/* BUTTONS & CONTROLS */
.mute-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 100;
    opacity: 0.7;
}

.mute-btn:hover {
    opacity: 1;
}

.hidden-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 100;
}

/* ROOM & ENVIRONMENT (Film Noir) */
.room-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden; /* Hide anything outside viewport */
    background-color: #050505;
}

/* VIEWPORT & SCENE PANNING */
.viewport {
    width: 100%;
    height: 100vh;
    position: relative;
}

.scene-container {
    width: 120vw;
    height: 150vh; /* Taller to allow looking down */
    position: absolute;
    /* Base center point */
    top: -25vh;
    left: -10vw;
    /* Smooth transition for panning */
    transition: transform 0.15s ease-out;
}

/* Specific view for the beginning so you see the detectives well */
.scene-container.intro-view {
    transform: scale(0.9) translateY(-10vh) !important;
    transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.scene-wall {
    width: 100%;
    height: 90vh; /* Takes up most of the initial view */
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: #020202; /* Extremely dark */
}

/* Add a shadowy cabinet in the background */
.cabinet-shadow {
    position: absolute;
    top: 20vh;
    left: 10vw;
    width: 250px;
    height: 400px;
    background: #000;
    box-shadow: 10px 0 30px rgba(0,0,0,0.9);
    opacity: 0.7;
}

.scene-table-top {
    width: 100%;
    height: 30vh;
    position: relative;
    /* Spotlight effect on the table */
    background: radial-gradient(ellipse at center, rgba(30,25,20,1) 0%, rgba(10,8,5,1) 70%, rgba(2,2,2,1) 100%);
    border-top: 2px solid #1a1510;
    box-shadow: inset 0 30px 100px rgba(0,0,0,0.9), 0 -10px 50px rgba(0,0,0,1);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
    border-radius: 50% 50% 0 0 / 5% 5% 0 0;
}

.scene-table-under {
    width: 100%;
    height: 30vh;
    position: relative;
    background: #020202;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    box-shadow: inset 0 50px 50px -20px rgba(0,0,0,1);
    padding-top: 20px;
}

/* UI LAYER */
.ui-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    pointer-events: none; /* Let clicks pass through to scene unless hitting a UI element */
}

/* Re-enable pointer events for interactive UI parts */
.ui-layer > * {
    pointer-events: auto;
}

/* Ensure the main content wrapper doesn't block background clicks */
.main-content {
    pointer-events: none !important;
}

.main-content > * {
    pointer-events: auto;
}

/* LAMP ANIMATION */
.lamp-container {
    position: absolute;
    top: 0;
    left: 50%;
    transform-origin: top center;
    animation: swing 4s ease-in-out infinite alternate;
    z-index: 3;
    pointer-events: none;
}

.lamp-wire {
    width: 2px;
    height: 100px;
    background: #333;
    margin: 0 auto;
}

.lamp-bulb {
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    margin: 0 auto;
    box-shadow: 0 0 20px 5px rgba(255, 255, 200, 0.8);
}

.light-cone {
    width: 300px;
    height: 400px;
    background: linear-gradient(to bottom, rgba(255, 255, 200, 0.15) 0%, rgba(255, 255, 200, 0) 100%);
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
    position: absolute;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

@keyframes swing {
    0% { transform: rotate(5deg); }
    100% { transform: rotate(-5deg); }
}

/* DETECTIVES (Background Silhouettes) */
.detectives-bg {
    position: absolute;
    bottom: 0px; /* Sit right across the table (relative to wall) */
    width: 100%;
    max-width: 600px;
    height: 300px;
    display: flex;
    justify-content: space-around;
    padding: 0;
    z-index: 1;
    pointer-events: none;
}

.detective {
    width: 160px;
    height: 250px;
    background: #050505;
    border-radius: 80px 80px 0 0;
    position: relative;
    opacity: 0.95;
    filter: drop-shadow(0 0 30px rgba(0,0,0,1));
    box-shadow: inset 0 10px 30px rgba(255, 255, 200, 0.05); /* Slight edge lighting from lamp */
    transform-origin: bottom center;
}

.detective.grimm {
    transform: scale(0.95);
    animation: breathing 6s infinite ease-in-out;
}

.detective.schatten {
    transform: scale(1.1) translateY(10px);
    animation: breathing 7s infinite ease-in-out alternate-reverse;
}

@keyframes breathing {
    0%, 100% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.02) translateY(-2px); }
}

/* Cigarette & Smoke */
.cigarette {
    position: absolute;
    top: 70px;
    left: 65%;
    width: 20px;
    height: 3px;
    background: #e0e0e0;
    transform: rotate(-15deg);
    border-radius: 2px;
}

.cigarette-tip {
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 3px;
    background: #ff3333;
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 8px 2px rgba(255, 50, 50, 0.9);
    animation: glowPulse 2s infinite alternate;
}

@keyframes glowPulse {
    from { opacity: 0.7; box-shadow: 0 0 5px 1px rgba(255, 50, 50, 0.8); }
    to { opacity: 1; box-shadow: 0 0 10px 3px rgba(255, 50, 50, 1); }
}

.smoke-particle {
    position: absolute;
    top: -5px;
    right: 0;
    width: 10px;
    height: 10px;
    background: rgba(200, 200, 200, 0.2);
    border-radius: 50%;
    filter: blur(4px);
    opacity: 0;
    animation: smokeRise 4s infinite linear;
}

.smoke-particle.p1 { animation-delay: 0s; }
.smoke-particle.p2 { animation-delay: 1.5s; right: -2px; }
.smoke-particle.p3 { animation-delay: 3s; right: 2px; }

@keyframes smokeRise {
    0% { transform: translateY(0) scale(1); opacity: 0; }
    20% { opacity: 0.6; }
    80% { transform: translateY(-80px) scale(3) translateX(-15px); opacity: 0; }
    100% { opacity: 0; }
}


.glowing-eyes, .glowing-glasses {
    position: absolute;
    top: 40px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.glowing-eyes::before, .glowing-eyes::after {
    content: '';
    width: 8px;
    height: 4px;
    background: rgba(255, 50, 50, 0.8);
    box-shadow: 0 0 8px red;
    border-radius: 50%;
    animation: blink 5s infinite;
}

.glowing-glasses::before, .glowing-glasses::after {
    content: '';
    width: 20px;
    height: 10px;
    border: 2px solid rgba(200, 255, 255, 0.6);
    box-shadow: inset 0 0 5px rgba(200, 255, 255, 0.4), 0 0 10px rgba(200, 255, 255, 0.2);
    border-radius: 3px;
    animation: blink 7s infinite;
}

@keyframes blink {
    0%, 96%, 98% { opacity: 1; }
    97% { opacity: 0; }
    100% { opacity: 1; }
}

.detectives-lean {
    transition: transform 0.5s ease;
    transform: scale(1.2) translateY(30px);
}

/* MAIN CONTENT & SCREENS */
.main-content {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.screen {
    width: 100%;
    animation: fadeIn 0.5s;
}

.screen:not(.active):not(.hidden) {
    display: none;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* INTRO SCREEN */
.intro-box {
    background: rgba(0,0,0,0.9);
    padding: 40px;
    border: 1px solid #333;
    border-radius: 10px;
    width: 90vw;
    max-width: 600px;
    min-height: 200px;
    margin: 0 auto;
    position: relative;
}

.typewriter-text {
    font-family: 'Courier Prime', monospace;
    font-size: 1.2rem;
    color: #e0e0e0;
    line-height: 1.6;
    white-space: pre-wrap;
    min-height: 120px;
}

.typewriter-text::after {
    content: '|';
    animation: blinkCursor 1s step-end infinite;
}

@keyframes blinkCursor {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

.btn-skip {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: transparent;
    color: #888;
    border: none;
    font-family: 'Courier Prime', monospace;
    cursor: pointer;
    font-size: 1rem;
}

.btn-skip:hover {
    color: #fff;
}

/* LOGIN BOX */
.login-box {
    background: #111;
    border: 2px solid #333;
    padding: 30px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
}

.login-box h2 {
    margin-bottom: 20px;
    color: #ff3333;
    letter-spacing: 2px;
}

.login-box input {
    font-family: 'Courier Prime', monospace;
    font-size: 24px;
    text-align: center;
    width: 120px;
    padding: 10px;
    background: #222;
    color: #fff;
    border: 1px solid #555;
    margin-bottom: 15px;
}

.login-box button {
    font-family: 'Courier Prime', monospace;
    padding: 10px 20px;
    background: #444;
    color: #fff;
    border: 1px solid #666;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
}

.login-box button:hover {
    background: #555;
}

.error {
    color: #ff3333;
    margin-top: 10px;
}

/* ROLE SELECTION */
.role-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.file-card {
    background: #d4c4a8; /* Beige Police File */
    color: #222;
    padding: 20px;
    border: 1px solid #a39171;
    border-radius: 5px 20px 5px 5px;
    position: relative;
    cursor: pointer;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    transition: transform 0.2s;
}

.file-card:hover {
    transform: scale(1.02);
}

.file-title {
    font-weight: bold;
    font-size: 1.2rem;
}

/* STAMPS */
.stamp-confidential {
    color: #c00;
    border: 3px solid #c00;
    font-family: 'Courier Prime', monospace;
    font-weight: bold;
    font-size: 1.2rem;
    padding: 5px 10px;
    display: inline-block;
    transform: rotate(-10deg);
    opacity: 0.8;
    margin-top: 10px;
    pointer-events: none;
}

.stamp-confidential.top-right {
    position: absolute;
    top: 10px;
    right: 10px;
    transform: rotate(15deg);
}

/* Ensure the game screen anchors nicely without blocking */
#screen-game {
    display: none;
}

.closed-file {
    background: #d4c4a8;
    width: 300px; /* Made larger to read text */
    height: 400px;
    border-radius: 5px 20px 5px 5px;
    border: 1px solid #a39171;
    box-shadow: 5px 5px 25px rgba(0,0,0,0.9);
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 30px 20px;
    transform: rotate(-2deg); /* Less rotation for readability */
    transition: transform 0.2s, box-shadow 0.2s;
    background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="4" stitchTiles="stitch"/></filter><rect width="100" height="100" filter="url(%23noise)" opacity="0.05"/></svg>');
}

.closed-file:hover {
    transform: rotate(0deg) scale(1.02);
    box-shadow: 8px 8px 30px rgba(0,0,0,1);
}

.file-cover-text {
    font-family: 'Courier Prime', monospace;
    color: #1a1a1a;
    width: 100%;
}

.file-cover-text h4 {
    font-size: 1.4rem;
    border-bottom: 2px solid #333;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.file-desc-text {
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 20px;
    color: #444;
}

.file-q1-text {
    font-size: 1.1rem;
    font-weight: bold;
}


.stamp-confidential.small {
    font-size: 0.8rem;
    padding: 2px 5px;
    position: absolute;
    top: 10px;
    right: 10px;
    transform: rotate(15deg);
}


/* UNDER THE TABLE */
.table-underside {
    width: 80vw;
    height: 100%;
    background: #110d0a; /* Very dark wood */
    border: 2px solid #0a0805;
    position: relative;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.9);
}

.gum {
    width: 15px;
    height: 15px;
    background: #e5a9a9; /* Old pink gum */
    border-radius: 50%;
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: inset 2px 2px 5px rgba(0,0,0,0.5), 1px 1px 2px rgba(0,0,0,0.8);
    z-index: 2;
}

/* SCRAP PAPER (Kassiber stuck under Table) */
.scrap-paper {
    background: #fdfad5; /* yellowish paper */
    width: 80px;
    height: 80px;
    position: absolute;
    top: 40%;
    left: 40%;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.9);
    transform: rotate(-10deg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #c0bfa0;
    transition: transform 0.2s;
}

.scrap-paper::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 25px;
    height: 15px;
    background: rgba(200, 200, 200, 0.6); /* Tape */
    box-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.scrap-paper:hover {
    transform: rotate(-5deg) scale(1.1);
}

.scrap-text {
    font-family: 'Courier Prime', monospace;
    font-size: 0.8rem;
    color: #444;
    transform: rotate(-10deg);
}

/* MODALS (Overlays) */
.file-modal, .scrap-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.85);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.btn-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #c00;
    color: white;
    font-weight: bold;
    border: 2px solid white;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.btn-close:hover {
    background: #a00;
}

/* THE POLICE FILE (Game Board - Now inside modal) */
.police-file {
    background: #e6d5b8;
    color: #1a1a1a;
    padding: 30px 20px;
    border: 1px solid #bba37f;
    border-radius: 5px 25px 5px 5px;
    box-shadow: inset 0 0 50px rgba(100, 80, 50, 0.2), 5px 5px 25px rgba(0,0,0,0.9);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="4" stitchTiles="stitch"/></filter><rect width="100" height="100" filter="url(%23noise)" opacity="0.05"/></svg>');
}

/* SCRAP MODAL CONTENT */
.scrap-content {
    background: #fdfad5;
    padding: 40px;
    border-radius: 5px;
    position: relative;
    box-shadow: 0 0 30px rgba(0,0,0,0.9);
    text-align: center;
    border: 1px solid #e0dfb8;
    max-width: 90vw;
}

.emoji-huge {
    font-size: 4rem;
    margin-top: 20px;
    letter-spacing: 10px;
}

.case-title {
    font-size: 1.4rem;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    margin-bottom: 20px;
    margin-top: 20px;
}

.stage-container {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #999;
}

.stage-container h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.question-text {
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

input[type="text"] {
    font-family: 'Courier Prime', monospace;
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: none;
    border-bottom: 2px solid #666;
    background: transparent;
    font-size: 1rem;
    outline: none;
    color: #000;
}

input[type="text"]:focus {
    border-bottom-color: #000;
}

.btn-typewriter {
    font-family: 'Courier Prime', monospace;
    background: #333;
    color: #eee;
    border: 1px solid #111;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 2px 2px 0px #000;
    transition: transform 0.1s, box-shadow 0.1s;
}

.btn-typewriter:active {
    transform: translate(2px, 2px);
    box-shadow: 0px 0px 0px #000;
}

.status-msg {
    margin-top: 10px;
    font-style: italic;
    color: #444;
}

/* Stage 2 specifics */
.hint-display {
    font-size: 1.5rem;
    margin: 15px 0;
    letter-spacing: 3px;
    font-weight: bold;
}

/* Results */
.result-comparison {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
}

.result-box {
    flex: 1;
    background: rgba(255,255,255,0.4);
    padding: 10px;
    border: 1px solid #999;
    text-align: center;
}

.result-box h4 {
    border-bottom: 1px solid #999;
    margin-bottom: 5px;
}

#red-alert-section {
    background: rgba(255, 0, 0, 0.1);
    border: 2px dashed red;
    padding: 15px;
    margin-bottom: 20px;
}

.red-alert-title {
    color: red;
    font-size: 1.2rem;
    margin-bottom: 10px;
    animation: alertBlink 1s infinite alternate;
}

@keyframes alertBlink {
    from { opacity: 1; }
    to { opacity: 0.5; }
}

.btn-alibi {
    margin-top: 20px;
    background: #c00;
    color: #fff;
    border: none;
    padding: 10px;
    font-family: 'Courier Prime', monospace;
    cursor: pointer;
    width: 100%;
}

/* STATS BOARD */
.stats-board {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0,0,0,0.8);
    padding: 10px;
    border: 1px solid #444;
    font-size: 0.9rem;
    z-index: 100;
}

/* DIALOG SYSTEM (Subtitles) */
.dialog-system {
    position: fixed;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 90vw;
    max-width: 800px;
    text-align: center;
    z-index: 3000;
    pointer-events: none; /* Let clicks pass through */
}

#dialog-text {
    font-family: 'Courier Prime', monospace;
    font-size: 1.5rem;
    color: #fff;
    text-shadow: 2px 2px 4px #000, -1px -1px 2px #000;
    line-height: 1.4;
    font-weight: bold;
}

#dialog-text::after {
    content: '|';
    animation: blinkCursor 1s step-end infinite;
}

.fade-transition {
    transition: opacity 0.5s ease-in-out;
}

.fade-transition.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* RESPONSIVE */
@media (min-width: 768px) {
    .role-cards {
        flex-direction: row;
    }
    .file-card {
        flex: 1;
    }
    .lamp-container {
        transform-origin: top center;
    }
}

/* =====================================================
   VISUAL UPGRADE
   ===================================================== */
:root {
    --paper: #e6d5b8;
    --paper-dark: #bba37f;
    --ink: #1a1a1a;
    --blood: #b3201f;
    --amber: #ffd479;
}

body { background: radial-gradient(ellipse at 50% 30%, #14110d 0%, #050505 75%); }

/* Atmosphäre: Filmkorn + Vignette */
.film-grain, .vignette {
    position: fixed;
    inset: 0;
    pointer-events: none;
}
.film-grain {
    z-index: 4000;
    opacity: 0.06;
    background-image: url('data:image/svg+xml;utf8,<svg width="200" height="200" xmlns="http://www.w3.org/2000/svg"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="3" stitchTiles="stitch"/></filter><rect width="200" height="200" filter="url(%23n)"/></svg>');
}
.vignette {
    z-index: 3999;
    background: radial-gradient(ellipse at center, transparent 45%, rgba(0,0,0,0.75) 100%);
}
@keyframes grainShift {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-3%, 2%); }
    50% { transform: translate(2%, -3%); }
    75% { transform: translate(-2%, -1%); }
    100% { transform: translate(3%, 3%); }
}

/* Wand: Tapete + Lichtkegel */
.scene-wall {
    background:
        repeating-linear-gradient(90deg, rgba(255,255,255,0.012) 0 2px, transparent 2px 40px),
        radial-gradient(ellipse at 50% 20%, #1c1812 0%, #060504 70%);
}
.lamp-bulb { background: #fff7d1; box-shadow: 0 0 40px 12px rgba(255, 235, 150, 0.7); }
.lamp-bulb::before {
    content: '';
    position: absolute;
    width: 60px; height: 22px;
    left: 50%; top: -18px;
    transform: translateX(-50%);
    background: #1d1d1d;
    border-radius: 30px 30px 4px 4px;
    box-shadow: 0 2px 0 #444;
}
.lamp-bulb { position: relative; }
.light-cone {
    width: 520px; height: 520px;
    background: linear-gradient(to bottom, rgba(255, 235, 160, 0.2) 0%, rgba(255, 235, 160, 0) 100%);
}

/* Detektive: Hut, Schultern, Krawatte */
.detective {
    background: linear-gradient(180deg, #0c0c0c 0%, #040404 100%);
    border-radius: 70px 70px 0 0;
}
.detective::before { /* Hut */
    content: '';
    position: absolute;
    top: -14px; left: 50%;
    width: 150px; height: 26px;
    transform: translateX(-50%);
    background: #070707;
    border-radius: 50%;
    box-shadow: 0 -18px 0 -4px #0a0a0a;
}
.detective::after { /* Krawatte */
    content: '';
    position: absolute;
    top: 110px; left: 50%;
    width: 14px; height: 80px;
    transform: translateX(-50%);
    background: linear-gradient(#3a0d0d, #1c0606);
    clip-path: polygon(30% 0, 70% 0, 100% 100%, 50% 90%, 0 100%);
    opacity: 0.7;
}

/* Login */
.login-box {
    width: min(92vw, 420px);
    margin: 0 auto;
    background: linear-gradient(160deg, #1a1612, #0d0b09);
    border: 1px solid #4a3f30;
    border-radius: 6px;
    box-shadow: 0 0 60px rgba(255, 212, 121, 0.08), 0 10px 40px rgba(0,0,0,0.9);
}
.game-logo {
    font-size: clamp(1.6rem, 6vw, 2.2rem);
    font-weight: 700;
    color: var(--amber);
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 0 0 18px rgba(255, 212, 121, 0.45);
}
.game-subtitle { color: #8d7f69; margin-bottom: 22px; letter-spacing: 4px; font-style: italic; }
.login-box input:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 10px rgba(255,212,121,0.3); }
.login-box button, #btn-smuggle-save, #btn-smuggle-back {
    background: linear-gradient(#5a4a30, #3a2f1e);
    border: 1px solid #7a6a4a;
    border-radius: 3px;
}
.login-box button:hover { background: linear-gradient(#6d5a3a, #463826); }

#screen-role-select h2 {
    text-align: center;
    color: var(--amber);
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 0 0 14px rgba(255,212,121,0.35);
}
#screen-role-select { padding: 0 16px; }

/* Akten */
.file-card, .closed-file, .police-file {
    background-color: var(--paper);
    background-image:
        url('data:image/svg+xml;utf8,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="4" stitchTiles="stitch"/></filter><rect width="100" height="100" filter="url(%23noise)" opacity="0.07"/></svg>'),
        linear-gradient(180deg, rgba(255,255,255,0.15), rgba(90,60,20,0.12));
}
.file-card { padding: 28px 20px; min-height: 120px; }
.file-card:hover { transform: translateY(-4px) rotate(-1deg); box-shadow: 4px 10px 24px rgba(0,0,0,0.7); }
.file-card::before { /* Aktenreiter */
    content: '';
    position: absolute;
    top: -12px; left: 18px;
    width: 90px; height: 14px;
    background: var(--paper-dark);
    border-radius: 6px 6px 0 0;
}
.stamp-confidential {
    border-radius: 4px;
    letter-spacing: 2px;
    mix-blend-mode: multiply;
    text-shadow: 0 0 1px rgba(180,0,0,0.6);
}
.closed-file { width: min(300px, 80vw); height: auto; min-height: 260px; }
.closed-file:hover { transform: rotate(0deg) scale(1.04); }
.closed-file::after { /* Hinweis zum Anklicken */
    content: 'Zum Aufheben anklicken';
    position: absolute;
    bottom: 10px; left: 0; right: 0;
    text-align: center;
    font-size: 0.75rem;
    color: #6b5a3c;
    animation: hintPulse 2s ease-in-out infinite;
}
@keyframes hintPulse { 0%,100% { opacity: 0.35; } 50% { opacity: 1; } }

.police-file { max-height: 88vh; border-radius: 6px 26px 6px 6px; }
.file-modal, .scrap-modal { backdrop-filter: blur(3px); background: rgba(0,0,0,0.78); }
.case-title { padding-right: 90px; }

/* Fortschritt */
.progress-track { display: flex; gap: 6px; margin-bottom: 22px; flex-wrap: wrap; }
.progress-step {
    flex: 1 1 70px;
    text-align: center;
    font-size: 0.72rem;
    padding: 4px 2px;
    border: 1px solid #9a8a6a;
    color: #7a6a4a;
    border-radius: 3px;
    background: rgba(255,255,255,0.15);
}
.progress-step.current { background: var(--ink); color: var(--paper); border-color: var(--ink); font-weight: 700; }
.progress-step.done { background: rgba(60, 120, 60, 0.25); color: #2d5a2d; border-color: #5a8a5a; }
.progress-step.done::before { content: '✓ '; }

/* Buttons & Eingaben */
.btn-typewriter { border-radius: 3px; background: linear-gradient(#444, #222); letter-spacing: 0.5px; }
.btn-typewriter:hover:not(:disabled) { background: linear-gradient(#555, #2b2b2b); }
.btn-typewriter:disabled, input:disabled { opacity: 0.55; cursor: not-allowed; }
input[type="text"] { background: rgba(255,255,255,0.25); padding: 10px 8px; }
input[type="text"]:focus { background: rgba(255,255,255,0.45); }
.btn-alibi { border-radius: 3px; }
.result-box { border-radius: 3px; }
.result-box p { font-weight: 700; word-break: break-word; }
#final-verdict h2 { text-align: center; margin: 14px 0; font-size: 1.5rem; letter-spacing: 1px; }

/* Kassiber & Tisch */
.scrap-content { background-image: repeating-linear-gradient(transparent 0 26px, rgba(120,150,200,0.25) 26px 27px); }
.emoji-huge { filter: drop-shadow(0 3px 3px rgba(0,0,0,0.3)); }
.table-underside {
    background:
        repeating-linear-gradient(90deg, rgba(255,255,255,0.015) 0 3px, transparent 3px 22px),
        #110d0a;
}
.gum { animation: gumPulse 3s ease-in-out infinite; }
@keyframes gumPulse { 0%,100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.12); } }

/* HUD */
.stats-board {
    background: rgba(12, 10, 8, 0.85);
    border: 1px solid #4a3f30;
    border-left: 3px solid var(--blood);
    border-radius: 3px;
    color: var(--amber);
    line-height: 1.5;
    backdrop-filter: blur(4px);
}
.mute-btn { position: fixed; z-index: 4001; background: rgba(0,0,0,0.5); border-radius: 50%; width: 42px; height: 42px; }
.look-btn {
    position: fixed;
    bottom: 16px; left: 16px;
    z-index: 4001;
    font-family: 'Courier Prime', monospace;
    background: rgba(12,10,8,0.9);
    color: var(--amber);
    border: 1px solid #7a6a4a;
    border-radius: 4px;
    padding: 10px 14px;
    font-size: 0.95rem;
}
#dialog-text {
    background: rgba(0,0,0,0.55);
    display: inline-block;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: clamp(1rem, 3.6vw, 1.4rem);
}
#dialog-text:empty { display: none; }

/* Mobil */
@media (max-width: 600px) {
    .stats-board { top: 8px; left: 8px; font-size: 0.75rem; padding: 6px 8px; }
    .police-file { padding: 22px 14px; }
    .case-title { font-size: 1.1rem; padding-right: 70px; }
    .dialog-system { bottom: 70px; }
    .btn-close { top: -10px; right: -6px; }
    .scrap-content { padding: 28px 18px; }
    .detective { transform: scale(0.8); }
}
@media (prefers-reduced-motion: reduce) {
    .film-grain, .lamp-container, .detective, .gum { animation: none; }
}


/* =====================================================
   COOLER: Sprecher, Urteils-Stempel, Shake
   ===================================================== */
.detective.speaking { filter: drop-shadow(0 0 30px rgba(0,0,0,1)) brightness(1.7); }
.detective.speaking.grimm .glowing-eyes::before,
.detective.speaking.grimm .glowing-eyes::after { box-shadow: 0 0 16px 3px red; width: 10px; }
.detective.speaking.schatten .glowing-glasses::before,
.detective.speaking.schatten .glowing-glasses::after { box-shadow: inset 0 0 8px rgba(200,255,255,0.8), 0 0 18px rgba(200,255,255,0.6); }
.detective.speaking::before { animation: nod 0.35s ease-in-out infinite alternate; }
@keyframes nod { from { transform: translateX(-50%) translateY(0); } to { transform: translateX(-50%) translateY(3px); } }

.case-badge {
    display: inline-block;
    font-size: 0.78rem;
    padding: 4px 10px;
    margin-bottom: 14px;
    border: 1px dashed #7a6a4a;
    border-radius: 3px;
    background: rgba(255,255,255,0.25);
}
.status-msg { white-space: pre-line; }

.verdict-stamp {
    position: fixed;
    top: 50%; left: 50%;
    z-index: 4500;
    font-size: clamp(2.2rem, 11vw, 5.5rem);
    font-weight: 700;
    letter-spacing: 6px;
    padding: 6px 28px;
    border: 8px solid currentColor;
    border-radius: 8px;
    pointer-events: none;
    background: rgba(0,0,0,0.35);
    animation: stampSlam 0.5s cubic-bezier(.2,1.6,.4,1) forwards, stampFade 0.6s ease-in 2.6s forwards;
}
.verdict-stamp.win { color: #5fd16a; text-shadow: 0 0 25px rgba(95,209,106,0.7); }
.verdict-stamp.lose { color: #ff3b3b; text-shadow: 0 0 25px rgba(255,59,59,0.7); }
@keyframes stampSlam {
    0% { transform: translate(-50%, -50%) scale(4) rotate(-20deg); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1) rotate(-8deg); opacity: 1; }
}
@keyframes stampFade { to { opacity: 0; } }

body.shake .room-container, body.shake .ui-layer { animation: shake 0.6s; }
@keyframes shake {
    0%,100% { transform: translate(0,0); }
    15% { transform: translate(-8px, 4px); }
    30% { transform: translate(7px, -5px); }
    45% { transform: translate(-6px, -3px); }
    60% { transform: translate(5px, 4px); }
    80% { transform: translate(-3px, 2px); }
}

.reset-btn {
    margin-top: 8px;
    width: 100%;
    font-family: 'Courier Prime', monospace;
    font-size: 0.75rem;
    background: transparent;
    color: #8d7f69;
    border: 1px solid #4a3f30;
    border-radius: 3px;
    padding: 3px 6px;
    cursor: pointer;
}
.reset-btn:hover { color: var(--amber); border-color: var(--amber); }

/* =====================================================
   GEFÜHRTER ABLAUF: Aktionsleiste, eine Stufe pro Seite
   ===================================================== */
.stage-off { display: none !important; }

.action-bar {
    position: fixed;
    top: 10px; left: 50%;
    transform: translateX(-50%);
    z-index: 1500;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: calc(100vw - 200px);
    padding: 6px 8px;
    background: rgba(12, 10, 8, 0.9);
    border: 1px solid #4a3f30;
    border-radius: 6px;
    backdrop-filter: blur(4px);
}
.bar-btn {
    font-family: 'Courier Prime', monospace;
    font-size: 0.9rem;
    padding: 6px 12px;
    color: var(--ink);
    background: linear-gradient(#e9dbc0, #cdb98f);
    border: 1px solid #8a7650;
    border-radius: 3px;
    cursor: pointer;
    white-space: nowrap;
}
.bar-btn:hover { filter: brightness(1.08); }
.bar-btn.pulse { animation: barPulse 1.2s ease-in-out infinite; }
@keyframes barPulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(255,212,121,0.7); }
    50% { box-shadow: 0 0 0 8px rgba(255,212,121,0); }
}
.next-step { color: var(--amber); font-size: 0.85rem; line-height: 1.25; }

.clue-text {
    background: rgba(179, 32, 31, 0.1);
    border-left: 3px solid var(--blood);
    padding: 8px 10px;
    margin-bottom: 14px;
    font-style: italic;
}
.clue-text:empty { display: none; }
#btn-open-scrap { margin-bottom: 8px; }

@media (max-width: 700px) {
    .action-bar { top: 52px; max-width: calc(100vw - 16px); flex-wrap: wrap; justify-content: center; }
    .next-step { flex-basis: 100%; text-align: center; }
}


/* Notiz */
.scrap-question { font-weight: 700; margin: 8px 0 14px; font-size: 1.05rem; }
.scrap-hint { font-size: 0.85rem; color: #6b5a3c; margin-bottom: 10px; font-style: italic; }
.scrap-content input[type="text"] { text-align: center; }

/* =====================================================
   HANDY / HOCHFORMAT
   ===================================================== */
@supports (height: 100dvh) {
    .room-container, .viewport, .ui-layer, .file-modal, .scrap-modal { height: 100dvh; }
    .police-file { max-height: 88dvh; }
}

@media (max-width: 600px) {
    /* Kopfzeile: Statistik einzeilig, darunter die Aktionsleiste */
    .stats-board {
        top: 8px; left: 8px; right: 58px;
        display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px;
        font-size: 0.72rem; padding: 5px 8px;
    }
    .stats-board .reset-btn { width: auto; margin: 0 0 0 auto; padding: 2px 6px; }
    .action-bar { top: 50px; left: 8px; right: 8px; transform: none; max-width: none; justify-content: flex-start; }
    .next-step { font-size: 0.78rem; }

    /* Fenster: unter der Leiste beginnen, unten Platz für Dialog lassen */
    .file-modal, .scrap-modal {
        align-items: flex-start;
        padding: 128px 10px 150px;
    }
    .police-file { max-height: 100%; width: 100%; }
    .scrap-content { width: 100%; max-height: 100%; overflow-y: auto; }

    /* Dialog über dem Banner, kompakter */
    .dialog-system { bottom: 92px; width: 96vw; }
    #dialog-text { font-size: 0.95rem; padding: 6px 10px; max-height: 26vh; overflow: hidden; }

    /* Bedienelemente unten */
    .look-btn { bottom: 44px; left: 8px; padding: 8px 10px; font-size: 0.85rem; }
    .film-grain { opacity: 0.04; }

    /* iOS zoomt bei Eingabefeldern unter 16px, deshalb nicht kleiner */
    input[type="text"], input[type="password"] { font-size: 16px; }
    .btn-typewriter, .btn-alibi, .bar-btn { min-height: 44px; }
    .bar-btn { min-height: 38px; }
    .result-comparison { flex-direction: column; }

    /* Akte auf dem Tisch nicht zu groß */
    .closed-file { width: min(260px, 76vw); min-height: 220px; padding: 22px 16px; }
    .file-cover-text h4 { font-size: 1.15rem; }
    .login-box { padding: 22px 16px; }
}

/* Querformat auf kleinen Handys: Dialog schmaler */
@media (max-height: 480px) and (orientation: landscape) {
    .file-modal, .scrap-modal { padding: 60px 10px 60px; }
    .dialog-system { bottom: 34px; }
    #dialog-text { font-size: 0.85rem; }
    .action-bar { top: 6px; }
    .stats-board { display: none; }
}

@media (max-width: 600px) {
    /* Hochformat: Detektive oben, Tisch mit Akte direkt darunter */
    .scene-wall { height: 62vh; }
    .scene-table-top { height: 38vh; }

    /* Dialog bei den Detektiven; nur wenn ein Fenster offen ist, unten */
    .dialog-system { top: 132px; bottom: auto; }
    body:has(.file-modal:not(.hidden)) .dialog-system,
    body:has(.scrap-modal:not(.hidden)) .dialog-system { top: auto; bottom: 92px; }
}

/* Notiz: dunkle Schrift auf hellem Papier (erbte vorher die helle Seitenfarbe) */
.scrap-content, .scrap-content h3, .scrap-content p { color: var(--ink); }
.scrap-content .scrap-hint { color: #6b5a3c; }
.scrap-content input[type="text"] { color: #000; }
@media (max-width: 600px) {
    .file-modal, .scrap-modal { padding-top: 146px; }
}

/* =====================================================
   TISCH: Holzplatte, Kante, Requisiten
   ===================================================== */
.scene-table-top {
    background:
        radial-gradient(ellipse at 50% 18%, rgba(255, 220, 150, 0.22) 0%, rgba(255, 220, 150, 0) 55%),
        repeating-linear-gradient(90deg, rgba(0,0,0,0.32) 0 2px, transparent 2px 110px),
        repeating-linear-gradient(90deg, rgba(255,235,200,0.035) 0 1px, transparent 1px 6px),
        repeating-linear-gradient(0deg, rgba(0,0,0,0.05) 0 1px, transparent 1px 9px),
        linear-gradient(180deg, #5b3b21 0%, #3d2615 50%, #1d1209 100%);
    border-top: 3px solid #8a5b33;
    border-radius: 46% 46% 0 0 / 7% 7% 0 0;
    box-shadow: inset 0 22px 50px rgba(0,0,0,0.55), 0 -8px 40px rgba(0,0,0,0.95);
}
/* Vordere Tischkante mit Lichtkante */
.scene-table-top::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 26px;
    background: linear-gradient(#3a2412 0%, #1a0f07 70%, #0b0603 100%);
    border-top: 2px solid #9b6a3d;
    box-shadow: 0 -4px 14px rgba(0,0,0,0.5);
    pointer-events: none;
}
.scene-table-under { padding-top: 0; box-shadow: inset 0 40px 50px -10px #000; }

.prop { position: absolute; pointer-events: none; z-index: 1; }
.lamp-glow {
    left: 50%; top: -10%;
    width: 70%; height: 80%;
    transform: translateX(-50%);
    background: radial-gradient(ellipse, rgba(255, 230, 160, 0.16), transparent 65%);
}
.mug {
    left: 7%; top: 34%;
    width: 44px; height: 42px;
    background: linear-gradient(90deg, #ddd6c6, #aaa391 60%, #8d8777);
    border-radius: 5px 5px 12px 12px;
    box-shadow: inset 0 7px 0 -1px #2b170a, 4px 8px 10px rgba(0,0,0,0.7);
}
.mug::before { /* Henkel */
    content: '';
    position: absolute; right: -13px; top: 8px;
    width: 16px; height: 20px;
    border: 5px solid #b9b2a2; border-left: none;
    border-radius: 0 12px 12px 0;
}
.mug::after { /* Dampf */
    content: '';
    position: absolute; left: 14px; top: -20px;
    width: 14px; height: 22px;
    background: radial-gradient(ellipse, rgba(255,255,255,0.3), transparent 70%);
    filter: blur(3px);
    animation: steam 3s ease-in-out infinite;
}
@keyframes steam {
    0% { transform: translateY(6px) scale(0.8); opacity: 0; }
    40% { opacity: 0.8; }
    100% { transform: translateY(-14px) scale(1.3); opacity: 0; }
}
.ashtray {
    right: 6%; top: 40%;
    width: 62px; height: 24px;
    background: radial-gradient(ellipse at 50% 40%, #2a2a2a 0 45%, #6b6b6b 48%, #3c3c3c 62%, #151515 100%);
    border-radius: 50%;
    box-shadow: 3px 6px 10px rgba(0,0,0,0.75);
}
.ashtray::before { /* Kippe */
    content: '';
    position: absolute; left: 14px; top: 5px;
    width: 22px; height: 4px;
    background: linear-gradient(90deg, #e8e2d0 70%, #c98b3a 70%);
    border-radius: 2px;
    transform: rotate(-12deg);
}
.ashtray::after { /* Glut */
    content: '';
    position: absolute; left: 12px; top: 6px;
    width: 4px; height: 4px;
    background: #ff5a2b;
    border-radius: 50%;
    box-shadow: 0 0 6px 2px rgba(255, 90, 40, 0.7);
    animation: glowPulse 2.2s infinite alternate;
}
.pen {
    left: 21%; bottom: 17%;
    width: 78px; height: 5px;
    background: linear-gradient(90deg, #1b2a4a 0 78%, #c9a24a 78% 86%, #222 86%);
    border-radius: 3px;
    transform: rotate(-16deg);
    box-shadow: 2px 4px 5px rgba(0,0,0,0.6);
}
.closed-file { z-index: 3; position: relative; }

/* =====================================================
   HANDY: aufgeräumtes Hochformat
   Oben Statistik, darunter Dialog, dann Detektive und Tisch; unten die Leiste
   ===================================================== */
@media (max-width: 600px) {
    .scene-container { top: 0; height: 130vh; }
    .scene-wall { height: 49vh; }
    .scene-table-top { height: 38vh; }
    .scene-table-under { height: 43vh; }
    .detectives-bg { justify-content: space-around; }

    .stats-board { top: 6px; left: 6px; right: 54px; font-size: 0.68rem; padding: 4px 8px; }
    .mute-btn { top: 4px; right: 6px; width: 38px; height: 38px; font-size: 1.2rem; }

    /* Dialog oben: so sind Detektive und Tisch frei */
    .dialog-system, body:has(.file-modal:not(.hidden)) .dialog-system, body:has(.scrap-modal:not(.hidden)) .dialog-system {
        top: 44px; bottom: auto; width: 96vw;
    }
    #dialog-text { font-size: 0.85rem; max-height: 98px; padding: 5px 9px; line-height: 1.3; }

    /* Leiste unten */
    .action-bar { top: auto; bottom: 20px; left: 6px; right: 6px; max-width: none; padding: 5px 6px; gap: 6px; }
    .bar-btn { min-height: 36px; padding: 5px 10px; font-size: 0.85rem; }
    .next-step { font-size: 0.74rem; }

    /* Fenster: unter dem Dialog, über der Leiste */
    .file-modal, .scrap-modal { padding: 150px 10px 118px; }

    /* Hinweisband klein und dezent */
    .local-banner { font-size: 9px !important; padding: 2px 6px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    .closed-file { width: min(250px, 72vw); min-height: 200px; }
    .mug { left: 2%; top: 30%; transform: scale(0.85); }
    .ashtray { right: 1%; top: 36%; transform: scale(0.8); }
    .pen { left: 8%; bottom: 20%; width: 60px; }
}
@media (hover: none) { .look-btn { display: none; } .look-in-bar { display: inline-block; } }
.look-in-bar.hidden { display: none !important; }

@media (max-width: 600px) {
    /* Detektive kleiner und tiefer, damit der Dialog die Köpfe nicht verdeckt */
    .detectives-bg { transform: scale(0.7); transform-origin: bottom center; }
    .lamp-wire { height: 60px; }
    .light-cone { width: 360px; height: 360px; top: 80px; }

    /* Leiste: beide Buttons in einer Zeile, Hinweistext darunter */
    .action-bar { flex-wrap: wrap; }
    .bar-btn { font-size: 0.78rem; padding: 5px 8px; flex: 1 1 auto; }
    .next-step { flex-basis: 100%; text-align: center; font-size: 0.72rem; }
    .closed-file { margin-top: -34px; }
    .file-modal, .scrap-modal { padding-bottom: 128px; }
}

/* Leistenreihenfolge: Buttons zusammen in einer Zeile, Hinweistext darunter */
.action-bar #bar-file, .action-bar #bar-scrap, .action-bar .look-in-bar { order: 1; }
.action-bar .next-step { order: 2; }

/* Der Kaugummi gehörte zur alten Kassiber-Idee, die Notiz ist jetzt mit Klebeband befestigt */
.gum { display: none !important; }

/* =====================================================
   CHARAKTERE: Grimm & Schatten als Figuren
   ===================================================== */
.detectives-bg { height: 310px; align-items: flex-end; }
.detective {
    width: 210px;
    height: 290px;
    background: none !important;
    border-radius: 0;
    box-shadow: none;
    filter: drop-shadow(0 0 24px rgba(0,0,0,0.9));
    opacity: 1;
}
.detective::before, .detective::after { display: none !important; }
.det-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.detective.grimm { animation: breathing 5.5s infinite ease-in-out; }
.detective.schatten { animation: breathing 6.5s infinite ease-in-out alternate-reverse; }

/* Kopf und Mund bewegen sich beim Sprechen */
.det-head, .det-mouth { transform-box: fill-box; transform-origin: 50% 100%; }
.det-mouth { transform-origin: 50% 50%; }
.detective.speaking { filter: drop-shadow(0 0 24px rgba(0,0,0,0.9)) brightness(1.35); }
.detective.speaking .det-head { animation: detNod 1.1s ease-in-out infinite; }
.detective.speaking .det-mouth { animation: detTalk 0.16s ease-in-out infinite alternate; }
@keyframes detNod {
    0%,100% { transform: rotate(0deg) translateY(0); }
    30% { transform: rotate(-2deg) translateY(1px); }
    70% { transform: rotate(1.5deg) translateY(2px); }
}
@keyframes detTalk { from { transform: scaleY(1); } to { transform: scaleY(3.2); } }
.grimm.speaking .det-eyes { filter: brightness(1.6) drop-shadow(0 0 6px #ff3a1a); }
.schatten.speaking .det-eyes { filter: brightness(1.4) drop-shadow(0 0 6px #9fe3ff); }

/* Grimms Zigarette: Glut pulsiert, Rauch steigt */
.det-ember { animation: emberPulse 2.4s ease-in-out infinite; }
@keyframes emberPulse { 0%,100% { opacity: 0.65; } 45% { opacity: 1; } }
.det-smoke { transform-box: fill-box; transform-origin: center; animation: detSmoke 4.5s linear infinite; filter: blur(2.5px); }
.det-smoke.s2 { animation-delay: 1.5s; }
.det-smoke.s3 { animation-delay: 3s; }
@keyframes detSmoke {
    0% { transform: translate(0, 0) scale(0.6); opacity: 0; }
    15% { opacity: 0.35; }
    100% { transform: translate(-18px, -80px) scale(2.6); opacity: 0; }
}
/* Grimm blinzelt grimmig */
.grimm .det-eyes { animation: grimBlink 6s infinite; }
@keyframes grimBlink { 0%, 94%, 100% { opacity: 1; } 96% { opacity: 0.05; } }

/* Schattens Brille blitzt ab und zu auf */
.det-glint { animation: glint 5s ease-in-out infinite; }
@keyframes glint {
    0%, 70% { transform: rotate(25deg) translateX(0); opacity: 0; }
    72% { opacity: 1; }
    86% { transform: rotate(25deg) translateX(70px); opacity: 0.9; }
    88%, 100% { transform: rotate(25deg) translateX(70px); opacity: 0; }
}

/* Namensschilder aus Messing vor den Figuren */
.det-nameplate {
    position: absolute;
    bottom: 6px; left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #2a1d0c;
    background: linear-gradient(180deg, #e6c879, #a77f32);
    border: 1px solid #5c4318;
    border-radius: 2px;
    padding: 1px 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.7);
    white-space: nowrap;
    opacity: 0.85;
}

/* Dialog: Sprecher farbig */
.speaker-name { display: block; font-size: 0.72em; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 2px; }
.speaker-name.grimm { color: #ff7a5c; text-shadow: 0 0 10px rgba(255, 70, 40, 0.6); }
.speaker-name.schatten { color: #9fe3ff; text-shadow: 0 0 10px rgba(120, 210, 255, 0.6); }

/* =====================================================
   RAUM: Einwegspiegel, Uhr, Steckbrief
   ===================================================== */
.one-way-mirror {
    position: absolute;
    top: 14vh; right: 6%;
    width: 22%; max-width: 260px; height: 26vh;
    background: linear-gradient(135deg, #0f1418 0%, #070a0c 60%, #0c1013 100%);
    border: 6px solid #1b1714;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.9), 0 0 0 2px #2a231d;
    overflow: hidden;
}
.mirror-sheen {
    position: absolute; inset: -40%;
    background: linear-gradient(115deg, transparent 42%, rgba(200,230,255,0.07) 47%, transparent 52%);
    animation: sheen 9s ease-in-out infinite;
}
@keyframes sheen { 0%,100% { transform: translateX(-20%); } 50% { transform: translateX(20%); } }

.wall-clock {
    position: absolute;
    top: 9vh; left: 50%;
    margin-left: 140px;
    width: 58px; height: 58px;
    border-radius: 50%;
    background: radial-gradient(circle, #d9d0bb 0 58%, #a99f88 62%, #2a241d 64%, #3d342a 100%);
    box-shadow: 0 4px 14px rgba(0,0,0,0.8);
    opacity: 0.75;
}
.clock-hand { position: absolute; left: 50%; bottom: 50%; transform-origin: 50% 100%; background: #1a1612; border-radius: 2px; }
.clock-hand.hour { width: 3px; height: 13px; margin-left: -1.5px; transform: rotate(300deg); }
.clock-hand.minute { width: 2px; height: 19px; margin-left: -1px; animation: tick 3600s linear infinite; }
.clock-hand.second { width: 1px; height: 21px; background: #9b1c12; animation: tick 60s steps(60) infinite; }
.clock-pin { position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px; border-radius: 50%; background: #1a1612; }
@keyframes tick { to { transform: rotate(360deg); } }

.wanted-poster {
    position: absolute;
    top: 16vh; left: 16%;
    width: 86px; padding: 6px 6px 8px;
    background: #cbb98f;
    color: #2b1e0e;
    text-align: center;
    transform: rotate(-4deg);
    box-shadow: 3px 5px 12px rgba(0,0,0,0.8);
    opacity: 0.55;
    font-size: 0.6rem;
}
.wanted-poster::before { /* Reißzwecke */
    content: ''; position: absolute; top: -3px; left: 50%; width: 7px; height: 7px; margin-left: -3.5px;
    border-radius: 50%; background: #8a1d14; box-shadow: 0 1px 2px #000;
}
.wp-title { font-weight: 700; letter-spacing: 2px; font-size: 0.75rem; }
.wp-face {
    margin: 4px auto; width: 50px; height: 50px; line-height: 50px;
    background: #2b2218; color: #cbb98f; font-weight: 700; font-size: 1.1rem; border-radius: 50% 50% 4px 4px;
}
.wp-sub { font-size: 0.5rem; }

@media (max-width: 600px) {
    .one-way-mirror { top: 9vh; right: 4%; width: 26%; height: 16vh; }
    .wall-clock { top: 5vh; margin-left: 70px; width: 42px; height: 42px; }
    .wanted-poster { top: 10vh; left: 12%; width: 64px; font-size: 0.5rem; }
    .wp-face { width: 36px; height: 36px; line-height: 36px; font-size: 0.85rem; }
    .det-nameplate { font-size: 0.85rem; }
}

/* Wanddeko neu verteilt (Desktop): nicht hinter Leiste oder Statistik */
.wall-clock { top: 24vh; left: 30%; margin-left: 0; }
.wanted-poster { top: 30vh; left: 9%; }
@media (max-width: 600px) {
    .wall-clock { top: 13vh; left: 8%; }
    .wanted-poster { top: 22vh; left: 4%; }
}
@media (max-width: 600px) { .wanted-poster { left: 13%; } .wall-clock { left: 34%; top: 15vh; } }

/* Mund und Kopfnicken nur, solange wirklich gesprochen wird (.talking); .speaking lässt die Figur nur leicht leuchten */
.detective.speaking .det-head { animation: none; }
.detective.speaking .det-mouth { animation: none; }
.detective.talking .det-head { animation: detNod 1.1s ease-in-out infinite; }
.detective.talking .det-mouth { animation: detTalk 0.16s ease-in-out infinite alternate; }

/* =====================================================
   LEVEL 3: DER ALIBI-BEWEIS (10 Gegenstände)
   ===================================================== */
.stage-hint { font-size: 0.85rem; margin-bottom: 12px; color: #4a3d28; }
.item-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}
.item-card {
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
    gap: 4px;
    padding: 8px 4px;
    min-height: 86px;
    font-family: 'Courier Prime', monospace;
    background: rgba(255,255,255,0.45);
    border: 1px solid #9a8a6a;
    border-radius: 4px;
    cursor: pointer;
    color: var(--ink);
    transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}
.item-card:hover:not(:disabled) { transform: translateY(-3px) rotate(-1deg); box-shadow: 0 6px 12px rgba(0,0,0,0.25); background: rgba(255,255,255,0.7); }
.item-card:disabled { cursor: default; opacity: 0.45; }
.item-card.selected { opacity: 1; background: #fff6d6; border: 2px solid var(--blood); box-shadow: 0 0 0 3px rgba(179,32,31,0.15); }
.item-icon { font-size: 2rem; line-height: 1; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.3)); }
.item-name { font-size: 0.68rem; text-align: center; line-height: 1.15; }

/* Die Gegenstände in der Szene auf dem Tisch */
.table-items { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.table-item {
    position: absolute;
    font-size: 2rem;
    transform: rotate(var(--rot, 0deg));
    filter: drop-shadow(3px 6px 4px rgba(0,0,0,0.8));
    cursor: pointer;
    pointer-events: auto;
    animation: dropOnTable 0.5s cubic-bezier(.3,1.5,.5,1) both;
}
.table-item:nth-child(2n) { animation-delay: 0.08s; }
.table-item:nth-child(3n) { animation-delay: 0.16s; }
.table-item:hover { transform: rotate(var(--rot, 0deg)) scale(1.2); }
@keyframes dropOnTable {
    from { transform: translateY(-40px) rotate(var(--rot, 0deg)) scale(1.3); opacity: 0; }
    to { transform: rotate(var(--rot, 0deg)); opacity: 1; }
}

/* =====================================================
   LEVEL 4: DIE 1-MINUTEN-PANIK
   ===================================================== */
.panic-section {
    border: 2px dashed var(--blood);
    background: rgba(179, 32, 31, 0.08);
    padding: 12px;
    margin-bottom: 14px;
    border-radius: 4px;
}
.panic-timer {
    text-align: center;
    font-size: 3rem;
    font-weight: 700;
    color: var(--blood);
    line-height: 1;
    animation: alertBlink 1s infinite alternate;
}
.panic-timer small { font-size: 0.9rem; margin-left: 4px; }
.panic-text { text-align: center; font-size: 0.88rem; margin: 8px 0 10px; }
.panic-last { display: flex; gap: 8px; margin-bottom: 10px; }
.panic-last > div {
    flex: 1; text-align: center;
    background: rgba(255,255,255,0.45);
    border: 1px solid #9a8a6a; border-radius: 3px; padding: 6px;
}
.panic-last span { display: block; font-size: 0.68rem; color: #5a4a30; }
.panic-last b { font-size: 1.1rem; word-break: break-word; }
.panic-log {
    max-height: 140px; min-height: 60px;
    overflow-y: auto;
    background: rgba(0,0,0,0.06);
    border-radius: 3px;
    padding: 6px;
    margin-bottom: 8px;
    display: flex; flex-direction: column; gap: 4px;
}
.panic-msg { max-width: 75%; padding: 3px 8px; border-radius: 10px; font-size: 0.9rem; animation: fadeIn 0.2s; }
.panic-msg .who { font-size: 0.65rem; opacity: 0.7; margin-right: 6px; }
.panic-msg.mine { align-self: flex-end; background: #2b2b2b; color: #f3ead6; }
.panic-msg.theirs { align-self: flex-start; background: #fff; color: #1a1a1a; border: 1px solid #c9b994; }
.panic-input-row { display: flex; gap: 8px; align-items: stretch; }
.panic-input-row input[type="text"] { margin-bottom: 0; flex: 1; }

/* Countdown oben rechts, auch bei geschlossener Akte */
.panic-hud {
    position: fixed;
    top: 60px; right: 12px;
    z-index: 4002;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    background: rgba(160, 10, 10, 0.88);
    border: 2px solid #ff6a5a;
    border-radius: 6px;
    padding: 4px 12px;
    box-shadow: 0 0 25px rgba(255, 40, 30, 0.6);
    pointer-events: none;
}
.panic-hud.urgent { animation: hudPulse 0.5s infinite alternate; }
@keyframes hudPulse { to { transform: scale(1.12); background: rgba(220, 0, 0, 0.95); } }

/* Rote Lampe und roter Raum während der Panik */
body.panic-mode .lamp-bulb { background: #ff3b2f; box-shadow: 0 0 50px 18px rgba(255, 40, 30, 0.85); }
body.panic-mode .light-cone { background: linear-gradient(to bottom, rgba(255, 40, 30, 0.35) 0%, rgba(255, 40, 30, 0) 100%); }
body.panic-mode .lamp-glow { background: radial-gradient(ellipse, rgba(255, 40, 30, 0.22), transparent 65%); }
body.panic-mode .lamp-container { animation-duration: 0.9s; }
body.panic-mode .vignette {
    background: radial-gradient(ellipse at center, transparent 35%, rgba(130, 0, 0, 0.75) 100%);
    animation: panicPulse 1s ease-in-out infinite;
}
@keyframes panicPulse { 50% { opacity: 0.55; } }

@media (max-width: 600px) {
    .item-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .item-card { min-height: 74px; padding: 6px 2px; }
    .item-icon { font-size: 1.6rem; }
    .table-item { font-size: 1.4rem; }
    .panic-hud { top: auto; bottom: 120px; right: 10px; font-size: 1.4rem; }
    .panic-timer { font-size: 2.4rem; }
    .panic-log { max-height: 110px; }
}
/* Keine horizontale Scrollleiste in der Akte */
.police-file { overflow-x: hidden; }

.new-game-btn { display: block; width: 100%; margin-top: 14px; padding: 12px; font-size: 1rem; }

/* Version/Modus-Anzeige und Neustart-Knöpfe */
.build-info { margin-top: 12px; font-size: 0.68rem; color: #8d7f69; text-align: center; opacity: 0.85; }
.reset-start {
    display: block;
    width: 100%;
    margin-top: 18px;
    padding: 12px 10px;
    font-family: 'Courier Prime', monospace;
    font-size: 0.95rem;
    color: var(--amber);
    background: rgba(12, 10, 8, 0.85);
    border: 1px dashed #7a6a4a;
    border-radius: 4px;
    cursor: pointer;
}
.reset-start:hover { border-color: var(--amber); }
.btn-new-case { width: 100%; margin-top: 14px; min-height: 44px; font-size: 1.05rem; }
#screen-role-select { padding-bottom: 16px; }

/* Neustart auf der Rollenwahl: kleines, dezentes Etikett statt großem Kasten */
.reset-start {
    display: block;
    width: auto;
    margin: 14px auto 0;
    padding: 5px 14px;
    font-size: 0.74rem;
    letter-spacing: 0.5px;
    color: #b9a97f;
    background: transparent;
    border: 1px solid rgba(185, 169, 127, 0.4);
    border-radius: 999px;
    opacity: 0.8;
    transition: opacity 0.15s, border-color 0.15s, color 0.15s;
}
.reset-start:hover, .reset-start:active { opacity: 1; color: var(--amber); border-color: var(--amber); }
.build-info { margin-top: 8px; }
.reset-start { background: rgba(12, 10, 8, 0.88); position: relative; z-index: 2; }
.build-info { position: relative; z-index: 2; text-shadow: 0 1px 3px #000; }

/* =====================================================
   RÜCKBLICK: geschaffte Stufen grün oder rot, anklickbar
   ===================================================== */
.progress-step { user-select: none; }
.progress-step.clickable { cursor: pointer; }
.progress-step.clickable:hover { filter: brightness(1.08); transform: translateY(-1px); }
/* Grün = gleich gesagt, Rot = Unterschiedliches (überschreibt das alte Standard-Grün von .done) */
.progress-step.done.ok { background: rgba(46, 125, 50, 0.28); color: #1f5a22; border-color: #3f8f43; }
.progress-step.done.ok::before { content: '✓ '; }
.progress-step.done.bad { background: rgba(198, 40, 40, 0.28); color: #8f1d1d; border-color: #c62828; font-weight: 700; }
.progress-step.done.bad::before { content: '✗ '; }
.progress-step.viewing { box-shadow: 0 0 0 2px var(--ink); }

.progress-hint { font-size: 0.72rem; color: #6b5a3c; margin: -12px 0 12px; font-style: italic; }

.recap {
    font-size: 0.82rem;
    line-height: 1.35;
    padding: 8px 10px;
    margin-bottom: 14px;
    border-left: 4px solid;
    border-radius: 3px;
    cursor: pointer;
}
.recap.ok { background: rgba(46, 125, 50, 0.14); border-color: #3f8f43; color: #1f5a22; }
.recap.bad { background: rgba(198, 40, 40, 0.14); border-color: #c62828; color: #8f1d1d; }
.recap:hover { filter: brightness(0.96); }

/* Rückblick-Seite */
.result-box.review-box.ok { background: rgba(46, 125, 50, 0.16); border: 2px solid #3f8f43; }
.result-box.review-box.bad { background: rgba(198, 40, 40, 0.16); border: 2px solid #c62828; }
.review-box h4 { font-size: 0.8rem; }
.review-box p { font-size: 1.05rem; }
.review-detail { margin: 6px 0 14px; font-weight: 700; }
.review-detail.ok { color: #1f5a22; }
.review-detail.bad { color: #8f1d1d; }

/* Panik: Frage und verdeckte Partner-Antwort */
.panic-question {
    text-align: center;
    font-weight: 700;
    font-size: 1.05rem;
    margin: 0 0 10px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid #9a8a6a;
    border-radius: 3px;
}
.panic-hidden-note {
    font-size: 0.8rem;
    text-align: center;
    margin-bottom: 8px;
    color: #8f1d1d;
    font-style: italic;
}
.panic-msg.masked { background: #e8dfc7; color: #6b5a3c; border: 1px dashed #9a8a6a; font-style: italic; }

/* =====================================================
   MISSTRAUEN DER KOMMISSARE
   ===================================================== */
.suspicion { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 0.78rem; }
.sus-label { white-space: nowrap; }
.sus-bar { flex: 1; min-width: 60px; height: 8px; background: rgba(255,255,255,0.12); border-radius: 4px; overflow: hidden; }
.sus-bar i { display: block; height: 100%; width: 15%; background: hsl(102, 70%, 45%); border-radius: 4px; transition: width 0.8s ease, background 0.8s ease; }
.sus-text { min-width: 5.5em; text-align: right; font-weight: 700; }
.suspicion.rising { animation: susPulse 0.9s ease-out; }
@keyframes susPulse {
    0% { transform: scale(1); }
    30% { transform: scale(1.08); color: #ff6a5a; }
    100% { transform: scale(1); }
}

/* Je misstrauischer, desto näher rücken die Kommissare und desto heller glühen die Augen */
.detectives-bg { transition: transform 1.2s ease; transform-origin: bottom center; }
.detectives-bg.sus-1 { transform: scale(1.03); }
.detectives-bg.sus-2 { transform: scale(1.07); }
.detectives-bg.sus-3 { transform: scale(1.11); }
.detectives-bg.sus-2 .det-eyes, .detectives-bg.sus-3 .det-eyes { filter: brightness(1.5); }
.detectives-bg.sus-3 .grimm .det-eyes { filter: brightness(1.9) drop-shadow(0 0 6px #ff3a1a); }

@media (max-width: 600px) {
    .suspicion { flex-basis: 100%; font-size: 0.68rem; margin-top: 2px; }
    /* Auf dem Handy sind die Kommissare kleiner skaliert; die Steigerung bleibt relativ */
    .detectives-bg { transform: scale(0.7); }
    .detectives-bg.sus-1 { transform: scale(0.72); }
    .detectives-bg.sus-2 { transform: scale(0.75); }
    .detectives-bg.sus-3 { transform: scale(0.78); }
}

/* =====================================================
   PANIK IN RUNDEN: kompakt, Dialog oben, Eingabe bleibt frei
   ===================================================== */
.panic-round-label { display: block; font-size: 0.8rem; font-weight: 700; color: #6b5a3c; margin-top: 2px; letter-spacing: 1px; }
.panic-timer { line-height: 1.05; }
.panic-round { font-size: 0.8rem; padding: 4px 8px; border-radius: 3px; background: rgba(198, 40, 40, 0.12); color: #8f1d1d; border-left: 3px solid #c62828; }

/* Während der Panik steht die Detektiv-Sprechblase oben und klein: Sie darf die Eingabe nie verdecken */
body.panic-mode .dialog-system { top: 62px; bottom: auto; width: min(92vw, 560px); }
body.panic-mode #dialog-text { font-size: 0.95rem; max-height: 76px; overflow: hidden; padding: 5px 10px; line-height: 1.3; }
body.panic-mode .verdict-stamp { display: none; }
@media (max-width: 600px) {
    body.panic-mode .dialog-system { top: 100px; }
    body.panic-mode #dialog-text { font-size: 0.82rem; max-height: 62px; }
}

/* =====================================================
   KOMMISSARE NEBEN DER AKTE + DEUTLICHERES NÄHERRÜCKEN
   ===================================================== */
/* Große Figuren in der Szene: spürbarere Schritte, dazu ein Vorbeugen */
.detectives-bg.sus-1 { transform: scale(1.1) translateY(4px); }
.detectives-bg.sus-2 { transform: scale(1.2) translateY(9px); }
.detectives-bg.sus-3 { transform: scale(1.32) translateY(15px); }
@media (max-width: 600px) {
    .detectives-bg.sus-1 { transform: scale(0.76) translateY(3px); }
    .detectives-bg.sus-2 { transform: scale(0.83) translateY(7px); }
    .detectives-bg.sus-3 { transform: scale(0.92) translateY(12px); }
}

/* Porträts: nur sichtbar, solange die Akte offen ist */
.watchers { display: none; z-index: 1400; pointer-events: none; }
body:has(#open-file-modal:not(.hidden)) .watchers { display: flex; }

.watcher {
    position: relative;
    width: 76px; height: 82px;
    border-radius: 50% 50% 8px 8px / 42% 42% 8px 8px;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 30%, #3a2f22, #0b0907);
    border: 2px solid #6b5636;
    box-shadow: 0 6px 18px rgba(0,0,0,0.8), inset 0 0 14px rgba(0,0,0,0.7);
    transform-origin: 50% 100%;
    transition: transform 0.7s cubic-bezier(.2,1.4,.4,1), border-color 0.7s, box-shadow 0.7s;
}
.watcher svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.watcher::after { /* roter Schein, der mit dem Misstrauen zunimmt */
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse at 50% 40%, rgba(255, 40, 30, 0), rgba(255, 40, 30, 0.55));
    opacity: 0; transition: opacity 0.7s;
}

.watchers-meter { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--amber); font-size: 0.72rem; text-align: center; }
.w-title { letter-spacing: 1px; text-transform: uppercase; font-size: 0.62rem; opacity: 0.8; }
.w-label { font-weight: 700; }
.watchers-meter .sus-bar { width: 100%; min-width: 64px; height: 10px; background: rgba(255,255,255,0.15); }
.watchers-meter .sus-bar i { height: 100%; }

/* je misstrauischer, desto größer, näher und rötlicher */
.watchers.sus-1 .watcher { transform: scale(1.12); border-color: #a07a3a; }
.watchers.sus-2 .watcher { transform: scale(1.26); border-color: #c4583a; }
.watchers.sus-3 .watcher { transform: scale(1.42); border-color: #ff4a3a; box-shadow: 0 6px 22px rgba(255,40,30,0.55), inset 0 0 14px rgba(0,0,0,0.7); }
.watchers.sus-1 .watcher::after { opacity: 0.25; }
.watchers.sus-2 .watcher::after { opacity: 0.55; }
.watchers.sus-3 .watcher::after { opacity: 0.9; }
.watchers.sus-2 .det-eyes, .watchers.sus-3 .det-eyes { filter: brightness(1.6); }
.watchers.lunge .watcher { animation: lunge 0.5s ease-out; }
@keyframes lunge { 0% { translate: 0 0; } 35% { translate: 0 -8px; } 100% { translate: 0 0; } }

/* Große Bildschirme: Porträts als Seitenleiste links neben der Akte */
@media (min-width: 760px) {
    .watchers {
        position: fixed; left: 14px; top: 50%; transform: translateY(-50%);
        flex-direction: column; align-items: center; gap: 14px; width: 108px;
    }
    .watchers-meter { order: 2; width: 100%; }
    .watcher.grimm { order: 1; }
    .watcher.schatten { order: 3; }
}
/* Schmale Bildschirme: schmale Leiste oben, über der Akte */
@media (max-width: 759px) {
    .watchers {
        position: fixed; left: 8px; right: 8px; top: 104px;
        flex-direction: row; align-items: flex-end; gap: 10px;
        padding: 2px 6px 0; height: 56px;
    }
    .watcher { width: 46px; height: 50px; flex: none; }
    .watchers-meter { flex: 1; align-self: center; font-size: 0.66rem; }
    .w-title { display: none; }
    .file-modal { padding-top: 168px; }
    .watchers.sus-1 .watcher { transform: scale(1.1); }
    .watchers.sus-2 .watcher { transform: scale(1.2); }
    .watchers.sus-3 .watcher { transform: scale(1.3); }
}
@media (max-width: 600px) { .file-modal { padding-top: 168px; } }
.watchers-meter { position: relative; z-index: 3; }
@media (min-width: 760px) { .watchers { gap: 30px; } }
@media (max-width: 759px) {
    /* Sprechblase endet über der Porträt-Leiste (Leiste ab y=104) */
    .dialog-system, body:has(.file-modal:not(.hidden)) .dialog-system, body:has(.scrap-modal:not(.hidden)) .dialog-system { top: 46px; }
    #dialog-text { max-height: 56px; font-size: 0.8rem; line-height: 1.25; }
    body.panic-mode .dialog-system { top: 46px; }
    body.panic-mode #dialog-text { max-height: 56px; font-size: 0.8rem; }
}
