/* ═══════════════════════════════════════════════════════════════════════════
   청주지법 변호사 변사 사건 — 편집 누아르 리디자인 (2026-04-21)
   · 게임 로직·클래스명 전부 보존 (script.js 호환)
   · 색/폰트/여백/모션만 세련되게 개편
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+KR:wght@400;600;700;900&family=Nanum+Myeongjo:wght@400;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Base stratum — 극장식 오버더스 딥 네이비 */
    --color-bg-0: #080d17;
    --color-bg-1: #0d1524;
    --color-bg-2: #131d33;
    --color-surface: #182544;
    --color-surface-hi: #1f2e52;

    /* 텍스트 */
    --text-primary: #eae5d7;
    --text-secondary: #b9c1d1;
    --text-muted: #7d8aa3;
    --text-on-gold: #0b1120;

    /* 브랜드 액센트 — 에이지드 골드 (고색창연한 법봉) */
    --gold: #c9a961;
    --gold-soft: #b3945c;
    --gold-deep: #8b6f3d;
    --gold-glow: rgba(201, 169, 97, 0.28);
    --gold-line: rgba(201, 169, 97, 0.22);

    /* 드라마틱 액센트 — 버건디 블러드 */
    --red: #a5202e;
    --red-bright: #c43848;
    --red-deep: #6a1520;
    --red-glow: rgba(196, 56, 72, 0.35);

    /* 역할별 */
    --scene: #5d87b8;       /* 현장 */
    --suspect: #8e6cb0;     /* 용의자 */
    --evidence: #4a9672;    /* 증거 */
    --notebook: #d28a3c;    /* 노트 */

    /* 변수 (script에서 쓰는 레거시 유지) */
    --primary-color: var(--color-bg-1);
    --secondary-color: var(--color-surface);
    --accent-color: var(--red);
    --accent-gold: var(--gold);
    --accent-amber: var(--notebook);
    --success-color: var(--evidence);
    --info-color: var(--scene);
    --purple-color: var(--suspect);
    --text-light: var(--text-primary);
    --bg-dark: var(--color-bg-0);
    --bg-card: var(--color-surface);
    --bg-card-hover: var(--color-surface-hi);
    --text-muted: var(--text-muted);
    --behavior-color: var(--scene);
    --border-subtle: var(--gold-line);
    --glow-gold: var(--gold-glow);
    --glow-red: var(--red-glow);

    /* 스페이싱 4px 그리드 */
    --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
    --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px;
    --s-12: 48px; --s-16: 64px; --s-20: 80px;

    /* 타이포 스케일 */
    --font-serif: 'Nanum Myeongjo', 'Noto Serif KR', 'Georgia', serif;
    --font-title: 'Noto Serif KR', 'Nanum Myeongjo', serif;
    --font-ui: 'Inter', 'Pretendard', -apple-system, 'Segoe UI', sans-serif;

    /* 그림자 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow-gold: 0 0 0 1px var(--gold-line), 0 0 24px rgba(201, 169, 97, 0.15);

    /* 레이디어스 */
    --r-sm: 4px; --r-md: 8px; --r-lg: 14px; --r-xl: 20px;

    /* 모션 */
    --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --dur-fast: 150ms;
    --dur: 260ms;
    --dur-slow: 500ms;
}

/* ─── 베이스 리셋 ─── */
* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    background-color: var(--color-bg-0);
    color: var(--text-primary);
    font-family: var(--font-serif);
    min-height: 100vh;
    line-height: 1.7;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-image:
        radial-gradient(ellipse at 50% -10%, rgba(42, 66, 120, 0.35) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 110%, rgba(165, 32, 46, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(201, 169, 97, 0.025) 0%, transparent 70%);
    background-attachment: fixed;
}

/* 필름 그레인 오버레이 (은은한 노이즈) */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.08 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    opacity: 0.65;
    mix-blend-mode: overlay;
    z-index: 9998;
}

/* 타이포 공통 */
h1, h2, h3, h4, h5 {
    font-family: var(--font-title);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}
p { margin: 0 0 var(--s-3) 0; }
a { color: var(--gold); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--gold-soft); }
small { color: var(--text-muted); }

/* Bootstrap 색상 오버라이드 — 다크 누아르 */
.text-muted { color: var(--text-muted) !important; }
.text-warning { color: var(--notebook) !important; }
.text-success { color: var(--evidence) !important; }
.text-danger { color: var(--red-bright) !important; }
.text-info { color: var(--scene) !important; }

.bg-secondary { background-color: var(--color-surface-hi) !important; }
.bg-warning { background-color: var(--notebook) !important; color: var(--text-on-gold) !important; }
.bg-success { background-color: var(--evidence) !important; }

.alert {
    border-radius: var(--r-md);
    border: 1px solid transparent;
    padding: var(--s-4) var(--s-5);
    font-family: var(--font-serif);
}
.alert-info {
    background: rgba(93, 135, 184, 0.12);
    border-color: rgba(93, 135, 184, 0.3);
    color: var(--text-primary);
}
.alert-warning {
    background: rgba(210, 138, 60, 0.12);
    border-color: rgba(210, 138, 60, 0.35);
    color: var(--text-primary);
}
.alert-danger {
    background: rgba(196, 56, 72, 0.15);
    border-color: rgba(196, 56, 72, 0.4);
    color: var(--text-primary);
}
.alert i { margin-right: var(--s-2); }

.badge {
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 3px;
    letter-spacing: 0.04em;
    font-family: var(--font-ui);
    font-size: 0.72rem;
    text-transform: uppercase;
}

/* ─── 인트로 화면 ─── */
.intro-screen {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--s-8);
    background: var(--color-bg-0);
    background-image:
        linear-gradient(180deg, rgba(8, 13, 23, 0.72) 0%, rgba(8, 13, 23, 0.55) 40%, rgba(8, 13, 23, 0.92) 100%),
        url('assets/hero-courtroom.jpg');
    background-size: cover;
    background-position: center;
    transition: opacity var(--dur-slow) var(--ease);
}
.intro-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* 인트로 — 수직 금빛 라인 장식 */
.intro-screen::before,
.intro-screen::after {
    content: '';
    position: absolute;
    top: 12%; bottom: 12%;
    width: 1px;
    background: linear-gradient(180deg, transparent, var(--gold-line) 20%, var(--gold-line) 80%, transparent);
    pointer-events: none;
}
.intro-screen::before { left: 6%; }
.intro-screen::after { right: 6%; }

.intro-title {
    font-family: var(--font-title);
    font-size: clamp(2.2rem, 6vw, 4.8rem);
    font-weight: 900;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: var(--s-6);
    letter-spacing: 0.28em;
    line-height: 1.15;
    text-shadow:
        0 2px 20px rgba(0, 0, 0, 0.8),
        0 0 40px rgba(201, 169, 97, 0.25),
        0 0 80px rgba(165, 32, 46, 0.18);
    animation: titleGlow 4s ease-in-out infinite alternate;
}
@keyframes titleGlow {
    from {
        text-shadow:
            0 2px 20px rgba(0, 0, 0, 0.8),
            0 0 30px rgba(201, 169, 97, 0.2),
            0 0 60px rgba(165, 32, 46, 0.12);
    }
    to {
        text-shadow:
            0 2px 20px rgba(0, 0, 0, 0.8),
            0 0 48px rgba(201, 169, 97, 0.45),
            0 0 90px rgba(165, 32, 46, 0.3);
    }
}

/* 제목 아래 장식 라인 */
.intro-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 1px;
    margin: var(--s-6) auto 0;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.intro-subtitle {
    font-family: var(--font-title);
    font-size: clamp(0.95rem, 1.4vw, 1.15rem);
    color: var(--gold);
    margin-bottom: var(--s-2);
    letter-spacing: 0.45em;
    text-transform: uppercase;
    font-weight: 400;
    animation: fadeInUp 1.2s ease-out 0.5s both;
    text-align: center;
}

.intro-author {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: var(--s-16);
    letter-spacing: 0.15em;
    animation: fadeInUp 1.2s ease-out 0.7s both;
    text-align: center;
}

.intro-start-btn {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: var(--s-4) var(--s-12);
    font-family: var(--font-title);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5em;
    cursor: pointer;
    transition: all var(--dur) var(--ease);
    position: relative;
    overflow: hidden;
    border-radius: 2px;
    text-transform: uppercase;
    animation: fadeInUp 1.2s ease-out 1s both;
}

.intro-start-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--gold), var(--gold-deep));
    transform: translateX(-100%);
    transition: transform var(--dur) var(--ease);
    z-index: -1;
}

.intro-start-btn:hover {
    color: var(--text-on-gold);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(201, 169, 97, 0.35), 0 0 0 1px var(--gold);
}
.intro-start-btn:hover::before {
    transform: translateX(0);
}

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

/* ─── 상단 헤더 ─── */
.top-header {
    position: fixed;
    top: var(--s-3);
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 1180px;
    background: rgba(8, 13, 23, 0.82);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid var(--gold-line);
    border-radius: var(--r-md);
    padding: var(--s-2) var(--s-5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 46px;
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.45);
}

.header-link {
    text-decoration: none;
    color: inherit;
    transition: opacity var(--dur) var(--ease);
    display: block;
}
.header-link:hover { opacity: 0.85; }

.header-left {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.header-title {
    color: var(--gold);
    font-family: var(--font-title);
    font-size: 0.92rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.05em;
}
.header-title strong { color: var(--gold); }

.header-lawyer-name {
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 400;
    margin-left: var(--s-2);
    letter-spacing: 0.05em;
}

.header-subtitle {
    color: var(--text-muted);
    font-family: var(--font-ui);
    font-size: 0.68rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.08em;
}
.header-subtitle i { font-size: 0.62rem; opacity: 0.7; }

.browser-tip {
    color: var(--text-muted);
    background: transparent;
    padding: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--dur) var(--ease);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-sm);
}
.browser-tip:hover {
    color: var(--gold);
    border-color: var(--gold-line);
    background: rgba(201, 169, 97, 0.08);
}

/* ─── 홈 화면 추가 안내 모달 (라이트 팔레트 유지 — 정보성) ─── */
.home-guide-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(8, 13, 23, 0.88);
    backdrop-filter: blur(6px);
    z-index: 20000;
    animation: fadeIn 0.3s ease;
}
.home-guide-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--s-5);
}

.home-guide-content {
    background: #fbf8f3;
    border: 1px solid rgba(201, 169, 97, 0.3);
    border-radius: var(--r-lg);
    padding: var(--s-5);
    padding-top: 64px;
    max-width: 400px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    position: relative;
    animation: slideUp 0.35s var(--ease-out);
    color: #1a2744;
}

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

.service-link-copy {
    position: absolute;
    top: 16px;
    left: 20px;
    right: 54px;
    background: linear-gradient(135deg, var(--red), var(--red-deep));
    border: 1px solid var(--red-deep);
    border-radius: var(--r-sm);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all var(--dur) var(--ease);
    font-family: var(--font-ui);
    font-size: 12px;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(165, 32, 46, 0.3);
}
.service-link-copy:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(165, 32, 46, 0.4);
}
.service-link-copy.copied {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #059669;
}

.guide-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #94a3b8;
    transition: all var(--dur) var(--ease);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.guide-close:hover {
    background: #eef1f5;
    color: #1a2744;
}

.guide-header {
    text-align: center;
    margin-bottom: var(--s-5);
    color: #1a2744;
}
.guide-header h3 {
    font-family: var(--font-title);
    font-size: 18px;
    color: #1a2744;
    margin-bottom: 6px;
    font-weight: 700;
    padding: 0 var(--s-6);
    line-height: 1.4;
}
.guide-header p {
    color: #64748b;
    font-size: 13px;
    font-family: var(--font-ui);
}

.browser-section {
    margin-bottom: var(--s-4);
    padding: 12px;
    background: #f3f5f8;
    border-radius: var(--r-md);
    border: 1px solid #e2e8f0;
}
.browser-section h4 {
    font-family: var(--font-ui);
    font-size: 13px;
    color: #0f172a;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.browser-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.samsung-icon {
    background: #1428A0;
    color: white;
    border-radius: 50%;
    font-size: 11px;
    font-weight: bold;
}
.chrome-icon, .safari-icon { color: #1a2744; }

.guide-steps {
    list-style: decimal inside;
    padding: 0;
    margin: 0;
    color: #334155;
    font-family: var(--font-ui);
    font-size: 13px;
    line-height: 1.8;
}
.guide-steps li { margin-bottom: 2px; }

.guide-footer {
    margin-top: var(--s-5);
    padding-top: var(--s-4);
    border-top: 1px solid #e2e8f0;
}
.guide-benefit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #059669;
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 600;
}
.guide-benefit i { color: #10b981; }

/* ─── 메인 컨테이너 ─── */
.main-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 100px var(--s-5) 120px;
    position: relative;
    z-index: 1;
}

.game-screen {
    background: linear-gradient(180deg, var(--color-bg-1) 0%, var(--color-bg-2) 100%);
    border: 1px solid var(--gold-line);
    border-radius: var(--r-xl);
    padding: clamp(var(--s-5), 4vw, var(--s-12));
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

/* 게임 화면 상단 장식 라인 */
.game-screen::before {
    content: '';
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0.6;
}

/* 게임 화면 내부 타이틀 */
.game-screen h1,
.game-screen h2,
.game-screen h3,
.game-screen h4 {
    margin-top: 0;
    line-height: 1.3;
}
.game-screen h1 {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    letter-spacing: 0.08em;
    text-align: center;
    margin-bottom: var(--s-6);
}
.game-screen h1 i { color: var(--gold); margin-right: var(--s-3); }

.game-screen h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); margin-bottom: var(--s-5); color: var(--gold); }
.game-screen h3 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); margin-bottom: var(--s-4); color: var(--gold); }
.game-screen h3 i,
.game-screen h4 i,
.game-screen h2 i { color: var(--gold); margin-right: var(--s-3); }

.game-screen h4 { font-size: 1.15rem; margin-bottom: var(--s-4); color: var(--gold); }
.game-screen h5 { font-size: 1rem; margin-bottom: var(--s-3); color: var(--text-primary); font-weight: 700; }

.game-screen .lead {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.game-screen .display-4 {
    font-family: var(--font-title);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    letter-spacing: 0.12em;
    font-weight: 900;
    line-height: 1.2;
}

/* ─── 사건 파일 (.case-file) — 시그니처 카드 ─── */
.case-file {
    background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-bg-2) 100%);
    border: 1px solid var(--gold-line);
    border-left: 3px solid var(--gold);
    border-radius: var(--r-md);
    padding: var(--s-6) var(--s-6);
    margin: var(--s-5) 0;
    position: relative;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(201, 169, 97, 0.08);
}

.case-file::before {
    content: 'CASE FILE';
    position: absolute;
    top: -10px;
    left: var(--s-5);
    background: var(--color-bg-1);
    padding: 0 var(--s-3);
    font-family: var(--font-ui);
    font-size: 0.68rem;
    letter-spacing: 0.4em;
    color: var(--gold);
    font-weight: 600;
}

.case-file p { color: var(--text-primary); }
.case-file p.text-warning { color: var(--notebook) !important; }
.case-file p.text-danger { color: var(--red-bright) !important; }
.case-file p.text-info { color: var(--scene) !important; }

/* ─── 진행률 바 ─── */
.progress-bar-custom {
    width: 100%;
    height: 10px;
    background: var(--color-bg-0);
    border: 1px solid var(--gold-line);
    border-radius: 3px;
    overflow: hidden;
    margin-top: var(--s-2);
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-deep), var(--gold));
    box-shadow: 0 0 16px var(--gold-glow);
    transition: width var(--dur-slow) var(--ease);
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-on-gold);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    letter-spacing: 0.1em;
}

/* ─── 수사 통계 ─── */
.investigation-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--s-4);
    margin: var(--s-6) 0;
}

.stat-item {
    background: rgba(24, 37, 68, 0.5);
    border: 1px solid var(--gold-line);
    border-radius: var(--r-md);
    padding: var(--s-5);
    text-align: center;
    transition: all var(--dur) var(--ease);
    position: relative;
    overflow: hidden;
}
.stat-item::before {
    content: '';
    position: absolute;
    top: 0; left: 50%; transform: translateX(-50%);
    width: 40px; height: 2px;
    background: var(--gold);
    opacity: 0.6;
}
.stat-item:hover {
    border-color: var(--gold);
    background: rgba(201, 169, 97, 0.06);
    transform: translateY(-2px);
}

.stat-value {
    font-family: var(--font-title);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 900;
    color: var(--gold);
    margin-bottom: 4px;
    line-height: 1;
    letter-spacing: 0.03em;
}
.stat-item > div:last-child {
    font-family: var(--font-ui);
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ─── 액션 버튼 ─── */
.action-btn {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: var(--s-3) var(--s-6);
    font-family: var(--font-title);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all var(--dur) var(--ease);
    border-radius: var(--r-sm);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    min-height: 44px;
    margin: 4px;
}
.action-btn i { transition: transform var(--dur) var(--ease); }
.action-btn:hover {
    background: var(--gold);
    color: var(--text-on-gold);
    box-shadow: 0 8px 24px rgba(201, 169, 97, 0.3);
    transform: translateY(-2px);
}
.action-btn:hover i { transform: scale(1.1); }
.action-btn:active { transform: translateY(0); }
.action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.action-btn.btn-lg {
    padding: var(--s-4) var(--s-10);
    font-size: 1.05rem;
    letter-spacing: 0.12em;
}

.action-btn.btn-sm {
    padding: 8px 16px;
    font-size: 0.82rem;
    min-height: 34px;
}

/* 역할별 버튼 색상 */
.btn-scene { border-color: var(--scene); color: var(--scene); }
.btn-scene:hover { background: var(--scene); color: #fff; box-shadow: 0 8px 24px rgba(93, 135, 184, 0.3); }

.btn-suspect { border-color: var(--suspect); color: var(--suspect); }
.btn-suspect:hover { background: var(--suspect); color: #fff; box-shadow: 0 8px 24px rgba(142, 108, 176, 0.3); }

.btn-evidence { border-color: var(--evidence); color: var(--evidence); }
.btn-evidence:hover { background: var(--evidence); color: #fff; box-shadow: 0 8px 24px rgba(74, 150, 114, 0.3); }

.btn-notebook { border-color: var(--notebook); color: var(--notebook); }
.btn-notebook:hover { background: var(--notebook); color: var(--text-on-gold); box-shadow: 0 8px 24px rgba(210, 138, 60, 0.3); }

/* Row 버튼은 w-100 중 큰 버튼: 블록 형태로 */
.w-100.action-btn,
.action-btn.w-100 {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--s-6) var(--s-5);
    min-height: 96px;
    gap: 10px;
}
.action-btn.w-100 i { font-size: 1.6rem; }
.action-btn.w-100 small { font-size: 0.75rem; letter-spacing: 0.08em; color: inherit; opacity: 0.8; }

/* ─── 증거 카드 (조사 가능 구역 카드) ─── */
.evidence-card {
    background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg-2) 100%);
    border: 1px solid var(--gold-line);
    border-radius: var(--r-md);
    padding: var(--s-5);
    margin: var(--s-3) 0;
    cursor: pointer;
    transition: all var(--dur) var(--ease);
    position: relative;
    overflow: hidden;
}
.evidence-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: transparent;
    transition: background var(--dur) var(--ease);
}
.evidence-card:hover {
    border-color: var(--gold);
    background: linear-gradient(180deg, var(--color-surface-hi), var(--color-surface));
    transform: translateX(4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.evidence-card:hover::before {
    background: var(--gold);
}
.evidence-card h5 {
    color: var(--text-primary);
    font-family: var(--font-title);
    display: flex;
    align-items: center;
    gap: 10px;
}
.evidence-card h5 i { color: var(--gold); font-size: 1.1rem; }
.evidence-card p { color: var(--text-secondary); font-size: 0.92rem; }

/* ─── 용의자 카드 ─── */
.suspect-card {
    background: linear-gradient(135deg, rgba(142, 108, 176, 0.08), rgba(142, 108, 176, 0.03));
    border: 1px solid rgba(142, 108, 176, 0.25);
    border-radius: var(--r-md);
    padding: var(--s-5);
    margin: var(--s-3) 0;
    cursor: pointer;
    transition: all var(--dur) var(--ease);
    position: relative;
}
.suspect-card:hover {
    border-color: var(--suspect);
    transform: translateX(4px);
    box-shadow: 0 8px 24px rgba(142, 108, 176, 0.25);
}
.suspect-card.locked {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.6);
}
.suspect-card.locked:hover {
    transform: none;
    box-shadow: none;
}
.suspect-card h5 {
    margin: 0;
    color: var(--text-primary);
    font-family: var(--font-title);
}
.suspect-card p { color: var(--text-muted); font-size: 0.85rem; margin: 4px 0 0 0; }

/* ─── 단서 아이템 ─── */
.clue-item {
    background: rgba(13, 21, 37, 0.6);
    border: 1px solid var(--gold-line);
    border-left: 2px solid var(--gold);
    border-radius: 3px;
    padding: var(--s-4);
    margin-bottom: var(--s-3);
    transition: all var(--dur) var(--ease);
}
.clue-item:hover {
    background: rgba(24, 37, 68, 0.6);
    border-left-color: var(--gold-soft);
}
.clue-item.opacity-50 {
    opacity: 0.4 !important;
    border-left-color: var(--text-muted);
}

/* ─── 다이얼로그 박스 (증언·대사) ─── */
.dialogue-box {
    background: rgba(8, 13, 23, 0.55);
    border-left: 3px solid var(--gold);
    padding: var(--s-4) var(--s-5);
    margin: var(--s-4) 0;
    font-style: italic;
    color: var(--text-secondary);
    position: relative;
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.dialogue-box::before {
    content: '❝';
    position: absolute;
    top: -6px; left: 12px;
    font-size: 2rem;
    color: var(--gold);
    opacity: 0.35;
    font-family: serif;
}
.dialogue-box p { color: inherit; }

.behavior-note {
    color: var(--scene) !important;
    font-size: 0.85rem;
    font-style: normal !important;
    opacity: 0.9;
    letter-spacing: 0.02em;
}

/* ─── 사이먼 게임 ─── */
.simon-container {
    max-width: 500px;
    margin: 0 auto;
}
.simon-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: var(--s-6);
    font-family: var(--font-ui);
    font-size: 1rem;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 0.05em;
}
.simon-level { color: var(--text-primary); }
.simon-level span { color: var(--gold); font-size: 1.2rem; }

.simon-board {
    position: relative;
    width: min(400px, 90vw);
    height: min(400px, 90vw);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: var(--s-3);
    border-radius: 50%;
    padding: var(--s-3);
    background: radial-gradient(circle, var(--color-bg-2), var(--color-bg-0));
    box-shadow: 0 0 0 1px var(--gold-line), 0 20px 60px rgba(0, 0, 0, 0.6);
}

.simon-btn {
    border: 2px solid rgba(0, 0, 0, 0.4);
    border-radius: 200px 0 0 0;
    font-family: var(--font-title);
    font-size: 1.1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease);
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.05em;
    opacity: 0.65;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.35);
}
.simon-btn.kim { background: #5d87b8; }
.simon-btn.park { background: #4a9672; border-radius: 0 200px 0 0; }
.simon-btn.choi { background: #c9a961; border-radius: 0 0 0 200px; color: var(--text-on-gold); }
.simon-btn.jung { background: #a5202e; border-radius: 0 0 200px 0; }

.simon-btn:not(:disabled):hover {
    opacity: 0.85;
    transform: scale(0.98);
}
.simon-btn.active,
.simon-btn.flash {
    opacity: 1;
    box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.6), 0 0 40px rgba(255, 255, 255, 0.4);
}

.simon-center-btn {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 100px; height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--gold), var(--gold-deep));
    border: 3px solid var(--color-bg-0);
    color: var(--text-on-gold);
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--dur) var(--ease);
    box-shadow: 0 0 0 4px rgba(201, 169, 97, 0.15), 0 8px 20px rgba(0, 0, 0, 0.5);
}
.simon-center-btn:hover {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 0 0 6px rgba(201, 169, 97, 0.25), 0 12px 30px rgba(0, 0, 0, 0.6);
}

.simon-message {
    text-align: center;
    margin-top: var(--s-6);
    font-family: var(--font-title);
    font-size: 1.05rem;
    min-height: 60px;
    color: var(--text-primary);
    letter-spacing: 0.03em;
}

/* ─── 메모리 게임 ─── */
.memory-game-container {
    max-width: 720px;
    margin: 0 auto;
}
.memory-stats {
    display: flex;
    justify-content: center;
    gap: var(--s-8);
    margin: var(--s-6) 0;
    font-family: var(--font-ui);
    color: var(--text-secondary);
    font-size: 0.95rem;
    letter-spacing: 0.05em;
}

.memory-grid {
    display: grid;
    gap: var(--s-3);
    margin: 0 auto;
    max-width: 560px;
    padding: var(--s-4);
    background: rgba(8, 13, 23, 0.5);
    border: 1px solid var(--gold-line);
    border-radius: var(--r-md);
}
.memory-grid.level-1 { grid-template-columns: repeat(3, 1fr); }
.memory-grid.level-2 { grid-template-columns: repeat(4, 1fr); }
.memory-grid.level-3 { grid-template-columns: repeat(4, 1fr); }

.memory-card {
    aspect-ratio: 1;
    perspective: 1000px;
    cursor: pointer;
    position: relative;
    transition: transform var(--dur) var(--ease);
}
.memory-card:hover { transform: translateY(-2px); }

.card-face {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    border-radius: var(--r-sm);
    transition: transform 500ms var(--ease);
    font-size: 1.5rem;
    font-weight: 700;
}
.card-back {
    background: linear-gradient(135deg, var(--color-surface-hi), var(--color-surface));
    border: 1px solid var(--gold-line);
    color: var(--gold);
    font-family: var(--font-title);
    font-size: 2rem;
}
.card-front {
    background: linear-gradient(135deg, var(--gold), var(--gold-deep));
    border: 1px solid var(--gold);
    color: var(--text-on-gold);
    transform: rotateY(180deg);
    box-shadow: 0 0 20px rgba(201, 169, 97, 0.3);
}
.card-front i { color: var(--text-on-gold); font-size: 1.6rem; }
.memory-card.flipped .card-back { transform: rotateY(180deg); }
.memory-card.flipped .card-front { transform: rotateY(0); }
.memory-card.matched { animation: matchPulse 0.6s var(--ease-out); }
@keyframes matchPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); filter: drop-shadow(0 0 20px var(--gold)); }
}

/* ─── 수사 노트 ─── */
.notebook {
    background: linear-gradient(180deg, #faf5e8 0%, #f1e8cf 100%);
    color: #1a2744;
    border-radius: var(--r-md);
    padding: var(--s-8);
    margin: var(--s-5) 0;
    font-family: var(--font-title);
    position: relative;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(0, 0, 0, 0.05);
    min-height: 280px;
}
.notebook::before {
    content: '';
    position: absolute;
    left: 56px; top: 0; bottom: 0;
    width: 1px;
    background: rgba(165, 32, 46, 0.4);
}
.notebook::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 26px;
    background-image: repeating-linear-gradient(90deg, transparent 0, transparent 38px, rgba(26, 39, 68, 0.1) 38px, rgba(26, 39, 68, 0.1) 40px);
}
.notebook h1,
.notebook h2,
.notebook h3,
.notebook h4 { color: #1a2744; }
.notebook p { color: #1a2744; line-height: 2; }
.notebook i { color: var(--red-deep); }
.notebook .text-muted { color: #64748b !important; }
.notebook .text-success { color: #059669 !important; }
.notebook .text-warning { color: #b45309 !important; }
.notebook .text-danger { color: #991b1b !important; }

/* ─── Bootstrap 아코디언 ─── */
.accordion {
    background: transparent;
    border: none;
}
.accordion-item {
    background: var(--color-surface);
    border: 1px solid var(--gold-line);
    border-radius: var(--r-md) !important;
    margin-bottom: var(--s-3);
    overflow: hidden;
}
.accordion-header { margin: 0; }
.accordion-button {
    background: linear-gradient(90deg, var(--color-surface), var(--color-surface-hi)) !important;
    color: var(--gold) !important;
    font-family: var(--font-title);
    font-weight: 600;
    padding: var(--s-4) var(--s-5);
    border: none;
    box-shadow: none !important;
    letter-spacing: 0.03em;
}
.accordion-button:not(.collapsed) {
    background: linear-gradient(90deg, rgba(201, 169, 97, 0.12), rgba(201, 169, 97, 0.04)) !important;
    color: var(--gold) !important;
    border-bottom: 1px solid var(--gold-line);
}
.accordion-button::after {
    filter: invert(72%) sepia(23%) saturate(748%) hue-rotate(5deg) brightness(95%) contrast(88%);
}
.accordion-body {
    background: var(--color-bg-1);
    color: var(--text-primary);
    padding: var(--s-5);
}

/* Bootstrap 유틸 */
.row { margin: 0 -6px; }
.col-md-6 { padding: 0 6px; }

/* ─── 하단 플로팅 버튼들 ─── */
.home-btn {
    position: fixed;
    bottom: var(--s-6);
    right: var(--s-6);
    width: 52px; height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-surface), var(--color-bg-2));
    border: 1px solid var(--gold);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9998;
    transition: all var(--dur) var(--ease);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--gold-line);
    font-size: 1.1rem;
}
.home-btn:hover {
    background: var(--gold);
    color: var(--text-on-gold);
    transform: translateY(-3px) rotate(-10deg);
    box-shadow: 0 12px 32px rgba(201, 169, 97, 0.4);
}

.bgm-toggle-btn {
    position: fixed;
    bottom: var(--s-6);
    left: var(--s-6);
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--color-surface), var(--color-bg-2));
    border: 1px solid var(--gold-line);
    color: var(--gold);
    border-radius: 30px;
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    cursor: pointer;
    z-index: 9998;
    transition: all var(--dur) var(--ease);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}
.bgm-toggle-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
    transform: translateY(-2px);
}

/* ─── 애니메이션 ─── */
.fade-in {
    animation: fadeIn 0.6s var(--ease-out) both;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.reveal-animation {
    animation: revealSlide 0.7s var(--ease-out) both;
}
@keyframes revealSlide {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── 반응형 ─── */
@media (max-width: 768px) {
    .main-container {
        padding: 80px var(--s-3) 120px;
    }
    .game-screen {
        padding: var(--s-5) var(--s-4);
        border-radius: var(--r-lg);
    }
    .top-header {
        padding: var(--s-2) var(--s-3);
        min-height: 42px;
    }
    .header-title { font-size: 0.82rem; }
    .header-lawyer-name { font-size: 0.7rem; }
    .header-subtitle { display: none; }
    .browser-tip { font-size: 0.9rem; }

    .intro-title {
        font-size: clamp(2rem, 8vw, 3.2rem);
        letter-spacing: 0.18em;
    }
    .intro-subtitle { letter-spacing: 0.3em; font-size: 0.82rem; }

    .investigation-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--s-2);
    }
    .stat-item { padding: var(--s-3) var(--s-2); }
    .stat-value { font-size: 1.6rem; }
    .stat-item > div:last-child { font-size: 0.62rem; }

    .action-btn { font-size: 0.88rem; padding: var(--s-3) var(--s-4); }
    .action-btn.btn-lg { font-size: 0.98rem; padding: var(--s-4) var(--s-6); }
    .action-btn.w-100 { padding: var(--s-5) var(--s-3); min-height: 84px; }

    .case-file { padding: var(--s-5) var(--s-4); }
    .case-file::before { font-size: 0.6rem; letter-spacing: 0.3em; }

    .simon-board { width: 90vw; height: 90vw; }
    .simon-center-btn { width: 80px; height: 80px; font-size: 0.85rem; }

    .home-btn { width: 46px; height: 46px; bottom: var(--s-4); right: var(--s-4); }
    .bgm-toggle-btn { bottom: var(--s-4); left: var(--s-4); padding: 8px 14px; font-size: 0.74rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    body::before { opacity: 0.3; }
}

/* 스크롤바 (웹킷) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--color-bg-0); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gold-deep), var(--gold-soft));
    border-radius: 5px;
    border: 2px solid var(--color-bg-0);
}
::-webkit-scrollbar-thumb:hover { background: var(--gold); }
