:root {
    --font-narrative: 'IM Fell English', 'Georgia', 'Palatino Linotype', 'Book Antiqua', serif;
    --font-display: 'IM Fell English SC', 'Georgia', 'Times New Roman', serif;
    --font-mono: 'Courier Prime', 'SF Mono', 'Consolas', 'Liberation Mono', monospace;
    --font-label: 'IM Fell English', 'Georgia', serif;

    --bg-void: #04040c;
    --bg-betrothal: #0e0b07;
    --bg-escape: #05071c;
    --bg-curse: #070913;
    --bg-warmth: #0d0a05;
    --bg-clinical: #eae7e1;
    --bg-epilogue: #0b0b17;
    --bg-museum: #0c0a06;

    --text-narrative: #dbd0b8;
    --text-luc: #c4cddb;
    --text-clinical: #1a1a1e;
    --text-epilogue: #d2cab8;
    --text-label: #d8ceb4;

    --gold: #c8a860;
    --gold-dim: #a08848;
    --gold-pale: #d4c090;
    --ink: #1a1814;
    --parchment: #e8e0d0;

    --transition-slow: 2.2s;
    --transition-med: 1.1s;
    --transition-fast: 0.65s;
}
/* ── FORCE FONT RENDERING ── */
.phase {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

input, button {
    font-family: inherit;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #02020a;
    font-family: var(--font-narrative);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    user-select: none;
    -webkit-user-select: none;
    cursor: default;
}

/* ── ATMOSPHERE LAYER ── */
#atmosphere {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.3;
    background:
        radial-gradient(ellipse at 50% 35%, rgba(180, 150, 100, 0.05) 0%, transparent 65%),
        radial-gradient(ellipse at 28% 68%, rgba(100, 120, 160, 0.035) 0%, transparent 55%),
        radial-gradient(ellipse at 72% 18%, rgba(160, 140, 100, 0.025) 0%, transparent 50%);
    transition: opacity 3.2s ease;
}

/* ── INK-SPLATTER TEXTURE ── */
#ink-texture {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.04;
    background:
        radial-gradient(ellipse at 18% 22%, rgba(80, 60, 30, 0.6) 0%, transparent 40%),
        radial-gradient(ellipse at 82% 75%, rgba(60, 45, 25, 0.5) 0%, transparent 35%),
        radial-gradient(ellipse at 45% 55%, rgba(70, 50, 30, 0.4) 0%, transparent 30%);
    transition: opacity 4s ease;
}

/* ── VIGNETTE ── */
#vignette {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 99;
    background: radial-gradient(ellipse at center, transparent 46%, rgba(1, 1, 10, 0.8) 100%);
    transition: opacity var(--transition-slow) ease;
}

/* ── FADE OVERLAY ── */
#fade-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 200;
    background: #010108;
    opacity: 0;
    transition: opacity var(--transition-med) ease;
}
#fade-overlay.active {
    opacity: 1;
}

/* ── MAIN CONTAINER ── */
#main-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-void);
    transition: background var(--transition-slow) ease;
    overflow: hidden;
    z-index: 2;
}

/* ── PHASE BASE ── */
.phase {
    position: absolute;
    width: 100%;
    max-width: 700px;
    padding: 2rem 2.5rem;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast) ease;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.3rem;
}
.phase.active {
    opacity: 1;
    pointer-events: auto;
}
.phase.fading-out {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

/* ── NARRATIVE LINES ── */
.narrative-line {
    font-family: var(--font-narrative);
    font-size: 1.3rem;
    line-height: 1.75;
    color: var(--text-narrative);
    letter-spacing: 0.025em;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    font-style: italic;
    text-shadow: 0 0 55px rgba(200, 175, 135, 0.1);
    max-width: 570px;
}
.narrative-line.visible {
    opacity: 1;
    transform: translateY(0);
}
.narrative-line.emphasis {
    font-style: normal;
    font-size: 1.45rem;
    letter-spacing: 0.04em;
    text-shadow: 0 0 65px rgba(210, 180, 140, 0.18);
    color: #e6d9bf;
    font-variant: small-caps;
    font-family: var(--font-display);
}

/* ── CONTINUE HINT ── */
.continue-hint {
    font-family: var(--font-display);
    font-size: 0.65rem;
    color: rgba(200, 180, 150, 0.32);
    letter-spacing: 0.14em;
    opacity: 0;
    transition: opacity 1.2s ease;
    margin-top: 0.3rem;
}
.continue-hint.show {
    opacity: 0.55;
    animation: hintPulse 3.8s ease-in-out infinite;
}
@keyframes hintPulse {
    0%, 100% { opacity: 0.25; }
    50% { opacity: 0.65; }
}

/* ── DIALOGUE ── */
.dialogue-line {
    font-family: var(--font-narrative);
    font-size: 1.2rem;
    line-height: 1.65;
    letter-spacing: 0.02em;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.75s ease, transform 0.75s ease;
    max-width: 540px;
}
.dialogue-line.visible {
    opacity: 1;
    transform: translateY(0);
}
.dialogue-line.addie {
    color: var(--text-narrative);
    font-style: italic;
    text-shadow: 0 0 32px rgba(190, 160, 120, 0.1);
}
.dialogue-line.luc {
    color: var(--text-luc);
    font-style: normal;
    letter-spacing: 0.035em;
    text-shadow: 0 0 28px rgba(150, 170, 200, 0.07);
    font-family: var(--font-display);
    font-size: 1.15rem;
}
.dialogue-line.luc-warm {
    color: #d8cebc;
    text-shadow: 0 0 38px rgba(200, 175, 140, 0.12);
}
.dialogue-line.luc-cold {
    color: #bcc4d4;
    text-shadow: 0 0 20px rgba(140, 155, 185, 0.06);
}
.dialogue-line.luc-intimate {
    color: #d4c8b8;
    text-shadow: 0 0 42px rgba(200, 170, 135, 0.15);
    font-style: italic;
    font-family: var(--font-narrative);
}

/* ── CHOICE UI ── */
.choice-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
    margin-top: 0.5rem;
}
.choice-container.visible {
    opacity: 1;
    pointer-events: auto;
}
.choice-prompt {
    font-family: var(--font-display);
    font-size: 0.78rem;
    color: rgba(200, 180, 155, 0.5);
    letter-spacing: 0.07em;
    margin-bottom: 0.1rem;
}
.choice-btn {
    font-family: var(--font-narrative);
    font-size: 1rem;
    letter-spacing: 0.06em;
    padding: 0.7rem 1.8rem;
    border: 1px solid rgba(200, 170, 130, 0.25);
    background: transparent;
    color: var(--text-narrative);
    cursor: pointer;
    transition: all 0.5s ease;
    min-width: 200px;
    text-align: center;
    position: relative;
}
.choice-btn:hover {
    border-color: rgba(200, 170, 130, 0.6);
    background: rgba(200, 170, 130, 0.04);
    text-shadow: 0 0 32px rgba(200, 170, 130, 0.3);
    box-shadow: 0 0 55px rgba(180, 140, 100, 0.05);
    letter-spacing: 0.1em;
}
.choice-btn.resistance-btn { border-color: rgba(180, 150, 160, 0.28); color: #d4c8c0; }
.choice-btn.reflection-btn { border-color: rgba(160, 170, 190, 0.28); color: #c8cdd6; }
.choice-btn.surrender-btn { border-color: rgba(190, 160, 130, 0.3); color: #ddd2be; }

/* ── RESOLUTION ── */
.resolution-text {
    font-family: var(--font-narrative);
    font-size: 1.45rem;
    line-height: 1.7;
    color: #e8d8b8;
    letter-spacing: 0.035em;
    opacity: 0;
    transition: opacity 1.3s ease;
    text-shadow: 0 0 65px rgba(220, 190, 140, 0.3);
    font-style: italic;
}
.resolution-text.visible { opacity: 1; }

/* ── CONTRADICTION SCREEN (FIXED) ── */
/* #phase-act5 inherits #eae7e1 background from JS */
.contradiction-text {
    font-family: var(--font-mono);
    font-size: 0.92rem;
    color: var(--text-clinical);
    letter-spacing: 0.05em;
    opacity: 0;
    transition: opacity 1s ease;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.contradiction-text.visible {
    opacity: 0.85;
}
.contradiction-sub {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: rgba(30, 30, 38, 0.45);
    letter-spacing: 0.1em;
    opacity: 0;
    transition: opacity 1.2s ease 0.6s;
}
.contradiction-sub.visible {
    opacity: 0.5;
}
.glitch-flicker {
    animation: subtleFlicker 5s ease-in-out infinite;
}
@keyframes subtleFlicker {
    0%, 94%, 100% { opacity: 0.85; }
    94.5% { opacity: 0.55; }
    95% { opacity: 0.9; }
    95.5% { opacity: 0.6; }
    96% { opacity: 0.85; }
}

/* ── HIDDEN FRAGMENT ── */
.hidden-fragment {
    position: fixed;
    z-index: 50;
    pointer-events: auto;
    cursor: pointer;
    opacity: 0.28;
    transition: opacity 0.7s ease, transform 0.7s ease;
    animation: fragmentGlow 5s ease-in-out infinite;
}
.hidden-fragment:hover {
    opacity: 0.75;
    transform: scale(1.12);
}
.hidden-fragment.collected {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
@keyframes fragmentGlow {
    0%, 100% { opacity: 0.22; }
    50% { opacity: 0.4; }
}
.fragment-icon {
    font-size: 2.2rem;
    filter: drop-shadow(0 0 15px rgba(200, 170, 130, 0.35));
    display: block;
    text-align: center;
}
.fragment-tooltip {
    font-family: var(--font-narrative);
    font-size: 0.65rem;
    color: rgba(200, 180, 150, 0.6);
    font-style: italic;
    text-align: center;
    letter-spacing: 0.04em;
    margin-top: -3px;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.hidden-fragment:hover .fragment-tooltip { opacity: 1; }

/* ── MUSIC TOGGLE ── */
.music-toggle {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 300;
    font-family: var(--font-display);
    font-size: 0.6rem;
    color: rgba(200, 180, 150, 0.4);
    letter-spacing: 0.08em;
    cursor: pointer;
    background: transparent;
    border: 1px solid rgba(200, 170, 130, 0.2);
    padding: 0.4rem 0.8rem;
    transition: all 0.5s ease;
}
.music-toggle:hover {
    color: rgba(200, 180, 150, 0.7);
    border-color: rgba(200, 170, 130, 0.5);
}

/* ── EPILOGUE SEARCH ── */
#epilogue .search-label {
    font-family: 'IM Fell English SC', Georgia, 'Times New Roman', serif;
    font-size: 1.5rem;
    color: #d2cab8;
    letter-spacing: 0.06em;
    font-style: normal;
    opacity: 0;
    transition: opacity 1s ease;
    text-shadow: 0 0 38px rgba(200, 180, 150, 0.13);
}
#epilogue .search-label.visible { 
    opacity: 1; 
}

#epilogue .search-wrapper {
    opacity: 0;
    transition: opacity 1s ease 0.5s;
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
}
#epilogue .search-wrapper.visible { 
    opacity: 1; 
}

#epilogue .search-input {
    width: 100%;
    padding: 0.8rem 1.3rem;
    font-family: 'Courier Prime', 'SF Mono', 'Consolas', monospace;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    background: rgba(200, 180, 150, 0.04);
    border: none;
    border-bottom: 1px solid rgba(200, 180, 150, 0.35);
    color: #d2cab8;
    text-align: center;
    outline: none;
    transition: border-color 0.6s ease, box-shadow 0.6s ease;
    caret-color: rgba(200, 170, 130, 0.7);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 0;
}
#epilogue .search-input::placeholder {
    color: rgba(180, 165, 140, 0.3);
    font-style: italic;
    font-family: 'Courier Prime', 'SF Mono', 'Consolas', monospace;
    opacity: 1;
}
#epilogue .search-input:focus {
    border-bottom-color: rgba(200, 170, 130, 0.7);
    box-shadow: 0 8px 30px -10px rgba(180, 150, 110, 0.1);
    outline: none;
}

#epilogue .search-result {
    font-family: 'Courier Prime', 'SF Mono', 'Consolas', monospace;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    opacity: 0;
    transition: opacity 0.7s ease;
    max-width: 400px;
    line-height: 1.6;
    color: #d2cab8;
}
#epilogue .search-result.visible { 
    opacity: 1; 
}
#epilogue .search-result.no-result { 
    color: rgba(180, 170, 155, 0.5); 
    font-style: italic; 
}
#epilogue .search-result.found { 
    color: #d4c4a8; 
}

#epilogue .result-card {
    border: 1px solid rgba(200, 170, 130, 0.22);
    padding: 1rem 1.5rem;
    background: rgba(200, 170, 130, 0.03);
    text-align: left;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}
#epilogue .result-card .result-name {
    font-family: 'IM Fell English SC', Georgia, 'Times New Roman', serif;
    font-size: 1.05rem;
    color: #d8c8a8;
    letter-spacing: 0.06em;
    margin-bottom: 0.3rem;
}
#epilogue .result-card .result-status {
    font-family: 'Courier Prime', 'SF Mono', 'Consolas', monospace;
    font-size: 0.7rem;
    color: rgba(200, 180, 150, 0.55);
    letter-spacing: 0.07em;
    margin-bottom: 0.5rem;
}
#epilogue .result-card .result-line {
    font-family: 'IM Fell English', Georgia, 'Times New Roman', serif;
    font-size: 0.85rem;
    color: rgba(210, 195, 165, 0.7);
    font-style: italic;
    line-height: 1.5;
}

#epilogue .sync-line {
    font-family: 'Courier Prime', 'SF Mono', 'Consolas', monospace;
    font-size: 0.58rem;
    color: rgba(180, 170, 150, 0.4);
    letter-spacing: 0.08em;
    opacity: 0;
    transition: opacity 1.4s ease 1s;
}
#epilogue .sync-line.visible { 
    opacity: 0.5; 
}

#epilogue .museum-link {
    font-family: 'IM Fell English SC', Georgia, 'Times New Roman', serif;
    font-size: 0.7rem;
    color: rgba(200, 180, 150, 0.5);
    letter-spacing: 0.1em;
    cursor: pointer;
    opacity: 0;
    transition: opacity 1.2s ease 2s, color 0.4s ease;
    text-decoration: none;
    border-bottom: 1px dotted rgba(200, 180, 150, 0.25);
    padding-bottom: 2px;
    background: none;
}
#epilogue .museum-link.visible { 
    opacity: 0.6; 
}
#epilogue .museum-link:hover { 
    opacity: 0.9; 
    color: #d4c090; 
}
/* ── MEMORY MUSEUM ── */
#museum-phase {
    position: absolute;
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    opacity: 0;
    pointer-events: none;
    z-index: 15;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-y: auto;
    padding: 2.5rem 1.5rem 4rem;
    transition: opacity 1s ease;
    gap: 1.8rem;
}
#museum-phase.active {
    opacity: 1;
    pointer-events: auto;
}
#museum-phase .museum-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: #d8ceb4;
    letter-spacing: 0.08em;
    text-shadow: 0 0 50px rgba(200, 170, 130, 0.2);
    margin-bottom: 0.3rem;
}
#museum-phase .museum-subtitle {
    font-family: var(--font-narrative);
    font-size: 0.85rem;
    color: rgba(200, 180, 150, 0.45);
    font-style: italic;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}
#museum-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    justify-content: center;
    max-width: 620px;
}
.museum-artifact {
    width: 110px;
    height: 140px;
    border: 1px solid rgba(200, 170, 130, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.5s ease;
    position: relative;
    background: rgba(200, 170, 130, 0.015);
    gap: 0.3rem;
    padding: 0.6rem;
}
.museum-artifact:hover {
    border-color: rgba(200, 170, 130, 0.55);
    background: rgba(200, 170, 130, 0.05);
    box-shadow: 0 0 45px rgba(180, 140, 100, 0.08);
}
.museum-artifact .artifact-emoji {
    font-size: 2.8rem;
    filter: drop-shadow(0 0 20px rgba(200, 170, 130, 0.18));
}
.museum-artifact .artifact-name {
    font-family: var(--font-display);
    font-size: 0.6rem;
    color: rgba(200, 180, 150, 0.55);
    letter-spacing: 0.06em;
    text-align: center;
}
.museum-artifact.locked {
    opacity: 0.3;
    cursor: default;
    filter: grayscale(0.6);
}
.museum-artifact.locked:hover {
    border-color: rgba(200, 170, 130, 0.15);
    background: transparent;
    box-shadow: none;
}

/* ── ARTIFACT DETAIL OVERLAY ── */
#artifact-detail-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(4, 3, 8, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}
#artifact-detail-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}
#artifact-detail-card {
    background: #0e0c07;
    border: 1px solid rgba(200, 170, 130, 0.3);
    padding: 2rem 2.2rem;
    max-width: 520px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    text-align: left;
    box-shadow: 0 0 80px rgba(180, 140, 100, 0.1);
}
#artifact-detail-card .detail-emoji {
    font-size: 3.5rem;
    text-align: center;
    margin-bottom: 0.8rem;
}
#artifact-detail-card .detail-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: #d8ceb4;
    letter-spacing: 0.06em;
    text-align: center;
    margin-bottom: 0.3rem;
}
#artifact-detail-card .detail-creator {
    font-family: var(--font-narrative);
    font-size: 0.75rem;
    color: rgba(200, 180, 150, 0.4);
    font-style: italic;
    text-align: center;
    margin-bottom: 1rem;
}
#artifact-detail-card .detail-description {
    font-family: var(--font-label);
    font-size: 0.95rem;
    color: #d0c4aa;
    line-height: 1.7;
    letter-spacing: 0.02em;
    font-style: italic;
}
#artifact-detail-card .detail-description strong {
    font-family: var(--font-display);
    font-weight: normal;
    color: #e0d4b8;
    letter-spacing: 0.04em;
    font-style: normal;
}
#artifact-detail-card .close-detail {
    font-family: var(--font-display);
    font-size: 0.7rem;
    color: rgba(200, 180, 150, 0.5);
    letter-spacing: 0.1em;
    cursor: pointer;
    text-align: center;
    margin-top: 1.2rem;
    transition: color 0.4s ease;
}
#artifact-detail-card .close-detail:hover {
    color: var(--gold-pale);
}

/* ── COLLECTION TOAST ── */
#collection-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 250;
    font-family: var(--font-display);
    font-size: 0.7rem;
    color: #d8ceb4;
    letter-spacing: 0.08em;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
    text-shadow: 0 0 25px rgba(200, 170, 130, 0.35);
    background: rgba(8, 7, 4, 0.75);
    padding: 0.5rem 1.2rem;
    border: 1px solid rgba(200, 170, 130, 0.2);
}
#collection-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-6px);
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
    .phase { padding: 1.3rem 0.9rem; gap: 1rem; max-width: 100%; }
    .narrative-line { font-size: 1.05rem; line-height: 1.55; }
    .narrative-line.emphasis { font-size: 1.15rem; }
    .dialogue-line { font-size: 1rem; line-height: 1.45; }
    .dialogue-line.luc { font-size: 0.95rem; }
    .choice-btn { font-size: 0.9rem; padding: 0.6rem 1.3rem; min-width: 150px; }
    .resolution-text { font-size: 1.1rem; }
    #epilogue .search-label { font-size: 1.2rem; }
    .museum-artifact { width: 85px; height: 115px; padding: 0.4rem; }
    .museum-artifact .artifact-emoji { font-size: 2.2rem; }
    #museum-grid { gap: 0.8rem; }
    .hidden-fragment .fragment-icon { font-size: 1.6rem; }
}
/* ── DATABASE TEXT OVERRIDE (FORCE ALL TEXT VISIBLE) ── */
#phase-epilogue .search-label,
#phase-epilogue .search-input,
#phase-epilogue .search-result,
#phase-epilogue .sync-line,
#phase-epilogue .museum-link,
#phase-epilogue .result-card,
#phase-epilogue .result-name,
#phase-epilogue .result-status,
#phase-epilogue .result-line {
    color: #d2cab8 !important;
}

#phase-epilogue .search-result.no-result {
    color: rgba(180, 170, 155, 0.5) !important;
}

#phase-epilogue .search-result.found {
    color: #d4c4a8 !important;
}

#phase-epilogue .result-card .result-name {
    color: #d8c8a8 !important;
    font-family: 'IM Fell English SC', Georgia, 'Times New Roman', serif !important;
}

#phase-epilogue .result-card .result-status {
    color: rgba(200, 180, 150, 0.55) !important;
    font-family: 'Courier Prime', 'SF Mono', 'Consolas', monospace !important;
}

#phase-epilogue .result-card .result-line {
    color: rgba(210, 195, 165, 0.7) !important;
    font-family: 'IM Fell English', Georgia, 'Times New Roman', serif !important;
    font-style: italic !important;
}

#phase-epilogue .sync-line {
    color: rgba(180, 170, 150, 0.5) !important;
    font-family: 'Courier Prime', 'SF Mono', 'Consolas', monospace !important;
}

#phase-epilogue .museum-link {
    color: rgba(200, 180, 150, 0.5) !important;
    font-family: 'IM Fell English SC', Georgia, 'Times New Roman', serif !important;
    background: none !important;
    border-bottom: 1px dotted rgba(200, 180, 150, 0.25) !important;
}

#phase-epilogue .search-input {
    color: #d2cab8 !important;
    font-family: 'Courier Prime', 'SF Mono', 'Consolas', monospace !important;
    background: rgba(200, 180, 150, 0.04) !important;
    border-bottom: 1px solid rgba(200, 180, 150, 0.35) !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

#scrapbook-frame {
    position: fixed;
    inset: 0;
    z-index: 500;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

#scrapbook-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}
/* ── Z-INDEX FIX: MUSEUM OVER EPILOGUE ── */
#museum-phase {
    z-index: 20 !important;
}

#museum-phase.active {
    z-index: 25 !important;
    pointer-events: auto !important;
}

#return-from-museum {
    z-index: 30 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    position: relative !important;
}

/* Ensure epilogue is behind museum when museum is open */
#phase-epilogue {
    z-index: 10 !important;
}