:root {
    --bg-deep: #0a0908;
    --panel-bg: #141210;
    --panel-border: #383025;
    --gold: #d4a359;
    --gold-bright: #f3c77c;
    --cinnabar: #b83a38;
    --cinnabar-bright: #e74c3c;
    --jade: #3a8a6b;
    --jade-glow: #5fd4a7;
    --text-main: #dfd7ca;
    --text-dim: #8f8576;
    --font-title: 'Cinzel', serif;
    --font-body: 'Noto Serif', serif;
    --font-mono: 'Share Tech Mono', monospace;
}

* , *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    touch-action: manipulation;
}

html, body {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: var(--font-body);
    display: flex;
    flex-direction: column;
    background-image: 
        radial-gradient(circle at 50% 20%, rgba(212, 163, 89, 0.08) 0%, transparent 60%),
        radial-gradient(circle at 80% 80%, rgba(184, 58, 56, 0.05) 0%, transparent 50%);
}

/* BARRA SUPERIORE */
header {
    height: 48px;
    background: linear-gradient(180deg, #1b1814 0%, #100e0b 100%);
    border-bottom: 1px solid var(--panel-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    z-index: 10;
}

.title-group {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.main-title {
    font-family: var(--font-title);
    font-size: 1.25rem;
    letter-spacing: 3px;
    color: var(--gold-bright);
    text-shadow: 0 0 10px rgba(212, 163, 89, 0.4);
}

.subtitle {
    font-size: 0.8rem;
    color: var(--text-dim);
    letter-spacing: 1px;
    font-style: italic;
}

.status-tracker {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.status-item span {
    color: var(--gold);
    font-weight: bold;
}

.top-btn {
    background: rgba(212, 163, 89, 0.1);
    border: 1px solid var(--panel-border);
    color: var(--gold);
    padding: 4px 10px;
    font-size: 0.75rem;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s;
}
.top-btn:hover {
    background: var(--gold);
    color: #000;
}

/* CONTENITORE PRINCIPALE */
.workspace {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    grid-template-rows: minmax(0, 1fr) 56px;
    gap: 12px;
    padding: 12px;
    height: calc(100vh - 48px);
    max-height: calc(100vh - 48px);
    min-height: 0;
    min-width: 0;
    overflow: hidden;
}

/* SCENA FOTOGRAFICA HD */
.scene-viewport {
    background: #000;
    border: 1px solid var(--panel-border);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    min-height: 0;
    min-width: 0;
    height: 100%;
    width: 100%;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.8), 0 8px 24px rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpolygon points='1,1 1,14 4.5,10.5 7.5,16 9.5,15 6.5,9.5 12,9.5' fill='%23d4a359' stroke='%230a0908' stroke-width='1.2' stroke-linejoin='round'/%3E%3Cpolygon points='2,2 2,12 4.5,9.5 6.8,14 8,13.3 5.8,9 10.5,9' fill='%23ffffff' opacity='0.9'/%3E%3C/svg%3E") 1 1, default;
}

.scene-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 2px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.8);
}

.scene-image-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hd-scene-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.scene-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.95) contrast(1.05);
}

/* OVERLAY VESTIGIA DEL VASO ROTTO */
.broken-vase-overlay {
    position: absolute;
    left: 45%;
    top: 55%;
    width: 120px;
    height: 90px;
    pointer-events: none;
}

.glowing-relic {
    position: absolute;
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.2s;
}
.glowing-relic:hover {
    transform: scale(1.15);
}

.amulet-relic {
    left: 15px;
    top: 25px;
}
.amulet-relic .relic-icon {
    font-size: 1.8rem;
    color: var(--jade-glow);
    text-shadow: 0 0 16px var(--jade-glow), 0 0 30px var(--jade);
}

.scroll-relic {
    right: 15px;
    top: 20px;
}
.scroll-relic .relic-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 10px rgba(212, 163, 89, 0.8));
}

/* TALISMANO FLUTTUANTE CAMERA DEL SONNO */
.floating-talisman-overlay {
    position: absolute;
    left: 50%;
    top: 40%;
    transform: translate(-50%, -50%);
    animation: floatAnim 3s ease-in-out infinite alternate;
}

@keyframes floatAnim {
    0% { transform: translate(-50%, -46%); }
    100% { transform: translate(-50%, -54%); }
}

.final-talisman-glow {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(95,212,167,0.8) 0%, rgba(58,138,107,0.3) 60%, transparent 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px var(--jade-glow);
}

.talisman-symbol {
    font-size: 2.2rem;
    color: #fff;
    text-shadow: 0 0 12px var(--jade-glow);
}

/* HOTSPOT INTERATTIVI */
.hotspot-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hotspot {
    position: absolute;
    border: 1px solid transparent;
    background: transparent;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Ccircle cx='9' cy='9' r='4' fill='none' stroke='%23f3c77c' stroke-width='1.5'/%3E%3Ccircle cx='9' cy='9' r='1.2' fill='%23f3c77c'/%3E%3Cline x1='9' y1='1' x2='9' y2='4' stroke='%23f3c77c' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='9' y1='14' x2='9' y2='17' stroke='%23f3c77c' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='1' y1='9' x2='4' y2='9' stroke='%23f3c77c' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='14' y1='9' x2='17' y2='9' stroke='%23f3c77c' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") 9 9, pointer;
    pointer-events: auto;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
}

.hotspot:hover {
    border-color: rgba(243, 199, 124, 0.55);
    background: rgba(212, 163, 89, 0.10);
    box-shadow: 0 0 8px rgba(212, 163, 89, 0.35);
}

.hotspot-tag {
    position: absolute;
    bottom: -24px;
    background: rgba(14, 12, 10, 0.94);
    color: var(--gold-bright);
    border: 1px solid rgba(212, 163, 89, 0.45);
    padding: 2px 7px;
    font-size: 0.70rem;
    font-family: var(--font-title);
    letter-spacing: 0.5px;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(3px);
    transition: all 0.15s ease-out;
    pointer-events: none;
    border-radius: 2px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.7);
    z-index: 10;
}

.hotspot:hover .hotspot-tag {
    opacity: 1;
    transform: translateY(0);
}

/* VIGNETTA MODALE (STILE ERE INFORMATIQUE) */
.vignette-modal {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 340px;
    background: rgba(16, 14, 12, 0.96);
    border: 2px solid var(--gold);
    border-radius: 4px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.9);
    backdrop-filter: blur(8px);
    display: none;
    animation: fadeIn 0.25s ease;
    z-index: 25;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.vignette-header {
    background: rgba(212, 163, 89, 0.15);
    padding: 10px 14px;
    border-bottom: 1px solid var(--panel-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-title);
    font-size: 0.85rem;
    color: var(--gold-bright);
}

.vignette-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.3rem;
    cursor: pointer;
    line-height: 1;
}
.vignette-close:hover { color: var(--gold); }

.vignette-body {
    padding: 16px;
    text-align: center;
}

.vignette-desc {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-main);
    text-align: left;
    margin-bottom: 14px;
}

.vignette-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.btn-action {
    background: rgba(212, 163, 89, 0.15);
    border: 1px solid var(--gold);
    color: var(--gold-bright);
    padding: 6px 14px;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.2s;
}
.btn-action:hover {
    background: var(--gold);
    color: #000;
}

/* PANNELLO LATERALE: NARRATIVA E INVENTARIO */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
}

.log-panel {
    flex: 1;
    min-height: 0;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.log-header {
    flex-shrink: 0;
    padding: 10px 14px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--panel-border);
    font-family: var(--font-title);
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--gold);
}

.log-content {
    flex: 1;
    min-height: 0;
    padding: 14px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 0.92rem;
    line-height: 1.6;
}

.log-entry {
    border-left: 2px solid transparent;
    padding-left: 8px;
}
.log-entry.header {
    color: var(--gold-bright);
    font-family: var(--font-title);
    letter-spacing: 1px;
    margin-top: 6px;
    border-left-color: var(--gold);
}
.log-entry.narrative {
    color: var(--text-main);
    border-left-color: var(--gold);
}
.log-entry.command {
    color: var(--gold-bright);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    border-left-color: var(--text-dim);
}
.log-entry.system {
    color: var(--cinnabar-bright);
    font-style: italic;
}
.log-entry.discovery {
    color: var(--jade-glow);
    background: rgba(95, 212, 167, 0.08);
    padding: 6px 8px;
    border-radius: 3px;
    border-left-color: var(--jade);
}
.log-entry.exits {
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.8px;
    border-left-color: rgba(212, 175, 55, 0.35);
}

/* INVENTARIO */
.inventory-panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 4px;
    padding: 10px 14px;
}

.inv-title {
    font-family: var(--font-title);
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.inv-slots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.inv-slot {
    height: 52px;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--panel-border);
    border-radius: 3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    padding: 2px;
}

.inv-slot.occupied:hover {
    border-color: var(--gold);
    background: rgba(212, 163, 89, 0.12);
}

.inv-icon {
    font-size: 1.3rem;
    margin-bottom: 2px;
}

.inv-label {
    font-size: 0.65rem;
    color: var(--gold);
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
}

/* BARRA DI INPUT DEL PARSER */
.parser-bar {
    grid-column: 1 / -1;
    min-height: 0;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 4px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}

.parser-prompt {
    font-family: var(--font-mono);
    font-size: 1.15rem;
    color: var(--gold-bright);
    font-weight: bold;
}

.parser-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--font-mono);
    font-size: 1rem;
    color: #fff;
    letter-spacing: 1px;
}

.parser-input::placeholder {
    color: var(--text-dim);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-style: italic;
}

.quick-verbs {
    display: flex;
    gap: 6px;
}

.verb-chip {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--panel-border);
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
}

.verb-chip:hover {
    border-color: var(--gold);
    color: var(--gold-bright);
    background: rgba(212, 163, 89, 0.1);
}

/* ==========================================================================
   STILI PER GRAFICA RETRO ORIGINALE ATARI ST (1987)
   ========================================================================== */
.retro-frame-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, #1a1612 0%, #080706 100%);
    position: relative;
    padding: 8px;
    box-sizing: border-box;
}

.retro-art-border {
    position: relative;
    padding: 6px;
    background: #181410;
    border: 3px double var(--gold);
    box-shadow: 0 0 30px rgba(0,0,0,0.9), inset 0 0 15px rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 96%;
    max-height: 86%;
}

.retro-image {
    max-width: 100%;
    max-height: 100%;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    display: block;
    box-shadow: 0 0 10px rgba(0,0,0,0.8);
}

.retro-overlay-sprite {
    position: absolute;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    pointer-events: none;
    max-width: 100%;
}

.retro-overlay-sprite.broken-vase-st {
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
}

.retro-overlay-sprite.qin-dissolve-st {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.retro-badge {
    margin-top: 6px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 2px;
    color: var(--gold);
    opacity: 0.8;
}

/* ==========================================================================
   LANDING PAGE DEDICATA (SCHERMATA INTRODUTTIVA FEDELE ATARI ST)
   ========================================================================== */
.landing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(8, 7, 6, 0.96);
    backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.landing-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.landing-modal {
    position: relative;
    width: 100%;
    max-width: 1080px;
    max-height: 92vh;
    background: linear-gradient(160deg, #181512 0%, #0d0b09 100%);
    border: 2px solid var(--gold);
    border-radius: 6px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.95), 0 0 25px rgba(212, 163, 89, 0.25);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.landing-close-btn {
    position: absolute;
    top: 14px;
    right: 18px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--panel-border);
    color: var(--gold-bright);
    font-size: 1.5rem;
    line-height: 1;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 20;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing-close-btn:hover {
    background: var(--cinnabar);
    border-color: var(--gold);
    color: #fff;
    transform: scale(1.1);
}

.landing-slide {
    display: flex;
    flex-direction: row;
    gap: 28px;
    padding: 28px;
    align-items: center;
}

@media (max-width: 860px) {
    .landing-slide {
        flex-direction: column;
        padding: 20px;
        gap: 18px;
    }
}

.landing-art-container {
    flex: 1.1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #000;
    border: 1px solid var(--gold);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.7);
}

.landing-img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.landing-art-badge {
    width: 100%;
    background: rgba(14, 12, 10, 0.95);
    border-top: 1px solid var(--panel-border);
    color: var(--gold);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 2px;
    padding: 6px 10px;
    text-align: center;
    text-transform: uppercase;
}

.landing-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.landing-header-group {
    margin-bottom: 16px;
}

.landing-title {
    font-family: var(--font-title);
    font-size: 2.4rem;
    color: var(--gold-bright);
    letter-spacing: 4px;
    line-height: 1.1;
    text-shadow: 0 0 15px rgba(212, 163, 89, 0.5);
    margin-bottom: 6px;
}

.landing-title.small {
    font-size: 1.8rem;
}

.landing-subtitle {
    font-family: var(--font-title);
    font-size: 1.05rem;
    color: var(--text-main);
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.landing-credits {
    font-size: 0.8rem;
    color: var(--gold);
    letter-spacing: 1px;
    font-style: italic;
}

.landing-body-text {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-main);
    margin-bottom: 24px;
}

.landing-scroll-text {
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--text-main);
    max-height: 240px;
    overflow-y: auto;
    padding-right: 12px;
    margin-bottom: 20px;
    border-left: 2px solid var(--gold);
    padding-left: 14px;
}

.landing-scroll-text p {
    margin-bottom: 12px;
}

.landing-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.landing-btn {
    padding: 12px 20px;
    font-family: var(--font-title);
    font-size: 0.9rem;
    letter-spacing: 2px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    text-align: center;
}

.landing-btn.primary {
    background: linear-gradient(180deg, #d4a359 0%, #a47633 100%);
    color: #100e0b;
    border: 1px solid #f3c77c;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(212, 163, 89, 0.35);
}

.landing-btn.primary:hover {
    background: linear-gradient(180deg, #f3c77c 0%, #c48c3b 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 163, 89, 0.55);
}

.landing-btn.secondary {
    background: rgba(212, 163, 89, 0.1);
    color: var(--gold-bright);
    border: 1px solid var(--panel-border);
}

.landing-btn.secondary:hover {
    background: rgba(212, 163, 89, 0.2);
    border-color: var(--gold);
}

.landing-btn.mode-btn {
    background: transparent;
    color: var(--text-dim);
    border: 1px dashed var(--panel-border);
    font-size: 0.78rem;
    padding: 8px 12px;
}

.landing-btn.mode-btn:hover {
    color: var(--gold);
    border-color: var(--gold);
}

/* ==========================================================================
   MODALE ISPEZIONE DOCUMENTI / PIANI (PLAN 1..5)
   ========================================================================== */
.item-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.item-viewer-dialog {
    width: 100%;
    max-width: 760px;
    background: #141210;
    border: 2px solid var(--gold);
    box-shadow: 0 0 35px rgba(0,0,0,0.9);
    border-radius: 6px;
    overflow: hidden;
}

.item-viewer-header {
    background: linear-gradient(180deg, #221c16 0%, #15110d 100%);
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--panel-border);
    font-family: var(--font-title);
    color: var(--gold-bright);
    letter-spacing: 2px;
    font-size: 0.95rem;
}

.item-viewer-close {
    background: transparent;
    border: none;
    color: var(--gold);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
}

.item-viewer-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.item-viewer-img {
    max-width: 100%;
    max-height: 55vh;
    border: 1px solid var(--gold);
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.6);
}

.item-viewer-desc {
    color: var(--text-main);
    font-size: 0.88rem;
    line-height: 1.5;
    text-align: center;
    font-style: italic;
}

/* ==========================================================================
   MODALE MANUALE NARRATIVO & GUIDA SOLUZIONE
   ========================================================================== */
.manual-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.manual-dialog {
    width: 100%;
    max-width: 960px;
    height: 90vh;
    background: #12100d;
    border: 2px solid var(--gold);
    box-shadow: 0 0 50px rgba(0,0,0,0.95), 0 0 25px rgba(212, 163, 89, 0.25);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.manual-header {
    background: linear-gradient(180deg, #241e17 0%, #15110d 100%);
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--gold);
}

.manual-header-title {
    font-family: var(--font-title);
    color: var(--gold-bright);
    letter-spacing: 2px;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.manual-nav {
    display: flex;
    gap: 8px;
    padding: 10px 20px;
    background: #181410;
    border-bottom: 1px solid var(--panel-border);
    overflow-x: auto;
}

.manual-tab-btn {
    background: rgba(212, 163, 89, 0.08);
    border: 1px solid var(--panel-border);
    color: var(--text-dim);
    padding: 6px 14px;
    font-size: 0.8rem;
    font-family: var(--font-title);
    letter-spacing: 1px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.manual-tab-btn:hover, .manual-tab-btn.active {
    background: var(--gold);
    color: #000;
    border-color: var(--gold-bright);
    font-weight: bold;
}

.manual-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
    font-family: var(--font-serif);
    color: var(--text-main);
    line-height: 1.7;
    font-size: 0.95rem;
}

.manual-body h2 {
    font-family: var(--font-title);
    color: var(--gold-bright);
    border-bottom: 1px solid var(--gold);
    padding-bottom: 6px;
    margin: 24px 0 14px 0;
    font-size: 1.25rem;
    letter-spacing: 1.5px;
}

.manual-body h3 {
    font-family: var(--font-title);
    color: #e5b369;
    margin: 18px 0 8px 0;
    font-size: 1.05rem;
}

.manual-body p {
    margin-bottom: 12px;
}

.manual-snodo-box {
    background: rgba(30, 22, 14, 0.85);
    border: 1px solid var(--gold);
    border-left: 4px solid var(--gold-bright);
    padding: 14px 18px;
    margin: 14px 0 20px 0;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.manual-snodo-title {
    font-family: var(--font-title);
    color: var(--gold-bright);
    font-size: 0.92rem;
    letter-spacing: 1px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.manual-snodo-list {
    margin: 0;
    padding-left: 20px;
    font-size: 0.88rem;
}

.manual-snodo-list li {
    margin-bottom: 6px;
}

.manual-code {
    background: #000;
    color: #5fd4a7;
    font-family: var(--font-mono);
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid rgba(95, 212, 167, 0.3);
    font-size: 0.85rem;
    font-weight: bold;
}

.manual-step-list {
    background: #0d0c0a;
    border: 1px solid var(--panel-border);
    padding: 16px 20px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    columns: 2;
    column-gap: 30px;
}

.manual-step-list ol {
    margin: 0;
    padding-left: 20px;
}

.manual-step-list li {
    margin-bottom: 4px;
    color: #d1c7bd;
}

.manual-step-list li code {
    color: var(--gold-bright);
    font-weight: bold;
}


/* Uscite della scena (motore originale): sempre visibili */
.exit-hotspot { border: 1px dashed rgba(243, 199, 124, 0.45); background: rgba(0, 0, 0, 0.18); }
.exit-hotspot .hotspot-tag { opacity: 1; transform: none; position: absolute; inset: auto 50% 50% auto; translate: 50% 50%; white-space: nowrap; }
.exit-hotspot:hover { background: rgba(243, 199, 124, 0.18); }
