/* ============================================================================
   Brevet fra skyttergravene (1914–1918)
   Graphic Novel Design System (Valiant Hearts-inspirert)
   ============================================================================ */

:root {
    --bg-dark: #0a0c0f;
    --panel-dark: rgba(16, 20, 26, 0.94);
    --panel-border: rgba(197, 160, 89, 0.35);
    --accent-gold: #c5a059;
    --accent-gold-light: #e5c98f;
    --accent-red: #a33226;
    --accent-green: #3b7e4f;
    --accent-khaki: #7d7256;
    --parchment: #ede0cb;
    --parchment-ink: #1f1b18;
    --parchment-border: #756247;
    
    --font-heading: 'Cinzel', Georgia, serif;
    --font-story: 'Playfair Display', Georgia, serif;
    --font-ui: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-typewriter: 'Courier Prime', Courier, monospace;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-dark);
    color: #e2dac9;
    font-family: var(--font-ui);
    user-select: none;
    -webkit-user-select: none;
}

/* Hovedbakgrunn med vignette og fargetone */
#stage-background {
    position: fixed;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 0.8s ease-in-out, filter 0.8s ease;
    z-index: 1;
}

#stage-vignette {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at center, rgba(10, 12, 15, 0.25) 30%, rgba(6, 8, 10, 0.88) 85%, rgba(4, 5, 6, 0.98) 100%);
    box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.9);
    z-index: 2;
}

/* Skjermristing ved dramatiske valg */
.screen-shake {
    animation: shakeAnim 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shakeAnim {
    10%, 90% { transform: translate3d(-2px, -1px, 0); }
    20%, 80% { transform: translate3d(3px, 2px, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, -2px, 0); }
    40%, 60% { transform: translate3d(4px, 2px, 0); }
}

/* ============================================================================
   HOVEDAPPLIKASJONENS LAYOUT
   ============================================================================ */
#game-root {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

/* TOPPBAR (Tittel, Målere, Lyd- & Menykontroller) - Autogjemt / Slide-in fra toppen */
#top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    padding: 8px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(8, 10, 14, 0.98) 0%, rgba(14, 18, 24, 0.94) 100%);
    border-bottom: 2px solid #5a452c;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000;
    transform: translateY(-100%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.32s ease;
    box-sizing: border-box;
}

/* Vises når musen svever over baren eller den har .is-visible */
#top-bar:hover,
#top-bar.is-visible {
    transform: translateY(0);
}

/* Liten taktil flik / håndtak som henger diskré ned i toppen av skjermen */
.top-bar-tab-handle {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(180deg, rgba(16, 13, 10, 0.96) 0%, rgba(30, 24, 18, 0.92) 100%);
    border: 1px solid #7c6239;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 3px 16px;
    font-family: var(--font-typewriter, monospace);
    font-size: 0.72rem;
    font-weight: 700;
    color: #dfcaa3;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    pointer-events: auto;
    user-select: none;
    letter-spacing: 0.04em;
}

.top-bar-tab-handle:hover {
    background: rgba(45, 34, 23, 0.98);
    border-color: var(--accent-gold);
    color: #fff;
    transform: translateX(-50%) translateY(2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.9);
}

#top-bar:hover .top-bar-tab-handle,
#top-bar.is-visible .top-bar-tab-handle {
    border-color: #5a452c;
    color: #9c8e75;
}

#top-bar:hover .tab-arrow,
#top-bar.is-visible .tab-arrow {
    transform: rotate(180deg);
}

.tab-arrow {
    display: inline-block;
    font-size: 0.68rem;
    transition: transform 0.25s ease;
    color: var(--accent-gold);
}

@media (max-width: 820px) {
    #top-bar {
        padding: 6px 14px;
        height: auto;
        min-height: 56px;
        flex-wrap: wrap;
        gap: 8px;
    }
    .brand-subtitle {
        display: none;
    }
    .gauges-wrapper {
        gap: 8px;
    }
    .gauge-item {
        padding: 3px 6px;
    }
}

.brand-section {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent-gold);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.brand-subtitle {
    font-size: 0.72rem;
    color: #9c9483;
    letter-spacing: 0.05em;
}

/* STAT-MÅLERE I BRASS-DESIGN */
.gauges-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

.gauge-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.45);
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid rgba(197, 160, 89, 0.2);
}

.gauge-icon {
    font-size: 1.1rem;
}

.gauge-info {
    display: flex;
    flex-direction: column;
}

.gauge-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #a89f8d;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.gauge-value-bar {
    display: flex;
    align-items: center;
    gap: 6px;
}

.gauge-bar-track {
    width: 54px;
    height: 6px;
    background: #1a1e24;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid #323842;
}

.gauge-bar-fill {
    height: 100%;
    width: 50%;
    background: var(--accent-gold);
    transition: width 0.4s ease, background-color 0.4s ease;
}

.gauge-value {
    font-family: var(--font-typewriter);
    font-size: 0.8rem;
    font-weight: bold;
    color: #fff;
    min-width: 24px;
}

/* KONTROLLKNAPPER */
.top-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn {
    background: rgba(22, 28, 36, 0.8);
    border: 1px solid rgba(197, 160, 89, 0.3);
    color: var(--accent-gold);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background: rgba(197, 160, 89, 0.2);
    border-color: var(--accent-gold);
    color: #fff;
    transform: translateY(-1px);
}

/* ============================================================================
   HOVEDSCENEN (SEKVENS: CUTSCENE ➔ ESCAPE ROOM ➔ CUTSCENE)
   ============================================================================ */
#main-stage {
    flex: 1;
    position: relative;
    width: 100%;
    height: calc(100% - 64px);
    overflow: hidden;
}

/* 1. KINOMODUS: CUTSCENE / VISUELL ROMAN */
#cutscene-view {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 0 32px 24px 32px;
    z-index: 20;
    transition: opacity 0.5s ease, transform 0.5s ease;
    overflow: hidden;
}

#cutscene-view.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    display: none;
}

/* Filmisk vignett og gradient som samler scenen */
.cutscene-scrim {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 18% 70%, rgba(0, 0, 0, 0.45) 0%, transparent 65%),
                linear-gradient(180deg, rgba(8, 10, 14, 0.15) 0%, rgba(8, 10, 14, 0.35) 55%, rgba(6, 8, 10, 0.94) 100%);
    pointer-events: none;
    z-index: 15;
}

/* Karakter forankret helt i bunn av skjermen */
.cutscene-character-stage {
    position: absolute;
    bottom: 0;
    left: 7%;
    height: 84%;
    max-height: 760px;
    display: flex;
    align-items: flex-end;
    pointer-events: none;
    z-index: 22;
}

.cutscene-sprite {
    height: 100%;
    width: auto;
    max-width: 540px;
    object-fit: contain;
    object-position: bottom left;
    filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 20px rgba(0, 0, 0, 0.8));
    transition: transform 0.6s ease, opacity 0.5s ease;
    animation: charBreathing 5s ease-in-out infinite alternate;
}

@keyframes charBreathing {
    0% { transform: translateY(0); }
    100% { transform: translateY(-4px) scale(1.005); }
}

/* Kinoboksen / Dialogboksen i Cutscene - Slank 2-linjers visning */
.cutscene-dialogue-box {
    width: 100%;
    max-width: 980px;
    min-height: 122px;
    background: linear-gradient(180deg, #f6ede0 0%, #ebe0cb 100%);
    color: var(--parchment-ink);
    border-radius: 10px;
    padding: 10px 22px 10px 22px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(142, 115, 67, 0.4), inset 0 0 20px rgba(117, 98, 71, 0.2);
    border: 2px solid #8e7343;
    position: relative;
    z-index: 30;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 4px;
    backdrop-filter: blur(8px);
    animation: slideUpDialogue 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

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

.cutscene-dialogue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(142, 115, 67, 0.35);
    padding-bottom: 4px;
    margin-bottom: 3px;
    gap: 10px;
}

.cutscene-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.cutscene-speaker {
    font-family: var(--font-heading);
    font-size: 0.96rem;
    font-weight: 700;
    color: #632018;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cutscene-date-badge {
    font-family: var(--font-typewriter);
    font-size: 0.74rem;
    color: #5c4f3c;
    background: rgba(142, 115, 67, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(142, 115, 67, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cutscene-page-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    font-weight: 700;
    color: #8e7343;
    background: rgba(142, 115, 67, 0.15);
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 4px;
}

.cutscene-dialogue-text {
    font-family: var(--font-story);
    font-size: 1.05rem;
    line-height: 1.45;
    color: #1a1612;
    font-style: italic;
    margin: 0;
    /* Maks nøyaktig to linjer */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.9em;
}

.cutscene-controls-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 1px;
    gap: 10px;
}

/* Valgcontainer når den er aktiv (egen dedikert side i dialogboksen) */
.cutscene-choices-container {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 8px;
    margin: 2px 0 4px 0;
}

/* Dedikerte valgkort inne i dialogboksen */
.cutscene-choice-card {
    background: linear-gradient(180deg, #ede2cf 0%, #e0d2bc 100%);
    border: 1.5px solid #a68c5b;
    border-radius: 6px;
    padding: 8px 14px;
    color: #1a1612;
    font-family: var(--font-story);
    font-size: 0.94rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
}

.cutscene-choice-card:hover {
    background: linear-gradient(180deg, #fdf8ee 0%, #f4ebd9 100%);
    border-color: #632018;
    color: #632018;
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(99, 32, 24, 0.25);
}

.cutscene-choice-card:active {
    transform: translateY(1px);
}

.cutscene-choice-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 800;
    color: #632018;
    background: rgba(99, 32, 24, 0.12);
    border: 1px solid rgba(99, 32, 24, 0.28);
    border-radius: 4px;
    padding: 2px 6px;
    flex-shrink: 0;
}

.cutscene-choice-text {
    flex: 1;
    font-style: italic;
}

.cutscene-choice-arrow {
    font-size: 0.75rem;
    color: #8e7343;
    flex-shrink: 0;
    transition: transform 0.18s ease;
}

.cutscene-choice-card:hover .cutscene-choice-arrow {
    transform: translateX(3px);
    color: #632018;
}

.cutscene-primary-btn {
    background: linear-gradient(180deg, #7a281e 0%, #541913 100%);
    color: #fdfaf5;
    border: 1px solid #8e7343;
    padding: 3px 12px;
    min-height: 25px;
    border-radius: 5px;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.18s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.cutscene-primary-btn:hover {
    background: linear-gradient(180deg, #8e3024 0%, #631f18 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(99, 32, 24, 0.5);
    border-color: #c5a059;
}

@media (max-height: 600px) {
    #cutscene-view {
        padding: 0 16px 12px 16px;
    }
    .cutscene-dialogue-box {
        max-width: 95vw;
        padding: 8px 18px 8px 18px;
        min-height: 108px;
        gap: 3px;
    }
    .cutscene-dialogue-text {
        font-size: 0.98rem;
        line-height: 1.4;
        min-height: 2.8em;
    }
    .cutscene-speaker {
        font-size: 0.9rem;
    }
    .cutscene-date-badge {
        font-size: 0.72rem;
        padding: 1px 7px;
    }
    .cutscene-primary-btn {
        padding: 4px 14px;
        min-height: 28px;
        font-size: 0.82rem;
    }
    .cutscene-choice-card {
        padding: 6px 12px;
        font-size: 0.88rem;
    }
}

/* 2. OPPGAVEMODUS: DET DEDIKERTE ESCAPE ROOMET */
#room-view {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    z-index: 20;
    overflow-y: auto;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

#room-view.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.98);
    display: none;
}

/* Løst-banner ved fullført rom */
.room-solved-banner {
    position: absolute;
    top: 20px;
    background: linear-gradient(90deg, rgba(197, 160, 89, 0.95) 0%, rgba(229, 201, 143, 0.98) 50%, rgba(197, 160, 89, 0.95) 100%);
    color: #1a1714;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    padding: 10px 32px;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    z-index: 40;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: bannerPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bannerPop {
    0% { transform: scale(0.6) translateY(-20px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes charFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-8px); }
}

/* BREV-PARKAMENTET / DIALOGBOKSEN */
.parchment-card {
    background: var(--parchment);
    color: var(--parchment-ink);
    border-radius: 10px;
    padding: 20px 22px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.75), inset 0 0 15px rgba(117, 98, 71, 0.3);
    border: 2px solid var(--parchment-border);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.parchment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px dashed rgba(117, 98, 71, 0.5);
    padding-bottom: 6px;
}

.speaker-badge {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: #632018;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.letter-date {
    font-family: var(--font-typewriter);
    font-size: 0.75rem;
    color: #615443;
}

.letter-body {
    font-family: var(--font-story);
    font-size: 0.98rem;
    line-height: 1.55;
    font-style: italic;
    min-height: 80px;
}

.letter-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.choice-btn {
    background: #dfcfb7;
    border: 1px solid #948066;
    color: #211c16;
    padding: 8px 14px;
    border-radius: 6px;
    font-family: var(--font-ui);
    font-size: 0.88rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.choice-btn:hover {
    background: #f5ece0;
    border-color: #632018;
    color: #632018;
    transform: translateX(4px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* HØYRE KOLONNE: OPPGAVEBORDET / OPERASJONSSENTRALEN */
#workspace-area {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 100%;
    z-index: 20;
}

.task-card {
    width: 100%;
    max-width: 820px;
    background: var(--panel-dark);
    border: 2px solid var(--panel-border);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(197, 160, 89, 0.1);
    backdrop-filter: blur(12px);
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeIn 0.4s ease;
}

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

.task-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid rgba(197, 160, 89, 0.25);
    padding-bottom: 12px;
}

.task-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.task-act-tag {
    font-family: var(--font-typewriter);
    font-size: 0.8rem;
    color: #a89f8d;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid rgba(197, 160, 89, 0.2);
}

.task-instructions {
    font-size: 0.95rem;
    color: #dfd7c8;
    line-height: 1.5;
}

/* ============================================================================
   ENKELTOPPGAVER
   ============================================================================ */

/* ROM 3: TRAIN LOGISTICS (2D TETRIS KNAPSACK) */
.train-logistics-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    width: 100%;
}

.wagons-wrapper {
    display: flex;
    gap: 36px;
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
}

.wagon-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(14, 18, 24, 0.85);
    padding: 14px 20px;
    border-radius: 10px;
    border: 1px solid rgba(197, 160, 89, 0.3);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
}

.wagon-title {
    font-family: var(--font-heading);
    color: var(--accent-gold);
    text-align: center;
    margin-bottom: 10px;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
}

.wagon-weight-badge {
    font-family: var(--font-typewriter);
    font-size: 0.85rem;
    color: #e5c98f;
    display: block;
    margin-top: 2px;
}

.wagon-box {
    width: 150px;
    height: 150px;
    background-color: #12151a;
    background-image:
        linear-gradient(rgba(197, 160, 89, 0.25) 1px, transparent 1px),
        linear-gradient(90deg, rgba(197, 160, 89, 0.25) 1px, transparent 1px);
    background-size: 50px 50px;
    border: 3px solid #5a4b32;
    border-radius: 4px;
    position: relative;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.85);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.wagon-box.drag-over {
    background-color: rgba(197, 160, 89, 0.2);
    border-color: var(--accent-gold-light);
}

.cargo-docks-2d {
    width: 100%;
    max-width: 680px;
    min-height: 140px;
    background: rgba(10, 13, 18, 0.75);
    border: 2px dashed rgba(197, 160, 89, 0.35);
    border-radius: 8px;
    padding: 14px;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: center;
}

.cargo-docks-2d.drag-over {
    background-color: rgba(197, 160, 89, 0.15);
}

.crate-2d {
    position: relative;
    cursor: grab;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-family: var(--font-typewriter);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.25;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6), inset 0 0 10px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(0, 0, 0, 0.8);
    border-radius: 4px;
    user-select: none;
    box-sizing: border-box;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    z-index: 10;
}

.crate-2d:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.8);
}

.crate-2d:active {
    cursor: grabbing;
    z-index: 30;
    opacity: 0.85;
}

.crate-2x2 { width: 100px; height: 100px; }
.crate-3x1 { width: 150px; height: 50px; }
.crate-1x3 { width: 50px; height: 150px; }
.crate-2x1 { width: 100px; height: 50px; }
.crate-1x2 { width: 50px; height: 100px; }
.crate-1x1 { width: 50px; height: 50px; }

/* ROM 4: KJØTTKVERNA – MASKINGEVÆR-FORSVARET */
.mg-game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 960px;
    gap: 10px;
    box-sizing: border-box;
}

.mg-canvas-container {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.9), 0 0 0 2px rgba(197, 160, 89, 0.4);
    background: #111418;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

#mg-canvas {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    cursor: crosshair;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

@media (max-height: 720px) {
    .mg-canvas-container {
        max-height: 50vh;
        width: auto;
        margin: 0 auto;
    }
    #mg-canvas {
        max-height: 50vh;
        width: auto;
        margin: 0 auto;
    }
    .mg-hud-bar {
        padding: 4px 10px;
        gap: 6px;
    }
    .mg-gauge-group {
        padding: 2px 6px;
    }
}

.mg-hud-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
    background: rgba(12, 16, 22, 0.92);
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid rgba(197, 160, 89, 0.3);
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.mg-gauge-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 140px;
}

.mg-gauge-info {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 0.76rem;
    color: #e5e5e5;
}

.mg-bar-track,
.mg-heat-bar-track {
    width: 100%;
    height: 8px;
    background: #1a1e24;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #444;
}

.mg-heat-bar-fill {
    height: 100%;
    width: 20%;
    background: linear-gradient(90deg, #4caf50 0%, #ff9800 65%, #f44336 100%);
    transition: width 0.1s ease;
}

.mg-wave-group {
    flex: 0 0 auto;
    min-width: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.mg-hud-label {
    font-family: var(--font-heading);
    color: var(--accent-gold);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.mg-wave-val {
    font-family: var(--font-typewriter);
    font-size: 1.15rem;
    font-weight: bold;
    color: #fff;
}

.mg-hud-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.mg-cool-btn {
    background: linear-gradient(180deg, #2b4c7e 0%, #1a3052 100%);
    color: #e0f2fe;
    border: 1px solid #60a5fa;
    padding: 7px 14px;
    border-radius: 6px;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: all 0.15s ease;
    white-space: nowrap;
    touch-action: manipulation;
}

.mg-cool-btn:hover {
    background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
    transform: translateY(-1px);
}

.mg-cool-btn:active {
    transform: translateY(1px);
}

.mg-footer-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    font-size: 0.82rem;
    color: #b0a897;
    gap: 10px;
    flex-wrap: wrap;
}

.mg-controls-hint {
    font-family: var(--font-typewriter);
    color: var(--accent-gold);
    white-space: nowrap;
}

.mg-btn-text-short,
.mg-gauge-lbl-short {
    display: none;
}
.mg-btn-text-full,
.mg-gauge-lbl-full {
    display: inline;
}

/* Responsive regler for smalere skjermer og mobil */
@media (max-width: 768px) {
    .mg-hud-bar {
        padding: 8px 10px;
        gap: 8px;
    }
    .mg-gauge-group {
        min-width: 120px;
    }
    .mg-cool-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    .mg-footer-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .mg-controls-hint {
        white-space: normal;
        font-size: 0.75rem;
    }
}

@media (max-width: 520px) {
    .mg-btn-text-full,
    .mg-gauge-lbl-full {
        display: none;
    }
    .mg-btn-text-short,
    .mg-gauge-lbl-short {
        display: inline;
    }
    .mg-hud-bar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        padding: 6px 8px;
        width: 100%;
        box-sizing: border-box;
    }
    .mg-wave-group {
        grid-column: 1 / -1;
        justify-content: center;
        padding-bottom: 3px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    .mg-gauge-group {
        min-width: 0;
        width: 100%;
        overflow: hidden;
    }
    .mg-gauge-info {
        font-size: 0.68rem;
        white-space: nowrap;
        gap: 2px;
    }
    .mg-gauge-info span {
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .mg-hud-actions {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        width: 100%;
        min-width: 0;
    }
    .mg-cool-btn,
    #mg-btn-hint {
        width: 100%;
        min-width: 0;
        justify-content: center;
        text-align: center;
        padding: 6px 4px !important;
        font-size: 0.68rem !important;
        letter-spacing: -0.01em;
        white-space: nowrap;
        box-sizing: border-box;
    }
}

/* 1. KODELÅS & MOBILISERINGSSKRIN (SARAJEVO 1914) */
.sarajevo-desk-viewport {
    position: relative;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    min-height: 480px;
    border-radius: 8px;
    border: 2px solid #6b5538;
    background-image: url('assets/vn/bg_sarajevo_safe_desk.jpg');
    background-size: cover;
    background-position: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.9), inset 0 0 60px rgba(0,0,0,0.85);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    padding: 16px;
}

.sarajevo-hud-bar {
    background: rgba(16, 13, 10, 0.88);
    backdrop-filter: blur(2px);
    border: 1px solid rgba(197, 160, 89, 0.35);
    border-radius: 6px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.7);
}

.sarajevo-hud-title {
    font-family: var(--font-stencil, 'Arial Black', sans-serif);
    font-size: 1.15rem;
    letter-spacing: 1.5px;
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.9);
}

.sarajevo-hud-sub {
    font-size: 0.76rem;
    color: #b0a595;
    font-family: var(--font-typewriter, monospace);
    letter-spacing: 0.5px;
}

/* ============================================================================
   AUTENTISK 1914 MEKANISK MESSING-KOMBINASJONSLÅS (WAR DEPARTMENT / CHUBB & SONS)
   ============================================================================ */

.sarajevo-lock-assembly {
    align-self: center;
    background: 
        radial-gradient(circle at 50% 20%, rgba(212, 175, 85, 0.15) 0%, transparent 70%),
        linear-gradient(180deg, #423218 0%, #261b0c 45%, #181107 100%);
    border: 3px solid #6e5022;
    border-top: 3px solid #947137;
    border-bottom: 4px solid #140d04;
    border-radius: 4px;
    padding: 16px 24px 18px 24px;
    box-shadow: 
        0 14px 35px rgba(0, 0, 0, 0.95),
        inset 0 1px 0 rgba(255, 235, 170, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    max-width: 440px;
    width: 100%;
}

/* Mekaniske hjørnenagler i messing */
.sarajevo-lock-assembly::before,
.sarajevo-lock-assembly::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ecd29b 0%, #7d5e27 60%, #261a08 100%);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}
.sarajevo-lock-assembly::before { top: 8px; left: 8px; }
.sarajevo-lock-assembly::after { top: 8px; right: 8px; }

.sarajevo-lock-plate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 12px;
    font-family: var(--font-heading, 'Cinzel', serif);
    font-size: 0.76rem;
    font-weight: 700;
    color: #c9ab70;
    letter-spacing: 0.16em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 -1px 0 rgba(0, 0, 0, 0.7);
    border-bottom: 1px solid #4a3818;
    padding-bottom: 6px;
    text-transform: uppercase;
}

.safe-dial-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    background: rgba(10, 7, 4, 0.75);
    padding: 10px 14px;
    border: 2px solid #3d2c12;
    border-radius: 3px;
    box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.95);
}

.safe-dial {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

/* Mekaniske tannhjul / messingknapper for rulling */
.dial-btn {
    background: linear-gradient(180deg, #5a421b 0%, #35250e 100%);
    border: 1px solid #7c5c28;
    border-top: 1px solid #a37d3d;
    color: #dec89e;
    width: 48px;
    height: 24px;
    border-radius: 2px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s, transform 0.05s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 230, 160, 0.2);
}

.dial-btn:hover {
    background: linear-gradient(180deg, #6d5124 0%, #443013 100%);
    color: #fff2d1;
}

.dial-btn:active {
    transform: translateY(1px);
    background: #2a1c09;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.9);
}

/* Sylinderhjul i massiv børstet 1914-messing med dype inngraverte siffer */
.dial-window {
    width: 52px;
    height: 62px;
    background: linear-gradient(180deg, 
        #241808 0%, 
        #4f391a 12%, 
        #a88544 42%, 
        #dfc488 50%, 
        #a88544 58%, 
        #453114 88%, 
        #1a1005 100%
    );
    border: 2px solid #291c0a;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 
        inset 0 5px 8px rgba(0, 0, 0, 0.8),
        inset 0 -5px 8px rgba(0, 0, 0, 0.8),
        0 2px 6px rgba(0, 0, 0, 0.85);
    overflow: hidden;
    user-select: none;
}

/* Riflete kanter på messinghjulet (mekanisk rillemønster) */
.dial-window::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 2px;
    right: 2px;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 3px,
        rgba(0, 0, 0, 0.15) 3px,
        rgba(0, 0, 0, 0.15) 4px
    );
    pointer-events: none;
}

/* Inngravert / preget siffer i messing (ingen neon, ingen digital font!) */
.dial-digit {
    font-family: var(--font-heading, 'Cinzel', 'Playfair Display', serif);
    font-size: 2.1rem;
    font-weight: 900;
    color: #1e1306;
    text-shadow: 
        0 1px 1px rgba(255, 245, 210, 0.7),
        0 -1px 1px rgba(0, 0, 0, 0.85),
        1px 0 0 rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 2;
    letter-spacing: -0.02em;
}

/* Dokumentbryggen på bordet (Telegrammer, aviser, alliansekart) */
.sarajevo-docs-dock {
    background: rgba(14, 11, 8, 0.90);
    backdrop-filter: blur(2px);
    border: 1px solid rgba(197, 160, 89, 0.35);
    border-radius: 6px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.8);
    flex-wrap: wrap;
}

.sarajevo-clue-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(30, 24, 17, 0.95);
    border: 1px solid #735933;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #e5d9c5;
    font-family: var(--font-story, Georgia, serif);
    font-size: 0.82rem;
}

.sarajevo-clue-pill:hover {
    border-color: #ffd700;
    background: rgba(60, 48, 30, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.8);
}

.sarajevo-clue-pill .clue-icon {
    font-size: 1.2rem;
}

@media (max-height: 750px) {
    .sarajevo-desk-viewport {
        padding: 10px 12px;
        gap: 8px;
        min-height: auto;
    }
    .sarajevo-hud-bar {
        padding: 6px 12px;
    }
    .sarajevo-hud-title {
        font-size: 0.98rem;
    }
    .sarajevo-lock-assembly {
        padding: 10px 18px 12px 18px;
        max-width: 390px;
    }
    .sarajevo-lock-plate-header {
        margin-bottom: 6px;
        padding-bottom: 4px;
        font-size: 0.7rem;
    }
    .safe-dial-container {
        padding: 6px 10px;
        gap: 8px;
        margin: 6px 0 !important;
    }
    .dial-window {
        width: 46px;
        height: 52px;
    }
    .dial-digit {
        font-size: 1.8rem;
    }
    .dial-btn {
        width: 44px;
        height: 20px;
        font-size: 0.7rem;
    }
    .sarajevo-docs-dock {
        padding: 8px 12px;
        gap: 8px;
    }
    .sarajevo-clue-pill {
        padding: 5px 10px;
        font-size: 0.78rem;
    }
}

@media (max-width: 768px) {
    .sarajevo-hud-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .sarajevo-docs-dock {
        flex-direction: column;
        align-items: stretch;
    }
    .sarajevo-clue-pill {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Dokument modal for gransking av aviser og telegrammer */
.sarajevo-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(6, 5, 4, 0.88);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 60;
    padding: 20px;
    box-sizing: border-box;
    animation: fadeIn 0.2s ease;
}

.sarajevo-modal-card {
    background: #eedec3;
    color: #241d16;
    border: 3px solid #5a4225;
    border-radius: 6px;
    padding: 24px;
    max-width: 580px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.95), inset 0 0 30px rgba(100, 75, 40, 0.2);
    position: relative;
    font-family: var(--font-typewriter, monospace);
    line-height: 1.5;
}

.sarajevo-modal-header {
    border-bottom: 2px solid #5a4225;
    padding-bottom: 8px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sarajevo-modal-close-btn {
    background: #3b2c19;
    color: #ffd700;
    border: 1px solid #735933;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.85rem;
}

.sarajevo-modal-close-btn:hover {
    background: #ffd700;
    color: #000;
}

/* Kisteåpnings-overlay ved suksess (1914) */
.sarajevo-success-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(15, 12, 9, 0.96);
    border: 3px solid var(--accent-gold);
    border-radius: 10px;
    padding: 26px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 70;
    box-shadow: 0 0 60px rgba(0,0,0,0.98);
    animation: whistlePop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 540px;
    width: 90%;
}


/* 2. SENSUR AV FELTBREV */
.censor-paper {
    background: #e9dec8;
    color: #24201b;
    padding: 24px;
    border-radius: 8px;
    font-family: var(--font-typewriter);
    font-size: 1.02rem;
    line-height: 1.75;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.15);
    border: 1px solid #85745d;
}

.censor-word {
    display: inline-block;
    padding: 0 4px;
    margin: 1px;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.15s;
    user-select: none;
}

.censor-word:hover {
    background: rgba(163, 50, 38, 0.2);
}

.censor-word.censored {
    background: #111 !important;
    color: #111 !important;
}

/* 3. LOMMEUR (ZERO HOUR) */
.clock-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.pocket-watch {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, #f7f1e3 65%, #cbb998 100%);
    border: 8px solid #755f3f;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(0,0,0,0.3);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.watch-hand {
    position: absolute;
    bottom: 50%;
    left: calc(50% - 2px);
    width: 4px;
    background: #1f1b18;
    transform-origin: bottom center;
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.watch-hour { height: 48px; width: 5px; left: calc(50% - 2.5px); }
.watch-minute { height: 68px; background: #632018; }
.watch-center-pin { width: 12px; height: 12px; background: #755f3f; border-radius: 50%; z-index: 10; }

.analog-pocket-watch {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.analog-pocket-watch:hover {
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.85), inset 0 0 18px rgba(0,0,0,0.3) !important;
}

.analog-pocket-watch .hour-handle {
    transition: r 0.15s ease, filter 0.15s ease;
    cursor: grab;
}

.analog-pocket-watch .hour-handle:hover,
.analog-pocket-watch .hour-handle:active {
    filter: drop-shadow(0 0 6px rgba(197, 160, 89, 0.9));
    cursor: grabbing;
}

.analog-pocket-watch .minute-handle {
    transition: r 0.15s ease, filter 0.15s ease;
    cursor: grab;
}

.analog-pocket-watch .minute-handle:hover,
.analog-pocket-watch .minute-handle:active {
    filter: drop-shadow(0 0 8px rgba(230, 81, 0, 0.95));
    cursor: grabbing;
}

/* 4. RADIOPEILING (102.5 MHz) */
.radio-tuner-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 10px;
    border: 1px solid rgba(197, 160, 89, 0.25);
    width: 100%;
}

.radio-slider {
    width: 100%;
    max-width: 500px;
    accent-color: var(--accent-gold);
    cursor: pointer;
}

.radio-frequency-display {
    font-family: var(--font-typewriter);
    font-size: 1.8rem;
    font-weight: bold;
    color: #e8d09b;
    text-shadow: 0 0 10px rgba(232, 208, 155, 0.4);
}

/* KNAPPER FOR OPPGAVEINNSENDING */
.action-btn {
    background: linear-gradient(180deg, #c5a059 0%, #9e7f40 100%);
    color: #111;
    border: 1px solid #deb86d;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: linear-gradient(180deg, #dfbc74 0%, #b3924f 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(197, 160, 89, 0.3);
}

.feedback-msg {
    min-height: 24px;
    font-size: 0.9rem;
    text-align: center;
    font-weight: 600;
}

.feedback-msg.error { color: #e66b5b; }
.feedback-msg.success { color: #5fd487; }

/* ============================================================================
   THE TRENCH CHRONICLE (AVISEN - SLUTTSKJERM)
   ============================================================================ */
.newspaper-wrapper {
    background: #e8dfcf;
    color: #1a1714;
    padding: 36px 44px;
    border-radius: 4px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.85);
    border: 3px double #3b3329;
    max-width: 820px;
    width: 100%;
}

.newspaper-masthead {
    text-align: center;
    border-bottom: 2px solid #1a1714;
    padding-bottom: 14px;
    margin-bottom: 16px;
}

.masthead-title {
    font-family: var(--font-heading);
    font-size: 2.6rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.masthead-meta {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-typewriter);
    font-size: 0.8rem;
    margin-top: 6px;
    border-top: 1px solid #1a1714;
    padding-top: 4px;
}

.headline-main {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 14px;
    color: #5c1810;
}

.article-lead {
    font-family: var(--font-story);
    font-size: 1.12rem;
    line-height: 1.6;
    margin-bottom: 20px;
    font-style: italic;
}

.stats-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    background: #ded4c1;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #9e8e76;
    margin-bottom: 20px;
}

.summary-stat {
    text-align: center;
}

.stat-num {
    font-family: var(--font-typewriter);
    font-size: 1.4rem;
    font-weight: bold;
    color: #1a1714;
}

.stat-name {
    font-size: 0.72rem;
    text-transform: uppercase;
    color: #5a5042;
    font-weight: 600;
}

/* RESPONSIVITET FOR MINDRE SKJERMER / CHROMEBOOKS */
@media (max-width: 1024px) {
    #main-stage {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        padding: 16px;
        overflow-y: auto;
    }

    .character-display {
        height: 180px;
    }

    #narrative-sidebar {
        height: auto;
    }
}

/* ============================================================================
   ROM 7: PIGGTRÅDSPERRINGEN I INGENMANNSLAND
   ============================================================================ */

.wire-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
    background: rgba(18, 14, 10, 0.85);
    border: 1px solid rgba(197, 160, 89, 0.35);
    border-radius: 6px;
    padding: 8px 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
}

/* Evans krater-dialog (Kryp tilbake for råd) */
.evans-crater-dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(4, 3, 2, 0.88);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

.evans-crater-dialog-box {
    background: #191410 url('assets/vn/bg_crater_night.jpg') center center / cover no-repeat;
    border: 2px solid var(--accent-gold);
    border-radius: 10px;
    max-width: 620px;
    width: 100%;
    padding: 24px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.95), inset 0 0 70px rgba(0, 0, 0, 0.92);
    position: relative;
    color: #e5dccb;
    box-sizing: border-box;
    animation: scaleUp 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.evans-crater-header {
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid rgba(197, 160, 89, 0.35);
    padding-bottom: 12px;
    margin-bottom: 14px;
}

.evans-crater-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: url('assets/vn/evans_engineer.png') center top / cover no-repeat, #222;
    border: 2px solid var(--accent-gold);
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
}

.evans-crater-title {
    font-family: var(--font-heading);
    color: var(--accent-gold);
    font-size: 1.15rem;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.evans-crater-sub {
    font-family: var(--font-story);
    font-size: 0.82rem;
    color: #b0a897;
    font-style: italic;
}

.evans-crater-body {
    font-family: var(--font-story);
    font-size: 0.96rem;
    line-height: 1.6;
    color: #f0e6d6;
    background: rgba(10, 8, 6, 0.85);
    padding: 16px 20px;
    border-radius: 6px;
    border: 1px solid rgba(197, 160, 89, 0.25);
    margin-bottom: 18px;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.6);
}

.evans-crater-body p {
    margin: 8px 0;
}

.evans-crater-actions {
    display: flex;
    justify-content: flex-end;
}

.wire-stage-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 520px;
    border-radius: 8px;
    border: 2px solid #8e7343;
    background-color: #0b0f14;
    background-image: url('assets/vn/bg_wire_obstacle_night.jpg');
    background-size: cover;
    background-position: center;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.9), inset 0 0 60px rgba(0,0,0,0.85);
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='none' stroke='%23ffd700' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='6' cy='6' r='3'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Cline x1='20' y1='4' x2='8.12' y2='15.88'/%3E%3Cline x1='14.47' y1='14.48' x2='20' y2='20'/%3E%3Cline x1='8.12' y1='8.12' x2='12' y2='12'/%3E%3C/svg%3E") 12 12, crosshair;
}

/* Lysbluss-overlay ved feil */
.wire-flare-flash {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 15%, rgba(255,255,255,1) 0%, rgba(255,248,220,0.92) 40%, rgba(255,255,255,0.7) 100%);
    opacity: 0;
    pointer-events: none;
    z-index: 50;
    transition: opacity 0.15s ease-out;
}

.wire-flare-flash.active {
    opacity: 1;
}

/* Kulsprøytesporlys (Tracer bullets) som feier over natthimmelen ved alarm */
.wire-tracer-line {
    position: absolute;
    height: 3px;
    width: 120px;
    background: linear-gradient(90deg, transparent, #ff2200 40%, #ffcc00 80%, #fff 100%);
    box-shadow: 0 0 12px #ff4400, 0 0 20px #ffaa00;
    opacity: 0;
    pointer-events: none;
    z-index: 55;
}

.wire-flare-flash.active ~ .wire-tracer-line-1 {
    top: 32%;
    left: -150px;
    animation: tracerSweep1 0.28s linear infinite;
}

.wire-flare-flash.active ~ .wire-tracer-line-2 {
    top: 42%;
    left: -150px;
    animation: tracerSweep2 0.32s 0.08s linear infinite;
}

.wire-flare-flash.active ~ .wire-tracer-line-3 {
    top: 26%;
    left: -150px;
    animation: tracerSweep1 0.30s 0.14s linear infinite;
}

@keyframes tracerSweep1 {
    0% { transform: translate(0, 0); opacity: 1; }
    100% { transform: translate(1200px, 35px); opacity: 0; }
}

@keyframes tracerSweep2 {
    0% { transform: translate(0, 0); opacity: 1; }
    100% { transform: translate(1200px, 20px); opacity: 0; }
}

/* Interaktive tråd-soner */
.wire-target-zone {
    position: absolute;
    cursor: pointer;
    z-index: 25;
    transition: all 0.25s ease;
}

.wire-target-zone:hover .wire-line-tripwire,
.wire-target-zone:hover .wire-line-tension,
.wire-target-zone:hover .wire-line-concertina {
    filter: drop-shadow(0 0 10px #ffd54f) brightness(1.35);
}

/* Fosforiserende nattglød når hint er kjøpt */
.wire-target-zone.wire-hint-glow .wire-line-tripwire,
.wire-target-zone.wire-hint-glow .wire-line-tension,
.wire-target-zone.wire-hint-glow .wire-line-concertina {
    filter: drop-shadow(0 0 14px #4caf50) drop-shadow(0 0 30px #69db7c) brightness(1.7) !important;
    animation: wirePhosphorGlow 1.2s ease-in-out infinite alternate !important;
}

.wire-target-zone.wire-hint-glow .wire-coil-ring {
    border-color: #69db7c !important;
    box-shadow: 0 0 20px #69db7c, inset 0 0 14px #4caf50 !important;
    animation: wirePhosphorGlow 1.2s ease-in-out infinite alternate !important;
}

@keyframes wirePhosphorGlow {
    0% { filter: drop-shadow(0 0 8px #4caf50) drop-shadow(0 0 16px #69db7c) brightness(1.3); }
    100% { filter: drop-shadow(0 0 22px #69db7c) drop-shadow(0 0 45px #a5d6a7) brightness(2.1); }
}

.wire-target-zone:hover .wire-hover-tag {
    display: none !important;
}

.wire-hover-tag {
    display: none !important;
}

/* Visuell tråd 1: Snubletråd med bjeller og bokser (Bunn) */
.wire-zone-tripwire {
    bottom: 20%;
    left: 2%;
    width: 96%;
    height: 75px;
    display: flex;
    align-items: center;
}

.wire-zone-tripwire .wire-hover-tag {
    top: -36px;
    left: 28%;
}

.wire-line-tripwire {
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #444 0%, #ddd 25%, #888 50%, #ddd 75%, #333 100%);
    box-shadow: 0 0 8px rgba(0,0,0,0.95);
    position: relative;
    transition: all 0.4s ease;
}

.wire-bell-glow-marker {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px dashed rgba(255, 215, 0, 0.6);
    background: rgba(255, 215, 0, 0.12);
    pointer-events: none;
    animation: markerPulse 2s infinite ease-in-out;
}

@keyframes markerPulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.18); opacity: 1; }
}

/* Visuell tråd 2: Rusten støttewire (Diagonal) */
.wire-zone-tension {
    top: 8%;
    right: 5%;
    width: 78%;
    height: 76%;
}

.wire-zone-tension .wire-hover-tag {
    top: 38%;
    left: 42%;
}

.wire-line-tension {
    position: absolute;
    width: 110%;
    height: 9px;
    top: 50%;
    left: -5%;
    transform: rotate(32deg);
    background: repeating-linear-gradient(45deg, #5a3d28, #9e7552 6px, #362518 12px);
    box-shadow: 0 0 12px rgba(0,0,0,0.95);
    border-radius: 4px;
    transform-origin: top right;
    transition: all 0.4s ease;
}

/* Visuell tråd 3: Concertina kveil (Midt/topp) */
.wire-zone-concertina {
    top: 14%;
    left: 8%;
    width: 52%;
    height: 130px;
}

.wire-zone-concertina .wire-hover-tag {
    top: -14px;
    left: 20%;
}

.wire-line-concertina {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-around;
    position: relative;
    transition: all 0.4s ease;
}

.wire-coil-ring {
    width: 82px;
    height: 82px;
    border: 4px solid #7a6e60;
    border-radius: 50%;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8), 0 0 8px rgba(0,0,0,0.8);
    position: relative;
}

.wire-coil-ring::before, .wire-coil-ring::after {
    content: "✖";
    position: absolute;
    font-size: 14px;
    color: #9e8e7a;
}
.wire-coil-ring::before { top: -8px; left: 32px; }
.wire-coil-ring::after { bottom: -8px; left: 32px; }

/* Kuttet tilstand på tråder */
.wire-cut.wire-zone-tripwire .wire-line-tripwire {
    opacity: 0.25;
    transform: translateY(22px);
    filter: grayscale(1);
}

.wire-cut.wire-zone-tension .wire-line-tension {
    opacity: 0.28;
    transform: rotate(45deg) translateY(45px);
    filter: grayscale(1);
}

.wire-cut.wire-zone-concertina .wire-line-concertina {
    opacity: 0.25;
    transform: scale(0.82);
    filter: grayscale(1);
}

/* Statusindikatorer på trådene */
.wire-status-badge {
    position: absolute;
    background: #1b381d;
    border: 1px solid #4caf50;
    color: #a5d6a7;
    font-family: var(--font-typewriter, monospace);
    font-size: 0.78rem;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 4px;
    display: none;
    box-shadow: 0 3px 10px rgba(0,0,0,0.9);
    z-index: 40;
    animation: badgePop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes badgePop {
    0% { transform: scale(0.6); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.wire-cut .wire-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Evans' tilbakemeldings- og rådgivningsstripe */
.wire-feedback-strip {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(18, 22, 28, 0.95);
    border: 1px solid rgba(197, 160, 89, 0.35);
    border-radius: 8px;
    padding: 12px 18px;
    margin-top: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.6);
}

.wire-evans-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--accent-gold);
    background-image: url('assets/vn/evans_engineer.png');
    background-size: 150%;
    background-position: center 15%;
    flex-shrink: 0;
    box-shadow: 0 0 12px rgba(0,0,0,0.9);
}

.wire-feedback-text {
    flex: 1;
    font-family: var(--font-typewriter, monospace);
    font-size: 0.88rem;
    color: #dcd0bf;
    line-height: 1.45;
}


/* ==========================================================================
   ROM 8B: GASSKRISEN & FORSEGLING AV DYPBUNKEREN (11. NOV KL. 10:48 - 11:00)
   ========================================================================== */
.gas-crisis-container {
    background: #141619;
    border: 2px solid #5a4a28;
    border-radius: 10px;
    padding: 16px 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.85);
    position: relative;
    max-width: 1060px;
    width: 100%;
    margin: 0 auto;
}

.gas-stage-viewport {
    position: relative;
    width: 100%;
    height: 520px;
    border-radius: 8px;
    overflow: hidden;
    background: #100f0d url('assets/vn/bg_bunker_gas_crisis.jpg') center center / cover no-repeat;
    border: 2px solid #3d3529;
    box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.9), 0 8px 25px rgba(0, 0, 0, 0.7);
    user-select: none;
}

/* Grønn-gul klorgasståke som pulserer og driver gjennom bunkeren */
.gas-haze-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 45% 55%, rgba(130, 185, 45, 0.42) 0%, rgba(90, 140, 30, 0.28) 45%, rgba(10, 15, 5, 0.5) 100%);
    mix-blend-mode: screen;
    animation: gasMistDrift 4s ease-in-out infinite alternate;
    z-index: 10;
    transition: opacity 1.5s ease;
}

.gas-haze-overlay.cleared {
    opacity: 0 !important;
}

@keyframes gasMistDrift {
    0% { opacity: 0.65; transform: scale(1) translateY(0); filter: blur(2px); }
    50% { opacity: 0.90; transform: scale(1.03) translateY(-6px); filter: blur(5px); }
    100% { opacity: 0.75; transform: scale(1.01) translateY(4px); filter: blur(3px); }
}

/* Gassgranat-støt og alarm */
.gas-alarm-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, #5c1818 0%, #2a0a0a 100%);
    border: 1px solid #ff4444;
    border-radius: 6px;
    padding: 8px 16px;
    margin-bottom: 10px;
    color: #ffdddd;
    font-family: var(--font-heading);
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.3);
    animation: alarmPulse 1.8s infinite;
}

@keyframes alarmPulse {
    0%, 100% { border-color: #ff4444; box-shadow: 0 0 15px rgba(255, 68, 68, 0.3); }
    50% { border-color: #ffbb33; box-shadow: 0 0 25px rgba(255, 187, 51, 0.5); }
}

/* ==========================================================================
   GASSMASKE FIRST-PERSON HUD (Linsene foran øynene)
   ========================================================================== */
.gasmask-hud-frame {
    position: absolute;
    inset: 0;
    pointer-events: none !important;
    z-index: 30;
    transition: opacity 0.8s ease, transform 0.8s ease;
    animation: breathingBob 3.6s ease-in-out infinite;
}

@keyframes breathingBob {
    0%, 100% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.018) translateY(-4px); }
}

.gasmask-hud-svg,
.gasmask-hud-svg * {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none !important;
}

/* ==========================================================================
   FASE 1: Feltbord i bunkeren med fysiske deler (Før masken tas på)
   ========================================================================== */
.bunker-table-workbench {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 860px;
    background: rgba(16, 13, 10, 0.92);
    border: 2px solid var(--accent-gold);
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 16px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.9);
    z-index: 25;
    backdrop-filter: blur(5px);
}

.table-workbench-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.table-plug-card, .table-hose-card {
    background: rgba(26, 21, 16, 0.88);
    border: 1px solid rgba(197, 160, 89, 0.4);
    border-radius: 8px;
    padding: 10px 10px;
    width: 100%;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.table-plug-card:hover, .table-hose-card:hover {
    border-color: var(--accent-gold);
    transform: scale(1.04);
    box-shadow: 0 4px 18px rgba(255, 215, 0, 0.35);
}

.table-plug-card.ready, .table-hose-card.ready {
    border-color: #2e7d32;
    background: rgba(18, 34, 18, 0.92);
}

.table-card-label {
    font-family: var(--font-heading);
    font-size: 0.76rem;
    font-weight: bold;
    color: #e5d8be;
    letter-spacing: 0.04em;
    margin-top: 6px;
}

/* Visuelle komponenter på bordet */
.canister-visual {
    width: 85px;
    height: 95px;
    position: relative;
    background: linear-gradient(180deg, #3a4146 0%, #22282d 60%, #15191d 100%);
    border: 2px solid #5a646c;
    border-radius: 8px;
    margin: 4px auto;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.85), 0 4px 12px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 6px 4px;
}

.canister-ribs {
    width: 85%;
    height: 3px;
    background: #4a545c;
    border-radius: 2px;
    box-shadow: 0 8px 0 #4a545c, 0 16px 0 #4a545c;
}

.red-transport-plug {
    width: 50px;
    height: 24px;
    background: radial-gradient(circle, #ff3333 0%, #b30000 100%);
    border: 2px solid #ff7777;
    border-radius: 4px;
    color: #fff;
    font-family: var(--font-typewriter);
    font-size: 0.62rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 14px rgba(255, 50, 50, 0.85);
    animation: plugWarningGlow 1.2s infinite alternate;
}

@keyframes plugWarningGlow {
    0% { transform: scale(0.96); box-shadow: 0 0 8px rgba(255, 50, 50, 0.6); }
    100% { transform: scale(1.08); box-shadow: 0 0 20px rgba(255, 80, 80, 1); }
}

.intake-open-mesh {
    width: 52px;
    height: 22px;
    background: repeating-linear-gradient(45deg, #111, #111 2px, #333 2px, #333 4px);
    border: 1px solid #69db7c;
    border-radius: 3px;
    color: #69db7c;
    font-family: var(--font-typewriter);
    font-size: 0.62rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hose-visual {
    width: 90px;
    height: 95px;
    position: relative;
    margin: 4px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hose-ribbed-body {
    width: 76px;
    height: 52px;
    background: repeating-linear-gradient(90deg, #1f1d19, #1f1d19 4px, #3a3732 4px, #3a3732 8px);
    border-radius: 26px;
    border: 2px solid #4a453e;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.9), 0 4px 12px rgba(0,0,0,0.7);
}

.hose-collar {
    margin-top: 4px;
    font-family: var(--font-typewriter);
    font-size: 0.68rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
}

.hose-collar.loose {
    background: rgba(180, 50, 50, 0.4);
    color: #ff9999;
    border: 1px dashed #ff4444;
}

.hose-collar.fastened {
    background: rgba(40, 140, 60, 0.4);
    color: #88ff99;
    border: 1px solid #44cc66;
}

.table-gasmask-hotspot {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.table-gasmask-hotspot:hover {
    transform: scale(1.08);
}

.table-gasmask-img {
    width: 140px;
    height: auto;
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.6)) drop-shadow(0 10px 20px rgba(0,0,0,0.8));
    animation: maskPromptBounce 2s ease-in-out infinite;
}

.table-gasmask-badge {
    margin-top: 6px;
    background: #554832;
    color: #c4b59d;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: bold;
    letter-spacing: 0.05em;
    padding: 5px 14px;
    border-radius: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.7);
    white-space: nowrap;
    border: 1px solid #7d6545;
}

.table-gasmask-badge.ready {
    background: linear-gradient(180deg, #ffb300 0%, #ff8f00 100%);
    color: #111;
    border-color: #ffe082;
    box-shadow: 0 0 16px rgba(255, 179, 0, 0.8);
    animation: badgePulse 1.4s infinite alternate;
}

@keyframes badgePulse {
    0% { transform: scale(0.97); }
    100% { transform: scale(1.05); }
}

/* ==========================================================================
   FASE 2: Fysisk rørgate med roterbare messinghjul & analogt manometer
   ========================================================================== */
.pipes-rack {
    position: absolute;
    top: 40px;
    left: 25px;
    right: 255px;
    display: flex;
    justify-content: space-around;
    gap: 16px;
    z-index: 20;
}

.pipe-valve-card {
    background: rgba(18, 22, 26, 0.90);
    border: 2px solid #5a4b36;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 175px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.8);
    backdrop-filter: blur(4px);
    transition: border-color 0.3s, transform 0.2s;
    cursor: pointer;
}

.pipe-valve-card:hover {
    border-color: var(--accent-gold);
    transform: translateY(-2px);
}

.pipe-valve-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.pipe-num {
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: bold;
    color: var(--accent-gold);
}

.pipe-valve-title {
    font-family: var(--font-typewriter);
    font-size: 0.76rem;
    color: #c4b59d;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.pipe-delta-tag {
    font-family: var(--font-typewriter);
    font-size: 0.68rem;
    color: #ffdd88;
    background: rgba(0,0,0,0.5);
    padding: 2px 6px;
    border-radius: 3px;
    margin-bottom: 4px;
}

.pipe-wheel-wrapper {
    position: relative;
    width: 110px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px 0;
    cursor: pointer;
}

.pipe-valve-wheel-img {
    width: 96px;
    height: 96px;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.9));
    transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
    user-select: none;
}

.pipe-wheel-wrapper:hover .pipe-valve-wheel-img {
    transform: scale(1.08);
    filter: drop-shadow(0 0 14px rgba(255, 215, 0, 0.6)) drop-shadow(0 4px 10px rgba(0,0,0,0.9));
}

.gas-steam-plume {
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 65px;
    height: 80px;
    background: radial-gradient(ellipse at bottom, rgba(160, 220, 50, 0.6) 0%, rgba(110, 170, 30, 0.3) 50%, transparent 80%);
    filter: blur(6px);
    animation: steamHissAnim 0.7s infinite alternate;
    pointer-events: none;
    z-index: 5;
    transition: opacity 0.4s ease;
}

@keyframes steamHissAnim {
    0% { transform: translateX(-50%) scale(0.9) translateY(0); opacity: 0.55; }
    100% { transform: translateX(-48%) scale(1.15) translateY(-8px); opacity: 0.85; }
}

.pipe-valve-status {
    font-family: var(--font-typewriter);
    font-size: 0.74rem;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    margin-top: 4px;
    text-align: center;
    width: 100%;
}

.pipe-valve-status.open {
    background: rgba(180, 40, 40, 0.35);
    color: #ff6b6b;
    border: 1px solid #b42828;
}

.pipe-valve-status.closed {
    background: rgba(40, 140, 60, 0.35);
    color: #69db7c;
    border: 1px solid #2b8a3e;
}

.wheel-turn-hint {
    font-family: var(--font-typewriter);
    font-size: 0.64rem;
    color: #887d6e;
    margin-top: 3px;
}

/* Manometer på veggen */
.bunker-manometer-station {
    position: absolute;
    top: 35px;
    right: 25px;
    width: 215px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 22;
    background: rgba(14, 12, 10, 0.92);
    border: 2px solid #8e7343;
    border-radius: 8px;
    padding: 10px 12px;
    box-shadow: 0 6px 22px rgba(0,0,0,0.85);
    backdrop-filter: blur(4px);
}

.manometer-title {
    font-family: var(--font-heading);
    color: #ffdd88;
    font-size: 0.80rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.manometer-bezel {
    position: relative;
    width: 155px;
    height: 155px;
    border-radius: 50%;
    background: radial-gradient(circle, #2a2216 0%, #120e0a 80%, #000 100%);
    border: 4px solid #c5a059;
    box-shadow: 0 6px 20px rgba(0,0,0,0.9), inset 0 0 25px rgba(0,0,0,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px 0;
}

.manometer-svg {
    width: 145px;
    height: 145px;
}

.manometer-readout {
    font-family: var(--font-typewriter);
    font-size: 1.25rem;
    font-weight: bold;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

.manometer-readout.danger {
    color: #ff5555;
    text-shadow: 0 0 10px rgba(255, 85, 85, 0.6);
}

.manometer-readout.caution {
    color: #ffcc00;
}

.manometer-readout.safe {
    color: #69db7c;
    text-shadow: 0 0 12px rgba(105, 219, 124, 0.8);
}

.manometer-status-pill {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 12px;
    margin-top: 2px;
    text-transform: uppercase;
    text-align: center;
}

.manometer-status-pill.danger {
    background: rgba(180, 40, 40, 0.4);
    color: #ff7777;
    border: 1px solid #ff4444;
}

.manometer-status-pill.caution {
    background: rgba(180, 140, 40, 0.4);
    color: #ffdd66;
    border: 1px solid #ffcc00;
}

.manometer-status-pill.safe {
    background: rgba(40, 140, 60, 0.4);
    color: #88ff99;
    border: 1px solid #44cc66;
    animation: safePulse 1.5s infinite;
}

.bunker-lock-lever-btn {
    width: 100%;
    margin-top: 10px;
    padding: 8px 12px;
    background: linear-gradient(180deg, #3d3122 0%, #1c160f 100%);
    border: 2px solid #8e7343;
    border-radius: 6px;
    color: #c4b59d;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: bold;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.7);
}

.bunker-lock-lever-btn.ready-to-lock {
    background: linear-gradient(180deg, #2e7d32 0%, #1b5e20 100%);
    border-color: #69db7c;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(105, 219, 124, 0.6);
    animation: leverGlowPulse 1.6s infinite;
}

@keyframes leverGlowPulse {
    0%, 100% { box-shadow: 0 0 12px rgba(105, 219, 124, 0.5); }
    50% { box-shadow: 0 0 25px rgba(105, 219, 124, 0.9); }
}

.bunker-lock-lever-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.15);
}

/* ==========================================================================
   FASE 3: Kjemisk apotekhylle & bunkerdør
   ========================================================================== */
.bunker-chemistry-station {
    position: absolute;
    top: 25px;
    left: 25px;
    right: 260px;
    bottom: 25px;
    background: rgba(14, 12, 10, 0.92);
    border: 2px solid #8e7343;
    border-radius: 10px;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 8px 30px rgba(0,0,0,0.85);
    z-index: 22;
    backdrop-filter: blur(4px);
}

.war-office-notice {
    background: linear-gradient(135deg, #fcf6ea 0%, #ede3cc 100%);
    color: #1a1612;
    padding: 10px 14px;
    border-radius: 4px;
    border: 2px solid #8e7343;
    border-left: 6px solid #8b0000;
    margin-bottom: 8px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.6);
}

.war-office-notice-title {
    font-family: var(--font-heading);
    font-weight: bold;
    font-size: 0.82rem;
    letter-spacing: 0.05em;
    color: #8b0000;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.war-office-notice-text {
    font-family: var(--font-typewriter);
    font-size: 0.78rem;
    line-height: 1.4;
    color: #2b2216;
}

.chemical-bottles-shelf {
    display: flex;
    justify-content: space-around;
    gap: 14px;
    padding: 8px 0;
}

.antique-bottle-container {
    flex: 1;
    background: rgba(20, 17, 13, 0.85);
    border: 1px solid rgba(197, 160, 89, 0.35);
    border-radius: 8px;
    padding: 10px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.antique-bottle-container:hover {
    transform: translateY(-6px);
    border-color: var(--accent-gold);
    box-shadow: 0 8px 22px rgba(255, 215, 0, 0.35);
}

.antique-bottle-container.active {
    border-color: #69db7c;
    box-shadow: 0 0 25px rgba(105, 219, 124, 0.7);
    background: rgba(18, 36, 20, 0.92);
}

.bottle-visual {
    width: 65px;
    height: 95px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 6px;
}

.bottle-cork {
    width: 22px;
    height: 14px;
    background: linear-gradient(90deg, #8b6b47 0%, #b8976a 50%, #705232 100%);
    border-radius: 3px 3px 1px 1px;
    border: 1px solid #5a4023;
}

.bottle-neck {
    width: 18px;
    height: 18px;
    border-left: 2px solid rgba(255,255,255,0.3);
    border-right: 2px solid rgba(0,0,0,0.5);
}

.bottle-body {
    width: 58px;
    height: 63px;
    border-radius: 6px 6px 10px 10px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 15px rgba(0,0,0,0.7), inset 0 0 10px rgba(0,0,0,0.5);
    overflow: hidden;
}

/* Glass Blue (Water) */
.glass-water .bottle-neck { background: rgba(80, 150, 210, 0.4); }
.glass-water .bottle-body {
    background: linear-gradient(135deg, rgba(140, 195, 240, 0.55) 0%, rgba(30, 80, 140, 0.7) 100%);
    border: 2px solid rgba(140, 200, 255, 0.4);
}

/* Glass Amber (Hypo - Natriumtiosulfat) */
.glass-hypo .bottle-neck { background: rgba(200, 120, 30, 0.5); }
.glass-hypo .bottle-body {
    background: linear-gradient(135deg, rgba(230, 150, 40, 0.65) 0%, rgba(120, 60, 10, 0.85) 100%);
    border: 2px solid rgba(240, 170, 60, 0.5);
    box-shadow: 0 0 12px rgba(230, 140, 30, 0.4);
}

/* Tin Paraffin */
.tin-paraffin .bottle-neck { background: #555; }
.tin-paraffin .bottle-body {
    background: linear-gradient(135deg, #444 0%, #1a1a1a 100%);
    border: 2px solid #777;
}

.bottle-paper-label {
    background: #f7eed7;
    color: #1a140e;
    font-family: var(--font-typewriter);
    font-size: 0.65rem;
    font-weight: bold;
    padding: 3px 4px;
    border-radius: 2px;
    border: 1px solid #7d6545;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.6);
    line-height: 1.15;
    z-index: 2;
    width: 82%;
}

.bottle-caption-text {
    font-family: var(--font-heading);
    font-size: 0.76rem;
    color: #e5d8be;
    letter-spacing: 0.03em;
    text-align: center;
}

/* Bunker heavy blast door zone */
.bunker-door-zone {
    position: absolute;
    top: 25px;
    right: 25px;
    bottom: 25px;
    width: 220px;
    border: 3px solid #3d3529;
    border-radius: 8px;
    background: #151310 url('assets/vn/bg_bunker_gas_crisis.jpg') right center / cover no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 12px 10px;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.9), 0 8px 25px rgba(0,0,0,0.85);
    z-index: 22;
    overflow: hidden;
}

.door-header-tag {
    font-family: var(--font-heading);
    font-size: 0.76rem;
    font-weight: bold;
    color: #ffdd88;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    background: rgba(0,0,0,0.6);
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid rgba(197, 160, 89, 0.4);
}

.door-steel-plate {
    width: 95%;
    height: 280px;
    background: linear-gradient(180deg, #24201a 0%, #14120e 100%);
    border: 3px solid #4a3e2e;
    border-radius: 6px;
    position: relative;
    box-shadow: inset 0 0 25px rgba(0,0,0,0.9), 0 4px 15px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.door-rivets-row {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    justify-content: space-between;
}

.door-rivet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle, #8e7343 0%, #3a2e1a 100%);
    box-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.door-heavy-handle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 5px solid #6b5636;
    background: radial-gradient(circle, #3a2f1e 0%, #15120c 100%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.9);
}

.bunker-door-gas-leak {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 85px;
    background: radial-gradient(ellipse at center bottom, rgba(165, 235, 45, 0.75) 0%, rgba(100, 165, 25, 0.45) 50%, transparent 85%);
    filter: blur(8px);
    animation: doorGasLeakAnim 1.4s infinite alternate;
    pointer-events: none;
    z-index: 10;
}

@keyframes doorGasLeakAnim {
    0% { opacity: 0.55; transform: scaleY(0.9); }
    100% { opacity: 0.90; transform: scaleY(1.18); }
}

.door-leak-warning {
    font-family: var(--font-typewriter);
    font-size: 0.72rem;
    font-weight: bold;
    color: #ff6b6b;
    text-align: center;
    background: rgba(0,0,0,0.65);
    padding: 3px 6px;
    border-radius: 4px;
    border: 1px solid #b42828;
}

.door-sealed-tag {
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: bold;
    color: #69db7c;
    text-align: center;
    background: rgba(18, 38, 18, 0.85);
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid #2b8a3e;
}

.wet-blanket-inv-item {
    position: relative;
    width: 100%;
    max-width: 440px;
    margin: 6px auto 0 auto;
    background: rgba(22, 18, 14, 0.94);
    border: 2px solid var(--accent-gold);
    border-radius: 8px;
    padding: 8px 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 16px;
    cursor: pointer;
    z-index: 25;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.85);
    transition: transform 0.25s, box-shadow 0.25s;
    animation: blanketPulse 2.2s infinite;
}

@keyframes blanketPulse {
    0%, 100% { box-shadow: 0 0 12px rgba(197, 160, 89, 0.4); }
    50% { box-shadow: 0 0 24px rgba(197, 160, 89, 0.85); }
}

.wet-blanket-inv-item:hover {
    transform: scale(1.03);
    border-color: #ffd54f;
}

.wet-blanket-inv-item.impregnated {
    border-color: #69db7c;
    box-shadow: 0 0 22px rgba(105, 219, 124, 0.7);
    background: rgba(18, 38, 20, 0.95);
}

.wet-blanket-img {
    width: 68px;
    height: auto;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.8));
    flex-shrink: 0;
}

.blanket-action-badge {
    font-family: var(--font-heading);
    font-size: 0.76rem;
    font-weight: bold;
    color: #ffdd88;
    text-align: center;
    letter-spacing: 0.04em;
}

.wet-blanket-inv-item.impregnated .blanket-action-badge {
    color: #88ff99;
}

.wet-blanket-placed {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 170px;
    height: auto;
    filter: drop-shadow(0 8px 25px rgba(0,0,0,0.9));
    z-index: 26;
    animation: blanketSlap 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes blanketSlap {
    0% { transform: translateX(-50%) scale(1.15) translateY(-10px); opacity: 0; }
    100% { transform: translateX(-50%) scale(1) translateY(0); opacity: 1; }
}

/* STADIUM 4: Våpenstillstand klokkeslett (11:00:00) */
.armistice-countdown-panel {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, #251e16 0%, #0d0a08 100%);
    border: 3px solid #c5a059;
    border-radius: 12px;
    padding: 10px 24px;
    text-align: center;
    box-shadow: 0 6px 30px rgba(0,0,0,0.9), 0 0 15px rgba(197,160,89,0.3);
    z-index: 35;
    min-width: 280px;
}

.armistice-clock-time {
    font-family: var(--font-typewriter);
    font-size: 2.2rem;
    font-weight: bold;
    color: #ffdd88;
    letter-spacing: 0.12em;
    text-shadow: 0 0 15px rgba(255, 221, 136, 0.7);
}

.armistice-peace-card {
    position: absolute;
    inset: 20px;
    background: rgba(18, 16, 12, 0.96);
    border: 3px solid var(--accent-gold);
    border-radius: 10px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 40;
    box-shadow: 0 0 50px rgba(0,0,0,0.95);
    animation: peaceCardFadeIn 1.2s ease-out;
}

@keyframes peaceCardFadeIn {
    0% { opacity: 0; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

.armistice-peace-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: #ffdd88;
    margin-bottom: 12px;
    text-shadow: 0 0 20px rgba(255, 221, 136, 0.5);
}

.armistice-peace-quote {
    font-family: var(--font-story);
    font-size: 1.15rem;
    color: #e6dac6;
    line-height: 1.6;
    max-width: 620px;
    margin-bottom: 24px;
    font-style: italic;
}

/* ==========================================================================
   ROM 2: SLAGET VED MARNE – DET TAKTISKE GENERAL-KARTET (SEPTEMBER 1914)
   ========================================================================== */
.marne-container {
    background: #151412;
    border: 2px solid #5a4a28;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.85);
    position: relative;
}

.marne-map-viewport {
    position: relative;
    width: 100%;
    height: 520px;
    border-radius: 8px;
    overflow: hidden;
    background: #141210 url('assets/vn/bg_marne_map_table.jpg') center center / cover no-repeat;
    border: 2px solid #4a3a24;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.85), 0 8px 25px rgba(0, 0, 0, 0.7);
    user-select: none;
}

/* SVG lag for håndtegnede piler og frontlinjer */
.marne-tactical-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 15;
}

/* Taktiske målområder / dropzones på kartet */
.marne-sector-zone {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 136px;
    height: 136px;
    border-radius: 50%;
    border: 2px dashed rgba(255, 215, 0, 0.85);
    background: radial-gradient(circle, rgba(28, 24, 18, 0.94) 0%, rgba(14, 12, 9, 0.98) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s, border-color 0.25s;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 18px rgba(0,0,0,0.85), inset 0 0 16px rgba(0,0,0,0.7);
    text-align: center;
    padding: 8px 12px;
    box-sizing: border-box;
    overflow: hidden;
}

.marne-sector-zone:hover {
    transform: translate(-50%, -50%) scale(1.06);
    border-color: #ffd700;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.75), inset 0 0 12px rgba(255, 215, 0, 0.2);
}

.marne-sector-zone.targeted {
    animation: sectorTargetPulse 1.4s infinite;
    border-color: #ffb300;
    background: radial-gradient(circle, rgba(42, 34, 20, 0.95) 0%, rgba(18, 14, 10, 0.98) 100%);
}

@keyframes sectorTargetPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 15px rgba(255, 179, 0, 0.5); }
    50% { transform: translate(-50%, -50%) scale(1.08); box-shadow: 0 0 30px rgba(255, 179, 0, 0.9); }
}

.marne-sector-zone.deployed {
    border: 2px solid #2e7d32;
    background: radial-gradient(circle, rgba(18, 38, 22, 0.94) 0%, rgba(10, 20, 12, 0.98) 100%);
    box-shadow: 0 0 20px rgba(46, 125, 50, 0.6), inset 0 0 15px rgba(0,0,0,0.8);
    padding: 6px;
}

.sector-target-icon {
    font-size: 1.15rem;
    line-height: 1;
    margin-bottom: 3px;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.8));
}

.sector-title {
    font-family: var(--font-heading, 'Cinzel', serif);
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffdd88;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9);
    line-height: 1.15;
}

.sector-sub {
    font-family: var(--font-story, Georgia, serif);
    font-size: 0.72rem;
    color: #cbbfae;
    line-height: 1.15;
    margin-top: 2px;
}

.sector-action-pill {
    font-family: var(--font-typewriter, monospace);
    font-size: 0.65rem;
    color: #ffd700;
    margin-top: 5px;
    letter-spacing: 0.05em;
    opacity: 0.9;
}

/* Troppe-token plassert på kartet */
.sector-unit-token {
    width: 68px;
    height: 68px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.9));
    animation: unitDeployPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sector-deployed-badge {
    font-family: var(--font-heading, 'Cinzel', serif);
    font-size: 0.72rem;
    font-weight: bold;
    color: #a5d6a7;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(76, 175, 80, 0.4);
    border-radius: 10px;
    padding: 2px 8px;
    margin-top: 3px;
    letter-spacing: 0.03em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.9);
}

@keyframes unitDeployPop {
    0% { transform: scale(0.3) rotate(-15deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Troppetråd / Tray for tilgjengelige enheter */
.marne-formation-tray {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 14px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 860px) {
    .marne-formation-tray {
        grid-template-columns: 1fr;
    }
}

.marne-formation-card {
    background: rgba(22, 20, 18, 0.95);
    border: 2px solid #4a3d2c;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.6);
    user-select: none;
    box-sizing: border-box;
}

.marne-formation-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-gold);
    box-shadow: 0 6px 20px rgba(197, 160, 89, 0.35);
}

.marne-formation-card.selected {
    border-color: #ffd700;
    background: rgba(36, 30, 20, 0.95);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.6);
    transform: translateY(-3px) scale(1.02);
}

.marne-formation-card.deployed {
    opacity: 0.45;
    border-color: #2e7d32;
    cursor: default;
    transform: none !important;
    box-shadow: none !important;
}

.formation-thumb {
    width: 52px;
    height: 52px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.8));
    flex-shrink: 0;
}

.formation-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.formation-title {
    font-family: var(--font-heading, 'Cinzel', serif);
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffdd88;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.formation-sub {
    font-family: var(--font-story, Georgia, serif);
    font-size: 0.74rem;
    color: #b0a897;
    line-height: 1.25;
    margin-top: 2px;
}

.formation-status {
    font-family: var(--font-typewriter, monospace);
    font-size: 0.7rem;
    font-weight: bold;
    margin-top: 4px;
    color: #c5a059;
}

.marne-formation-card.deployed .formation-status {
    color: #69db7c;
}

/* Stempel ved seier på Marne */
.marne-victory-stamp {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-10deg);
    border: 6px double #b71c1c;
    color: #b71c1c;
    background: rgba(255, 240, 220, 0.94);
    padding: 16px 36px;
    border-radius: 8px;
    text-align: center;
    z-index: 50;
    box-shadow: 0 10px 40px rgba(0,0,0,0.9), inset 0 0 15px rgba(183, 28, 28, 0.2);
    animation: marneStampSlam 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

@keyframes marneStampSlam {
    0% { transform: translate(-50%, -50%) rotate(25deg) scale(2.2); opacity: 0; }
    100% { transform: translate(-50%, -50%) rotate(-10deg) scale(1); opacity: 1; }
}

.marne-victory-stamp-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: bold;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.marne-victory-stamp-sub {
    font-family: var(--font-typewriter);
    font-size: 0.88rem;
    letter-spacing: 0.12em;
    margin-top: 4px;
    font-weight: bold;
}

@media (max-height: 750px) {
    .marne-map-viewport {
        height: 380px;
    }
    .marne-sector-zone {
        width: 108px;
        height: 108px;
        padding: 4px 6px;
    }
    .sector-title {
        font-size: 0.72rem;
    }
    .sector-sub {
        display: none;
    }
    .sector-unit-token {
        width: 44px;
        height: 44px;
    }
    .marne-container {
        padding: 12px;
    }
    .marne-formation-tray {
        gap: 8px;
        margin-top: 10px;
    }
    .marne-formation-card {
        padding: 6px 10px;
    }
    .formation-thumb {
        width: 40px;
        height: 40px;
    }
    .formation-title {
        font-size: 0.8rem;
    }
    .formation-sub {
        font-size: 0.68rem;
    }
}

/* ==========================================================================
   ROM 8: MARCONI MARK III KRYSTALLRADIO & PEILING (NOVEMBER 1918)
   ========================================================================== */
.radio-cabinet-container {
    background: #141210;
    border: 2px solid #5a4a28;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.85);
    position: relative;
}

.radio-station-viewport {
    position: relative;
    width: 100%;
    height: 480px;
    border-radius: 8px;
    overflow: hidden;
    background: #12100e url('assets/vn/bg_marconi_radio.jpg') center center / cover no-repeat;
    border: 2px solid #4a3a24;
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.9), 0 8px 25px rgba(0, 0, 0, 0.7);
    user-select: none;
}

/* Glødende radiorør (vakuum-ventiler) */
.radio-tube-glow {
    position: absolute;
    top: 25%;
    width: 100px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(255, 175, 50, 0.85) 0%, rgba(255, 110, 20, 0.45) 45%, transparent 75%);
    mix-blend-mode: screen;
    filter: blur(10px);
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.2s ease, transform 0.2s ease;
    animation: tubeFlicker 3s infinite alternate;
}

.radio-tube-glow.left {
    left: 24%;
}

.radio-tube-glow.right {
    left: 33%;
}

@keyframes tubeFlicker {
    0% { opacity: 0.75; transform: scale(0.98); }
    50% { opacity: 0.92; transform: scale(1.02); }
    100% { opacity: 0.80; transform: scale(1); }
}

/* Galvanometer (signalstyrke-måler) */
.radio-meter-hud {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(18, 16, 12, 0.92);
    border: 2px solid #5a4b36;
    border-radius: 8px;
    padding: 10px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.8);
    backdrop-filter: blur(4px);
    z-index: 20;
    width: 190px;
}

.radio-meter-title {
    font-family: var(--font-typewriter);
    font-size: 0.72rem;
    color: #c4b59d;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.radio-meter-gauge {
    position: relative;
    width: 140px;
    height: 70px;
    overflow: hidden;
}

.radio-meter-needle {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 3px;
    height: 60px;
    background: #ff4444;
    transform-origin: bottom center;
    transform: rotate(-60deg);
    transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 5px rgba(255, 68, 68, 0.6);
}

.radio-meter-status {
    font-family: var(--font-typewriter);
    font-size: 0.74rem;
    font-weight: bold;
    color: #a89f91;
    margin-top: 4px;
}

/* Det store analoge Marconi-dreiehjulet */
.radio-dial-interactive-wrapper {
    position: absolute;
    top: 48%;
    left: 62.5%;
    transform: translate(-50%, -50%);
    width: 225px;
    height: 225px;
    z-index: 25;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radio-dial-interactive-wrapper:active {
    cursor: grabbing;
}

.radio-dial-plate-img {
    width: 215px;
    height: 215px;
    filter: drop-shadow(0 6px 16px rgba(0,0,0,0.95));
    transition: transform 0.08s linear;
    user-select: none;
}

/* Digital/opplyst frekvensvisning */
.radio-freq-readout-hud {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: radial-gradient(circle, #22201b 0%, #0d0c0a 100%);
    border: 2px solid var(--accent-gold);
    border-radius: 8px;
    padding: 10px 20px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0,0,0,0.9), 0 0 10px rgba(197, 160, 89, 0.3);
    z-index: 20;
}

.radio-freq-number {
    font-family: var(--font-typewriter);
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--accent-gold);
    text-shadow: 0 0 12px rgba(197, 160, 89, 0.6);
    letter-spacing: 0.06em;
}

/* Telegramstrimmel / dekodet melding */
.radio-decoded-telegram {
    position: absolute;
    bottom: 25px;
    right: 25px;
    left: 260px;
    background: #f4edd9;
    color: #1a1714;
    border: 2px solid #3d3529;
    border-radius: 6px;
    padding: 14px 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.9);
    z-index: 30;
    animation: telegramSlideUp 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: var(--font-typewriter);
}

@keyframes telegramSlideUp {
    0% { transform: translateY(40px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.telegram-header {
    font-size: 0.76rem;
    font-weight: bold;
    color: #7a1e1e;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px dashed #7a1e1e;
    padding-bottom: 4px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.telegram-body {
    font-size: 0.95rem;
    line-height: 1.4;
    font-weight: bold;
    color: #1c1813;
}

/* Signalbok / Frekvensnøkkel på bordet */
.radio-cipher-sheet {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f4ebd9;
    border: 2px solid #5a4b36;
    border-radius: 6px;
    padding: 10px 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7);
    color: #1a1714;
    font-family: var(--font-typewriter);
    max-width: 250px;
    z-index: 22;
}

.cipher-sheet-badge {
    font-size: 0.72rem;
    font-weight: bold;
    color: #8a1c14;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px dashed #8a1c14;
    padding-bottom: 3px;
    margin-bottom: 6px;
}

.cipher-formula-body {
    font-size: 0.76rem;
    line-height: 1.45;
    color: #2b251d;
}

/* Telegrafistens kodenotat / morselapp festet i rommet */
.radio-morse-paper {
    position: absolute;
    top: 145px;
    left: 20px;
    background: #fdf6e7;
    border: 2px solid #5a4b36;
    border-radius: 4px;
    padding: 8px 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7);
    color: #1a1714;
    font-family: var(--font-typewriter);
    width: 165px;
    z-index: 22;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    user-select: none;
}

.radio-morse-paper:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.85);
    border-color: #8c6d3b;
}

.morse-paper-pin {
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.5));
}

.morse-paper-header {
    font-size: 0.65rem;
    font-weight: bold;
    color: #7a1e1e;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: center;
    border-bottom: 1px solid #7c684e;
    padding-bottom: 2px;
    margin-bottom: 3px;
}

.morse-paper-sub {
    font-size: 0.60rem;
    color: #6d5b45;
    text-align: center;
    margin-bottom: 5px;
    font-style: italic;
}

.morse-paper-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 6px;
    font-size: 0.72rem;
    background: rgba(220, 205, 180, 0.35);
    padding: 4px 6px;
    border-radius: 3px;
    border: 1px dashed #9c8a70;
}

.morse-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1px 2px;
    font-family: var(--font-mono, monospace);
}

.morse-row span {
    color: #2b261f;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.morse-row strong {
    color: #7a1e1e;
    font-size: 0.78rem;
}

.morse-paper-footer {
    font-size: 0.58rem;
    color: #544432;
    text-align: center;
    margin-top: 4px;
    font-weight: bold;
}

/* Krystalldetektor («Cat's Whisker») */
.radio-crystal-detector,
.crystal-detector-hotspot {
    position: absolute;
    bottom: 20px;
    left: 200px;
    background: rgba(18, 16, 12, 0.94);
    border: 2px solid #5a4b36;
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
    z-index: 22;
    transition: all 0.25s ease;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.radio-crystal-detector:hover,
.crystal-detector-hotspot:hover {
    border-color: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(197, 160, 89, 0.3);
}

.radio-crystal-detector.active,
.crystal-detector-hotspot.active {
    border-color: #69db7c;
    box-shadow: 0 0 14px rgba(105, 219, 124, 0.35);
}

.radio-crystal-detector:not(.active),
.crystal-detector-hotspot:not(.active) {
    animation: crystalPromptPulse 2.2s infinite ease-in-out;
}

@keyframes crystalPromptPulse {
    0%, 100% { border-color: #5a4b36; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8); }
    50% { border-color: #ffd700; box-shadow: 0 0 16px rgba(255, 215, 0, 0.5); }
}

.crystal-detector-label {
    font-family: var(--font-typewriter);
    font-size: 0.68rem;
    color: #c4b59d;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.crystal-cup {
    position: relative;
    width: 60px;
    height: 30px;
    background: #2a251e;
    border: 2px solid #6b573a;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crystal-rock {
    width: 22px;
    height: 18px;
    background: linear-gradient(135deg, #444 0%, #111 100%);
    border: 1px solid #777;
    border-radius: 2px;
    box-shadow: inset 0 0 4px rgba(255,255,255,0.4);
}

.crystal-needle {
    position: absolute;
    top: 2px;
    right: 8px;
    width: 24px;
    height: 2px;
    background: #d4af37;
    transform: rotate(35deg);
    transform-origin: right top;
    transition: transform 0.25s ease;
}

.crystal-needle.engaged {
    transform: rotate(10deg);
    background: #69db7c;
    box-shadow: 0 0 6px rgba(105, 219, 124, 0.8);
}

.crystal-status {
    font-family: var(--font-typewriter);
    font-size: 0.68rem;
    font-weight: bold;
}

.crystal-status.connected {
    color: #69db7c;
}

.crystal-status.disconnected {
    color: #ff7675;
}

@media (max-height: 750px) {
    .radio-station-viewport {
        height: 380px;
    }
    .radio-meter-hud {
        top: 10px;
        left: 10px;
        padding: 6px 10px;
        width: 150px;
    }
    .radio-meter-gauge {
        width: 110px;
        height: 55px;
    }
    .radio-cipher-sheet {
        top: 10px;
        right: 10px;
        padding: 6px 10px;
        max-width: 220px;
        font-size: 0.72rem;
    }
    .radio-morse-paper {
        top: 92px;
        left: 10px;
        width: 140px;
        padding: 4px 6px;
    }
    .radio-morse-paper .morse-paper-grid {
        font-size: 0.65rem;
        gap: 1px 4px;
        padding: 2px 4px;
    }
    .radio-morse-paper .morse-paper-header {
        font-size: 0.58rem;
    }
    .radio-morse-paper .morse-paper-sub {
        display: none;
    }
    .radio-morse-paper .morse-paper-footer {
        font-size: 0.52rem;
    }
    .radio-dial-interactive-wrapper {
        width: 180px;
        height: 180px;
        top: 45%;
        left: 62%;
    }
    .radio-dial-plate-img {
        width: 170px;
        height: 170px;
    }
    .radio-freq-readout-hud {
        bottom: 10px;
        left: 10px;
        padding: 6px 12px;
    }
    .radio-freq-number {
        font-size: 1.6rem;
    }
    .radio-crystal-detector,
    .crystal-detector-hotspot {
        bottom: 10px;
        left: 170px;
        padding: 6px 10px;
    }
    .radio-decoded-telegram {
        bottom: 10px;
        left: 170px;
        right: 10px;
        padding: 8px 12px;
    }
}

/* Telegram bekreftelsesboks */
.telegram-auth-box {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #777;
}

.auth-box-title {
    font-size: 0.76rem;
    font-weight: bold;
    color: #7a1e1e;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.auth-box-desc {
    font-size: 0.82rem;
    color: #3d3529;
    margin: 4px 0 8px 0;
}

.auth-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.telegram-code-input {
    background: #fff;
    border: 2px solid #5a4b36;
    border-radius: 4px;
    padding: 7px 12px;
    font-family: var(--font-typewriter);
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    width: 110px;
    text-align: center;
}

.telegram-code-input:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 8px rgba(197, 160, 89, 0.5);
}

.telegram-feedback {
    margin-top: 6px;
    font-size: 0.82rem;
    font-family: var(--font-typewriter);
}

/* ==========================================================================
   ROM 5: FELTPOSTKONTORET & SENSUROPPDRAGET (HØSTEN 1916)
   ========================================================================== */
.censor-room-container {
    background: #141210;
    border: 2px solid #5a4a28;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.85);
    position: relative;
}

.censor-desk-viewport {
    position: relative;
    width: 100%;
    min-height: 580px;
    border-radius: 8px;
    overflow: hidden;
    background: #12100e url('assets/vn/bg_censor_desk.jpg') center center / cover no-repeat;
    border: 2px solid #4a3a24;
    box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.9), 0 8px 25px rgba(0, 0, 0, 0.7);
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
}

@media (max-height: 750px) {
    .censor-desk-viewport {
        min-height: auto;
        padding: 14px 10px;
    }
    .censor-letter-sheet {
        padding: 18px 22px;
        font-size: 0.95rem;
        line-height: 1.8;
    }
}

/* Soldatens håndskrevne feltbrev */
.censor-letter-sheet {
    position: relative;
    width: 100%;
    max-width: 580px;
    background: #f4ebd7 url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noise)" opacity="0.04"/></svg>');
    color: #241d17;
    border: 1px solid #c8b99d;
    border-radius: 4px;
    padding: 32px 36px 36px 36px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.85), 0 2px 8px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(180, 150, 100, 0.25);
    transform: rotate(-0.5deg);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-family: var(--font-story);
    font-size: 1.12rem;
    line-height: 2.1;
    z-index: 20;
}

.censor-letter-header {
    border-bottom: 2px solid #a49177;
    padding-bottom: 10px;
    margin-bottom: 18px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-family: var(--font-typewriter);
    font-size: 0.78rem;
    color: #6b5c47;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.censor-post-mark {
    width: 60px;
    height: 60px;
    border: 2px dashed #8b7355;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.62rem;
    color: #6d583e;
    transform: rotate(8deg);
    opacity: 0.85;
    text-align: center;
    line-height: 1.1;
}

/* Interaktive ord som kan sladdes */
.censor-word {
    display: inline-block;
    position: relative;
    padding: 0 4px;
    margin: 0 1px;
    border-radius: 2px;
    cursor: pointer;
    user-select: none;
    transition: all 0.12s ease;
}

.censor-word:hover {
    background: rgba(183, 28, 28, 0.14);
    box-shadow: 0 0 0 1px rgba(183, 28, 28, 0.4);
    border-radius: 3px;
}

/* Tykk, autentisk sort kull/blekk-sladd */
.censor-word.censored {
    background: #111 !important;
    color: transparent !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.8);
    border-radius: 2px;
    position: relative;
}

.censor-word.censored::after {
    content: '';
    position: absolute;
    inset: -2px -3px;
    background: repeating-linear-gradient(
        93deg,
        #0a0a0a 0px,
        #1c1c1c 3px,
        #0f0f0f 6px
    );
    border-radius: 2px;
    pointer-events: none;
    opacity: 0.98;
}

/* Censor-stempel avtrykk på brevet */
.censor-stamp-imprint {
    position: absolute;
    bottom: 25px;
    right: 35px;
    pointer-events: none;
    opacity: 0;
    transform: scale(2.4) rotate(25deg);
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 30;
}

.censor-stamp-imprint.visible {
    opacity: 0.92;
    transform: scale(1) rotate(-8deg);
    filter: drop-shadow(0 2px 4px rgba(183, 28, 28, 0.4));
}

@keyframes stampSlamAnim {
    0% { transform: scale(2.6) rotate(35deg); opacity: 0; }
    70% { transform: scale(0.92) rotate(-10deg); opacity: 1; }
    100% { transform: scale(1) rotate(-8deg); opacity: 0.92; }
}

.censor-stamp-imprint.visible svg {
    animation: stampSlamAnim 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ==========================================================================
   ROM 5: RETNINGSLINJER MODAL (ARMY FORM W. 3084) & TIDSSTRAFF
   ========================================================================== */
.censor-briefing-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 8, 6, 0.88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border-radius: 8px;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.censor-briefing-backdrop.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.censor-briefing-sheet {
    position: relative;
    max-width: 620px;
    width: 100%;
    max-height: 94%;
    overflow-y: auto;
    background: #f4ebd8 url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noise)" opacity="0.04"/></svg>');
    border: 3px double #7c6444;
    border-radius: 6px;
    padding: 26px 30px;
    color: #241d17;
    font-family: var(--font-story, 'Playfair Display', serif);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(180, 150, 100, 0.2);
    animation: briefingSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes briefingSlideIn {
    from { transform: scale(0.95) translateY(12px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.censor-briefing-header {
    text-align: center;
    border-bottom: 2px solid #8e2424;
    padding-bottom: 10px;
    margin-bottom: 14px;
}

.briefing-crest {
    font-family: var(--font-typewriter, monospace);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    color: #8e2424;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.briefing-doc-no {
    font-family: var(--font-typewriter, monospace);
    font-size: 0.70rem;
    letter-spacing: 0.08em;
    color: #665544;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.briefing-title {
    font-family: var(--font-heading, 'Cinzel', serif);
    font-size: 1.32rem;
    font-weight: 800;
    color: #1a1510;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 4px 0;
}

.briefing-subtitle {
    font-size: 0.82rem;
    color: #554433;
    font-style: italic;
}

.briefing-intro {
    font-size: 0.90rem;
    line-height: 1.45;
    margin: 0 0 12px 0;
    color: #2b2218;
}

.briefing-rules-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

@media (max-width: 640px) {
    .briefing-rules-grid {
        grid-template-columns: 1fr;
    }
}

.briefing-rule-card {
    background: #eae0c9;
    border: 1px solid #bba98b;
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 0.80rem;
    line-height: 1.4;
}

.briefing-rule-card strong {
    display: block;
    font-size: 0.82rem;
    margin: 2px 0 4px 0;
    color: #1c1712;
}

.briefing-rule-card p {
    margin: 0;
    color: #3b3024;
    font-size: 0.78rem;
}

.briefing-rule-card.forbidden {
    border-left: 4px solid #b71c1c;
}

.briefing-rule-card.allowed {
    border-left: 4px solid #2e7d32;
    background: #e4eedb;
    border-color: #a5c79b;
}

.rule-badge-forbid {
    display: inline-block;
    font-family: var(--font-typewriter, monospace);
    font-size: 0.65rem;
    font-weight: bold;
    color: #b71c1c;
    letter-spacing: 0.08em;
}

.rule-badge-allow {
    display: inline-block;
    font-family: var(--font-typewriter, monospace);
    font-size: 0.65rem;
    font-weight: bold;
    color: #2e7d32;
    letter-spacing: 0.08em;
}

.briefing-penalty-warning {
    background: #fdf5e6;
    border: 1px dashed #bfa157;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 0.80rem;
    color: #5c431d;
    line-height: 1.4;
    margin-bottom: 14px;
}

.briefing-close-btn {
    width: 100%;
    background: linear-gradient(180deg, #3d3122 0%, #221a12 100%);
    border: 1px solid var(--accent-gold);
    color: #ffd700;
    padding: 12px;
    font-family: var(--font-heading, 'Cinzel', serif);
    font-size: 0.92rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
    transition: all 0.2s ease;
}

.briefing-close-btn:hover {
    background: #4d3e2b;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(197, 160, 89, 0.4);
}

/* Taktil verktøylinje under brevet */
.censor-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.censor-tool-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #231f1a;
    border: 1px solid var(--accent-gold);
    color: #ffdd88;
    padding: 9px 16px;
    border-radius: 6px;
    font-family: var(--font-heading);
    font-size: 0.88rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.6);
    transition: all 0.2s ease;
}

.censor-tool-btn:hover {
    background: #383025;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(197, 160, 89, 0.35);
}

.censor-penalty-btn {
    background: #252019;
    border-color: #a88a4e;
    color: #ecdcc0;
}

.censor-penalty-btn:hover {
    background: #3d3326;
    border-color: #ffd700;
    color: #fff;
}

.censor-hint-btn {
    background: #241c10;
    border-color: #e0a338;
    color: #ffe082;
}

.censor-hint-btn:hover {
    background: #3d2f17;
    border-color: #ffca28;
    box-shadow: 0 6px 20px rgba(255, 202, 40, 0.4);
}

.censor-stamp-btn {
    background: linear-gradient(135deg, #8b1c1c 0%, #4a0e0e 100%);
    border: 1px solid #ff6666;
    color: #fff;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(139, 28, 28, 0.5);
}

.censor-stamp-btn:hover {
    background: linear-gradient(135deg, #a82424 0%, #631414 100%);
    box-shadow: 0 6px 25px rgba(255, 68, 68, 0.6);
}

/* ==========================================================================
   TIDSSTRAFF & OPPDRAGSTIMER STILER
   ========================================================================== */
.penalty-toast-container {
    position: fixed;
    top: 75px;
    right: 25px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.penalty-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #3d0d0d 0%, #1d0606 100%);
    border: 1px solid #d32f2f;
    color: #ffebee;
    padding: 10px 18px;
    border-radius: 6px;
    font-family: var(--font-typewriter, monospace);
    font-size: 0.88rem;
    font-weight: bold;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85), 0 0 15px rgba(211, 47, 47, 0.45);
    animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1), toastFadeOut 0.4s ease forwards 2.7s;
}

.penalty-toast.bonus-toast {
    background: linear-gradient(135deg, #0d381e 0%, #061d10 100%);
    border: 1px solid #4caf50;
    color: #e8f5e9;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85), 0 0 15px rgba(76, 175, 80, 0.45);
}

/* Scorekort og stjernestiler i The Trench Chronicle */
.newspaper-score-card {
    margin-top: 16px;
    background: linear-gradient(180deg, #2b251d 0%, #1a1611 100%);
    border: 2px solid #8c7247;
    border-radius: 8px;
    padding: 18px 22px;
    color: #f5eedb;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5), inset 0 0 14px rgba(0,0,0,0.6);
}

.score-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #635032;
    padding-bottom: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
}

.score-stars-display {
    font-size: 1.8rem;
    letter-spacing: 4px;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.7));
}

.score-total-number {
    font-family: var(--font-typewriter, monospace);
    font-size: 2.6rem;
    font-weight: 900;
    color: var(--accent-gold);
    line-height: 1;
    text-shadow: 0 0 16px rgba(255, 215, 0, 0.45);
}

.score-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    font-family: var(--font-typewriter, monospace);
    font-size: 0.82rem;
    color: #d6ccb8;
}

.score-stat-pill {
    background: rgba(0,0,0,0.35);
    border: 1px solid #4a3e2b;
    border-radius: 5px;
    padding: 8px 12px;
}

/* Autentisk avisfotografi fra 1918 */
.newspaper-photo-frame {
    margin: 14px 0 16px 0;
    text-align: center;
}

.newspaper-photo-inner {
    background: #ffffff;
    border: 1px solid #5a5040;
    padding: 6px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    display: inline-block;
    max-width: 100%;
    box-sizing: border-box;
}

.newspaper-photo-img {
    width: 100%;
    max-height: 290px;
    object-fit: cover;
    display: block;
    filter: sepia(0.06) contrast(1.05) brightness(0.98);
}

.newspaper-photo-caption {
    font-family: var(--font-typewriter, monospace);
    font-size: 0.74rem;
    color: #2b251d;
    margin-top: 6px;
    padding: 4px 6px 2px 6px;
    text-align: center;
    letter-spacing: 0.03em;
    border-top: 1px dotted #aaa;
}

@keyframes toastSlideIn {
    from { transform: translateX(50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toastFadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-15px); }
}

.mission-timer-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #14120e;
    border: 1px solid #6b5736;
    border-radius: 4px;
    padding: 5px 12px;
    font-family: var(--font-typewriter, monospace);
    color: #e5c378;
    font-size: 0.85rem;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.7);
}

.mission-timer-badge .timer-icon {
    font-size: 0.95rem;
}

.mission-timer-badge .timer-display {
    font-weight: bold;
    letter-spacing: 0.08em;
}

/* ==========================================================================
   ROM 6: ZERO HOUR & LOMMEURSYNKRONISERING (PASSCHENDAELE 1917)
   ========================================================================== */
.zero-hour-container {
    background: #141210;
    border: 2px solid #5a4a28;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.85);
    position: relative;
}

.zero-hour-viewport {
    position: relative;
    width: 100%;
    min-height: 410px;
    border-radius: 8px;
    overflow: hidden;
    background: #12100e url('assets/vn/bg_zero_hour_trench.jpg') center center / cover no-repeat;
    border: 2px solid #4a3a24;
    box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.9), 0 8px 25px rgba(0, 0, 0, 0.7);
    user-select: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 14px 18px;
}

/* Sandsekk-hylle som holder de to klokkene */
.watches-parapet-shelf {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: rgba(18, 16, 14, 0.90);
    border: 2px solid rgba(197, 160, 89, 0.45);
    border-radius: 10px;
    padding: 12px 18px 10px 18px;
    backdrop-filter: blur(6px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.9), inset 0 0 20px rgba(0,0,0,0.6);
    z-index: 20;
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
}

/* Rad med klokkene side ved side */
.watches-clocks-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
}

.trench-watch-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(14, 12, 10, 0.85);
    border: 1px solid rgba(197, 160, 89, 0.35);
    border-radius: 8px;
    padding: 10px 16px 12px 16px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.7);
    transition: transform 0.2s, border-color 0.2s;
    min-width: 220px;
}

.trench-watch-card:hover {
    border-color: var(--accent-gold);
}

/* Autentisk britisk offisersur (Mark IV A. / Doxa trench watch) */
.pocket-watch-case {
    position: relative;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #5a4933 0%, #2b2216 65%, #18130b 100%);
    box-shadow: 0 8px 25px rgba(0,0,0,0.9), inset 0 2px 6px rgba(255,235,180,0.4), inset 0 -4px 10px rgba(0,0,0,0.95);
    border: 3px solid #8e7343;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 18px auto 8px auto;
    user-select: none;
    touch-action: none;
}

/* Kronetopp & opptrekksring */
.pocket-watch-crown {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 12px;
    background: linear-gradient(90deg, #5a4933, #c5a059, #5a4933);
    border-radius: 3px;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.7);
    border: 1px solid #3d301c;
    z-index: 5;
}

.pocket-watch-loop {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 20px;
    border: 3px solid #c5a059;
    border-radius: 50% 50% 0 0;
    box-shadow: 0 -2px 6px rgba(0,0,0,0.8);
    z-index: 4;
    pointer-events: none;
}

.pocket-watch-svg {
    width: 172px;
    height: 172px;
    border-radius: 50%;
    display: block;
    cursor: crosshair;
}

.watch-hand-interactive {
    cursor: grab;
    transition: filter 0.15s ease;
}

.watch-hand-interactive:hover {
    cursor: grab;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.95)) !important;
}

.watch-hand-interactive:active {
    cursor: grabbing;
}

.trench-watch-title {
    font-family: var(--font-heading);
    color: var(--accent-gold);
    font-size: 0.88rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.trench-watch-sub {
    font-family: var(--font-story);
    font-size: 0.76rem;
    color: #b0a897;
    margin-bottom: 6px;
}

/* Mål og status under klokkene - uten egen ramme */
.zero-hour-target-bar {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    width: 100%;
    padding: 4px 8px;
    margin-top: 2px;
    color: #e0d5c1;
    font-size: 0.85rem;
    text-align: center;
}

.zero-hour-target-bar .target-flag {
    font-family: var(--font-heading);
    color: var(--accent-gold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.zero-hour-target-bar .target-flag strong {
    font-family: var(--font-typewriter);
    font-size: 1.12rem;
    color: #ffdd88;
    margin-left: 4px;
    letter-spacing: 0.05em;
}

.zero-hour-target-bar .target-sep {
    color: rgba(197, 160, 89, 0.35);
    font-size: 0.80rem;
}

.zero-hour-target-bar .target-sync-status {
    font-family: var(--font-typewriter);
    font-size: 0.80rem;
    font-weight: bold;
}

.zero-hour-target-bar .target-hint {
    font-family: var(--font-story);
    font-size: 0.75rem;
    color: #a09885;
    font-style: italic;
}

/* Animert fløyte som rister ved avfyring */
.trench-whistle-active-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(18, 14, 10, 0.94);
    border: 3px solid var(--accent-gold);
    border-radius: 12px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 50;
    box-shadow: 0 0 50px rgba(0,0,0,0.95);
    animation: whistlePop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes whistlePop {
    0% { transform: translate(-50%, -50%) scale(0.6); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.whistle-blast-icon {
    font-size: 3.5rem;
    animation: whistleVibrate 0.1s infinite;
}

@keyframes whistleVibrate {
    0% { transform: scale(1) rotate(-3deg); }
    50% { transform: scale(1.08) rotate(3deg); }
    100% { transform: scale(1) rotate(-3deg); }
}

/* ==========================================================================
   ROM 3: TOGDEPOT & LOGISTIKKPUSLESPILLET (YPRES 1915)
   ========================================================================== */

.train-depot-viewport {
    position: relative;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 4px;
    box-sizing: border-box;
}

.train-depot-overlay {
    background: rgba(16, 13, 10, 0.88);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(197, 160, 89, 0.4);
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 8px 35px rgba(0, 0, 0, 0.85);
}

.train-depot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #3d3224;
    padding-bottom: 10px;
    margin-bottom: 12px;
}

.train-depot-title {
    font-family: var(--font-stencil, 'Arial Black', sans-serif);
    font-size: 1.25rem;
    letter-spacing: 2px;
    color: #e5c98f;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.train-depot-tag {
    font-family: var(--font-typewriter, monospace);
    font-size: 0.82rem;
    color: #8c7f6b;
    background: #15110d;
    padding: 3px 10px;
    border: 1px solid #4a3e2c;
    border-radius: 3px;
}

.train-depot-instruction {
    font-size: 0.88rem;
    color: #c8beab;
    line-height: 1.45;
    margin-bottom: 14px;
    background: rgba(0,0,0,0.35);
    padding: 8px 12px;
    border-left: 3px solid var(--accent-gold);
    border-radius: 0 4px 4px 0;
}

/* De to godsvognene (War Department Boxcars) */
.train-wagons-track-area {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.wagon-boxcar {
    background: linear-gradient(180deg, #2b332b 0%, #1e261f 60%, #141a15 100%);
    border: 2px solid #3f4e40;
    border-radius: 6px;
    padding: 12px;
    width: 210px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.8), inset 0 0 15px rgba(0,0,0,0.6);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wagon-boxcar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: #111712;
    border-bottom: 1px solid #4a5c4c;
}

.wagon-stencil-header {
    text-align: center;
    width: 100%;
    margin-bottom: 8px;
    padding-top: 2px;
}

.wagon-stencil-code {
    font-family: var(--font-stencil, 'Arial Black', sans-serif);
    font-size: 0.95rem;
    letter-spacing: 1.5px;
    color: #d8c29d;
    text-shadow: 0 1px 2px rgba(0,0,0,0.9);
}

.wagon-weight-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    font-family: var(--font-typewriter, monospace);
    font-size: 0.82rem;
    background: #0d120e;
    padding: 3px 8px;
    border: 1px solid #2e3b2f;
    border-radius: 3px;
    margin-top: 4px;
    box-sizing: border-box;
}

.wagon-grid-bay {
    width: 156px;
    height: 156px;
    position: relative;
    background: 
        repeating-linear-gradient(0deg, #1b1713, #1b1713 51px, #362e26 52px),
        repeating-linear-gradient(90deg, #1b1713, #1b1713 51px, #362e26 52px);
    border: 2px dashed #5a4b38;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.9);
    margin: 6px 0 10px 0;
    box-sizing: content-box;
    transition: border-color 0.2s, background-color 0.2s;
}

.wagon-grid-bay.drag-over {
    border-color: #ffd700;
    background-color: rgba(255, 215, 0, 0.08);
}

/* Jernbanehjul og understell */
.wagon-undercarriage {
    width: 100%;
    display: flex;
    justify-content: space-around;
    padding-top: 4px;
    border-top: 2px solid #1f1b16;
}

.train-wheel {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: radial-gradient(circle, #444 30%, #151515 80%);
    border: 2px solid #666;
    box-shadow: 0 3px 6px rgba(0,0,0,0.9);
}

/* Lasteperrongen for kasser */
.cargo-depot-platform {
    background: linear-gradient(180deg, #241d16 0%, #17130e 100%);
    border: 2px solid #4a3c2b;
    border-radius: 6px;
    padding: 12px 16px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.6);
}

.cargo-depot-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: #bfaea0;
    margin-bottom: 8px;
    font-family: var(--font-story, Georgia, serif);
}

.cargo-docks-crates {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: center;
    min-height: 110px;
    background: rgba(0,0,0,0.4);
    border: 1px solid #33281d;
    border-radius: 4px;
    padding: 10px;
    transition: background-color 0.2s;
}

.cargo-docks-crates.drag-over {
    background-color: rgba(255, 215, 0, 0.08);
}

/* Militære trekasser (2D-brikker) */
.military-crate {
    box-sizing: border-box;
    cursor: grab;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 2px solid #20150d;
    border-radius: 3px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.8), inset 0 0 10px rgba(0,0,0,0.5);
    font-family: var(--font-stencil, monospace);
    transition: transform 0.15s, box-shadow 0.15s;
    overflow: hidden;
    position: relative;
}

.military-crate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.9);
}

.military-crate:active {
    cursor: grabbing;
}

.military-crate.selected {
    outline: 3px solid #ffd700 !important;
    animation: cratePulse 1s infinite alternate;
}

@keyframes cratePulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.04); }
}

.crate-metal-corners::before,
.crate-metal-corners::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    border: 1px solid #111;
    background: #555;
}
.crate-metal-corners::before { top: 0; left: 0; border-right: none; border-bottom: none; }
.crate-metal-corners::after { bottom: 0; right: 0; border-left: none; border-top: none; }

.military-crate .crate-title {
    font-size: 0.82rem;
    font-weight: bold;
    letter-spacing: 0.5px;
    line-height: 1.15;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9);
}

.military-crate .crate-sub {
    font-size: 0.72rem;
    color: #ffd700;
    font-weight: bold;
    font-family: var(--font-typewriter, monospace);
    margin-top: 2px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.9);
}

.crate-size-1x3 .crate-title,
.crate-size-1x2 .crate-title {
    font-size: 0.68rem;
    letter-spacing: 0;
    word-break: break-word;
    max-width: 46px;
    line-height: 1.15;
}

/* Crate sizes (52px per cell) */
.crate-size-2x2 {
    width: 104px;
    height: 104px;
}

.crate-size-3x1 {
    width: 156px;
    height: 52px;
}

.crate-size-1x3 {
    width: 52px;
    height: 156px;
}

.crate-size-2x1 {
    width: 104px;
    height: 52px;
}

.crate-size-1x2 {
    width: 52px;
    height: 104px;
}

/* Fargestiler & sjablonger */
.crate-artillery {
    background: linear-gradient(135deg, #70261f 0%, #4a1511 100%);
    border-color: #380e0a;
    color: #fce4e4;
}

.crate-rifles {
    background: linear-gradient(135deg, #3d4246 0%, #25282b 100%);
    border-color: #17191a;
    color: #e6ebed;
}

.crate-winter {
    background: linear-gradient(135deg, #445341 0%, #2b3629 100%);
    border-color: #1a2219;
    color: #e0ebd9;
}

.crate-food {
    background: linear-gradient(135deg, #6e5033 0%, #47321e 100%);
    border-color: #2b1d10;
    color: #f7e8db;
}

.crate-ammo {
    background: linear-gradient(135deg, #873629 0%, #592017 100%);
    border-color: #38120c;
    color: #fcedeb;
}

.crate-luxury {
    background: linear-gradient(135deg, #99782d 0%, #5c4514 100%);
    border-color: #382909;
    color: #fff6d9;
}

/* Togavgangs-overlay ved godkjenning */
.train-departure-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(15, 12, 9, 0.95);
    border: 3px solid var(--accent-gold);
    border-radius: 12px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 60;
    box-shadow: 0 0 60px rgba(0,0,0,0.95);
    animation: whistlePop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 500px;
    width: 90%;
}

/* =========================================================================
   STARTSKJERM / HOVEDMENY (TITLE SCREEN)
   ========================================================================= */
.title-screen-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: #0d0a07;
    color: #f4ebd9;
    font-family: var(--font-story, 'Playfair Display', serif);
    transition: opacity 0.5s ease;
}

.title-screen-container.fading-out {
    opacity: 0;
    pointer-events: none;
}

.title-screen-bg {
    position: absolute;
    inset: 0;
    background-image: url('assets/vn/bg_title_screen.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 1;
    transition: transform 12s ease-out;
}

.title-screen-container:hover .title-screen-bg {
    transform: scale(1.025);
}

.title-screen-vignette {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: radial-gradient(circle at 50% 45%, rgba(10, 8, 6, 0.42) 0%, rgba(10, 8, 6, 0.78) 60%, rgba(5, 4, 3, 0.94) 100%),
                linear-gradient(to bottom, rgba(10, 8, 6, 0.75) 0%, rgba(10, 8, 6, 0.3) 30%, rgba(10, 8, 6, 0.5) 70%, rgba(5, 4, 3, 0.96) 100%);
    pointer-events: none;
}

.title-screen-overlay {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
    padding: 24px 32px;
    box-sizing: border-box;
}

/* Topprad: Portallenke & Flagg-velger */
.title-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    gap: 16px;
    flex-wrap: wrap;
}

.title-portal-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(22, 17, 12, 0.85);
    border: 1px solid #6b5536;
    border-radius: 6px;
    color: #e0d6c3;
    text-decoration: none;
    font-family: var(--font-typewriter, monospace);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    backdrop-filter: blur(6px);
    transition: all 0.2s ease;
}

.title-portal-link:hover {
    background: rgba(45, 34, 23, 0.95);
    border-color: var(--accent-gold, #d4af37);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.title-lang-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(20, 15, 11, 0.85);
    border: 1px solid #5a452c;
    border-radius: 30px;
    padding: 4px 8px;
    backdrop-filter: blur(6px);
}

.lang-flag-btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 0.82rem;
    font-family: var(--font-typewriter, monospace);
    color: #bbb;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.lang-flag-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.lang-flag-btn.active {
    background: rgba(184, 134, 11, 0.35);
    border-color: var(--accent-gold, #d4af37);
    color: #ffd700;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

/* Hovedkort / Sentral Tittelblokk */
.title-main-card {
    max-width: 820px;
    width: 100%;
    margin: auto auto;
    text-align: center;
    padding: 30px 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.title-eyebrow-badge {
    display: inline-block;
    padding: 6px 18px;
    background: rgba(30, 23, 16, 0.88);
    border: 1px solid #7c6239;
    border-radius: 4px;
    font-family: var(--font-typewriter, monospace);
    font-size: 0.82rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #e5b95a;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.title-hero-heading {
    font-family: var(--font-heading, 'Cinzel', serif);
    font-size: clamp(2.2rem, 5.5vw, 3.8rem);
    font-weight: 900;
    letter-spacing: 0.08em;
    color: #f7eee2;
    text-transform: uppercase;
    margin: 0 0 10px 0;
    line-height: 1.15;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.95), 0 0 30px rgba(184, 134, 11, 0.25);
}

.title-hero-sub {
    font-family: var(--font-story, 'Playfair Display', serif);
    font-style: italic;
    font-size: clamp(1rem, 2.2vw, 1.3rem);
    color: #cfc2ad;
    margin: 0 0 20px 0;
    max-width: 620px;
    line-height: 1.45;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.title-divider-line {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 220px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #856a3f, transparent);
    margin: 0 auto 28px auto;
    position: relative;
}

.divider-star {
    position: absolute;
    color: #d4af37;
    font-size: 0.85rem;
    background: #140f0a;
    padding: 0 6px;
}

/* Hovedknapper */
.title-actions-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 100%;
    max-width: 440px;
}

.title-btn-primary {
    width: 100%;
    padding: 16px 28px;
    font-family: var(--font-heading, 'Cinzel', serif);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(180deg, #852a20 0%, #52160f 100%);
    border: 2px solid #b84332;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 20px rgba(133, 42, 32, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.title-btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    background: linear-gradient(180deg, #993126 0%, #631b12 100%);
    border-color: #e05844;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.85), 0 0 30px rgba(184, 67, 50, 0.6);
}

.title-btn-primary:active {
    transform: translateY(1px) scale(0.99);
}

.title-actions-secondary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
}

.title-btn-secondary {
    padding: 12px 18px;
    font-family: var(--font-typewriter, monospace);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #e6dac6;
    background: rgba(26, 20, 14, 0.9);
    border: 1.5px solid #634d31;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}

.title-btn-secondary:hover {
    background: rgba(45, 34, 23, 0.95);
    border-color: var(--accent-gold, #d4af37);
    color: #ffd700;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.7);
}

/* Bunn-piller / Metadata */
.title-meta-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 26px;
}

.meta-pill {
    padding: 5px 12px;
    background: rgba(18, 14, 10, 0.8);
    border: 1px solid #4a3a24;
    border-radius: 20px;
    font-family: var(--font-typewriter, monospace);
    font-size: 0.75rem;
    color: #bfa886;
    letter-spacing: 0.05em;
}

/* MODALER (Innstillinger & Instruksjoner) */
.title-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 150;
    background: rgba(6, 4, 3, 0.85);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: titleFadeIn 0.2s ease-out;
}

.title-modal-box {
    background: #efe4ce;
    color: #24201b;
    border: 3px solid #5a452c;
    border-radius: 8px;
    max-width: 680px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9);
    position: relative;
    padding: 28px 32px;
    box-sizing: border-box;
    font-family: var(--font-story, 'Playfair Display', serif);
    animation: titleCardPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.title-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #5a452c;
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.title-modal-title {
    font-family: var(--font-heading, 'Cinzel', serif);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #3b2c1b;
    margin: 0;
}

.title-modal-close-btn {
    background: #3b2c1b;
    color: #efe4ce;
    border: 1px solid #5a452c;
    border-radius: 4px;
    padding: 6px 14px;
    font-family: var(--font-typewriter, monospace);
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.15s ease;
}

.title-modal-close-btn:hover {
    background: #852a20;
    color: #fff;
}

/* Innstillinger Kontroller i Modal */
.settings-control-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-family: var(--font-typewriter, monospace);
    font-size: 0.95rem;
}

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid #c9b99f;
    border-radius: 6px;
    gap: 16px;
}

.settings-toggle-btn {
    padding: 8px 16px;
    background: #3b2c1b;
    color: #efe4ce;
    border: 1px solid #5a452c;
    border-radius: 4px;
    font-family: var(--font-typewriter, monospace);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.settings-toggle-btn.active {
    background: #2e6b35;
    color: #fff;
    border-color: #1d4722;
}

.settings-slider {
    width: 140px;
    accent-color: #852a20;
    cursor: pointer;
}

/* Instruksjonsrader i Modal */
.instructions-step-card {
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid #c9b99f;
    border-radius: 6px;
    padding: 14px 18px;
    margin-bottom: 12px;
}

.instructions-step-card h4 {
    margin: 0 0 6px 0;
    font-family: var(--font-heading, 'Cinzel', serif);
    font-size: 1.05rem;
    color: #852a20;
}

.instructions-step-card p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.5;
    color: #383127;
}

@keyframes titleFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes titleCardPop {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ============================================================================
   ROM-FULLFØRT / FELTRAPPORT SPLASH SCREEN (DEPECHE FRA STABEN)
   ============================================================================ */

.room-victory-splash-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(10, 8, 6, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: victoryFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    box-sizing: border-box;
}

.room-victory-splash-overlay.fading-out {
    animation: victoryFadeOut 0.32s ease forwards;
    pointer-events: none;
}

.victory-backdrop-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 25%, rgba(0, 0, 0, 0.92) 100%);
    pointer-events: none;
}

.victory-dispatch-container {
    position: relative;
    max-width: 680px;
    width: 100%;
    margin: auto;
    z-index: 2;
    animation: dispatchDropIn 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.15) forwards;
}

.victory-dispatch-paper {
    background: #f4ecdc;
    background-image: 
        radial-gradient(#dbcbb1 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.45), rgba(0, 0, 0, 0.06));
    background-size: 20px 20px, 100% 100%;
    border: 3px double #5c4514;
    border-radius: 4px;
    padding: 28px 32px;
    box-shadow: 
        0 0 0 1px rgba(0, 0, 0, 0.6),
        0 18px 45px rgba(0, 0, 0, 0.8),
        inset 0 0 40px rgba(117, 98, 71, 0.22);
    color: #1f1b18;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.victory-dispatch-paper::before,
.victory-dispatch-paper::after {
    content: "✦";
    position: absolute;
    font-size: 14px;
    color: #7c6239;
    opacity: 0.6;
}
.victory-dispatch-paper::before { top: 10px; left: 12px; }
.victory-dispatch-paper::after { top: 10px; right: 12px; }

.dispatch-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 2px solid #8c734b;
}

.dispatch-eyebrow {
    font-family: var(--font-heading, 'Cinzel', serif);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #852a20;
    text-transform: uppercase;
}

.dispatch-sector {
    font-family: var(--font-typewriter, monospace);
    font-size: 0.8rem;
    color: #5a4b37;
    font-weight: bold;
}

.dispatch-title {
    font-family: var(--font-heading, 'Cinzel', serif);
    font-size: 1.55rem;
    font-weight: 900;
    color: #2b1f13;
    margin: 16px 0 6px 0;
    line-height: 1.25;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dispatch-subtitle {
    font-family: var(--font-story, 'Playfair Display', serif);
    font-style: italic;
    font-size: 1.02rem;
    color: #5c4514;
    margin-bottom: 14px;
    line-height: 1.4;
}

.dispatch-body {
    font-family: var(--font-typewriter, monospace);
    font-size: 0.93rem;
    line-height: 1.65;
    color: #26201a;
    background: rgba(0, 0, 0, 0.035);
    border-left: 3px solid #852a20;
    padding: 12px 16px;
    margin: 12px 0 16px 0;
    border-radius: 0 4px 4px 0;
}

/* Det animerte røde militærstempelet */
.dispatch-stamp-badge {
    position: absolute;
    top: 48px;
    right: 28px;
    pointer-events: none;
    animation: stampSlam 0.38s cubic-bezier(0.25, 1, 0.5, 1) 0.28s forwards;
    opacity: 0;
    transform: scale(2.4) rotate(14deg);
}

.stamp-inner {
    border: 3px double #9e2a2b;
    color: #9e2a2b;
    padding: 6px 14px;
    font-family: var(--font-heading, 'Cinzel', serif);
    font-weight: 900;
    font-size: 0.84rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    background: rgba(158, 42, 43, 0.08);
    box-shadow: 0 0 6px rgba(158, 42, 43, 0.22);
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    transform: rotate(-7deg);
}

.stamp-inner .stamp-star {
    font-size: 0.75rem;
}

/* Regimentsstatus og målere */
.dispatch-stats-section {
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid #c4b59d;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 18px;
}

.dispatch-stats-header {
    font-family: var(--font-heading, 'Cinzel', serif);
    font-size: 0.82rem;
    font-weight: 700;
    color: #4a3b2c;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
    border-bottom: 1px solid #dcd1bf;
    padding-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dispatch-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.04);
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid rgba(140, 115, 75, 0.2);
}

.stat-pill-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stat-pill-content {
    display: flex;
    flex-direction: column;
}

.stat-pill-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #6a553b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-pill-val {
    font-family: var(--font-typewriter, monospace);
    font-size: 0.8rem;
    font-weight: 700;
    color: #1f1b18;
    margin-top: 1px;
}

/* Handlingsknapp */
.dispatch-action-row {
    display: flex;
    justify-content: center;
    margin-top: 4px;
}

.dispatch-next-btn {
    background: linear-gradient(180deg, #9e2a2b 0%, #721c24 100%);
    color: #f8f1e5;
    border: 2px solid #54141a;
    border-radius: 4px;
    padding: 13px 26px;
    font-family: var(--font-heading, 'Cinzel', serif);
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
    box-shadow: 
        0 4px 15px rgba(114, 28, 36, 0.45),
        inset 0 1px 1px rgba(255, 255, 255, 0.25);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    width: 100%;
    justify-content: center;
    max-width: 480px;
}

.dispatch-next-btn:hover {
    background: linear-gradient(180deg, #b33233 0%, #832029 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 6px 22px rgba(114, 28, 36, 0.6),
        inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.dispatch-next-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(114, 28, 36, 0.4);
}

.dispatch-keyboard-hint {
    font-family: var(--font-typewriter, monospace);
    font-size: 0.76rem;
    color: #8c734b;
    text-align: center;
    margin-top: 9px;
}

.dispatch-keyboard-hint kbd {
    background: #e5dac4;
    border: 1px solid #baa98f;
    border-radius: 3px;
    padding: 1px 6px;
    font-size: 0.72rem;
    color: #3b2d1d;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* Animasjoner for depeche og stempel */
@keyframes victoryFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes victoryFadeOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.97); }
}

@keyframes dispatchDropIn {
    0% {
        opacity: 0;
        transform: translateY(-26px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes stampSlam {
    0% {
        opacity: 0;
        transform: scale(2.6) rotate(16deg);
    }
    70% {
        opacity: 1;
        transform: scale(0.95) rotate(-8deg);
    }
    100% {
        opacity: 0.95;
        transform: scale(1) rotate(-6deg);
    }
}

@media (max-width: 600px) {
    .victory-dispatch-paper {
        padding: 20px 16px;
    }
    .dispatch-title {
        font-size: 1.25rem;
    }
    .dispatch-stamp-badge {
        position: static;
        margin: 10px 0;
        display: inline-block;
        transform: none;
    }
    .stamp-inner {
        transform: none;
    }
    .dispatch-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================================================
   ORDKONGEN VICTORY DEBRIEF & PRINT STYLES
   ============================================================================ */
.ordspill-recommend-card:hover {
    transform: translateY(-4px);
    border-color: #f5b041 !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.75) !important;
}

.ordspill-recommend-card:hover img {
    transform: scale(1.06);
}

@media print {
    body, #game-root {
        background: #fff !important;
        color: #000 !important;
        overflow: visible !important;
        height: auto !important;
    }
    #top-bar, #stage-background, #stage-vignette, .top-bar-tab-handle,
    #btn-print-diploma, #btn-back-to-newspaper, #btn-victory-portal, #btn-victory-restart,
    #btn-open-victory, #btn-exit-portal, #btn-restart, .title-screen-container {
        display: none !important;
    }
    .task-card, .ordkongen-victory-wrapper {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        max-width: 100% !important;
    }
    .ordkongen-victory-box {
        background: #fff !important;
        color: #000 !important;
        border: 2px solid #222 !important;
        box-shadow: none !important;
        padding: 16px !important;
    }
    .ordkongen-victory-box * {
        color: #111 !important;
        border-color: #ccc !important;
        box-shadow: none !important;
    }
    h2, h3, h4 {
        color: #852a20 !important;
    }
}

