/* 오른쪽 화면 — 기억 재생기 (브레인댄스 편집 방식 참고) */
:root { --bg: #0a0f12; --pn: #111a1f; --line: #26353d; --ink: #e8f3f2; --dim: #8fa5ab; --teal: #3cc4c0; --amber: #ffb547; --warn: #f0b429; --bad: #ff7a6e; --vio: #a594ff; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: #000; color: var(--ink); font-family: "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif; overflow: hidden; user-select: none; }
body.offline::after { content: "서버 연결 끊김 — 다시 연결 중"; position: fixed; inset: auto 0 0 0; background: #c0392b; color: #fff; text-align: center; padding: 8px; font-weight: 700; z-index: 50; }
.tbd { display: inline-block; border: 2px dashed #8a6d1c; color: #ffd36b; background: rgba(240,180,41,.07); border-radius: 6px; padding: 0 .4em; font-size: .8em; font-weight: 400; }
.scr { position: fixed; inset: 0; }

/* 대기 */
.idle { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: radial-gradient(circle at 50% 45%, #10191c, #050708 70%); }
.idle b { font-size: 54px; letter-spacing: .06em; } .idle span { font-size: 24px; color: var(--dim); }

/* 브리핑 */
.brief { background: radial-gradient(circle at 28% 30%, #13252a, #050708 72%); display: grid; grid-template-columns: .9fr 1.1fr; gap: 4vw; padding: 8vh 5vw 10vh; }
.brief .tag { display: inline-block; font: 700 17px Consolas, monospace; color: var(--bad); letter-spacing: .2em; border: 2px solid var(--bad); padding: 4px 14px; margin-bottom: 26px; }
.brief .head p { font-size: 48px; font-weight: 800; line-height: 1.35; margin: 0; }
.brief .crew { display: flex; gap: 14px; margin-top: 44px; flex-wrap: wrap; }
.brief .crew div { width: 104px; text-align: center; font-size: 17px; }
.brief .crew svg { width: 104px; height: 120px; display: block; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; }
.brief .crew small { display: block; color: var(--dim); font-size: 13px; }
.brief ol { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 18px; font-size: 27px; line-height: 1.5; }
.brief .dev { margin-top: 30px; font-size: 22px; color: var(--dim); line-height: 1.6; border-left: 4px solid var(--teal); padding-left: 16px; }
.brief .keys { position: absolute; left: 5vw; right: 5vw; bottom: 4vh; font-size: 18px; color: var(--dim); border-top: 1px solid var(--line); padding-top: 12px; }
.brief .bar { position: absolute; left: 0; bottom: 0; height: 5px; background: var(--teal); width: 0; }
.brief { grid-template-rows: auto 1fr; align-content: start; }
.brief .sus { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-self: end; margin-bottom: 40px; }
.brief .sus .note { grid-column: 1 / -1; font-size: 20px; color: var(--amber); }
.card { background: rgba(13,20,24,.85); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; }
.card b { font-size: 28px; } .card i { font-style: normal; font-size: 17px; color: var(--dim); margin-left: 10px; }
.card q { display: block; margin-top: 8px; font-size: 18px; line-height: 1.5; color: #cfdcdc; quotes: "“" "”"; }

/* 재생기 */
.player { background: var(--bg); display: flex; flex-direction: column; }
.hd { display: flex; align-items: center; gap: 18px; height: 64px; padding: 0 26px; border-bottom: 1px solid var(--line); background: #0d1519; flex: none; }
.hd b { font-size: 26px; } .hd #pTitle { font-size: 22px; color: var(--dim); } .hd .sp { flex: 1; }
.hd .cnt { font-size: 22px; color: var(--dim); } .hd .cnt em { font-style: normal; color: var(--teal); font-weight: 800; }
.hd .tm { font: 700 30px Consolas, monospace; }
.body { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 360px; grid-template-rows: 1fr auto; gap: 14px; padding: 14px 18px 16px; }
.view { position: relative; border-radius: 10px; overflow: hidden; background: #000; cursor: crosshair; min-height: 0; }
.view canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.view .noise { position: absolute; inset: -40px; opacity: .3; mix-blend-mode: screen; pointer-events: none; background-size: 256px 256px; }
.view .scan { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 3px); pointer-events: none; }
.view .vig { position: absolute; inset: 0; box-shadow: inset 0 0 160px 70px #000; pointer-events: none; }
.view .rec { position: absolute; left: 18px; top: 14px; font: 700 18px Consolas, monospace; color: #ff8b7e; text-shadow: 0 1px 2px #000; }
.view .rec i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: #ff5b4e; margin-right: 8px; vertical-align: 1px; }
.view .rec.pause i { background: #8fa5ab; } .view .rec.pause { color: #cfdcdc; }
.view .ret { position: absolute; width: 96px; height: 96px; transform: translate(-50%,-50%); border: 3px solid var(--amber); border-radius: 6px; pointer-events: none; box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 0 18px rgba(255,181,71,.35); }
.view .ret::before, .view .ret::after { content: ""; position: absolute; background: var(--amber); }
.view .ret::before { left: 50%; top: -16px; width: 3px; height: 12px; margin-left: -1.5px; } .view .ret::after { top: 50%; left: -16px; height: 3px; width: 12px; margin-top: -1.5px; }
.view .anal { position: absolute; left: 50%; bottom: 90px; transform: translateX(-50%); width: 280px; font: 700 18px Consolas, monospace; color: var(--amber); text-align: center; text-shadow: 0 1px 2px #000; }
.view .anal i { display: block; height: 8px; background: #3a2a10; margin-top: 6px; border-radius: 4px; overflow: hidden; } .view .anal i b { display: block; height: 100%; width: 0; background: var(--amber); }
.view .anal.on i b { animation: an .6s linear forwards; } @keyframes an { to { width: 100%; } }
.view .sub { position: absolute; left: 10%; right: 10%; bottom: 28px; text-align: center; font-size: 30px; font-weight: 700; text-shadow: 0 2px 4px #000, 0 0 2px #000; }
.view .flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.view .flash.on { animation: fl .35s ease-out; } @keyframes fl { 0% { opacity: .55; } 100% { opacity: 0; } }
.view .audio { position: absolute; inset: 0; background: rgba(0,10,8,.82); display: flex; align-items: center; justify-content: center; gap: 8px; pointer-events: none; }
.view .audio i { width: 12px; height: 30px; border-radius: 6px; background: #3fdc8f; opacity: .85; }
.view .audio span { position: absolute; top: 14px; right: 20px; font: 700 18px Consolas, monospace; color: #3fdc8f; }
.view .audio.live i { animation: wv .9s ease-in-out infinite alternate; }
.view .audio i:nth-child(3n) { animation-delay: -.3s; } .view .audio i:nth-child(3n+1) { animation-delay: -.6s; } .view .audio i:nth-child(4n) { animation-duration: .7s; }
@keyframes wv { from { height: 14px; } to { height: 120px; } }

.side { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.side h4 { margin: 4px 0 0; font-size: 19px; color: var(--teal); display: flex; justify-content: space-between; } .side h4 span { color: var(--dim); font-weight: 400; font-size: 16px; }
.clips { display: flex; flex-direction: column; gap: 6px; }
.clips button { text-align: left; font: inherit; font-size: 17px; color: var(--ink); background: #0d1418; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; cursor: pointer; }
.clips button b { font-family: Consolas, monospace; color: var(--teal); margin-right: 8px; }
.clips button.on { border-color: var(--teal); background: #0f2629; }
.clips button.new { border-color: var(--vio); }
.caps { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.cp { display: grid; grid-template-columns: 112px 1fr; gap: 10px; align-items: center; background: #0d1418; border: 1px solid var(--line); border-radius: 8px; padding: 6px; font-size: 15px; cursor: pointer; }
.cp img, .cp .ph0 { width: 112px; height: 63px; object-fit: cover; border-radius: 4px; background: #1a2329; display: block; }
.cp b { display: block; font-family: Consolas, monospace; color: var(--teal); font-size: 15px; }
.cp small { color: var(--dim); }
.cp.miss { opacity: .55; } .cp.miss b { color: var(--dim); } .cp.dup b { color: var(--dim); }
.cp.clue { border-color: #2c6b6e; }
.req { font: inherit; font-size: 22px; font-weight: 800; height: 62px; border-radius: 10px; border: 1px solid #2c6b6e; background: #173438; color: #bff; cursor: pointer; }
.req:disabled { opacity: .4; cursor: default; }
.req.go { background: #1f8a86; color: #fff; animation: pu 1.6s ease-in-out infinite; } @keyframes pu { 50% { box-shadow: 0 0 0 6px rgba(60,196,192,.25); } }

.tl { grid-column: 1 / -1; background: #0d1418; border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; display: grid; grid-template-columns: auto 1fr auto; gap: 8px 18px; align-items: center; }
.ctl { display: flex; gap: 8px; }
.ctl button { min-width: 50px; height: 46px; border-radius: 7px; background: #173438; border: 1px solid #2c6b6e; color: #bff; font: 700 18px "Malgun Gothic", sans-serif; cursor: pointer; padding: 0 10px; }
.ctl .big { min-width: 64px; background: #1f5a5d; } .ctl .lay { font-size: 15px; } .ctl .lay.a { background: #123a28; border-color: #3fdc8f; color: #aef5cd; } .ctl .rate { font: 700 16px Consolas, monospace; }
.track { position: relative; height: 52px; cursor: pointer; }
.track .lane { position: absolute; left: 44px; right: 0; height: 16px; border-radius: 4px; background: #172126; }
.track .lane.v { top: 6px; } .track .lane.a { top: 30px; }
.track .lb { position: absolute; left: 0; top: 4px; font-size: 13px; color: var(--dim); } .track .lb.a { top: 28px; }
.track .seg { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: repeating-linear-gradient(135deg, rgba(255,181,71,.6) 0 5px, rgba(255,181,71,.15) 5px 10px); }
.track .seg.got { background: var(--teal); }
.track .mk { position: absolute; top: -3px; bottom: -3px; width: 2px; background: rgba(255,255,255,.35); }
.track .ph { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1px; background: #fff; box-shadow: 0 0 6px #fff; pointer-events: none; }
.shot { grid-column: 3; grid-row: 1 / 3; align-self: stretch; min-width: 130px; border-radius: 10px; background: #5a3a0c; border: 2px solid var(--amber); color: #ffd59a; font: 800 24px "Malgun Gothic", sans-serif; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; }
.shot small { font-weight: 400; font-size: 14px; color: #e9c48a; } .shot:active { background: #7a520f; }
.info { grid-column: 1 / 3; display: flex; gap: 22px; align-items: baseline; font-size: 15px; color: var(--dim); }
.info .tc { font: 700 22px Consolas, monospace; color: var(--ink); } .info .tc small { color: var(--dim); font-size: 15px; }

.wait { position: fixed; inset: 0; background: rgba(4,8,10,.88); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; z-index: 20; }
.wait b { font-size: 64px; color: #7fe0e1; } .wait span { font-size: 28px; color: var(--dim); }
.big-cap { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 25; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; cursor: pointer; }
.big-cap img { max-width: 86vw; max-height: 78vh; border: 2px solid var(--line); } .big-cap span { font-size: 24px; color: var(--dim); }

/* 엔딩 → 치직 */
.ending { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: radial-gradient(circle at 50% 45%, #13252a, #050708 72%); text-align: center; z-index: 30; overflow: hidden; }
.ending b { font-size: 96px; letter-spacing: .08em; } .ending .el { font-size: 30px; color: var(--dim); line-height: 1.6; }
.ending .gl, .ending .bars, .ending .slice { display: none; }
.ending.glitch { background: radial-gradient(circle at 50% 45%, #2a1413, #050708 72%); animation: shake .18s steps(2) infinite; }
.ending.glitch b { color: #fff; text-shadow: -5px 0 #ff2a55, 5px 0 #00e5ff; animation: gx .4s steps(3) infinite; }
.ending.glitch .gl { display: block; font-size: 34px; color: #ff9d94; font-weight: 700; line-height: 1.6; text-shadow: -2px 0 #ff2a55, 2px 0 #00e5ff; }
.ending.glitch .bars { display: block; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 22px, rgba(255,255,255,.08) 22px 25px, transparent 25px 61px, rgba(255,40,80,.14) 61px 63px); mix-blend-mode: screen; animation: by .3s steps(4) infinite; }
.ending.glitch .slice { display: block; position: absolute; left: 0; right: 0; height: 26px; background: rgba(0,229,255,.2); animation: sl .7s steps(5) infinite; }
@keyframes gx { 0% { transform: none; } 33% { transform: translateX(-8px) skewX(-8deg); } 66% { transform: translateX(6px); } }
@keyframes shake { 0% { transform: none; } 50% { transform: translate(3px, -2px); } }
@keyframes by { to { background-position: 0 63px; } }
@keyframes sl { 0% { top: 20%; } 20% { top: 61%; } 40% { top: 35%; } 60% { top: 80%; } 80% { top: 48%; } }
.frozen { background: #000; display: flex; align-items: center; justify-content: center; }
.frozen span { font: 700 28px Consolas, monospace; color: #333; letter-spacing: .3em; }

.toast { position: fixed; left: 50%; top: 92px; transform: translateX(-50%); background: rgba(15,139,141,.95); color: #fff; font-size: 26px; font-weight: 800; padding: 12px 28px; border-radius: 8px; opacity: 0; pointer-events: none; z-index: 40; white-space: nowrap; }
.toast.bad { background: rgba(120,40,34,.95); } .toast.dim { background: rgba(40,52,58,.95); }
.toast.on { animation: tt 2.4s ease-out forwards; }
@keyframes tt { 0% { opacity: 0; transform: translate(-50%, -8px); } 8%, 80% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }

/* 진범 지목 */
.acc { position: fixed; inset: 0; background: rgba(3,6,8,.9); z-index: 22; display: flex; align-items: center; justify-content: center; }
.acc .box { width: min(1500px, 92vw); max-height: 92vh; overflow: auto; background: #0d1519; border: 1px solid #2c6b6e; border-radius: 14px; padding: 26px 32px; display: flex; flex-direction: column; gap: 14px; }
.acc h3 { margin: 0; font-size: 36px; display: flex; align-items: baseline; gap: 18px; } .acc h3 small { font-size: 19px; color: var(--dim); font-weight: 400; }
.acc h4 { margin: 6px 0 0; font-size: 20px; color: var(--teal); } .acc h4 span { color: var(--dim); font-weight: 400; margin-left: 8px; }
.acc .who { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.acc .who .card { cursor: pointer; border-width: 2px; } .acc .who .card:hover { border-color: #3d7f83; }
.acc .who .card.on { border-color: var(--amber); background: #2a1f0c; box-shadow: 0 0 0 3px rgba(255,181,71,.25); }
.acc .evi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.acc .evi div { position: relative; background: #111a1f; border: 2px solid var(--line); border-radius: 8px; padding: 6px; cursor: pointer; font-size: 15px; }
.acc .evi img, .acc .evi .ph0 { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 4px; background: #1a2329; margin-bottom: 5px; }
.acc .evi b { font-family: Consolas, monospace; color: var(--teal); margin-right: 6px; }
.acc .evi div.on { border-color: var(--amber); background: #2a1f0c; }
.acc .evi div.on::after { content: "근거"; position: absolute; top: 10px; right: 10px; background: var(--amber); color: #000; font-weight: 800; font-size: 14px; padding: 2px 8px; border-radius: 4px; }
.acc .msg { min-height: 30px; font-size: 24px; font-weight: 800; color: var(--bad); text-align: center; }
.acc .row { display: flex; justify-content: flex-end; gap: 12px; }
.acc .row button { font: inherit; font-size: 22px; font-weight: 800; height: 58px; padding: 0 28px; border-radius: 10px; border: 1px solid #2c6b6e; background: #173438; color: #bff; cursor: pointer; }
.acc .row button small { font-weight: 400; font-size: 15px; color: var(--dim); }
.acc .row .go { background: #8a3a12; border-color: var(--amber); color: #fff; } .acc .row .go:disabled { opacity: .4; cursor: default; }
