:root {
  --paper: #F4EFE6;
  --paper2: #FBF8F2;
  --table: #E2D9C6;
  --ink: #1B1B1B;
  --ink2: #5B564C;
  --line: rgba(27, 27, 27, .2);
  --accent: #E8462A;
  --accent-ink: #BF361B;
  --green: #2E6B47;
  --green-bg: #E1EADC;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .18 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  padding-bottom: 20px;
  background: var(--table);
  color: var(--ink);
  font: 400 16px/1.6 var(--font);
  word-break: keep-all;
  overflow-wrap: break-word;
  font-variant-numeric: tabular-nums;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-underline-offset: 3px; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.sheet {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  padding: 14px 20px 40px;
  background: var(--paper) var(--grain);
}
.sheet::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -8px;
  height: 8px;
  background: radial-gradient(circle at 8px 0, var(--paper) 7.5px, transparent 8px) 0 0 / 16px 8px repeat-x;
}
@media (min-width: 560px) {
  body { padding-bottom: 40px; }
  .sheet {
    margin: 36px auto 0;
    padding: 22px 36px 48px;
    max-width: 520px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .06), 0 18px 34px -18px rgba(70, 48, 10, .35);
  }
}

/* --- top: honesty badge + paper header --- */
.badge {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 14px;
  padding: 7px 12px;
  border: 1.5px dashed var(--ink);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  background: var(--paper2);
}
.badge i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.docbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
}
.docbar span:last-child { color: var(--ink2); font-weight: 500; }

h1 {
  margin: 22px 0 12px;
  font-size: clamp(36px, 10.4vw, 48px);
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -.035em;
}
h1 span { display: block; }
h1 em {
  font-style: normal;
  background: linear-gradient(transparent 62%, rgba(232, 70, 42, .38) 62% 92%, transparent 92%);
}
.sub { text-wrap: balance; margin: 0; font-size: 17px; line-height: 1.55; color: #33302A; }

/* --- steps --- */
.step { margin-top: 28px; padding-top: 24px; border-top: 2px dashed var(--line); }
.step h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 19px; line-height: 1.3; letter-spacing: -.02em; }
.num {
  flex: none; display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  font-size: 14px; font-weight: 700;
}
.opt-tag { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--ink2); }

.opt { position: relative; display: block; }
.opt input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  margin: 0; opacity: 0; cursor: pointer; z-index: 2;
}
.face {
  position: relative;
  display: flex; align-items: center;
  min-height: 52px;
  border: 2px solid rgba(27, 27, 27, .3);
  border-radius: 6px;
  background: var(--paper2);
  transition: box-shadow .12s, transform .12s, border-color .12s, background-color .12s;
}
.opt input:hover + .face { border-color: var(--ink); }
.opt input:focus-visible + .face { outline: 3px solid var(--accent); outline-offset: 3px; }
.opt input:checked + .face {
  border-color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  transform: translate(-2px, -2px);
}

/* concept cards */
.cards { display: grid; gap: 14px; }
.card .face { gap: 14px; padding: 14px 44px 14px 14px; min-height: 92px; }
.ico {
  flex: none; display: grid; place-items: center;
  width: 56px; height: 56px;
  border: 2px solid var(--ink); border-radius: 4px;
  background: var(--paper); color: var(--ink);
}
.ico svg { width: 32px; height: 32px; }
.card strong { display: block; font-size: 18px; line-height: 1.3; letter-spacing: -.02em; }
.card small { display: block; margin-top: 3px; font-size: 14px; line-height: 1.45; color: var(--ink2); }
.tick {
  position: absolute; top: 10px; right: 10px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent);
  opacity: 0; transform: scale(.6);
  transition: opacity .12s, transform .12s;
}
.tick svg { display: block; width: 22px; height: 22px; }
.opt input:checked + .face .tick { opacity: 1; transform: scale(1); }
.opt input:checked + .face .ico { background: var(--accent); border-color: var(--ink); color: #fff; }

/* amounts */
.amounts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.amounts .opt { grid-column: span 2; }
.amounts .opt:nth-child(n+4) { grid-column: span 3; }
.chip .face { justify-content: center; min-height: 54px; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.chip small { font-size: 14px; font-weight: 600; margin-left: 1px; }
.opt input:checked + .face.chipface { background: var(--ink); color: var(--paper); }

/* receipt ticket with perforation */
.ticket {
  position: relative;
  display: flex;
  margin-top: 18px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--paper2);
}
.t-main { flex: 1 1 auto; min-width: 0; padding: 12px 14px 12px 16px; }
.t-lbl { display: block; font-size: 12px; font-weight: 600; color: var(--ink2); letter-spacing: .04em; }
.t-amt { display: block; font-size: 36px; line-height: 1.15; font-weight: 800; letter-spacing: -.03em; }
.t-amt small { font-size: 20px; margin-left: 2px; }
.t-amt.empty { color: rgba(27, 27, 27, .28); }
.t-stub {
  position: relative; flex: none; width: 112px;
  display: grid; place-items: center;
  border-left: 2px dashed var(--ink);
}
.t-stub::before, .t-stub::after {
  content: ""; position: absolute; left: -11px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--ink);
}
.t-stub::before { top: -12px; clip-path: inset(50% 0 0 0); }
.t-stub::after { bottom: -12px; clip-path: inset(0 0 50% 0); }

.stamp {
  display: inline-block;
  padding: 3px 9px;
  border: 3px solid var(--green);
  border-radius: 6px;
  color: var(--green);
  font-size: 16px; font-weight: 800; letter-spacing: .02em; line-height: 1.25;
  transform: rotate(-7deg);
  opacity: .92;
  white-space: nowrap;
}
.stamp.off { opacity: 0; }
.stamp.red { border-color: var(--accent-ink); color: var(--accent-ink); }
.stamp.hit { animation: stamp .22s cubic-bezier(.2, .8, .3, 1.2); }
@keyframes stamp {
  from { transform: rotate(-7deg) scale(1.5); opacity: 0; }
  to { transform: rotate(-7deg) scale(1); opacity: .92; }
}
.live { margin: 12px 0 0; font-size: 16px; line-height: 1.55; }
.live b { color: var(--green); font-weight: 800; }

/* forfeit rows */
.rows { display: grid; gap: 10px; }
.row .face { gap: 12px; padding: 0 14px; min-height: 54px; font-size: 17px; font-weight: 600; }
.dot {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--ink); background: var(--paper);
  display: grid; place-items: center;
}
.dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); transform: scale(0); transition: transform .12s; }
.opt input:checked + .face .dot::after { transform: scale(1); }

/* buttons */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 60px; padding: 0 20px;
  border: 2px solid var(--ink); border-radius: 6px;
  background: var(--accent); color: #fff;
  font-size: 19px; font-weight: 800; letter-spacing: -.01em;
  cursor: pointer;
  box-shadow: 0 5px 0 var(--ink);
  transition: transform .09s, box-shadow .09s, opacity .15s;
}
.btn:hover { background: #ED5236; }
.btn:active, .btn.press { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.btn.soft { background: var(--ink); color: var(--paper); }
.btn.soft:hover { background: #333; }
.btn.ghost { background: var(--paper2); color: var(--ink); }
.btn.ghost:hover { background: #fff; }
.btn.mute { opacity: .55; }
.btn[disabled] { opacity: .5; cursor: wait; }
.cta { margin-top: 30px; }
.hint { min-height: 24px; margin: 12px 0 0; font-size: 15px; font-weight: 600; color: var(--accent-ink); }
.fine { margin: 10px 0 0; font-size: 13px; color: var(--ink2); }
.linkbtn {
  display: block; margin: 14px auto 0; padding: 12px 8px; min-height: 48px;
  background: none; border: 0; font-size: 15px; color: var(--ink2);
  text-decoration: underline; text-underline-offset: 4px; cursor: pointer;
}
.linkbtn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* result */
.result { margin-top: 24px; }
.result:focus { outline: none; }
.slip {
  position: relative;
  padding: 18px 16px 8px;
  border: 2px solid var(--ink); border-radius: 4px;
  background: var(--paper2);
}
.slip-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.slip-head > span { font-size: 13px; font-weight: 700; letter-spacing: .02em; padding-top: 4px; color: var(--ink2); }
.slip h2 { margin: 14px 0 6px; font-size: 24px; line-height: 1.3; letter-spacing: -.03em; font-weight: 800; }
.slip h2 .notpaid { box-shadow: inset 0 -.42em 0 rgba(232, 70, 42, .35); }
.slip dl { margin: 14px 0 0; }
.slip dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 2px dashed var(--line); font-size: 16px; }
.slip dt { flex: none; color: var(--ink2); }
.slip dd { margin: 0; text-align: right; font-weight: 700; }

.mail { margin-top: 26px; padding-top: 22px; border-top: 2px dashed var(--line); }
.mail h3 { margin: 0 0 4px; font-size: 19px; letter-spacing: -.02em; }
.mail p.lead { margin: 0 0 14px; font-size: 15px; color: var(--ink2); }
.mail label.f { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.input {
  display: block; width: 100%; min-height: 54px; padding: 0 14px;
  border: 2px solid var(--ink); border-radius: 6px; background: var(--paper2);
  font-size: 17px;
}
.input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.consent { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0 16px; font-size: 14px; line-height: 1.55; cursor: pointer; }
.consent input { flex: none; width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--ink); cursor: pointer; }
.consent input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.thanks { padding: 16px; border: 2px solid var(--green); border-radius: 4px; background: var(--green-bg); }
.thanks strong { display: block; font-size: 18px; color: var(--green); }
.thanks p { margin: 4px 0 0; font-size: 15px; }
.share { margin-top: 24px; }

.foot { margin-top: 36px; padding-top: 18px; border-top: 2px solid var(--ink); font-size: 14px; line-height: 1.7; color: #3C382F; }
.foot p { margin: 0; }
.foot a { font-weight: 600; }

/* privacy / 404 text pages */
.doc h1 { font-size: 30px; margin-top: 24px; }
.doc h2 { margin: 28px 0 8px; font-size: 18px; letter-spacing: -.02em; }
.doc p, .doc li { font-size: 15.5px; line-height: 1.7; }
.doc ul { padding-left: 20px; margin: 6px 0; }
.doc .back { display: inline-block; margin-top: 10px; font-size: 15px; font-weight: 600; }
.doc table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 15px; }
.doc th, .doc td { padding: 10px 8px; border-top: 2px dashed var(--line); text-align: left; vertical-align: top; }
.doc th { width: 30%; color: var(--ink2); font-weight: 600; }

@media (max-width: 359px) {
  .t-stub { width: 92px; }
  .stamp { font-size: 14px; padding: 2px 6px; }
  .t-amt { font-size: 31px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
