/* Zuvel 전용 공통 부품: 좌석 배치도 · 좌석 상태 · 남은 시간 · 입실 QR · 이용권 카드 · 어두운 히어로
   색은 app.css 의 :root 토큰만 씁니다. */

/* ── 좌석 상태 배지 ─────────────────── */
.seat-badge { border: 1px solid transparent; }
.seat-free { background: var(--seat-free-soft); color: var(--seat-free); }
.seat-used { background: var(--seat-used-soft); color: var(--seat-used); }
.seat-fixed { background: var(--seat-fixed-soft); color: var(--seat-fixed); }
.seat-locked { background: var(--seat-lock-soft); color: var(--seat-lock); }
.seat-mine { background: var(--seat-mine); color: #fff; }

/* ── 범례 ───────────────────────────── */
.seat-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: var(--fs-sm); color: var(--ink-2); }
.seat-legend span { display: inline-flex; align-items: center; gap: 6px; }
.seat-legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 1.5px solid transparent; }
.seat-legend .lg-free { background: var(--surface); border-color: var(--seat-free); }
.seat-legend .lg-used { background: var(--seat-used-soft); border-color: var(--line-strong); }
.seat-legend .lg-fixed { background: var(--seat-fixed-soft); border-color: var(--seat-fixed); }
.seat-legend .lg-locked { background: repeating-linear-gradient(45deg, var(--seat-lock-soft) 0 4px, var(--surface) 4px 8px); border-color: var(--seat-lock); }
.seat-legend .lg-mine { background: var(--seat-mine); }

/* ── 좌석 배치도(구역별 격자) ───────── */
.seatmap { display: grid; gap: 18px; }
.zone { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
.zone-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.zone-head h3 { font-size: var(--fs-lg); }
.zone-head .muted { font-size: 13px; }
.zone-grid { display: grid; grid-template-columns: repeat(var(--cols, 6), minmax(0, 1fr)); gap: 8px; }
.seat { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; aspect-ratio: 1 / 1; min-height: 52px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--surface); font: 700 14px var(--font-num); color: var(--ink); transition: transform var(--t-short) var(--ease), box-shadow var(--t-short) var(--ease), border-color var(--t-short) var(--ease); }
.seat small { font: 500 10px var(--font-body); color: var(--ink-3); }
.seat .ic { width: 14px; height: 14px; }
a.seat:hover, button.seat:hover, label.seat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.seat.is-free { border-color: var(--seat-free); }
.seat.is-free small { color: var(--seat-free); }
.seat.is-used { background: var(--seat-used-soft); color: var(--ink-3); border-color: var(--line); }
.seat.is-fixed { background: var(--seat-fixed-soft); border-color: var(--seat-fixed); color: var(--seat-fixed); }
.seat.is-fixed small { color: var(--seat-fixed); }
.seat.is-locked { background: repeating-linear-gradient(45deg, var(--seat-lock-soft) 0 6px, var(--surface) 6px 12px); border-color: var(--seat-lock); color: var(--seat-lock); }
.seat.is-locked small { color: var(--seat-lock); }
.seat.is-mine { background: var(--seat-mine); border-color: var(--seat-mine); color: #fff; }
.seat.is-mine small { color: #DCE4FF; }
.seat.is-gap { visibility: hidden; }
/* 좌석 고르기(라디오) */
label.seat { cursor: pointer; }
label.seat input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
label.seat:has(input:checked) { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 4px var(--accent-soft); }
label.seat:has(input:checked) small { color: #DCE4FF; }
label.seat:has(input:focus-visible) { box-shadow: var(--focus); }
label.seat:has(input:disabled) { cursor: not-allowed; }
.seat-scroller { overflow-x: auto; }
@media (max-width: 760px) {
  .zone { padding: 12px; }
  .zone-grid { gap: 6px; }
  .seat { min-height: 44px; border-radius: 10px; font-size: 12px; }
  .seat small { display: none; }
}

/* ── 남은 좌석 카운터 ───────────────── */
.seat-count { display: flex; align-items: center; gap: 16px; }
.seat-count .big { font: 700 56px/1 var(--font-num); letter-spacing: -0.04em; color: var(--seat-free); }
.seat-count .of { font: 500 18px var(--font-num); color: var(--ink-3); }
.meter { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--seat-free); border-radius: 5px; transition: width var(--t-long) var(--ease); }

/* ── 어두운 히어로(야간 집중) ────────── */
.night { background: var(--night); color: #E8EDF7; }
.night .muted, .night p { color: #B7C1D4; }
.night h1, .night h2, .night strong { color: #fff; }
.night .eyebrow { color: var(--crema); }
.night .btn-secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .4); }
.night .btn-secondary:hover { background: rgba(255, 255, 255, .08); border-color: #fff; }
.night .link { color: #C9D6FF; }
.night-card { background: var(--night-2); border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--r-lg); padding: 20px; color: #E8EDF7; }
.night-card .muted { color: #B7C1D4; }

/* ── 남은 시간 카운트다운 ───────────── */
.timer-ring { display: grid; place-items: center; text-align: center; padding: 28px 16px; border-radius: var(--r-lg); background: var(--night); color: #fff; }
.timer-ring .t-label { font-size: 13px; color: #B7C1D4; }
.timer-ring .t-big { font: 700 64px/1 var(--font-num); letter-spacing: -0.04em; margin-top: 6px; }
.timer-ring .t-sub { color: #B7C1D4; font-size: var(--fs-sm); margin-top: 8px; }
.timer-ring.is-low .t-big { color: var(--crema); }
@media (max-width: 760px) { .timer-ring .t-big { font-size: 52px; } }

/* ── 입실 QR 카드 ───────────────────── */
.qr-card { background: var(--surface); border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 24px; text-align: center; }
.qr-card svg.qr { width: min(320px, 80vw); height: 110px; margin: 8px auto 0; display: block; image-rendering: pixelated; }
.qr-code-text { font: 700 22px var(--font-num); letter-spacing: .12em; margin-top: 12px; }
.qr-meta { display: flex; justify-content: center; gap: 8px 18px; flex-wrap: wrap; color: var(--ink-3); font-size: var(--fs-sm); margin-top: 8px; }
.qr-expire { font: 700 15px var(--font-num); color: var(--accent); }
.qr-full { position: fixed; inset: 0; z-index: 80; background: #fff; display: grid; place-items: center; padding: 24px; }

/* ── 이용권 카드 ────────────────────── */
.ticket-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.ticket-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: var(--r-lg); border: 1.5px solid var(--line); background: var(--surface); transition: border-color var(--t-short) var(--ease), box-shadow var(--t-mid) var(--ease), transform var(--t-mid) var(--ease); }
.ticket-card:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); }
.ticket-card .t-name { font-size: var(--fs-lg); font-weight: 700; }
.ticket-card .t-price { font: 700 26px var(--font-num); margin-top: auto; }
.ticket-card .t-valid { color: var(--ink-3); font-size: var(--fs-sm); }
.ticket-card.is-pick { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
label.ticket-card { cursor: pointer; }
label.ticket-card input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
label.ticket-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
label.ticket-card:has(input:focus-visible) { box-shadow: var(--focus); }

/* ── 진행 단계(구매 3단계) ──────────── */
.flow-steps { display: flex; gap: 8px; align-items: center; font-size: var(--fs-sm); color: var(--ink-3); flex-wrap: wrap; }
.flow-steps li { display: inline-flex; align-items: center; gap: 6px; }
.flow-steps .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font: 700 12px var(--font-num); }
.flow-steps .is-now { color: var(--ink); font-weight: 700; }
.flow-steps .is-now .n { background: var(--accent); color: #fff; }
.flow-steps .is-done .n { background: var(--seat-free); color: #fff; }
.flow-steps .sep { width: 18px; height: 1.5px; background: var(--line-strong); }

/* ── 홈 히어로 ───────────────────────── */
.home-hero { padding: 40px 0 48px; }
.home-hero .grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.home-hero h1 { font-size: var(--fs-h1); line-height: 1.16; letter-spacing: -0.03em; }
.home-hero h1 em { font-style: normal; color: var(--crema); }
.home-hero .lead { font-size: var(--fs-lg); margin-top: 16px; max-width: 30em; }
.home-hero .photo { position: relative; border-radius: 26px; overflow: hidden; aspect-ratio: 4 / 4.3; box-shadow: var(--shadow-lg); }
.home-hero .photo img { width: 100%; height: 100%; object-fit: cover; }
.home-hero .float-card { position: absolute; left: 16px; right: 16px; bottom: 16px; background: rgba(14, 23, 38, .86); backdrop-filter: blur(8px); border-radius: 18px; padding: 16px 18px; display: flex; align-items: center; gap: 14px; color: #fff; }
.home-hero .float-card .big { font: 700 40px/1 var(--font-num); color: var(--crema); }
@media (max-width: 900px) { .home-hero .grid { grid-template-columns: 1fr; gap: 24px; } .home-hero .photo { aspect-ratio: 4 / 3; } }
@media (prefers-reduced-motion: no-preference) {
  .home-hero .float-card { animation: bob 6s ease-in-out 1s infinite; }
  .live-dot { animation: blink 1.6s ease-in-out infinite; }
}
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #3DDC97; box-shadow: 0 0 0 3px rgba(61, 220, 151, .25); }
@keyframes blink { 50% { opacity: .35; } }
