/* ===== CSS RESET & VARIABLES ===== */
:root {
    --bg-dark: #0f1115;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --accent-red: #ef4444;
    --accent-red-hover: #dc2626;
    --accent-blue: #3b82f6;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-ui: 'Inter', sans-serif;
    --font-doc: 'Roboto Slab', serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-ui);
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== LAYOUT & SPA VIEWS ===== */
#app {
    position: relative;
    width: 100vw;
    min-height: 100vh;
    overflow-x: hidden;
}

.view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s;
    overflow-y: auto;
    overflow-x: hidden;
}

.view.active {
    opacity: 1;
    visibility: visible;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3 {
    font-weight: 600;
    margin-bottom: 1rem;
}

.text-center { text-align: center; }

/* ===== UTILITIES & COMPONENTS ===== */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--glass-border);
    border: 1px solid var(--glass-border);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--accent-red);
    color: #fca5a5;
}

.btn-danger:hover {
    background: var(--accent-red);
    color: white;
}

.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
    z-index: 100;
}

.back-btn:hover {
    color: white;
}

/* ===== LANDING VIEW ===== */
#landing-view .background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    z-index: -1;
}

#landing-view .content-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 2rem;
}

#landing-view .title {
    font-family: var(--font-doc);
    font-size: 3rem;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 10px rgba(0,0,0,0.8);
}

#landing-view .subtitle {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-bottom: 4rem;
}

.case-selection {
    display: flex;
    gap: 2rem;
    max-width: 960px;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
}

.case-card {
    flex: 1;
    min-width: 300px;
    max-width: 440px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.case-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    border-color: rgba(255,255,255,0.3);
}

.difficulty {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.difficulty.normal { color: var(--accent-blue); }
.difficulty.hard   { color: var(--accent-red); }

.case-card h2 {
    font-family: var(--font-doc);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.case-card p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ══ COMING SOON LOCKED CARD ══ */
.case-locked {
    cursor: not-allowed;
    border-color: rgba(255,255,255,0.05);
    background: rgba(10, 12, 20, 0.75);
    pointer-events: none;
    user-select: none;
}

/* scanline noise overlay */
.case-locked::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.08) 2px,
        rgba(0,0,0,0.08) 4px
    );
    pointer-events: none;
    z-index: 1;
}

/* shimmer sweep */
.case-locked::after {
    content: '';
    position: absolute;
    top: -60%;
    left: -60%;
    width: 60%;
    height: 220%;
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255,255,255,0.04) 50%,
        transparent 60%
    );
    animation: cs-shimmer 4s infinite linear;
    pointer-events: none;
    z-index: 2;
}

@keyframes cs-shimmer {
    0%   { transform: translateX(-10%); }
    100% { transform: translateX(280%); }
}

.case-locked > * { position: relative; z-index: 3; }

/* Lock badge top-right */
.cs-lock-badge {
    position: absolute !important;
    top: 18px;
    right: 18px;
    font-size: 1.2rem;
    opacity: 0.5;
    z-index: 4 !important;
}

/* "SEGERA HADIR" difficulty badge */
.difficulty.cs-diff {
    color: #475569;
    letter-spacing: 3px;
}

/* Redacted title bars */
.cs-redacted-title {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 1.2rem;
}

.cs-bar {
    display: block;
    height: 18px;
    background: #1e293b;
    border-radius: 3px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.cs-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
    animation: cs-shimmer 3s infinite linear;
}

.cs-bar.cs-bar-short { width: 60%; }

/* Description */
.cs-desc {
    color: #334155 !important;
    font-size: 0.88rem !important;
    margin-bottom: 1.2rem !important;
    filter: blur(0.4px);
}

/* Tag pills */
.cs-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 1.5rem;
}

.cs-tag {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.07);
    color: #334155;
    font-family: var(--font-ui);
    text-transform: uppercase;
    background: rgba(255,255,255,0.02);
}

/* Pulsing label */
.cs-coming-label {
    font-family: var(--font-ui);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #334155;
    text-align: center;
    padding: 10px;
    border: 1px dashed rgba(255,255,255,0.08);
    border-radius: 6px;
    animation: cs-pulse 3s ease-in-out infinite;
}

@keyframes cs-pulse {
    0%, 100% { opacity: 0.4; }
    50%       { opacity: 0.9; color: #64748b; border-color: rgba(255,255,255,0.18); }
}


/* ===== COMMON VIEW CONTAINERS ===== */
.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px 40px;
}

/* ===== NORMAL MODE ===== */
.normal-case-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
}

.normal-case-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.evidence-img {
    width: 100%;
    border-radius: 8px;
    margin: 1rem 0;
    border: 1px solid rgba(255,255,255,0.1);
}

.suspect {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(0,0,0,0.2);
    border-left: 3px solid var(--accent-blue);
    border-radius: 4px;
}

.suspect strong {
    display: block;
    margin-bottom: 0.5rem;
    color: white;
}

/* ===== HARD MODE (DETECTIVE DESK) ===== */
.detective-desk {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px 60px;
}

.desk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    font-family: var(--font-doc);
}

.timer {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--accent-red);
    font-weight: 600;
}

.folders-container {
    display: flex;
    flex-direction: column;
}

.folder-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: -1px;
    z-index: 10;
}

.tab-btn {
    padding: 10px 16px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--glass-border);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.82rem;
    transition: all 0.3s;
    white-space: nowrap;
}

.tab-btn:hover {
    background: rgba(30, 41, 59, 0.8);
    color: white;
}

.tab-btn.active {
    background: rgba(30, 41, 59, 0.9);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    position: relative;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(30, 41, 59, 0.9);
}

.folder-content {
    border-top-left-radius: 0;
    border-color: rgba(255, 255, 255, 0.3);
    min-height: 400px;
    font-family: var(--font-doc);
    line-height: 1.8;
    overflow: visible;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease;
}

/* Both .hidden and .hidden-tab serve as fallback hide classes */
.hidden,
.tab-pane.hidden,
.tab-pane.hidden-tab {
    display: none !important;
}

/* Active always wins — must override any hidden class */
.tab-pane.active {
    display: block !important;
    animation: fadeIn 0.4s ease;
}

.transcript-list {
    list-style: none;
}

.transcript-list li {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px dashed var(--glass-border);
}

.note-scribble {
    font-family: cursive;
    color: #fbbf24;
    background: rgba(0,0,0,0.2);
    padding: 1rem;
    transform: rotate(-1deg);
    margin-top: 2rem;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
}

/* ===== DOSSIER CARDS ===== */
.dossier-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

.suspect-dossier {
    background: rgba(20, 25, 35, 0.8);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}

.suspect-dossier::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-blue);
}

.dossier-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 1rem;
}

.silhoutte-box {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.dossier-info h4 {
    margin: 0 0 0.25rem 0;
    letter-spacing: 1px;
}

.dossier-info span {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--font-ui);
}

.dossier-body em {
    color: #cbd5e1;
    font-style: italic;
    line-height: 1.5;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-muted);
}

select, input[type="text"] {
    width: 100%;
    padding: 12px;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    color: white;
    font-family: var(--font-ui);
    font-size: 1rem;
}

select option {
    background: var(--bg-dark);
}

select:focus, input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.feedback {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 6px;
    display: none;
}

.feedback.success {
    display: block;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid #10b981;
    color: #34d399;
}

.feedback.error {
    display: block;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid var(--accent-red);
    color: #fca5a5;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .case-selection { flex-direction: column; }
    .normal-case-grid { grid-template-columns: 1fr; }
    #landing-view .title { font-size: 2rem; }
    .folder-tabs { flex-wrap: nowrap; }
    .tab-btn { flex: 0 0 auto; border-radius: 8px 8px 0 0; }
}

/* ===== MODAL & EXPLORATION ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    padding: 40px 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    max-height: none;
    overflow-y: visible;
    background: var(--bg-dark);
    padding: 2rem;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    margin: auto;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--accent-red);
}

/* Dossier Modal Styling */
.dossier-detail-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1.5rem;
}

.dossier-detail-header .silhoutte-box {
    width: 80px;
    height: 80px;
    font-size: 3rem;
}

.dossier-detail-section {
    margin-bottom: 1.5rem;
}

.dossier-detail-section h4 {
    color: var(--accent-blue);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.dossier-detail-section p {
    line-height: 1.7;
    color: #e2e8f0;
}

.dialogue {
    background: rgba(0,0,0,0.3);
    padding: 1rem;
    border-left: 3px solid var(--accent-blue);
    font-family: var(--font-doc);
    white-space: pre-line;
}

/* Interactive Image Styling */
.interactive-scene {
    position: relative;
    display: inline-block;
    width: 100%;
}

.interactive-scene img {
    width: 100%;
    display: block;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

.hotspot {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--accent-red);
    border-radius: 50%;
    cursor: pointer;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 rgba(239, 68, 68, 0.4);
    animation: pulse 2s infinite;
    z-index: 10;
}

.hotspot:hover {
    background: white;
    animation: none;
    box-shadow: 0 0 10px white;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Make suspects clickable */
.suspect-dossier, .transcript-list li {
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.suspect-dossier:hover, .transcript-list li:hover {
    background: rgba(255,255,255,0.05);
    transform: scale(1.02);
}

.evidence-img.zoomable {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.evidence-img.zoomable:hover {
    transform: scale(1.01);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

/* ===== LOCKED TABS & NEWSPAPER ===== */
.tab-btn.locked {
    background: rgba(30, 30, 40, 0.5);
    color: #64748b;
    cursor: not-allowed;
    border-color: rgba(255,255,255,0.05);
}

.tab-btn.locked:hover {
    background: rgba(30, 30, 40, 0.5);
    transform: none;
    border-color: rgba(255,255,255,0.05);
    color: #64748b;
}

.newspaper-content {
    background: #fcf8ee;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(244, 236, 216, 0.15) 0%, rgba(220, 208, 175, 0.25) 100%),
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 100% 4px;
    color: #1a1a1a;
    width: 95%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 3rem;
    position: relative;
    border: 1px solid #c8ba9d;
    box-shadow: 
        0 15px 45px rgba(0,0,0,0.7),
        inset 0 0 40px rgba(139, 115, 85, 0.15);
    font-family: 'Times New Roman', Times, Baskerville, Georgia, serif;
    transform: scale(0.1) rotate(-180deg);
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.8s;
    margin: auto;
}

/* Subtle paper fold crease effect */
.newspaper-content::after {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    width: 2px; height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.06), transparent, rgba(255,255,255,0.4), transparent);
    pointer-events: none;
    z-index: 5;
}

.modal-overlay.active .newspaper-content {
    transform: scale(1) rotate(0deg);
    opacity: 1;
}

.newspaper-header {
    text-align: center;
    border-bottom: 5px double #2b2b2b;
    padding-bottom: 0.8rem;
    margin-bottom: 1.5rem;
}

.newspaper-header h1 {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: -1px;
    margin: 0;
    color: #000;
    text-transform: uppercase;
    font-family: 'Times New Roman', serif;
    line-height: 1;
    text-shadow: 1px 1px 0px rgba(255,255,255,0.8);
}

.newspaper-date {
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-top: 2px solid #2b2b2b;
    border-bottom: 2px solid #2b2b2b;
    padding: 6px 0;
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    font-family: 'Courier New', Courier, monospace;
}

.newspaper-body {
    text-align: center;
    position: relative;
}

.newspaper-body h2 {
    font-size: 2.3rem;
    font-weight: 800;
    line-height: 1.15;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    color: #111;
    text-transform: uppercase;
    border-bottom: 1px solid #c8ba9d;
    padding-bottom: 1rem;
    font-family: 'Times New Roman', serif;
}

.news-columns {
    column-count: 2;
    column-gap: 2.5rem;
    column-rule: 1px solid rgba(0, 0, 0, 0.12);
    text-align: justify;
    font-size: 1.05rem;
    line-height: 1.65;
    color: #2b2b2b;
}

/* Styled drop cap for newspaper articles */
.news-columns p::first-letter {
    font-size: 3.5rem;
    font-weight: bold;
    float: left;
    margin-top: 4px;
    margin-right: 8px;
    line-height: 0.8;
    color: #000;
    font-family: 'Times New Roman', serif;
}

/* Red Rubber Stamp "KASUS SELESAI" style */
.newspaper-stamp {
    position: absolute;
    bottom: 20px;
    right: 40px;
    border: 3px double rgba(220, 38, 38, 0.85);
    color: rgba(220, 38, 38, 0.85);
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 6px 15px;
    text-transform: uppercase;
    transform: rotate(-12deg);
    border-radius: 4px;
    letter-spacing: 2px;
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 0 1px rgba(220, 38, 38, 0.2);
    background: rgba(252, 248, 238, 0.9);
}

@media (max-width: 600px) {
    .news-columns {
        column-count: 1;
    }
    .newspaper-header h1 {
        font-size: 2.5rem;
    }
}

/* ===== LAPTOP PUZZLE ===== */
.laptop-puzzle-container {
    padding: 1rem;
}

.desk-scene {
    position: relative;
    width: 100%;
    height: 350px;
    background: #2a221f; /* dark wood desk */
    border-radius: 10px;
    border: 2px solid #1a1513;
    overflow: hidden;
    margin-top: 1rem;
}

.occult-book {
    position: absolute;
    left: 10%;
    top: 50%;
    width: 80px;
    height: 120px;
    background: #3a1a1a;
    border: 3px solid #1a0a0a;
    border-radius: 4px;
    box-shadow: -5px 5px 15px rgba(0,0,0,0.6);
    transform: rotate(-15deg);
}

.occult-book .bookmark {
    position: absolute;
    top: -15px;
    right: 15px;
    width: 30px;
    height: 50px;
    background: #fef08a;
    color: #854d0e;
    font-size: 0.6rem;
    font-weight: bold;
    text-align: center;
    line-height: 1.2;
    padding-top: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 0;
}

.occult-book .book-title {
    position: absolute;
    top: 20%;
    width: 100%;
    text-align: center;
    color: #d4af37;
    font-family: var(--font-doc);
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 1;
}

.desk-calendar {
    position: absolute;
    right: 10%;
    top: 40%;
    width: 70px;
    height: 80px;
    background: white;
    border-radius: 4px;
    box-shadow: 2px 5px 10px rgba(0,0,0,0.5);
    transform: rotate(10deg);
}

.desk-calendar .cal-header {
    background: var(--accent-red);
    color: white;
    text-align: center;
    font-weight: bold;
    font-size: 0.8rem;
    padding: 4px 0;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.desk-calendar .cal-body {
    padding: 10px;
    text-align: center;
    color: #333;
}

.desk-calendar .year-circled {
    display: inline-block;
    font-size: 1rem;
    font-weight: bold;
    border: 2px solid var(--accent-red);
    border-radius: 50%;
    padding: 2px 4px;
    transform: rotate(-5deg);
}

.laptop-device {
    position: absolute;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    width: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.laptop-screen {
    width: 260px;
    height: 180px;
    background: #111;
    border: 12px solid #222;
    border-radius: 8px 8px 0 0;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8), 0 -5px 15px rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.laptop-base {
    width: 300px;
    height: 15px;
    background: #333;
    border-radius: 0 0 10px 10px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.6);
}

.laptop-base::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 2px;
    transform: translateX(-50%);
    width: 40px;
    height: 5px;
    background: #555;
    border-radius: 0 0 4px 4px;
}

.login-prompt {
    text-align: center;
    color: #0f0;
    font-family: monospace;
    width: 80%;
}

.login-prompt input {
    background: #000;
    border: 1px solid #0f0;
    color: #0f0;
    font-family: monospace;
    text-align: center;
    width: 80px;
    padding: 5px;
    letter-spacing: 4px;
}

.login-prompt input:focus {
    outline: none;
    box-shadow: 0 0 8px #0f0;
}

.sticky-note {
    position: absolute;
    top: -15px;
    right: -20px;
    width: 100px;
    background: #fef08a;
    color: #333;
    padding: 8px;
    font-family: cursive;
    font-size: 0.65rem;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
    transform: rotate(5deg);
    z-index: 10;
}

@media (max-width: 600px) {
    .laptop-device {
        transform: translateX(-50%) scale(0.8);
        bottom: 40px;
    }
    .desk-scene {
        height: 300px;
    }
    .desk-calendar {
        right: 2%;
    }
    .occult-book {
        left: 2%;
    }
}

/* ===== CLOCK PUZZLE ===== */
.clock-puzzle-container {
    padding: 1rem;
}

.clock-back-scene {
    position: relative;
    width: 100%;
    background: #3e2723; /* wood texture */
    border-radius: 50% 50% 10px 10px;
    border: 8px solid #2e1a14;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.8);
    overflow: hidden;
}

.clock-mechanism {
    position: relative;
    width: 150px;
    height: 150px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gear {
    position: absolute;
    font-size: 3rem;
    color: #bcaaa4;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
    animation: spin 10s linear infinite;
}

.gear-1 {
    top: 10px;
    left: 20px;
    font-size: 4rem;
    color: #ffd54f;
    animation-duration: 15s;
    animation-direction: reverse;
}

.gear-2 {
    bottom: 20px;
    right: 30px;
    font-size: 3.5rem;
}

.gear-3 {
    top: 50px;
    right: 10px;
    font-size: 2.5rem;
    color: #90a4ae;
    animation-duration: 5s;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

.brass-plaque {
    background: linear-gradient(135deg, #d4af37, #aa8c2c);
    color: #3e2723;
    padding: 15px;
    border-radius: 4px;
    border: 2px solid #5d4037;
    width: 80%;
    text-align: center;
    font-family: var(--font-doc);
    font-size: 0.9rem;
    box-shadow: 2px 4px 10px rgba(0,0,0,0.5);
    margin-bottom: 1.5rem;
    position: relative;
}

.brass-plaque::before, .brass-plaque::after {
    content: '•';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: #3e2723;
}

.brass-plaque::before { left: 10px; }
.brass-plaque::after { right: 10px; }

.witness-note {
    background: rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--accent-blue);
    padding: 1rem;
    margin-bottom: 2rem;
    font-style: italic;
    color: #e0e0e0;
}

.clock-input-area {
    text-align: center;
    background: rgba(0,0,0,0.3);
    padding: 1.5rem;
    border-radius: 8px;
    width: 100%;
}

.clock-input-area input {
    font-size: 1.5rem;
    letter-spacing: 5px;
    text-align: center;
    width: 150px;
    margin: 10px auto;
    display: block;
}

/* ===== TAB BOTTLE (Anagram) ===== */
.chemical-analyzer {
    background: #1e293b;
    border: 2px solid #334155;
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

.machine-screen {
    background: #064e3b;
    color: #34d399;
    font-family: monospace;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 2px solid #059669;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.beep {
    color: #ef4444;
    font-weight: bold;
    animation: flash 1s infinite;
}

@keyframes flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.anagram-letters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.scramble-letter {
    display: inline-block;
    background: #0f172a;
    border: 1px solid #34d399;
    padding: 10px 15px;
    font-size: 1.5rem;
    font-weight: bold;
    border-radius: 4px;
    text-shadow: 0 0 5px #34d399;
}

.analyzer-input-group {
    display: flex;
    gap: 10px;
}

.analyzer-input-group input {
    flex: 1;
}

/* ===== TAB DOOR (Forensic Canvas) ===== */
.forensic-game {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 15px;
    width: 100%;
}

.canvas-wrapper {
    width: 100%;
    max-width: 500px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #4a3320;
    box-shadow: 0 5px 20px rgba(0,0,0,0.6), inset 0 0 8px rgba(0,0,0,0.3);
    cursor: crosshair;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none; /* Prevent browser from hijacking touch for scroll */
    transition: transform 0.6s ease;
}

@keyframes fadeOutScale {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

.canvas-fade-out {
    animation: fadeOutScale 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    pointer-events: none;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.sem-fade-in {
    animation: fadeInScale 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

#forensic-canvas {
    display: block;
    width: 100%;
    height: auto;
    cursor: crosshair;
    /* Wood grain — shows through transparent (erased dust) canvas pixels */
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 37px,
            rgba(0,0,0,0.25) 37px,
            rgba(0,0,0,0.25) 40px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 120px,
            rgba(0,0,0,0.04) 120px,
            rgba(0,0,0,0.04) 122px
        ),
        linear-gradient(
            180deg,
            #6b4226 0%,
            #7a4f30 20%,
            #6b4226 40%,
            #8a5a38 60%,
            #6b4226 80%,
            #7a4f30 100%
        );
}

.scan-text {
    color: #60a5fa;
    font-family: monospace;
    margin: 15px 0;
    text-align: center;
}

.riddle {
    font-style: italic;
    background: rgba(255,255,255,0.05);
    padding: 15px;
    border-left: 3px solid #60a5fa;
    margin-bottom: 15px;
}

/* ===== TAB DEDUCTION (Drag & Drop) ===== */
.deduction-board {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 15px;
}

.clues-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 15px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    min-height: 80px;
}

.clue-item {
    background: #1e293b;
    border: 1px solid #475569;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: grab;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    user-select: none;
    transition: transform 0.2s;
}

.clue-item:active {
    cursor: grabbing;
    transform: scale(0.95);
}

.suspects-container {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.suspect-silhouette {
    flex: 1;
    background: rgba(30, 41, 59, 0.5);
    border: 2px dashed #475569;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    transition: background 0.3s, border-color 0.3s;
}

.suspect-silhouette.drag-over {
    background: rgba(30, 41, 59, 0.8);
    border-color: #3b82f6;
}

.suspect-silhouette h4 {
    margin-bottom: 15px;
    color: #94a3b8;
    letter-spacing: 2px;
}

.drop-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 100px;
}

/* ===== SUSPECT DOSSIER ===== */
.dossier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.suspect-dossier {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid #334155;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.suspect-dossier:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.dossier-header {
    background: #1e293b;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #334155;
}

.silhoutte-box {
    width: 50px;
    height: 50px;
    background: #0f172a;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 1px dashed #64748b;
}

.dossier-info h4 {
    margin: 0 0 5px 0;
    color: #f1f5f9;
    font-size: 1.1rem;
}

.dossier-info span {
    font-size: 0.8rem;
    color: #94a3b8;
}

.dossier-body {
    padding: 15px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #cbd5e1;
    flex: 1;
}

.dossier-body p {
    margin-bottom: 10px;
}

.dossier-body .dialogue {
    background: rgba(0,0,0,0.3);
    padding: 10px;
    border-left: 3px solid #3b82f6;
    margin: 10px 0;
    font-style: italic;
    color: #e2e8f0;
}

/* ══════════════════════════════════════════════
   HARD MODE — IMPROVED LAYOUT & VISUAL POLISH
══════════════════════════════════════════════ */

/* ── btn-primary (was missing) ── */
.btn-primary {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
    color: #93c5fd;
}
.btn-primary:hover {
    background: #3b82f6;
    color: white;
}

/* ── Desk header improvements ── */
.desk-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(239, 68, 68, 0.3);
    font-family: var(--font-doc);
}

.desk-header-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hard-mode-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--accent-red);
    text-transform: uppercase;
    font-family: var(--font-ui);
}

.desk-header h2 {
    font-size: 1.6rem;
    letter-spacing: 2px;
    color: #f1f5f9;
    margin: 0;
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

/* ── CASE INTRO (PROLOG) ── */
.case-intro {
    background: linear-gradient(135deg,
        rgba(10, 5, 15, 0.97) 0%,
        rgba(20, 10, 30, 0.97) 50%,
        rgba(10, 5, 20, 0.97) 100%);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 12px;
    padding: 2rem 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 60px rgba(239, 68, 68, 0.06), inset 0 0 80px rgba(0, 0, 0, 0.4);
}

/* Decorative corner accents */
.case-intro::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 80px; height: 80px;
    border-top: 2px solid rgba(239, 68, 68, 0.4);
    border-left: 2px solid rgba(239, 68, 68, 0.4);
    border-radius: 12px 0 0 0;
    pointer-events: none;
}
.case-intro::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 80px; height: 80px;
    border-bottom: 2px solid rgba(239, 68, 68, 0.4);
    border-right: 2px solid rgba(239, 68, 68, 0.4);
    border-radius: 0 0 12px 0;
    pointer-events: none;
}

.intro-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 4px;
    padding: 4px 12px;
    margin-bottom: 1rem;
    font-family: var(--font-ui);
}

.intro-title {
    font-family: var(--font-doc);
    font-size: 2rem;
    color: #f8fafc;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
    text-shadow: 0 2px 15px rgba(239, 68, 68, 0.2);
    line-height: 1.2;
}

.intro-section {
    margin-bottom: 1.5rem;
}

.intro-section p {
    color: #cbd5e1;
    line-height: 1.85;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.intro-highlight {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(239, 68, 68, 0.08);
    border-left: 3px solid var(--accent-red);
    padding: 12px 16px;
    border-radius: 0 6px 6px 0;
    margin: 1rem 0;
    color: #fca5a5;
    font-family: var(--font-doc);
    font-size: 1rem;
    font-weight: 600;
}

.highlight-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.intro-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.intro-col {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 1.25rem;
}

.intro-col h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    font-family: var(--font-ui);
}

.col-icon {
    font-size: 1rem;
}

.intro-col p {
    color: #94a3b8;
    font-size: 0.88rem;
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.col-emphasis {
    color: #e2e8f0 !important;
    font-style: italic;
    border-left: 2px solid rgba(239, 68, 68, 0.5);
    padding-left: 10px;
}

.poison-name {
    color: #f87171;
}

.intro-mission {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    background: rgba(234, 179, 8, 0.05);
    border: 1px solid rgba(234, 179, 8, 0.2);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-top: 1rem;
}

.mission-icon {
    font-size: 2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.mission-text strong {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #fbbf24;
    margin-bottom: 6px;
    font-family: var(--font-ui);
}

.mission-text p {
    color: #94a3b8;
    font-size: 0.88rem;
    line-height: 1.7;
    margin: 0;
}

/* ── TABS wrapper (scrollable on small screens) ── */
.folder-tabs-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(0, 0, 0, 0.1);
    padding-bottom: 4px;
}
.folder-tabs-wrapper::-webkit-scrollbar {
    display: block;
    height: 5px;
}
.folder-tabs-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}
.folder-tabs-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}
.folder-tabs-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.folder-tabs {
    display: flex;
    gap: 3px;
    margin-bottom: -1px;
    z-index: 10;
    min-width: max-content;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255,255,255,0.08);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    color: #64748b;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.82rem;
    transition: all 0.25s ease;
    white-space: nowrap;
    font-family: var(--font-ui);
}

.tab-icon { font-size: 1rem; }

.tab-btn:hover:not(.locked) {
    background: rgba(30, 41, 59, 0.9);
    color: #cbd5e1;
    border-color: rgba(255,255,255,0.15);
}

.tab-btn.active {
    background: rgba(30, 41, 59, 0.95);
    color: #f1f5f9;
    border-color: rgba(255,255,255,0.2);
    position: relative;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(30, 41, 59, 0.95);
}

.tab-btn.active .tab-icon {
    filter: drop-shadow(0 0 6px currentColor);
}

/* ── Tab pane inner header ── */
.tab-pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.tab-pane-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #e2e8f0;
    font-family: var(--font-doc);
}

.doc-stamp {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--accent-red);
    border: 2px solid var(--accent-red);
    padding: 3px 8px;
    border-radius: 3px;
    opacity: 0.7;
    transform: rotate(3deg);
    display: inline-block;
}

.evidence-badge {
    font-size: 0.7rem;
    font-weight: 700;
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 3px 10px;
    border-radius: 12px;
    font-family: var(--font-ui);
    letter-spacing: 1px;
}

.evidence-narasi {
    color: #94a3b8;
    font-size: 0.92rem;
    line-height: 1.75;
    margin-bottom: 1.5rem;
    background: rgba(255,255,255,0.02);
    border-left: 3px solid rgba(59, 130, 246, 0.4);
    padding: 0.75rem 1rem;
    border-radius: 0 6px 6px 0;
}

/* ── FORENSIC DOC (Autopsy tab) ── */
.forensic-doc {
    font-family: monospace;
    font-size: 0.88rem;
    line-height: 1.6;
    color: #cbd5e1;
}

.doc-letterhead {
    text-align: center;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    color: #94a3b8;
    font-size: 0.82rem;
}

.doc-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed rgba(255,255,255,0.06);
}

.doc-section h4 {
    color: #60a5fa;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    font-family: var(--font-ui);
}

.doc-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.doc-grid-full { grid-column: 1 / -1; }

.doc-grid-2 > div {
    background: rgba(0,0,0,0.2);
    padding: 8px 12px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
}

.doc-grid-2 label {
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.doc-grid-2 span {
    color: #e2e8f0;
    font-weight: 600;
}

.doc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.doc-list li {
    padding: 8px 12px;
    background: rgba(0,0,0,0.15);
    border-radius: 4px;
    border-left: 2px solid rgba(255,255,255,0.07);
}

.doc-list-critical {
    border-left-color: var(--accent-red) !important;
    background: rgba(239, 68, 68, 0.05) !important;
    color: #fca5a5;
}

.doc-list-critical ul {
    list-style: disc;
    margin: 8px 0 0 20px;
    color: #f87171;
}

.tox-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    font-size: 0.85rem;
}

.tox-table th {
    background: rgba(255,255,255,0.06);
    padding: 8px 12px;
    text-align: left;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: #94a3b8;
    font-family: var(--font-ui);
}

.tox-table td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.tox-table .row-critical {
    background: rgba(239, 68, 68, 0.06);
}

.result-neg { color: #34d399; font-weight: 700; }
.result-pos { color: #f87171; font-weight: 700; }

.doc-note-yellow {
    background: rgba(234, 179, 8, 0.06);
    border: 1px solid rgba(234, 179, 8, 0.2);
    border-radius: 6px;
    padding: 12px;
    color: #fbbf24;
    font-style: italic;
    font-size: 0.9rem;
}

.doc-conclusion {
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 1.25rem;
    margin-top: 0.5rem;
}

.doc-conclusion h4 {
    color: var(--accent-red);
    font-family: var(--font-ui);
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}

.conclusion-verdict {
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    color: #fca5a5;
    margin-top: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: var(--font-ui);
}

/* ── SUSPECTS META ── */
.suspects-meta {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 1.25rem;
    font-family: var(--font-ui);
}

/* ── SUSPECT DOSSIER CARDS ── */
.suspect-key .dossier-header {
    background: linear-gradient(135deg, rgba(239,68,68,0.1), rgba(30,41,59,1));
    border-bottom-color: rgba(239,68,68,0.2);
}
.suspect-key {
    border-color: rgba(239, 68, 68, 0.3) !important;
}

.suspect-witness .dossier-header {
    background: linear-gradient(135deg, rgba(234,179,8,0.1), rgba(30,41,59,1));
    border-bottom-color: rgba(234,179,8,0.2);
}
.suspect-witness {
    border-color: rgba(234, 179, 8, 0.4) !important;
}

.detective-note {
    font-size: 0.8rem;
    color: #fbbf24;
    background: rgba(234, 179, 8, 0.05);
    border-left: 2px solid rgba(234, 179, 8, 0.4);
    padding: 6px 10px;
    margin-top: 8px;
    border-radius: 0 4px 4px 0;
    font-style: italic;
}

/* ── DEDUCTION BOARD: drop hint ── */
.drop-hint {
    font-size: 0.75rem;
    color: #475569;
    margin-bottom: 8px;
    font-family: var(--font-ui);
    font-style: italic;
}

/* ══ RESPONSIVE ══ */
@media (max-width: 900px) {
    .intro-columns {
        grid-template-columns: 1fr;
    }
    .intro-title {
        font-size: 1.5rem;
    }
    .doc-grid-2 {
        grid-template-columns: 1fr;
    }
    .doc-grid-full {
        grid-column: 1;
    }
    .tab-label {
        display: inline;
    }
    .tab-btn {
        padding: 10px 12px;
    }
}

@media (max-width: 600px) {
    .case-intro {
        padding: 1.25rem;
    }
    .intro-title {
        font-size: 1.25rem;
    }
    .intro-mission {
        flex-direction: column;
    }
    .detective-desk {
        padding: 60px 12px 40px;
    }
    .dossier-grid {
        grid-template-columns: 1fr;
    }
}

/* ══════════════════════════════════════════════
   SUSPECT CASE-FILE CARDS — NEW DESIGN
══════════════════════════════════════════════ */

.case-file-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-top: 12px;
}

/* ── Base card ── */
.case-file {
    background: #0d1117;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.07);
    overflow: hidden;
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    display: flex;
    flex-direction: column;
}

.case-file:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.6);
    border-color: rgba(255,255,255,0.15);
}

/* ── Top accent stripe ── */
.case-file-accent {
    height: 4px;
    width: 100%;
    flex-shrink: 0;
}

.accent-red    { background: linear-gradient(90deg, #ef4444 0%, #991b1b 100%); }
.accent-amber  { background: linear-gradient(90deg, #f59e0b 0%, #92400e 100%); }
.accent-blue   { background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 100%); }
.accent-purple { background: linear-gradient(90deg, #a855f7 0%, #6b21a8 100%); }
.accent-teal   { background: linear-gradient(90deg, #14b8a6 0%, #0f766e 100%); }
.accent-slate  { background: linear-gradient(90deg, #64748b 0%, #334155 100%); }

/* ── File number badge ── */
.file-number {
    position: absolute;
    top: 14px;
    right: 42px;
    font-size: 0.62rem;
    color: #475569;
    font-family: monospace;
    letter-spacing: 1.5px;
    background: rgba(0,0,0,0.4);
    padding: 2px 7px;
    border-radius: 3px;
    border: 1px solid rgba(255,255,255,0.05);
    pointer-events: none;
}

/* ── Cross-out button ── */
.cf-cross-btn {
    position: absolute;
    top: 13px;
    right: 14px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    transition: all 0.2s ease;
    z-index: 6;
}

.cf-cross-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fca5a5;
    transform: scale(1.15);
}

.cf-cross-btn.active {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

/* ── Crossed out state ── */
.case-file.cf-crossed-out {
    opacity: 0.3;
    filter: grayscale(90%) blur(0.3px);
    transition: all 0.3s ease;
}

.case-file.cf-crossed-out::after {
    content: '❌';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    font-size: 4rem;
    color: rgba(239, 68, 68, 0.4);
    z-index: 5;
    pointer-events: none;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.8);
    font-family: Arial, sans-serif;
}

/* ── Card header ── */
.case-file-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 14px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.cf-photo {
    width: 58px;
    height: 58px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: inset 0 0 12px rgba(0,0,0,0.4);
}

.cf-info {
    flex: 1;
    min-width: 0;
    padding-right: 40px; /* room for file number */
}

.cf-name {
    font-size: 1rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0 0 3px 0;
    font-family: var(--font-doc);
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cf-age-role {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 7px;
    font-family: var(--font-ui);
}

/* ── Status badges ── */
.cf-badge {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 3px 9px;
    border-radius: 4px;
    text-transform: uppercase;
    font-family: var(--font-ui);
}

.badge-utama {
    background: rgba(239,68,68,0.18);
    color: #fca5a5;
    border: 1px solid rgba(239,68,68,0.4);
}

.badge-saksi {
    background: rgba(234,179,8,0.15);
    color: #fbbf24;
    border: 1px solid rgba(234,179,8,0.35);
}

.badge-normal {
    background: rgba(100,116,139,0.15);
    color: #94a3b8;
    border: 1px solid rgba(100,116,139,0.25);
}

/* ── Card body ── */
.case-file-body {
    padding: 13px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

/* Two-column row: background + motif */
.cf-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: start;
}

.cf-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cf-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #475569;
    font-family: var(--font-ui);
}

.cf-text {
    font-size: 0.81rem;
    color: #94a3b8;
    line-height: 1.55;
    margin: 0;
}

/* Motif tag pill */
.cf-motif-tag {
    display: inline-block;
    background: rgba(30,41,59,0.8);
    border: 1px solid rgba(255,255,255,0.08);
    color: #cbd5e1;
    font-size: 0.72rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
    font-family: var(--font-ui);
    align-self: flex-start;
}

/* ── Alibi block ── */
.cf-alibi {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    padding: 9px 12px;
    position: relative;
}

.cf-alibi-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #475569;
    margin-bottom: 5px;
    font-family: var(--font-ui);
}

.cf-alibi-text {
    font-size: 0.81rem;
    color: #94a3b8;
    font-style: italic;
    line-height: 1.55;
    margin: 0;
}

/* ── Detective note ── */
.cf-note {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    background: rgba(234,179,8,0.04);
    border: 1px solid rgba(234,179,8,0.15);
    border-radius: 6px;
    padding: 8px 10px;
}

.cf-note-icon {
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.cf-note-text {
    font-size: 0.77rem;
    color: #a16207;
    line-height: 1.5;
    font-style: italic;
    color: #ca8a04;
}

/* ── Hover glow per accent ── */
.case-file:hover .case-file-accent.accent-red    { box-shadow: 0 0 12px rgba(239,68,68,0.6); }
.case-file:hover .case-file-accent.accent-amber  { box-shadow: 0 0 12px rgba(245,158,11,0.6); }
.case-file:hover .case-file-accent.accent-blue   { box-shadow: 0 0 12px rgba(59,130,246,0.6); }
.case-file:hover .case-file-accent.accent-purple { box-shadow: 0 0 12px rgba(168,85,247,0.6); }
.case-file:hover .case-file-accent.accent-teal   { box-shadow: 0 0 12px rgba(20,184,166,0.6); }

/* ── Responsive ── */
@media (max-width: 900px) {
    .case-file-grid {
        grid-template-columns: 1fr;
    }
    .cf-row {
        grid-template-columns: 1fr;
    }
    .cf-motif-tag {
        align-self: flex-start;
    }
}

/* ══════════════════════════════════════════════
   HARD MODE — PUZZLE VISUAL UPGRADES
══════════════════════════════════════════════ */

/* Burned journal fragment found in ashtray */
.journal-fragment {
    margin-top: 1.2rem;
    background: linear-gradient(135deg, #1a1208, #231a0c);
    border: 1px solid #4a3520;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.6), inset 0 0 30px rgba(0,0,0,0.4);
    position: relative;
}

.journal-fragment::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 22px,
            rgba(101,67,33,0.15) 22px,
            rgba(101,67,33,0.15) 23px
        );
    pointer-events: none;
}

.fragment-header {
    background: rgba(180, 50, 0, 0.25);
    border-bottom: 1px solid #5c3010;
    padding: 6px 14px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #e07020;
    font-family: var(--font-ui);
    text-transform: uppercase;
}

.fragment-body {
    padding: 14px 18px;
    font-family: 'Crimson Text', Georgia, serif;
    font-size: 0.95rem;
    line-height: 1.85;
    color: #c9a86c;
    font-style: italic;
}

.fragment-body strong {
    color: #f0c060;
    font-style: normal;
    font-size: 1.1em;
}

/* Machine screen table rows zebra */
.machine-screen table tr:nth-child(odd) {
    background: rgba(255,255,255,0.02);
}
.machine-screen table tr:nth-child(even) {
    background: rgba(0,0,0,0.15);
}
.machine-screen table td {
    border-bottom: 1px solid rgba(255,255,255,0.04);
    vertical-align: top;
}

/* Monospace code in plaque */
.brass-plaque code {
    background: rgba(0,0,0,0.3);
    padding: 1px 5px;
    border-radius: 3px;
    color: #fbbf24;
    font-size: 0.85em;
}

/* ── Second witness conflict box (Pak Toha vs Bi Lestari) ── */
.cf-witness-conflict {
    margin: 10px 0 6px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-left: 3px solid #f59e0b;
    border-radius: 5px;
    padding: 8px 12px;
}

.cf-witness-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fbbf24;
    margin-bottom: 4px;
    font-family: var(--font-ui);
}

.cf-witness-text {
    font-size: 0.8rem;
    color: #d4a847;
    font-style: italic;
    line-height: 1.5;
    margin: 0;
}

/* ── False lead box (dr. Surya Aconitum book) ── */
.cf-false-lead {
    margin: 10px 0 6px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-left: 3px solid #818cf8;
    border-radius: 5px;
    padding: 8px 12px;
}

.cf-false-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #a5b4fc;
    margin-bottom: 4px;
    font-family: var(--font-ui);
}

.cf-false-text {
    font-size: 0.8rem;
    color: #93a4d4;
    font-style: italic;
    line-height: 1.5;
    margin: 0;
}

.cf-false-text em {
    color: #c7d2fe;
    font-style: normal;
    font-weight: 600;
}

/* ══════════════════════════════════════════════
   FASE PENYATUAN — ACCUSATION SYSTEM
══════════════════════════════════════════════ */

.deduction-step {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 20px 22px;
    margin-bottom: 18px;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.step-num {
    font-size: 1.8rem;
    font-weight: 900;
    color: rgba(255,255,255,0.08);
    font-family: var(--font-ui);
    line-height: 1;
    flex-shrink: 0;
    min-width: 42px;
}

.step-title {
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 3px;
}

.step-desc {
    font-size: 0.82rem;
    color: #475569;
    line-height: 1.4;
}

/* ── Suspect pick grid ── */
.suspect-pick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

@media (max-width: 700px) {
    .suspect-pick-grid { grid-template-columns: repeat(4, 1fr); }
}

.sp-card {
    position: relative;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 12px 8px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.sp-card:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.18);
    transform: translateY(-2px);
}

.sp-card.sp-selected {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 0 12px rgba(239,68,68,0.15);
}

.sp-emoji { font-size: 1.5rem; margin-bottom: 4px; }

.sp-name {
    font-size: 0.72rem;
    font-weight: 700;
    color: #cbd5e1;
    font-family: var(--font-ui);
}

.sp-role {
    font-size: 0.62rem;
    color: #475569;
    margin-top: 2px;
}

.sp-check {
    position: absolute;
    top: 6px; right: 8px;
    font-size: 0.7rem;
    color: #ef4444;
    font-weight: 900;
    opacity: 0;
    transition: opacity 0.2s;
}

.sp-card.sp-selected .sp-check { opacity: 1; }

/* ── Motif cards ── */
.motif-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

@media (max-width: 700px) {
    .motif-options { grid-template-columns: repeat(2, 1fr); }
}

.motif-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    color: #94a3b8;
    font-family: var(--font-ui);
    transition: all 0.2s;
    user-select: none;
}

.motif-card:hover {
    background: rgba(255,255,255,0.07);
    color: #e2e8f0;
}

.motif-card.motif-selected {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.45);
    color: #fbbf24;
    box-shadow: 0 0 10px rgba(251,191,36,0.12);
}

.motif-icon { font-size: 1.1rem; flex-shrink: 0; }

/* ── Chrono grid ── */
.chrono-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

@media (max-width: 700px) {
    .chrono-grid { grid-template-columns: 1fr; }
}

.chrono-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.chrono-item:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.15);
}

.chrono-item.chrono-set {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.4);
}

.chrono-order {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
    color: #475569;
    font-family: var(--font-ui);
    transition: all 0.25s;
    background: rgba(0,0,0,0.3);
}

.chrono-item.chrono-set .chrono-order {
    border-color: #818cf8;
    color: #a5b4fc;
    background: rgba(99,102,241,0.15);
    box-shadow: 0 0 8px rgba(99,102,241,0.3);
}

.chrono-text {
    font-size: 0.82rem;
    color: #94a3b8;
    line-height: 1.5;
}

.chrono-item.chrono-set .chrono-text { color: #c7d2fe; }

.chrono-hint {
    font-size: 0.72rem;
    color: #334155;
    font-style: italic;
    text-align: center;
    font-family: var(--font-ui);
}

/* ── Konfrontasi button ── */
.konfrontasi-area {
    text-align: center;
    margin-top: 24px;
    padding-bottom: 8px;
}

.btn-konfrontasi {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #7f1d1d, #991b1b, #b91c1c);
    border: 1px solid rgba(239,68,68,0.4);
    border-radius: 10px;
    padding: 18px 48px;
    cursor: pointer;
    color: #fff;
    box-shadow: 0 8px 32px rgba(185,28,28,0.35), inset 0 1px 0 rgba(255,255,255,0.1);
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
}

.btn-konfrontasi::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.08), transparent);
}

.btn-konfrontasi:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 14px 40px rgba(185,28,28,0.5), inset 0 1px 0 rgba(255,255,255,0.15);
}

.btn-konfrontasi:active:not(:disabled) { transform: translateY(0); }

.btn-konfrontasi:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.konf-icon { font-size: 1.6rem; }

.konf-label {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 3px;
    font-family: var(--font-ui);
    text-transform: uppercase;
}

.konf-sub {
    font-size: 0.62rem;
    color: rgba(255,255,255,0.5);
    letter-spacing: 1px;
    font-family: var(--font-ui);
}


.evidence-board {
    margin: 0 0 -1px 0;
    background: rgba(10, 15, 25, 0.85);
    border: 1px solid rgba(255,255,255,0.1);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: box-shadow 0.3s;
}

.evidence-board.eb-pulse {
    box-shadow: 0 0 0 2px #22c55e, 0 0 20px rgba(34,197,94,0.3);
}

.eb-header {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
    font-family: var(--font-ui);
}

.eb-cards {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

.eb-slot {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border: 1px dashed rgba(255,255,255,0.15);
    border-radius: 4px;
    font-size: 0.72rem;
    color: #475569;
    font-family: var(--font-ui);
    font-weight: 500;
    transition: all 0.5s ease;
    white-space: nowrap;
}

.eb-slot.eb-solved {
    border-style: solid;
    border-color: rgba(34, 197, 94, 0.4);
    background: rgba(34, 197, 94, 0.08);
    color: #86efac;
    animation: ebReveal 0.6s ease;
}

.eb-check {
    color: #22c55e;
    font-weight: 900;
    font-size: 0.85rem;
}

.eb-replay {
    margin-left: 2px;
    color: #4ade80;
    font-size: 0.8rem;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.eb-slot.eb-solved:hover .eb-replay {
    opacity: 1;
}

.eb-slot.eb-solved:hover {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.6);
}

@keyframes ebReveal {
    0% { transform: scale(0.8); opacity: 0; }
    60% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

/* ══════════════════════════════════════════════
   EVIDENCE REVEAL MODAL
══════════════════════════════════════════════ */
.ev-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 48px 16px 32px;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.ev-modal-overlay.hidden { display: none; }

.ev-modal-overlay.ev-active {
    opacity: 1;
}

.ev-modal-box {
    position: relative;
    background: linear-gradient(145deg, #0f1a2e, #111827);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 40px 36px 32px;
    max-width: 560px;
    width: 90vw;
    max-height: none;
    margin: auto;
    box-shadow: 0 25px 80px rgba(0,0,0,0.8), 0 0 0 1px rgba(34,197,94,0.2);
    transform: translateY(30px) scale(0.96);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
}

.ev-modal-overlay.ev-active .ev-modal-box {
    transform: translateY(0) scale(1);
}

.ev-stamp {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: #22c55e;
    color: #0a1a0a;
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 3px;
    padding: 4px 18px;
    border-radius: 20px;
    font-family: var(--font-ui);
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(34,197,94,0.4);
    animation: stampIn 0.5s 0.2s both cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes stampIn {
    from { transform: translateX(-50%) scale(0.5) rotate(-5deg); opacity: 0; }
    to   { transform: translateX(-50%) scale(1) rotate(0); opacity: 1; }
}

.ev-icon {
    font-size: 3rem;
    margin: 8px 0 14px;
    animation: iconDrop 0.5s 0.15s both;
}

@keyframes iconDrop {
    from { transform: translateY(-20px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.ev-title {
    font-family: var(--font-ui);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #f1f5f9;
    margin: 0 0 14px;
}

.ev-divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #22c55e, transparent);
    margin: 0 auto 16px;
    border-radius: 2px;
}

.ev-body {
    font-family: 'Crimson Text', Georgia, serif;
    font-size: 1rem;
    line-height: 1.8;
    color: #cbd5e1;
    text-align: left;
    margin-bottom: 18px;
}

.ev-body strong { color: #fbbf24; }
.ev-body em { color: #93c5fd; }

.ev-implication {
    background: rgba(34, 197, 94, 0.07);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 22px;
    text-align: left;
}

.ev-impl-label {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: #4ade80;
    margin-bottom: 6px;
    font-family: var(--font-ui);
}

.ev-impl-text {
    font-size: 0.88rem;
    color: #a7f3d0;
    line-height: 1.6;
    margin: 0;
    font-style: italic;
}

.ev-close-btn {
    background: transparent;
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #4ade80;
    padding: 10px 28px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    font-family: var(--font-ui);
    text-transform: uppercase;
    transition: all 0.2s;
}

.ev-close-btn:hover {
    background: rgba(34, 197, 94, 0.12);
    border-color: #22c55e;
    box-shadow: 0 0 12px rgba(34,197,94,0.2);
}


/* ═══════════════════════════════════════════════════════
   RESPONSIVE — TABLET & MOBILE
═══════════════════════════════════════════════════════ */

/* ── Tab icon / label behaviour ── */
.tab-icon { display: inline; margin-right: 4px; }
.tab-label { display: inline; }

/* ── Tablet (≤1100px) ── */
@media (max-width: 1100px) {
    .detective-desk { padding: 70px 16px 48px; }
    .tab-btn { padding: 8px 12px; font-size: 0.75rem; }
    .tab-label { display: inline; }
    .tab-icon { margin-right: 4px; font-size: 0.95rem; }
    .case-file-grid { grid-template-columns: 1fr 1fr; }
    .suspect-pick-grid { grid-template-columns: repeat(4, 1fr); }
    .motif-options { grid-template-columns: repeat(2, 1fr); }
}

/* ── Mobile (≤768px) ── */
@media (max-width: 768px) {
    .detective-desk { padding: 60px 12px 40px; }

    /* Tabs — scrollable row with label */
    .folder-tabs-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .folder-tabs { flex-wrap: nowrap; }
    .tab-btn { padding: 8px 12px; font-size: 0.72rem; flex: 0 0 auto; border-radius: 6px 6px 0 0; }
    .tab-label { display: inline; }
    .tab-icon { margin-right: 4px; font-size: 0.9rem; }

    /* Desk header */
    .desk-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .desk-header h2 { font-size: 1rem; }

    /* Evidence board */
    .evidence-board { flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 12px; }
    .eb-cards { flex-wrap: wrap; width: 100%; flex: none; }
    .eb-slot { font-size: 0.65rem; padding: 3px 8px; }
    .eb-header { font-size: 0.6rem; }

    /* Clock puzzle mobile overrides */
    .clock-back-scene { border-radius: 25% 25% 10px 10px; padding: 1.5rem 1rem; }
    .brass-plaque { width: 100%; padding: 10px; font-size: 0.72rem; }
    .clock-mechanism { width: 120px; height: 120px; margin-bottom: 1.25rem; }
    .gear-1 { font-size: 3rem; }
    .gear-2 { font-size: 2.8rem; }
    .gear-3 { font-size: 2rem; }

    /* Suspect cards grid */
    .suspect-pick-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
    .sp-card { padding: 8px 4px 6px; }
    .sp-emoji { font-size: 1.2rem; }
    .sp-name { font-size: 0.62rem; }
    .sp-role { display: none; }

    /* Motif */
    .motif-options { grid-template-columns: 1fr 1fr; gap: 8px; }
    .motif-card { font-size: 0.72rem; padding: 8px 10px; gap: 6px; }

    /* Chronology */
    .chrono-grid { grid-template-columns: 1fr; }
    .chrono-text { font-size: 0.78rem; }

    /* Case files */
    .case-file-grid { grid-template-columns: 1fr !important; }

    /* Folder content padding */
    .folder-content { padding: 14px 12px; }

    /* Glass panel */
    .glass-panel { padding: 14px; }

    /* Deduction steps */
    .deduction-step { padding: 14px 12px; }
    .step-num { font-size: 1.3rem; min-width: 32px; }

    /* Konfrontasi */
    .btn-konfrontasi { padding: 14px 28px; }
    .konf-label { font-size: 0.72rem; letter-spacing: 2px; }

    /* Evidence modal */
    .ev-modal-box { padding: 32px 20px 24px; }
    .ev-body { font-size: 0.9rem; }

    /* Landing page */
    .case-selection { flex-direction: column; align-items: center; }
    .case-card { width: 100%; max-width: 360px !important; }
}

/* ── Small mobile (≤480px) ── */
@media (max-width: 480px) {
    .suspect-pick-grid { grid-template-columns: repeat(4, 1fr); gap: 4px; }
    .sp-card { padding: 6px 2px 4px; }
    .sp-emoji { font-size: 1rem; }
    .tab-btn { padding: 6px 8px; }
}

/* ══ KASUS 02 SPECIFIC DEDUCTION OVERRIDES ══ */
#kasus02-view .sp-card.sp-selected {
    background: rgba(96, 165, 250, 0.12);
    border-color: rgba(96, 165, 250, 0.5);
    box-shadow: 0 0 12px rgba(96, 165, 250, 0.2);
}

#kasus02-view .sp-card.sp-selected .sp-check {
    color: #60a5fa;
}

#kasus02-view .btn-konfrontasi {
    background: linear-gradient(135deg, #1e3a8a, #1d4ed8, #2563eb);
    border-color: rgba(96, 165, 250, 0.4);
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.35), inset 0 1px 0 rgba(255,255,255,0.1);
}

#kasus02-view .btn-konfrontasi:hover:not(:disabled) {
    box-shadow: 0 14px 40px rgba(37, 99, 235, 0.5), inset 0 1px 0 rgba(255,255,255,0.15);
}

#kasus02-view .btn-konfrontasi::before {
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
}

/* ── Interrogation Modal ── */
.interrogation-modal {
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 30, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.interrogation-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.interrogation-box {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    height: 80vh;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

.interrogation-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
}

.interrogation-close:hover {
    color: #ef4444;
}

.interrogation-header {
    background: rgba(15, 23, 42, 0.6);
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.interrogation-badge {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: var(--font-ui);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 6px;
}

.interrogation-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.interrogation-left {
    width: 35%;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(15, 23, 42, 0.3);
}

.interrogation-right {
    width: 65%;
    display: flex;
    flex-direction: column;
    padding: 15px;
}

.interrogation-left h4, .interrogation-right h4 {
    font-size: 0.8rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    margin-top: 0;
}

.interrogation-topics {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    flex: 1;
}

.topic-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    padding: 10px 12px;
    border-radius: 6px;
    text-align: left;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.topic-btn:hover:not(.locked) {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    color: #93c5fd;
}

.topic-btn.active {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
    color: #93c5fd;
}

.topic-btn.locked {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.01);
    border-style: dashed;
}

.topic-lock-icon {
    font-size: 0.7rem;
    color: #64748b;
}

.interrogation-chat {
    flex: 1;
    background: #090d16;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    line-height: 1.4;
}

.chat-bubble.detective {
    align-self: flex-end;
    background: #1e3a8a;
    color: #eff6ff;
    border-bottom-right-radius: 2px;
}

.chat-bubble.suspect {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.05);
    color: #f1f5f9;
    border-left: 3px solid #64748b;
    border-bottom-left-radius: 2px;
}

.chat-bubble.suspect.accent-red    { border-color: #ef4444; }
.chat-bubble.suspect.accent-amber  { border-color: #f59e0b; }
.chat-bubble.suspect.accent-blue   { border-color: #3b82f6; }
.chat-bubble.suspect.accent-purple { border-color: #a855f7; }
.chat-bubble.suspect.accent-teal   { border-color: #14b8a6; }
.chat-bubble.suspect.accent-slate  { border-color: #64748b; }

.chat-sender {
    font-size: 0.68rem;
    font-weight: bold;
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chat-sender.detective {
    color: #93c5fd;
    text-align: right;
}

.chat-sender.suspect {
    color: #cbd5e1;
}

.chat-system {
    align-self: center;
    color: #64748b;
    font-size: 0.75rem;
    font-style: italic;
    margin: auto;
}

.cf-interrogate-btn {
    width: 100%;
    margin-top: 10px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 6px;
    color: #93c5fd;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-family: var(--font-ui);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.cf-interrogate-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
    color: white;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .interrogation-box {
        height: 90vh;
    }
    .interrogation-body {
        flex-direction: column;
        overflow-y: auto;
    }
    .interrogation-left {
        width: 100%;
        height: 40%;
        min-height: 180px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    }
    .interrogation-right {
        width: 100%;
        height: 60%;
        min-height: 250px;
    }
}

/* ── Confrontation Modal ── */
.confrontation-modal {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 10, 0.95);
    backdrop-filter: blur(12px);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.confrontation-modal.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.05);
}

.confrontation-box {
    background: #090d16;
    border: 2px solid #ef4444;
    border-radius: 12px;
    width: 95%;
    max-width: 750px;
    height: 85vh;
    max-height: 550px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 50px rgba(239, 68, 68, 0.25);
    overflow: hidden;
    animation: flash-red 0.5s ease-out;
}

@keyframes flash-red {
    0% { border-color: white; box-shadow: 0 0 100px white; }
    100% { border-color: #ef4444; box-shadow: 0 0 50px rgba(239, 68, 68, 0.25); }
}

.confrontation-header {
    background: rgba(239, 68, 68, 0.1);
    padding: 15px 20px;
    border-bottom: 1px solid rgba(239, 68, 68, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.confrontation-title {
    color: #fca5a5;
    font-family: var(--font-ui);
    font-weight: bold;
    letter-spacing: 2px;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.confrontation-hearts {
    font-size: 1.2rem;
    color: #ef4444;
    letter-spacing: 4px;
}

.confrontation-arena {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 25px;
    gap: 20px;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.8) 0%, rgba(9, 13, 22, 1) 100%);
    justify-content: center;
    align-items: center;
}

.confrontation-portrait-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.confrontation-portrait {
    font-size: 3rem;
    line-height: 1;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

.confrontation-character-name {
    font-family: var(--font-ui);
    font-weight: bold;
    color: #f8fafc;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.confrontation-bubble-area {
    width: 100%;
    max-width: 600px;
}

.confrontation-bubble {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 18px 24px;
    color: #e2e8f0;
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: center;
    position: relative;
    box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.02);
}

.confrontation-controls {
    background: #0f172a;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.confrontation-clues-label {
    font-size: 0.72rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

.confrontation-clues {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.conf-clue-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #cbd5e1;
    padding: 12px;
    font-size: 0.78rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-ui);
    display: flex;
    align-items: center;
    gap: 10px;
}

.conf-clue-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

/* Shake animation for incorrect answer */
.shake-box {
    animation: conf-shake 0.4s ease;
}

@keyframes conf-shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

/* Objections Overlay */
.objection-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.objection-overlay.active {
    opacity: 1;
}

.objection-text {
    font-family: 'Impact', 'Arial Black', sans-serif;
    font-size: 4.5rem;
    color: #ef4444;
    text-shadow: 0 0 25px rgba(239, 68, 68, 0.8), 3px 3px 0 black, -3px -3px 0 black;
    transform: scale(0.5) rotate(-15deg);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.objection-overlay.active .objection-text {
    transform: scale(1) rotate(-10deg);
}

@media (max-width: 768px) {
    .confrontation-box {
        height: 95vh;
    }
    .confrontation-clues {
        grid-template-columns: 1fr;
    }
}



/* -------------------------------------------------------------------
   MOBILE AUDIT FIXES � COMPREHENSIVE RESPONSIVE PATCH v2
   25 fixes found during systematic mobile audit.
------------------------------------------------------------------- */

/* FIX 1: tox-table horizontal scroll on mobile */
.doc-section { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tox-table { min-width: 420px; }
.folder-content { overflow: visible; }

/* FIX 2: Newspaper modal - reduce padding on mobile */
@media (max-width: 600px) {
    .newspaper-content { padding: 1.5rem 1rem !important; width: 98% !important; }
    .newspaper-header h1 { font-size: 2rem !important; }
    .newspaper-stamp { font-size: 0.8rem; padding: 4px 8px; bottom: 10px; right: 14px; }
    .news-columns { column-count: 1 !important; }
}

/* FIX 3: Landing page - reliable flex centering (height:100% fails on min-height parents) */
#landing-view .content-container {
    min-height: 100vh;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* FIX 4: Confrontation box - flexible height on very small screens */
@media (max-width: 480px) {
    .confrontation-box { max-height: none !important; height: 98vh; }
    .confrontation-arena { padding: 12px 10px; gap: 10px; }
    .confrontation-bubble { padding: 10px 12px; font-size: 0.85rem; }
    .confrontation-controls { padding: 10px 12px; gap: 8px; }
    .confrontation-clues { grid-template-columns: 1fr !important; }
    .conf-clue-btn { padding: 10px 8px; font-size: 0.73rem; min-height: 48px; gap: 6px; }
    .objection-text { font-size: 2.8rem; }
    .confrontation-portrait { font-size: 2.2rem; }
    .confrontation-character-name { font-size: 0.9rem; }
    .confrontation-title { font-size: 0.75rem; }
}

/* FIX 5: Interrogation modal - reliable auto heights on mobile */
@media (max-width: 768px) {
    .interrogation-box { max-height: none !important; height: 92vh; }
    .interrogation-left { width: 100% !important; height: auto !important; min-height: 190px; max-height: 260px; flex-shrink: 0; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.07); overflow-y: auto; }
    .interrogation-right { width: 100% !important; height: auto !important; flex: 1; min-height: 200px; }
    .interrogation-chat { min-height: 160px; }
}

/* FIX 6: Touch targets - minimum 44px (iOS HIG & WCAG 2.5.5) */
.topic-btn { min-height: 44px; }
.conf-clue-btn { min-height: 44px; }
.tab-btn { min-height: 40px; }
.back-btn { min-height: 44px; min-width: 44px; }
.btn-konfrontasi { min-height: 56px; }
.cf-interrogate-btn { min-height: 44px; }
.ev-close-btn { min-height: 44px; }

/* FIX 7: iOS Safari auto-zoom prevention - all inputs must be >= 16px */
input, select, textarea { font-size: 16px !important; }
.login-prompt input { font-size: 16px !important; letter-spacing: 4px; }
/* Allow larger declared sizes to override upward */
input[style*="font-size"], .clock-input-area input, .ev-close-btn { font-size: inherit !important; }
.clock-input-area input { font-size: 1.5rem !important; }

/* FIX 8: cctv-grid - single column on very small screens */
@media (max-width: 480px) {
    .cctv-grid { grid-template-columns: 1fr !important; gap: 8px; }
}

/* FIX 9: sp-grid-10 (10 suspects) - 3 columns at very small screens */
@media (max-width: 380px) {
    .sp-grid-10 { grid-template-columns: repeat(3, 1fr) !important; gap: 4px; }
    .suspect-pick-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 4px; }
    .sp-emoji { font-size: 0.9rem; }
    .sp-name { font-size: 0.58rem; }
}

/* FIX 10: Laptop puzzle - prevent overflow at very small screens */
@media (max-width: 400px) {
    .desk-scene { height: 240px !important; }
    .laptop-device { transform: translateX(-50%) scale(0.65) !important; bottom: 20px !important; }
    .laptop-screen { width: 220px !important; height: 150px !important; }
    .laptop-base { width: 255px !important; }
    .occult-book { left: 1% !important; width: 60px !important; height: 90px !important; }
    .desk-calendar { right: 1% !important; width: 55px !important; height: 65px !important; }
    .sticky-note { width: 75px; font-size: 0.52rem; right: -10px !important; }
}

/* FIX 11: Timer badge - prevent text overflow on small screens */
@media (max-width: 600px) {
    .timer { font-size: 0.7rem; padding: 5px 10px; letter-spacing: 0; }
    .desk-header { flex-wrap: wrap; gap: 6px; }
    .desk-header h2 { font-size: 0.9rem; letter-spacing: 0.5px; }
}

/* FIX 12: Landing - very small screens */
@media (max-width: 360px) {
    #landing-view .title { font-size: 1.5rem; letter-spacing: 0; }
    #landing-view .subtitle { font-size: 0.88rem; margin-bottom: 2rem; }
    .case-card { padding: 1.25rem; min-width: unset; }
    .case-card h2 { font-size: 1.2rem; }
}

/* FIX 13: Evidence reveal modal - compact on mobile */
@media (max-width: 480px) {
    .ev-modal-overlay { padding: 20px 10px 16px; }
    .ev-modal-box { padding: 28px 14px 18px; width: 98vw; border-radius: 10px; }
    .ev-body { font-size: 0.85rem; line-height: 1.6; }
    .ev-icon { font-size: 2.5rem; }
    .ev-stamp { font-size: 0.58rem; padding: 3px 12px; }
}

/* FIX 14: motif-options - single col on very small screens */
@media (max-width: 380px) {
    .motif-options { grid-template-columns: 1fr !important; }
    .motif-card { font-size: 0.75rem; padding: 8px 10px; min-height: 44px; }
}

/* FIX 15: server-input-row flex-wrap on narrow screens */
@media (max-width: 420px) {
    .server-input-row { flex-wrap: wrap !important; }
    .server-input-row input { width: 100% !important; flex: none !important; }
}

/* FIX 16: Konfrontasi button full-width on mobile */
@media (max-width: 480px) {
    .btn-konfrontasi { width: 100%; padding: 16px 20px; }
    .konfrontasi-area { padding: 0 4px; }
}

/* FIX 17: Case intro - very small screens */
@media (max-width: 360px) {
    .case-intro { padding: 1rem !important; }
    .intro-title { font-size: 1.1rem !important; }
    .intro-section p { font-size: 0.85rem; }
    .intro-highlight { font-size: 0.85rem; padding: 8px 10px; gap: 8px; }
    .intro-mission { padding: 1rem; gap: 0.75rem; }
    .mission-text p { font-size: 0.82rem; }
}

/* FIX 18: Clock puzzle back-scene on very small screens */
@media (max-width: 380px) {
    .clock-back-scene { padding: 1rem 0.75rem !important; }
    .brass-plaque { width: 100% !important; font-size: 0.7rem; padding: 8px 10px !important; }
    .clock-input-area input { width: 120px !important; }
}

/* FIX 19: Tab label hidden on very small screens (icon-only) */
@media (max-width: 360px) {
    .tab-label { display: none !important; }
    .tab-btn { padding: 8px 10px !important; }
    .tab-icon { margin-right: 0 !important; font-size: 1.1rem; }
}

/* FIX 20: Evidence board - compact slot badges on narrow screens */
@media (max-width: 480px) {
    .evidence-board { padding: 8px 10px; }
    .eb-slot { font-size: 0.6rem; padding: 3px 7px; }
    .eb-header { font-size: 0.58rem; white-space: normal; }
}

/* FIX 21: Deduction step layout - compact on small screens */
@media (max-width: 480px) {
    .step-header { gap: 10px; align-items: flex-start; }
    .step-num { font-size: 1.1rem; min-width: 28px; }
    .step-title { font-size: 0.65rem; letter-spacing: 1.5px; }
    .step-desc { font-size: 0.76rem; }
    .chrono-item { padding: 10px 12px; gap: 8px; }
    .chrono-text { font-size: 0.75rem; }
    .chrono-order { width: 28px; height: 28px; font-size: 0.75rem; }
}

/* FIX 22: Modal overlay - prevent content touching screen edges */
.modal-overlay { padding: 20px 12px; }
@media (max-width: 480px) {
    .modal-content { width: 98%; padding: 1.25rem; border-radius: 10px; }
}

/* FIX 23: Glass panel - reduce padding on very small screens */
@media (max-width: 480px) {
    .glass-panel { padding: 12px 10px; }
}

/* FIX 24: Analyzer input group flex-wrap on small screens */
@media (max-width: 420px) {
    .analyzer-input-group { flex-direction: column; }
    .analyzer-input-group input, .analyzer-input-group .btn { width: 100%; }
}

/* FIX 25: Dossier detail header - stack on small screens */
@media (max-width: 480px) {
    .dossier-detail-header { flex-direction: column; text-align: center; gap: 0.75rem; }
    .dossier-detail-header .silhoutte-box { width: 64px; height: 64px; font-size: 2.5rem; margin: 0 auto; }
}

/* ════════════════════════════════════════════════════
   KASUS 03 SPECIFIC STYLES
   ════════════════════════════════════════════════════ */

/* Terminal screen (used in camera log tab) */
.terminal-screen {
    background: #050d12;
    border: 1px solid #1e3a4a;
    border-radius: 8px;
    padding: 16px;
    font-family: monospace;
    font-size: 0.82rem;
    line-height: 1.7;
    overflow-x: auto;
}
.terminal-line { color: #94a3b8; margin: 2px 0; }
.terminal-line.dim { color: #475569; }
.terminal-line.warn { color: #f59e0b; }

/* Blue screen variant for machine-screen */
.machine-screen.blue-screen {
    background: #06040f;
    border-color: #4c1d95;
}

/* Evidence board slot enhancements for kasus03 */
#k3-evidence-board .eb-slot {
    cursor: default;
    transition: all 0.3s ease;
}
#k3-evidence-board .eb-slot[onclick] {
    cursor: pointer;
}
#k3-evidence-board .eb-slot[onclick]:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(168,85,247,0.25);
}

/* Chrono hint text */
.chrono-hint {
    font-size: 0.72rem;
    color: #64748b;
    text-align: center;
    font-style: italic;
    padding: 6px;
}

/* Safe display screen */
.safe-input-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    width: 85%;
}

/* Mobile: terminal screen */
@media (max-width: 480px) {
    .terminal-screen { font-size: 0.7rem; padding: 10px; }
    .terminal-line { word-break: break-word; }
    .safe-input-row { width: 100%; }
    .safe-device { width: 220px; height: 220px; }
    .safe-dial { width: 100px; height: 100px; }
}

/* ── Case Footer Credits ── */
.case-footer {
    margin-top: 40px;
    padding: 24px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    color: #64748b;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    justify-content: center;
}
.case-footer-quote {
    font-style: italic;
    color: #475569;
    font-size: 0.74rem;
    max-width: 600px;
    line-height: 1.4;
}
.case-credit-link {
    color: #60a5fa;
    text-decoration: none;
    border-bottom: 1px dashed rgba(96,165,250,0.4);
    font-weight: 600;
    transition: all 0.2s;
}
.case-credit-link:hover {
    color: #93c5fd;
    border-bottom-color: #93c5fd;
    text-shadow: 0 0 8px rgba(147,197,253,0.5);
}

/* ── Detective Notepad Widget ── */
.notepad-toggle-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid rgba(96, 165, 250, 0.3);
    color: #60a5fa;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 10px rgba(96, 165, 250, 0.2);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.notepad-toggle-btn:hover {
    transform: scale(1.1) translateY(-2px);
    border-color: #60a5fa;
    color: #93c5fd;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6), 0 0 18px rgba(96, 165, 250, 0.4);
}
.notepad-toggle-btn:active {
    transform: scale(0.95);
}
.detective-notepad {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    height: 100vh;
    z-index: 10001;
    background: rgba(10, 12, 18, 0.85);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.detective-notepad.open {
    right: 0;
}
.notepad-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.notepad-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 0 10px rgba(255,255,255,0.1);
}
.notepad-close-btn {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.notepad-close-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}
.notepad-body {
    padding: 20px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}
.notepad-desc {
    font-size: 0.76rem;
    color: #64748b;
    line-height: 1.45;
}
.notepad-textarea {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 16px;
    color: #e2e8f0;
    font-family: 'Roboto Slab', Georgia, serif;
    font-size: 0.9rem;
    line-height: 1.6;
    resize: none;
    outline: none;
    transition: all 0.3s;
}
.notepad-textarea:focus {
    border-color: rgba(96, 165, 250, 0.5);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8), 0 0 12px rgba(96, 165, 250, 0.15);
}
.notepad-footer {
    padding: 12px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.2);
}
.notepad-status {
    font-size: 0.7rem;
    color: #4ade80;
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.notepad-status.visible {
    opacity: 0.8;
}
.notepad-wordcount {
    font-size: 0.7rem;
    color: #475569;
    font-family: monospace;
}

/* Mobile adjustment for notepad */
@media (max-width: 480px) {
    .detective-notepad {
        width: 100vw;
        right: -100vw;
    }
    .notepad-toggle-btn {
        bottom: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
}

/* ===== INTERACTIVE LAPTOP OS ===== */
.laptop-unlocked-view {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, #111827 0%, #030712 100%);
    display: flex;
    flex-direction: column;
    padding: 6px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #f3f4f6;
    overflow: hidden;
    user-select: none;
    border-radius: 4px;
}

.laptop-os-desktop {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-content: flex-start;
    flex-wrap: wrap;
    flex: 1;
    padding: 4px;
    position: relative;
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 60px;
    padding: 4px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    border: 1px solid transparent;
}

.desktop-icon:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

.desktop-icon-img {
    font-size: 1.5rem;
    margin-bottom: 2px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.desktop-icon-label {
    font-size: 0.52rem;
    color: #cbd5e1;
    text-align: center;
    word-break: break-all;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    font-weight: 500;
}

.desktop-window {
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    background: #0b0f19;
    border: 1px solid #3b82f6;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0,0,0,0.9), inset 0 0 10px rgba(0,0,0,0.5);
    animation: windowFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes windowFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.window-header {
    height: 20px;
    background: #1e293b;
    border-bottom: 1px solid #3b82f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 6px;
    font-size: 0.55rem;
    color: #93c5fd;
    font-family: monospace;
    font-weight: bold;
}

#laptop-window-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: calc(100% - 20px);
    flex: 1;
    margin-right: 8px;
}

.window-body {
    flex: 1;
    padding: 6px 8px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.52rem;
    line-height: 1.35;
    color: #34d399;
    background: #030712;
    scrollbar-width: thin;
    scrollbar-color: #1e293b #030712;
}

.window-close-btn {
    background: transparent;
    border: none;
    color: #ef4444;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 20%;
    transition: background 0.2s;
    flex-shrink: 0;
}

.window-close-btn:hover {
    background: rgba(239,68,68,0.2);
}

.laptop-os-taskbar {
    height: 16px;
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 6px;
    font-size: 0.5rem;
    color: #94a3b8;
    box-sizing: border-box;
}

.taskbar-start {
    font-weight: 700;
    color: #60a5fa;
    display: flex;
    align-items: center;
    gap: 3px;
}

/* ===== FORENSIC SEM MICROSCOPE SIMULATOR ===== */
.sem-analyzer-container {
    width: 100%;
    margin-top: 15px;
    background: #0f172a;
    border: 2px solid #1e293b;
    border-radius: 8px;
    padding: 16px;
    box-sizing: border-box;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5), 0 4px 10px rgba(0,0,0,0.3);
}

.sem-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 16px;
}

@media (max-width: 768px) {
    .sem-layout {
        grid-template-columns: 1fr;
    }
}

.sem-screen-column {
    display: flex;
    flex-direction: column;
}

.sem-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    background: #020617;
    border: 3px solid #334155;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.95), 0 0 10px rgba(96, 165, 250, 0.1);
}

.sem-grid-overlay {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle, transparent 40%, rgba(0,0,0,0.6) 100%),
        linear-gradient(rgba(52, 211, 153, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(52, 211, 153, 0.04) 1px, transparent 1px);
    background-size: auto, 25px 25px, 25px 25px;
    pointer-events: none;
    z-index: 2;
}

.sem-scanner-sweep {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(52, 211, 153, 0.4), transparent);
    animation: semScanSweep 4s linear infinite;
    pointer-events: none;
    z-index: 3;
}
@keyframes semScanSweep {
    0% { top: 0%; }
    50% { top: 100%; }
    100% { top: 0%; }
}

.sem-screen-telemetry {
    position: absolute;
    bottom: 6px;
    left: 8px;
    right: 8px;
    display: flex;
    justify-content: space-between;
    font-family: monospace;
    font-size: 0.58rem;
    color: rgba(52, 211, 153, 0.6);
    z-index: 4;
    pointer-events: none;
}

.sem-fiber-svg {
    width: 100%;
    height: 100%;
    display: block;
    transform: scale(1.02);
    transition: filter 0.15s ease-out;
}

.sem-noise-overlay {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0%25 0%25 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.15'/%3E%3C/svg%3E");
    pointer-events: none;
    opacity: 0.8;
    z-index: 1;
    mix-blend-mode: overlay;
    transition: opacity 0.3s;
}

.sem-controls-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
}

.sem-status-panel {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid #1e293b;
    border-radius: 6px;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sem-status-label {
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 600;
}

.sem-status-badge {
    font-family: monospace;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 0.5px;
}

.sem-status-badge.uncalibrated {
    color: #f87171;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.sem-status-badge.calibrated {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.15);
}

.sem-slider-group {
    background: rgba(15, 23, 42, 0.3);
    border: 1px solid rgba(255,255,255,0.03);
    border-radius: 6px;
    padding: 10px 12px;
}

.sem-slider-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: #cbd5e1;
    margin-bottom: 6px;
    font-weight: 500;
}

.sem-slider-label span.val {
    font-family: monospace;
    color: #60a5fa;
    font-weight: bold;
}

.sem-slider-input {
    width: 100%;
    height: 5px;
    background: #1e293b;
    border-radius: 5px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.sem-slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.6);
    border: 2px solid #cbd5e1;
    transition: transform 0.1s;
}

.sem-slider-input::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.sem-slider-input::-moz-range-thumb {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.6);
    border: 2px solid #cbd5e1;
    transition: transform 0.1s;
}

/* ===== DEDUCTION / VERIFICATION FORM ===== */
.sem-verification-form {
    margin-top: 18px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px dashed rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    padding: 16px;
    animation: formFadeIn 0.4s ease-out forwards;
}

@keyframes formFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.sem-form-title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #60a5fa;
    margin-bottom: 12px;
    text-transform: uppercase;
    font-family: monospace;
    border-left: 3px solid #3b82f6;
    padding-left: 8px;
}

.sem-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.sem-input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sem-input-group label {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 600;
}

.sem-input-group input {
    background: #020617;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 8px 12px;
    color: #f1f5f9;
    font-size: 0.82rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sem-input-group input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.2);
}

.sem-sop-box {
    background: rgba(30, 41, 59, 0.25);
    border: 1px solid rgba(255,255,255,0.04);
    border-left: 3px solid #facc15;
    border-radius: 4px;
    padding: 8px 12px;
    margin-top: 10px;
    font-size: 0.76rem;
    line-height: 1.45;
    color: #cbd5e1;
}

.sem-input-group input.error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4) !important;
}


