/* 쪽도장: 영수증 리워드·출판 후원 시연 (reward). 인상: 감열지 영수증과 적립 도장 */

.rw {
  --bg: #FAF9F6;
  --surface: #FFFFFF;
  --surface-2: #F3F1EC;
  --text: #17181C;
  --muted: #6B6E76;
  --line: #E4E2DC;
  --line-strong: #CFCBC1;
  --primary: #D61F45;
  --primary-soft: #FBE7EB;
  --accent: #16213A;
  --accent-soft: #E6E9F1;
  --ok: #1D7A4F;
  --ok-soft: #E5F3EB;
  --warn: #A86A00;
  --warn-soft: #FBF0DC;
  --danger: #8E1B1B;
  --danger-soft: #F7E4E4;
  --font: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --num: "Red Hat Display", var(--font);
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.rw { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.55; overflow-x: hidden; word-break: keep-all; overflow-wrap: break-word; }
:where(.rw) :where(h1, h2, h3, h4, p, dl, dd, figure, ul, ol, fieldset) { margin: 0; }
:where(.rw) :where(ul, ol) { padding: 0; list-style: none; }
:where(.rw) :where(button, input, select, textarea) { font: inherit; color: inherit; }
:where(.rw) :where(a) { color: inherit; }
.rw img { max-width: 100%; height: auto; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.num { text-align: right; }
.rw :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.rw-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- 안내 띠·머리말 ---------- */
.rw-band { height: 28px; line-height: 28px; text-align: center; padding: 0 12px; background: #EEECE6; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rw-head { background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.rw-head__inner { max-width: 1200px; margin: 0 auto; padding: 8px 20px; display: flex; align-items: center; gap: 16px; }
.rw-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; min-height: 44px; min-width: 0; }
.rw-brand__mark { width: 30px; height: 30px; flex: none; }
.rw-brand__name { font-weight: 800; font-size: 20px; letter-spacing: -0.03em; white-space: nowrap; }
.rw-brand__tag { font-size: 11.5px; font-weight: 700; color: var(--muted); border: 1.5px solid var(--line-strong); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.rw-seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); margin-left: 8px; }
.rw-seg__item { display: inline-flex; align-items: center; gap: .28em; min-height: 38px; padding: 0 14px; border-radius: 9px; font-weight: 700; font-size: 14.5px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.rw-seg__item.is-on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(23, 24, 28, .14); }
.rw-head__tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.rw-switch { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px 0 8px; border: 1.5px solid var(--primary); border-radius: 999px; background: var(--primary-soft); cursor: pointer; font-weight: 800; color: var(--primary); }
.rw-switch__track { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--primary); flex: none; transition: background .15s; }
.rw-switch__dot { position: absolute; top: 3px; left: 19px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.rw-switch__label { font-size: 14.5px; white-space: nowrap; }
.rw-switch__state { font-size: 12.5px; font-weight: 800; padding: 0 6px; border-radius: 6px; background: var(--primary); color: #fff; }
.rw-switch[aria-checked="false"] { border-color: var(--line-strong); background: var(--surface); color: var(--muted); }
.rw-switch[aria-checked="false"] .rw-switch__track { background: #B9B6AE; }
.rw-switch[aria-checked="false"] .rw-switch__dot { left: 3px; }
.rw-switch[aria-checked="false"] .rw-switch__state { background: #8A8D94; }

/* ---------- 버튼·글자 ---------- */
.rw-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px; border: 1.5px solid transparent; border-radius: 12px; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.rw-btn--sm { min-height: 38px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.rw-btn--block { width: 100%; }
.rw-btn--primary { background: var(--primary); color: #fff; }
.rw-btn--primary:hover { background: #BE1A3D; }
.rw-btn--ink { background: var(--accent); color: #fff; }
.rw-btn--ink:hover { background: #0F172B; }
.rw-btn--ok { background: var(--ok); color: #fff; }
.rw-btn--danger { background: var(--surface); border-color: var(--danger); color: var(--danger); }
.rw-btn--ghost { background: var(--surface); border-color: var(--line-strong); color: var(--text); }
.rw-btn--ghost:hover { border-color: var(--text); }
.rw-btn:disabled { cursor: not-allowed; background: var(--surface-2); color: var(--muted); border-color: var(--line); }
.rw-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: none; border-radius: 10px; background: transparent; cursor: pointer; }
.rw-icon-btn:hover { background: var(--surface-2); }

.rw-eyebrow { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.rw-h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.3; }
.rw-h2 { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.35; }
.rw-h3 { font-size: 16px; font-weight: 800; letter-spacing: -0.015em; }
.rw-small { font-size: 13px; color: var(--muted); }
.rw-link { font-size: 14px; font-weight: 700; color: var(--accent); text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.rw-tag { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 700; padding: 1px 7px; border: 1.5px dashed var(--line-strong); border-radius: 6px; color: var(--muted); background: var(--surface); white-space: nowrap; vertical-align: 1px; }
.rw-flat { font-size: 13.5px; color: var(--text); background: var(--surface-2); border-radius: 10px; padding: 8px 11px; margin-top: 10px; }

.rw-acct { display: inline-flex; align-items: center; font-size: 11px; font-weight: 800; padding: 0 6px; border-radius: 5px; border: 1.5px solid currentColor; line-height: 17px; white-space: nowrap; vertical-align: 1px; }
.rw-acct--gen { color: var(--primary); }
.rw-acct--pub { color: var(--accent); }
.is-plus { color: var(--ok); }
.is-minus { color: var(--primary); }

.rw-st { display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 800; padding: 2px 8px; border-radius: 7px; border: 1.5px solid currentColor; white-space: nowrap; }
.rw-st--ok { color: var(--ok); background: var(--ok-soft); }
.rw-st--warn { color: var(--warn); background: var(--warn-soft); }
.rw-st--bad { color: var(--danger); background: var(--danger-soft); }
.rw-chip { display: inline-flex; font-size: 11.5px; font-weight: 800; padding: 1px 7px; border-radius: 6px; margin-top: 3px; width: fit-content; }
.rw-chip--ok { color: var(--ok); background: var(--ok-soft); }
.rw-chip--warn { color: var(--warn); background: var(--warn-soft); }
.rw-chip--danger { color: var(--danger); background: var(--danger-soft); }

/* 도장: 테두리형, −4도 */
.rw-stamp { display: inline-flex; align-items: center; width: fit-content; font-size: 12px; font-weight: 800; letter-spacing: -0.01em; color: var(--primary); border: 2px solid var(--primary); border-radius: 6px; padding: 1px 8px; transform: rotate(-4deg); white-space: nowrap; background: rgba(255, 255, 255, .7); }
.rw-stamp--line { margin-top: 6px; }
.rw-mini-stamp { display: inline-flex; width: fit-content; margin-top: 4px; font-size: 11.5px; font-weight: 800; color: var(--primary); border: 1.5px solid var(--primary); border-radius: 5px; padding: 0 6px; transform: rotate(-3deg); }

/* ---------- 본문 틀 ---------- */
.rw-main { max-width: 1160px; margin: 0 auto; padding: 24px 20px 40px; }
.rw-main--admin { max-width: 1200px; }
.rw-stage { display: grid; grid-template-columns: 390px minmax(0, 1fr); gap: 28px; align-items: start; }

/* 휴대폰 틀 */
.rw-phone { width: 390px; border: 9px solid #17181C; border-radius: 46px; background: var(--bg); box-shadow: 0 24px 60px rgba(23, 24, 28, .18); position: relative; }
.rw-phone__status { display: flex; justify-content: space-between; align-items: center; padding: 12px 26px 4px; font-size: 13px; font-weight: 700; border-radius: 38px 38px 0 0; }
.rw-phone__icons { display: inline-flex; gap: 6px; align-items: center; }
.rw-app { padding: 8px 16px 20px; min-height: 640px; }
.rw-app__head { padding: 6px 2px 14px; }
.rw-app__head--row { display: flex; align-items: center; gap: 4px; }
.rw-app__hi { font-size: 13.5px; font-weight: 700; color: var(--primary); }
.rw-app__title { font-size: 20px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.35; margin-top: 2px; }
.rw-app__head .rw-small { margin-top: 6px; }
.rw-back { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 44px; margin-left: -10px; text-decoration: none; }

.rw-tabbar { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border-top: 1px solid var(--line); border-radius: 0 0 37px 37px; padding: 6px 8px 14px; z-index: 5; }
.rw-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; font-size: 12px; font-weight: 700; color: var(--muted); text-decoration: none; border-radius: 12px; }
.rw-tab.is-on { color: var(--primary); }
.rw-tab.is-on span { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }

.rw-block { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-top: 12px; }
.rw-block__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.rw-block > .rw-small + * { margin-top: 10px; }

/* ---------- 첫 화면 사용자 화면 ---------- */
.rw-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rw-bal { border-radius: 18px; padding: 14px 14px 12px; color: #fff; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rw-bal--gen { background: var(--primary); }
.rw-bal--pub { background: var(--accent); }
.rw-bal__label { font-size: 13px; font-weight: 800; opacity: .95; }
.rw-bal__num { font-family: var(--num); font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.rw-bal__num small { font-size: 17px; margin-left: 2px; }
.rw-bal__use { font-size: 12px; opacity: .9; }
.rw-match { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin-top: 10px; padding: 8px 12px; border-radius: 12px; border: 1.5px solid var(--ok); background: var(--ok-soft); font-size: 12.5px; color: var(--ok); }
.rw-match b { font-weight: 800; font-size: 13px; }
.rw-match .mono { color: var(--text); font-size: 12px; }
.rw-match.is-bad { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.rw-ledger-chip { display: none; }

.rw-tax { margin-top: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; }
.rw-tax__row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 13.5px; font-weight: 700; }
.rw-tax__row .mono { font-size: 12.5px; }
.rw-bar { height: 8px; border-radius: 999px; background: var(--surface-2); margin: 8px 0 6px; overflow: hidden; border: 1px solid var(--line); }
.rw-bar span { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.rw-bar--ink span { background: var(--accent); }

.rw-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.rw-quick__item { display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; text-decoration: none; min-height: 64px; }
.rw-quick__item b { display: block; font-size: 14.5px; }
.rw-quick__item small { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.rw-quick__icon { width: 38px; height: 38px; flex: none; border-radius: 12px; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; }
.rw-quick__icon--ink { background: var(--accent-soft); color: var(--accent); }

.rw-recent > li + li { border-top: 1px solid var(--line); }
.rw-rec { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; }
.rw-rec__main { display: flex; flex-direction: column; min-width: 0; }
.rw-rec__main b { font-size: 14.5px; }
.rw-rec__main small { font-size: 12px; color: var(--muted); }
.rw-rec__amt { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.rw-rec__amt b { font-size: 15px; font-weight: 600; }
.rw-rec__amt small { font-size: 11.5px; color: var(--muted); }

.rw-pills { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; background: var(--surface-2); border-radius: 14px; }
.rw-pill { min-height: 44px; border: none; border-radius: 11px; background: transparent; font-weight: 800; color: var(--muted); cursor: pointer; }
.rw-pill--gen.is-on { background: var(--primary); color: #fff; }
.rw-pill--pub.is-on { background: var(--accent); color: #fff; }
.rw-history__note { margin: 10px 2px 4px; }
.rw-recent--full { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 2px 14px; margin-top: 8px; }
.rw-sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 10px; padding: 10px 14px; border-radius: 14px; border: 1.5px solid var(--ok); background: var(--ok-soft); font-size: 13px; }
.rw-sum b { font-size: 13.5px; }
.rw-sum em { font-style: normal; font-weight: 800; color: var(--ok); margin-left: auto; }
.rw-sum.is-bad { border-color: var(--danger); background: var(--danger-soft); }

/* ---------- 감열지 원장 ---------- */
.rw-ledger { position: sticky; top: 16px; container-type: inline-size; }
.rw--home .rw-ledger { position: static; }
.rw-paper { position: relative; background: var(--surface); padding: 22px 22px 18px; filter: drop-shadow(0 10px 22px rgba(23, 24, 28, .12)); }
.rw-paper::before, .rw-paper::after { content: ""; position: absolute; left: 0; right: 0; height: 10px; background-size: 14px 10px; background-repeat: repeat-x; }
.rw-paper::before { top: -10px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10'%3E%3Cpath d='M0 10.5L7 0l7 10.5z' fill='%23FFFFFF'/%3E%3C/svg%3E"); }
.rw-paper::after { bottom: -10px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10'%3E%3Cpath d='M0-.5L7 10l7-10.5z' fill='%23FFFFFF'/%3E%3C/svg%3E"); }
.rw-paper__head { text-align: center; padding-bottom: 12px; border-bottom: 1.5px dashed var(--line-strong); }
.rw-paper__title { font-family: var(--mono); font-weight: 600; font-size: 15px; letter-spacing: .32em; }
.rw-paper__title::before, .rw-paper__title::after { content: "* * *"; letter-spacing: .1em; color: var(--muted); margin: 0 10px; font-weight: 400; }
.rw-paper__sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.rw-paper__foot { margin-top: 14px; padding-top: 12px; border-top: 1.5px dashed var(--line-strong); font-size: 12.5px; color: var(--muted); text-align: center; }

.rw-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 14px; border: 1.5px solid var(--text); border-radius: 4px; }
.rw-metric { padding: 9px 10px; text-align: center; min-width: 0; }
.rw-metric + .rw-metric { border-left: 1.5px solid var(--text); }
.rw-metric dt { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.rw-metric dd { font-family: var(--num); font-size: 26px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.rw-metric--hot dd { color: var(--primary); }
.rw-metric--ok dd { color: var(--ok); }
.rw-metric--bad dd { color: var(--danger); }

.rw-recon { margin-top: 10px; display: grid; gap: 4px; }
.rw-recon li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 4px 0; }
.rw-recon li .mono { flex: 1; min-width: 0; }
.rw-recon li b { font-weight: 800; color: var(--ok); white-space: nowrap; }
.rw-recon li.is-bad b { color: var(--danger); }

.rw-last { margin-top: 10px; padding: 10px 12px 12px; background: var(--surface-2); border-radius: 6px; }
.rw-last__head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2px 10px; font-size: 12.5px; font-weight: 700; margin-bottom: 8px; }
.rw-last__head .mono { color: var(--muted); font-weight: 500; }

.rw-reqs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.rw-last .rw-reqs { margin-top: 0; }
.rw-req { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 10px; background: var(--surface); border: 1.5px dashed var(--line-strong); border-radius: 8px; font-size: 12.5px; min-width: 0; }
.rw-req__n { font-weight: 800; }
.rw-req__key { color: var(--muted); font-size: 12px; }
.rw-req__res { font-weight: 700; color: var(--ok); }
.rw-req.is-ok { border-style: solid; border-color: var(--ok); }
.rw-req.is-bad { border-style: solid; border-color: var(--danger); }
.rw-req.is-bad .rw-req__res { color: var(--danger); }
.rw-req.is-dup { background: #FFFBFC; }
.rw-stamp--req { margin-top: 4px; }
.rw-reqs__note { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); margin-top: 6px; }

.rw-lines { margin-top: 14px; border-top: 1.5px dashed var(--line-strong); padding-top: 8px; }
.rw-lines__more { font-size: 12.5px; color: var(--muted); padding: 2px 0 8px; }
.rw-lines__more a { color: var(--accent); font-weight: 700; }
.rw-lines__head, .rw-line { display: grid; grid-template-columns: 86px minmax(0, 1fr) 72px 92px 70px; gap: 10px; align-items: start; }
.rw-lines__head { font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 2px 6px 6px; border-bottom: 1px solid var(--line); }
.rw-line { padding: 9px 6px; border-bottom: 1px dotted var(--line-strong); font-size: 13px; }
.rw-line__at { font-size: 12px; color: var(--muted); padding-top: 1px; }
.rw-line__kind { display: flex; flex-direction: column; min-width: 0; }
.rw-line__name { font-weight: 700; }
.rw-line__kind small { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.rw-line__amt { font-weight: 600; font-size: 13.5px; }
.rw-line__key { font-size: 12px; color: var(--muted); padding-top: 1px; }
.rw-line__after { font-size: 13px; }
.rw-line__after-label { display: none; }
.rw-line.is-last { background: linear-gradient(90deg, var(--primary-soft), transparent 70%); box-shadow: inset 3px 0 0 var(--primary); }

@container (max-width: 560px) {
  .rw-lines__head { display: none; }
  .rw-line { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "kind amt" "meta after"; gap: 2px 10px; }
  .rw-line__kind { grid-area: kind; }
  .rw-line__amt { grid-area: amt; text-align: right; }
  .rw-line__at { grid-area: meta; display: inline; }
  .rw-line__key { grid-area: meta; margin-left: 92px; }
  .rw-line__after { grid-area: after; text-align: right; color: var(--muted); font-size: 12px; }
  .rw-line__after-label { display: inline; }
  .rw-metric dd { font-size: 22px; }
  .rw-metric dt { font-size: 11px; }
}

/* 요청이 날아와 한 줄만 인쇄되는 장면 */
@keyframes rw-fly { from { opacity: 0; transform: translateY(-26px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes rw-print { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes rw-stamp-in { 0% { opacity: 0; transform: rotate(-4deg) scale(1.7); } 60% { opacity: 1; transform: rotate(-4deg) scale(.94); } 100% { opacity: 1; transform: rotate(-4deg) scale(1); } }
@keyframes rw-glow { from { background-color: #FFE3EA; } to { background-color: transparent; } }
.rw-ledger.is-flying .rw-last .rw-req { animation: rw-fly .42s ease-out both; }
.rw-ledger.is-flying .rw-last .rw-req.is-dup { animation-delay: .22s; }
.rw-ledger.is-flying .rw-last .rw-stamp--req { animation: rw-stamp-in .38s ease-out .75s both; }
.rw-ledger.is-flying .rw-line.is-last { animation: rw-print .55s steps(6) .45s both, rw-glow 1.6s ease-out 1s; }
.rw-ledger.is-flying .rw-metrics dd { animation: rw-fly .3s ease-out .9s both; }

@media (prefers-reduced-motion: reduce) {
  .rw-ledger.is-flying * { animation: none !important; }
  .rw-switch__track, .rw-switch__dot { transition: none; }
}

/* ---------- 영수증 인증 ---------- */
.rw-samples { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0 12px; }
.rw-sample { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 6px 10px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface-2); cursor: pointer; min-width: 0; }
.rw-sample img { width: 100%; max-width: 96px; filter: drop-shadow(0 2px 4px rgba(23, 24, 28, .12)); }
.rw-sample__label { font-weight: 800; font-size: 13.5px; }
.rw-sample__hint { font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.3; }
.rw-sample[aria-checked="true"] { border-color: var(--primary); background: var(--primary-soft); }
.rw-sample[aria-checked="true"] .rw-sample__label { color: var(--primary); }

.rw-result { border-width: 1.5px; }
.rw-result__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.rw-reading { display: flex; gap: 12px; align-items: center; font-size: 13.5px; color: var(--muted); }
.rw-reading img { width: 96px; flex: none; opacity: .75; }
.rw-dots { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); margin-right: 6px; animation: rw-pulse .8s ease-in-out infinite alternate; }
@keyframes rw-pulse { from { opacity: .25; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .rw-dots { animation: none; } }
.rw-ocr { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; align-items: start; }
.rw-ocr img { width: 110px; filter: drop-shadow(0 2px 6px rgba(23, 24, 28, .14)); }
.rw-kv { display: grid; gap: 6px; }
.rw-kv > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; font-size: 13.5px; }
.rw-kv dt { color: var(--muted); font-weight: 600; }
.rw-kv dd { font-weight: 700; overflow-wrap: anywhere; }
.rw-kv--ocr > div { grid-template-columns: 1fr; gap: 0; }
.rw-kv--ocr dt { font-size: 12px; }
.is-ok { color: var(--ok); }
.is-warn { color: var(--warn); }
.rw-verdict { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; border: 2px solid currentColor; font-size: 13.5px; }
.rw-verdict b { font-size: 16px; font-weight: 800; }
.rw-verdict span { color: var(--text); }
.rw-verdict--ok { color: var(--ok); background: var(--ok-soft); }
.rw-verdict--warn { color: var(--warn); background: var(--warn-soft); }
.rw-verdict--bad { color: var(--danger); background: var(--danger-soft); }
.rw-verdict + .rw-small { margin-top: 8px; }
.rw-why { display: grid; gap: 6px; margin-top: 8px; }
.rw-why li { display: flex; flex-direction: column; padding: 8px 10px; border-left: 3px solid var(--danger); background: var(--surface-2); border-radius: 0 8px 8px 0; font-size: 13px; }
.rw-why .mono { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.rw-result .rw-btn--block { margin-top: 10px; }

.rw-subs > li + li { border-top: 1px solid var(--line); }
.rw-sub { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; }
.rw-sub > div { display: flex; flex-direction: column; min-width: 0; }
.rw-sub b { font-size: 14px; }
.rw-sub small { font-size: 12px; color: var(--muted); }
.rw-sub .rw-st { white-space: normal; text-align: right; max-width: 52%; }

/* ---------- 쿠폰·후원 ---------- */
.rw-own { margin-top: 8px; font-size: 13.5px; color: var(--muted); }
.rw-own__gen { color: var(--primary); }
.rw-own__pub { color: var(--accent); }
.rw-coupons { display: grid; gap: 8px; }
.rw-coupon { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.rw-coupon__text { display: flex; flex-direction: column; min-width: 0; }
.rw-coupon__text b { font-size: 14px; line-height: 1.35; }
.rw-coupon__text small { font-size: 12px; color: var(--muted); }
.rw-coupon__price { font-weight: 600; font-size: 14px; color: var(--primary); }
.rw-coupon .rw-btn.is-short { font-size: 12.5px; padding: 0 9px; white-space: normal; max-width: 92px; line-height: 1.25; text-align: center; }

.rw-orders > li + li { border-top: 1px solid var(--line); }
.rw-order { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; }
.rw-order > div { display: flex; flex-direction: column; min-width: 0; }
.rw-order b { font-size: 13.5px; }
.rw-order small { font-size: 11.5px; color: var(--muted); }
.rw-order__st { align-items: flex-end; }

.rw-project { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; }
.rw-project__cover { width: 92px; border-radius: 3px; box-shadow: 0 6px 14px rgba(22, 33, 58, .25); }
.rw-project__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rw-project__title { font-size: 16px; font-weight: 800; }
.rw-project__text small { font-size: 12.5px; color: var(--muted); }
.rw-project__text p { font-size: 13.5px; margin-top: 4px; }
.rw-progress { margin-top: 12px; }
.rw-progress__row { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; font-size: 12.5px; color: var(--muted); }
.rw-progress__row b { font-size: 16px; color: var(--accent); }
.rw-split { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-top: 10px; padding: 10px 12px; border: 1.5px solid var(--accent); border-radius: 12px; background: var(--accent-soft); font-size: 13px; }
.rw-split b { font-size: 14px; }
.rw-split__eq { color: var(--muted); font-weight: 800; }
.rw-check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; font-size: 14px; font-weight: 700; cursor: pointer; }
.rw-check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--primary); flex: none; }
.rw-check small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }

/* 시트(교환 확인·모의 결제) */
.rw-sheet { width: min(440px, calc(100% - 24px)); border: none; border-radius: 20px; padding: 0; background: var(--surface); color: var(--text); box-shadow: 0 24px 60px rgba(23, 24, 28, .3); }
.rw-sheet::backdrop { background: rgba(23, 24, 28, .45); }
.rw-sheet__body { padding: 20px; }
.rw-sheet__title { font-size: 19px; font-weight: 800; margin: 2px 0 12px; }
.rw-sheet__actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; margin-top: 16px; }
.rw-radios { border: none; padding: 0; margin-top: 14px; display: grid; gap: 8px; }
.rw-radios legend { font-size: 13.5px; font-weight: 800; margin-bottom: 8px; padding: 0; }
.rw-radios label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; }
.rw-radios label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.rw-radios input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--primary); flex: none; }
.rw-radios b { display: block; font-size: 14px; }
.rw-radios small { display: block; font-size: 12px; color: var(--muted); }

/* ---------- 관리자 ---------- */
.rw-admin__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.rw-stats { display: grid; grid-template-columns: 1fr 1.6fr 1fr 1fr; gap: 12px; margin-top: 16px; }
.rw-stat { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; border-top: 4px solid var(--accent); }
.rw-stat span { font-size: 13px; font-weight: 700; color: var(--muted); }
.rw-stat b { font-family: var(--num); font-size: 28px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.rw-stat b small { font-family: var(--font); font-size: 14px; font-weight: 700; margin-left: 3px; color: var(--muted); }
.rw-stat em { font-style: normal; font-size: 12px; color: var(--muted); }
.rw-stat__pair { display: flex; flex-wrap: wrap; gap: 0 18px; }
.rw-stat__gen { color: var(--primary); }
.rw-stat__pub { color: var(--accent); }
.rw-stat--warn { border-top-color: var(--warn); }
.rw-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-top: 12px; padding: 10px 16px; border: 1.5px solid var(--ok); background: var(--ok-soft); border-radius: 4px; text-decoration: none; font-size: 13.5px; }
.rw-strip b { color: var(--ok); font-weight: 800; }
.rw-strip em { font-style: normal; font-weight: 700; color: var(--accent); margin-left: auto; }
.rw-strip.is-warn { border-color: var(--warn); background: var(--warn-soft); }
.rw-strip.is-warn b { color: var(--warn); }

.rw-tabs { display: flex; gap: 2px; margin-top: 20px; border-bottom: 1.5px solid var(--line-strong); overflow-x: auto; scrollbar-width: none; }
.rw-tabs::-webkit-scrollbar { display: none; }
.rw-tabs__item { display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 0 16px; border: none; background: transparent; font-weight: 800; font-size: 15px; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1.5px; white-space: nowrap; }
.rw-tabs__item.is-on { color: var(--text); border-bottom-color: var(--primary); }
.rw-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--warn); color: #fff; font-size: 12px; font-weight: 800; }
.rw-pane { margin-top: 16px; }
.rw-pane__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }

.rw-review { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 16px; align-items: start; }
.rw-queue { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 6px; display: grid; gap: 4px; }
.rw-queue__h { font-size: 12.5px; font-weight: 800; color: var(--muted); padding: 8px 8px 2px; }
.rw-q { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; text-align: left; padding: 10px; border: 1.5px solid transparent; border-radius: 4px; background: transparent; cursor: pointer; min-height: 56px; }
.rw-q:hover { background: var(--surface-2); }
.rw-q.is-on { border-color: var(--accent); background: var(--accent-soft); }
.rw-q.is-mine .rw-q__main b::after { content: "사용자 화면"; margin-left: 6px; font-size: 11px; font-weight: 800; color: var(--primary); border: 1.5px solid var(--primary); border-radius: 5px; padding: 0 5px; vertical-align: 1px; }
.rw-q__type { font-size: 11.5px; font-weight: 800; padding: 2px 6px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line-strong); white-space: nowrap; }
.rw-q__type--evidence { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.rw-q__main { display: flex; flex-direction: column; min-width: 0; }
.rw-q__main b { font-size: 14px; }
.rw-q__main small { font-size: 12px; color: var(--muted); }
.rw-empty { padding: 14px 10px; font-size: 13px; color: var(--muted); }

.rw-detail { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 18px; min-height: 420px; }
.rw-detail__empty { color: var(--muted); font-size: 14px; padding: 20px 0; }
.rw-detail__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.rw-detail__body { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }
.rw-detail__img { width: 200px; filter: drop-shadow(0 4px 10px rgba(23, 24, 28, .14)); }
.rw-detail__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.rw-reject { display: flex; gap: 8px; margin-left: auto; }
.rw-input { min-height: 44px; padding: 0 12px; border: 1.5px solid var(--line-strong); border-radius: 10px; background: var(--surface); font-size: 15px; width: 100%; }
.rw-input:focus { border-color: var(--accent); outline: none; }
.rw-reject .rw-input { width: auto; }
.rw-detail .rw-result, .rw-card .rw-result, .rw-pane > .rw-result { margin-top: 14px; }

.rw-table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; overflow-x: auto; }
.rw-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rw-table th, .rw-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.rw-table thead th { font-size: 12.5px; color: var(--muted); font-weight: 700; background: var(--surface-2); white-space: nowrap; }
.rw-table .num { text-align: right; }
.rw-table tbody tr:last-child > * { border-bottom: none; }
.rw-diff { display: inline-flex; font-weight: 800; color: var(--ok); white-space: nowrap; }
.rw-table--recon tr.is-warn .rw-diff { color: var(--warn); white-space: normal; }
.rw-table--recon tr.is-checking .rw-diff { color: var(--muted); }
.rw-table--pay tr.is-cancelled td, .rw-table--pay tr.is-cancelled th { color: var(--muted); }
.rw-last-check { margin-top: 10px; }

.rw-adjust { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.rw-card { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 18px; }
.rw-card > .rw-small { margin-top: 4px; }
.rw-kv--member { margin: 14px 0 6px; padding: 10px 12px; background: var(--surface-2); border-radius: 4px; }
.rw-field { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.rw-field__label { font-size: 13.5px; font-weight: 700; }
.rw-field__label small { color: var(--primary); font-weight: 700; }
.rw-seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rw-seg2 label { position: relative; }
.rw-seg2 input { position: absolute; opacity: 0; inset: 0; }
.rw-seg2 span { display: flex; align-items: center; justify-content: center; min-height: 44px; border: 1.5px solid var(--line-strong); border-radius: 10px; font-weight: 700; cursor: pointer; }
.rw-seg2 input:checked + span { border-color: var(--accent); background: var(--accent); color: #fff; }
.rw-seg2 input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.rw-card .rw-btn--block { margin-top: 16px; }
.rw-card--paper { background: var(--surface); }
.rw-mini { margin-top: 10px; }
.rw-mini li { display: grid; grid-template-columns: 82px minmax(0, 1fr) 64px 64px; grid-template-areas: "at kind amt after" "at kind key key"; gap: 0 10px; padding: 9px 6px; border-bottom: 1px dotted var(--line-strong); font-size: 13px; }
.rw-mini__at { grid-area: at; font-size: 12px; color: var(--muted); }
.rw-mini__kind { grid-area: kind; display: flex; flex-direction: column; font-weight: 700; min-width: 0; }
.rw-mini__kind small { font-weight: 400; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.rw-mini__amt { grid-area: amt; font-weight: 600; }
.rw-mini__after { grid-area: after; }
.rw-mini__key { grid-area: key; font-size: 11.5px; color: var(--muted); text-align: right; }
.rw-mini li.is-last { background: linear-gradient(90deg, var(--primary-soft), transparent 70%); box-shadow: inset 3px 0 0 var(--primary); }

/* ---------- 공고 대응표·알림 ---------- */
.rw-fab { position: fixed; right: 16px; bottom: 16px; z-index: 30; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border: none; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; font-size: 14.5px; cursor: pointer; box-shadow: 0 6px 18px rgba(22, 33, 58, .3); }
.rw-dialog { width: min(780px, calc(100% - 24px)); max-height: 86vh; border: none; border-radius: 16px; padding: 0; background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(23, 24, 28, .3); }
.rw-dialog::backdrop { background: rgba(23, 24, 28, .45); }
.rw-dialog__body { padding: 20px; }
.rw-dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.rw-dialog__title { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.rw-dialog__foot { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); display: grid; gap: 6px; }
.rw-map { display: grid; gap: 0; }
.rw-map li { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.rw-map__need { font-weight: 600; }
.rw-map__show { color: var(--accent); font-weight: 700; text-decoration: none; }
.rw-map__show:hover { text-decoration: underline; }
.rw-map__show--none { color: var(--muted); font-weight: 600; }
.rw-toast { position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%); z-index: 60; width: max-content; max-width: min(560px, calc(100% - 32px)); padding: 11px 16px; border-radius: 12px; background: var(--text); color: #fff; font-size: 14.5px; font-weight: 600; box-shadow: 0 10px 30px rgba(23, 24, 28, .3); }
.demo-notice { max-width: 1200px; margin: 0 auto; padding: 0 20px 88px; font-size: 12px; color: var(--muted); }

/* ---------- 중간 폭 ---------- */
@media (max-width: 1080px) {
  .rw-stats { grid-template-columns: 1fr 1fr; }
  .rw-review { grid-template-columns: 320px minmax(0, 1fr); }
  .rw-detail__body { grid-template-columns: 150px minmax(0, 1fr); }
  .rw-detail__img { width: 150px; }
}

@media (max-width: 900px) {
  .rw-seg__long { display: none; }
  .rw-review, .rw-adjust { grid-template-columns: 1fr; }
}

/* ---------- 모바일 ---------- */
@media (max-width: 760px) {
  body.rw { font-size: 14.5px; }
  .rw-band__long { display: none; }
  .rw-head__inner { flex-wrap: wrap; padding: 6px 12px 8px; gap: 6px 8px; }
  .rw-head__inner::after { content: ""; order: 3; flex-basis: 100%; height: 0; }
  .rw-brand { order: 1; }
  .rw-brand__name { font-size: 18px; }
  .rw-head__tools { display: contents; }
  .rw-reset { order: 2; margin-left: auto; padding: 0 10px; }
  .rw-seg { order: 4; margin-left: 0; }
  .rw-switch { order: 5; margin-left: auto; padding: 0 10px 0 6px; gap: 6px; }
  .rw-switch__label { font-size: 13.5px; }
  .rw-seg__item { padding: 0 12px; min-height: 36px; font-size: 14px; }

  .rw-main { padding: 12px 12px 32px; }
  .rw-stage { display: block; }
  .rw-phone { width: auto; border: none; border-radius: 0; box-shadow: none; background: transparent; margin: 0 -12px; }
  .rw-phone__status { display: none; }
  .rw-app { padding: 4px 12px 12px; min-height: 0; }
  .rw-tabbar { position: fixed; left: 0; right: 0; bottom: 0; border-radius: 0; padding: 4px 6px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(23, 24, 28, .06); z-index: 25; }
  .rw--home .rw-fab, .rw--receipt .rw-fab, .rw--spend .rw-fab { bottom: 78px; }
  .rw--home .rw-toast, .rw--receipt .rw-toast, .rw--spend .rw-toast { bottom: 132px; }
  .rw-ledger-chip { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; padding: 9px 12px; border-radius: 12px; border: 1.5px dashed var(--text); background: var(--surface); text-decoration: none; font-size: 12.5px; }
  .rw-ledger-chip span { font-family: var(--mono); font-size: 12px; }
  .rw-ledger-chip b { color: var(--accent); white-space: nowrap; font-size: 12.5px; }
  .rw-ledger { position: static; margin-top: 26px; }
  .rw-paper { padding: 18px 14px 14px; }
  .rw-paper__title { letter-spacing: .2em; font-size: 14px; }
  .rw-paper__title::before, .rw-paper__title::after { margin: 0 6px; }
  .rw-reqs { grid-template-columns: 1fr 1fr; }
  .rw-req { padding: 7px 8px 9px; }

  .rw-h1 { font-size: 21px; }
  .rw-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .rw-stat { padding: 10px 12px; }
  .rw-stat b { font-size: 22px; }
  .rw-stat--wide { grid-column: 1 / -1; order: -1; }
  .rw-stat:last-child { grid-column: 1 / -1; }
  .rw-strip em { margin-left: 0; }
  .rw-tabs__item { padding: 0 12px; font-size: 14.5px; }
  .rw-detail { padding: 14px; min-height: 0; }
  .rw-detail__body { grid-template-columns: 110px minmax(0, 1fr); gap: 12px; }
  .rw-detail__img { width: 110px; }
  .rw-detail .rw-kv > div { grid-template-columns: 1fr; gap: 0; }
  .rw-detail .rw-kv dt { font-size: 12px; }
  .rw-reject { margin-left: 0; width: 100%; }
  .rw-reject .rw-input { flex: 1; min-width: 0; }
  .rw-detail__actions > .rw-btn { width: 100%; }

  /* 표 → 카드 */
  .rw-table-wrap { background: transparent; border: none; overflow: visible; }
  .rw-table, .rw-table tbody, .rw-table tr, .rw-table th, .rw-table td { display: block; width: 100%; }
  .rw-table thead { display: none; }
  .rw-table tr { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 8px 12px; margin-bottom: 8px; }
  .rw-table th, .rw-table td { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border: none; text-align: right; }
  .rw-table th::before, .rw-table td::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; font-weight: 600; text-align: left; flex: none; }
  .rw-table .num { text-align: right; }
  .rw-table--recon th { font-weight: 800; }
  .rw-mini li { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "kind amt" "at after" "key key"; }
  .rw-mini__at { font-size: 11.5px; }
  .rw-mini__after { text-align: right; color: var(--muted); font-size: 12px; }
  .rw-mini__key { text-align: left; }

  .rw-map li { grid-template-columns: 1fr; gap: 2px; }
  .rw-fab { right: 12px; padding: 0 14px; font-size: 14px; }
  .demo-notice { padding: 0 12px 140px; }
}

@media (max-width: 400px) {
  .rw-brand__tag { font-size: 10.5px; padding: 1px 6px; }
  .rw-reset span { display: none; }
  .rw-reset { min-width: 44px; }
  .rw-bal__num { font-size: 26px; }
  .rw-metric dd { font-size: 20px; }
}
