/* 찰떡 아케이드 테마 (손꾸락 나이 테스트 전용) — finger.html에서만 사용 */
/* 레이아웃: 한 화면 = 한 종목. 허브 → (종목 소개 → 3·2·1 → 플레이 → 판정) × N → 진단서
   테마: 손꾸락 아케이드 — 종목마다 바탕색이 바뀌는 체커, 굵은 검정 외곽선, 각진 패널, 딱딱한 그림자 */
:root {
  --bg: #8fe3cf;
  --bg-2: #84d8c4;
  --ink: #1d1b2c;
  --panel: #fffdf5;
  --soft: #fff1d6;
  --sub: #6b6577;
  --point: #ff7a59;
  --point-2: #ffd23f;
  --blue: #4b5bdc;
  --ok: #24a86b;
  --bad: #e5484d;
  --frame: #3a3f5c;
  --gray: #c9c3d6;
  --px: "DotGothic16", "Do Hyeon", "Apple SD Gothic Neo", sans-serif;
  --kr: "Do Hyeon", "DotGothic16", "Apple SD Gothic Neo", sans-serif;
  color-scheme: light;
}
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
@supports (height: 100dvh) { body { height: 100dvh; } }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: repeating-conic-gradient(var(--bg-2) 0 25%, transparent 0 50%);
  background-size: 32px 32px;
  color: var(--ink); font-family: var(--kr); font-size: 15px;
  word-break: keep-all; overflow: hidden; -webkit-tap-highlight-color: transparent;
  user-select: none; -webkit-user-select: none;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
button { font: inherit; color: inherit; border: none; background: none; cursor: pointer; touch-action: manipulation; }
button:focus-visible { outline: 3px dashed var(--blue); outline-offset: 2px; }
img.px { image-rendering: pixelated; image-rendering: crisp-edges; display: block; }
.app { max-width: 440px; height: 100%; margin: 0 auto; position: relative; padding-top: max(10px, env(safe-area-inset-top, 0px)); padding-bottom: max(10px, env(safe-area-inset-bottom, 0px)); }
.stage { height: 100%; }
.game { height: 100%; display: flex; flex-direction: column; gap: 8px; }
.pnl { background: var(--panel); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }

/* 공통 상단 바 */
.top { display: flex; align-items: center; gap: 8px; min-height: 26px; }
.round-label { font-family: var(--px); font-size: 14px; white-space: nowrap; background: var(--ink); color: var(--point-2); padding: 3px 7px; }
.timer { flex: 1; height: 16px; border: 3px solid var(--ink); background: var(--panel); padding: 2px; }
.timer i { display: block; height: 100%; width: 100%; transform-origin: left;
  background: repeating-linear-gradient(90deg, var(--point) 0 8px, var(--point-2) 8px 10px); }
.timer.warn i { background: repeating-linear-gradient(90deg, var(--bad) 0 8px, var(--panel) 8px 10px); }
.sec { font-family: var(--px); font-size: 16px; min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pips { flex: 1; min-width: 0; font-family: var(--px); font-size: 14px; letter-spacing: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.snd, .bgm { font-family: var(--px); font-size: 11px; border: 2px solid var(--ink); background: var(--panel); padding: 2px 5px; white-space: nowrap; flex: none; }
.bgm.off, .snd.off { background: var(--gray); color: var(--sub); }
.toggles { display: flex; gap: 6px; align-self: flex-start; }
.nowplay { font-family: var(--px); font-size: 11px; opacity: .8; }

/* 버튼 */
.btn { padding: 11px; font-size: 18px; text-align: center; border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); background: var(--panel); }
.btn:active { transform: translate(4px, 4px); box-shadow: none; }
.btn-main { background: var(--point); color: var(--panel); }
.btn-main:disabled { background: var(--soft); color: var(--sub); box-shadow: none; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* 오버레이 화면 (허브·소개·판정·진단서) */
.over { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; justify-content: flex-start; gap: 12px; padding-block: 16px; overflow-y: auto;
  background-color: var(--bg); background-image: repeating-conic-gradient(var(--bg-2) 0 25%, transparent 0 50%); background-size: 32px 32px; }
.over > :first-child { margin-top: auto; }
.over > :last-child { margin-bottom: auto; }
.over h1 { font-weight: 400; font-size: 36px; line-height: 1.1; text-wrap: balance; text-shadow: 3px 3px 0 var(--panel); margin: 0; }
.over h2 { font-weight: 400; font-size: 28px; line-height: 1.2; margin: 0; }
.eyebrow { font-family: var(--px); font-size: 12px; align-self: flex-start; background: var(--ink); color: var(--point-2); padding: 3px 8px; }
.lead { font-size: 16px; line-height: 1.5; margin: 0; }
.rules { display: flex; flex-direction: column; gap: 7px; padding: 12px; font-size: 15px; line-height: 1.4; }
.rules div { display: flex; gap: 8px; }
.rules > div > b { font-family: var(--px); font-weight: 400; color: var(--panel); background: var(--point); width: 20px; height: 20px; display: grid; place-items: center; flex: none; font-size: 12px; }
.rules em { font-style: normal; color: var(--bad); }
.hero-sprites { display: flex; gap: 8px; align-items: flex-end; }
.note { font-size: 12px; text-align: center; opacity: .75; margin: 0; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.stats div { padding: 8px 4px; }
.stats b { display: block; font-family: var(--px); font-weight: 400; font-size: 20px; font-variant-numeric: tabular-nums; }
.stats span { font-size: 12px; color: var(--sub); }
.rank { align-self: flex-start; font-size: 34px; padding: 2px 14px; border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); transform: rotate(-3deg); }
.rank.r3 { background: var(--point-2); }
.rank.r2 { background: var(--panel); }
.rank.r1 { background: var(--bad); color: var(--panel); }
.scoreline { display: flex; align-items: baseline; gap: 10px; }
.scoreline b { font-family: var(--px); font-weight: 400; font-size: 48px; color: var(--point); text-shadow: 3px 3px 0 var(--ink); }

/* 허브 */
.hub-games { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gcard { display: flex; align-items: center; gap: 8px; padding: 10px; text-align: left; font-size: 16px; }
.gcard img { flex: none; }
.gcard small { display: block; font-size: 12px; color: var(--sub); }
.gcard:active { transform: translate(4px, 4px); box-shadow: none; }
.sec-title { font-family: var(--px); font-size: 12px; }

/* 카운트다운 */
.count { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(29, 27, 44, .35); }
.count span { font-family: var(--px); font-size: 96px; color: var(--point-2); text-shadow: 5px 5px 0 var(--ink); animation: beat .45s steps(4); }
@keyframes beat { from { transform: scale(1.6); } to { transform: scale(1); } }
.shake { animation: shake .3s steps(4); }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* ===== 지하철 ===== */
.train { flex: 1; min-height: 0; position: relative; overflow: hidden; background: #e3e8f7; display: flex; flex-direction: column; justify-content: flex-end; padding: 10px; }
.windows { position: absolute; top: 34px; left: 10px; right: 10px; height: 30%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.windows i { background: #2b2f4a; border: 3px solid var(--ink); position: relative; overflow: hidden; }
.windows i::after { content: ""; position: absolute; top: 45%; left: -40%; width: 30%; height: 6px; background: var(--point-2); animation: tunnel .8s steps(8) infinite; }
@keyframes tunnel { to { left: 130%; } }
.sign { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); font-family: var(--px); font-size: 12px; background: var(--ink); color: var(--point-2); padding: 2px 8px; white-space: nowrap; }
.bench { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; position: relative; z-index: 1; }
.seat { position: relative; height: 150px; }
.seat::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 34px; background: var(--blue); border: 3px solid var(--ink); }
.seat img { position: absolute; left: 50%; bottom: 16px; width: 64px; height: auto; transform: translateX(-50%); z-index: 1; }
.seat.target::after { content: "▼"; position: absolute; top: -6px; left: 50%; transform: translateX(-50%); font-family: var(--px); color: var(--bad); font-size: 14px; }
.seat.empty::before { background: var(--point-2); animation: glow .25s steps(2) infinite alternate; }
@keyframes glow { to { background: var(--panel); } }
.tp.leave { transform: translateX(40%); transition: transform .2s steps(2); }
.tp.hop { animation: hop .5s steps(2); }
@keyframes hop { 50% { transform: translate(-50%, -14px); } }
.tp.tilt { animation: tilt .6s steps(3); }
@keyframes tilt { 50% { transform: translateX(-50%) rotate(-10deg); } }
.tp.jit { animation: jit .5s steps(4); }
@keyframes jit { 25% { transform: translateX(-60%); } 75% { transform: translateX(-40%); } }
.cap { position: absolute; top: 40%; left: 0; right: 0; text-align: center; z-index: 2; }
.cap span { background: var(--panel); border: 2px solid var(--ink); padding: 3px 10px; font-size: 16px; }
.big { position: absolute; top: 9%; left: 0; right: 0; text-align: center; z-index: 3; font-family: var(--px); font-size: 46px; color: var(--point-2); text-shadow: 3px 3px 0 var(--ink); }
.big.bad { color: var(--bad); }
.big.ok { color: var(--panel); }
.tapzone { height: 70px; display: grid; place-items: center; background: var(--point); color: var(--panel); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); font-size: 19px; }
.rtlist { display: flex; gap: 6px; flex-wrap: wrap; }
.rtlist span { font-family: var(--px); font-size: 13px; background: var(--panel); border: 2px solid var(--ink); padding: 2px 6px; }

/* ===== 스팸 팝업 ===== */
.desk { flex: 1; min-height: 0; position: relative; overflow: hidden; background: #f4f1ff; isolation: isolate; }
.doc { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.doc .hd { font-family: var(--px); font-size: 12px; color: var(--sub); }
.doc i { display: block; height: 10px; background: #dcd6ee; }
.pop { position: absolute; width: min(240px, 80%); background: var(--panel); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); animation: popin .15s steps(3); }
@keyframes popin { from { transform: scale(.5); } to { transform: scale(1); } }
.pop .bar { background: var(--blue); color: var(--panel); display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 3px 0 8px; height: 30px; font-family: var(--px); font-size: 11px; border-bottom: 3px solid var(--ink); }
.pop .bar.left { flex-direction: row-reverse; padding: 0 8px 0 3px; }
.pop .x { width: 30px; height: 24px; background: var(--bad); color: var(--panel); border: 2px solid var(--ink); font-family: var(--px); font-size: 14px; display: grid; place-items: center; }
.pop .x.small { width: 15px; height: 15px; font-size: 9px; border-width: 1px; }
.pop .body { padding: 10px; display: flex; gap: 10px; align-items: center; }
.pop .body img { flex: none; }
.pop h4 { font-weight: 400; font-size: 18px; margin: 0; line-height: 1.2; }
.pop p { font-size: 12px; color: var(--sub); margin: 2px 0 0; }
.pop .foot { padding: 0 10px 10px; display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; }
.pop .fake { padding: 7px 10px; font-size: 15px; box-shadow: 3px 3px 0 var(--ink); }
.pop .link { font-size: 11px; color: var(--sub); text-decoration: underline; padding: 4px 2px; }
.pop .skip { padding: 6px 10px; font-size: 14px; border: 2px solid var(--ink); background: var(--ink); color: var(--panel); margin-left: auto; }
.pop .skip:disabled { background: var(--gray); color: var(--sub); }
.hud { display: flex; justify-content: space-between; font-size: 15px; background: var(--panel); border: 3px solid var(--ink); padding: 6px 10px; }
.hud b { font-family: var(--px); font-weight: 400; }

/* ===== 티켓팅 ===== */
.browser { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.addr { background: var(--frame); color: var(--panel); font-family: var(--px); font-size: 12px; padding: 6px 10px; border-bottom: 3px solid var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk { flex: 1; min-height: 0; padding: 14px; display: flex; flex-direction: column; gap: 12px; justify-content: center; text-align: center; overflow-y: auto; }
.poster { background-color: var(--blue); background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.08) 0 6px, transparent 6px 12px); color: var(--panel); border: 3px solid var(--ink); padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.poster b { font-weight: 400; font-size: 24px; }
.poster small { font-family: var(--px); font-size: 12px; color: var(--point-2); }
.clock { font-family: var(--px); font-size: 38px; font-variant-numeric: tabular-nums; }
.clock.open { color: var(--bad); }
.msg { min-height: 22px; font-size: 15px; color: var(--bad); }
.qnum { font-family: var(--px); font-size: 44px; color: var(--point); text-shadow: 3px 3px 0 var(--ink); font-variant-numeric: tabular-nums; }
.captcha { display: flex; justify-content: center; gap: 8px; padding: 10px; border: 3px solid var(--ink);
  background: #eceaf4 repeating-linear-gradient(-20deg, transparent 0 9px, rgba(29,27,44,.25) 9px 10px); }
.captcha span { font-family: var(--px); font-size: 36px; display: inline-block; text-decoration: line-through; text-decoration-thickness: 2px; }
.slots { display: flex; justify-content: center; gap: 8px; }
.slots span { width: 42px; height: 46px; border: 3px solid var(--ink); background: var(--panel); font-family: var(--px); font-size: 24px; display: grid; place-items: center; }
.keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.keys .btn { font-family: var(--px); font-size: 22px; padding: 9px 0; }
.seats { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.seats button { aspect-ratio: 1; border: 2px solid var(--ink); background: var(--gray); }
.seats button.av { background: var(--point-2); animation: glow2 .3s steps(2) infinite alternate; }
@keyframes glow2 { to { background: var(--point); } }
.stagebar { font-family: var(--px); font-size: 12px; }

/* ===== 키오스크 ===== */
.chat { padding: 7px 9px; display: flex; flex-direction: column; gap: 5px; min-height: 66px; }
.chat-head { font-family: var(--px); font-size: 11px; color: var(--sub); }
.msgl { display: flex; align-items: center; gap: 7px; font-size: 15px; line-height: 1.25; }
.msgl img { flex: none; }
.bubble { background: var(--soft); border: 2px solid var(--ink); padding: 2px 8px; }
.bubble b { font-weight: 400; color: var(--blue); }
.peek-btn { align-self: flex-start; background: var(--point-2); border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); padding: 7px 11px; font-size: 15px; }
.kiosk { flex: 1; min-height: 0; background: var(--frame); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); padding: 8px; display: flex; flex-direction: column; }
.screen { flex: 1; min-height: 0; background: var(--panel); border: 3px solid var(--ink); display: flex; flex-direction: column; overflow: hidden; position: relative; }
.brand { font-size: 16px; text-align: center; padding: 5px 0 3px; background: var(--point); color: var(--panel); letter-spacing: 1px; border-bottom: 3px solid var(--ink); }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 3px solid var(--ink); }
.tab { padding: 7px 0; font-size: 15px; color: var(--sub); border-right: 2px solid var(--ink); }
.tab:last-child { border-right: none; }
.tab.on { color: var(--ink); background: var(--point-2); }
.grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px; padding: 8px; }
.item { background: var(--soft); border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 15px; min-height: 0; }
.item:active { transform: translate(3px, 3px); box-shadow: none; background: var(--point-2); }
.item img { flex: none; }
.item small { font-family: var(--px); font-size: 10px; color: var(--sub); }
.cart { background: var(--panel); border: 3px solid var(--ink); margin-top: 8px; padding: 6px; display: flex; gap: 8px; align-items: center; }
.cart-list { flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; min-height: 34px; align-items: center; }
.cart-list::-webkit-scrollbar { display: none; }
.cart-empty { font-size: 13px; color: var(--sub); }
.chip { flex: none; background: var(--soft); border: 2px solid var(--ink); padding: 3px 2px 3px 6px; font-size: 13px; display: flex; align-items: center; gap: 3px; white-space: nowrap; }
.chip img { flex: none; }
.chip button { width: 22px; height: 22px; font-family: var(--px); font-size: 13px; color: var(--bad); }
.pay { background: var(--point); color: var(--panel); padding: 9px 12px; font-size: 17px; white-space: nowrap; border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.pay:active { transform: translate(3px, 3px); box-shadow: none; }
.queue { display: flex; align-items: flex-end; gap: 6px; min-height: 40px; font-size: 13px; }
.queue .lbl { font-family: var(--px); font-size: 11px; background: var(--ink); color: var(--panel); padding: 2px 5px; align-self: center; }
.people { display: flex; gap: 1px; align-items: flex-end; }
.people img { flex: none; }
.grumble { background: var(--panel); border: 2px solid var(--ink); padding: 2px 8px; align-self: center; animation: pop .2s steps(3); }
@keyframes pop { from { transform: scale(.6); } to { transform: scale(1); } }
.layer { position: absolute; inset: 0; background: rgba(29, 27, 44, .55); display: flex; align-items: flex-end; z-index: 5; }
.layer.center { align-items: center; justify-content: center; padding: 12px; }
.sheet { background: var(--panel); width: 100%; border-top: 3px solid var(--ink); padding: 12px; display: flex; flex-direction: column; gap: 9px; }
.sheet h3 { font-weight: 400; font-size: 21px; display: flex; align-items: center; gap: 8px; margin: 0; }
.sheet h3 img { flex: none; }
.opt-row { display: flex; align-items: center; gap: 8px; }
.opt-row > span { width: 42px; font-family: var(--px); font-size: 11px; color: var(--sub); flex: none; }
.opts { display: flex; gap: 6px; flex-wrap: wrap; }
.opt { padding: 7px 11px; border: 3px solid var(--ink); background: var(--panel); font-size: 15px; }
.opt.on { background: var(--point-2); box-shadow: inset 0 -4px 0 var(--point); }
.opt:disabled { opacity: .3; }
.sheet-btns { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; }
.kpop { background: var(--panel); border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); padding: 16px 14px 14px; width: 100%; text-align: center; display: flex; flex-direction: column; gap: 12px; }
.kpop p { font-size: 19px; line-height: 1.35; margin: 0; }
.kpop img { margin: 0 auto; }
.kpop .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.keypad span { background: var(--soft); border: 2px solid var(--ink); padding: 5px 0; font-family: var(--px); font-size: 16px; color: var(--sub); min-height: 32px; }
.check { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; font-size: 15px; }
.check div { display: flex; gap: 8px; align-items: baseline; }
.check .o { color: var(--ok); font-family: var(--px); flex: none; width: 16px; }
.check .x { color: var(--bad); font-family: var(--px); flex: none; width: 16px; }
.check small { color: var(--sub); font-size: 13px; }

/* ===== 결과: 아케이드 하이스코어 ===== */
.hs { --hs-bg: #14122a; --hs-wh: #fffdf5; --hs-ye: #ffd23f; --hs-pk: #ff5d8f; --hs-cy: #5ee6d0; --hs-gr: #9a94b8;
  background: var(--hs-bg); color: var(--hs-wh); border: 4px solid var(--ink); box-shadow: inset 0 0 0 4px var(--hs-ye), inset 0 0 0 7px var(--hs-bg), inset 0 0 0 9px var(--hs-pk), 5px 5px 0 var(--ink);
  padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; flex: none; }
.hs::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .18) 0 2px, transparent 2px 4px); }
.hs-top { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.hs-top span { font-family: var(--px); font-size: 24px; color: var(--hs-ye); text-shadow: 2px 2px 0 var(--hs-pk); }
.hs-top small { font-size: 12px; color: var(--hs-cy); }
.blink { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .35; } }
.hs-player { display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--px); font-size: 15px; }
.hs-player span { color: var(--hs-gr); }
.hs-player b { font-weight: 400; font-family: var(--kr); font-size: 18px; border-bottom: 2px dashed var(--hs-ye); min-width: 48px; text-align: center; }
.hs .pen { font-size: 12px; padding: 0 5px; border: 1px solid var(--hs-ye); background: transparent; color: var(--hs-ye); position: relative; z-index: 1; }
.pname-in { width: 120px; font: inherit; font-size: 15px; border: 2px solid #ffd23f; padding: 2px 4px; background: #221f42; color: #fffdf5; text-align: center; position: relative; z-index: 1; user-select: text; -webkit-user-select: text; }
.hs-main { display: flex; align-items: center; gap: 12px; }
.hs-main img { flex: none; }
.hs-main small { display: block; font-size: 13px; color: var(--hs-cy); }
.hs-age { display: block; font-family: var(--px); font-weight: 400; font-size: 64px; line-height: 1; color: var(--hs-ye); text-shadow: 4px 4px 0 var(--hs-pk); font-variant-numeric: tabular-nums; }
.hs-age i { font-style: normal; font-family: var(--kr); font-size: 24px; color: var(--hs-wh); text-shadow: none; margin-left: 4px; }
.hs-rank { display: block; font-size: 15px; margin-top: 4px; }
.hs-score { display: flex; align-items: baseline; gap: 10px; background: #221f42; border: 2px solid var(--hs-cy); padding: 6px 10px; }
.hs-score span { font-family: var(--px); color: var(--hs-pk); font-size: 15px; }
.hs-score b { font-family: var(--px); font-weight: 400; font-size: 30px; letter-spacing: 2px; font-variant-numeric: tabular-nums; }
.hs-score small { margin-left: auto; font-family: var(--px); color: var(--hs-gr); font-size: 12px; }
.hs-stages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.hs-stages li { display: grid; grid-template-columns: 34px 1fr auto 30px 20px; gap: 6px; align-items: baseline; padding: 5px 0; border-bottom: 1px solid #2c2850; font-size: 14px; }
.hs-stages .st { font-family: var(--px); font-size: 11px; color: var(--hs-cy); }
.hs-stages .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hs-stages .rc { color: var(--hs-gr); font-size: 12px; white-space: nowrap; }
.hs-stages .pt { font-family: var(--px); text-align: right; font-variant-numeric: tabular-nums; }
.hs-stages .gr { font-family: var(--px); font-size: 17px; text-align: center; }
.hs-perk { display: flex; gap: 10px; align-items: flex-start; }
.hs-perk .tag { flex: none; font-size: 13px; padding: 2px 6px; color: var(--hs-bg); }
.hs-perk .tag.up { background: var(--hs-cy); }
.hs-perk .tag.down { background: var(--hs-pk); }
.hs-perk b { display: block; font-weight: 400; font-size: 17px; }
.hs-perk small { display: block; font-size: 12px; color: var(--hs-gr); line-height: 1.4; }
.hs-cont { text-align: center; font-family: var(--px); font-size: 16px; color: var(--hs-ye); }
.hs-cont b { font-weight: 400; font-size: 20px; }
.linkbtn { text-decoration: underline; font-size: 12px; color: var(--blue); }
.note.inapp { opacity: 1; }
.imgmodal { position: fixed; inset: 0; z-index: 60; background: rgba(29, 27, 44, .7); display: flex; align-items: center; justify-content: center; padding: 16px; }
.im-box { width: 100%; max-width: 400px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.im-box p { margin: 0; font-size: 14px; text-align: center; }
.im-box img { max-height: 62vh; width: auto; max-width: 100%; margin: 0 auto; border: 2px solid var(--ink); user-select: auto; -webkit-user-select: auto; -webkit-touch-callout: default; }
.hub-games .gcard:last-child { justify-content: center; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media (max-height: 640px) { .item img { width: 32px; height: auto; } .brand { display: none; } .chat { min-height: 56px; } .seat { height: 130px; } }

/* ===== 사이트 연결용 ===== */
.over a { color: inherit; }
.home-link { align-self: flex-start; font-size: 14px; background: var(--panel); border: 2px solid var(--ink); padding: 3px 9px; text-decoration: none; }
.challenge { padding: 10px 12px; font-size: 17px; background: var(--point-2); }
.challenge b { font-family: var(--px); font-weight: 400; font-size: 22px; color: var(--bad); }
.vs { padding: 10px 12px; font-size: 17px; text-align: center; }
.vs b { font-family: var(--px); font-weight: 400; }
.f-intro { padding: 14px; font-size: 15px; line-height: 1.6; user-select: text; -webkit-user-select: text; }
.f-intro h2 { font-weight: 400; font-size: 22px; margin: 0 0 6px; }
.f-intro h3 { font-weight: 400; font-size: 18px; margin: 14px 0 4px; color: var(--blue); }
.f-intro p { margin: 0; }
.f-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; font-size: 13px; }
.f-foot a { text-decoration: underline; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 70; background: var(--ink); color: var(--panel); padding: 8px 14px; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .2s; white-space: nowrap; }
.toast.show { opacity: 1; }

/* ===== 엘리베이터 ===== */
.elev { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: #3a3f5c; }
.floor { display: flex; justify-content: space-between; background: var(--ink); color: var(--bad); font-family: var(--px); font-size: 14px; padding: 5px 10px; }
.floor span:last-child { color: var(--point-2); font-size: 11px; }
.hall { flex: 1; min-height: 0; position: relative; overflow: hidden; margin: 8px 8px 0; border: 3px solid var(--ink);
  background: linear-gradient(#efe9ff 0 72%, #c9bce8 72% 100%); }
.door { position: absolute; top: 0; bottom: 0; width: 50%; z-index: 3; border: 3px solid var(--ink);
  background: repeating-linear-gradient(90deg, #b8bccb 0 10px, #a9adbd 10px 12px); transition: transform .18s steps(3); }
.door.l { left: 0; transform: translateX(-84%); }
.door.r { right: 0; transform: translateX(84%); }
.hall.shut .door.l, .hall.shut .door.r { transform: translateX(0); }
.who { position: absolute; left: 50%; bottom: 10%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; z-index: 2; }
.who.in { animation: walkin .25s steps(3); }
@keyframes walkin { from { transform: translate(-50%, 0) scale(.6); } to { transform: translate(-50%, 0) scale(1); } }
.who.board { transform: translate(-50%, -12px) scale(1.15); opacity: .4; transition: all .2s steps(2); }
.who .fig { display: flex; align-items: flex-end; gap: 2px; }
.who .bub { background: var(--panel); border: 2px solid var(--ink); padding: 2px 8px; font-size: 15px; white-space: nowrap; }
.who .tag { background: var(--ink); color: var(--panel); font-size: 13px; padding: 1px 6px; white-space: nowrap; }
.bang { position: absolute; top: 12%; left: 0; right: 0; text-align: center; z-index: 4; font-size: 22px; color: var(--panel); text-shadow: 2px 2px 0 var(--ink); }
.wbar { height: 10px; margin: 8px; border: 2px solid var(--ink); background: var(--panel); }
.wbar i { display: block; height: 100%; background: var(--point); transform-origin: left; }
.ebtns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ebtn { height: 78px; border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); font-size: 20px; color: var(--panel); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.ebtn b { font-family: var(--px); font-weight: 400; font-size: 18px; }
.ebtn.open { background: var(--ok); }
.ebtn.close { background: var(--bad); }
.ebtn:active { transform: translate(4px, 4px); box-shadow: none; }

/* ===== 단톡 ===== */
.phone { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.ph-head { background: var(--ink); color: var(--panel); padding: 6px 12px; font-size: 16px; }
.rooms { display: flex; flex-direction: column; }
.room { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 2px solid #e8e2d4; }
.room.ring { background: var(--point-2); animation: ring .3s steps(2) 2; }
@keyframes ring { 50% { transform: translateX(4px); } }
.rtag { width: 34px; height: 34px; border: 2px solid var(--ink); display: grid; place-items: center; color: var(--panel); font-size: 16px; flex: none; text-shadow: 1px 1px 0 var(--ink); }
.rtxt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rtxt b { font-weight: 400; font-size: 16px; }
.rtxt small { color: var(--sub); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { font-style: normal; background: var(--bad); color: var(--panel); font-family: var(--px); font-size: 11px; padding: 1px 6px; border: 2px solid var(--ink); }
.incoming { flex: 1; min-height: 70px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 10px; text-align: center; font-size: 15px; color: var(--sub); }
.incoming .from { color: var(--panel); border: 2px solid var(--ink); padding: 1px 8px; font-size: 14px; text-shadow: 1px 1px 0 var(--ink); }
.incoming .txt { color: var(--ink); font-size: 22px; background: var(--soft); border: 3px solid var(--ink); padding: 6px 12px; }
.incoming .sent { color: var(--ok); font-size: 20px; }
.incoming .oops { color: var(--bad); font-size: 18px; }
.replies { display: grid; gap: 8px; min-height: 160px; }
.rep { font-size: 17px; padding: 10px; }

/* ===== 버스 ===== */
.bus { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 10px; background: #f2f6e8; overflow: hidden; }
.led { background: #14110f; border: 3px solid var(--ink); padding: 8px 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.led small { font-family: var(--px); font-size: 11px; color: #ff9b3d; opacity: .8; }
.led b { font-family: var(--px); font-weight: 400; font-size: 26px; color: #ff9b3d; text-shadow: 0 0 6px rgba(255, 155, 61, .8); white-space: nowrap; }
.led b.flip { animation: flip .25s steps(3); }
@keyframes flip { from { transform: translateY(-10px); opacity: .2; } to { transform: none; opacity: 1; } }
.dest { align-self: center; background: var(--panel); border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); padding: 6px 14px; font-size: 16px; }
.dest b { font-weight: 400; font-size: 22px; color: var(--blue); margin-left: 6px; }
.view { flex: 1; min-height: 60px; border: 3px solid var(--ink); background: #bfe6ff; position: relative; overflow: hidden; }
.view i { position: absolute; bottom: 0; width: 46px; background: #8a91b4; border: 2px solid var(--ink); animation: pass 2.2s steps(11) infinite; }
.view i:nth-child(1) { height: 60%; animation-delay: 0s; }
.view i:nth-child(2) { height: 40%; animation-delay: -.45s; background: #b98aaf; }
.view i:nth-child(3) { height: 75%; animation-delay: -.9s; }
.view i:nth-child(4) { height: 50%; animation-delay: -1.35s; background: #ffc145; }
.view i:nth-child(5) { height: 66%; animation-delay: -1.8s; background: #7fb24c; }
@keyframes pass { from { left: 110%; } to { left: -20%; } }
.bmsg { min-height: 24px; text-align: center; font-size: 17px; }
.bell { align-self: center; width: 128px; height: 128px; border-radius: 50%; background: var(--bad); color: var(--panel); border: 4px solid var(--ink); box-shadow: 0 6px 0 var(--ink);
  font-family: var(--px); font-size: 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; }
.bell small { font-family: var(--kr); font-size: 14px; }
.bell:active, .bell.ring { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink); }
