:root {
  --wall: 62;          /* 기내 벽 밝기(%) — JS가 바꾼다 */
  --glow: 230, 236, 245;
  --glow-a: .25;
  --shade: 0;
  --ink: #f4f5f7;
  --muted: rgba(244, 245, 247, .62);
  --amber: #ffcf5a;
  --board: #0b0d12;
  --line: rgba(255, 255, 255, .08);
  --accent: #4f8cff;
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #0b0d12; color: var(--ink); overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
[hidden] { display: none !important; }

/* ── 기내 ── */
#cabin {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  background:
    radial-gradient(ellipse 46% 42% at 50% 46%, rgba(var(--glow), var(--glow-a)), transparent 72%),
    radial-gradient(ellipse 120% 60% at 50% 0%, hsl(36 8% calc(var(--wall) * 1.08%)), transparent 70%),
    linear-gradient(180deg, hsl(38 6% calc(var(--wall) * 1%)) 0%, hsl(36 5% calc(var(--wall) * .82%)) 100%);
  transition: background .8s;
}
#cabin::before { /* 벽 패널 이음매 */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, transparent calc(50% - min(31vw, 36vh) - 1px), rgba(0,0,0,.12) calc(50% - min(31vw, 36vh)), rgba(255,255,255,.05) calc(50% - min(31vw, 36vh) + 1px), transparent calc(50% - min(31vw, 36vh) + 2px),
      transparent calc(50% + min(31vw, 36vh) - 2px), rgba(0,0,0,.12) calc(50% + min(31vw, 36vh)), rgba(255,255,255,.05) calc(50% + min(31vw, 36vh) + 1px), transparent calc(50% + min(31vw, 36vh) + 2px));
}

#window-wrap {
  position: relative;
  width: min(calc(100vw - 72px), 66vh * .68);
  aspect-ratio: .68;
  padding: clamp(14px, 3.2vh, 30px);
  border-radius: 46% / 33%;
  background:
    radial-gradient(ellipse at 50% 30%, hsl(38 6% calc(var(--wall) * 1.18%)), hsl(36 5% calc(var(--wall) * .9%)));
  box-shadow:
    0 2px 0 rgba(255,255,255,.12) inset,
    0 -10px 30px rgba(0,0,0,.18) inset,
    0 30px 60px -20px rgba(0,0,0,.35);
  margin-top: -6vh;
}
#window {
  position: relative; width: 100%; height: 100%;
  border-radius: 44% / 31%;
  overflow: hidden;
  background: #8aa;
  box-shadow: 0 0 0 3px rgba(0,0,0,.25);
}
#sky, #fx { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#glass { /* 아크릴 이중창 안쪽 그림자와 반사 */
  position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  box-shadow: 0 0 0 10px rgba(0,0,0,.18) inset, 0 0 40px 6px rgba(0,0,0,.4) inset;
  background: linear-gradient(118deg, rgba(255,255,255,.07) 0%, transparent 28%, transparent 70%, rgba(255,255,255,.04) 82%, transparent 90%);
}
#shade {
  position: absolute; left: 0; right: 0; top: 0;
  height: calc(var(--shade) * 100%);
  background:
    repeating-linear-gradient(180deg, rgba(0,0,0,0) 0 7px, rgba(0,0,0,.035) 7px 8px),
    linear-gradient(180deg, hsl(40 8% calc(var(--wall) * .95% + 6%)), hsl(38 7% calc(var(--wall) * 1.05% + 4%)));
  box-shadow: 0 4px 10px rgba(0,0,0,.3);
}
#shade-lip {
  position: absolute; left: 0; right: 0; bottom: -2px; height: 22px;
  cursor: ns-resize; touch-action: none;
  background: linear-gradient(180deg, hsl(38 7% calc(var(--wall) * 1.1% + 6%)), hsl(36 6% calc(var(--wall) * .8% + 2%)));
  border-top: 1px solid rgba(255,255,255,.2);
}
#shade-lip::after {
  content: ''; position: absolute; left: 50%; top: 7px; width: 34px; height: 5px; margin-left: -17px;
  border-radius: 3px; background: rgba(0,0,0,.25);
}

#signs {
  position: absolute; top: max(18px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  display: flex; gap: 2px; padding: 5px; border-radius: 10px;
  background: hsl(30 4% calc(var(--wall) * .5%)); box-shadow: 0 1px 0 rgba(255,255,255,.1), 0 2px 6px rgba(0,0,0,.25) inset;
}
.sign { width: 40px; height: 32px; display: grid; place-items: center; border-radius: 6px; background: #1a1a1c; transition: background .4s, box-shadow .4s; }
.sign svg { width: 22px; height: 22px; fill: none; stroke: #3c3c40; stroke-width: 2; stroke-linecap: round; }
.sign circle:first-child { fill: #3c3c40; stroke: none; }
#sign-smoke svg rect { fill: none; }
.sign.on { background: #2a2217; box-shadow: 0 0 18px rgba(255,190,90,.35), 0 0 0 1px rgba(255,200,120,.2) inset; }
.sign.on svg { stroke: #ffc566; }
.sign.on svg circle:first-child { fill: #ffc566; }
#sign-smoke.on svg circle:first-child { fill: none; }
#sign-smoke svg .ring { stroke: #3c3c40; }
#sign-smoke.on svg .ring { stroke: #ff7a5a; }

#caption {
  position: absolute; top: max(70px, calc(env(safe-area-inset-top) + 60px)); left: 50%;
  transform: translate(-50%, -6px); width: max-content; max-width: min(560px, calc(100vw - 32px));
  padding: 10px 18px; border-radius: 14px;
  background: rgba(14, 16, 22, .78); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-size: 15px; line-height: 1.5; text-align: center;
  opacity: 0; transition: opacity .6s, transform .6s; pointer-events: none;
}
#caption.show { opacity: 1; transform: translate(-50%, 0); }

#hud {
  position: absolute; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(560px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 16px;
  padding: 14px 16px 14px 20px; border-radius: 20px;
  background: rgba(14, 16, 22, .72); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  transition: opacity .8s, background .8s;
}
#hud.idle { background: rgba(14,16,22,0); box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
#hud.idle #hud-buttons, #hud.idle #hud-route, #hud.idle #hud-sub, #hud.idle #hud-bar { opacity: 0; pointer-events: none; }
#hud.idle #hud-time { opacity: .5; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
#hud-main { flex: 1; min-width: 0; }
#hud-route, #hud-sub, #hud-bar, #hud-buttons { transition: opacity .8s; }
#hud-route { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#hud-time { font-size: 34px; font-weight: 600; letter-spacing: -.5px; font-variant-numeric: tabular-nums; line-height: 1.15; transition: opacity .8s; }
#hud-sub { display: flex; gap: 10px; font-size: 13px; color: var(--muted); }
#hud-phase { color: var(--ink); }
#hud-bar { position: relative; height: 3px; margin-top: 10px; border-radius: 2px; background: rgba(255,255,255,.14); }
#hud-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: rgba(255,255,255,.75); }
#hud-plane { position: absolute; top: 50%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.18); }
#hud-buttons { display: flex; align-items: center; gap: 2px; }
.icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--ink); transition: background .2s; }
.icon:hover { background: rgba(255,255,255,.1); }
.icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon.danger { color: #ff8a7a; }
.icon.muted .waves { opacity: 0; }
.icon .slash { display: none; }
.icon.off { color: rgba(244,245,247,.45); }
.icon.off .slash { display: inline; }
.icon.off .waves { opacity: 0; }
.vol { position: relative; }
.vol input {
  position: absolute; bottom: 52px; left: 50%; width: 120px; transform: translateX(-50%) rotate(-90deg); transform-origin: center;
  translate: 0 -40px; opacity: 0; pointer-events: none; transition: opacity .2s; accent-color: #fff;
}
.vol:hover input, .vol:focus-within input, .vol.open input { opacity: 1; pointer-events: auto; }
@media (hover: none) {
  .vol input { transform: translateX(-50%); translate: 0; bottom: 54px; width: 170px; padding: 12px 14px; border-radius: 14px; background: rgba(14,16,22,.9); }
  .vol:hover input { opacity: 0; pointer-events: none; }
  .vol.open input { opacity: 1; pointer-events: auto; }
  .vol::before { display: none; }
}
.vol::before { content: ''; position: absolute; bottom: 100%; left: -6px; right: -6px; height: 150px; }
.vol:not(:hover)::before { pointer-events: none; }

/* ── 비행 지도 ── */
#map-panel {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(0,0,0,.45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  padding: 16px; z-index: 5;
}
.seatback {
  width: min(880px, 100%); border-radius: 22px; padding: 10px;
  background: linear-gradient(180deg, #2a2c31, #1c1d21); box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 1px 0 rgba(255,255,255,.08) inset;
}
.map-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 8px 10px; flex-wrap: wrap; }
.map-head b { font-size: 16px; }
.map-head span { margin-left: 10px; color: var(--muted); font-size: 13px; }
.map-tabs { display: flex; gap: 4px; }
.map-tabs button { padding: 6px 12px; border-radius: 9px; font-size: 13px; color: var(--muted); background: rgba(255,255,255,.05); }
.map-tabs button.on { background: rgba(255,255,255,.16); color: var(--ink); }
#map { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; background: #0b2440; }
.map-info { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; margin-top: 10px; border-radius: 12px; overflow: hidden; background: var(--line); }
.map-info div { background: #18191d; padding: 10px 12px; }
.map-info span { display: block; font-size: 11.5px; color: var(--muted); }
.map-info b { display: block; margin-top: 2px; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.map-goal { padding: 10px 8px 2px; font-size: 13px; color: var(--muted); }
.map-goal:empty { display: none; }

/* ── 출발 게이트 ── */
.overlay {
  position: fixed; inset: 0; overflow-y: auto; z-index: 10;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, #1b2233, transparent 60%), var(--board);
  padding: max(20px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
}
.gate-head { max-width: 920px; margin: 0 auto 22px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 34px; height: 34px; padding: 6px; border-radius: 10px; background: #fff; fill: #0b0d12; transform: rotate(45deg); }
.brand b { display: block; font-size: 18px; letter-spacing: -.2px; }
.brand span { font-size: 13px; color: var(--muted); }
.gate-actions { display: flex; gap: 8px; align-items: center; }
.loc { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 12px; background: rgba(255,255,255,.06); font-size: 13px; color: var(--muted); }
.loc select { background: #1a1d25; border: 0; border-radius: 8px; padding: 6px 8px; color: var(--ink); }
.ghost { padding: 9px 14px; border-radius: 12px; background: rgba(255,255,255,.07); font-size: 14px; }
.ghost:hover { background: rgba(255,255,255,.12); }
.primary { padding: 12px 20px; border-radius: 13px; background: #fff; color: #0b0d12; font-weight: 600; font-size: 15px; }
.primary:hover { background: #e9ecf2; }

.board { max-width: 920px; margin: 0 auto; border-radius: 18px; background: #06070a; box-shadow: 0 0 0 1px var(--line) inset; padding: 18px 18px 8px; }
.board-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.board h1 { margin: 0; font-size: 24px; color: var(--amber); letter-spacing: -.3px; }
.board h1 small { font-size: 14px; color: rgba(255,207,90,.5); font-weight: 500; margin-left: 6px; }
.clock { font-variant-numeric: tabular-nums; color: var(--amber); font-size: 20px; font-weight: 600; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chips button { padding: 7px 13px; border-radius: 999px; font-size: 13px; background: rgba(255,255,255,.06); color: var(--muted); }
.chips button.on { background: var(--amber); color: #1a1405; font-weight: 600; }
.board-cols, .row { display: grid; grid-template-columns: 84px 1fr 96px 108px 92px; gap: 10px; align-items: center; }
.board-cols { padding: 0 10px 8px; font-size: 12px; color: rgba(255,255,255,.4); border-bottom: 1px solid var(--line); }
.row { width: 100%; text-align: left; padding: 11px 10px; border-bottom: 1px solid rgba(255,255,255,.05); font-variant-numeric: tabular-nums; color: var(--amber); border-radius: 8px; transition: background .15s; }
.row:hover, .row:focus-visible { background: rgba(255,207,90,.08); outline: none; }
.row .dest b { font-size: 16px; font-weight: 600; color: #ffe39c; }
.row .dest span { margin-left: 8px; font-size: 13px; color: rgba(255,207,90,.55); }
.row .fn { font-weight: 600; letter-spacing: .3px; }
.row .note { font-size: 12px; color: #8fe0a0; }
.row .note.long { color: #9cc3ff; }
.gate-note { max-width: 920px; margin: 16px auto 0; font-size: 13px; color: rgba(255,255,255,.4); line-height: 1.6; text-align: center; }

/* ── 탑승권 ── */
.modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: rgba(4,5,8,.66); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); overflow-y: auto; }
.pass-wrap { width: min(740px, 100%); animation: rise .35s ease-out; }
.pass { display: grid; grid-template-columns: 1fr 200px; color: #17181c; filter: drop-shadow(0 30px 50px rgba(0,0,0,.45)); }
.pass-main { background: #f7f5ef; border-radius: 18px 0 0 18px; overflow: hidden; }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } }
.pass-main { padding: 0 22px 20px; }
.pass-band { display: flex; justify-content: space-between; margin: 0 -22px 16px; padding: 12px 22px; background: #17181c; color: #f7f5ef; font-size: 13px; font-weight: 600; letter-spacing: .3px; }
.pass-field { display: block; }
.pass-field span, .pass-grid span { display: block; font-size: 11px; color: #7a7b80; margin-bottom: 3px; }
.pass-field input { width: 100%; border: 0; border-bottom: 1.5px dashed #c9c6bd; background: transparent; padding: 4px 0 6px; font-size: 17px; font-weight: 600; color: #17181c; outline: none; }
.pass-field input:focus { border-bottom-color: #17181c; }
.pass-route { display: flex; align-items: center; justify-content: space-between; margin: 16px 0; }
.pass-route b { display: block; font-size: 44px; font-weight: 800; letter-spacing: -1px; line-height: 1; }
.pass-route span { font-size: 13px; color: #55565c; }
.pass-route .to { text-align: right; }
.pass-route svg { width: 30px; height: 30px; fill: #17181c; }
.pass-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 10px; margin-bottom: 16px; padding: 14px 0; border-top: 1px solid #e3e0d7; border-bottom: 1px solid #e3e0d7; }
.pass-grid b { font-size: 15px; font-variant-numeric: tabular-nums; }
.pass-stub { position: relative; display: flex; flex-direction: column; border-left: 2px dashed #cfcabd; background: #efece4; border-radius: 0 18px 18px 0; overflow: hidden; transform-origin: 0 100%; }
.stub-band { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 16px; background: #17181c; color: #f7f5ef; font-size: 13px; font-weight: 600; }
.stub-band small { font-size: 9.5px; letter-spacing: .4px; opacity: .7; }
.stub-body { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 14px 16px 16px; }
.stub-field span, .stub-grid span { display: block; font-size: 10px; color: #7a7b80; margin-bottom: 2px; }
.stub-field b { display: block; font-size: 14px; min-height: 1.3em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stub-route { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-top: 1px solid #ddd8cc; border-bottom: 1px solid #ddd8cc; }
.stub-route b { font-size: 24px; font-weight: 800; letter-spacing: -.5px; }
.stub-route i { font-style: normal; color: #7a7b80; }
.stub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 8px; }
.stub-grid b { font-size: 13px; font-variant-numeric: tabular-nums; }
.barcode { height: 40px; margin-top: auto; display: flex; align-items: stretch; overflow: hidden; }
.barcode i { display: block; flex: none; background: #17181c; }
.pass-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.pass-actions .ghost { color: #f4f5f7; }
.pass-actions .primary { min-width: 140px; }

/* 탑승하기: 절취선을 따라 오른쪽 칸이 뜯겨 나가고, 탑승권이 치워진다 */
.pass.torn .pass-main { -webkit-mask: radial-gradient(circle at 100% 6px, transparent 3px, #000 3.5px) 0 0 / 100% 12px repeat-y; mask: radial-gradient(circle at 100% 6px, transparent 3px, #000 3.5px) 0 0 / 100% 12px repeat-y; }
.pass.torn .pass-stub { border-left-color: transparent; -webkit-mask: radial-gradient(circle at 0 6px, transparent 3px, #000 3.5px) 0 0 / 100% 12px repeat-y; mask: radial-gradient(circle at 0 6px, transparent 3px, #000 3.5px) 0 0 / 100% 12px repeat-y; animation: tear .95s cubic-bezier(.45, 0, .7, .4) forwards; }
@keyframes tear {
  0% { transform: none; }
  22% { transform: translate(4px, -3px) rotate(3.5deg); }
  40% { transform: translate(10px, -6px) rotate(6deg); opacity: 1; }
  100% { transform: translate(140px, 420px) rotate(28deg); opacity: 0; }
}
.pass-wrap.leaving .pass-actions { opacity: 0; transition: opacity .2s; }
.pass-wrap.gone { transform: translateY(-24px) scale(.97); opacity: 0; transition: transform .5s ease-in, opacity .5s ease-in; }
#pass-modal { transition: opacity .55s ease; }
#pass-modal.fading { opacity: 0; }

/* ── 도착 ── */
#arrival { display: grid; place-items: center; background: rgba(6,7,10,.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.arr-card { width: min(480px, 100%); text-align: center; padding: 30px 22px; border-radius: 24px; background: #12141a; box-shadow: 0 0 0 1px var(--line) inset, 0 30px 80px rgba(0,0,0,.5); }
.arr-kicker { margin: 0; font-size: 13px; color: var(--muted); }
.arr-card h2 { margin: 6px 0 18px; font-size: 26px; letter-spacing: -.4px; }
.stamp {
  --ink-c: #c8463a;
  width: 180px; height: 180px; margin: 0 auto 22px; border-radius: 50%;
  display: grid; place-items: center; text-align: center; color: var(--ink-c);
  border: 4px solid var(--ink-c); box-shadow: 0 0 0 4px #12141a inset, 0 0 0 6px var(--ink-c) inset;
  transform: rotate(var(--rot, -8deg)); opacity: .92;
  animation: stamp .5s cubic-bezier(.3,1.6,.5,1) both .2s;
}
.stamp b { display: block; font-size: 34px; font-weight: 800; letter-spacing: 1px; line-height: 1; }
.stamp span { display: block; font-size: 15px; font-weight: 700; margin-top: 4px; }
.stamp small { display: block; font-size: 11px; font-weight: 600; margin-top: 6px; letter-spacing: .5px; }
.stamp.small { width: 96px; height: 96px; border-width: 2.5px; box-shadow: 0 0 0 3px #12141a inset, 0 0 0 4.5px var(--ink-c) inset; animation: none; margin: 0; }
.stamp.small b { font-size: 18px; } .stamp.small span { font-size: 11px; margin-top: 2px; } .stamp.small small { font-size: 9px; margin-top: 3px; }
.stamp.diverted { --ink-c: #8a8f99; }
@keyframes stamp { from { transform: scale(1.8) rotate(var(--rot, -8deg)); opacity: 0; } }
.arr-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; border-radius: 14px; overflow: hidden; background: var(--line); margin-bottom: 18px; }
.arr-stats div { background: #181a21; padding: 12px 6px; }
.arr-stats span { display: block; font-size: 11.5px; color: var(--muted); }
.arr-stats b { display: block; margin-top: 3px; font-size: 16px; font-variant-numeric: tabular-nums; }
.arr-goal { margin-bottom: 18px; font-size: 14px; color: var(--muted); }
.arr-goal p { margin: 0 0 10px; } .arr-goal b { color: var(--ink); }
.arr-goal-btns { display: flex; gap: 8px; justify-content: center; }
.arr-goal-btns button { padding: 8px 14px; border-radius: 10px; background: rgba(255,255,255,.07); font-size: 14px; }
.arr-goal-btns button.on { background: #fff; color: #0b0d12; font-weight: 600; }
.arr-actions { display: flex; flex-direction: column; gap: 8px; }

/* ── 비행 기록 ── */
.logbook { width: min(720px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 22px; border-radius: 22px; background: #12141a; box-shadow: 0 0 0 1px var(--line) inset; }
.log-head { display: flex; justify-content: space-between; align-items: center; }
.logbook h2 { margin: 0; font-size: 22px; }
.logbook h3 { margin: 22px 0 10px; font-size: 14px; color: var(--muted); font-weight: 600; }
.log-totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 16px; border-radius: 14px; overflow: hidden; background: var(--line); }
.log-totals div { background: #181a21; padding: 14px; }
.log-totals span { display: block; font-size: 12px; color: var(--muted); }
.log-totals b { display: block; margin-top: 4px; font-size: 20px; font-variant-numeric: tabular-nums; }
.stamps { display: flex; flex-wrap: wrap; gap: 14px; padding: 6px 4px; }
.stamps .stamp.small { background: transparent; box-shadow: 0 0 0 3px #12141a inset, 0 0 0 4.5px var(--ink-c) inset; }
.empty { color: rgba(255,255,255,.4); font-size: 14px; }
.log-list { list-style: none; margin: 0; padding: 0; }
.log-list li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.log-list li small { grid-column: 1 / -1; color: var(--muted); font-size: 12.5px; }
.log-list .st { font-size: 12.5px; color: #8fe0a0; }
.log-list .st.div { color: #a3a8b3; }

.dialog { width: min(380px, 100%); padding: 22px; border-radius: 20px; background: #15171d; box-shadow: 0 0 0 1px var(--line) inset, 0 30px 80px rgba(0,0,0,.5); }
.dialog h3 { margin: 0 0 8px; font-size: 18px; }
.dialog p { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.dialog-btns { display: flex; gap: 8px; justify-content: flex-end; }
.danger-btn { padding: 10px 16px; border-radius: 12px; background: #e0574a; color: #fff; font-weight: 600; }

@media (max-width: 640px) {
  .board-cols, .row { grid-template-columns: 62px 1fr 76px 62px; gap: 8px; }
  .hide-sm { display: none; }
  .row .dest span { display: block; margin: 2px 0 0; }
  .pass { grid-template-columns: 1fr; }
  .pass-main { border-radius: 18px 18px 0 0; }
  .pass-stub { border-left: 0; border-top: 2px dashed #cfcabd; border-radius: 0 0 18px 18px; transform-origin: 100% 0; }
  .stub-band { padding: 9px 16px; }
  .stub-body { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; padding: 12px 16px 14px; }
  .stub-grid { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); }
  .stub-route { border: 0; padding: 0; }
  .stub-route b { font-size: 20px; }
  .barcode { grid-column: 1 / -1; height: 32px; }
  .pass.torn .pass-main { -webkit-mask: radial-gradient(circle at 6px 100%, transparent 3px, #000 3.5px) 0 0 / 12px 100% repeat-x; mask: radial-gradient(circle at 6px 100%, transparent 3px, #000 3.5px) 0 0 / 12px 100% repeat-x; }
  .pass.torn .pass-stub { border-top-color: transparent; -webkit-mask: radial-gradient(circle at 6px 0, transparent 3px, #000 3.5px) 0 0 / 12px 100% repeat-x; mask: radial-gradient(circle at 6px 0, transparent 3px, #000 3.5px) 0 0 / 12px 100% repeat-x; animation-name: tear-down; }
  @keyframes tear-down {
    0% { transform: none; }
    22% { transform: translate(-3px, 4px) rotate(-2.5deg); }
    40% { transform: translate(-8px, 10px) rotate(-5deg); opacity: 1; }
    100% { transform: translate(-90px, 380px) rotate(-22deg); opacity: 0; }
  }
  .pass-route b { font-size: 36px; }
  .map-info { grid-template-columns: repeat(3, 1fr); }
  #hud { gap: 8px; padding: 12px 10px 12px 16px; }
  #hud-time { font-size: 28px; }
  .icon { width: 36px; height: 36px; }
  #btn-full { display: none; }
}
@media (max-height: 560px) { #window-wrap { width: min(calc(100vw - 72px), 60vh * .68); margin-top: -14vh; } }

/* 스크롤바 숨김(스크롤은 그대로) */
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; }
#hud-sub { white-space: nowrap; overflow: hidden; }
@media (max-width: 640px) { #hud-eta { display: none; } #hud-buttons { gap: 0; } .icon { width: 34px; } }
