:root {
  --brand: #5b4cf5;
  --brand-dark: #4636e0;
  --brand-soft: #efedff;
  --text: #111318;
  --text-2: #4b5060;
  --muted: #8b909c;
  --line: #e6e8ee;
  --bg: #ffffff;
  --bg-2: #f4f5f8;
  --ok: #12a150;
  --bad: #e5484d;
  --radius: 16px;
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

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

.screen { display: none; min-height: 100vh; }
.screen.active { display: block; }

.btn-primary, .btn-ghost {
  height: 48px; padding: 0 20px; border-radius: 12px; font-weight: 700; font-size: 15px;
  border: 1px solid transparent; transition: background .15s, transform .05s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: #fff; color: var(--text-2); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-2); }
.btn-primary:active, .btn-ghost:active { transform: translateY(1px); }
.btn-xl { width: 100%; height: 58px; font-size: 17px; border-radius: 14px; margin-top: 8px; }

.badge {
  display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  letter-spacing: .04em; background: var(--brand-soft); color: var(--brand);
}

/* ───── 설정 ───── */
#screen-setup { background: linear-gradient(180deg, #eceef4 0, #fff 420px); }
.setup { max-width: 640px; margin: 0 auto; padding: 64px 16px 80px; }
.setup-head { text-align: center; margin-bottom: 28px; }
.setup-head h1 { font-size: 34px; margin: 14px 0 10px; letter-spacing: -.02em; }
.setup-head p { color: var(--text-2); line-height: 1.6; margin: 0; }
.setup-card {
  background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 28px;
  box-shadow: 0 10px 40px rgba(20, 24, 60, .06);
}
.field { margin-bottom: 22px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.field-head label, .field-label { font-weight: 700; font-size: 15px; display: block; margin-bottom: 10px; }
.field-label small { font-weight: 500; color: var(--muted); font-size: 12px; margin-left: 6px; }
.field-head label { margin: 0; }
.field-head output { font-weight: 800; font-size: 22px; color: var(--brand); font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; accent-color: var(--brand); }
.ticks { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-top: 4px; }
.seg { display: flex; background: var(--bg-2); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button {
  flex: 1; border: 0; background: transparent; height: 38px; border-radius: 9px; font-weight: 600;
  color: var(--text-2); font-size: 14px; white-space: nowrap;
}
.seg button.on { background: #fff; color: var(--brand); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.seg button small { font-size: 10px; font-weight: 700; color: var(--muted); margin-left: 2px; }
.hint { margin: 8px 2px 0; font-size: 13px; color: var(--muted); }

/* ───── 게이트 ───── */
.gate { background: linear-gradient(180deg, #eceef3 0, #fff 520px); }
.practice-bar {
  position: fixed; top: 16px; left: 16px; display: flex; gap: 8px; align-items: center; z-index: 5;
}
.chip, .chip-btn {
  height: 32px; padding: 0 12px; border-radius: 999px; font-size: 13px; display: inline-flex; align-items: center;
  background: rgba(255, 255, 255, .8); border: 1px solid var(--line); color: var(--text-2);
}
.chip-btn:hover { background: #fff; }
.gate-inner { display: flex; flex-direction: column; align-items: center; padding: 120px 16px 80px; }
.gate-inner h2 { font-size: 26px; font-weight: 700; margin: 0 0 52px; letter-spacing: -.01em; }
.poster {
  width: 250px; height: 336px; border-radius: 16px; background: #fff; overflow: hidden;
  box-shadow: 0 12px 30px rgba(15, 23, 60, .14);
}
.poster-art {
  position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background:
    linear-gradient(118deg, #14286f 0 22%, transparent 22.3%),
    linear-gradient(118deg, transparent 0 8%, #4aa3ea 8.3% 13%, transparent 13.3%),
    linear-gradient(298deg, #14286f 0 20%, transparent 20.3%),
    linear-gradient(298deg, transparent 0 22%, #4aa3ea 22.3% 30%, transparent 30.3%),
    #fff;
}
.poster-year { font-weight: 800; font-size: 18px; color: #14286f; font-style: italic; }
.poster-year em { color: #3b8fdc; }
.poster-title {
  font-weight: 900; font-size: 30px; color: #14286f; letter-spacing: -.02em; padding: 2px 10px;
  border-top: 3px solid #4aa3ea; border-bottom: 3px solid #4aa3ea; margin: 4px 0;
}
.poster-sub { font-size: 12px; font-weight: 800; color: #14286f; letter-spacing: .2em; }
.gate-name { font-size: 18px; margin: 30px 0 46px; }
.gate-btn {
  width: min(740px, 100%); height: 68px; border-radius: 16px; border: 0; font-size: 21px; font-weight: 700;
  background: var(--brand); color: #fff; font-variant-numeric: tabular-nums;
}
.gate-btn:hover:not(:disabled) { background: var(--brand-dark); }
.gate-btn:disabled { background: #f1f2f5; color: #8b8f99; cursor: default; }
.gate-btn.busy { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.gate-error {
  width: min(740px, 100%); margin: 14px 0 0; padding: 12px 16px; border-radius: 12px;
  background: #fff1f1; color: #b4232a; font-size: 14px; line-height: 1.5; text-align: center;
}
.btn-spin {
  width: 18px; height: 18px; border: 3px solid rgba(0, 0, 0, .12); border-top-color: #8b8f99;
  border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; flex: none;
}
.btn-spin.dark { border-top-color: var(--brand); width: 14px; height: 14px; border-width: 2px; vertical-align: -2px; margin-right: 6px; }

/* ───── 대기열 ───── */
.queue { background: linear-gradient(180deg, #eceef3 0, #fff 520px); display: none; }
.queue.active { display: flex; align-items: center; justify-content: center; padding: 16px; }
.queue-card {
  width: min(520px, 100%); background: #fff; border-radius: 24px; padding: 44px 36px 32px; text-align: center;
  box-shadow: 0 16px 50px rgba(20, 24, 60, .10);
}
.q-eyebrow { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.queue-card h2 { font-size: 22px; margin: 0 0 32px; }
.q-label { margin: 0; font-weight: 600; color: var(--text-2); }
.q-num { margin: 6px 0 22px; font-size: 54px; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.q-num small { font-size: 20px; margin-left: 4px; color: var(--text); }
.q-bar { height: 10px; background: var(--bg-2); border-radius: 99px; overflow: hidden; }
.q-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #8b7dff, var(--brand)); border-radius: 99px; transition: width .2s linear; }
.q-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0; }
.q-stats div { background: var(--bg-2); border-radius: 14px; padding: 14px; }
.q-stats dt { font-size: 13px; color: var(--muted); }
.q-stats dd { margin: 6px 0 0; font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.q-poll { margin: -12px 0 16px; min-height: 18px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.q-status { margin: 0 0 12px; font-weight: 700; color: var(--brand); font-size: 14px; }
.q-warn { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 0; }
.link-btn { margin-top: 18px; background: none; border: 0; color: var(--brand); font-weight: 600; font-size: 14px; text-decoration: underline; }

/* ───── 예매 창 (NOL 좌석 선택 화면) ───── */
.booking { position: fixed; inset: 0; background: #fff; z-index: 20; display: flex; --nol: #4152ff; }
.bw { position: relative; width: 100%; height: 100%; background: #fff; overflow: hidden; display: flex; flex-direction: column; }
.nol-head { display: flex; align-items: center; height: 72px; padding: 0 40px; flex: none; }
.nol-logo { font-size: 24px; font-weight: 800; color: var(--nol); letter-spacing: -.04em; white-space: nowrap; }
.nol-head nav { margin-left: auto; display: flex; align-items: center; gap: 22px; font-size: 15px; color: #1f2128; font-weight: 500; }
.nol-head nav i { width: 1px; height: 14px; background: #d5d7de; }
.nol-head nav button { border: 0; background: none; padding: 0; font-size: 15px; color: #8b909c; }
.nol-head nav button:hover { color: var(--bad); }
.nol-title { display: flex; align-items: center; gap: 14px; height: 64px; padding: 0 40px; flex: none; min-width: 0; box-shadow: 0 1px 0 #eceef2; position: relative; z-index: 1; }
.nol-title strong { font-size: 19px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nol-title > i { width: 1px; height: 16px; background: #cfd2da; flex: none; }
.nol-timer { margin-left: auto; font-size: 18px; font-weight: 700; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.nol-timer b { color: var(--nol); font-size: 19px; font-variant-numeric: tabular-nums; }
.nol-timer em { font-style: normal; width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid #a3a7b3; color: #a3a7b3; font-size: 10px; display: inline-flex; align-items: center; justify-content: center; cursor: help; }
.bw:not([data-step="2"]) .nol-timer { display: none; }
.bw[data-step="2"] .bw-steps { display: none; }
.bw-steps { display: flex; list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); flex: none; overflow-x: auto; }
.bw-steps li { flex: 1; padding: 12px 10px; font-size: 13px; color: var(--muted); text-align: center; white-space: nowrap; border-bottom: 3px solid transparent; }
.bw-steps li b { margin-right: 4px; }
.bw-steps li.done { color: var(--text-2); }
.bw-steps li.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 700; }
.bw-body { flex: 1; display: grid; grid-template-columns: 1fr 340px; min-height: 0; }
.bw[data-step="2"] .bw-body { grid-template-columns: 1fr minmax(340px, 32%); }
.bw-main { overflow: auto; padding: 16px 20px; position: relative; }
.bw-main.seatmap { overflow: hidden; padding: 0; background: #eff0f3; }
.bw-side { border-left: 1px solid var(--line); background: #fafbfc; overflow: auto; padding: 16px; display: flex; flex-direction: column; }
.bw-side.zone-side { background: #fff; padding: 0; overflow: hidden; border-left: 0; }

.stadium { width: 100%; height: 100%; display: block; touch-action: none; user-select: none; -webkit-user-select: none; }
.stadium .sec { cursor: pointer; fill: transparent; stroke: none; }
.stadium .sec:hover { fill: rgba(255, 255, 255, .18); }
.stadium .sec.on { stroke: #1b1d24; stroke-width: 3; stroke-linejoin: round; fill: rgba(255, 255, 255, .12); }
.stadium image { pointer-events: none; }
.stadium.seats { cursor: grab; }
.stadium .st { cursor: pointer; }
.stadium .st:hover { stroke: #1b1d24; stroke-width: .3; }
.stadium .st.x { cursor: default; }
.stadium .st.x:hover { stroke: none; }
.stadium .st.on { fill: #1b1d24; stroke: var(--nol); stroke-width: .4; }

.map-busy { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(239, 240, 243, .45); }
.price-pill, .zoom button, .price-pop { background: #fff; border: 0; color: #2a2d36; box-shadow: 0 2px 10px rgba(20, 24, 40, .08); }
.price-pill { position: absolute; left: 24px; bottom: 24px; height: 44px; padding: 0 18px; border-radius: 999px; font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.price-pill em { font-style: normal; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid currentColor; font-size: 10px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.price-pop { position: absolute; left: 24px; bottom: 80px; width: 180px; max-height: min(320px, calc(100% - 110px)); border-radius: 12px; display: flex; }
.price-pop ul { list-style: none; margin: 0; padding: 6px 16px; overflow: auto; flex: 1; }
.price-pop li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #eef0f3; }
.price-pop li:last-child { border-bottom: 0; }
.price-pop li i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.price-pop li div { display: flex; flex-direction: column; gap: 1px; }
.price-pop li span { font-size: 12px; color: #2a2d36; }
.price-pop li b { font-size: 14px; font-variant-numeric: tabular-nums; }
.pp-x { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 18px; color: #8b909c; line-height: 1; padding: 4px; }
.zoom { position: absolute; right: 24px; bottom: 24px; display: flex; flex-direction: column; gap: 14px; }
.zoom-pm { display: flex; flex-direction: column; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 10px rgba(20, 24, 40, .08); }
.zoom-pm button { box-shadow: none; border-radius: 0; }
.zoom-pm button + button { border-top: 1px solid #eceef2; }
.zoom button { width: 48px; height: 48px; font-size: 28px; font-weight: 300; line-height: 1; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.zoom button:hover:not(:disabled) { background: #f6f7f9; }
.zoom button:disabled { color: #c9ccd3; background: #f3f4f6; cursor: default; }

.zs { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 32px 22px 0; overflow: hidden; }
.zs-title { font-size: 26px; font-weight: 700; margin: 0 0 18px; letter-spacing: -.02em; }
.zones { list-style: none; margin: 0 -8px; padding: 0 8px 16px; overflow: auto; flex: 1; }
.zone {
  width: 100%; display: flex; flex-direction: column; gap: 8px; padding: 22px 18px; border: 1.5px solid transparent;
  border-radius: 12px; background: none; text-align: left; color: #1f2128;
}
.zone:hover { background: #f7f8fa; }
.zone.on { border-color: #d3d7fb; background: #fff; box-shadow: 0 2px 12px rgba(65, 82, 255, .08); }
.zl { display: flex; align-items: center; gap: 14px; font-size: 20px; }
.zl i { width: 15px; height: 15px; border-radius: 50%; flex: none; }
.zl span { flex: 1; }
.zl b { font-weight: 600; font-variant-numeric: tabular-nums; }
.zn { display: flex; gap: 7px; padding-left: 29px; font-size: 15px; color: #6b6f7a; line-height: 1.55; }
.zn em { font-style: normal; flex: none; width: 17px; height: 17px; margin-top: 2px; border-radius: 50%; border: 1.5px solid currentColor; font-size: 10px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.zs-empty { flex: 1; display: flex; align-items: center; justify-content: center; color: #9a9ea8; font-size: 20px; margin: 0 0 60px; }
.zs .picked { overflow: auto; flex: 1; }
.zs .picked li { font-size: 14px; padding: 12px 14px; }
.zs .picked li small { color: var(--text-2); font-variant-numeric: tabular-nums; font-size: 13px; }
.zs-actions { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 18px 22px 24px; background: #fff; box-shadow: 0 -1px 0 #eceef2; }
.zs-actions.one { grid-template-columns: 1fr; box-shadow: none; }
.zs-actions button { height: 64px; font-size: 20px; border-radius: 12px; }
.zs-actions .btn-primary { background: var(--nol); }
.zs-actions .btn-primary:hover:not(:disabled) { background: #3443e8; }
.btn-soft { background: #f1f2f5; color: #1f2128; border: 1px solid #e6e8ec; font-weight: 700; }
.btn-soft:hover { background: #e8e9ee; }
.btn-primary:disabled { background: #e2e3e6; color: #fff; cursor: default; }
.map-dim { position: absolute; inset: 0; background: rgba(30, 32, 40, .45); z-index: 2; }
.zs-back { display: flex; align-items: center; gap: 6px; font-size: 22px; }
.zs-back button { border: 0; background: none; padding: 0; margin-left: -6px; color: #1f2128; display: flex; }
.aq-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px -4px 0; padding: 22px 24px;
  border-radius: 14px; background: #fff; box-shadow: 0 2px 14px rgba(20, 24, 40, .1);
}
.aq-name { display: flex; align-items: center; gap: 8px; font-size: 18px; color: #3a3d46; margin-bottom: 6px; }
.aq-name i { width: 12px; height: 12px; border-radius: 50%; }
.aq-card b { font-size: 20px; }
.aq-step { display: flex; align-items: center; background: #f5f6f8; border-radius: 12px; height: 46px; flex: none; }
.aq-step button { width: 44px; height: 46px; border: 0; background: none; font-size: 24px; color: #1f2128; font-weight: 300; }
.aq-step button:disabled { color: #d3d5db; cursor: default; }
.aq-step output { min-width: 20px; text-align: center; font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }

.side-event { display: flex; gap: 10px; margin-bottom: 14px; }
.mini-poster { width: 54px; height: 72px; border-radius: 6px; flex: none; background: linear-gradient(118deg, #14286f 0 30%, #4aa3ea 30% 40%, #fff 40% 64%, #4aa3ea 64% 72%, #14286f 72%); }
.side-event strong { display: block; font-size: 14px; line-height: 1.35; margin-bottom: 4px; }
.side-event span { display: block; font-size: 12px; color: var(--muted); }
.bw-side h4 { font-size: 13px; margin: 12px 0 8px; display: flex; justify-content: space-between; }
.bw-side h4 small { color: var(--brand); font-size: 13px; }
.grades, .picked { list-style: none; margin: 0; padding: 0; }
.grades li { display: flex; align-items: center; gap: 8px; padding: 7px 0; font-size: 13px; border-bottom: 1px solid var(--line); }
.grades li i, .picked li i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.grades li span { flex: 1; display: flex; flex-direction: column; }
.grades li small { color: var(--muted); font-size: 11px; }
.grades li b { font-variant-numeric: tabular-nums; }
.grades li.none { color: var(--muted); }
.grades li.none b { color: var(--bad); }
.picked li { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 7px 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; }
.picked li span { flex: 1; }
.picked li button { border: 0; background: none; color: var(--muted); font-size: 16px; line-height: 1; }
.picked li.empty { color: var(--muted); justify-content: center; padding: 14px; }
.side-actions { margin-top: auto; padding-top: 14px; display: grid; gap: 8px; }
.sum { margin: 12px 0 0; border-top: 1px solid var(--line); padding-top: 10px; }
.sum div { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; }
.sum dd { margin: 0; font-variant-numeric: tabular-nums; }
.sum .total { font-weight: 800; font-size: 15px; color: var(--brand); }

.form-step { max-width: 640px; }
.form-step h3 { font-size: 16px; margin: 6px 0 12px; }
.form-step h3 + .tbl, .form-step h3 + .radios { margin-bottom: 24px; }
.note { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; }
.tbl thead th { background: var(--bg-2); font-size: 13px; color: var(--text-2); font-weight: 600; }
.tbl.kv th { width: 120px; background: var(--bg-2); font-weight: 600; color: var(--text-2); }
.tbl select, .tbl input, .bank select { height: 36px; border: 1px solid #cfd3dc; border-radius: 8px; padding: 0 10px; background: #fff; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.notice { font-size: 13px; color: var(--text-2); padding-left: 18px; line-height: 1.7; margin: 12px 0 18px; }
.radios { display: flex; gap: 10px; flex-wrap: wrap; }
.radios label {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 14px; font-size: 14px; cursor: pointer;
}
.radios label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.radios input, .agree input { accent-color: var(--brand); }
.bank { margin: 12px 0 20px; }
.agree { display: flex; gap: 8px; align-items: center; font-size: 14px; margin: 8px 0 14px; cursor: pointer; }

.captcha {
  position: absolute; inset: 0; background: rgba(20, 20, 24, .5);
  display: flex; align-items: center; justify-content: center; z-index: 3; padding: 16px;
}
.captcha-box {
  width: 520px; max-width: 100%; background: #fff; border-radius: 18px; padding: 34px 20px 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .2); display: flex; flex-direction: column;
}
.captcha-title { margin: 0 0 8px 4px; font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.captcha-sub { margin: 0 0 40px 4px; font-size: 16px; color: #555a66; }
.captcha-img {
  position: relative; width: 400px; max-width: 100%; height: 200px; margin: 0 auto 12px; background: #ededee;
  border-radius: 4px; display: flex; align-items: center; justify-content: center;
}
.captcha-img canvas { display: block; }
.cap-round {
  position: absolute; top: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff;
  color: #2a2d36; box-shadow: 0 1px 6px rgba(0, 0, 0, .12); display: flex; align-items: center; justify-content: center;
}
#captcha-audio { left: 12px; }
#captcha-refresh { right: 12px; }
.cap-round:hover { background: #f6f7f9; }
#captcha-input {
  width: 400px; max-width: 100%; margin: 0 auto; height: 46px; border: 2px solid #2b49e0; border-radius: 8px;
  padding: 0 14px; font-size: 16px; text-transform: uppercase; outline: 0;
}
#captcha-input::placeholder { font-size: 14px; color: #8b909c; text-transform: none; }
.captcha-msg { width: 400px; max-width: 100%; margin: 8px auto 48px; color: var(--bad); font-size: 13px; min-height: 16px; }
#captcha-submit { height: 52px; border-radius: 12px; font-size: 18px; background: var(--nol); }
#captcha-submit:disabled { background: #e2e3e6; }
.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.dialog { position: absolute; inset: 0; background: rgba(10, 12, 24, .35); display: flex; align-items: center; justify-content: center; z-index: 4; }
.dialog-box { width: 340px; background: #fff; border-radius: 16px; padding: 26px; text-align: center; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.dialog-box strong { font-size: 17px; }
.dialog-box p { white-space: pre-line; color: var(--text-2); font-size: 14px; line-height: 1.55; margin: 10px 0 18px; }
.dialog-box button { width: 100%; }

.loading { position: absolute; inset: 0; background: rgba(255, 255, 255, .7); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 5; }
.loading p { color: var(--text-2); font-size: 14px; }
.spinner { width: 36px; height: 36px; border: 4px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ───── 결과 ───── */
.result { background: linear-gradient(180deg, #eceef4 0, #fff 420px); }
.result-inner { max-width: 880px; margin: 0 auto; padding: 64px 16px 80px; }
.result-head { text-align: center; margin-bottom: 28px; }
.result-head h2 { font-size: 40px; margin: 14px 0 8px; letter-spacing: -.02em; }
.result-head.ok h2 { color: var(--ok); }
.result-head.fail h2 { color: var(--bad); }
.result-head p { color: var(--text-2); margin: 0; }
.result-seats { list-style: none; padding: 0; margin: 18px auto 0; max-width: 420px; text-align: left; }
.result-seats li { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 9px 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; }
.result-seats li i { width: 10px; height: 10px; border-radius: 3px; }
.cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.card span { font-size: 13px; color: var(--muted); }
.card strong { font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.card small { font-size: 12px; color: var(--text-2); }
.card.good strong { color: var(--ok); }
.card.bad strong { color: var(--bad); }
.tips { margin: 20px 0 0; padding: 16px 16px 16px 34px; background: var(--brand-soft); border-radius: 14px; font-size: 14px; line-height: 1.7; color: #3a3478; }
.result-actions { display: flex; justify-content: center; gap: 10px; margin: 28px 0 8px; }
.history { margin-top: 36px; }
.disclaimer { margin: 32px 0 0; text-align: center; font-size: 12px; color: var(--muted); line-height: 1.5; }
.history h3 { font-size: 16px; margin: 0 0 10px; }
.tbl-scroll { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.history .tbl { font-size: 13px; white-space: nowrap; }
.history .tbl td { font-variant-numeric: tabular-nums; }
.history .tbl tr:last-child td { border-bottom: 0; }
.history td.ok { color: var(--ok); font-weight: 700; }
.history td.fail { color: var(--bad); font-weight: 700; }

/* ───── 서버 모니터 ───── */
.hud {
  position: fixed; right: 16px; bottom: 16px; width: 260px; z-index: 30; border-radius: 14px; overflow: hidden;
  background: rgba(11, 14, 28, .92); color: #e5e7f0; font-size: 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, .3);
  font-family: ui-monospace, "SF Mono", Menlo, monospace; backdrop-filter: blur(6px);
}
.hud header { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-bottom: 1px solid rgba(255, 255, 255, .08); letter-spacing: .08em; font-weight: 700; font-size: 11px; }
.hud header button { background: none; border: 0; color: #9aa0b6; font-size: 16px; line-height: 1; padding: 0 4px; }
.live { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #34d399; margin-right: 7px; box-shadow: 0 0 8px #34d399; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.hud.min .hud-body { display: none; }
.hud-mini { display: none; }
.hud.dock { right: auto; bottom: auto; left: 50%; top: 14px; transform: translateX(-50%); width: auto; min-width: 300px; border-radius: 12px; }
.hud.dock header { gap: 12px; padding: 7px 12px; }
.hud.dock.min header { border-bottom: 0; }
.hud.dock.min .hud-mini { display: inline; color: #fff; letter-spacing: 0; font-size: 12px; font-variant-numeric: tabular-nums; }
.hud.dock .hud-body { width: 300px; }
.hud-body { padding: 10px 12px 12px; }
.hud-clock { font-size: 22px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.hud-phase { color: #a78bfa; margin: 2px 0 8px; }
.hud dl { margin: 0; }
.hud dl div { display: flex; justify-content: space-between; padding: 3px 0; }
.hud dt { color: #9aa0b6; }
.hud dd { margin: 0; font-variant-numeric: tabular-nums; }
.hud dd.warn { color: #fb7185; }
.hud-cap { margin: 10px 0 3px; color: #9aa0b6; font-size: 11px; }
.hud canvas { width: 100%; height: 36px; display: block; }

.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); z-index: 50;
  background: #1f2230; color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

@media (max-width: 860px) {
  .bw-body, .bw[data-step="2"] .bw-body { display: block; overflow: auto; }
  .bw-main.seatmap { height: 62vh; }
  .bw-side.zone-side { overflow: visible; }
  .zs { padding: 20px 16px 0; }
  .zs-title { font-size: 21px; }
  .zones { max-height: 46vh; }
  .zone { padding: 16px 14px; }
  .zl { font-size: 17px; }
  .zn { font-size: 13px; }
  .zs-empty { font-size: 16px; margin: 24px 0; }
  .zs-actions { position: sticky; bottom: 0; padding: 12px 16px 16px; }
  .zs-actions button { height: 54px; font-size: 17px; }
  .nol-head, .nol-title { padding: 0 16px; }
  .nol-head { height: 56px; }
  .nol-head nav { gap: 12px; font-size: 13px; }
  .nol-title { height: auto; min-height: 52px; flex-wrap: wrap; gap: 4px 10px; padding-block: 8px; }
  .nol-title strong { font-size: 15px; }
  .nol-timer { font-size: 15px; }
  .bw-main { overflow: visible; }
  .bw-side { border-left: 0; border-top: 1px solid var(--line); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .seg { flex-wrap: wrap; }
  .hud { width: 210px; }
  .hud.dock { top: auto; bottom: 10px; left: 10px; transform: none; min-width: 0; }
  .hud.dock header > span:first-child { display: none; }
  .captcha-box { padding: 24px 14px 14px; }
  .captcha-sub { margin-bottom: 20px; font-size: 14px; }
  .captcha-img { height: 150px; }
  .aq-card { padding: 16px; }
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
  .gate-inner { padding-top: 90px; }
  .gate-inner h2 { font-size: 21px; }
  .seg button { font-size: 12px; }
}
