/* ============================================================================
   현대판 발할라 — UI 스타일
   ========================================================================== */
:root {
  --a: #4aa3ff; --b: #ff5b4a; --n: #c9cdd2; --party: #58e07a;
  --panel: rgba(14, 17, 20, 0.82); --line: rgba(255, 255, 255, 0.14); --txt: #e9ecef; --dim: #9aa3ab; --acc: #f2c14e;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0b0d0f; color: var(--txt);
  font-family: "Pretendard", "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif; user-select: none; -webkit-user-select: none; }
canvas#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }
b, .num { font-variant-numeric: tabular-nums; }

/* ---------- 오버레이 / 패널 ---------- */
.overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 30;
  background: radial-gradient(ellipse at center, rgba(8, 10, 12, 0.55), rgba(4, 5, 6, 0.86)); }
#spawn.overlay, #supply.overlay { background: rgba(6, 8, 10, 0.55); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 26px 30px; width: min(440px, 92vw);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); max-height: 94vh; overflow: auto; }
/* (패널 뒤 흐림 효과는 쓰지 않는다: 패널이 떠 있는 동안 뒤에서 도는 게임 화면을 매 프레임 다시 흐려야 해서 내장 그래픽에서 프레임이 떨어진다) */
.panel.wide { width: min(1120px, 96vw); }
.panel h1 { margin: 0 0 4px; font-size: 30px; letter-spacing: 2px; }
.panel h2 { margin: 0 0 14px; font-size: 20px; letter-spacing: 1px; }
.panel h3 { margin: 16px 0 8px; font-size: 13px; color: var(--dim); font-weight: 600; letter-spacing: 0.5px; }
.panel .sub { margin: 0 0 20px; color: var(--dim); font-size: 13px; }
.panel label { display: block; margin: 12px 0; font-size: 13px; color: var(--dim); }
.panel input[type=text], .panel input:not([type]), .panel select { display: block; width: 100%; margin-top: 5px; padding: 10px 12px; font: inherit; font-size: 15px;
  color: var(--txt); background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); border-radius: 4px; outline: none; user-select: text; -webkit-user-select: text; }
.panel input:focus, .panel select:focus { border-color: var(--acc); }
.panel select option { background: #1a1e22; }
.panel input[type=range] { width: 100%; margin-top: 6px; accent-color: var(--acc); }
button { font: inherit; color: var(--txt); background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line); border-radius: 4px; padding: 9px 14px; cursor: pointer; }
button:hover:not(:disabled) { background: rgba(255, 255, 255, 0.16); }
button:disabled { opacity: 0.4; cursor: default; }
button.big { display: block; width: 100%; margin-top: 16px; padding: 13px; font-size: 17px; font-weight: 700; letter-spacing: 3px; color: #16181a; background: var(--acc); border: 0; }
button.big:hover:not(:disabled) { background: #ffd674; }
.err { color: #ff8a7a; font-size: 13px; min-height: 18px; margin-top: 10px; }
.hint { color: var(--dim); font-size: 12px; margin-top: 10px; line-height: 1.5; }
.row { display: flex; gap: 22px; align-items: flex-start; }
.col { flex: 1; min-width: 0; }
.keys { margin-top: 18px; display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 4px 10px; font-size: 12px; color: var(--dim); }
.keys kbd { font: inherit; font-size: 11px; color: var(--txt); background: rgba(255, 255, 255, 0.1); border: 1px solid var(--line); border-radius: 3px; padding: 1px 6px; white-space: nowrap; text-align: center; }
.pbtns { display: flex; gap: 8px; margin-top: 8px; }
.pbtns button { flex: 1; min-width: 0; padding: 9px 8px; font-size: 13px; }
.settings { margin-top: 14px; }
.settings label.chk { cursor: pointer; line-height: 1.5; }
.settings label.chk input { accent-color: var(--acc); vertical-align: -2px; margin-right: 4px; }
.settings label.chk span { display: block; font-size: 12px; opacity: 0.8; }

/* ---------- 총기 카드 ---------- */
.guns { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.guns button { padding: 17px 4px 9px; font-size: 13px; position: relative; }
.guns button.on { border-color: var(--acc); background: rgba(242, 193, 78, 0.18); }
.guns button .slot { position: absolute; top: 2px; left: 5px; font-size: 10px; color: var(--acc); }
.guns button small { display: block; color: var(--dim); font-size: 10px; margin-top: 3px; }
#spawnmap { background: #14181b; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; max-width: 62%; height: auto; }
#spawnlist { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 8px; }
#spawnlist button.on { border-color: var(--acc); background: rgba(242, 193, 78, 0.18); }
#spawninfo { font-size: 15px; min-height: 44px; line-height: 1.45; }
#spawninfo b { color: var(--acc); font-size: 22px; }
#prodlist { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
#prodlist button { text-align: left; padding: 9px 11px; }
#prodlist button b { float: right; color: var(--acc); }
#prodlist button small { display: block; color: var(--dim); font-size: 11px; margin-top: 2px; }
#supplyres { color: var(--acc); margin-left: 8px; }
#takemg { width: 100%; }
/* 재배치 대기 화면의 광고 칸 (ads.js): 패널 맨 아래, 배치 버튼에서 24px 넘게 떨어진 자리. 겹쳐 띄우지 않으므로 지도·버튼을 가리지 않는다.
   링크 버튼은 배치 버튼(금색)과 헷갈리지 않게 수수한 모양으로 둔다 */
.adslot { display: flex; align-items: center; gap: 14px; margin-top: 24px; padding: 12px 16px; min-height: 62px; word-break: keep-all; overflow-wrap: break-word;
  background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line); border-radius: 5px; }
.adslot .adtag { flex: none; padding: 2px 7px; font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--dim); border: 1px solid var(--line); border-radius: 3px; }
.adslot .adbody { flex: 1; min-width: 0; line-height: 1.5; }
.adslot .adtitle { display: block; font-size: 14px; }
.adslot .adtext { display: block; font-size: 13px; color: var(--dim); }
.adslot .adcta { flex: none; max-width: 40%; padding: 7px 12px; font-size: 13px; text-align: center; color: var(--txt); text-decoration: none; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); border-radius: 4px; }
.adslot .adcta:hover { background: rgba(255, 255, 255, 0.14); }
#loading .lbar { position: relative; height: 3px; margin-top: 14px; overflow: hidden; background: rgba(255, 255, 255, 0.1); border-radius: 2px; }
#loading .lbar i { position: absolute; top: 0; bottom: 0; left: 0; width: 35%; background: var(--acc); animation: lbar 1.3s ease-in-out infinite; }
@keyframes lbar { from { transform: translateX(-100%); } to { transform: translateX(290%); } }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9); }
#vignette { position: absolute; inset: 0; opacity: 0; will-change: opacity; background: radial-gradient(ellipse at center, rgba(150, 0, 0, 0) 45%, rgba(170, 0, 0, 0.75) 100%); }
#flashbang { position: absolute; inset: 0; background: #fff; opacity: 0; will-change: opacity; }
#top { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; }
.res { display: flex; align-items: baseline; gap: 6px; padding: 5px 12px; background: rgba(10, 12, 14, 0.6); border-radius: 4px; font-size: 12px; border-bottom: 2px solid; }
.res.t0 { border-color: var(--a); } .res.t1 { border-color: var(--b); }
.res.t0 span { color: var(--a); font-weight: 700; } .res.t1 span { color: var(--b); font-weight: 700; }
.res b { font-size: 17px; } .res small { color: var(--dim); } .res em { font-style: normal; color: var(--dim); font-size: 11px; }
#pts { display: flex; gap: 5px; }
.pt { position: relative; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px;
  background: rgba(10, 12, 14, 0.7); border: 2px solid var(--n); border-radius: 4px; overflow: hidden; }
.pt.base { width: 38px; font-size: 10px; }
.pt i { position: absolute; left: 0; bottom: 0; height: 100%; width: 0; opacity: 0.55; z-index: 0; }
.pt span { position: relative; z-index: 1; }
.pt.o0 { border-color: var(--a); } .pt.o1 { border-color: var(--b); }
.pt.cont { animation: blink 0.7s infinite; } .pt.here { box-shadow: 0 0 0 2px #fff; }
@keyframes blink { 50% { filter: brightness(1.8); } }

#minimap { position: absolute; left: 14px; top: 14px; width: 230px; height: 230px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.25); background: rgba(10, 12, 14, 0.6); }
#killfeed { position: absolute; right: 14px; top: 14px; text-align: right; font-size: 13px; line-height: 1.7; }
#killfeed div { background: rgba(10, 12, 14, 0.5); padding: 1px 8px; border-radius: 3px; margin-bottom: 3px; display: inline-block; clear: both; float: right; }
#killfeed .w { color: var(--dim); margin: 0 6px; font-size: 11px; }
.c0 { color: var(--a); } .c1 { color: var(--b); } .cme { color: var(--acc); font-weight: 700; } .cp { color: var(--party); }
#msgs { position: absolute; top: 64px; left: 50%; transform: translateX(-50%); text-align: center; font-size: 15px; }
#msgs div { background: rgba(10, 12, 14, 0.6); padding: 5px 16px; border-radius: 3px; margin-bottom: 4px; animation: pop 0.2s; }
#msgs .bad { color: #ff9a8c; } #msgs .good { color: #9be7a8; } #msgs .big { font-size: 20px; font-weight: 800; letter-spacing: 1px; }
@keyframes pop { from { transform: scale(1.15); opacity: 0; } }
#capture { position: absolute; top: 112px; left: 50%; transform: translateX(-50%); width: 260px; text-align: center; font-size: 13px; }
#capture .bar { height: 7px; background: rgba(255, 255, 255, 0.18); border-radius: 4px; margin: 5px 0; position: relative; overflow: hidden; }
#capture .bar i { position: absolute; top: 0; bottom: 0; }
#capinfo { color: var(--dim); font-size: 12px; }
#warn { position: absolute; top: 30%; left: 50%; transform: translateX(-50%); padding: 14px 26px; background: rgba(140, 10, 0, 0.75); border: 1px solid #ff6a55;
  font-size: 20px; font-weight: 800; text-align: center; border-radius: 4px; animation: blink 0.6s infinite; }
#warn small { display: block; font-size: 13px; font-weight: 400; margin-top: 4px; }

#crosshair { position: absolute; left: 50%; top: 50%; --g: 8px; }
#crosshair i { position: absolute; background: rgba(255, 255, 255, 0.92); box-shadow: 0 0 2px #000; }
#crosshair .l, #crosshair .r { width: 9px; height: 2px; top: -1px; } #crosshair .t, #crosshair .b { width: 2px; height: 9px; left: -1px; }
#crosshair .l { right: var(--g); } #crosshair .r { left: var(--g); } #crosshair .t { bottom: var(--g); } #crosshair .b { top: var(--g); }
#crosshair .dot { width: 2px; height: 2px; left: -1px; top: -1px; }
#hitmarker { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; opacity: 0;
  background: linear-gradient(45deg, transparent 46%, #fff 46%, #fff 54%, transparent 54%), linear-gradient(-45deg, transparent 46%, #fff 46%, #fff 54%, transparent 54%);
  -webkit-mask: radial-gradient(circle, transparent 5px, #000 6px); mask: radial-gradient(circle, transparent 5px, #000 6px); }
#hitmarker.kill { filter: drop-shadow(0 0 0 #f33) hue-rotate(0deg); background: linear-gradient(45deg, transparent 44%, #ff4a3a 44%, #ff4a3a 56%, transparent 56%), linear-gradient(-45deg, transparent 44%, #ff4a3a 44%, #ff4a3a 56%, transparent 56%); }
#gunret { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 2px solid rgba(255, 220, 120, 0.95); border-radius: 50%; }
#gunret::after { content: ""; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px; background: rgba(255, 220, 120, 0.95); border-radius: 50%; }
#lock { position: absolute; width: 70px; height: 70px; margin: -35px 0 0 -35px; border: 2px solid #ffd35a; }
#lock.on { border-color: #ff4a3a; animation: blink 0.25s infinite; }
#lock span { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 12px; margin-top: 4px; }
#scope { position: absolute; inset: 0; background: radial-gradient(circle at center, transparent 0, transparent 34vh, rgba(0, 0, 0, 0.98) 34.6vh); }
#scope .sc-h, #scope .sc-v { position: absolute; background: rgba(0, 0, 0, 0.9); }
#scope .sc-h { left: calc(50% - 34vh); right: calc(50% - 34vh); top: 50%; height: 1.5px; }
#scope .sc-v { top: calc(50% - 34vh); bottom: calc(50% - 34vh); left: 50%; width: 1.5px; }
#prompt { position: absolute; left: 50%; top: 62%; transform: translateX(-50%); text-align: center; font-size: 14px; line-height: 1.8; }
#prompt kbd { font: inherit; font-weight: 700; background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 3px; padding: 1px 7px; margin-right: 6px; }

#bl { position: absolute; left: 18px; bottom: 18px; }
#stance { font-size: 12px; color: var(--dim); margin-bottom: 5px; }
#hpwrap { display: flex; align-items: center; gap: 10px; }
#hpbar { width: 210px; height: 12px; background: rgba(255, 255, 255, 0.16); border-radius: 2px; overflow: hidden; }
#hpbar i { display: block; height: 100%; width: 100%; background: #e8ecef; transition: width 0.15s; }
#hpbar.low i { background: #ff4a3a; }
#hptext { font-size: 24px; min-width: 44px; }
#br { position: absolute; right: 18px; bottom: 18px; text-align: right; }
#wname { font-size: 14px; color: var(--dim); }
#ammo b { font-size: 40px; font-weight: 800; } #ammo span { font-size: 18px; color: var(--dim); margin-left: 6px; }
#ammo.low b { color: #ff6a55; }
#hotbar { display: flex; gap: 4px; justify-content: flex-end; margin-top: 6px; }
#hotbar .slot { min-width: 46px; padding: 3px 5px; background: rgba(10, 12, 14, 0.6); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 3px; text-align: center; font-size: 11px; line-height: 1.3; }
#hotbar .slot.on { border-color: var(--acc); background: rgba(242, 193, 78, 0.22); } #hotbar .slot.empty { opacity: 0.35; }
#hotbar .slot kbd { display: block; font: inherit; font-size: 10px; color: var(--dim); } #hotbar .slot b { display: block; font-size: 12px; }
#vehud { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); text-align: center; font-size: 13px; background: rgba(10, 12, 14, 0.6); padding: 8px 18px; border-radius: 4px; min-width: 300px; }
#vehud .vbar { height: 7px; background: rgba(255, 255, 255, 0.18); border-radius: 3px; overflow: hidden; margin: 5px 0; }
#vehud .vbar i { display: block; height: 100%; background: #9be7a8; }
#vehud .vbar.low i { background: #ff6a55; }
#vehud small { color: var(--dim); display: block; margin-top: 3px; line-height: 1.6; }
#vehud b { color: var(--acc); }
#dmg { position: absolute; left: 50%; top: 50%; }
#dmg i { position: absolute; left: -70px; top: -150px; width: 140px; height: 26px; transform-origin: 70px 150px; border-top: 5px solid rgba(255, 60, 40, 0.9); border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
#tags div { position: absolute; transform: translate(-50%, -100%); font-size: 11px; white-space: nowrap; text-align: center; }
#tags div::after { content: "▼"; display: block; font-size: 8px; line-height: 1; }
#chat { position: absolute; left: 18px; bottom: 92px; width: 380px; font-size: 13px; }
#chatlog div { background: rgba(10, 12, 14, 0.45); padding: 2px 7px; border-radius: 3px; margin-top: 2px; display: table; }
#chatin { pointer-events: auto; width: 100%; margin-top: 5px; padding: 6px 9px; font: inherit; color: var(--txt); background: rgba(10, 12, 14, 0.8); border: 1px solid var(--acc); border-radius: 3px; outline: none; user-select: text; -webkit-user-select: text; }
#stats { position: absolute; right: 14px; bottom: 4px; font-size: 10px; color: rgba(255, 255, 255, 0.45); }

/* ---------- 좁은 화면 대응 ---------- */
@media (max-width: 1180px) {
  #minimap { width: 170px; height: 170px; }
  #top { transform: translateX(-50%) scale(0.86); transform-origin: top center; }
  #killfeed { font-size: 12px; }
  .row { flex-wrap: wrap; }
  #spawnmap { max-width: 100%; }
  #chat { width: 300px; }
}
@media (max-height: 640px) {
  #hotbar .slot { min-width: 40px; font-size: 10px; }
  #ammo b { font-size: 30px; }
}

/* ---------- 점수판 / 지도 ---------- */
#scoreboard { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 40; display: flex; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 16px; max-height: 86vh; pointer-events: none; }
#scoreboard table { border-collapse: collapse; font-size: 12px; min-width: 300px; }
#scoreboard th { text-align: left; padding: 4px 8px; font-size: 13px; border-bottom: 2px solid; }
#scoreboard td { padding: 2px 8px; } #scoreboard td.n { text-align: right; font-variant-numeric: tabular-nums; }
#scoreboard tr.me td { color: var(--acc); font-weight: 700; } #scoreboard tr.bot td { opacity: 0.6; } #scoreboard tr.party td:first-child { color: var(--party); }
#bigmap { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; background: rgba(4, 6, 8, 0.6); pointer-events: none; }
#bigmap canvas { border: 1px solid var(--line); border-radius: 4px; max-width: 92vw; max-height: 86vh; }
#bigmap .hint { position: absolute; bottom: 3vh; }
#gameover h1 { font-size: 44px; text-align: center; } #gameover p { text-align: center; color: var(--dim); }

/* ============================================================================
   메인 화면 (게임 서버에 접속하기 전 — lobby.js)
   화면 전체가 한 장의 스크롤 영역이다(body 는 스크롤하지 않는다). 글꼴·그림 파일을 받지 않고, 흐림(backdrop-filter)도 쓰지 않는다.
   움직이는 것(불티)은 transform·opacity 만 바꿔 합성 단계에서 끝난다 — 게임 중에는 이 화면이 display:none 이라 비용이 없다.
   ========================================================================== */
#menu.lb { display: block; overflow-x: hidden; overflow-y: auto; background: #0a0c0e; scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
  word-break: keep-all; overflow-wrap: break-word; }      /* (한국어 문장이 낱말 가운데에서 줄바꿈되지 않게) */
.lb-bg { position: fixed; inset: 0; overflow: hidden; pointer-events: none;
  background: linear-gradient(180deg, #05070a 0%, #0a0f15 28%, #151a1d 52%, #2b2116 72%, #16110c 86%, #0a0c0e 100%); }
.lb-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 120% 90% at 50% 42%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.62) 100%); }
.lb-glow { position: absolute; left: 66%; bottom: 24%; width: 120vmax; height: 56vmax; transform: translate(-50%, 50%);
  background: radial-gradient(ellipse at center, rgba(255, 176, 74, 0.3) 0%, rgba(214, 118, 46, 0.13) 26%, rgba(0, 0, 0, 0) 58%); }
.lb-city { position: absolute; left: 0; bottom: 0; display: block; width: 100%; }
.lb-city.far { height: 46vh; fill: #171c22; }
.lb-city.far .lit { fill: #ffb25a; }
.lb-haze { position: absolute; left: 0; right: 0; bottom: 0; height: 42vh; background: linear-gradient(0deg, rgba(12, 12, 13, 0.9) 0%, rgba(70, 46, 24, 0.28) 38%, rgba(0, 0, 0, 0) 100%); }
.lb-city.near { height: 31vh; fill: #07090b; }
.lb-embers i { position: absolute; bottom: -12px; width: 3px; height: 3px; border-radius: 50%; background: #ffd27a; box-shadow: 0 0 6px 2px rgba(255, 150, 50, 0.5);
  opacity: 0; animation: lb-ember 12s linear infinite; }
.lb-embers i:nth-child(3n) { width: 2px; height: 2px; }
.lb-embers i:nth-child(even) { animation-name: lb-ember2; }
.lb-embers i:nth-child(1) { left: 5%; animation-duration: 13s; animation-delay: -3s; }
.lb-embers i:nth-child(2) { left: 13%; animation-duration: 10s; animation-delay: -8s; }
.lb-embers i:nth-child(3) { left: 22%; animation-duration: 15s; animation-delay: -1s; }
.lb-embers i:nth-child(4) { left: 31%; animation-duration: 11s; animation-delay: -6s; }
.lb-embers i:nth-child(5) { left: 40%; animation-duration: 14s; animation-delay: -11s; }
.lb-embers i:nth-child(6) { left: 49%; animation-duration: 12s; animation-delay: -4s; }
.lb-embers i:nth-child(7) { left: 57%; animation-duration: 16s; animation-delay: -9s; }
.lb-embers i:nth-child(8) { left: 64%; animation-duration: 10s; animation-delay: -2s; }
.lb-embers i:nth-child(9) { left: 72%; animation-duration: 13s; animation-delay: -7s; }
.lb-embers i:nth-child(10) { left: 80%; animation-duration: 11s; animation-delay: -5s; }
.lb-embers i:nth-child(11) { left: 88%; animation-duration: 15s; animation-delay: -12s; }
.lb-embers i:nth-child(12) { left: 95%; animation-duration: 12s; animation-delay: -10s; }
@keyframes lb-ember { 0% { transform: translate(0, 0); opacity: 0; } 8% { opacity: 0.9; } 70% { opacity: 0.55; } 100% { transform: translate(70px, -72vh); opacity: 0; } }
@keyframes lb-ember2 { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: 0.8; } 65% { opacity: 0.5; } 100% { transform: translate(-50px, -64vh); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .lb-embers { display: none; } }

.lb-wrap { position: relative; z-index: 1; min-height: 100%; display: flex; flex-direction: column; padding: 18px clamp(16px, 4vw, 56px) 12px; }
.lb-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; min-height: 44px; }
.lb-brand { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 800; letter-spacing: 3px; color: #efe5cc; }
.lb-mark { flex: none; width: 30px; height: 30px; }
#menu[data-view="home"] .lb-brand { visibility: hidden; }      /* (첫 화면에는 큰 제목이 있다) */
.lb-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 18px 0 26px; }
.lb-err { width: min(720px, 100%); padding: 10px 16px; font-size: 14px; line-height: 1.5; text-align: center; color: #ffc2b8;
  background: rgba(58, 14, 10, 0.88); border: 1px solid rgba(255, 110, 90, 0.55); border-radius: 6px; }
.lb-err:empty { display: none; }
/* 첫 화면: 왼쪽에 제목·조작법, 오른쪽에 입력 카드. 다른 화면은 카드 하나를 가운데에 */
.lb-stage { width: 100%; display: grid; grid-template-columns: minmax(0, 580px) minmax(0, 420px); grid-template-areas: "hero card" "keys card";
  column-gap: clamp(32px, 6vw, 110px); row-gap: 22px; justify-content: center; align-items: center; }
.lb-hero { grid-area: hero; align-self: end; }
.lb-keysbox { grid-area: keys; align-self: start; }
.lb-stage > section { grid-area: card; }
#menu:not([data-view="home"]) .lb-stage { grid-template-columns: minmax(0, 1fr); grid-template-areas: "card"; }
#menu:not([data-view="home"]) .lb-hero, #menu:not([data-view="home"]) .lb-keysbox { display: none; }

.lb-kicker { display: flex; align-items: center; gap: 12px; color: var(--acc); font-size: 12px; font-weight: 700; letter-spacing: 6px; }
.lb-kicker::before { content: ""; width: 40px; height: 2px; background: var(--acc); }
.lb-title { margin: 16px 0 14px; font-weight: 900; line-height: 1; }
.lb-title span { display: block; }
.lb-title .t1 { margin-bottom: 10px; font-size: clamp(22px, 2.4vw, 34px); letter-spacing: 12px; color: var(--acc); }
.lb-title .t2 { font-size: clamp(64px, 8.4vw, 132px); letter-spacing: 6px; color: #f4ecda; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.55), 0 0 48px rgba(242, 193, 78, 0.2); }
.lb-tag { max-width: 32em; margin: 0 0 18px; font-size: 15px; line-height: 1.7; color: #cdc6b6; }
.lb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.lb-chips li { padding: 4px 11px; font-size: 12px; color: #eadcb6; background: rgba(24, 20, 12, 0.55); border: 1px solid rgba(242, 193, 78, 0.35); border-radius: 999px; }
.lb-keysbox h3 { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 2px; color: var(--dim); }
.lb-keysbox .keys { max-width: 460px; margin-top: 0; }

.lb-card { position: relative; justify-self: center; width: 100%; padding: 22px 24px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px;
  background: linear-gradient(180deg, rgba(23, 27, 31, 0.95), rgba(13, 15, 18, 0.96)); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55); }
.lb-card::before { content: ""; position: absolute; left: 24px; right: 24px; top: -1px; height: 2px; background: linear-gradient(90deg, rgba(242, 193, 78, 0), var(--acc), rgba(242, 193, 78, 0)); }
.lb-home { max-width: 420px; }
.lb-rooms { max-width: 1180px; }
.lb-doc { max-width: 780px; user-select: text; -webkit-user-select: text; }
.lb-direct { max-width: 600px; }
.lb label { display: block; margin: 0 0 12px; font-size: 13px; color: var(--dim); }
.lb label .opt { font-size: 12px; opacity: 0.8; }
.lb input:not([type]), .lb select { display: block; width: 100%; margin-top: 5px; padding: 10px 12px; font: inherit; font-size: 15px; color: var(--txt);
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); border-radius: 4px; outline: none; user-select: text; -webkit-user-select: text; }
.lb input:focus, .lb select:focus { border-color: var(--acc); }
.lb select option { background: #1a1e22; }
.lb select:disabled { opacity: 0.6; }
.lb button:focus-visible, .lb a:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.lb-hint { margin: -6px 0 12px; font-size: 12px; color: var(--dim); }
.lb-warn { margin: 0 0 10px; padding: 9px 12px; font-size: 12px; line-height: 1.55; color: #ffd9a0; background: rgba(90, 60, 10, 0.35); border: 1px solid rgba(242, 193, 78, 0.4); border-radius: 4px; }
.lb-home button.big { margin-top: 6px; padding: 15px; font-size: 19px; letter-spacing: 8px; box-shadow: 0 10px 26px rgba(242, 193, 78, 0.18); }
.lb-pre { margin-top: 10px; font-size: 13px; text-align: center; color: var(--dim); }
.lb-pre b { color: var(--acc); }
.lb-link { padding: 0; font-size: 13px; color: var(--txt); background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; }
.lb-link:hover:not(:disabled) { color: var(--acc); background: none; }
.lb-alt { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.lb-alt button { padding: 10px 8px; font-size: 13px; line-height: 1.35; }
.lb-go { font-weight: 700; color: #16181a; background: var(--acc); border-color: var(--acc); }
.lb-go:hover:not(:disabled) { background: #ffd674; }
.lb-row { display: flex; gap: 8px; margin-top: 16px; }
.lb-small { margin: 14px 0 0; font-size: 12px; line-height: 1.6; color: var(--dim); }

/* 방 목록 */
.lb-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.lb-head h2 { margin: 0; font-size: 22px; letter-spacing: 1px; }
.lb-sum { font-size: 13px; color: var(--dim); }
.lb-bar { display: flex; gap: 8px; margin-left: auto; }
.lb-fail { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 14px; padding: 10px 14px; font-size: 13px; color: #ffc2b8;
  background: rgba(58, 14, 10, 0.6); border: 1px solid rgba(255, 110, 90, 0.45); border-radius: 6px; }
.lb-fail button { margin-left: auto; }
.lb-stat { margin-top: 16px; font-size: 13px; color: var(--dim); }
.lb-stat:empty, .lb-grid:empty { display: none; }
.lb-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.room { display: flex; flex-direction: column; gap: 9px; padding: 14px; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line); border-radius: 6px; }
.room:hover { border-color: rgba(255, 255, 255, 0.26); }
.room.pre { border-color: var(--acc); box-shadow: inset 0 0 0 1px rgba(242, 193, 78, 0.45); }
.room .rtop { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.room .rtop b { font-size: 17px; }
.rst { font-size: 12px; white-space: nowrap; color: var(--dim); }
.rst.run { color: #9be7a8; } .rst.start { color: var(--acc); } .rst.full { color: #ff8a7a; }
.rbar { height: 6px; overflow: hidden; background: rgba(255, 255, 255, 0.1); border-radius: 3px; }
.rbar i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #c99a35, var(--acc)); transition: width 0.4s; }
.room.full .rbar i { background: #ff6a55; }
.rnum { font-size: 12px; color: var(--dim); }
.rnum b { font-size: 16px; color: var(--txt); }
.rjoin { width: 100%; font-weight: 700; letter-spacing: 2px; }
.room:not(.full) .rjoin:hover { color: #16181a; background: var(--acc); border-color: var(--acc); }

/* 서버 열기 · 다른 서버로 접속 */
.lb-doc h2 { margin: 0 0 8px; font-size: 22px; letter-spacing: 1px; outline: none; }
.lb-lead { margin: 0 0 14px; font-size: 14px; line-height: 1.65; color: #cfc8b8; }
.lb-steps { margin: 0; padding: 0; list-style: none; counter-reset: st; }
.lb-steps > li { position: relative; padding: 12px 0 12px 46px; font-size: 14px; line-height: 1.7; color: #d4d8dc; border-top: 1px solid rgba(255, 255, 255, 0.08); counter-increment: st; }
.lb-steps > li::before { content: counter(st); position: absolute; left: 0; top: 12px; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: var(--acc); border: 1.5px solid var(--acc); border-radius: 50%; }
.lb-steps b { color: var(--txt); }
.lb-doc a { color: var(--acc); }
.lb-doc code { padding: 1px 6px; font-family: Consolas, "D2Coding", ui-monospace, monospace; font-size: 13px; white-space: nowrap; color: #f3e3b5;
  background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); border-radius: 3px; }
.lb-cmd { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.lb-cmd code { flex: 1; min-width: 0; padding: 8px 10px; overflow-x: auto; user-select: all; -webkit-user-select: all; }
.lb-cmd .copy { flex: none; padding: 7px 12px; font-size: 12px; }
.lb-dl { display: inline-block; padding: 6px 14px; font-weight: 700; text-decoration: none; border: 1px solid var(--acc); border-radius: 4px; }
.lb-doc a.lb-dl:hover { background: rgba(242, 193, 78, 0.14); }
.lb-notes { margin: 14px 0 0; padding: 12px 16px 12px 32px; font-size: 13px; line-height: 1.75; color: #d8d1bf; background: rgba(242, 193, 78, 0.05); border: 1px solid rgba(242, 193, 78, 0.25); border-radius: 6px; }
.lb-err2 { min-height: 18px; margin: -4px 0 0; font-size: 13px; color: #ff8a7a; }

/* 게임물 등급 표시 (사이트 설정에 등급이 있을 때 — lobby.js). 메인 화면 머리 오른쪽의 작은 표 · 처음의 큰 안내 · 일시 정지 화면의 한 줄 · 바닥글의 표시사항.
   표의 색: 전체 초록 · 12 파랑 · 15 주황 · 청소년이용불가(19) 빨강. 운영자가 등급 그림(rating.icon)을 주면 CSS 표 대신 그 그림을 쓴다 */
.lb-rating { display: flex; align-items: center; gap: 10px; max-width: 380px; padding: 7px 12px 7px 7px; background: rgba(8, 10, 12, 0.75); border: 1px solid var(--line); border-radius: 6px; }
.rmark, .rt-big { --rc: #4a5056; }
.rmark.g0, .rt-big.g0 { --rc: #2b8a3e; } .rmark.g12, .rt-big.g12 { --rc: #1864ab; } .rmark.g15, .rt-big.g15 { --rc: #e67700; } .rmark.g19, .rt-big.g19 { --rc: #c92a2a; }
.rmark { flex: none; width: 42px; height: 42px; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden;
  font-size: 15px; font-weight: 900; line-height: 1; color: #fff; background: var(--rc); border: 2px solid rgba(255, 255, 255, 0.85); border-radius: 6px; }
.rmark b { font-weight: 900; }
.rmark.g0 b { font-size: 0.8em; }      /* ('ALL' 은 세 글자라 조금 작게) */
.rmark.img { background: none; border: 0; border-radius: 0; }
.rmark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.rmark.mini { width: 26px; height: 26px; font-size: 11px; border-width: 1.5px; border-radius: 4px; }
.rinfo { display: flex; flex-direction: column; gap: 1px; font-size: 12px; line-height: 1.35; }
.rinfo b { font-size: 13px; } .rinfo small { font-size: 11px; color: var(--dim); }
/* 처음의 큰 안내 (게임산업법 시행령 별표 3): 오른쪽 위에 너비 52vw 이상 × 높이 52vh 이상 — 화면 넓이의 1/4 이상 (소수점 화소를 반올림해도
   1/4 아래로 내려가지 않게 조금 넉넉히). 메인 화면·접속 중 화면 위에 뜨지만 누르기·입력은 아래로 지나간다.
   시간이 다 되면 오른쪽 위 모서리(작은 표가 있는 곳)로 줄어들며 사라진다 */
.rt-big { position: fixed; top: 12px; right: 12px; z-index: 36; width: max(52vw, min(360px, calc(100vw - 24px))); min-height: 52vh; max-height: calc(100vh - 24px);
  display: flex; align-items: center; justify-content: center; padding: clamp(18px, 3.2vmin, 44px); overflow: hidden; pointer-events: none;
  background: #0b0d10; border: 1px solid rgba(255, 255, 255, 0.16); border-top: 6px solid var(--rc); border-radius: 10px; box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
  word-break: keep-all; overflow-wrap: break-word; transform-origin: top right; transition: transform 0.6s cubic-bezier(0.55, 0, 0.75, 0.2), opacity 0.6s ease-in; }
.rt-big.rt-out { transform: scale(0.08); opacity: 0; }
.rt-in { display: flex; align-items: center; gap: clamp(16px, 3.4vmin, 44px); max-width: 900px; }
.rmark.big { width: clamp(88px, 19vmin, 210px); height: clamp(88px, 19vmin, 210px); font-size: clamp(38px, 8.4vmin, 92px); border-width: clamp(3px, 0.55vmin, 6px); border-radius: 14%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.rmark.big.img { box-shadow: none; }
.rmark.big small { margin-top: 0.16em; font-size: max(10px, 0.19em); font-weight: 800; white-space: nowrap; }
.rt-txt { min-width: 0; }
.rt-name { display: block; font-size: clamp(24px, 4.4vmin, 50px); font-weight: 900; letter-spacing: 1px; line-height: 1.15; color: #fff; }
.rt-say { margin: 0.5em 0 0; font-size: clamp(15px, 2.5vmin, 26px); line-height: 1.5; color: #e7e0cf; }
.rt-desc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 7px; margin-top: clamp(12px, 2.4vmin, 24px); }
.rt-lbl { margin-right: 4px; font-size: clamp(12px, 1.6vmin, 15px); font-weight: 700; color: var(--dim); }
.rt-chip { padding: 0.25em 0.8em; font-size: clamp(12px, 1.7vmin, 16px); white-space: nowrap; color: #f2ede2; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 999px; }
.rt-no { display: block; margin-top: clamp(10px, 1.8vmin, 18px); font-size: clamp(11px, 1.5vmin, 14px); color: var(--dim); }
@media (max-width: 640px), (max-aspect-ratio: 4/5) { .rt-in { flex-direction: column; text-align: center; } .rt-desc { justify-content: center; } }
@media (prefers-reduced-motion: reduce) { .rt-big { transition: none; } }
/* 일시 정지 화면의 한 줄 요약: 등급 · 등급분류번호 · 내용정보 */
.prating { display: flex; align-items: center; gap: 8px; margin: -4px 0 4px; font-size: 12px; line-height: 1.45; color: var(--dim); word-break: keep-all; overflow-wrap: break-word; }

/* 바닥글: 약관·정책 링크와 저작권 표시 */
.lb-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 18px; padding-top: 12px; font-size: 12px; color: #8b939a;
  border-top: 1px solid rgba(255, 255, 255, 0.08); }
.lb-legal { display: flex; flex-wrap: wrap; align-items: center; row-gap: 4px; }
.lb-legal a { color: #b8bfc5; text-decoration: none; }
.lb-legal a:not(:first-child)::before { content: ""; display: inline-block; width: 1px; height: 10px; margin: 0 10px; vertical-align: -1px; background: rgba(255, 255, 255, 0.22); }
.lb-legal a:hover { color: var(--acc); }
.lb-legal a.strong { font-weight: 700; color: #eef1f3; }      /* (개인정보처리방침은 다른 링크와 구별되게 표시한다) */
/* 게임물 표시사항 (등급을 받은 사이트만): 바닥글 맨 아래 한 줄 */
.lb-ginfo { flex-basis: 100%; font-size: 11.5px; line-height: 1.6; color: #7d858c; }
.lb-ginfo span { display: inline-block; }      /* (항목 하나는 되도록 한 줄에 — '제2026-000999호' 같은 번호가 줄 끝에서 갈리지 않게) */
.lb-ginfo span:not(:first-child)::before { content: "·"; margin: 0 8px; color: rgba(255, 255, 255, 0.28); }
.lb-ginfo em { margin-right: 2px; font-style: normal; color: #a3abb1; }

/* 좁은 화면: 방 카드는 다섯 줄을 지키며(방 10개가 두 줄로 고르게 놓인다) 안쪽 여백을 줄이고, 첫 화면은 제목 → 입력 카드 → 조작법 순으로 쌓는다 */
@media (max-width: 1100px) { .room { padding: 12px 10px; } .room .rtop b { font-size: 16px; } .lb-grid { gap: 10px; } }
@media (max-width: 1060px) {
  .lb-stage { grid-template-columns: minmax(0, 560px); grid-template-areas: "hero" "card" "keys"; }
  .lb-hero { align-self: auto; text-align: center; }
  .lb-kicker { justify-content: center; }
  .lb-kicker::after { content: ""; width: 40px; height: 2px; background: var(--acc); }
  .lb-title { margin: 12px 0 10px; }
  .lb-title .t2 { font-size: clamp(52px, 8.5vw, 88px); }
  .lb-tag { margin-left: auto; margin-right: auto; }
  .lb-chips { justify-content: center; }
  .lb-keysbox { justify-self: center; }
}
@media (max-width: 860px) { .lb-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 700px) { .lb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .lb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lb-bar { margin-left: 0; }
  .lb-alt { grid-template-columns: 1fr; }
}
