/* ═══════════════════════════════════════════════════════════════════════════
   청주지법 변호사 변사 사건 — v2 (2026-09-06 게임성 전면 개편)
   · 모바일 우선. 640px 스테이지, 하단 탭 내비, 안전영역(safe-area) 대응
   · 팔레트는 2026-04-21 편집 누아르 그대로 (딥 네이비 + 에이지드 골드 + 버건디)
   · Bootstrap 제거 — 필요한 유틸은 여기서 직접 정의
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    --bg-0: #080d17; --bg-1: #0d1524; --bg-2: #131d33;
    --surface: #182544; --surface-hi: #1f2e52;
    --text: #eae5d7; --text-2: #b9c1d1; --muted: #7d8aa3; --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;
    --font-serif: 'Nanum Myeongjo', 'Noto Serif KR', 'Apple SD Gothic Neo', Georgia, serif;
    --font-title: 'Noto Serif KR', 'Nanum Myeongjo', 'Apple SD Gothic Neo', serif;
    --font-ui: 'Inter', 'Pretendard', -apple-system, 'Segoe UI', Roboto, sans-serif;
    --r-sm: 6px; --r-md: 10px; --r-lg: 16px;
    --ease: cubic-bezier(0.25, 0.1, 0.25, 1); --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --dur: 220ms;
    --header-h: 48px; --nav-h: 62px;
    --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
}

/* ─── 리셋 ─── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--bg-0);
    color: var(--text);
    font-family: var(--font-serif);
    font-size: 16px; line-height: 1.7; letter-spacing: 0.005em;
    min-height: 100dvh;
    word-break: keep-all; overflow-wrap: anywhere;
    -webkit-font-smoothing: antialiased;
    overscroll-behavior-y: none;
    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%);
    background-attachment: fixed;
}
body::before {   /* 필름 그레인 — 저사양 모바일 고려해 얇게 */
    content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 5;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><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.07 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    opacity: 0.5; mix-blend-mode: overlay;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; }
img { display: block; max-width: 100%; }
a { color: var(--gold); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-title); font-weight: 700; margin: 0; line-height: 1.3; letter-spacing: 0.02em; }
p { margin: 0 0 10px; }
ul, ol { margin: 0; padding-left: 1.2em; }
b, strong { font-weight: 700; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.muted { color: var(--muted); } .small { font-size: 0.86rem; } .center { text-align: center; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 14px; }
.bad { color: var(--red-bright) !important; } .ok { color: var(--evidence) !important; } .warn { color: var(--notebook); }
.eyebrow { font-family: var(--font-ui); font-size: 0.66rem; letter-spacing: 0.32em; text-transform: uppercase; color: var(--gold); font-weight: 600; }

/* ─── 앱 셸 ─── */
#app { min-height: 100dvh; position: relative; }
#app.shake-sm { animation: shakeSm 0.4s var(--ease); }
#app.shake-md { animation: shakeMd 0.5s var(--ease); }
#app.shake-lg { animation: shakeLg 0.52s var(--ease); }
@keyframes shakeSm { 10%, 90% { transform: translate3d(-1px, 0, 0); } 30%, 70% { transform: translate3d(2px, 0, 0); } 50% { transform: translate3d(-2px, 1px, 0); } }
@keyframes shakeMd { 10%, 90% { transform: translate3d(-2px, 1px, 0); } 30%, 70% { transform: translate3d(4px, -1px, 0); } 50% { transform: translate3d(-4px, 2px, 0); } }
@keyframes shakeLg { 10%, 90% { transform: translate3d(-4px, 2px, 0); } 20%, 80% { transform: translate3d(6px, -2px, 0); } 30%, 70% { transform: translate3d(-8px, 3px, 0); } 50% { transform: translate3d(8px, -3px, 0); } }

/* 상단 헤더 (브랜드) */
.top-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 60;
    height: calc(var(--header-h) + var(--sat)); padding: var(--sat) 0 0;
    display: none;
    background: rgba(8, 13, 23, 0.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--gold-line);
}
.top-header.show { display: block; }
/* ⚠️ 헤더 내용은 «본문(.stage)과 같은 폭»의 컨테이너 안에 둔다. 전폭 flex 로 두면
   데스크톱에서 브랜드가 화면 맨 왼쪽, 도구가 맨 오른쪽으로 벌어져 본문과 세로선이 어긋난다. */
.top-header .shin-header-inner {
    max-width: 640px; margin: 0 auto; padding: 0 14px; height: 100%;
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.header-link { display: flex; align-items: baseline; gap: 8px; color: inherit; min-width: 0; }
.header-title { font-family: var(--font-title); color: var(--gold); font-size: 0.9rem; font-weight: 700; letter-spacing: 0.05em; white-space: nowrap; }
.header-lawyer-name { color: var(--text-2); font-size: 0.74rem; white-space: nowrap; }
.header-subtitle { display: none; color: var(--muted); font-family: var(--font-ui); font-size: 0.66rem; letter-spacing: 0.08em; }
.header-actions { display: flex; gap: 4px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); border: 1px solid transparent; transition: all var(--dur) var(--ease); font-size: 1rem; }
.icon-btn:hover, .icon-btn:active { color: var(--gold); border-color: var(--gold-line); background: rgba(201, 169, 97, 0.08); }
.icon-btn .off { display: none; } .icon-btn.is-off .on { display: none; } .icon-btn.is-off .off { display: inline; }
.icon-btn.is-off { color: var(--red-bright); }
.progress-line { position: fixed; top: calc(var(--header-h) + var(--sat)); left: 0; right: 0; height: 3px; background: rgba(255, 255, 255, 0.05); z-index: 59; }
#progressLine { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-deep), var(--gold)); box-shadow: 0 0 10px var(--gold-glow); transition: width 600ms var(--ease-out); }

/* 스테이지 */
.stage { max-width: 640px; margin: 0 auto; padding: calc(var(--header-h) + var(--sat) + 16px) 14px 40px; }
body.has-nav .stage { padding-bottom: calc(var(--nav-h) + var(--sab) + 24px); }
.screen { min-height: 50vh; }
.screen.enter-fade { animation: enterFade 0.35s var(--ease-out) both; }
.screen.enter-slide { animation: enterSlide 0.35s var(--ease-out) both; }
@keyframes enterFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes enterSlide { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }

/* 하단 내비 */
.bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: flex; justify-content: space-around; align-items: stretch;
    height: calc(var(--nav-h) + var(--sab)); padding: 0 4px var(--sab);
    background: rgba(8, 13, 23, 0.92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--gold-line);
    transform: translateY(110%); transition: transform 0.3s var(--ease-out);
}
.bottom-nav.show { transform: none; }
.nav-btn { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-family: var(--font-ui); font-size: 0.64rem; letter-spacing: 0.04em; position: relative; transition: color var(--dur); min-width: 0; }
.nav-btn i { font-size: 1.15rem; }
.nav-btn.active { color: var(--gold); }
.nav-btn.active::after { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; background: var(--gold); border-radius: 2px; }
.nav-badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--red-bright); color: #fff; font-size: 0.6rem; font-weight: 700; display: flex; align-items: center; justify-content: center; line-height: 1; }
.nav-badge[hidden] { display: none; }

/* ─── 인트로 ─── */
.intro-screen {
    position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 32px 24px;
    background: var(--bg-0);
    background-image: linear-gradient(180deg, rgba(8, 13, 23, 0.7) 0%, rgba(8, 13, 23, 0.5) 40%, rgba(8, 13, 23, 0.94) 100%), url('../assets/hero-courtroom.jpg?v=20260923');
    background-size: cover; background-position: center;
    transition: opacity 0.7s 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); }
.intro-screen::before { left: 6%; } .intro-screen::after { right: 6%; }
.intro-subtitle { font-family: var(--font-title); font-size: 0.82rem; color: var(--gold); letter-spacing: 0.42em; text-transform: uppercase; margin: 0 0 10px; animation: fadeUp 1.1s var(--ease-out) 0.3s both; text-align: center; }
.intro-title { font-size: clamp(2.1rem, 9vw, 4.4rem); font-weight: 900; text-align: center; letter-spacing: 0.2em; line-height: 1.2; margin: 0 0 18px; text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8), 0 0 40px rgba(201, 169, 97, 0.25); animation: titleGlow 4s ease-in-out infinite alternate; }
.intro-title::after { content: ''; display: block; width: 72px; height: 1px; margin: 18px auto 0; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
@keyframes titleGlow { from { text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8), 0 0 30px rgba(201, 169, 97, 0.2); } to { text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8), 0 0 50px rgba(201, 169, 97, 0.5), 0 0 90px rgba(165, 32, 46, 0.3); } }
.intro-author { font-family: var(--font-ui); font-size: 0.78rem; color: var(--muted); letter-spacing: 0.15em; margin: 0 0 40px; animation: fadeUp 1.1s var(--ease-out) 0.6s both; text-align: center; }
.intro-btns { display: flex; flex-direction: column; gap: 12px; width: min(320px, 100%); animation: fadeUp 1.1s var(--ease-out) 0.9s both; }
.intro-btn { border: 1px solid var(--gold); color: var(--gold); padding: 15px 24px; font-family: var(--font-title); font-size: 1rem; font-weight: 600; letter-spacing: 0.4em; text-transform: uppercase; border-radius: 3px; position: relative; overflow: hidden; transition: all var(--dur) var(--ease); }
.intro-btn.primary { background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: var(--on-gold); box-shadow: 0 10px 30px rgba(201, 169, 97, 0.3); }
.intro-btn:active { transform: scale(0.98); }
.intro-btn[hidden] { display: none; }
.intro-note { position: absolute; bottom: calc(24px + var(--sab)); font-family: var(--font-ui); font-size: 0.68rem; color: var(--muted); letter-spacing: 0.1em; text-align: center; animation: fadeUp 1.1s var(--ease-out) 1.3s both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ─── 공용 컴포넌트 ─── */
.screen-head { margin: 4px 0 16px; }
.screen-head.compact { margin-bottom: 10px; }
.screen-head h2 { font-size: 1.35rem; color: var(--text); margin-top: 4px; }
.screen-head h2 i, .card h2 i { color: var(--gold); margin-right: 6px; font-size: 0.9em; }
.card { background: linear-gradient(135deg, var(--surface) 0%, var(--bg-2) 100%); border: 1px solid var(--gold-line); border-left: 3px solid var(--gold); border-radius: var(--r-md); padding: 16px; margin: 0 0 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); }
.card.small { padding: 12px 14px; font-size: 0.92rem; }
.card p:last-child { margin-bottom: 0; }
.card .eyebrow { margin-bottom: 8px; }
.ok-card { border-left-color: var(--evidence); color: var(--evidence); }
.quote { border-left: 2px solid var(--gold); padding: 8px 12px; margin: 10px 0; color: var(--text-2); font-style: italic; }
.rules { color: var(--text-2); font-size: 0.92rem; }
.rules li { margin: 4px 0; }
.tip { display: flex; gap: 10px; align-items: flex-start; background: rgba(210, 138, 60, 0.1); border: 1px solid rgba(210, 138, 60, 0.3); border-radius: var(--r-md); padding: 10px 12px; margin: 0 0 14px; font-size: 0.9rem; color: var(--text); }
.tip i { color: var(--notebook); margin-top: 4px; }
.narr { color: var(--text-2); margin: 0 0 14px; font-size: 0.98rem; min-height: 1.6em; }
.narr.small { font-size: 0.9rem; }
.banner { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-md); border: 1px solid var(--gold-line); margin: 0 0 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); }
.alert { display: block; border-radius: var(--r-md); border: 1px solid transparent; padding: 11px 13px; margin: 0 0 12px; font-size: 0.92rem; line-height: 1.65; }
.alert > i:first-child { margin-right: 8px; }
.alert.small { font-size: 0.86rem; padding: 9px 11px; }
.alert-info { background: rgba(93, 135, 184, 0.12); border-color: rgba(93, 135, 184, 0.3); } .alert-info i { color: var(--scene); }
.alert-warn { background: rgba(210, 138, 60, 0.12); border-color: rgba(210, 138, 60, 0.35); } .alert-warn i { color: var(--notebook); }
.alert-bad { background: rgba(196, 56, 72, 0.14); border-color: rgba(196, 56, 72, 0.4); } .alert-bad i { color: var(--red-bright); }
.alert-ok { background: rgba(74, 150, 114, 0.12); border-color: rgba(74, 150, 114, 0.35); } .alert-ok i { color: var(--evidence); }
.result-box { background: rgba(8, 13, 23, 0.55); border: 1px solid var(--gold-line); border-radius: var(--r-md); padding: 12px 14px; margin: 0 0 12px; color: var(--text); font-size: 0.95rem; }
.result-box .eyebrow { margin-bottom: 4px; }
.reveal { opacity: 0; transform: translateY(8px); transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out); pointer-events: none; }
.reveal.show { opacity: 1; transform: none; pointer-events: auto; }

.rows { border: 1px solid var(--gold-line); border-radius: var(--r-md); overflow: hidden; margin: 0 0 12px; background: rgba(8, 13, 23, 0.4); }
.row-item { display: grid; grid-template-columns: minmax(72px, 30%) 1fr; gap: 10px; padding: 9px 12px; border-bottom: 1px solid rgba(201, 169, 97, 0.1); font-size: 0.92rem; }
.row-item:last-child { border-bottom: 0; }
.row-k { font-family: var(--font-ui); color: var(--gold); font-weight: 600; font-size: 0.82rem; letter-spacing: 0.04em; }
.row-v { color: var(--text-2); }
.row-item.bad .row-v { color: var(--red-bright); font-weight: 700; } .row-item.bad .row-k { color: var(--red-bright); }
.row-item.warn .row-v { color: var(--notebook); }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 20px; border-radius: var(--r-sm); border: 1px solid var(--gold); color: var(--gold); font-family: var(--font-title); font-size: 0.95rem; font-weight: 600; letter-spacing: 0.06em; transition: all var(--dur) var(--ease); text-align: center; width: 100%; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.38; }
.btn-primary { background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: var(--on-gold); box-shadow: 0 8px 22px rgba(201, 169, 97, 0.25); }
.btn-ghost { border-color: var(--gold-line); color: var(--text-2); }
.btn-danger { border-color: var(--red-bright); color: var(--red-bright); background: rgba(196, 56, 72, 0.08); }
.btn-scene { border-color: var(--scene); color: var(--scene); }
.btn-lg { min-height: 54px; font-size: 1.02rem; letter-spacing: 0.1em; }
.btn-sm { min-height: 40px; padding: 8px 14px; font-size: 0.86rem; }
.btn-xs { min-height: 32px; padding: 4px 10px; font-size: 0.78rem; width: auto; }
.btn-col { display: flex; flex-direction: column; gap: 10px; margin: 16px 0 4px; }
.btn-col .small { margin-top: -4px; }
.sticky-bottom { position: sticky; bottom: calc(var(--nav-h) + var(--sab) + 8px); z-index: 2; }
.center-block { text-align: center; padding: 24px 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.center-block h2 { font-size: 1.4rem; }
.center-block .btn { max-width: 340px; }
.big-icon { width: 76px; height: 76px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem; border: 2px solid currentColor; margin-bottom: 6px; }
.big-icon.ok { color: var(--evidence); box-shadow: 0 0 30px rgba(74, 150, 114, 0.35); }
.big-icon.bad { color: var(--red-bright); box-shadow: 0 0 30px var(--red-glow); }
.passcode { font-family: var(--font-ui); font-size: 2.6rem; font-weight: 700; letter-spacing: 0.3em; color: var(--gold); text-shadow: 0 0 24px var(--gold-glow); }

/* 칩·필 */
.chip { font-family: var(--font-ui); font-size: 0.66rem; letter-spacing: 0.06em; padding: 4px 8px; border-radius: 4px; white-space: nowrap; font-weight: 700; flex-shrink: 0; }
.chip-new { background: rgba(210, 138, 60, 0.18); color: var(--notebook); border: 1px solid rgba(210, 138, 60, 0.4); }
.chip-ok { background: rgba(74, 150, 114, 0.18); color: var(--evidence); border: 1px solid rgba(74, 150, 114, 0.4); }
.chip-warn { background: rgba(201, 169, 97, 0.15); color: var(--gold); border: 1px solid var(--gold-line); }
.chip-mute { background: rgba(125, 138, 163, 0.15); color: var(--muted); border: 1px solid rgba(125, 138, 163, 0.3); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.pill { font-family: var(--font-ui); font-size: 0.72rem; padding: 4px 10px; border-radius: 20px; background: rgba(201, 169, 97, 0.1); border: 1px solid var(--gold-line); color: var(--text-2); }

/* 히어로 카드 (메뉴) */
.hero-card { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--gold-line); margin: 0 0 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); }
.hero-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.hero-body { position: absolute; inset: auto 0 0 0; padding: 40px 16px 16px; background: linear-gradient(180deg, transparent, rgba(8, 13, 23, 0.92) 55%); }
.hero-title { font-size: clamp(1.5rem, 6.5vw, 2.2rem); letter-spacing: 0.1em; margin: 4px 0 8px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-family: var(--font-ui); font-size: 0.76rem; color: var(--text-2); }
.hero-meta i { color: var(--gold); margin-right: 4px; }
.victim-row { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; }
.progress-card { display: flex; align-items: center; gap: 16px; }
.progress-info b { font-size: 1.05rem; }

/* 초상 */
.portrait { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: center 20%; border: 2px solid var(--gold-line); flex-shrink: 0; background: var(--bg-2); }
.portrait-lg { width: 92px; height: 92px; border-width: 3px; box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.1), 0 10px 24px rgba(0, 0, 0, 0.5); }
.portrait.shaken { animation: portraitShake 0.6s var(--ease); }
@keyframes portraitShake { 20% { transform: translateX(-4px) rotate(-2deg); } 40% { transform: translateX(4px) rotate(2deg); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
.portrait-row { display: flex; justify-content: center; gap: 12px; margin: 14px 0 4px; flex-wrap: wrap; }
.mini-portrait { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 0.74rem; color: var(--text-2); }
.mini-portrait img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; object-position: center 20%; border: 2px solid var(--c, var(--gold)); }

/* 진행 링 */
.ring { position: relative; width: 72px; height: 72px; flex-shrink: 0; }
.ring svg { width: 72px; height: 72px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255, 255, 255, 0.07); stroke-width: 6; }
.ring-fg { fill: none; stroke: var(--gold); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 0.8s var(--ease-out); filter: drop-shadow(0 0 6px var(--gold-glow)); }
.ring-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-ui); color: var(--gold); }
.ring-text b { font-size: 1.15rem; } .ring-text small { font-size: 0.6rem; margin-left: 1px; }

/* 허브 타일 */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 14px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; min-height: 104px; border-radius: var(--r-md); border: 1px solid var(--gold-line); background: linear-gradient(160deg, rgba(24, 37, 68, 0.7), rgba(13, 21, 36, 0.9)); text-align: left; transition: all var(--dur) var(--ease); overflow: hidden; }
.tile::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--tc, var(--gold)); }
.tile i { font-size: 1.4rem; color: var(--tc, var(--gold)); margin-bottom: 4px; }
.tile b { font-family: var(--font-title); font-size: 1rem; }
.tile span { font-family: var(--font-ui); font-size: 0.74rem; color: var(--muted); letter-spacing: 0.04em; }
.tile:active { transform: scale(0.98); background: var(--surface-hi); }
.tile-scene { --tc: var(--scene); } .tile-suspect { --tc: var(--suspect); } .tile-evidence { --tc: var(--evidence); } .tile-notebook { --tc: var(--notebook); }
.tile-badge { position: absolute; top: 10px; right: 10px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red-bright); color: #fff; font-family: var(--font-ui); font-size: 0.62rem; font-weight: 700; font-style: normal; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 12px var(--red-glow); animation: pulseBadge 1.6s ease-in-out infinite; }
@keyframes pulseBadge { 50% { transform: scale(1.12); } }
.final-card { border-left-color: var(--muted); }
.final-card.ready { border-left-color: var(--red-bright); box-shadow: 0 0 0 1px rgba(196, 56, 72, 0.25), 0 8px 30px rgba(196, 56, 72, 0.15); }
.final-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.final-head > i { font-size: 1.5rem; color: var(--muted); }
.final-card.ready .final-head > i { color: var(--red-bright); }
.req { list-style: none; padding: 0; margin: 0 0 8px; font-family: var(--font-ui); font-size: 0.84rem; color: var(--muted); }
.req li { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.req li i { font-size: 0.6rem; }
.req li.ok { color: var(--evidence); } .req li.ok i { font-size: 0.8rem; }
.final-card .btn { margin-top: 6px; }

/* 리스트 카드 (현장·목격자·용의자) */
.list { display: flex; flex-direction: column; gap: 10px; margin: 0 0 8px; }
.area-card, .suspect-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--gold-line); background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%); transition: all var(--dur) var(--ease); position: relative; overflow: hidden; }
.area-card::before, .suspect-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c, transparent); transition: background var(--dur); }
.area-card:active, .suspect-card:active { background: var(--surface-hi); transform: scale(0.99); }
.area-card.done::before { background: var(--evidence); }
.area-card.locked, .suspect-card.locked { opacity: 0.5; filter: grayscale(0.7); }
.area-icon { width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: rgba(201, 169, 97, 0.1); border: 1px solid var(--gold-line); color: var(--gold); font-size: 1.1rem; }
.area-body, .suspect-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.area-body b, .suspect-body b { font-family: var(--font-title); font-size: 1rem; }
.area-body span, .suspect-body > span { font-size: 0.84rem; color: var(--text-2); }
.suspect-body small { color: var(--muted); font-weight: 400; }
.suspect-card .portrait { width: 60px; height: 60px; border-color: var(--c, var(--gold-line)); }

/* 동요 미터 */
.meter-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-family: var(--font-ui); font-size: 0.7rem; color: var(--muted); }
.meter { flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.meter i { display: block; height: 100%; width: var(--w, 0%); background: linear-gradient(90deg, var(--gold), var(--red-bright)); border-radius: 3px; transition: width 0.7s var(--ease-out); }
.meter-val { min-width: 28px; text-align: right; font-weight: 700; }

/* 신문 */
.interro-head { display: flex; align-items: center; gap: 14px; margin: 0 0 12px; }
.interro-head h2 { font-size: 1.35rem; } .interro-head small { font-weight: 400; color: var(--muted); font-size: 0.8rem; }
.interro-head .portrait-lg { border-color: var(--c, var(--gold)); }
.q-list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 4px; }
.q-btn { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--gold-line); background: rgba(24, 37, 68, 0.5); font-size: 0.95rem; transition: all var(--dur) var(--ease); }
.q-btn i { color: var(--gold); flex-shrink: 0; }
.q-btn:active { background: var(--surface-hi); }
.q-btn.asked { color: var(--muted); border-style: dashed; } .q-btn.asked i { color: var(--evidence); }
.q-btn span { flex: 1; }
.q-clue { color: var(--notebook); font-style: normal; font-size: 0.8rem; }

/* 대화 */
.dialogue-scene { display: flex; flex-direction: column; gap: 10px; }
.dlg-portrait-wrap { display: flex; justify-content: center; margin: 4px 0 6px; }
.dlg-portrait-wrap .portrait-lg { width: 110px; height: 110px; border-color: var(--c, var(--gold)); }
.dlg-bubble { padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--gold-line); font-size: 0.97rem; line-height: 1.75; }
.dlg-bubble b { display: block; font-family: var(--font-ui); font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.dlg-bubble.detective { background: rgba(93, 135, 184, 0.1); border-color: rgba(93, 135, 184, 0.3); margin-right: 24px; }
.dlg-bubble.detective b { color: var(--scene); }
.dlg-bubble.suspect { background: rgba(8, 13, 23, 0.6); border-left: 3px solid var(--c, var(--gold)); margin-left: 12px; color: var(--text); min-height: 90px; }
.dlg-text { min-height: 2em; cursor: pointer; }
.tap-hint { display: none; font-family: var(--font-ui); font-size: 0.66rem; letter-spacing: 0.12em; color: var(--muted); margin-top: 6px; }
.typing + .tap-hint { display: block; animation: enterFade 0.6s 0.8s both; }
.caret { display: inline-block; width: 2px; height: 1em; background: var(--gold); vertical-align: -2px; margin-left: 2px; animation: blink 0.8s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.observe { display: flex; gap: 8px; align-items: flex-start; color: var(--scene); font-size: 0.88rem; padding: 8px 12px; border-radius: var(--r-sm); background: rgba(93, 135, 184, 0.08); margin: 0 0 8px; }
.observe i { margin-top: 4px; }
.sus-chip { display: inline-flex; gap: 8px; align-items: center; font-family: var(--font-ui); font-size: 0.78rem; font-weight: 600; padding: 6px 12px; border-radius: 20px; margin: 0 0 6px; }
.sus-chip.s1 { background: rgba(201, 169, 97, 0.14); color: var(--gold); }
.sus-chip.s2 { background: rgba(210, 138, 60, 0.16); color: var(--notebook); }
.sus-chip.s3 { background: rgba(196, 56, 72, 0.18); color: var(--red-bright); animation: pulseBadge 1.4s ease-in-out 3; }
.claim-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--gold-line); border-left: 3px solid var(--c, var(--gold)); background: rgba(24, 37, 68, 0.6); margin: 0 0 12px; }
.claim-card > div { flex: 1; min-width: 0; } .claim-card b { font-size: 0.98rem; }
.claim-card .portrait { border-color: var(--c, var(--gold)); }

/* 단서 카드 */
.clue-grid { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; }
.clue-card { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; padding: 11px 12px; border-radius: var(--r-md); border: 1px solid var(--gold-line); border-left: 2px solid var(--gold); background: rgba(13, 21, 37, 0.6); transition: all var(--dur) var(--ease); }
.clue-card.locked { opacity: 0.45; border-left-color: var(--muted); border-style: dashed; }
button.clue-card:active { background: var(--surface-hi); }
.clue-card.selected { border-color: var(--gold); background: rgba(201, 169, 97, 0.14); box-shadow: 0 0 0 1px var(--gold), 0 0 18px var(--gold-glow); }
.clue-icon { width: 38px; height: 38px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: rgba(201, 169, 97, 0.1); color: var(--gold); font-size: 1rem; }
.clue-card.selected .clue-icon { background: var(--gold); color: var(--on-gold); }
.clue-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.clue-cat { font-family: var(--font-ui); font-size: 0.62rem; letter-spacing: 0.2em; color: var(--muted); text-transform: uppercase; }
.clue-name { font-family: var(--font-title); font-size: 0.96rem; }
.clue-desc { font-size: 0.84rem; color: var(--text-2); line-height: 1.55; }

/* 증거 분석 버튼 */
.an-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 0 0 14px; }
.an-btn { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px; min-height: 84px; border-radius: var(--r-md); border: 1px solid var(--gold-line); background: rgba(24, 37, 68, 0.5); text-align: left; transition: all var(--dur) var(--ease); }
.an-btn i { color: var(--evidence); font-size: 1.1rem; margin-bottom: 4px; }
.an-btn span { font-family: var(--font-title); font-size: 0.9rem; font-weight: 700; }
.an-btn small { font-family: var(--font-ui); font-size: 0.68rem; color: var(--muted); }
.an-btn.new { border-color: rgba(74, 150, 114, 0.5); box-shadow: 0 0 16px rgba(74, 150, 114, 0.12); }
.an-btn.done i { color: var(--muted); } .an-btn.done { opacity: 0.8; }
.an-btn.locked { opacity: 0.4; } .an-btn.locked i { color: var(--muted); }
.an-btn:active { background: var(--surface-hi); }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 12px; padding-bottom: 4px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex-shrink: 0; padding: 8px 14px; border-radius: 20px; border: 1px solid var(--gold-line); font-family: var(--font-ui); font-size: 0.8rem; color: var(--text-2); transition: all var(--dur); }
.tab small { color: var(--muted); margin-left: 4px; }
.tab.active { background: var(--gold); color: var(--on-gold); border-color: var(--gold); } .tab.active small { color: var(--on-gold); opacity: 0.7; }
.file-card { border: 1px solid var(--gold-line); border-radius: var(--r-md); overflow: hidden; margin: 0 0 12px; background: #f6f1e4; color: #1a2744; }
.file-head { display: flex; gap: 12px; align-items: center; padding: 12px 14px; background: #ebe3cf; border-bottom: 1px solid rgba(0, 0, 0, 0.08); }
.file-head i { color: #2b579a; font-size: 1.5rem; } .file-head .muted { color: #5b6473; }
.file-body { padding: 16px 18px; font-family: var(--font-title); line-height: 2; }
.file-body p { margin: 0; } .file-body p:last-child { color: #8a8f99; font-size: 0.85rem; margin-top: 8px; }

/* 수사 노트 */
.notebook { background: linear-gradient(180deg, #faf5e8 0%, #f1e8cf 100%); color: #1a2744; border-radius: var(--r-md); padding: 16px 16px 16px 20px; position: relative; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45); min-height: 200px; }
.notebook::before { content: ''; position: absolute; left: 44px; top: 0; bottom: 0; width: 1px; background: rgba(165, 32, 46, 0.35); }
.note { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px dashed rgba(26, 39, 68, 0.15); }
.note:last-child { border-bottom: 0; }
.note > i { width: 18px; color: var(--red-deep); margin-top: 6px; flex-shrink: 0; font-size: 0.85rem; }
.note small { color: #7a8190; font-family: var(--font-ui); font-size: 0.68rem; }
.note p { margin: 0; font-size: 0.92rem; line-height: 1.6; color: #1a2744; }
.note.contradiction > i { color: var(--red-bright); } .note.success > i { color: #2f855a; } .note.clue > i { color: #b7791f; }

/* 최종 추리 */
.facts { padding-left: 1.1em; color: var(--text-2); font-size: 0.92rem; }
.facts li { margin: 4px 0; }
.facts.bad li::marker { color: var(--red-bright); }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 0 0 12px; }
.pick-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 10px; border-radius: var(--r-md); border: 1px solid var(--gold-line); background: rgba(24, 37, 68, 0.5); text-align: center; transition: all var(--dur) var(--ease); }
.pick-card img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: center 20%; border: 2px solid var(--c, var(--gold)); margin-bottom: 4px; }
.pick-card b { font-family: var(--font-title); }
.pick-card span { font-size: 0.76rem; color: var(--muted); line-height: 1.4; }
.pick-card:active { background: var(--surface-hi); transform: scale(0.98); }
.steps { padding-left: 1.2em; color: var(--text-2); font-size: 0.93rem; }
.steps li { margin: 6px 0; } .steps b { display: block; color: var(--text); }
.verdict-hero { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--gold-line); margin: 0 0 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); }
.verdict-hero img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.verdict-cap { position: absolute; inset: auto 0 0 0; padding: 60px 16px 16px; background: linear-gradient(180deg, transparent, rgba(8, 13, 23, 0.95) 60%); }
.verdict-cap h1 { font-size: 1.5rem; letter-spacing: 0.08em; margin: 4px 0 6px; }
.verdict-cap p { margin: 0; color: var(--text-2); font-size: 0.92rem; }
.verdict-hero.win .eyebrow { color: var(--evidence); } .verdict-hero.lose .eyebrow { color: var(--red-bright); }
.credits { text-align: center; border-left-color: var(--muted); }

/* ─── 사이먼 ─── */
.simon-hud { text-align: center; margin: 0 0 12px; }
.level-dots { display: flex; justify-content: center; gap: 8px; margin: 0 0 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); border: 1px solid var(--gold-line); transition: all var(--dur); }
.dot.cur { border-color: var(--gold); box-shadow: 0 0 8px var(--gold-glow); }
.dot.ok { background: var(--gold); border-color: var(--gold); }
.simon-msg { font-family: var(--font-title); min-height: 48px; color: var(--text); }
.simon-board { position: relative; width: min(340px, 86vw); height: min(340px, 86vw); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; padding: 10px; border-radius: 50%; background: radial-gradient(circle, var(--bg-2), var(--bg-0)); box-shadow: 0 0 0 1px var(--gold-line), 0 20px 60px rgba(0, 0, 0, 0.6); }
.simon-btn { position: relative; overflow: hidden; border: 2px solid rgba(0, 0, 0, 0.45); opacity: 0.55; transition: all 120ms var(--ease); filter: saturate(0.6); display: flex; align-items: flex-end; justify-content: center; background: var(--c); }
.simon-btn:nth-child(1) { border-radius: 170px 0 0 0; } .simon-btn:nth-child(2) { border-radius: 0 170px 0 0; }
.simon-btn:nth-child(3) { border-radius: 0 0 0 170px; } .simon-btn:nth-child(4) { border-radius: 0 0 170px 0; }
.simon-btn img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 15%; opacity: 0.85; mix-blend-mode: luminosity; }
.simon-name { position: relative; z-index: 1; font-family: var(--font-title); font-weight: 700; font-size: 0.85rem; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9); padding: 6px; }
.simon-btn.lit { opacity: 1; filter: saturate(1.3) brightness(1.2); box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.5), 0 0 30px var(--c); transform: scale(1.02); }
.simon-btn.lit img { mix-blend-mode: normal; opacity: 1; }
.simon-btn:not(:disabled):active { opacity: 0.9; transform: scale(0.98); }
.simon-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 88px; height: 88px; border-radius: 50%; background: radial-gradient(circle, var(--gold), var(--gold-deep)); border: 3px solid var(--bg-0); color: var(--on-gold); font-family: var(--font-title); font-weight: 700; font-size: 0.9rem; box-shadow: 0 0 0 4px rgba(201, 169, 97, 0.15), 0 8px 20px rgba(0, 0, 0, 0.5); z-index: 2; }
.simon-center:disabled { opacity: 0.7; }

/* ─── 짝 맞추기 ─── */
.memory-hud { display: flex; justify-content: space-between; font-family: var(--font-ui); font-size: 0.86rem; color: var(--text-2); margin: 0 0 10px; }
.memory-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 10px; background: rgba(8, 13, 23, 0.5); border: 1px solid var(--gold-line); border-radius: var(--r-md); }
.mcard { position: relative; aspect-ratio: 1; perspective: 800px; border-radius: var(--r-sm); }
.mface { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: var(--r-sm); transition: transform 0.45s var(--ease); overflow: hidden; }
.mback { background: linear-gradient(135deg, var(--surface-hi), var(--surface)); border: 1px solid var(--gold-line); color: var(--gold); font-size: 1.3rem; }
.mfront { transform: rotateY(180deg); border: 1px solid var(--gold); background: #12213e; }
.mfront img { width: 100%; height: 100%; object-fit: cover; }
.mcard.open .mback { transform: rotateY(180deg); } .mcard.open .mfront { transform: rotateY(0); }
.mcard.done .mfront { box-shadow: 0 0 14px var(--gold-glow); animation: matchPulse 0.5s var(--ease-out); }
.mcard.wrong { animation: shakeSm 0.35s; }
@keyframes matchPulse { 50% { transform: scale(1.08); } }

/* ─── 메모 복원 ─── */
.memo-paper { display: flex; flex-direction: column; gap: 6px; padding: 18px 16px; background: linear-gradient(180deg, #f7f1df, #efe5c8); border-radius: 4px; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5), inset 0 0 40px rgba(120, 90, 30, 0.12); margin: 0 0 10px; }
.memo-piece { position: relative; width: 100%; text-align: left; padding: 10px 14px 10px 18px; background: #fbf6e8; color: #2a2118; font-family: 'Nanum Myeongjo', var(--font-title); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.03em; border: 1px solid rgba(60, 40, 10, 0.18); border-radius: 2px; transform: rotate(var(--r, 0deg)); transition: all var(--dur) var(--ease); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18); }
.memo-piece::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 4px; background: repeating-linear-gradient(90deg, transparent 0 6px, rgba(60, 40, 10, 0.25) 6px 8px); }
.memo-piece.sel { transform: rotate(0) translateY(-3px) scale(1.02); box-shadow: 0 0 0 2px var(--gold), 0 10px 20px rgba(0, 0, 0, 0.3); z-index: 1; }
.memo-piece.fixed { transform: none; border-color: transparent; box-shadow: none; }
.memo-piece.fixed::after { display: none; }
.memo-paper.solved { gap: 0; } .memo-paper.solved .memo-piece { padding: 6px 14px; background: transparent; }
.memo-status { text-align: center; font-family: var(--font-ui); font-size: 0.8rem; color: var(--muted); }

/* ─── 타임라인 ─── */
.tl-hud { display: flex; justify-content: space-between; font-family: var(--font-ui); font-size: 0.86rem; color: var(--text-2); margin: 0 0 10px; }
.tl-slots { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 6px; position: relative; }
.tl-slots::before { content: ''; position: absolute; left: 62px; top: 8px; bottom: 8px; width: 1px; background: var(--gold-line); }
.tl-slot { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--r-sm); border: 1px dashed rgba(201, 169, 97, 0.25); font-size: 0.88rem; color: var(--muted); min-height: 42px; position: relative; }
.tl-time { font-family: var(--font-ui); font-weight: 700; font-size: 0.78rem; width: 44px; flex-shrink: 0; color: var(--muted); }
.tl-slot.filled { border-style: solid; border-color: var(--gold-line); background: rgba(24, 37, 68, 0.6); color: var(--text); animation: enterFade 0.3s; }
.tl-slot.filled .tl-time { color: var(--gold); }
.tl-pool { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 0; }
.tl-card { width: 100%; text-align: left; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--gold-line); background: linear-gradient(180deg, var(--surface), var(--bg-2)); font-size: 0.95rem; transition: all var(--dur); }
.tl-card:active { background: var(--surface-hi); }
.tl-card.wrong { animation: shakeSm 0.35s; border-color: var(--red-bright); background: rgba(196, 56, 72, 0.15); }

/* ─── 연출 레이어 ─── */
#fxFlash { position: fixed; inset: 0; pointer-events: none; z-index: 90; opacity: 0; }
#fxParticles { position: fixed; inset: 0; pointer-events: none; z-index: 95; overflow: hidden; }
.fx-particle { position: absolute; border-radius: 50%; animation: particleFly 0.85s var(--ease-out) forwards; will-change: transform, opacity; }
@keyframes particleFly { to { transform: translate(var(--dx), var(--dy)) scale(0.2); opacity: 0; } }
#fxStamp { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 96; opacity: 0; }
#fxStamp.show { animation: stampHold 1.05s var(--ease) forwards; }
.stamp-inner { border: 5px solid var(--stamp-color); color: var(--stamp-color); padding: 12px 28px; border-radius: 8px; transform: rotate(-12deg); text-align: center; background: rgba(8, 13, 23, 0.55); box-shadow: 0 0 40px rgba(0, 0, 0, 0.6); }
#fxStamp.show .stamp-inner { animation: stampIn 0.35s var(--ease-out) both; }
.stamp-text { font-family: var(--font-title); font-weight: 900; font-size: clamp(2.2rem, 12vw, 4rem); letter-spacing: 0.15em; line-height: 1.1; }
.stamp-sub { font-family: var(--font-ui); font-size: 0.8rem; letter-spacing: 0.2em; margin-top: 4px; opacity: 0.9; }
@keyframes stampIn { from { transform: rotate(-12deg) scale(2.4); opacity: 0; } 60% { transform: rotate(-12deg) scale(0.94); opacity: 1; } to { transform: rotate(-12deg) scale(1); } }
@keyframes stampHold { 0% { opacity: 0; } 8% { opacity: 1; } 82% { opacity: 1; } 100% { opacity: 0; } }
#fxToast { position: fixed; bottom: calc(24px + var(--sab)); left: 50%; transform: translateX(-50%); z-index: 97; display: flex; flex-direction: column; gap: 6px; width: min(92vw, 420px); pointer-events: none; }
body.has-nav #fxToast { bottom: calc(var(--nav-h) + var(--sab) + 12px); }
.toast-item { background: rgba(13, 21, 36, 0.95); border: 1px solid var(--gold-line); border-left: 3px solid var(--gold); color: var(--text); padding: 10px 14px; border-radius: var(--r-sm); font-family: var(--font-ui); font-size: 0.82rem; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); opacity: 0; transform: translateY(8px); transition: all 0.3s var(--ease-out); }
.toast-item.in { opacity: 1; transform: none; }
.toast-item.gold { border-left-color: var(--gold); } .toast-item.bad { border-left-color: var(--red-bright); }
.toast-item i { color: var(--gold); margin-right: 6px; }
#fxClue { position: fixed; inset: 0; z-index: 98; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(8, 13, 23, 0.82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); cursor: pointer; }
#fxClue.show { display: flex; animation: enterFade 0.25s; }
.clue-modal { width: min(360px, 100%); background: linear-gradient(160deg, var(--surface), var(--bg-1)); border: 1px solid var(--gold); border-radius: var(--r-lg); padding: 22px 20px 16px; text-align: center; box-shadow: 0 0 0 1px var(--gold-line), 0 30px 60px rgba(0, 0, 0, 0.7), 0 0 60px var(--gold-glow); animation: clueIn 0.45s var(--ease-out) both; position: relative; overflow: hidden; }
.clue-modal::before { content: ''; position: absolute; top: 0; left: 15%; right: 15%; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
@keyframes clueIn { from { transform: translateY(24px) scale(0.92); opacity: 0; } to { transform: none; opacity: 1; } }
.clue-modal-label { font-family: var(--font-ui); font-size: 0.66rem; letter-spacing: 0.3em; color: var(--gold); }
.clue-modal-icon { width: 72px; height: 72px; border-radius: 50%; margin: 14px auto 12px; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle, rgba(201, 169, 97, 0.25), transparent 70%); border: 1px solid var(--gold); color: var(--gold); font-size: 1.8rem; box-shadow: 0 0 24px var(--gold-glow); }
.clue-modal-name { font-family: var(--font-title); font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
.clue-modal-desc { color: var(--text-2); font-size: 0.92rem; line-height: 1.65; }
.clue-modal-hint { margin-top: 14px; font-family: var(--font-ui); font-size: 0.68rem; letter-spacing: 0.12em; color: var(--muted); }

/* ─── 홈 화면 추가 안내 모달 (브랜드 공통 · 라이트) ─── */
.home-guide-modal { display: none; position: fixed; inset: 0; background: rgba(8, 13, 23, 0.88); backdrop-filter: blur(6px); z-index: 200; }
.home-guide-modal.show { display: flex; align-items: center; justify-content: center; padding: 20px; animation: enterFade 0.3s; }
.home-guide-content { background: #fbf8f3; border: 1px solid rgba(201, 169, 97, 0.3); border-radius: var(--r-lg); padding: 20px; padding-top: 64px; max-width: 400px; width: 100%; position: relative; color: #1a2744; max-height: 90dvh; overflow-y: auto; font-family: var(--font-ui); }
.service-link-copy { position: absolute; top: 16px; left: 20px; right: 54px; background: linear-gradient(135deg, var(--red), var(--red-deep)); border-radius: var(--r-sm); padding: 8px 12px; display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12px; color: #fff; font-weight: 600; }
.service-link-copy.copied { background: linear-gradient(135deg, #10b981, #059669); }
.guide-close { position: absolute; top: 16px; right: 16px; font-size: 22px; color: #94a3b8; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.guide-header { text-align: center; margin-bottom: 16px; }
.guide-header h3 { font-family: var(--font-title); font-size: 17px; color: #1a2744; margin-bottom: 6px; line-height: 1.4; }
.guide-header p { color: #64748b; font-size: 13px; margin: 0; }
.browser-section { margin-bottom: 12px; 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: 6px; 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; }
.samsung-icon { background: #1428A0; color: #fff; 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-size: 13px; line-height: 1.8; }
.guide-footer { margin-top: 14px; padding-top: 12px; border-top: 1px solid #e2e8f0; }
.guide-benefit { display: flex; align-items: center; justify-content: center; gap: 8px; color: #059669; font-size: 13px; font-weight: 600; }

/* ─── 데스크톱 보정 ─── */
@media (min-width: 700px) {
    .header-subtitle { display: block; }
    .top-header .shin-header-inner { padding-left: 24px; padding-right: 24px; }
    .stage { padding-left: 24px; padding-right: 24px; }
    .bottom-nav { max-width: 640px; left: 50%; transform: translate(-50%, 110%); border-radius: 14px 14px 0 0; border-left: 1px solid var(--gold-line); border-right: 1px solid var(--gold-line); }
    .bottom-nav.show { transform: translate(-50%, 0); }
    .tile { min-height: 116px; }
    .area-card:hover, .suspect-card:hover:not(.locked), .q-btn:hover, .tile:hover, .tl-card:hover, button.clue-card:hover { border-color: var(--gold); }
    .btn-primary:hover { filter: brightness(1.08); }
    .btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
}

/* ─── 모션 최소화 ─── */
@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.25; }
}


/* ───────── 자문 변호사 조성욱 (2026-09-20 조변 «내 캐릭 살짝») ─────────
   이 앱은 누아르 톤이라 웹툰 컷 대신 같은 화풍의 초상(portrait-jo-adviser.jpg)을 쓴다.
   자리는 둘: ① 수사 본부 팁 한 줄의 말하는 사람 ② 종결 보고서의 법률 자문 카드. */
.tip-adviser { align-items: center; gap: 12px; }
.tip-adviser .adviser-face {
    width: 42px; height: 42px; flex: none; border-radius: 50%;
    object-fit: cover; border: 1px solid var(--gold-line);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
.tip-adviser .adviser-name {
    display: block; font-size: 0.72rem; letter-spacing: 0.08em;
    color: var(--gold); margin-bottom: 2px; font-weight: 700;
}
.tip-adviser span { display: block; line-height: 1.6; }

.adviser-card .adviser-row { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 10px; }
.adviser-card .adviser-row img {
    width: 64px; height: 64px; flex: none; border-radius: 50%;
    object-fit: cover; border: 1px solid var(--gold-line);
}
.adviser-card .adviser-row b { display: block; color: var(--gold); margin-bottom: 4px; }
.adviser-card .adviser-row p { margin: 0; line-height: 1.65; color: var(--text); }
.adviser-card .btn { width: 100%; margin-top: 10px; }

/* 수사 평가 */
.grade-card { text-align: center; }
.grade-stamp {
    display: inline-block; margin: 8px 0 6px; padding: 6px 18px;
    border: 2px solid var(--gold); border-radius: 6px; color: var(--gold);
    font-size: 1.25rem; font-weight: 800; letter-spacing: 0.14em;
    transform: rotate(-2deg);
}
.grade-card p { margin: 0 0 12px; }
.grade-stats { display: flex; gap: 8px; justify-content: center; }
.grade-stats div {
    flex: 1 1 0; background: rgba(255, 255, 255, 0.04);
    border-radius: var(--r-sm, 8px); padding: 8px 4px;
}
.grade-stats b { display: block; font-size: 1.1rem; color: var(--text); }
.grade-stats span { font-size: 0.72rem; color: var(--text-2); }


/* ═══════════ 미니게임 손질 (2026-09-22 · 조변 «새 짝 맞추기를 반영 · 각 미니게임 개선») ═══════════ */

/* 사이먼: 아래 두 칸의 이름표가 둥근 판 가장자리에 잘렸다(«표검사» → «?사») → 아래 칸은 이름표를 가로축 쪽(위)으로 */
.simon-btn:nth-child(3), .simon-btn:nth-child(4) { align-items: flex-start; }
.simon-btn.hint { opacity: 1; filter: none; box-shadow: inset 0 0 0 3px var(--gold), 0 0 26px var(--gold-glow); }
.simon-btn.hint img { mix-blend-mode: normal; opacity: 1; }

/* 짝 맞추기: 카드 뒷면 = 霧(안개) 인장 — 피해자의 사무소 «법무법인 안개». 🚨 실제 사무소 이름(信)을 이야기 속에 쓰지 않는다(2026-09-22 조변) */
.mback { background: radial-gradient(circle at 50% 42%, var(--surface-hi), var(--surface) 72%); }
.mback::before { content: ''; position: absolute; inset: 4px; border: 1px solid rgba(201, 169, 97, 0.22); border-radius: calc(var(--r-sm) - 2px); pointer-events: none; }
.mseal { width: 54%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border: 1px solid var(--gold-line); border-radius: 50%; font-family: var(--font-title); font-weight: 900; font-size: clamp(0.95rem, 5.2vw, 1.45rem); color: var(--gold); opacity: 0.82; box-shadow: inset 0 0 0 3px rgba(201, 169, 97, 0.07); }
.mcard:not(.open):not(.done):active .mback { filter: brightness(1.15); }
/* 자문 조성욱 카드 */
.mcard.jo .mfront { border: 2px solid var(--gold); box-shadow: 0 0 12px var(--gold-glow); }
.mcard.jo .mfront img { object-position: center 18%; }
.mcard.jo .mfront::after { content: '자문'; position: absolute; left: 0; right: 0; bottom: 0; padding: 1px 0 2px; background: rgba(8, 13, 23, 0.78); color: var(--gold); font-family: var(--font-ui); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.25em; text-align: center; }
/* 맞춘 카드: «일치» 도장 + 모서리 ✓ */
.mcard.just .mfront::before { content: '일치'; position: absolute; left: 50%; top: 50%; z-index: 2; padding: 1px 7px; border: 2px solid var(--gold); border-radius: 4px; background: rgba(8, 13, 23, 0.72); color: var(--gold); font-family: var(--font-title); font-weight: 900; font-size: clamp(0.72rem, 3.6vw, 1rem); letter-spacing: 0.1em; white-space: nowrap; animation: mStamp 0.95s var(--ease-out) forwards; pointer-events: none; }
.mcard.jo.just .mfront::before { content: '공개'; }
@keyframes mStamp { 0% { transform: translate(-50%, -50%) rotate(-12deg) scale(1.9); opacity: 0; } 22% { transform: translate(-50%, -50%) rotate(-12deg) scale(0.94); opacity: 1; } 78% { transform: translate(-50%, -50%) rotate(-12deg) scale(1); opacity: 1; } 100% { transform: translate(-50%, -50%) rotate(-12deg) scale(1); opacity: 0; } }
.mcard.done::after { content: '✓'; position: absolute; top: 3px; right: 5px; z-index: 3; font-size: 0.7rem; font-weight: 900; color: var(--gold); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9); pointer-events: none; }
.mcard.peek .mfront { box-shadow: 0 0 0 1px var(--gold-line); }
.mcard.wrong .mfront { box-shadow: inset 0 0 0 2px var(--red-bright); }
/* 비밀번호 칸 — 라운드를 넘길 때마다 몇 자리씩 찍힌다 */
.mem-code { display: flex; justify-content: center; gap: 5px; margin: -4px 0 8px; }
.mem-code .cd { width: 22px; height: 28px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--gold-line); border-radius: 4px; background: rgba(8, 13, 23, 0.55); color: var(--gold); font-family: var(--font-ui); font-weight: 800; font-size: 0.92rem; }
.mem-code .cd:not(.on)::after { content: '·'; color: var(--muted); }
.mem-code .cd.on { border-color: var(--gold); box-shadow: 0 0 10px var(--gold-glow); }
.mem-code.big { gap: 6px; margin: 14px 0 12px; }
.mem-code.big .cd { width: 34px; height: 46px; font-size: 1.45rem; border-radius: 6px; }
.mem-code .cd.stamp { animation: codeStamp 0.38s var(--ease-out); }
@keyframes codeStamp { 0% { transform: scale(1.8); opacity: 0; } 60% { transform: scale(0.92); opacity: 1; } 100% { transform: scale(1); } }
.mem-stars { font-size: 1.6rem; letter-spacing: 0.2em; margin: 0 0 6px; }
.mem-stars i { font-style: normal; color: rgba(255, 255, 255, 0.14); }
.mem-stars i.on { color: var(--gold); text-shadow: 0 0 14px var(--gold-glow); }
/* 판 머리: 맞춘 짝 ↔ 🔥 N연속 · 숫자 튕김 */
.memory-hud { align-items: center; }
.memory-hud b { color: var(--text); font-weight: 700; display: inline-block; margin-left: 4px; }
.memory-hud b.bad { color: var(--red-bright); }
#memPairsLabel { display: inline-block; }
#memPairsLabel.hot { color: var(--gold); font-weight: 800; }
#memPairsLabel.pop { animation: comboPop 0.4s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes comboPop { 0% { transform: scale(0.4); } 100% { transform: scale(1); } }
.bump { animation: hudBump 0.35s ease-out; }
@keyframes hudBump { 40% { transform: scale(1.3); color: var(--gold); } }
.memo-status.bump { display: block; }
/* 자문 조성욱 공개 띠 — 판 위에 떠서 카드를 가리지 않는다 */
.memory-wrap { position: relative; }
.mem-reveal { position: absolute; left: 50%; top: -6px; z-index: 6; transform: translate(-50%, -100%); display: flex; align-items: center; gap: 10px; width: max-content; max-width: 100%; padding: 7px 14px 7px 7px; background: linear-gradient(160deg, var(--surface), var(--bg-1)); border: 1px solid var(--gold); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 24px var(--gold-glow); color: var(--text); font-size: 0.8rem; line-height: 1.4; animation: memRevealIn 0.3s var(--ease-out); }
.mem-reveal[hidden] { display: none !important; }
.mem-reveal img { width: 40px; height: 40px; flex: none; border-radius: 50%; object-fit: cover; border: 1px solid var(--gold-line); }
.mem-reveal b { display: block; color: var(--gold); font-size: 0.7rem; letter-spacing: 0.08em; }
@keyframes memRevealIn { from { opacity: 0; transform: translate(-50%, -80%) scale(0.92); } to { opacity: 1; transform: translate(-50%, -100%) scale(1); } }
/* 맞추면 떠오르는 글자(«일치!» · «3연속!») */
.fx-pop { position: absolute; transform: translate(-50%, -50%); font-family: var(--font-title); font-weight: 900; font-size: 1.05rem; color: var(--gold); text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9), 0 0 16px var(--gold-glow); white-space: nowrap; animation: fxRise 0.95s var(--ease-out) forwards; }
@keyframes fxRise { 0% { transform: translate(-50%, -20%) scale(0.6); opacity: 0; } 25% { transform: translate(-50%, -60%) scale(1.1); opacity: 1; } 100% { transform: translate(-50%, -160%) scale(1); opacity: 0; } }

/* 메모 복원: 낮은 화면(360×640 등)에서 아래 단추가 잘렸다 */
.memo-status b { color: var(--gold); }
@media (max-height: 700px) {
    .memo-paper { padding: 12px 12px; gap: 5px; }
    .memo-piece { padding: 7px 12px 7px 16px; font-size: 0.98rem; }
}

/* 사건 재구성: 채운 사실(위로 쌓임) + 안내 한 줄 + 남은 사실(아래서 줄어듦) = 늘 한 화면 */
.tl-hud { align-items: center; gap: 10px; }
.tl-hud b { color: var(--gold); }
.tl-ticks { display: flex; gap: 4px; }
.tl-ticks i { width: 14px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.12); transition: background var(--dur); }
.tl-ticks i.on { background: var(--gold); box-shadow: 0 0 6px var(--gold-glow); }
.tl-slots { margin: 0 0 6px; gap: 4px; }
.tl-slots:empty { display: none; }
.tl-slots::before { left: 60px; }
.tl-slot.filled { min-height: 32px; padding: 5px 10px; font-size: 0.84rem; gap: 12px; }
.tl-next { margin: 0 0 8px; padding: 7px 10px; border: 1px dashed var(--gold-line); border-radius: var(--r-sm); color: var(--text-2); font-family: var(--font-ui); font-size: 0.8rem; text-align: center; }
.tl-next[hidden] { display: none; }
.tl-next.bad { color: var(--red-bright); border-color: rgba(196, 56, 72, 0.6); }
.tl-pool { gap: 6px; margin: 0; }
.tl-card { padding: 10px 12px; min-height: 44px; font-size: 0.9rem; line-height: 1.35; }
@media (max-height: 700px) {
    .tl-card { padding: 8px 12px; font-size: 0.86rem; }
    .tl-slot.filled { min-height: 28px; padding: 4px 10px; font-size: 0.8rem; }
}

/* 움직임 줄이기: 위 전역 규칙이 모든 애니메이션을 0.01초로 죽여 «모순!»·«복원 완료» 도장과 카드 뒤집기까지 안 보였다.
   헌법 §7 — 반복·흔들림·번쩍임만 끄고, 한 번짜리 연출은 시간을 줄여 남긴다. */
@media (prefers-reduced-motion: reduce) {
    .mcard .mface { transition-duration: 0.18s !important; }
    .mcard.just .mfront::before { animation-duration: 0.95s !important; }
    .mem-code .cd.stamp { animation-duration: 0.25s !important; }
    .mem-reveal { animation-duration: 0.2s !important; }
    #fxStamp.show { animation-duration: 1.05s !important; }
    #fxStamp.show .stamp-inner { animation-duration: 0.2s !important; }
    .tl-slot.filled { animation-duration: 0.2s !important; }
}
