:root {
  --paper: #efe4c4;
  --ink: #221d14;
  --gold: #e8c46a;
  --panel: rgba(18, 16, 12, 0.82);
  --line: rgba(232, 196, 106, 0.35);
  --ok: #6fbf73;
  --warn: #e3a33b;
  --fic: #8fa8ff;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0d0c0a; color: #f3ecd8;
  font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif; }
#app canvas { display: block; }
button { font: inherit; cursor: pointer; border-radius: 6px; border: 1px solid var(--line); background: rgba(255,255,255,0.06);
  color: inherit; padding: 10px 18px; }
button:hover, button:focus-visible { background: rgba(232,196,106,0.18); outline: none; }
button.primary { background: var(--gold); color: #1b160c; border-color: var(--gold); font-weight: 700; }
button.primary:hover, button.primary:focus-visible { filter: brightness(1.08); }

.screen { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 20;
  background: radial-gradient(ellipse at center, rgba(20,16,8,0.55), rgba(0,0,0,0.85)); padding: 16px; }
#title { display: flex; background: radial-gradient(ellipse at 50% 40%, #6b5a24 0%, #2a2410 45%, #0b0a07 100%); }
.title-card { max-width: 640px; width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 32px; box-shadow: 0 30px 80px rgba(0,0,0,0.6); }
.title-card.small { max-width: 360px; text-align: center; }
.title-card h1 { font-family: "Nanum Myeongjo", "Noto Serif KR", serif; font-size: clamp(36px, 7vw, 60px); margin: 6px 0 8px; color: var(--gold); letter-spacing: 0.02em; }
.kicker { font-size: 13px; letter-spacing: 0.12em; color: var(--gold); opacity: 0.85; }
.kicker.fail { color: #ff7b6b; }
.sub { font-size: 17px; line-height: 1.6; opacity: 0.9; }
.row { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 14px; }
.q { display: flex; gap: 10px; align-items: center; font-size: 14px; opacity: 0.85; }
.q select { background: #1d1a12; color: inherit; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }
.keys { font-size: 13px; opacity: 0.7; line-height: 1.6; }
.fine { font-size: 12px; opacity: 0.55; line-height: 1.5; margin-bottom: 0; }

#modal .card { max-width: 760px; width: 100%; max-height: 92vh; overflow: auto; background: var(--paper); color: var(--ink);
  border-radius: 10px; padding: 28px 30px; box-shadow: 0 30px 90px rgba(0,0,0,0.7); border: 1px solid #b89a5a; }
#modal .card .kicker { color: #8a6420; }
#modal .card .kicker.fail { color: #b23a2a; }
#modal h2 { font-family: "Nanum Myeongjo", "Noto Serif KR", serif; font-size: 28px; margin: 6px 0 10px; }
#modal h3 { margin: 22px 0 8px; font-size: 17px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#modal .lead { font-size: 18px; line-height: 1.7; }
#modal p, #modal li { line-height: 1.65; }
#modal .src, #modal .src-inline { font-size: 13px; color: #6b5a36; }
#modal .rules li { margin-bottom: 6px; }
#modal .keys { color: #4a3f2a; opacity: 1; }
#modal .btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
#modal button { border-color: #a8873e; color: var(--ink); background: rgba(0,0,0,0.04); }
#modal button.primary { background: #2b2416; color: var(--gold); border-color: #2b2416; }
#modal table.rec { width: 100%; border-collapse: collapse; font-size: 15px; margin: 6px 0 12px; }
#modal table.rec th, #modal table.rec td { border-bottom: 1px solid #cdb98a; padding: 8px 6px; text-align: left; vertical-align: top; }
#modal table.rec th { font-size: 13px; color: #6b5a36; }
#modal .muted { color: #7a6a48; font-size: 13px; }
#modal ul.fic { padding-left: 20px; font-size: 14.5px; }
#modal .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
#modal .stats div { background: rgba(0,0,0,0.05); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; }
#modal .stats b { font-size: 22px; }
#modal .stats span { font-size: 12.5px; color: #6b5a36; }

.badge { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: 999px; vertical-align: middle; margin-left: 6px; }
.badge.ok { background: rgba(111,191,115,0.2); color: #2f7a33; }
.badge.warn { background: rgba(227,163,59,0.22); color: #9a5f00; }
.badge.fic { background: rgba(143,168,255,0.22); color: #3550b0; }
#hud .badge.ok { color: var(--ok); } #hud .badge.warn { color: var(--warn); } #hud .badge.fic { color: var(--fic); }

#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; display: none; text-shadow: 0 1px 3px rgba(0,0,0,0.8); }
#objective { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); background: var(--panel); border: 1px solid var(--line);
  padding: 8px 16px; border-radius: 999px; font-size: 15px; max-width: calc(100% - 32px); text-align: center; }
#clock { position: absolute; top: 16px; right: 16px; font-family: "Noto Serif KR", serif; font-size: 26px; color: var(--gold);
  background: var(--panel); padding: 4px 12px; border-radius: 8px; border: 1px solid var(--line); display: none; }
#toasts { position: absolute; top: 64px; left: 16px; width: min(420px, calc(100% - 32px)); display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--panel); border-left: 3px solid var(--gold); padding: 10px 14px; border-radius: 6px; transition: opacity 1s, transform 1s;
  animation: tin 0.5s ease-out; }
.toast.out { opacity: 0; transform: translateX(-20px); }
@keyframes tin { from { opacity: 0; transform: translateX(-20px); } }
.t-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 15px; }
.t-clock { color: var(--gold); }
.t-body { font-size: 14.5px; line-height: 1.55; margin-top: 4px; }
.t-src { font-size: 12px; opacity: 0.7; margin-top: 4px; }
#crosshair { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transition: opacity 0.15s; --gap: 6px; }
#crosshair i { position: absolute; background: rgba(255,255,255,0.9); box-shadow: 0 0 2px #000; transition: transform 0.08s; }
#crosshair i:nth-child(1) { width: 2px; height: 9px; left: -1px; top: calc(-9px - var(--gap)); }
#crosshair i:nth-child(2) { width: 2px; height: 9px; left: -1px; top: var(--gap); }
#crosshair i:nth-child(3) { width: 9px; height: 2px; top: -1px; left: calc(-9px - var(--gap)); }
#crosshair i:nth-child(4) { width: 9px; height: 2px; top: -1px; left: var(--gap); }
#crosshair b { position: absolute; left: -2px; top: -2px; width: 4px; height: 4px; border-radius: 50%; background: #ff5a3c; box-shadow: 0 0 3px #000; display: none; }
#crosshair.adsdot i { display: none; }
#crosshair.adsdot b { display: block; }
#sight { position: absolute; inset: 0; opacity: 0; transition: opacity 0.12s; }
#sight svg { width: 100%; height: 100%; display: block; }
#zoomtag { position: absolute; left: 50%; top: calc(50% + 70px); transform: translateX(-50%); font-size: 14px; color: var(--gold);
  background: rgba(0,0,0,0.45); padding: 3px 10px; border-radius: 999px; display: none; }
#breath { position: absolute; left: 50%; bottom: 110px; transform: translateX(-50%); display: none; align-items: center; gap: 8px; font-size: 13px; }
#breath .bar { width: 140px; height: 6px; background: rgba(255,255,255,0.2); border-radius: 3px; overflow: hidden; }
#breathbar { height: 100%; background: #9fd0ff; transition: width 0.1s; }
#breath.holding #breathbar { background: #e8f4ff; }
#breath.locked #breathbar { background: #e07a5f; }
#hint { position: absolute; left: 50%; bottom: 150px; transform: translate(-50%, 10px); max-width: min(560px, calc(100% - 32px)); text-align: center;
  background: rgba(20,18,12,0.85); border: 1px solid var(--gold); color: #fff6dc; padding: 10px 16px; border-radius: 10px; font-size: 16px; line-height: 1.5;
  opacity: 0; transition: opacity 0.4s, transform 0.4s; }
#hint.on { opacity: 1; transform: translate(-50%, 0); }
#hint kbd { background: #f3e6c0; color: #1b160c; border-radius: 4px; padding: 0 6px; font-weight: 700; font-family: inherit; }
#rounds { display: flex; gap: 4px; margin-bottom: 4px; }
#rounds i { width: 9px; height: 26px; border-radius: 4px 4px 2px 2px; background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25); }
#rounds i.full { background: linear-gradient(#e8c46a 0 35%, #b8862e 35% 100%); border-color: #f0d68a; }
#ammo { font-size: 15px !important; }
.title-card.pause { max-width: 760px; }
.pause .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.pause h3 { margin: 6px 0 10px; color: var(--gold); font-size: 16px; }
.keys-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.keys-table td { padding: 5px 4px; border-bottom: 1px solid rgba(232,196,106,0.15); }
.keys-table td:first-child { color: var(--gold); white-space: nowrap; width: 42%; }
.set { display: flex; flex-direction: column; gap: 6px; font-size: 14px; margin-bottom: 14px; }
.set.chk { flex-direction: row; align-items: center; gap: 8px; }
.set select { background: #1d1a12; color: inherit; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }
.set input[type=range] { width: 100%; accent-color: var(--gold); }
#paused { background: rgba(0,0,0,0.6); }
@media (max-width: 720px) { .pause .cols { grid-template-columns: 1fr; } }
#hitmarker { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 26px; color: #fff; opacity: 0; }
#hitmarker.on { animation: hm 0.35s ease-out; }
@keyframes hm { 0% { opacity: 1; transform: translate(-50%,-50%) scale(1.3); } 100% { opacity: 0; transform: translate(-50%,-50%) scale(1); } }
#prompt { position: absolute; left: 50%; top: 60%; transform: translateX(-50%); background: var(--panel); padding: 8px 14px; border-radius: 6px;
  font-size: 15px; opacity: 0; transition: opacity 0.2s; }
#weapon { position: absolute; right: 20px; bottom: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; min-width: 170px; }
#ammo { font-size: 15px; font-weight: 700; color: var(--gold); }
.hp { height: 6px; background: rgba(255,255,255,0.15); border-radius: 3px; margin: 6px 0 4px; overflow: hidden; }
#hpbar { height: 100%; width: 100%; background: #e9dcb0; transition: width 0.3s; }
#stance { font-size: 12px; opacity: 0.75; }
#fps { position: absolute; left: 16px; bottom: 12px; font-size: 11px; opacity: 0.45; }
#damage { position: fixed; inset: 0; pointer-events: none; z-index: 11; opacity: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(60,40,20,0.75) 100%); }
#damage.on { animation: dmg 0.8s ease-out; }
@keyframes dmg { 0% { opacity: 1; } 100% { opacity: 0; } }
#fade { position: fixed; inset: 0; background: #fff8dc; opacity: 0; pointer-events: none; z-index: 30; transition: opacity 0.7s; }
#fade.on { opacity: 1; }
#paused { background: rgba(0,0,0,0.45); z-index: 15; }
@media (max-width: 640px) {
  .title-card { padding: 22px 18px; }
  #modal .card { padding: 20px 16px; }
  #modal .lead { font-size: 16px; }
  #clock { font-size: 18px; }
}

/* ---------- 터치 조작 ---------- */
#touch { position: fixed; inset: 0; z-index: 12; pointer-events: none; display: none; }
.t-stick { position: absolute; width: 120px; height: 120px; border-radius: 50%; display: none;
  background: rgba(255,255,255,0.08); border: 2px solid rgba(255,255,255,0.35); }
.t-knob { position: absolute; left: 35px; top: 35px; width: 50px; height: 50px; border-radius: 50%;
  background: rgba(232,196,106,0.55); border: 2px solid rgba(255,255,255,0.6); }
.t-btn { position: absolute; pointer-events: auto; display: none; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 50%; padding: 0; font-size: 14px; font-weight: 700; color: #fff;
  background: rgba(20,18,12,0.55); border: 2px solid rgba(255,255,255,0.45); touch-action: none; user-select: none; -webkit-user-select: none; }
.t-btn.on { background: rgba(232,196,106,0.75); color: #1b160c; border-color: var(--gold); }
.t-fire { right: 28px; bottom: 120px; width: 88px; height: 88px; font-size: 17px; background: rgba(140,40,30,0.6); }
.t-aim { right: 128px; bottom: 150px; }
.t-reload { right: 128px; bottom: 70px; }
.t-crouch { right: 36px; bottom: 222px; }
.t-use { right: 36px; bottom: 120px; width: 80px; height: 80px; font-size: 16px; }
body.touch-mode #weapon { bottom: auto; top: 64px; right: 16px; }
body.touch-mode #toasts { width: min(360px, calc(100% - 32px)); }
body.touch-mode, body.touch-mode canvas { touch-action: none; }
@media (max-width: 640px) {
  .t-fire { right: 18px; bottom: 100px; width: 76px; height: 76px; }
  .t-aim { right: 104px; bottom: 128px; } .t-reload { right: 104px; bottom: 56px; } .t-crouch { right: 24px; bottom: 190px; }
}

.t-zoom { right: 128px; bottom: 230px; width: 70px; border-radius: 35px; font-size: 13px; }
.t-breath { left: 50%; transform: translateX(-50%); bottom: 40px; width: 90px; height: 56px; border-radius: 28px; background: rgba(60,100,140,0.55); }
.t-breath.on { background: rgba(200,230,255,0.85); color: #10202c; }
body.touch-mode #breath { bottom: 110px; }

/* Controls remain reachable on landscape phones and inside safe areas. */
.t-pause { top: max(12px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); width: 82px; height: 44px; border-radius: 8px; }
body.touch-mode #clock { right: 112px; }
.title-card.pause { max-height: calc(100dvh - 32px); overflow-y: auto; touch-action: pan-y; }
#paused { touch-action: pan-y; }
#paused input, #paused select { touch-action: auto; }
@media (max-height: 500px) and (orientation: landscape) {
  .pause .cols { grid-template-columns: 1fr 1fr; }
  .t-fire { right: 18px; bottom: 28px; width: 72px; height: 72px; }
  .t-aim { right: 100px; bottom: 70px; width: 54px; height: 54px; }
  .t-reload { right: 100px; bottom: 10px; width: 54px; height: 54px; }
  .t-crouch { right: 24px; bottom: 112px; width: 54px; height: 54px; }
  .t-zoom { right: 100px; bottom: 134px; width: 54px; height: 48px; }
  .t-breath { bottom: 16px; width: 76px; height: 46px; }
  body.touch-mode #weapon { top: 12px; right: 112px; min-width: 110px; padding: 6px 10px; }
  body.touch-mode #rounds i { height: 15px; }
  body.touch-mode #stance { display: none; }
  body.touch-mode #clock { top: 48px; left: 16px; right: auto; font-size: 14px; }
  #toasts { top: 70px; max-width: 280px; }
  #hint { bottom: 78px; max-width: 42%; font-size: 12px; }
}

/* Restrained field-report HUD; gameplay keeps the centre of the view clear. */
#objective { border-left: 3px solid var(--gold); border-radius: 0; letter-spacing: .02em; }
#weapon { border-radius: 2px; border-width: 0 0 0 2px; background: linear-gradient(90deg,rgba(10,18,17,.85),rgba(10,18,17,.35)); }
#title { background: linear-gradient(90deg,rgba(5,12,11,.93),rgba(5,12,11,.35)), url('../assets/title-scene.jpg') center / cover, #182b27; justify-content: flex-start; padding: clamp(24px,6vw,90px); }
#title .title-card { max-width: 650px; background: transparent; border: 0; box-shadow: none; padding: 0; }
#title h1 { font-size: clamp(34px,5vw,64px); letter-spacing: -.06em; color: #f3eee0; line-height: 1.18; }
#title { overflow-y: auto; }
@media (max-height: 600px) { #title { align-items: flex-start; padding: 24px; } }
#title .kicker { letter-spacing: .25em; }
#title .sub { max-width: 470px; color: #ccd7cf; }
#title button { min-height: 48px; border-radius: 2px; }
#title .fine { border-top: 1px solid #ffffff25; padding-top: 18px; }

/* Cinematic digital interface — fictional HUD, historical text is unchanged. */
:root {
  --paper:#091725; --ink:#e5f6ff; --gold:#79e6ff;
  --panel:rgba(5,17,31,.93); --line:rgba(105,221,255,.38);
  --ok:#83ffd6; --warn:#ffcf83; --fic:#b6b4ff;
  --hud-font:"Pretendard","Noto Sans KR","Malgun Gothic",system-ui,sans-serif;
}
body { color:#e5f6ff; }
button, .q select, .set select { border-radius:3px; background:#10283d; border-color:var(--line); color:#ddf6ff; }
button { transition:background .18s,box-shadow .18s,border-color .18s; }
button:hover,button:focus-visible { background:#163e56; border-color:#a5efff; box-shadow:0 0 20px #4acfff28; }
button:focus-visible,select:focus-visible,input:focus-visible { outline:2px solid #c5f6ff; outline-offset:3px; }
button.primary,#modal button.primary { background:linear-gradient(110deg,#71efff,#70b9ff); border:1px solid #b6f7ff; color:#041c30; box-shadow:0 0 24px #39baff30; }
.screen,#paused { background:radial-gradient(ellipse at 50% 40%,#09355080,#020813ed); }
.title-card.pause,#modal .card {
  position:relative; border:1px solid var(--line); border-radius:4px;
  background:linear-gradient(120deg,#123b5140,transparent 45%),linear-gradient(160deg,#0c2034f5,#050f20fa);
  color:var(--ink); box-shadow:0 0 0 4px #56d4ff08,0 0 55px #26bbff18,0 30px 100px #000a;
  padding:30px 34px; scrollbar-width:thin; scrollbar-color:#3b7b99 #071425;
  animation:system-reveal .28s ease-out;
}
.title-card.pause::before,#modal .card::before {
  content:'SYSTEM  /  1920'; display:block; color:#8aebff; font:600 10px/1.4 var(--hud-font);
  letter-spacing:.28em; padding-bottom:13px; margin-bottom:16px; border-bottom:1px solid #77dfff38;
  background:linear-gradient(90deg,#7ae6ff,#7ae6ff) right top / 32px 2px no-repeat;
}
.title-card.pause::after,#modal .card::after {
  content:''; position:absolute; top:0; right:0; width:46px; height:46px;
  border-top:2px solid #a0f2ff; border-right:2px solid #a0f2ff; pointer-events:none;
  filter:drop-shadow(0 0 5px #50d4ff);
}
#modal h2,.pause h2 { font-family:var(--hud-font); font-size:clamp(25px,3vw,34px); font-weight:800; letter-spacing:-.045em; color:#f0fbff; text-shadow:0 0 22px #68dbff35; margin:8px 0 18px; }
#modal .card .kicker,.kicker { color:#87e6ff; font-weight:600; letter-spacing:.16em; }
#modal .card .kicker.fail { color:#ff96ac; }
#modal h3,.pause h3 { color:#a0ebff; }
#modal .src,#modal .src-inline,#modal .muted,#modal .stats span,#modal table.rec th,#modal .keys { color:#a7c1d2; }
#modal a { color:#92eaff; text-underline-offset:4px; }
#modal .lead { color:#e0f3ff; }
#modal button { background:#10283d; color:#e5f6ff; border-color:var(--line); }
#modal table.rec th,#modal table.rec td { border-bottom-color:#78cafa26; }
#modal table.rec th { background:#68caff0c; }
#modal .stats { gap:10px; }
#modal .stats div { background:linear-gradient(140deg,#17415880,#0b1a2c); border:1px solid #69d7ff30; border-radius:2px; padding:16px; }
#modal .stats b { color:#8becff; font-variant-numeric:tabular-nums; font-size:28px; }
.badge { border-radius:3px; border:1px solid currentColor; font-size:10px; letter-spacing:.03em; }
.badge.ok { color:var(--ok); background:#45ffbd12; }
.badge.warn { color:var(--warn); background:#ffb24c12; }
.badge.fic { color:var(--fic); background:#9690ff16; }
#objective,#clock,.toast,#weapon,#hint,#prompt,#zoomtag {
  border:1px solid var(--line); border-radius:3px;
  background:linear-gradient(110deg,#153d5260,transparent),var(--panel);
  box-shadow:inset 0 1px #c5f6ff16,0 6px 24px #0006,0 0 18px #21bfff0a;
  text-shadow:none; color:#e5f6ff;
}
#objective { top:20px; max-width:calc(100% - 300px); padding:11px 20px; border-left:3px solid #91ecff; font-size:14px; }
#clock { top:20px; right:20px; font-family:var(--hud-font); font-variant-numeric:tabular-nums; font-size:27px; letter-spacing:.06em; padding:8px 14px; color:#a4edff; }
#toasts { top:84px; left:20px; width:min(390px,calc(100% - 40px)); gap:12px; }
.toast { position:relative; padding:14px 17px 15px; border-left:2px solid #83e6ff; animation:system-reveal .28s ease-out; }
.toast::before { content:'SYSTEM MESSAGE'; display:block; font:600 9px/1.2 var(--hud-font); color:#80d8f4; letter-spacing:.2em; margin-bottom:10px; opacity:.85; }
.toast::after { content:''; position:absolute; right:-1px; top:-1px; width:22px; height:12px; border-top:2px solid #a5efff; border-right:2px solid #a5efff; pointer-events:none; }
.t-head { color:#edfbff; font-size:15px; }
.t-body { color:#c7deed; font-size:14px; line-height:1.65; }
.t-src { color:#9dbbce; opacity:1; font-size:11px; border-top:1px solid #69cfff20; padding-top:8px; margin-top:9px; }
#weapon { min-width:195px; right:20px; bottom:28px; padding:16px 18px; border-left:2px solid #9ceeff; }
#weapon::before { content:'COMBAT STATUS'; display:block; font-size:9px; letter-spacing:.2em; color:#80d8f4; margin-bottom:12px; }
#rounds { gap:6px; }
#rounds i { width:12px; height:26px; border-radius:1px; background:#6bbde917; border-color:#77c5ea30; }
#rounds i.full { background:linear-gradient(#befaff,#55bfe9); border-color:#b0f1ff; box-shadow:0 0 9px #71e1ff38; }
#ammo { color:#acf0ff; letter-spacing:.02em; }
.hp { border-radius:0; height:4px; background:#77c5ea20; margin-top:11px; }
#hpbar { box-shadow:0 0 9px #66e0ff70; }
#stance { color:#a5c4d6; opacity:1; margin-top:7px; }
#hint { color:#e5f6ff; border-color:#7cdcff80; font-size:14px; }
#hint kbd { color:#c8f5ff; background:#21465e; border:1px solid #7edcff50; border-radius:2px; }
#zoomtag,#prompt { color:#aeefff; border-radius:2px; }
.keys-table td { border-bottom-color:#70ceff1d; }
.keys-table td:first-child { color:#94e9ff; }
.set input { accent-color:#8deaff; }
#fade { background:#d6f6ff; }
.t-btn { background:#0a2138c9; border:1px solid #8bdefc88; color:#dff8ff; box-shadow:inset 0 0 15px #60cfff15; }
.t-btn.on { background:#74def0; color:#052039; }
.t-fire { border-color:#ffaaad; background:#53243cd9; }
.t-knob { background:#66d8ff66; border-color:#a6efff; }
#title h1 { font-family:var(--hud-font); font-weight:850; text-shadow:0 3px 24px #02121f; }
#title { background:linear-gradient(90deg,#020e1af2,#06213280),url('../assets/title-scene.jpg') center/cover,#07172b; }
#title .sub { color:#bcd9e9; }
#drag-guide { border:1px solid #72cefa30; background:#071b30eb!important; color:#a7d8eb!important; border-radius:2px; }
@keyframes system-reveal { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
@media (max-width:720px) {
  #objective { left:16px; transform:none; max-width:calc(100% - 150px); font-size:12px; padding:8px 10px; }
  #clock { right:16px; font-size:20px; }
  #toasts { left:16px; width:min(350px,calc(100% - 32px)); }
  .title-card.pause,#modal .card { padding:22px 18px; }
  body.touch-mode #objective { max-width:calc(100% - 245px); }
  body.touch-mode #toasts { width:calc(100% - 215px); min-width:160px; }
  .toast { padding:10px 12px; }
  .t-body { font-size:12px; }
  .t-src { font-size:10px; }
}
@media (max-width:480px) {
  body.touch-mode #objective { max-width:calc(100% - 115px); }
  body.touch-mode #clock { top:66px; left:16px; right:auto; font-size:17px; }
  body.touch-mode #toasts { top:118px; width:calc(100% - 32px); }
  body.touch-mode #weapon { top:66px; right:16px; min-width:154px; padding:10px; }
  body.touch-mode #weapon::before { display:none; }
}
@media (max-height:500px) and (orientation:landscape) {
  #objective { top:12px; max-width:calc(100% - 335px); left:16px; transform:none; }
  #toasts { top:82px; max-width:260px; }
  .toast::before { display:none; }
  .toast { padding:8px 11px; }
  #weapon::before { display:none; }
  body.touch-mode #weapon { min-width:110px; padding:6px 10px; }
  body.touch-mode #objective { max-width:calc(100% - 335px); }
  #modal .card,.title-card.pause { padding:16px 22px; }
}
@media (prefers-reduced-motion:reduce) {
  .toast,#modal .card,.title-card.pause { animation:none; }
  button,.toast,#hint { transition:none; }
}

/* Reference refinement: translucent projected light with traditional lattice corners. */
:root { --panel:rgba(3,34,48,.64); --line:rgba(124,234,246,.42); }
.screen,#paused { background:radial-gradient(ellipse at center,rgba(2,19,28,.16),rgba(0,10,20,.6)); }
.title-card.pause,#modal .card {
  border:0; border-top:1px solid #93eaf785; border-bottom:1px solid #93eaf785; border-radius:0;
  background:linear-gradient(90deg,rgba(3,34,46,.2),rgba(2,36,50,.66) 18%,rgba(2,36,50,.66) 82%,rgba(3,34,46,.2));
  box-shadow:0 -7px 24px -20px #adf5ff,0 7px 24px -20px #adf5ff,inset 0 0 65px #3bc7e20a;
  backdrop-filter:blur(3px); -webkit-backdrop-filter:blur(3px);
  text-shadow:0 1px 4px #00151f,0 0 10px #39c8ed25;
}
.title-card.pause::before,#modal .card::before {
  content:'1920  ·  봉오동 기록'; text-align:center; color:#96e8ef;
  letter-spacing:.24em; font-size:10px; background:none;
  border-bottom:1px solid #8feaff26; margin:0 18px 18px; padding-bottom:15px;
}
.title-card.pause::after,#modal .card::after {
  inset:8px; width:auto; height:auto; border:0; opacity:.75;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M2 46V2H46M9 37V9H37V30H20V18H29' fill='none' stroke='%239debf0' stroke-width='1'/%3E%3Cpath d='M2 13H13V2M2 25H9M25 2V9' fill='none' stroke='%23d7bf8b' stroke-width='.7'/%3E%3C/svg%3E") left top/40px 40px no-repeat,
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cg transform='rotate(180 24 24)'%3E%3Cpath d='M2 46V2H46M9 37V9H37V30H20V18H29' fill='none' stroke='%239debf0' stroke-width='1'/%3E%3Cpath d='M2 13H13V2M2 25H9M25 2V9' fill='none' stroke='%23d7bf8b' stroke-width='.7'/%3E%3C/g%3E%3C/svg%3E") right bottom/40px 40px no-repeat;
  filter:drop-shadow(0 0 4px #50d4ff65);
}
#modal h2,.pause h2 { text-align:center; color:#b9f6ff; font-weight:650; letter-spacing:.08em; text-shadow:0 0 14px #65e4ff55,0 2px 6px #001018; }
#modal .card .kicker { text-align:center; font-size:11px; letter-spacing:.18em; }
#modal .lead { text-align:center; font-weight:500; font-size:17px; }
#modal .rules { list-style:none; padding:0; }
#modal .rules li { padding:11px 12px; margin:0; border-top:1px solid #93eaf730; background:linear-gradient(90deg,transparent,#55cfe20c,transparent); }
#modal .rules li:last-child { border-bottom:1px solid #93eaf730; }
#modal .btns { justify-content:center; gap:12px; }
button.primary,#modal button.primary {
  background:linear-gradient(90deg,#0c637429,#38bad94f,#0c637429); color:#d0faff;
  border:1px solid #91e8f28a; border-left:0; border-right:0;
  box-shadow:0 0 16px #4ce5ff17,inset 0 0 15px #4ce5ff12;
  text-shadow:0 0 8px #8befff55;
}
button.primary:hover,#modal button.primary:hover { background:#2e93ac73; box-shadow:0 0 24px #4ce5ff35; }
#objective,#clock,.toast,#weapon,#hint,#prompt,#zoomtag {
  background:linear-gradient(90deg,#022333b8,#073c4fa3,#022333a6);
  border:0; border-top:1px solid #8be9f372; border-bottom:1px solid #8be9f349; border-radius:0;
  box-shadow:0 0 20px #3adfff0c; text-shadow:0 1px 4px #00131d;
}
.toast { border-left:1px solid #89e8f36e; }
.toast::before { content:'알림  /  기록 수신'; color:#9aebf4; text-align:center; font-size:10px; letter-spacing:.14em; }
.toast::after { right:6px; top:6px; width:18px; height:18px; border-top:1px solid #9aeaf1; border-right:1px solid #9aeaf1; box-shadow:3px -3px 0 -2px #d7bf8b; }
.t-head { color:#baf8ff; text-shadow:0 0 9px #5ae9ff45; }
.t-body { color:#e0f4fb; }
#weapon::before { content:'전투 상태  /  1920'; color:#9aebf4; }
#clock { color:#b7f5ff; font-weight:400; text-shadow:0 0 12px #66e7ff60; }
#modal .stats div { background:#0f647125; border-width:1px 0; }
#modal .stats b { text-shadow:0 0 12px #66e7ff50; }
@media (max-width:720px) {
  .title-card.pause,#modal .card { backdrop-filter:none; -webkit-backdrop-filter:none; background:rgba(2,30,43,.88); }
  #modal .lead { font-size:16px; }
}
@media (prefers-reduced-transparency:reduce) {
  .title-card.pause,#modal .card,.toast,#weapon { background:#092434; backdrop-filter:none; }
}
