/* 클래스와 쓰임
   page, page-wide, app: 페이지 틀. stack, row, grid: 배치.
   disp, h-lg, h-md: 큰 제목. muted, small, help: 보조 글. num, human, money: 값과 이름.
   btn, primary, sec, danger, mini, btns: 주·보조·위험 버튼과 묶음.
   field, lab, req, vis, input, check, consent, choice, on: 입력과 동의·선택.
   notice, lockcard, error: 안내. kv, val, lab2, copy: 값 줄과 복사.
   pill, ok, wait, bad, idle: 상태 알약. table, table-wrap, refund-table: 표.
   list, list-item, card, cards: 목록과 카드. chips, chip: 필터.
   band: 알림 띠. tl, st, done, now, next: 타임라인. progress: 진행 표시.
   drawer-backdrop, drawer, drawer-head, drawer-body, drawer-actions: 서랍.
   tag, slot, tophi, who, nm, sub, note, gg: 이름표. plate: 번호판.
   footer, seller, footer-links, privacy-link: 판매자·법정 링크.
   hr, sr-only, copy-buffer: 구분선·접근성·복사 보조.
*/
@font-face { font-family: 'SUIT Variable'; src: url('/fonts/SUIT-Variable.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Bagel Fat One'; src: url('/fonts/BagelFatOne-subset.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
:root {
  --bg:#FFFFFF; --fg:#000000; --fg2:#333333; --fg3:#666666; --line:#CCCCCC; --line2:#000000; --soft:#F4F4F4;
  --btn-bg:#000000; --btn-fg:#FFFFFF; --r-btn:8px; --r-card:12px; --r-input:8px; --r-pill:960px;
  --font-ui:'SUIT Variable','Pretendard Variable',-apple-system,sans-serif; --font-disp:'Bagel Fat One','SUIT Variable',sans-serif; --font-human:var(--font-ui); --font-data:var(--font-ui);
  --disp-weight:400; --ls-body:-0.02em; --ls-disp:-0.02em; --input-fg:#000000; --mark:transparent;
}
*, *::before, *::after { box-sizing: border-box; }
* { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.55 var(--font-ui); letter-spacing: var(--ls-body); word-break: keep-all; overflow-wrap: break-word; text-wrap: pretty; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2, h3, .disp { text-wrap: balance; }
a { color: inherit; text-underline-offset: 3px; }
button, input, textarea, select { font: inherit; color: inherit; }
button, .btn { white-space: nowrap; cursor: pointer; }
input, textarea, select { font-size: 16px; min-width: 0; max-width: 100%; }
textarea { resize: vertical; }
button:disabled, input:disabled, select:disabled, textarea:disabled { opacity: .55; cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--fg); outline-offset: 3px; }
/* 화면 전환 때 스크립트로 옮긴 포커스에는 테두리를 그리지 않는다 */
[tabindex='-1']:focus { outline: none; }
[hidden] { display: none !important; }
img, svg { max-width: 100%; }
.page { width: min(100%, 640px); margin-inline: auto; padding: 28px max(18px, env(safe-area-inset-right)) 36px max(18px, env(safe-area-inset-left)); }
.page-wide { width: min(100%, 1200px); }
.app, .stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.row, .btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row > *, .btns > *, .grid > *, .cards > * { min-width: 0; }
.grid, .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.disp { font-family: var(--font-disp); font-weight: var(--disp-weight); letter-spacing: var(--ls-disp); line-height: 1.22; }
.h-lg { font-size: clamp(28px, 6vw, 40px); }
.h-md { font-size: 24px; }
.muted, .help { font-size: 14px; color: var(--fg3); }
.small { font-size: 12.5px; color: var(--fg3); }
.num, .money { font-family: var(--font-data); font-variant-numeric: tabular-nums; }
.human { font-family: var(--font-human); }
.money { font-size: 32px; font-weight: 800; }
.btn { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; width: 100%; max-width: 100%; padding: 10px 16px; border: 1.5px solid var(--btn-bg); border-radius: var(--r-btn); background: var(--btn-bg); color: var(--btn-fg); font-size: 16px; font-weight: 700; text-decoration: none; }
.btn.primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn.sec { background: transparent; color: var(--fg); border-color: var(--line2); }
.btn.danger { background: transparent; color: #C81E1E; border-color: #C81E1E; }
.btn.mini, .copy { min-height: 44px; width: auto; padding: 6px 11px; font-size: 14px; }
.copy, .btn.copy { flex: none; border: 1px solid var(--line2); border-radius: var(--r-btn); background: var(--bg); color: var(--fg); }
.btns .btn { flex: 1 1 140px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.lab { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: 14px; font-weight: 700; }
.req, .error { color: #C81E1E; }
.vis { margin-left: auto; font-size: 12px; color: var(--fg3); }
.input { width: 100%; min-height: 48px; border: 1px solid var(--line2); border-radius: var(--r-input); padding: 10px 12px; color: var(--input-fg); background: var(--bg); font-size: 16px; line-height: 1.45; }
.input[aria-invalid='true'] { border: 2px solid #C81E1E; }
.input::placeholder { color: var(--fg3); opacity: 1; }
.check { display: flex; align-items: flex-start; gap: 9px; font-size: 14px; }
.check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--fg); }
.consent, .card { border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; min-width: 0; }
.consent { display: flex; flex-direction: column; gap: 10px; }
.consent dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 5px 10px; font-size: 14px; }
.consent dt { font-weight: 800; }
.choice { display: flex; flex-direction: column; gap: 3px; padding: 12px; border: 1px solid var(--line2); border-radius: var(--r-input); background: var(--bg); text-align: left; }
.choice.on, .choice:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--fg); }
.notice, .band { padding: 12px 14px; background: var(--soft); border-radius: var(--r-card); }
.lockcard { padding: 14px; border: 1px dashed var(--line2); border-radius: var(--r-card); }
.kv { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.kv > * { min-width: 0; max-width: 100%; }
.val { font-size: 17px; font-weight: 800; }
.lab2 { font-size: 13px; color: var(--fg3); }
/* 시안 톤 A 그대로. 색만으로 말하지 않고 글자로 말한다 */
.pill { display: inline-flex; align-items: center; max-width: 100%; border-radius: var(--r-pill); padding: 2px 9px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.pill.ok { background: #31C431; color: #000; }
.pill.wait { background: #FFAE00; color: #000; }
.pill.bad { background: #C81E1E; color: #FFF; }
.pill.idle { background: #ECECEC; color: #000; }
.drawer-body > .pill { align-self: flex-start; }
.table-wrap { max-width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { font-weight: 800; border-bottom-color: var(--line2); }
.refund-table td { white-space: pre-line; }
.list { list-style: none; margin: 0; padding: 0; }
.list-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 44px; padding: 6px 12px; border: 1px solid var(--line2); border-radius: var(--r-pill); background: var(--bg); font-size: 14px; }
.chip.on, .chip[aria-pressed='true'] { background: var(--fg); color: var(--bg); }
.band { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; border: 1px solid var(--line2); text-align: left; }
.tl { display: flex; flex-direction: column; list-style: none; padding: 0; margin: 0; }
.tl .st { position: relative; display: flex; align-items: flex-start; gap: 10px; padding-bottom: 16px; font-size: 14px; }
.tl .st::before { content: ''; position: relative; z-index: 1; flex: none; width: 14px; height: 14px; margin-top: 4px; border: 2px solid var(--line); border-radius: 50%; background: var(--bg); }
.tl .st::after { content: ''; position: absolute; left: 6px; top: 16px; bottom: -3px; width: 2px; background: var(--line); }
.tl .st:last-child::after { display: none; }
.tl .st.done::before { border-color: var(--fg); background: var(--fg); }
.tl .st.now::before { border-color: var(--fg); box-shadow: 0 0 0 3px var(--soft); }
.tl .st.next { color: var(--fg3); }
.tl .st small { display: block; color: var(--fg3); }
.progress { display: flex; gap: 4px; list-style: none; padding: 0; margin: 0; }
.progress > * { flex: 1; min-width: 0; min-height: 4px; border-radius: 2px; background: var(--line); }
.progress > .on, .progress > [aria-current='step'] { background: var(--fg); }
.drawer-backdrop { position: fixed; inset: 0; z-index: 20; background: rgb(0 0 0 / .4); }
.drawer { position: fixed; inset: 0 0 0 auto; z-index: 21; width: min(100%, 480px); max-height: 100dvh; overflow-y: auto; background: var(--bg); border-left: 1px solid var(--line); padding: 20px max(18px, env(safe-area-inset-right)) 24px 18px; }
.drawer-head, .drawer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.drawer-head { justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.drawer-body { display: flex; flex-direction: column; gap: 16px; padding-block: 20px; }
.drawer-actions .btn { flex: 1 1 140px; }
.tag { position: relative; display: flex; flex-direction: column; min-width: 0; border-radius: var(--r-card); overflow: hidden; background: var(--paper, #FFE4D6); color: #000; box-shadow: 0 1px 1px rgb(0 0 0 / .05), 0 2px 4px rgb(0 0 0 / .05), 0 6px 10px rgb(0 0 0 / .05), 0 14px 20px rgb(0 0 0 / .05); break-inside: avoid; }
.tag .slot { width: 34px; height: 7px; border-radius: 4px; background: rgb(0 0 0 / .72); margin: 9px auto 0; }
.tag .tophi { font-family: var(--font-disp); font-weight: var(--disp-weight); font-size: 15px; text-align: center; padding: 6px 10px 0; letter-spacing: var(--ls-disp); }
.tag .who { padding: 2px 12px 8px; text-align: center; }
.tag .nm { font-size: 26px; font-weight: 800; letter-spacing: -.04em; line-height: 1.2; }
.tag .sub { font-size: 12px; color: #333; }
.tag .note { display: flex; flex-direction: column; gap: 5px; padding: 9px 12px; background: rgb(255 255 255 / .72); color: #1A1A1A; font-size: 12.5px; }
.gg { font-weight: 800; }
.plate { display: inline-block; vertical-align: middle; flex-shrink: 0; height: auto; }
.plate text { font-family: var(--font-disp); font-variant-numeric: tabular-nums; }
.footer { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--fg3); font-size: 13px; }
.seller { display: flex; flex-direction: column; gap: 5px; }
.seller > div { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.seller dt { font-weight: 700; }
.seller dd { min-width: 0; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 12px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
.privacy-link { color: var(--fg); font-weight: 800; border: 1px solid var(--line2); border-radius: 6px; padding: 6px 10px; }
.hr { height: 1px; background: var(--line); border: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.copy-buffer { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
@media (max-width: 400px) {
  .page { padding-top: 20px; }
  .btns { align-items: stretch; }
  .table th, .table td { padding-inline: 5px; }
}
@media print {
  .page, .page-wide { width: 100%; padding: 0; }
  .tag, .card, .refund-table tr { break-inside: avoid; }
  .drawer { position: static; width: 100%; max-height: none; overflow: visible; }
  .drawer-backdrop, .copy, .copy-buffer { display: none; }
  .footer { break-inside: avoid; }
}
