:root {
  --bg: #0d0f14;
  --bg2: #151821;
  --card: #1a1e29;
  --line: #2a2f3d;
  --text: #eef0f5;
  --muted: #8b93a7;
  --accent: #7c5cff;
  --ok: #2fbf71;
  --warn: #f5a524;
  --err: #ef4444;
  --gold: #f5c542;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-family: Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif; font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a.link, .prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -0.02em; }
h1 { font-size: 28px; } h2 { font-size: 21px; } h3 { font-size: 17px; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; word-break: break-all; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 28px; padding-bottom: 80px; min-height: 70vh; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(13,15,20,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 18px; height: 60px; }
.brand { font-weight: 800; font-size: 18px; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.brand .x { color: var(--muted); font-weight: 400; }
.brand img { height: 30px; width: auto; border-radius: 6px; }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav a { padding: 7px 11px; border-radius: 8px; color: var(--muted); white-space: nowrap; font-size: 14px; }
.nav a:hover, .nav a.on { color: var(--text); background: var(--bg2); }
.top form { margin: 0; }
.area-tag { font-size: 11px; padding: 2px 7px; border-radius: 6px; background: var(--accent); color: #fff; font-weight: 700; }

/* components */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card + .card { margin-top: 16px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .g2, .g3 { grid-template-columns: 1fr; } }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.sp { flex: 1; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #3a4152; }
.btn.primary { background: var(--accent); border-color: transparent; color: #fff; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.ok { background: var(--ok); border-color: transparent; color: #fff; }
.btn.danger { color: var(--err); }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.btn.lg { padding: 14px 22px; font-size: 16px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; font-weight: 600; }
input, select, textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
input[type=checkbox], input[type=radio] { width: auto; }
input[type=color] { padding: 2px; height: 42px; }
.field { margin-bottom: 14px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.tbl-wrap { overflow-x: auto; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--bg2); border: 1px solid var(--line); white-space: nowrap; }
.badge.live, .badge.active, .badge.paid, .badge.completed { color: var(--ok); border-color: rgba(47,191,113,.4); }
.badge.soldout, .badge.closed, .badge.cancelled, .badge.expired, .badge.suspended { color: var(--muted); }
.badge.pending_payment, .badge.pending, .badge.awaiting_cards, .badge.grace, .badge.none { color: var(--warn); border-color: rgba(245,165,36,.4); }
.badge.packing, .badge.packed, .badge.received, .badge.shipped { color: #4dabf7; border-color: rgba(77,171,247,.4); }
.tier { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; padding: 2px 8px; border-radius: 6px; font-weight: 800; font-size: 12px; color: #111; }

.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-weight: 600; }
.flash.ok { background: rgba(47,191,113,.12); color: var(--ok); border: 1px solid rgba(47,191,113,.35); }
.flash.err { background: rgba(239,68,68,.12); color: #ff8080; border: 1px solid rgba(239,68,68,.35); }

.stat .v { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .k { color: var(--muted); font-size: 13px; }

.progress { height: 10px; border-radius: 99px; background: var(--bg); overflow: hidden; border: 1px solid var(--line); }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #c084fc); transition: width .6s; }

/* hero */
.hero { padding: 56px 0 36px; }
.hero h1 { font-size: 40px; }
.hero p { font-size: 18px; color: var(--muted); max-width: 620px; }
@media (max-width: 560px) { .hero h1 { font-size: 30px; } }
.hero .eyebrow { display: inline-block; margin-bottom: 14px; padding: 6px 14px; border-radius: 999px; font-size: 14px; color: var(--muted); background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.hero .eyebrow b { color: var(--text, inherit); }

/* pack list card */
.pack-card { display: block; transition: transform .15s, border-color .15s; }
.pack-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.pack-card .left { font-size: 30px; font-weight: 900; font-variant-numeric: tabular-nums; }
.pack-card .left small { font-size: 14px; color: var(--muted); font-weight: 600; }
.hit-thumbs { display: flex; gap: 6px; margin: 10px 0; }
.hit-thumbs .t { flex: 1; aspect-ratio: 63/88; border-radius: 6px; background: var(--bg2) center/cover; position: relative; overflow: hidden; border: 1px solid var(--line); display: flex; align-items: flex-end; font-size: 10px; padding: 4px; }

/* public pack page */
.counter { text-align: center; padding: 26px 16px; }
.counter .big { font-size: 64px; font-weight: 900; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1; }
.counter .big small { font-size: 22px; color: var(--muted); font-weight: 700; }
.tier-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.tier-row:last-child { border-bottom: 0; }
.tier-row .bar { flex: 1; }
.tier-row .cnt { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }
.hits { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.hitcard { position: relative; border-radius: 12px; overflow: hidden; background: var(--bg2); border: 2px solid var(--line); }
.hitcard .img { aspect-ratio: 63/88; background: #222 center/cover no-repeat; display: flex; align-items: center; justify-content: center; text-align: center; padding: 10px; color: var(--muted); font-size: 13px; }
.hitcard .meta { padding: 8px 10px; }
.hitcard .meta .n { font-weight: 700; font-size: 13px; line-height: 1.35; }
.hitcard.sold .img { filter: grayscale(1) brightness(.45); }
.hitcard .stamp { position: absolute; top: 34%; left: 50%; transform: translate(-50%, -50%) rotate(-14deg); border: 3px solid var(--err); color: var(--err); font-weight: 900; font-size: 20px; padding: 4px 10px; border-radius: 6px; background: rgba(0,0,0,.55); letter-spacing: .05em; white-space: nowrap; }
.hitcard .tier { position: absolute; top: 8px; left: 8px; }
.hitcard .qty { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.7); padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.feed li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.feed { list-style: none; padding: 0; margin: 0; max-height: 420px; overflow: auto; }
.feed .time { color: var(--muted); font-size: 12px; margin-left: auto; white-space: nowrap; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 6px; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.flashy { animation: flashy 1.2s; }
@keyframes flashy { 0% { background: rgba(124,92,255,.35); } 100% { background: transparent; } }

.co-brand { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.co-brand .logo { width: 64px; height: 64px; border-radius: 14px; background: var(--bg2) center/cover; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 24px; }
.notice { border-left: 3px solid var(--accent); background: var(--bg2); padding: 12px 14px; border-radius: 0 10px 10px 0; white-space: pre-line; }

/* timeline */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; font-size: 14px; }
.timeline li::before { content: ''; position: absolute; left: 4px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.timeline li::after { content: ''; position: absolute; left: 7px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.steps { display: flex; gap: 6px; flex-wrap: wrap; }
.steps span { padding: 5px 10px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.steps span.done { color: var(--text); border-color: var(--accent); }
.steps span.cur { background: var(--accent); color: #fff; border-color: var(--accent); }

/* scanner */
.scanner { position: relative; border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 1; max-width: 460px; margin: 0 auto; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scanner .frame { position: absolute; inset: 18%; border: 3px solid rgba(255,255,255,.85); border-radius: 18px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.result-pop { text-align: center; padding: 28px 16px; border-radius: 16px; }
.result-pop .tierbig { font-size: 52px; font-weight: 900; }

footer.foot { border-top: 1px solid var(--line); padding: 30px 0; color: var(--muted); font-size: 13px; }

/* print */
@media print {
  body { background: #fff; color: #000; }
  .noprint, .top, footer.foot { display: none !important; }
  main.wrap { padding: 0; max-width: none; }
  .card { border: 0; padding: 0; background: #fff; }
}

/* ---- 카드 상품 옵션 / 감정 등급 ---- */
.chip { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line); margin: 2px 0; }
.gl { display: inline-block; padding: 1px 7px; border-radius: 4px; color: #fff; font-weight: 800; font-size: 11px; letter-spacing: .02em; white-space: nowrap; }
.opt-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 3px; border-radius: 6px; background: var(--bg2); border: 1px solid var(--line); font-size: 12px; white-space: nowrap; }
.opt-chip.out { opacity: .45; text-decoration: line-through; }
.opt-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pv { width: 92px; flex: none; aspect-ratio: 63/88; border-radius: 8px; background: var(--bg2) center/contain no-repeat; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; margin-right: 12px; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; max-height: 520px; overflow: auto; }
.cat-item { display: flex; flex-direction: column; gap: 3px; padding: 6px; border-radius: 8px; background: var(--bg2); border: 1px solid var(--line); color: inherit; text-align: left; cursor: pointer; font: inherit; }
.cat-item:hover { border-color: var(--accent); }
.cat-item img { width: 100%; aspect-ratio: 63/88; object-fit: contain; background: #111; border-radius: 4px; }
.cat-item .n { font-weight: 700; font-size: 12px; line-height: 1.3; }
.cat-item .m { font-size: 11px; color: var(--muted); line-height: 1.3; }
/* 공개 화면: 슬랩 라벨 스타일 등급 배지 */
.slab { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 4px 6px; font-weight: 900; font-size: 12px; color: #fff; letter-spacing: .03em; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.hitcard .img { position: relative; }
.hitcard .lang { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.72); color: #fff; padding: 1px 7px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.opt-pick { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.opt-pick button { cursor: pointer; font: inherit; border: 1px solid var(--line); background: var(--bg); color: inherit; border-radius: 6px; padding: 2px 4px 2px 2px; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; }
.opt-pick button.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.opt-pick button.out { opacity: .4; }
.inline-form select, .inline-form input:not(.sp) { width: auto; flex: none; }
.inline-form .sp { flex: 1; width: auto; }
.opt-row { display: grid; grid-template-columns: 96px 1fr 110px 64px; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg2); }
.opt-row [data-o] { width: 100% !important; }
.opt-row [data-o=cert_no] { grid-column: 1 / 4; }
.tier-sec + .tier-sec { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.tier-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 18px; }
.hitcard .added { position: absolute; top: 34px; left: 8px; background: rgba(124,92,255,.92); color: #fff; padding: 1px 6px; border-radius: 5px; font-size: 10px; font-weight: 800; }

/* =====================================================================
   LASER LINE THEME — 얇게 빛나는 그라데이션 선 (매장 색상 --accent 자동 반영)
   ===================================================================== */
:root {
  --laser2: #22d3ee;                                            /* 보조 레이저 (시안) */
  --hair: color-mix(in srgb, var(--accent) 16%, rgba(255,255,255,.05));   /* 기본 헤어라인 */
  --hair-strong: color-mix(in srgb, var(--accent) 45%, transparent);
  --laser: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 85%, transparent) 30%, color-mix(in srgb, var(--laser2) 80%, transparent) 70%, transparent);
  --glow: 0 0 18px -4px color-mix(in srgb, var(--accent) 70%, transparent);
  --line: var(--hair);
}
body {
  background:
    radial-gradient(1200px 500px at 50% -180px, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px) 0 0 / 44px 44px,
    var(--bg);
  background-attachment: fixed;
}

/* 헤더 하단 레이저 */
.top { border-bottom: 0; }
.top::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--laser); box-shadow: 0 0 10px 0 color-mix(in srgb, var(--accent) 55%, transparent); }
.nav a.on { background: color-mix(in srgb, var(--accent) 12%, transparent); box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--accent) 80%, transparent); }

/* 카드: 그라데이션 테두리 (보라 → 투명 → 시안) + 상단 하이라이트 */
.card {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 55%, transparent), rgba(255,255,255,.05) 28%, rgba(255,255,255,.03) 72%, color-mix(in srgb, var(--laser2) 40%, transparent)) border-box;
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 10px 30px -18px rgba(0,0,0,.8);
  position: relative;
}
.card::before { content: ''; position: absolute; top: -1px; left: 12%; right: 12%; height: 1px; background: var(--laser); opacity: .55; pointer-events: none; }
a.card:hover, .pack-card:hover { box-shadow: var(--glow), 0 10px 30px -18px rgba(0,0,0,.8); }
.pack-card:hover { border-color: transparent; }

/* 표: 헤더 아래 빛나는 선, 행은 아주 옅은 헤어라인 */
th { border-bottom: 1px solid var(--hair-strong); box-shadow: 0 6px 10px -10px color-mix(in srgb, var(--accent) 90%, transparent); letter-spacing: .02em; }
td { border-bottom: 1px solid var(--hair); }
tr:hover td { background: color-mix(in srgb, var(--accent) 5%, transparent); }

/* 구분선류: 가운데가 밝고 양끝이 사라지는 레이저 */
.tier-row { border-bottom: 0; background: var(--laser) bottom / 100% 1px no-repeat; background-image: linear-gradient(90deg, transparent, var(--hair-strong) 20%, color-mix(in srgb, var(--laser2) 30%, transparent) 80%, transparent); }
.tier-row:last-child { background: none; }
.tier-sec + .tier-sec { border-top: 0; position: relative; }
.tier-sec + .tier-sec::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--laser); opacity: .7; box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 50%, transparent); }
hr { border: 0; height: 1px; background: var(--laser); margin: 20px 0; }

/* 버튼 */
.btn { border-color: var(--hair-strong); background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0)) , var(--bg2); transition: box-shadow .15s, border-color .15s, filter .15s; }
.btn:hover { border-color: color-mix(in srgb, var(--accent) 80%, transparent); box-shadow: var(--glow); }
.btn.primary { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--laser2))); box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset, 0 6px 22px -8px color-mix(in srgb, var(--accent) 90%, transparent); }
.btn.primary:hover { box-shadow: 0 0 0 1px rgba(255,255,255,.14) inset, 0 0 22px -2px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn.ok { box-shadow: 0 6px 20px -8px rgba(47,191,113,.8); }
.btn.danger { border-color: rgba(239,68,68,.35); }
.btn.danger:hover { border-color: rgba(239,68,68,.8); box-shadow: 0 0 16px -4px rgba(239,68,68,.7); }

/* 입력: 포커스 시 레이저 링 */
input, select, textarea { border-color: var(--hair-strong); background: rgba(8,10,14,.7); transition: box-shadow .15s, border-color .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 60%, transparent), 0 0 16px -2px color-mix(in srgb, var(--accent) 60%, transparent); }

/* 배지 · 칩: 얇은 발광 테두리 */
.badge { border-color: var(--hair-strong); background: rgba(255,255,255,.02); }
.badge.live, .badge.active, .badge.paid, .badge.completed { box-shadow: 0 0 10px -3px rgba(47,191,113,.7); }
.badge.pending_payment, .badge.pending, .badge.awaiting_cards, .badge.grace { box-shadow: 0 0 10px -3px rgba(245,165,36,.6); }
.badge.packing, .badge.packed, .badge.received, .badge.shipped { box-shadow: 0 0 10px -3px rgba(77,171,247,.6); }
.chip, .opt-chip { border-color: var(--hair-strong); }

/* 진행 바: 빛나는 레이저 빔 + 끝점 */
.progress { border-color: var(--hair-strong); background: rgba(0,0,0,.35); }
.progress > i { position: relative; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 70%, transparent), var(--accent) 60%, var(--laser2)); box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 80%, transparent); }
.progress > i::after { content: ''; position: absolute; right: 0; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px 2px var(--laser2); }

/* 카드 이미지 타일: 등급 색 발광 (--tier 는 화면에서 지정) */
.hitcard { border-width: 1px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--tier, transparent) 40%, transparent), 0 0 20px -6px var(--tier, transparent); transition: transform .15s, box-shadow .15s; }
.hitcard:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--tier, var(--accent)), 0 0 26px -4px var(--tier, var(--accent)); }
.hitcard.sold { box-shadow: none; }
.hit-thumbs .t, .cat-item, .pv { border-color: var(--hair-strong); }
.cat-item:hover { box-shadow: var(--glow); }

/* 알림 박스 */
.flash.ok { box-shadow: 0 0 18px -8px rgba(47,191,113,.8); }
.flash.err { box-shadow: 0 0 18px -8px rgba(239,68,68,.8); }
.notice { box-shadow: -4px 0 14px -8px var(--accent); background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 8%, var(--bg2)), var(--bg2)); }
.card[style*="background"] { border-color: var(--hair-strong); }   /* 인라인 배경을 쓰는 카드도 테두리 유지 */
.steps span { border-color: var(--hair-strong); }
.steps span.done { box-shadow: 0 0 10px -4px var(--accent); }
.steps span.cur { box-shadow: 0 0 16px -2px var(--accent); }

/* 스캐너·결과 팝업 강조 */
#scanner-box { box-shadow: var(--glow); }
.scanner .frame { border-color: var(--laser2); box-shadow: 0 0 0 999px rgba(0,0,0,.35), 0 0 24px 0 var(--laser2), inset 0 0 18px -4px var(--laser2); }

@media (prefers-reduced-motion: reduce) { .hitcard, .btn, input { transition: none; } }
.grid > .card + .card, .hits > .card + .card { margin-top: 0; }   /* 그리드 안 카드 높이 어긋남 방지 */
footer.foot { border-top: 0; position: relative; }
footer.foot::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--laser); opacity: .6; }

/* ---- 오리파 목록 카드: 최고 등급 힛카드 스테이지 ---- */
.pc-stage { position: relative; height: 300px; margin: -8px -8px 14px; border-radius: 11px; overflow: hidden; background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--tier) 30%, transparent), #07080c 70%); }
.pc-stage::after { content: ''; position: absolute; left: 10%; right: 10%; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--tier), transparent); box-shadow: 0 0 12px var(--tier); }
.pc-bg { position: absolute; inset: -30px; background: center / cover; filter: blur(22px) brightness(.45) saturate(1.4); transform: scale(1.1); }
.pc-top { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; align-items: center; z-index: 2; }
.pc-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 900; letter-spacing: .14em; color: #fff; text-shadow: 0 0 10px var(--tier); }
.pc-hits { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: rgba(0,0,0,.55); border: 1px solid color-mix(in srgb, var(--tier) 60%, transparent); box-shadow: 0 0 12px -3px var(--tier); white-space: nowrap; }
.pc-hits b { font-size: 14px; color: #fff; }
.pc-card { position: absolute; left: 50%; top: 42px; height: 196px; aspect-ratio: 63 / 88; transform: translateX(-50%) rotate(-2.5deg); border-radius: 9px; background: #1b1e27 center / cover; z-index: 1;
  box-shadow: 0 0 0 1px var(--tier), 0 0 34px -2px var(--tier), 0 16px 30px rgba(0,0,0,.7); transition: transform .25s; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pack-card:hover .pc-card { transform: translateX(-50%) rotate(0) scale(1.05); }
.pc-img { position: absolute; inset: 0; background: center / cover; }
.pc-card.sold .pc-img { filter: grayscale(1) brightness(.5); }
.pc-card.sold { box-shadow: 0 0 0 1px rgba(255,255,255,.15), 0 16px 30px rgba(0,0,0,.7); }
.pc-card .stamp { position: absolute; top: 42%; left: 50%; transform: translate(-50%, -50%) rotate(-14deg); border: 2px solid var(--err); color: var(--err); font-weight: 900; font-size: 15px; padding: 2px 8px; border-radius: 5px; background: rgba(0,0,0,.6); white-space: nowrap; z-index: 2; }
.pc-card .slab { z-index: 2; }
.pc-card .slab { font-size: 11px; padding: 3px 4px; }
.pc-noimg { padding: 10px; text-align: center; font-size: 12px; color: var(--muted); }
.pc-name { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 2; text-align: center; font-weight: 800; font-size: 14px; text-shadow: 0 1px 6px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-state { display: block; font-size: 11px; font-weight: 700; color: var(--ok); }
.pc-state.off { color: var(--err); font-weight: 800; letter-spacing: .02em; }
.pc-others { display: flex; gap: 6px; margin: 0 0 12px; }
.pc-others .o { width: 42px; aspect-ratio: 63 / 88; border-radius: 5px; background: #1b1e27 center / cover; position: relative; box-shadow: 0 0 0 1px color-mix(in srgb, var(--tier) 70%, transparent), 0 0 10px -3px var(--tier); }
.pc-others .o.sold { filter: grayscale(1) brightness(.45); box-shadow: 0 0 0 1px rgba(255,255,255,.1); }
.pc-others .o .tier { position: absolute; left: 2px; bottom: 2px; min-width: 0; padding: 0 4px; font-size: 9px; border-radius: 3px; }

/* ---- 오리파 상세 상단: S상(최고 등급) 히어로 ---- */
.hero-hit { position: relative; overflow: hidden; border-radius: 16px; margin: 4px 0 18px; padding: 16px 16px 20px;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--tier) 28%, transparent), #07080c 72%);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--tier) 45%, transparent), 0 0 40px -14px var(--tier); }
.hero-hit::after { content: ''; position: absolute; left: 8%; right: 8%; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--tier), transparent); box-shadow: 0 0 14px var(--tier); }
.hh-bg { position: absolute; inset: -40px; background: center / cover; filter: blur(30px) brightness(.4) saturate(1.5); transform: scale(1.1); }
.hh-head { position: relative; display: flex; justify-content: space-between; align-items: center; z-index: 2; }
.hh-head .pc-tag { font-size: 13px; }
.hh-cards { position: relative; z-index: 1; display: flex; justify-content: center; gap: 34px; flex-wrap: wrap; margin-top: 10px; }
.hh-item { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 260px; }
.hh-card { position: relative; height: 340px; aspect-ratio: 63 / 88; border-radius: 13px; overflow: hidden; background: #1b1e27; transform: rotate(var(--rot, -2deg)); transition: transform .3s;
  box-shadow: 0 0 0 1px var(--tier), 0 0 46px -4px var(--tier), 0 22px 40px rgba(0,0,0,.75); display: flex; align-items: center; justify-content: center; }
.hh-card:hover { transform: rotate(0) scale(1.03); }
.hh-cards.many .hh-card { height: 270px; }
.hh-card.sold { box-shadow: 0 0 0 1px rgba(255,255,255,.15), 0 22px 40px rgba(0,0,0,.75); }
.hh-card.sold .pc-img { filter: grayscale(1) brightness(.5); }
.hh-card .slab { z-index: 2; font-size: 14px; padding: 6px; }
.hh-card .stamp { position: absolute; top: 42%; left: 50%; transform: translate(-50%, -50%) rotate(-14deg); border: 3px solid var(--err); color: var(--err); font-weight: 900; font-size: 26px; padding: 4px 12px; border-radius: 7px; background: rgba(0,0,0,.6); white-space: nowrap; z-index: 2; }
.hh-name { margin-top: 16px; font-weight: 800; font-size: 17px; text-shadow: 0 1px 8px #000; }
.hh-item .pc-state { font-size: 13px; margin-top: 2px; }
@media (max-width: 560px) {
  .hh-cards { gap: 14px; }
  .hh-card { height: 280px; }
  .hh-cards:has(.hh-item + .hh-item) { flex-wrap: nowrap; }            /* 2장 이상이면 가로로 나란히 */
  .hh-cards:has(.hh-item + .hh-item) .hh-card { height: 205px; }
  .hh-cards:has(.hh-item + .hh-item) .hh-card .slab { font-size: 10px; padding: 4px 2px; white-space: nowrap; }
  .hh-cards.many { flex-wrap: wrap; }
  .hh-name { font-size: 14px; margin-top: 12px; }
  .hh-card .stamp { font-size: 18px; }
}
/* 히어로 2단: 그다음 등급(A상) */
.hh-divider { position: relative; z-index: 1; height: 1px; margin: 22px 6% 14px; background: linear-gradient(90deg, transparent, var(--tier), transparent); box-shadow: 0 0 12px var(--tier); }
.hh-head.sub .pc-tag { font-size: 12px; }
.hh-cards.mid { gap: 22px; }
.hh-card.mid, .hh-cards.many .hh-card.mid { height: 210px; border-radius: 10px; }
.hh-cards.mid .hh-item { max-width: 170px; }
.hh-cards.mid .hh-name { font-size: 13px; margin-top: 12px; }
.hh-card.mid .slab { font-size: 11px; padding: 4px; }
.hh-card.mid .stamp { font-size: 17px; border-width: 2px; }
@media (max-width: 560px) {
  .hh-cards.mid { flex-wrap: wrap !important; gap: 8px; }
  .hh-card.mid, .hh-cards.many .hh-card.mid, .hh-cards:has(.hh-item + .hh-item) .hh-card.mid { height: 132px; }
  .hh-cards.mid .hh-item { width: 96px; max-width: 96px; }
  .hh-cards.mid .hh-name { font-size: 11px; }
  .hh-card.mid .slab { font-size: 9px; padding: 3px 1px; white-space: nowrap; }
  .hh-card.mid .stamp { font-size: 12px; }
}

/* ---- 주문서: 카드 고르기 ---- */
.pick-tabs { display: flex; gap: 6px; margin: 12px 0; flex-wrap: wrap; }
.pick-tabs button { font: inherit; font-weight: 700; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--hair-strong); background: var(--bg2); color: var(--muted); cursor: pointer; }
.pick-tabs button.on { color: var(--text); border-color: var(--accent); box-shadow: var(--glow); background: color-mix(in srgb, var(--accent) 12%, var(--bg2)); }
.picker { border: 1px solid var(--hair); border-radius: 12px; padding: 12px; background: rgba(0,0,0,.18); }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; max-height: 470px; overflow: auto; padding: 2px; }
.pick-grid.small-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.pick-item { display: flex; flex-direction: column; gap: 3px; padding: 7px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--hair); color: inherit; font: inherit; text-align: left; }
.pick-item[hidden] { display: none; }
.pick-item.cat { cursor: pointer; }
.pick-item.cat:hover { border-color: var(--accent); box-shadow: var(--glow); }
.pi-img { position: relative; aspect-ratio: 63 / 88; border-radius: 6px; background: #111 center / contain no-repeat; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 12px; color: var(--muted); }
.pi-img .lang { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,.72); padding: 0 5px; border-radius: 4px; font-size: 10px; color: #fff; }
.pi-name { font-weight: 700; font-size: 12.5px; line-height: 1.3; }
.pi-meta { font-size: 11px; color: var(--muted); line-height: 1.3; }
.pi-opts { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.pi-opt { display: flex; align-items: center; gap: 6px; font: inherit; font-size: 11.5px; padding: 3px 6px 3px 3px; border-radius: 6px; border: 1px solid var(--hair-strong); background: var(--bg); color: inherit; cursor: pointer; text-align: left; }
.pi-opt:hover { border-color: var(--accent); box-shadow: var(--glow); }
.pi-opt .muted { margin-left: auto; font-size: 10.5px; }
.prize-row { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; border: 1px solid var(--hair-strong); background: var(--bg2); }
.pr-img { width: 54px; flex: none; aspect-ratio: 63 / 88; border-radius: 6px; background: #111 center / cover; border: 1px solid var(--hair); }
.pr-main { flex: 1; min-width: 0; }
.pr-title { font-weight: 800; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pr-self input, .pr-self select { padding: 6px 8px; font-size: 13px; }
.pr-ctrl { display: flex; flex-direction: column; gap: 6px; align-items: stretch; flex: none; width: 140px; }
.pr-ctrl .pr-tier { padding: 6px 8px; font-weight: 800; }
.flash-in { animation: flashIn .7s ease-out; }
@keyframes flashIn { from { box-shadow: 0 0 0 1px var(--accent), 0 0 24px var(--accent); } to { box-shadow: none; } }
@media (max-width: 640px) { .prize-row { flex-wrap: wrap; } .pr-ctrl { width: 100%; flex-direction: row; } }
.grid.flow6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 860px) { .grid.flow6 { grid-template-columns: repeat(3, 1fr); } }

/* 주문서 레이아웃: 왼쪽 카드 고르기(길게) / 오른쪽 담은 카드 + 견적 (고정) */
.order-layout { grid-template-columns: minmax(0, 1fr) 420px; align-items: start; }
.order-side { position: sticky; top: 76px; max-height: calc(100vh - 92px); display: flex; flex-direction: column; }
.side-rows { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 0; flex: 0 1 auto; padding-right: 2px; }
.side-sep { height: 1px; margin: 14px 0; background: var(--laser); opacity: .6; flex: none; }
.order-side #quote, .order-side h3, .order-side #qerr, .order-side #submit, .order-side .hint { flex: none; }
.pick-grid { max-height: calc(100vh - 150px); min-height: 520px; }
.pick-grid.small-grid { max-height: calc(100vh - 150px); }
/* 사이드의 담은 카드: 컴팩트 */
.side-rows .prize-row { flex-wrap: wrap; gap: 8px 10px; padding: 8px; }
.side-rows .pr-img { width: 44px; }
.side-rows .pr-main { flex: 1 1 150px; }
.side-rows .pr-title { font-size: 13.5px; }
.side-rows .pr-ctrl { width: auto; flex-direction: column; gap: 4px; }
.side-rows .pr-ctrl .pr-tier { padding: 4px 6px; font-size: 13px; }
.side-rows .pr-ctrl .btn.sm { padding: 3px 8px; }
.side-rows .pr-ctrl input[data-k=qty] { width: 44px !important; padding: 4px; }
.side-rows .pr-self { flex-basis: 100%; }
.side-rows .pr-self input[data-k=name] { max-width: none !important; flex: 1 1 100%; }
@media (max-width: 980px) { .order-layout { grid-template-columns: 1fr; } .order-side { position: static; max-height: none; } .pick-grid { max-height: 70vh; min-height: 0; } }
.order-side #quote td { padding: 5px 4px; }
.order-side h3 { margin-bottom: 6px; }
.order-side #submit { margin-top: 10px !important; padding: 12px; }
.side-rows .pr-ctrl { flex-basis: 100%; flex-direction: row; align-items: center; justify-content: flex-end; gap: 6px; }
.side-rows .pr-ctrl .pr-tier { width: 84px; }
.side-rows .pr-sub { font-size: 11.5px; }
.side-rows { flex: 1 1 auto; min-height: 120px; }
.refill-caps { margin-top: 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--hair-strong); background: rgba(0,0,0,.2); }
.cap-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 8px; border: 1px solid var(--hair-strong); background: var(--bg2); font-size: 13px; }
.cap-chip.full { border-color: var(--ok); box-shadow: 0 0 10px -3px var(--ok); }
.cap-chip.over { border-color: var(--err); box-shadow: 0 0 12px -2px var(--err); color: #ff8080; }
.cap-chip.zero { opacity: .45; }
.carry-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; max-height: 420px; overflow: auto; }
.carry-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; background: var(--bg2); border: 1px solid color-mix(in srgb, var(--tier) 45%, transparent); }
.ci-img { width: 40px; flex: none; aspect-ratio: 63 / 88; border-radius: 5px; background: #111 center / cover; }
.ci-body { flex: 1; min-width: 0; font-size: 13px; }
.ci-body b { display: inline; }
.ci-qty { font-weight: 900; font-size: 16px; white-space: nowrap; }
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal-back[hidden] { display: none; }
.modal { max-width: 440px; width: 100%; text-align: center; }
.modal h3 { font-size: 19px; margin-bottom: 8px; }
.filler-opts { display: flex; flex-direction: column; gap: 6px; }
.filler-opts .fo { display: flex; align-items: center; gap: 10px; margin: 0; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--hair-strong); background: var(--bg2); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; }
.filler-opts .fo[hidden] { display: none; }
.filler-opts .fo:has(input:checked) { border-color: var(--accent); box-shadow: var(--glow); background: color-mix(in srgb, var(--accent) 10%, var(--bg2)); }
.filler-opts .fo-name { flex: 1; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.filler-opts .fo-price { font-weight: 800; white-space: nowrap; }
.qr-open { margin: 10px auto 0; padding: 14px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--tier) 60%, transparent); box-shadow: 0 0 18px -6px var(--tier); background: var(--bg2); }
.ended-banner { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--hair-strong); background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 14%, var(--bg2)), var(--bg2)); box-shadow: var(--glow); }
.hh-item .pc-state, .pc-state { white-space: nowrap; }
/* 모바일: 표를 카드형 목록으로 */
@media (max-width: 640px) {
  table.resp, table.resp tbody, table.resp tr, table.resp td { display: block; width: 100%; }
  table.resp tr:first-child:has(th) { display: none; }
  table.resp tr { padding: 10px 0; border-bottom: 1px solid var(--hair); }
  table.resp td { border: 0; padding: 3px 0; text-align: left !important; }
  table.resp td.row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
  table.resp td .progress { max-width: 220px; }
}
#toast { position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 20px); opacity: 0; background: rgba(20,22,30,.95); border: 1px solid var(--accent); box-shadow: var(--glow); color: #fff; padding: 9px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; z-index: 200; transition: .25s; pointer-events: none; max-width: 90vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
.mbar { display: none; }
@media (max-width: 980px) {
  .mbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 150; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(13,15,20,.96); border-top: 1px solid var(--accent); box-shadow: 0 -6px 20px -8px var(--accent); font-size: 14px; cursor: pointer; }
  .mbar-go { color: var(--accent); font-weight: 800; }
  body:has(.mbar) main.wrap { padding-bottom: 120px; }
}
.side-rows { min-height: 200px; }
.scanner[hidden] { display: none; }
/* 모바일 헤더: 메뉴를 두 번째 줄로 내려 전부 보이게 */
@media (max-width: 640px) {
  .top .wrap { height: auto; flex-wrap: wrap; gap: 6px 10px; padding-top: 8px; padding-bottom: 6px; }
  .top .brand { font-size: 16px; flex: 1; }
  .top .nav { order: 3; flex: 1 1 100%; gap: 2px; overflow-x: auto; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .top .nav a { padding: 6px 9px; font-size: 13px; }
}
/* /cards 모바일 2열 */
@media (max-width: 560px) { .hits { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; } .hitcard .meta { padding: 6px 7px; } }
@media (max-width: 560px) {
  .pick-grid, .pick-grid.small-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 62vh; min-height: 0; gap: 8px; }
  .pi-opt { font-size: 11px; }
}

/* 카드 썸네일 + 확대보기 */
.o-cell { display: flex; align-items: center; gap: 12px; }
.o-thumb { position: relative; flex: none; width: 40px; height: 56px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--bg2); overflow: hidden; cursor: zoom-in; display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 800; }
.o-thumb img { width: 100%; height: 100%; object-fit: cover; }
.o-thumb:hover { border-color: var(--accent); }
.o-thumb.empty { cursor: default; }
.o-thumb .o-more { position: absolute; right: 2px; bottom: 2px; background: rgba(0,0,0,.78); color: #fff; font-size: 10px; font-weight: 800; padding: 0 4px; border-radius: 4px; line-height: 15px; }
.p-thumb { width: 34px; height: 48px; }
.card-meta { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.lang-tag { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 0 5px; border-radius: 4px; border: 1px solid var(--line); color: var(--muted); margin-left: 4px; vertical-align: 1px; }
.zoom-box { position: fixed; inset: 0; z-index: 1000; background: rgba(5,6,10,.9); display: none; align-items: center; justify-content: center; padding: 16px; }
.zoom-box.on { display: flex; }
.zoom-box figure { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 100%; }
.zoom-box img { max-height: calc(100vh - 140px); max-width: min(92vw, 520px); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.6); background: #111; }
.zoom-box figcaption { margin-top: 12px; text-align: center; color: #fff; display: flex; flex-direction: column; gap: 3px; max-width: 520px; }
.zoom-box .zb-meta, .zoom-box .zb-n { color: #aab; font-size: 13px; }
.zoom-box .zb-x { position: absolute; top: 14px; right: 16px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 18px; cursor: pointer; }
.zoom-box .zb-nav { display: none; flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; margin: 0 10px; }
.zoom-box.multi .zb-nav { display: block; }
@media (max-width: 560px) { .zoom-box .zb-nav { position: absolute; bottom: 18px; } .zoom-box .zb-prev { left: 18px; } .zoom-box .zb-next { right: 18px; } .zoom-box img { max-height: calc(100vh - 200px); } }
.zoom-box img { min-width: 200px; min-height: 280px; transition: opacity .12s; }
.zoom-box img.loading { opacity: 0; }
.zoom-box figure { background: radial-gradient(circle, rgba(255,255,255,.06), transparent 60%); }

/* 공개 화면을 로그인 상태로 볼 때 안내 */
.login-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; margin-bottom: 18px; border-radius: 10px; font-size: 13px; background: rgba(245,165,36,.1); border: 1px solid rgba(245,165,36,.35); color: var(--text); }
/* 손님 화면 카드 사진 확대 */
[data-zoom] { cursor: zoom-in; }
.qr-card { width: 150px; margin: 10px auto 2px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.winner { margin-top: 3px; font-size: 12px; font-weight: 700; color: #ffd76a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hh-item .winner { text-align: center; font-size: 13px; position: relative; }
/* 매장 사이트 상단: 좌측 = 본 사이트로, 가운데 = 매장 × 브랜드, 우측 = 메뉴 */
.site-top .wrap { display: grid; grid-template-columns: 1fr auto 1fr; }
.site-top .brand { justify-self: center; }
.site-top .nav { justify-self: end; }
.home-link { justify-self: start; display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.home-link:hover { color: inherit; border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.home-link .dot { width: 8px; height: 8px; border-radius: 50%; background: #7c5cff; box-shadow: 0 0 8px #7c5cff; }
.home-link .arr { opacity: .7; }
@media (max-width: 720px) {
  .site-top .wrap { grid-template-columns: 1fr auto 1fr; height: auto; gap: 6px 8px; padding-top: 8px; padding-bottom: 6px; }
  .site-top .brand { justify-self: center; font-size: 15px; flex: none; }
  .site-top .nav { grid-column: 1 / -1; justify-self: stretch; }
  .home-link { padding: 5px 10px; font-size: 12px; }
}
@media (max-width: 420px) { .home-link .lbl { display: none; } .home-link { padding: 6px 10px; } }
.ch-tag { font-size: .8em; font-weight: 800; margin-right: 4px; }
.ch-tag.online { color: #ff5c7a; }
.ch-tag.offline { color: #4dabf7; }
.channel-pick { gap: 10px; }
.channel-pick .pick { flex: 1 1 200px; display: flex; align-items: center; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; margin: 0; }
.channel-pick .pick:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.channel-pick .pick input { width: auto; margin: 0; }
.online-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; }
.biz-no { display: flex; align-items: center; gap: 6px; }
.biz-no input { text-align: center; letter-spacing: .08em; min-width: 0; }
.biz-no input:nth-of-type(1) { flex: 3; } .biz-no input:nth-of-type(2) { flex: 2; } .biz-no input:nth-of-type(3) { flex: 5; }
.biz-no span { color: var(--muted); }
.email-row { display: flex; align-items: center; gap: 6px; }
.email-row input, .email-row select { min-width: 0; flex: 1; }
.email-row .at { color: var(--muted); font-weight: 700; }
.check-msg { min-height: 18px; margin-top: 5px; font-size: 13px; font-weight: 600; }
.check-msg.ok { color: var(--ok); }
.check-msg.bad { color: var(--err); }
@media (max-width: 480px) { .email-row { flex-wrap: wrap; } .email-row #email-id { flex: 1 1 100%; } .email-row .at { display: none; } }
.pc-name .winner { display: block; text-align: center; }
.pc-winners { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 2px 0 10px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 215, 106, .07); border: 1px solid rgba(255, 215, 106, .18); font-size: 12px; }
.pc-winners .lbl { color: #ffd76a; font-weight: 800; }
.pc-winners .w { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.pc-winners .tier { font-size: 10px; padding: 1px 5px; }
.where-card { margin-bottom: 20px; }
.where-head { font-weight: 800; font-size: 15px; margin-bottom: 8px; }
.shop-map { height: 260px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); z-index: 0; }
.shop-map .leaflet-popup-content { color: #111; font-weight: 700; }
/* 배치표 검증 결과 */
.vout:not(:empty) { margin-top: 12px; display: grid; gap: 10px; }
.verdict { padding: 12px 14px; border-radius: 10px; font-weight: 700; line-height: 1.5; }
.verdict.ok { background: rgba(64, 192, 87, .12); border: 1px solid rgba(64, 192, 87, .4); }
.verdict.bad { background: rgba(239, 68, 68, .12); border: 1px solid rgba(239, 68, 68, .45); }
.vcheck { padding: 12px 14px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); font-size: 13px; }
.vq { font-weight: 800; font-size: 14px; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.vwhy { color: var(--muted); margin: 6px 0 8px; line-height: 1.6; }
.vk { flex: none; font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.vk.ok { color: var(--ok); background: rgba(64, 192, 87, .12); }
.vk.bad { color: var(--err); background: rgba(239, 68, 68, .12); }
.vrow { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-top: 1px dashed var(--line); }
.vrow > span:first-child { color: var(--muted); flex: none; }
.vrow > span:last-child { text-align: right; }
.vrow code { font-family: ui-monospace, Menlo, monospace; }
.vtable { width: 100%; font-size: 13px; }
.vtable td, .vtable th { padding: 4px 6px; text-align: center; }
/* QR 화면: 받은 카드 확인 */
.check-box { margin-top: 14px; padding: 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); text-align: center; }
.check-box.bad { border-color: rgba(239, 68, 68, .5); background: rgba(239, 68, 68, .1); text-align: left; }
.check-box details.report > summary { list-style: none; cursor: pointer; }
.check-box details.report > summary::-webkit-details-marker { display: none; }
.chk { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 999px; margin-left: 4px; white-space: nowrap; }
.chk.ok { color: var(--ok); background: rgba(64, 192, 87, .12); }
.chk.bad { color: var(--err); background: rgba(239, 68, 68, .12); }
.check-box.ok { border-color: rgba(64, 192, 87, .5); background: rgba(64, 192, 87, .1); font-size: 16px; }
/* 손님용 내 팩 확인 */
.qr-check { margin: 0 0 20px; }
.qc-head { font-weight: 800; font-size: 16px; }
.qc-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch; }
.qc-row .qc-cam { flex: none; }
.qc-form { flex: 1 1 260px; display: flex; gap: 6px; margin: 0; }
.qc-form input { flex: 1; min-width: 0; text-transform: uppercase; font-family: ui-monospace, Menlo, monospace; letter-spacing: .05em; }
.qc-msg { margin-top: 8px; min-height: 1em; }
.qc-scan { margin-top: 12px; aspect-ratio: 1; max-width: 360px; }
@media (max-width: 480px) { .qc-row .qc-cam { flex: 1 1 100%; } }
.pc-done { margin: 0 0 8px; font-size: 12px; font-weight: 700; color: var(--ok); }
/* 메뉴 숫자 배지 (승인 대기 매장 등): 글자 오른쪽 위에 겹쳐서 메뉴 간격은 그대로 */
.nav a { position: relative; }
.nav a.has-badge { padding-right: 19px; }
.nav-badge { position: absolute; top: 1px; right: 2px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 999px; background: #ff3b5c; color: #fff; font-size: 10px; font-weight: 800; line-height: 15px; text-align: center; box-shadow: 0 0 0 2px var(--bg), 0 2px 8px rgba(255, 59, 92, .45); pointer-events: none; }
/* 사이드 담은 카드: 3~4장이 한 번에 보이도록 2줄 압축 (사진 | 이름·정보 / 등급·수량·삭제) */
.side-rows .prize-row { display: grid; grid-template-columns: 40px minmax(0, 1fr); grid-template-areas: "img main" "img ctrl"; column-gap: 10px; row-gap: 6px; align-items: start; padding: 8px 10px; }
.side-rows .pr-img { grid-area: img; width: 40px; }
.side-rows .pr-main { grid-area: main; min-width: 0; }
.side-rows .pr-title { font-size: 13px; line-height: 1.3; }
.side-rows .pr-sub { font-size: 11.5px; line-height: 1.3; }
.side-rows .pr-ctrl { grid-area: ctrl; width: auto; flex-direction: row; align-items: center; gap: 4px; }
.side-rows .pr-ctrl .pr-tier { width: auto; padding: 3px 6px; font-size: 12.5px; }
.side-rows .pr-ctrl .btn.sm { padding: 2px 8px; font-size: 12px; }
.side-rows .pr-ctrl input[data-k=qty] { width: 40px !important; padding: 3px; font-size: 13px; }
.side-rows .pr-ctrl [data-del] { margin-left: auto; }
/* 목록 높이: 3장 이상이면 최소 3.5장 높이를 확보하고 나머지는 스크롤 (스크롤 막대 항상 표시) */
.side-rows { overflow-y: scroll; scrollbar-width: thin; scrollbar-color: var(--accent) rgba(255, 255, 255, .06); padding-right: 6px; }
.side-rows:not(:has(> :nth-child(3))) { overflow-y: auto; }
.side-rows:has(> :nth-child(3)) { min-height: 300px; }
.side-rows::-webkit-scrollbar { width: 6px; }
.side-rows::-webkit-scrollbar-track { background: rgba(255, 255, 255, .06); border-radius: 6px; }
.side-rows::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 6px; }
.rows-more { flex: none; margin-top: 6px; text-align: center; font-size: 12px; font-weight: 700; color: var(--accent); }
@media (max-width: 980px) { .side-rows:has(> :nth-child(3)) { min-height: 0; max-height: 380px; } }
/* 주소 검색 */
.addr-box { display: grid; gap: 6px; }
.addr-row { display: flex; gap: 6px; }
.addr-row .addr-zip { width: 120px; flex: none; }
.addr-layer { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.addr-layer[hidden] { display: none; }
.addr-layer-in { position: relative; width: min(500px, 100%); height: min(560px, 85vh); background: #fff; border-radius: 12px; overflow: hidden; padding-top: 36px; }
.addr-embed { width: 100%; height: 100%; }
.addr-close { position: absolute; top: 4px; right: 6px; border: 0; background: none; font-size: 20px; cursor: pointer; color: #333; }
/* 배송지 선택 */
.ship-pick { display: grid; gap: 8px; }
.ship-pick label.sp { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; margin: 0; }
.ship-pick label.sp:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.ship-pick label.sp input { width: auto; margin-top: 3px; }
.addr-card { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
/* 나머지 구성: 옵션 이미지 + 사이드 담은 카드 아래 표시 */
.fo .fo-img { width: 30px; height: 42px; object-fit: cover; border-radius: 4px; flex: none; }
.filler-row { flex: none; margin-top: 8px; }
.filler-row .prize-row { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 10px; align-items: center; padding: 8px 10px; border-style: dashed; }
.filler-row .pr-img { width: 40px; }
.filler-row .pr-title { font-size: 13px; }
.filler-row .pr-sub { font-size: 11.5px; }
.filler-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 12px; }
.filler-products .fp { display: flex; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.filler-products .fp img { width: 46px; height: 64px; object-fit: cover; border-radius: 5px; cursor: zoom-in; flex: none; }
.filler-row .prize-row { grid-template-columns: 40px minmax(0, 1fr); grid-template-areas: "img main" "img ctrl"; row-gap: 6px; align-items: start; }
.filler-row .pr-img { grid-area: img; }
.filler-row .pr-main { grid-area: main; min-width: 0; }
.filler-row .pr-ctrl { grid-area: ctrl; width: auto; flex-direction: row; align-items: center; gap: 4px; }
.filler-row .pr-ctrl .pr-tier { width: auto; padding: 3px 6px; font-size: 12.5px; }
.filler-row .pr-ctrl .btn.sm { padding: 2px 8px; font-size: 12px; }
.filler-row .pr-ctrl input[data-fqty] { width: 52px; padding: 3px; font-size: 13px; text-align: center; }
.filler-row .pr-ctrl [data-fdel] { margin-left: auto; }
/* 담은 카드 목록: 카드 수만큼만 높이 (빈 공간 없음), 3장 이상이면 3.5장 높이 + 스크롤 */
.side-rows { flex: 0 1 auto; min-height: 0; }
.side-rows:has(> :nth-child(3)) { min-height: 300px; }
@media (max-width: 980px) { .side-rows:has(> :nth-child(3)) { min-height: 0; } }
.cat-item.best { outline: 2px solid var(--accent); }
/* 판매 카드 옵션: [등급] 가격 / 재고 [− 0 +] */
.pi-opt { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "gl price" "stock step"; align-items: center; gap: 4px 6px; padding: 4px 6px; cursor: pointer; }
.pi-opt .gl { grid-area: gl; justify-self: start; }
.pi-opt .po-price { grid-area: price; justify-self: end; font-weight: 700; white-space: nowrap; }
.pi-opt .po-stock { grid-area: stock; margin: 0; }
.pi-opt .po-step { grid-area: step; justify-self: end; display: inline-flex; align-items: center; gap: 4px; }
.pi-opt .po-step button { width: 24px; height: 22px; padding: 0; border-radius: 6px; border: 1px solid var(--hair-strong); background: var(--bg2); color: inherit; font-weight: 800; cursor: pointer; line-height: 1; }
.pi-opt .po-step button:disabled { opacity: .35; cursor: default; }
.pi-opt .po-step b { min-width: 18px; text-align: center; font-size: 12px; }
.pi-opt.in-cart { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--bg)); }
.pi-opt { grid-template-columns: minmax(0, 1fr) auto; }
.pi-opt .gl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi-opt .po-stock { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 옵션 줄: 1줄 [등급] 가격 (좁으면 가격이 아래로) / 2줄 재고 [− n +] */
.pi-opt { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.pi-opt .po-top, .pi-opt .po-bot { display: flex; align-items: center; justify-content: space-between; gap: 4px 6px; }
.pi-opt .po-top { flex-wrap: wrap; }
.pi-opt .gl { max-width: none; overflow: visible; white-space: nowrap; }
.pi-opt .po-price { margin-left: auto; }
.pi-opt .po-stock { margin: 0; }
.pi-opt .po-stock { overflow: visible; font-size: 10.5px; }
.pi-opt .po-step { gap: 2px; }
.pi-opt .po-step button { width: 22px; height: 22px; }
.pi-opt .po-step b { min-width: 16px; }
/* 카드상품 관리: 왼쪽 등록 폼(460px) / 오른쪽 목록 — 좁은 화면에서는 위아래로 */
.products-layout { grid-template-columns: 460px minmax(0, 1fr); align-items: start; margin-top: 16px; }
@media (max-width: 980px) { .products-layout { grid-template-columns: minmax(0, 1fr); } }
#pf .row > .sp { min-width: 0; }
@media (max-width: 480px) { #pf .row[style*="nowrap"] { flex-wrap: wrap !important; } #pf .pv { width: 96px; } }
.products-layout > * { min-width: 0; }
/* 그리드 칸은 내용이 길어도 화면 폭보다 넓어지지 않게 (휴대폰 가로 잘림 방지) */
.grid > * { min-width: 0; }
