:root {
    --bg-color: #e0f7fa; /* Light pastel blue */
    --desk-color: #fce4ec; /* Pastel pink/mahogany vibe */
    --file-color: #fffdf7;
    --text-main: #37474f;
    
    /* Stamp Colors */
    --stamp-absolve: #c8e6c9;
    --stamp-minor: #fff9c4;
    --stamp-reversal: #e1bee7;
    --stamp-smite: #ffcdd2;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}
/* Shift the progress bar safe-zone for Torment (40% to 90%) */
body.theme-torment .safe-zone-marker {
    left: 40%;
    width: 50%; /* Covers the gap between 40% and 90% */
    background: rgba(255, 82, 82, 0.2); /* Gives it a slight reddish tint */
    border-left: 1px solid rgba(255,0,0,0.4);
    border-right: 1px solid rgba(255,0,0,0.4);
}

#game-container {
    width: 100%;
    position: relative; /* <--- ADD THIS LINE! */
    max-width: 800px;
    height: 90vh;
    z-index: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--desk-color);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 4px solid #f8bbd0;
}

/* Dashboard */
#dashboard {
    background-color: rgba(255, 255, 255, 0.7);
    padding: 12px 20px; /* Slightly tightened padding to fit everything */
    display: grid;
    grid-template-columns: 1fr auto 1fr; /* This mathematically locks column 2 to the exact center */
    align-items: start;
    border-bottom: 2px dashed #f48fb1;
    border-radius: 20px;
}
.dash-side.left {
    display: flex;
    justify-content: flex-start;
}

.dash-center {
    display: flex;
    justify-content: center;
}

.dash-side.right {
    display: flex;
    justify-content: flex-end;
    gap: 15px; /* Squeezes the badges and energy closer together */
}

.stat-box { text-align: center; }
.stat-label { font-size: 0.8em; text-transform: uppercase; letter-spacing: 1px; color: #888; }
.stat-value { font-size: 1.5em; font-weight: bold; }

.progress-bar {
    width: 120px;
    height: 12px;
    background: #eee;
    border-radius: 5px;
    margin-top: 5px;
    overflow: hidden;
}
#believer-bar {
    height: 100%;
    width: 50%;
    transition: width 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s;
    z-index: 2;
    position: relative;
}
/* Desk & Case File */
#desk {
    flex-grow: 1;
    display: flex;
    justify-content: center; 
    align-items: center;     
    padding: 10px; /* TIGHTENED from 16px */
    position: relative;
    overflow: hidden; /* Strict no-scroll */
}

#case-file {
    position: relative;
    background: var(--file-color);
    width: 100%; 
    flex-grow: 1; /* Fills the folder */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 15px 24px 12px; /* TIGHTENED from 20px 30px 16px */    
    border-radius: 2px;
    box-shadow: -2px 4px 10px rgba(0,0,0,0.12);
    border: 1px solid #e0d5c4;
    z-index: 2;
    transform: rotate(1deg); 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}
.paperclip {
    position: absolute;
    top: -14px; /* Lifted up to look like it's clipping to the folder behind it! */
    left: 30px;
    width: 24px;
    height: 56px;
    border: 2.5px solid #b0b0b0;
    border-radius: 12px 12px 4px 4px;
    background: transparent;
    z-index: 3;
    transform: rotate(5deg);
    opacity: 0.7;
}
.paperclip::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 3px;
    width: 12px;
    height: 38px;
    border: 2px solid #c0c0c0;
    border-radius: 8px 8px 3px 3px;
    background: transparent;
}

.file-header {
    font-size: 0.7em;
    color: #d32f2f;
    letter-spacing: 2px;
    border-bottom: 1px solid #d32f2f;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

#case-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 900;
    font-size: 1.15em; /* SHRUNK from 1.35em */
    margin-top: 0;
    margin-bottom: 4px; /* TIGHTENED */
    color: var(--text-main);
}
#case-description { 
    font-size: 0.95em; /* SHRUNK from 1.2em */
    line-height: 1.3; 
    margin-bottom: 4px;
}

/* Stamps */
#stamps {
    display: flex;
    padding: 20px;
    gap: 10px;
    background-color: rgba(255,255,255,0.5);
    border-top: 2px dashed #f48fb1;
        border-radius: 20px;

}

.stamp-btn {
    flex: 1;
    padding: 15px 5px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 10px;
    font-weight: bold;
    font-size: 1em;
    cursor: pointer;
    box-shadow: 0 6px 0 rgba(0,0,0,0.1);
    transition: all 0.1s;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    color: #444;
}

.stamp-btn span { font-size: 0.7em; font-weight: normal; margin-top: 5px; opacity: 0.8; }
.stamp-btn:active { transform: translateY(6px); box-shadow: 0 0 0 rgba(0,0,0,0.1); }
.stamp-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: 0 6px 0 rgba(0,0,0,0.1); }

.absolve { background-color: var(--stamp-absolve); }
.minor { background-color: var(--stamp-minor); }
.reversal { background-color: var(--stamp-reversal); }
.smite { background-color: var(--stamp-smite); }

#next-btn {
    background-color: #81d4fa;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 8px; /* TIGHTENED from 12px */
    padding: 6px 16px; /* TIGHTENED */
    font-size: 0.9em;
    align-self: flex-start; /* Keeps the button from stretching */
}
#outcome-section hr {
    border: none;
    border-top: 1px dashed var(--text-muted);
    margin: 8px 0; /* TIGHTENED from 12px */
    opacity: 0.4;
}

#outcome-section h3 {
    font-family: 'Special Elite', 'Courier New', monospace;
    font-size: 0.75em;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--ink-red);
    margin-bottom: 4px; /* TIGHTENED */
}

/* Modals */
.hidden { display: none !important; }
#game-over-modal {
    z-index: 9999 !important;
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex; justify-content: center; align-items: center;
}
.modal-content {
    background: white; padding: 40px; border-radius: 15px; text-align: center; max-width: 400px;
}
.modal-content button {
    margin-top: 20px; padding: 10px 20px; font-size: 1.1em; cursor: pointer;
}
/* =========================================
   BACKGROUND CLOUDS
   ========================================= */
.clouds-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    overflow: hidden;
    z-index: -1; /* Keeps clouds behind the game */
}

.cloud {
    position: absolute;
    background: #ffffff;
    border-radius: 50px;
    opacity: 0.7;
    animation: drift linear infinite;
}

/* Cloud shapes using pseudo-elements to look fluffy */
.cloud::before, .cloud::after {
    content: '';
    position: absolute;
    background: #ffffff;
    border-radius: 50%;
}

.cloud::before { width: 50px; height: 50px; top: -20px; left: 15px; }
.cloud::after { width: 70px; height: 70px; top: -30px; right: 15px; }

/* Individual Cloud Sizes, Positions, and Speeds */
.cloud1 { width: 150px; height: 50px; top: 10%; animation-duration: 35s; }
.cloud2 { width: 200px; height: 60px; top: 30%; animation-duration: 45s; animation-delay: -10s; }
.cloud3 { width: 120px; height: 40px; top: 60%; animation-duration: 25s; animation-delay: -5s; }
.cloud4 { width: 180px; height: 55px; top: 80%; animation-duration: 40s; animation-delay: -20s; }

@keyframes drift {
    0% { left: -250px; }
    100% { left: 100vw; }
}

/* =========================================
   STAMP ANIMATIONS
   ========================================= */

/* 1. Absolve: Ethereal Glow */
@keyframes etherealGlow {
    0% { box-shadow: 0 0 0px rgba(255, 215, 0, 0); }
    30% { box-shadow: 0 0 30px rgba(255, 235, 59, 1), 0 0 80px rgba(255, 255, 255, 0.9); border-color: #fff59d; }
    100% { box-shadow: 5px 5px 15px rgba(0,0,0,0.05); border-color: #e0e0e0; }
}
.anim-absolve { animation: etherealGlow 1.5s ease-in-out; }

/* 2. Minor Inconvenience: Quick Shake */
@keyframes quickShake {
    0% { transform: rotate(-1deg) translateX(0); }
    25% { transform: rotate(-3deg) translateX(-5px); }
    50% { transform: rotate(1deg) translateX(5px); }
    75% { transform: rotate(-3deg) translateX(-5px); }
    100% { transform: rotate(-1deg) translateX(0); }
}
.anim-minor { animation: quickShake 0.3s ease-in-out; }

/* 3. Karmic Reversal: 3D Flip */
@keyframes reversalFlip {
    0% { transform: rotate(-1deg) scale(1); }
    50% { transform: rotateY(180deg) scale(1.1); background-color: #f3e5f5; }
    100% { transform: rotate(-1deg) scale(1); background-color: var(--file-color); }
}
.anim-reversal { animation: reversalFlip 0.6s ease-in-out; }

/* 4. Smite: Lightning Flash (Applied to the whole game container) */
@keyframes smiteFlash {
    0% { box-shadow: inset 0 0 0px transparent; border-color: #f8bbd0; }
    10% { box-shadow: inset 0 0 150px #ffe082; background-color: #fff9c4; border-color: #ffeb3b; }
    20% { box-shadow: inset 0 0 0px transparent; background-color: var(--desk-color); }
    30% { box-shadow: inset 0 0 200px #ffe082; background-color: #fff9c4; }
    100% { box-shadow: inset 0 0 0px transparent; background-color: var(--desk-color); border-color: #f8bbd0; }
}
.anim-smite { animation: smiteFlash 0.5s ease-out; }
/* =========================================
   MEMOS & INTERRUPTIONS
   ========================================= */
#event-modal {
    position: absolute; 
    top: 0; left: 0; width: 100%; height: 100%;
    /* Lowered opacity from 0.8 to 0.65 to let the dashboard show through */
    background: rgba(255, 255, 255, 0.65); 
    border-radius: 20px;
    display: flex; justify-content: center; align-items: center;
    z-index: 5000;
    /* Lowered blur from 4px to 1px so the energy numbers remain crisp */
    backdrop-filter: blur(1px); 
    -webkit-backdrop-filter: blur(1px);
}

.memo-content {
    background: #fff9c4; /* Yellow sticky note vibe */
    padding: 30px;
    border-radius: 2px;
    box-shadow: 5px 10px 20px rgba(0,0,0,0.15);
    max-width: 400px;
    text-align: center;
    border-left: 10px solid #fbc02d;
    transform: rotate(2deg);
}

.event-actions {
    display: flex; gap: 10px; margin-top: 20px;
}

.event-actions button {
    flex: 1; padding: 10px; background: #fff; border: 2px solid #fbc02d;
    border-radius: 5px; font-weight: bold; cursor: pointer; color: #555;
    transition: all 0.2s;
}

.event-actions button:hover { background: #fbc02d; color: #fff; }
/* =========================================
   START SCREEN
   ========================================= */
#start-screen {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(224, 247, 250, 0.9); /* Pastel blue overlay */
    display: flex; 
    justify-content: center; 
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(5px);
}
/* =========================================
   WITNESS REPORTS
   ========================================= */
.witness-report {
    display: block;
    margin-top: 6px; /* TIGHTENED */
    padding: 6px 10px; /* TIGHTENED */
    border-left: 4px solid var(--gold); 
    font-family: 'Special Elite', 'Courier New', monospace;
    color: var(--text-muted);
    font-size: 0.75em; /* SHRUNK from 0.85em */
    line-height: 1.3;
    background: rgba(200, 164, 48, 0.06);
    border-radius: 0 4px 4px 0;
}
.witness-report strong {
    color: #d32f2f;
    text-transform: uppercase;
    font-size: 0.8em;
    letter-spacing: 1px;
}
/* =========================================
   REDACTED & OMEGA PROTOCOL WHIMSY
   ========================================= */
.glitch-text {
    color: #d32f2f !important;
    text-shadow: 2px 0 blue, -2px 0 red;
    animation: jitter 0.1s infinite;
}

@keyframes jitter {
    0% { transform: translate(0, 0); }
    50% { transform: translate(1px, -1px); }
    100% { transform: translate(-1px, 1px); }
}

.omega-mode {
    animation: cosmicGlow 4s infinite alternate;
}

@keyframes cosmicGlow {
    0% { border-color: #f48fb1; box-shadow: 0 0 10px rgba(244, 143, 177, 0.5); }
    33% { border-color: #ce93d8; box-shadow: 0 0 30px rgba(206, 147, 216, 0.8); }
    66% { border-color: #90caf9; box-shadow: 0 0 30px rgba(144, 202, 249, 0.8); }
    100% { border-color: #81c784; box-shadow: 0 0 10px rgba(129, 199, 132, 0.5); }
}
/* =========================================
   PHYSICAL INK STAMP OVERLAY
   ========================================= */
#physical-stamp-mark {
    position: absolute;
    top: 40%; /* Moved down slightly so it doesn't cover the title */
    left: 50%;
    font-size: 2em; /* SHRUNK from 3.5em */
    font-weight: 900;
    font-family: 'Courier New', Courier, monospace;
    text-transform: uppercase;
    border: 4px solid; /* Thinner border */
    padding: 10px 20px;
    border-radius: 10px;
    opacity: 0;
    pointer-events: none; 
    z-index: 5;
    transform: translate(-50%, -50%) scale(3);
    text-align: center; /* Centers multi-word stamps like Karmic Reversal */
}

.stamp-hit-anim {
    animation: stampSlam 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes stampSlam {
    0% { transform: translate(-50%, -50%) scale(3); opacity: 0; }
    100% { 
        transform: translate(-50%, -50%) scale(1) rotate(var(--rand-rot)); 
        opacity: 0.35; /* Made it much more transparent so you can read the text behind it! */
    }
}

/* Ink Colors */
.ink-absolve { color: #388e3c; border-color: #388e3c; }
.ink-minor { color: #f57f17; border-color: #f57f17; }
.ink-reversal { color: #7b1fa2; border-color: #7b1fa2; }
.ink-smite { color: #d32f2f; border-color: #d32f2f; }
/* Dashboard Value Pulsing */
@keyframes statPulseUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); color: #d32f2f; }
    100% { transform: scale(1); }
}
.stat-updated {
    animation: statPulseUpdate 0.4s ease-out;
    display: inline-block; /* Required for transform to work on a span */
}
/* =========================================
   SCREEN SHAKE (SMITE IMPACT)
   ========================================= */
@keyframes violentShake {
    0% { transform: translate(0, 0) rotate(0deg); }
    10% { transform: translate(-8px, -8px) rotate(-1deg); }
    20% { transform: translate(8px, 8px) rotate(1deg); }
    30% { transform: translate(-8px, 6px) rotate(-1deg); }
    40% { transform: translate(6px, -6px) rotate(1deg); }
    50% { transform: translate(-4px, -4px) rotate(0deg); }
    60% { transform: translate(4px, 4px) rotate(0deg); }
    70% { transform: translate(-2px, 2px) rotate(0deg); }
    80% { transform: translate(2px, -2px) rotate(0deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

.desk-shake {
    animation: violentShake 0.4s cubic-bezier(.36,.07,.19,.97) forwards;
}
/* =========================================
   THE MANILA FOLDER
   ========================================= */
#manila-folder {
    position: relative;
    margin: 35px auto auto; /* Push down to fit the tab inside the overflow boundary */
    width: 90%;
    max-width: 580px;
    max-height: calc(100% - 40px); /* FORCE it to stay within the desk */
    display: flex;
    flex-direction: column;
    background: #e4c894;
    border: 1px solid #cfae70;
    border-radius: 0 6px 6px 6px;
    box-shadow: 2px 4px 12px rgba(0,0,0,0.15);
    padding: 12px 12px 10px 10px; /* TIGHTENED */
    transform: rotate(-1.5deg); 
    z-index: 1;
    box-sizing: border-box; /* Crucial for keeping padding inside the height */
}
/* Subtle fibrous texture for the folder cardstock */
#manila-folder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        rgba(200, 160, 100, 0.05) 0px,
        rgba(200, 160, 100, 0.05) 2px,
        transparent 2px,
        transparent 4px
    );
    pointer-events: none;
    border-radius: inherit;
}

/* The File Tab */
.folder-tab {
    position: absolute;
    top: -34px;
    left: -1px;
    width: 170px;
    height: 34px;
    background: #e4c894;
    border: 1px solid #cfae70;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    font-family: 'Special Elite', 'Courier New', monospace;
    font-size: 0.7em;
    font-weight: bold;
    color: #b08d48;
    padding: 8px 16px 0;
    letter-spacing: 2px;
}

/* Seamless overlap to hide the border under the tab */
.folder-tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 4px;
    background: #e4c894;
}
body.theme-torment {
    --bg-sky: #1a0a0a;
    --bg-sky-deep: #050000;
    --desk-color: #261a1a;
    --desk-dark: #120808;
    --desk-light: #362828;
    --file-color: #d9c9c0;
    --file-aged: #c2afa4;
    --text-main: #1a0a0a;
    
    /* Evil Stamps - High Contrast */
    --stamp-absolve: #ffffff;       /* White Text */
    --stamp-absolve-bg: #444444;    /* Charcoal */
    --stamp-minor: #ffffff;
    --stamp-minor-bg: #d88118;      /* Burnt Orange */
    --stamp-reversal: #ffffff;
    --stamp-reversal-bg: #800000;   /* Blood Red */
    --stamp-smite: #ff5252;         /* Neon Red Text */
    --stamp-smite-bg: #000000;      /* Pure Black */
}



/* Active Hover Glow for Torment */
body.theme-torment .stamp-btn:hover:not(:disabled) {
    box-shadow: 0 0 15px var(--stamp-reversal-bg);
    filter: brightness(1.2);
}

body.theme-torment .stamp-btn {
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 1) !important; /* Heavy drop shadow for text */
    font-weight: 900;
}

/* Individual Button Colors for Torment Mode */
body.theme-torment .stamp-btn.absolve { 
    background-color: #333333 !important; 
    color: #999999 !important; /* Muted grey for 'Let it Happen' */
}

body.theme-torment .stamp-btn.minor { 
    background-color: #e65100 !important; /* Bright Burnt Orange */
}

body.theme-torment .stamp-btn.reversal { 
    background-color: #b71c1c !important; /* Deep Blood Red */
}

body.theme-torment .stamp-btn.smite {
    background-color: #000000 !important;
    color: #ff5252 !important;
    border-color: #ff5252 !important;
    box-shadow: 0 0 20px rgba(255, 82, 82, 0.4), 0 4px 0 #000;
}

/* Make the cost sub-text slightly smaller but still readable */
body.theme-torment .stamp-btn span {
    color: #ffffff !important;
    opacity: 0.9;
    font-weight: bold;
}
#start-screen .memo-content {
    background: #fff9c4; /* Brighter post-it yellow */
    border-left: 12px solid #fbc02d;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.1);
}

#start-screen button {
    border: 2px solid #333;
    font-size: 0.9em;
    padding: 10px 15px;
    box-shadow: 2px 2px 0 #333;
    transition: transform 0.1s, box-shadow 0.1s;
}

#start-screen button:active {
    transform: translate(2px, 2px);
    box-shadow: 0px 0px 0 #333;
}
/* =========================================
   THE TORMENT HELLSCAPE
   ========================================= */

/* 1. Banish the clouds and change the base background */
body.theme-torment .clouds-container {
    display: none;
}

body.theme-torment {
    background: radial-gradient(circle at center, #4e0a0a 0%, #050000 100%);
    overflow: hidden;
}

/* 2. Setup the Flames Container */
.flames-container {
    display: none; /* Hidden by default in Karma mode */
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 100%;
    height: 300px;
    z-index: -1;
    filter: blur(10px);
}

body.theme-torment .flames-container {
    display: block;
}

/* 3. Create the flickering flame blobs */
.flame {
    position: absolute;
    bottom: 0;
    width: 25vw;
    height: 100%;
    background: radial-gradient(circle at 50% 100%, #ff5252 0%, #ff9800 40%, transparent 70%);
    opacity: 0.5;
    border-radius: 50% 50% 20% 20%;
    animation: flicker 3s infinite alternate ease-in-out;
}

/* Offset the flames so they look natural */
.flame:nth-child(1) { left: -5%; animation-delay: 0s; }
.flame:nth-child(2) { left: 20%; animation-delay: -1.2s; width: 35vw; }
.flame:nth-child(3) { left: 50%; animation-delay: -0.5s; width: 30vw; }
.flame:nth-child(4) { left: 75%; animation-delay: -2s; }

@keyframes flicker {
    0% { transform: scaleY(1) translateY(0); opacity: 0.4; }
    50% { transform: scaleY(1.2) translateY(-10px); opacity: 0.7; }
    100% { transform: scaleY(0.9) translateY(5px); opacity: 0.5; }
}
#stability-status {
    font-size: 0.65em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
    transition: color 0.3s;
}

/* Torment adjustments for the label */
body.theme-torment #stability-status {
    color: #ff5252;
}
/* Progress Bar Container */
.progress-container {
    position: relative;
    width: 120px;
    height: 12px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    margin: 8px auto 4px;
    overflow: hidden;
}

/* The 30%-70% "Safe Zone" Highlight */
.safe-zone-marker {
    position: absolute;
    left: 30%;
    width: 40%; /* Represents the 40% gap between 30 and 70 */
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    border-left: 1px solid rgba(0,0,0,0.2);
    border-right: 1px solid rgba(0,0,0,0.2);
    z-index: 1;
}
/* =========================================
   TUTORIAL & ORIENTATION FITMENT
   ========================================= */

#orientation-card {
    min-height: 420px;
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    /* This ensures content never touches the actual edges of the 'paper' */
    padding: 50px 60px; 
    box-sizing: border-box;
}

.tutorial-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    animation: fadeIn 0.4s ease-out;
}

.tutorial-page h1 {
    font-size: 1.8em;
    margin: 20x 0 15px;
    text-align: center;
    line-height: 1.2;
}

.tutorial-page p {
    font-size: 1em;
    line-height: 1.6;
    text-align: center;
    margin-bottom: 20px;
    color: #444;
}

/* --- The List Fix --- */
.tutorial-page ul {
    margin: 0 auto 30px; /* Centers the block */
    padding: 0;
    list-style-type: none; /* We will add our own 'bureaucratic' dots */
    max-width: 320px; /* Prevents long lines from stretching the layout */
}

.tutorial-page li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 15px;
    text-align: left; /* Keep text readable */
    font-size: 0.95em;
    line-height: 1.4;
}

/* Custom Bullet Points */
.tutorial-page li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--celestial-blue); /* Or #d32f2f for Torment feel */
    font-size: 1.5em;
    line-height: 1;
}

/* --- Button Fitment --- */
.tutorial-next {
    margin-top: auto; /* Pushes the button to the bottom of the card */
    align-self: center;
    padding: 12px 30px;
    font-family: 'Special Elite', 'Courier New', monospace;
    font-size: 1em;
    background: #fdfdfd;
    border: 2px solid #333;
    box-shadow: 4px 4px 0px #333;
    cursor: pointer;
    transition: all 0.1s;
}

.tutorial-next:hover {
    background: #eee;
}

.tutorial-next:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #333;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}
#end-shift-btn {
    display: block;
    margin: 5px auto 0;
    font-size: 0.6em;
    padding: 2px 8px;
    background: #cfd8dc;
    border: 1px solid #78909c;
    border-radius: 3px;
    font-family: 'Special Elite', monospace;
    cursor: pointer;
    text-transform: uppercase;
    transition: background 0.2s;
}

#end-shift-btn:hover {
    background: #b0bec5;
}

/* Torment version of the button */
body.theme-torment #end-shift-btn {
    background: #3d0000;
    color: #ff5252;
    border-color: #ff5252;
}
/* =========================================
   THEME: DEPARTMENT OF ZEN
   ========================================= */
body.theme-zen {
    background: #eceff1;
    filter: sepia(0.2) contrast(0.8); /* Gives it a soft, old-paper feel */
}

body.theme-zen .clouds-container,
body.theme-zen .flames-container {
    display: none;
}

body.theme-zen #game-container {
    background: #f5f5f5;
    border-color: #cfd8dc;
    box-shadow: none;
}

body.theme-zen .stat-label, 
body.theme-zen .stat-value {
    color: #90a4ae;
}

body.theme-zen .stamp-btn {
    background: #fafafa !important;
    color: #b0bec5 !important;
    border: 1px dashed #cfd8dc !important;
    text-transform: lowercase;
    box-shadow: none !important;
}

body.theme-zen .stamp-btn:hover {
    background: #f5f5f5 !important;
    color: #607d8b !important;
}

/* Zen Ink: Very faint, almost invisible */
body.theme-zen .ink-absolve, 
body.theme-zen .ink-minor, 
body.theme-zen .ink-reversal, 
body.theme-zen .ink-smite {
    color: rgba(0,0,0,0.1) !important;
    border-color: rgba(0,0,0,0.1) !important;
    font-family: 'Courier New', serif;
    font-weight: 100;
}
/* =========================================
   THEME: THE BOARD (Upper Management)
   ========================================= */
body.theme-board {
    background: linear-gradient(135deg, #263238 0%, #37474f 50%, #455a64 100%);
}

body.theme-board .clouds-container,
body.theme-board .flames-container {
    display: none;
}

body.theme-board #game-container {
    background: linear-gradient(180deg, #eceff1, #cfd8dc);
    border-color: #ffd54f;
    box-shadow: 0 0 30px rgba(255, 213, 79, 0.3);
}

body.theme-board #dashboard {
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 2px solid #ffd54f;
}

body.theme-board .folder-tab {
    background: #455a64;
    color: #ffd54f;
    border-color: #37474f;
}

body.theme-board .folder-tab::after {
    background: #455a64;
}
#case-outcome {
    font-size: 0.9em;
    line-height: 1.3;
    margin: 0;
}

body.theme-board #manila-folder {
    background: #546e7a;
    border-color: #455a64;
}

body.theme-board #case-file {
    background: #fffde7;
    border-color: #ffd54f;
}

body.theme-board .file-header {
    color: #ff8f00;
    border-color: #ff8f00;
}

body.theme-board #stamps {
    border-top: 2px solid #ffd54f;
    background: rgba(255, 253, 231, 0.5);
}

body.theme-board .stamp-btn.absolve {
    background-color: #c8e6c9 !important;
    color: #2e7d32 !important;
}

body.theme-board .stamp-btn.minor {
    background-color: #fff9c4 !important;
    color: #f57f17 !important;
}

body.theme-board .stamp-btn.reversal {
    background-color: #e1bee7 !important;
    color: #7b1fa2 !important;
}

body.theme-board .stamp-btn.smite {
    background-color: #37474f !important;
    color: #ffd54f !important;
    border-color: #ffd54f !important;
    box-shadow: 0 0 10px rgba(255, 213, 79, 0.3), 0 4px 0 rgba(0,0,0,0.2);
}

body.theme-board #stability-status {
    color: #ffd54f;
}

/* Board ink stamps - gold */
body.theme-board .ink-absolve { color: #2e7d32; border-color: #2e7d32; }
body.theme-board .ink-minor { color: #ff8f00; border-color: #ff8f00; }
body.theme-board .ink-reversal { color: #7b1fa2; border-color: #7b1fa2; }
body.theme-board .ink-smite { color: #ffd54f; border-color: #ffd54f; }

/* Board end-shift button */
body.theme-board #end-shift-btn {
    background: #455a64;
    color: #ffd54f;
    border-color: #ffd54f;
}

/* =========================================
   DEEP FOCUS & SAVE/LOAD BUTTONS
   ========================================= */
#deep-focus-btn, #save-btn {
    display: inline-block;
    font-size: 0.55em;
    padding: 2px 6px;
    background: #eceff1;
    border: 1px solid #90a4ae;
    border-radius: 3px;
    font-family: 'Special Elite', monospace;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s;
    white-space: nowrap;
}

#deep-focus-btn:hover, #save-btn:hover {
    background: #cfd8dc;
}

#deep-focus-btn.active {
    background: #fff3e0;
    border-color: #ff9800;
    color: #e65100;
    box-shadow: 0 0 6px rgba(255, 152, 0, 0.4);
    animation: focusPulse 2s infinite;
}

@keyframes focusPulse {
    0%, 100% { box-shadow: 0 0 4px rgba(255, 152, 0, 0.3); }
    50% { box-shadow: 0 0 10px rgba(255, 152, 0, 0.6); }
}

/* Torment theme overrides */
body.theme-torment #deep-focus-btn,
body.theme-torment #save-btn {
    background: #3d0000;
    color: #ff5252;
    border-color: #ff5252;
}

body.theme-torment #deep-focus-btn.active {
    background: #4e0000;
    border-color: #ff9800;
    color: #ff9800;
}

/* Zen theme overrides */
body.theme-zen #deep-focus-btn,
body.theme-zen #save-btn {
    background: #fafafa;
    color: #b0bec5;
    border: 1px dashed #cfd8dc;
    box-shadow: none;
}

body.theme-zen #deep-focus-btn.active {
    background: #f5f5f5;
    border-color: #90a4ae;
    color: #607d8b;
    box-shadow: none;
    animation: none;
}

/* Board theme overrides */
body.theme-board #deep-focus-btn,
body.theme-board #save-btn {
    background: #455a64;
    color: #ffd54f;
    border-color: #ffd54f;
}

body.theme-board #deep-focus-btn.active {
    background: #37474f;
    border-color: #ffb300;
    color: #ffb300;
}

/* =========================================
   TRANSFER BUTTON
   ========================================= */
#modal-transfer-btn {
    padding: 12px 20px;
    font-size: 1.1em;
    font-weight: bold;
    border: 2px solid rgba(0,0,0,0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    animation: transferPulse 1.5s infinite;
}

#modal-transfer-btn:hover {
    filter: brightness(1.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

@keyframes transferPulse {
    0%, 100% { box-shadow: 0 0 0px rgba(129, 199, 132, 0); }
    50% { box-shadow: 0 0 15px rgba(129, 199, 132, 0.5); }
}
.mandatory-glow {
    animation: mandatoryPulse 1.5s infinite !important;
    border: 3px solid gold !important;
    z-index: 10;
    opacity: 1 !important;
}

@keyframes mandatoryPulse {
    0% { box-shadow: 0 0 5px gold; transform: scale(1); }
    50% { box-shadow: 0 0 25px gold; transform: scale(1.02); }
    100% { box-shadow: 0 0 5px gold; transform: scale(1); }
}

/* For Torment Mode, the glow is more ominous */
body.theme-torment .mandatory-glow {
    border-color: #ff5252 !important;
    animation: mandatoryPulseRed 1.5s infinite !important;
}

@keyframes mandatoryPulseRed {
    0% { box-shadow: 0 0 5px #ff5252; transform: scale(1); }
    50% { box-shadow: 0 0 25px #ff5252; transform: scale(1.02); }
    100% { box-shadow: 0 0 5px #ff5252; transform: scale(1); }
}
/* =========================================
   MAX FIRE MODE (Event Triggered)
   ========================================= */
   
/* 1. Make the background flames massive and aggressive */
body.max-fire-mode .flames-container {
    height: 70vh !important; /* Flames reach almost to the top of the screen */
    filter: blur(8px) contrast(1.5) !important;
    opacity: 0.9 !important;
    bottom: -50px !important;
}

body.max-fire-mode .flame {
    animation: flickerWild 1s infinite alternate ease-in-out !important;
    background: radial-gradient(circle at 50% 100%, #ffffff 0%, #ffeb3b 20%, #ff5252 60%, transparent 90%) !important;
}

@keyframes flickerWild {
    0% { transform: scaleY(1) translateY(0) scaleX(1); opacity: 0.6; }
    50% { transform: scaleY(1.4) translateY(-20px) scaleX(1.1); opacity: 1; }
    100% { transform: scaleY(0.9) translateY(10px) scaleX(0.9); opacity: 0.8; }
}

/* 2. Heat up the desk */
body.max-fire-mode #game-container {
    box-shadow: 0 0 60px rgba(255, 82, 82, 0.6), inset 0 0 20px rgba(255, 82, 82, 0.3) !important;
    border-color: #ff5252 !important;
}

/* 3. Set the buttons on fire */
body.max-fire-mode .stamp-btn {
    animation: buttonBurn 1.5s infinite alternate !important;
    border-color: #ffeb3b !important;
    color: #ffffff !important;
}

@keyframes buttonBurn {
    0% { box-shadow: 0 0 10px #ff5252, inset 0 0 10px #e65100; text-shadow: 0 0 5px #ff5252; }
    100% { box-shadow: 0 0 30px #ffeb3b, inset 0 0 20px #ff5252; text-shadow: 0 0 10px #ffeb3b; }
}

/* 4. Make the text look singed */
body.max-fire-mode #case-title {
    color: #ff5252 !important;
    text-shadow: 1px 1px 2px #000;
}
/* =========================================
   FROZEN MODE (Event Triggered)
   ========================================= */

body.frozen-mode {
    background: radial-gradient(circle at center, #001f3f 0%, #000000 100%) !important;
}

/* Turn Hellfire into slow, freezing mist */
body.frozen-mode .flames-container {
    display: block !important;
    filter: blur(6px) hue-rotate(200deg) brightness(1.5) !important; 
    opacity: 0.6 !important;
}

/* Slow down the flame animation to a crawl */
body.frozen-mode .flame {
    animation-duration: 8s !important; 
}

/* Ice out the desk and buttons */
body.frozen-mode #game-container {
    border-color: #81d4fa !important;
    box-shadow: 0 0 40px rgba(129, 212, 250, 0.4), inset 0 0 30px rgba(224, 247, 250, 0.3) !important;
}

body.frozen-mode .stamp-btn {
    border-color: #4fc3f7 !important;
    color: #b3e5fc !important;
    box-shadow: 0 0 10px rgba(79, 195, 247, 0.3) !important;
    background: rgba(1, 87, 155, 0.5) !important;
}

body.frozen-mode #case-title {
    color: #4fc3f7 !important;
    text-shadow: 0 0 5px rgba(79, 195, 247, 0.5);
}


/* =========================================
   ZEN FOG MODE (Event Triggered)
   ========================================= */

/* Create a drifting cloud of fog over the entire screen */
body.zen-fog-mode::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0.2) 100%);
    z-index: 9999; /* Covers everything but remains unclickable */
    pointer-events: none; 
    animation: fogDrift 8s infinite alternate ease-in-out;
}

@keyframes fogDrift {
    0% { opacity: 0.4; backdrop-filter: blur(1px); transform: scale(1); }
    100% { opacity: 0.85; backdrop-filter: blur(3px); transform: scale(1.05); }
}

/* Soften the desk to blend into the fog */
body.zen-fog-mode #game-container {
    border-color: #ffffff !important;
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.8) !important;
    opacity: 0.8;
}

body.zen-fog-mode .stamp-btn {
    color: #cfd8dc !important;
    border-color: #cfd8dc !important;
    opacity: 0.6;
}
/* =========================================
   OMNIPING MESSENGER
   ========================================= */
#omni-ping-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
    pointer-events: none; /* Lets you click the desk behind the invisible container */
}

.omni-ping {
    background: rgba(255, 255, 255, 0.95);
    border-left: 4px solid var(--celestial-blue, #64b5f6);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 12px 15px;
    width: 260px;
    pointer-events: auto; /* Makes the actual notification clickable */
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    color: #333;
}

.omni-ping.show {
    transform: translateX(0); /* Slides it onto the screen */
}

.omni-ping-header {
    font-size: 0.75em;
    font-weight: bold;
    margin-bottom: 6px;
    color: #555;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
    padding-bottom: 4px;
}

.omni-ping-close {
    cursor: pointer;
    color: #999;
    font-size: 1.2em;
    line-height: 0.8;
}

.omni-ping-close:hover { color: #d32f2f; }

.omni-ping-body {
    font-size: 0.85em;
    line-height: 1.3;
}

/* Torment Theme Overrides */
body.theme-torment .omni-ping { 
    background: #261a1a; 
    border-left-color: #ff5252; 
    color: #eee;
}
body.theme-torment .omni-ping-header { 
    color: #ff5252; 
    border-bottom-color: #444; 
}
body.theme-torment .omni-ping-close:hover { color: #ff9800; }
/* =========================================
   DAILY NEWSPAPER 
   ========================================= */
#newspaper-container {
    position: absolute; 
    left: -370px; 
    bottom: 350px; 
    width: 240px; 
    /* NEW: A dingier, recycled newsprint color */
    background: #eee9d8; 
    padding: 15px 20px 25px; 
    box-shadow: 2px 2px 5px rgba(0,0,0,0.05), inset 15px 0 25px rgba(0,0,0,0.04); 
    /* NEW: Darkened the crease slightly to match the darker paper */
    border-left: 1px solid #dcd4be; 
    transform: rotate(-4deg); 
    transform-origin: bottom left;
    z-index: 5; 
    font-family: 'Playfair Display', Georgia, serif;
    color: #222;
    /* NEW: Changed from none to auto so it can be clicked! */
    pointer-events: auto; 
    cursor: pointer;
    transition: filter 0.2s; /* Smooth hover transition */
}

@media (max-width: 950px) {
    #newspaper-container { display: none !important; }
}
/* --- The "Extra Pages" Illusion --- */
#newspaper-container::before,
#newspaper-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit; /* Magically copies the theme's paper color! */
    border-left: inherit; /* Copies the folded crease line */
    border-top: 1px solid rgba(0,0,0,0.05);
    border-right: 1px solid rgba(0,0,0,0.05);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
#newspaper-container:hover {
    filter: brightness(1.05);
}
/* The Click Animation */
.rustle-anim {
    animation: paperRustle 0.3s ease-in-out;
}

@keyframes paperRustle {
    0% { transform: rotate(-4deg) scale(1); }
    50% { transform: rotate(-2deg) scale(1.05) translateY(-5px); }
    100% { transform: rotate(-4deg) scale(1); }
}

/* First page sticking out the back */
#newspaper-container::before {
    z-index: -1; /* Puts it directly behind the main paper */
    transform-origin: bottom left;
    transform: rotate(3deg) translate(4px, -2px);
    box-shadow: 2px 2px 5px rgba(0,0,0,0.05);
}

/* Second page sticking out further */
#newspaper-container::after {
    z-index: -2; /* Puts it behind the first pseudo-element */
    transform-origin: bottom left;
    transform: rotate(-2deg) translate(-2px, 4px);
    box-shadow: -2px 6px 15px rgba(0,0,0,0.15); /* Re-adds the heavy shadow to the very bottom layer */
}

#paper-name {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    font-size: 0.7em; /* Scaled UP from 0.6em */
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-top: 2px solid #222;
    border-bottom: 2px solid #222;
    padding: 5px 0;
    margin-bottom: 12px;
    text-align: center;
}

#daily-headline {
    font-size: 1.25em; /* Scaled UP from 1.1em */
    font-weight: 900;
    line-height: 1.2;
    text-align: left;
}

/* --- NEWSPAPER THEMES --- */
body.theme-torment #newspaper-container {
    background: #2b1a1a;
    color: #e57373;
    border-left: 1px solid #4a2a2a;
    box-shadow: -2px 6px 15px rgba(0,0,0,0.5), inset 20px 0 30px rgba(0,0,0,0.3);
}
body.theme-torment #paper-name { border-color: #d32f2f; color: #ff5252; }

body.theme-zen #newspaper-container {
    background: #eceff1;
    color: #90a4ae;
    border-left: 1px solid #cfd8dc;
    box-shadow: none; 
}
body.theme-zen #paper-name { border-color: #b0bec5; font-weight: normal; }

body.theme-board #newspaper-container {
    background: #fffde7;
    color: #37474f;
    border-left: 1px solid #ffd54f;
    box-shadow: -2px 6px 15px rgba(0,0,0,0.2), inset 20px 0 30px rgba(255,213,79,0.1);
}
body.theme-board #paper-name { border-color: #37474f; }
/* =========================================
   BACKGROUND DISTRACTIONS
   ========================================= */
#distractions-layer {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; /* Lets you click through the invisible layer to the desk */
    z-index: 0; /* Keeps them behind the desk but in front of the sky */
    overflow: hidden;
}

.distraction-obj {
    position: absolute;
    pointer-events: auto; /* Makes the actual emojis clickable */
    cursor: crosshair; /* Fun little aiming reticle */
    font-size: 2em;
    user-select: none;
    transition: transform 0.1s;
}

.distraction-obj:hover {
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
}

/* 1. Karma: Stray Prayer (Floats Left to Right) */
.stray-prayer {
    animation: driftRight 12s linear forwards, bob 3s ease-in-out infinite alternate;
    opacity: 0.8;
}

/* 2. Torment: Lost Ember (Floats Bottom to Top) */
.lost-soul {
    filter: drop-shadow(0 0 10px #ff5252);
    animation: driftUp 10s linear forwards, jitter 0.5s infinite;
}

/* 3. Zen: Falling Leaf (Floats Top to Bottom) */
.falling-leaf {
    animation: driftDown 14s linear forwards, sway 4s ease-in-out infinite alternate;
    opacity: 0.6;
}

/* 4. Board: Flying Paperclip */
.red-tape {
    animation: driftRight 10s linear forwards, spin 4s linear infinite;
    font-size: 2.5em;
    opacity: 0.7;
}

/* --- The Trajectories --- */
@keyframes driftRight { 0% { left: -10%; } 100% { left: 110%; } }
@keyframes driftUp { 0% { bottom: -10%; } 100% { bottom: 110%; } }
@keyframes driftDown { 0% { top: -10%; } 100% { top: 110%; } }

/* --- The Wiggles --- */
@keyframes bob { 0% { transform: translateY(-20px); } 100% { transform: translateY(20px); } }
@keyframes sway { 0% { transform: translateX(-30px) rotate(-15deg); } 100% { transform: translateX(30px) rotate(15deg); } }
@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes jitter { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(2px, -2px); } }

/* --- The Pop Animation when clicked --- */
.caught-anim {
    animation: popOut 0.4s ease-out forwards !important;
}
@keyframes popOut {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(2) rotate(15deg); opacity: 0.8; filter: brightness(2); }
    100% { transform: scale(0); opacity: 0; }
}
/* --- Desk Items --- */
#item-bonsai, #item-paperweight, #item-kazoo {
    position: fixed; /* FIX: Keeps them on screen even if window resizes */
    right: 30px;
    font-size: 3em;
    z-index: 9000; /* Ensure they float above the background */
    cursor: pointer;
    user-select: none;
    transition: transform 0.2s;
}

/* Stack them vertically on the right side */
#item-bonsai { top: 30px; }
#item-paperweight { top: 110px; }
#item-kazoo { top: 190px; }

#item-bonsai:hover, #item-kazoo:hover { transform: scale(1.1); }

.paperweight-activate {
    animation: rageShake 0.4s ease-in-out;
    filter: drop-shadow(0 0 15px #ff5252);
}
@keyframes rageShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px) scale(1.1); }
    75% { transform: translateX(5px) scale(1.1); }
}

/* --- Kazoo Chaos Mode --- */
.kazoo-chaos #game-container {
    filter: invert(1) hue-rotate(180deg); /* Flips colors to a dark nightmare */
}
.kazoo-chaos #case-title, .kazoo-chaos #case-description {
    transform: scaleY(-1); /* Flips text upside down */
}
.kazoo-chaos #stamps {
    flex-direction: row-reverse; /* Swaps button order entirely */
}

/* --- Directives Board --- */
#directive-board {
    position: absolute;
    right: -260px;
    top: 50px;
    width: 220px;
}
.directive-note {
    background: #ffeb3b;
    padding: 10px;
    margin-bottom: 10px;
    box-shadow: 2px 4px 6px rgba(0,0,0,0.1);
    font-family: 'Special Elite', monospace;
    font-size: 0.85em;
    transform: rotate(2deg);
    transition: all 0.3s;
}
.completed-note {
    text-decoration: line-through;
    opacity: 0.5;
    background: #c8e6c9; /* Turns green */
}
/* =========================================
   PHASE 1: LANYARD & THERMOSTAT
   ========================================= */

/* =========================================
   PHASE 1: LANYARD & THERMOSTAT
   ========================================= */

/* The Badges (Now residing in the top dashboard) */
#lanyard {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.pin {
    font-size: 1.6em;
    filter: drop-shadow(1px 2px 2px rgba(0,0,0,0.2));
    cursor: help;
    transition: transform 0.2s;
}

.pin:hover {
    transform: scale(1.2);
}

/* Susan's Thermostat */
#thermostat {
    position: absolute;
    top: 8%; /* Adjust this to move it up or down */
    left: 5%; /* Moved from 'right' to 'left' */
    font-size: 1.5em;
    background: #eee;
    padding: 8px 12px;
    border: 2px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    pointer-events: auto; 
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.1), 2px 2px 5px rgba(0,0,0,0.2);
    transition: all 0.2s;
}
#thermo-reading {
    font-size: 0.5em;
    font-family: 'Special Elite', monospace;
    font-weight: bold;
    color: #333;
    margin-top: 4px;
}
#thermostat.frozen {
    border-color: #4fc3f7;
    background: #e0f7fa;
    box-shadow: 0 0 15px #4fc3f7;
    animation: shiver 0.4s infinite;
}
@keyframes shiver {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px) rotate(-1deg); }
    75% { transform: translateX(2px) rotate(1deg); }
}

/* The Freezing Room Vignette */
#frost-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none;
    box-shadow: inset 0 0 120px rgba(129, 212, 250, 0.4);
    border: 15px solid rgba(224, 247, 250, 0.3);
    transition: opacity 1s ease-in-out;
}
/* =========================================
   PHASE 2: IT UPDATE CHAOS
   ========================================= */
.comic-sans-mode #case-title, 
.comic-sans-mode #case-description,
.comic-sans-mode #case-outcome {
    font-family: "Comic Sans MS", "Chalkboard SE", "Comic Neue", sans-serif !important;
    letter-spacing: normal !important;
}
/* =========================================
   PHASE 2.5: CRUNCH TIME MINI-GAME
   ========================================= */
#crunch-timer {
    width: 100%; 
    height: 8px; 
    background: rgba(0,0,0,0.1); 
    border-radius: 4px; 
    margin-bottom: 12px; 
    overflow: hidden;
}
#crunch-bar {
    width: 100%; 
    height: 100%; 
    background: #d32f2f; 
    transform-origin: left;
}
.crunch-active-anim {
    animation: crunchShrink 10s linear forwards;
}
@keyframes crunchShrink { 
    from { width: 100%; } 
    to { width: 0%; background: #ff9800; } 
}
/* =========================================
   THEME: DEPT OF REINCARNATION
   ========================================= */
body.theme-reincarnation {
    background: #d7ccc8; /* Soft beige/earth background */
}

body.theme-reincarnation .clouds-container,
body.theme-reincarnation .flames-container {
    display: none;
}

body.theme-reincarnation #game-container {
    background: #efebe9; /* Light, recycled paper desk */
    border-color: #8d6e63;
    box-shadow: 0 0 20px rgba(141, 110, 99, 0.2);
}

body.theme-reincarnation #dashboard {
    background: rgba(239, 235, 233, 0.9);
    border-bottom: 2px dashed #8d6e63;
}

body.theme-reincarnation .folder-tab {
    background: #a1887f;
    color: #fff;
    border-color: #8d6e63;
}

body.theme-reincarnation .folder-tab::after {
    background: #a1887f;
}

body.theme-reincarnation #manila-folder {
    background: #d7ccc8;
    border-color: #bcaaa4;
}

body.theme-reincarnation #case-file {
    background: #f5f5f6; /* crisp white-ish recycled paper */
    border-color: #bcaaa4;
}

body.theme-reincarnation #stamps {
    border-top: 2px dashed #8d6e63;
    background: rgba(215, 204, 200, 0.4);
}

/* Reincarnation Stamps */
body.theme-reincarnation .stamp-btn.absolve { background-color: #bcaaa4 !important; color: #4e342e !important; } /* Capybara - Brown */
body.theme-reincarnation .stamp-btn.minor { background-color: #c8e6c9 !important; color: #2e7d32 !important; } /* Mayfly - Light Green */
body.theme-reincarnation .stamp-btn.reversal { background-color: #fff59d !important; color: #f57f17 !important; } /* Billionaire - Gold */
body.theme-reincarnation .stamp-btn.smite { background-color: #388e3c !important; color: #fff !important; border-color: #1b5e20 !important; } /* Oak Tree - Deep Green */

body.theme-reincarnation #stability-status { color: #8d6e63; }

/* Ink Colors */
body.theme-reincarnation .ink-absolve { color: #5d4037; border-color: #5d4037; }
body.theme-reincarnation .ink-minor { color: #388e3c; border-color: #388e3c; }
body.theme-reincarnation .ink-reversal { color: #fbc02d; border-color: #fbc02d; }
body.theme-reincarnation .ink-smite { color: #1b5e20; border-color: #1b5e20; }

/* Extreme Heat Thermostat Meltdown */
#thermostat.melting {
    border-color: #d32f2f;
    background: #ffcdd2;
    box-shadow: 0 0 15px #d32f2f;
    animation: meltShake 0.2s infinite;
}

@keyframes meltShake {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(1px, 1px); }
}