/* Leapinity 지옥 화면 모양
   - 색·글꼴·버튼·위아래 막대는 lp-brand.css(Leapinity 공통)를 써요. 놀이 칸만 어두운 지옥 방이에요.
   - 사이트 고유 색: 불꽃 빨강 #dc2626 (흰 글자 4.8:1) / 흰 바탕 글자 #b91c1c / 어두운 바탕 글자 #fca5a5
   - style-src 'self' 라서 HTML 에 style="…" 을 쓰지 않아요 */
:root {
  --lp-accent: #dc2626; --lp-accent-ink: #b91c1c; --lp-accent-ink-dark: #fca5a5; --lp-on-accent: #ffffff;
  --hell-bg: #170404; --hell-panel: #240807; --hell-line: #4a1410; --hell-ink: #fde8e4; --hell-soft: #e9b8ae;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; display: flex; flex-direction: column; font-size: 16px; line-height: 1.65; }
main { flex: 1; }
a { color: var(--lp-accent-ink); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--lp-focus); outline-offset: 2px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--lp-card); color: var(--lp-ink); padding: 10px 16px; border-radius: 12px; }
.skip:focus { top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.lp-brand-ico { display: inline-flex; }
.bar-btn { min-height: 44px; min-width: 44px; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.bar-btn span[aria-hidden] { font-size: 18px; }

/* 놀이 칸 */
.play { background: var(--hell-bg); color: var(--hell-ink); padding: 10px 0 14px; }
.play-in { max-width: 1180px; margin: 0 auto; padding: 0 12px; }
.play-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 2px 2px 8px; }
.play-head h1 { margin: 0; font-size: clamp(20px, 4.6vw, 28px); font-weight: 800; letter-spacing: -0.03em; color: #fff; }
.play-head h1 b { color: #ff7a59; }
.age { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px; background: #ffb020; color: #1a0a00; font-weight: 800; font-size: 13px; }
.stage { position: relative; width: 100%; height: clamp(300px, calc(100svh - 260px), 640px); border-radius: 20px; overflow: hidden; background: #2a0606; box-shadow: 0 0 0 1px var(--hell-line), 0 12px 36px rgba(0,0,0,.45); }
#cv { display: block; width: 100%; height: 100%; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; cursor: crosshair; }
#cv:focus-visible { outline: 3px solid #fca5a5; outline-offset: -3px; }
.hud { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; }
.hud-btn { min-width: 44px; min-height: 44px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); background: rgba(20,4,3,.6); color: #fff; font: inherit; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 0 12px; cursor: pointer; }
.hud-btn:hover { background: rgba(60,10,8,.8); }
.hud-btn span[aria-hidden] { font-size: 18px; }
.hint { position: absolute; left: 12px; top: 10px; margin: 0; font-size: 13px; font-weight: 700; color: rgba(255,240,230,.85); text-shadow: 0 1px 2px #000; pointer-events: none; max-width: calc(100% - 150px); line-height: 1.35; }
.toast { position: absolute; left: 50%; top: 14px; transform: translate(-50%, -8px); opacity: 0; background: #fff7e8; color: #2a1a12; font-weight: 800; padding: 8px 16px; border-radius: 999px; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* 무기 막대 */
.weapons { display: flex; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; padding: 10px 2px 8px; scrollbar-width: thin; scrollbar-color: #6b1d16 transparent; }
.wgroup { display: flex; gap: 6px; align-items: stretch; padding: 6px; border-radius: 16px; background: var(--hell-panel); border: 1px solid var(--hell-line); flex: none; }
.wcat { writing-mode: vertical-rl; font-size: 12px; font-weight: 800; color: var(--hell-soft); letter-spacing: .02em; padding: 2px 0; }
.wbtn { flex: none; width: 64px; min-height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px 2px; border-radius: 12px; border: 2px solid transparent; background: #331010; color: var(--hell-ink); font: inherit; font-size: 12px; font-weight: 700; line-height: 1.2; cursor: pointer; word-break: keep-all; text-align: center; }
.wbtn:hover { background: #451613; }
.wbtn[aria-pressed="true"] { border-color: #ff7a59; background: #5a1a12; color: #fff; }
.wico { width: 44px; height: 44px; }
.wemoji { font-size: 30px; line-height: 44px; height: 44px; }

/* 꾸미기 칸 */
.panel { display: grid; gap: 10px; grid-template-columns: 1fr; margin-top: 6px; }
@media (min-width: 900px) { .panel { grid-template-columns: 1.2fr 1fr 1fr; } }
.box { background: var(--hell-panel); border: 1px solid var(--hell-line); border-radius: 18px; padding: 12px; }
.box h2 { margin: 0 0 8px; font-size: 15px; font-weight: 800; color: #fff; }
.row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid #5a1d17; background: #331010; color: var(--hell-ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.chip[aria-pressed="true"] { background: #dc2626; border-color: #dc2626; color: #fff; }
.chip:hover { border-color: #ff7a59; }
.name-row { display: flex; gap: 6px; margin-bottom: 8px; }
.name-in { flex: 1; min-width: 0; min-height: 44px; border-radius: 14px; border: 1px solid #5a1d17; background: #fff7f3; color: #2a1a12; padding: 0 12px; font: inherit; font-size: 16px; }
.small { font-size: 12.5px; color: var(--hell-soft); margin: 8px 0 0; }
.act { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.big-btn { min-height: 48px; padding: 0 18px; border-radius: 999px; border: 0; font: inherit; font-weight: 800; font-size: 15px; cursor: pointer; }
.sew { background: #fff7e8; color: #3a1a0a; }
.shot { background: #dc2626; color: #fff; }
.ghost { background: transparent; color: var(--hell-ink); border: 1px solid #6b2a22; }

/* 설명 */
.info { max-width: 860px; margin: 0 auto; padding: 28px 16px 40px; }
.info h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin: 24px 0 10px; }
.info p, .info li { word-break: keep-all; color: var(--lp-soft); }
.info ol, .info ul { padding-left: 20px; }
.faq details { border: 1px solid var(--lp-line); border-radius: 16px; padding: 4px 14px; margin: 8px 0; background: var(--lp-card); }
.faq summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; cursor: pointer; color: var(--lp-ink); }

/* 포탈 */
.portal { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 1000; pointer-events: none; }
.portal.fade.go { transition: opacity .3s linear; }

/* 404 */
.nf { max-width: 640px; margin: 0 auto; padding: 60px 16px; text-align: center; }

@media (max-width: 520px) {
  .play-in { padding: 0 8px; }
  .stage { height: clamp(300px, calc(100svh - 300px), 560px); border-radius: 16px; }
  .wbtn { width: 58px; min-height: 68px; font-size: 11.5px; }
  .hud-btn .lbl { display: none; }
}
/* 가로 휴대폰: 놀이 칸을 화면에 맞게 */
@media (max-height: 500px) and (orientation: landscape) {
  .play-head { padding-bottom: 4px; }
  .stage { height: calc(100svh - 120px); min-height: 220px; }
  .weapons { padding-top: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .toast { transition: none; }
}
.box h2.mt { margin-top: 14px; }
