/* 마감노트 — tokens */
:root {
  --bg: #161c1a;
  --surface: #1f2725;
  --deep: #0f1412;
  --field-2: #26322e;
  --ink: #e3e2da;
  --muted: #a3a8a1;
  --accent: #9fc7b8;
  --accent-ink: #161c1a;
  --paper: #e3e2da;
  --paper-ink: #161c1a;
  --paper-muted: #4a524e;
  --flag: #f0c9a0;

  --step-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);
  --step-head: clamp(2.25rem, 1rem + 3.6vw, 4.25rem);
  --step-display: clamp(3.5rem, 1.6rem + 6.4vw, 8rem);

  --svh: 1svh;
  --m: clamp(16px, 1.8vw, 28px);
  --pad: clamp(20px, 4vw, 64px);
  --gap: clamp(120px, 14vw, 200px);
  --radius: 0px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --font: "EB Garamond", "Gowun Batang", "Nanum Myeongjo", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: var(--step-body); line-height: 1.65;
  word-break: keep-all; overflow-wrap: break-word;
  font-variant-numeric: lining-nums tabular-nums;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, figure, ol, ul, dl, dd { margin: 0; }
h1, h2, h3 { font-weight: 400; letter-spacing: -0.01em; line-height: 1.2; text-wrap: balance; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; transition: text-underline-offset 200ms var(--ease-out), color 200ms ease, opacity 200ms ease; }
a:hover { text-underline-offset: 0.36em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }
b { font-weight: 700; }
.md { font-family: "Gowun Batang", serif; }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem; padding: 0 1.6rem; background: var(--accent); color: var(--accent-ink);
  font-size: var(--step-body); text-decoration: none; white-space: nowrap; border-radius: var(--radius);
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
.button:hover { background: #b6d6ca; transform: translateY(-2px); }
.button:active { transform: translateY(0) scale(0.98); }

/* ---------- split stage ---------- */
.stage { display: grid; grid-template-columns: 1fr 1fr; gap: var(--m); padding: var(--m) var(--m) 0; }
.read { min-width: 0; container-type: inline-size; }

.sheet {
  min-height: calc(calc(100 * var(--svh)) - 2 * var(--m)); background: var(--surface);
  display: grid; grid-template-rows: auto 1fr; text-align: center; padding: 28px var(--pad) 0;
}
.topline { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; font-size: var(--step-body); }
.topline a { text-decoration: none; }
.topline a:hover { text-decoration: underline; }
.topline a:first-child { justify-self: start; }
.topline a:last-child { justify-self: end; }
.wordmark { font-family: "Gowun Batang", serif; font-size: var(--step-lead); font-weight: 700; letter-spacing: -0.02em; }
.sheet-body { align-self: start; padding-top: calc(24 * var(--svh)); padding-bottom: calc(22 * var(--svh)); display: grid; justify-items: center; gap: 0; }
.sheet h1 { font-size: var(--step-head); line-height: 1.12; color: var(--ink); max-width: 18ch; }
.sheet-lead { margin-top: 36px; max-width: 30em; color: var(--ink); }
.sheet-body .button { margin-top: 36px; }
.sheet-note { margin-top: 16px; font-size: var(--step-small); color: var(--muted); }

.intro { padding: var(--gap) var(--pad) 0; max-width: calc(23em + 2 * var(--pad)); }
.intro h2 { font-size: var(--step-lead); margin-bottom: 28px; }
.intro p { color: var(--muted); }
.intro p + p { margin-top: 1.1em; }
.intro p.first { color: var(--ink); }
.intro a { color: var(--ink); }

.features { padding: var(--gap) var(--pad) var(--gap); }
.features > h2 { font-size: var(--step-lead); margin-bottom: 64px; }
.module { display: grid; grid-template-columns: minmax(0, 330px) minmax(0, 260px); gap: 24px; align-items: start; }
.module + .module { margin-top: 104px; }
.module h3 { font-size: var(--step-lead); line-height: 1.3; margin-bottom: 12px; }
.module-text p { color: var(--muted); font-size: var(--step-body); }
.module-text p + p { margin-top: 0.7em; }
@container (max-width: 600px) {
  .module { grid-template-columns: 1fr; gap: 20px; }
  .module .panel { max-width: 420px; }
}

/* small interface fragments */
.panel { background: var(--surface); padding: 22px; font-size: var(--step-small); line-height: 1.5; }
.ui-alert-title { font-size: var(--step-body); color: var(--ink); display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.ui-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--flag); flex: none; }
.ui-alert p { color: var(--muted); }
.ui-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.ui-btn { display: inline-block; padding: 6px 12px; background: var(--accent); color: var(--accent-ink); }
.ui-btn.ghost { background: var(--field-2); color: var(--ink); }
.ui-table { width: 100%; border-collapse: collapse; }
.ui-table caption { text-align: left; color: var(--ink); font-size: var(--step-body); margin-bottom: 8px; }
.ui-table th { text-align: left; font-weight: 400; color: var(--muted); padding: 3px 0; }
.ui-table td { text-align: right; color: var(--ink); }
.ui-table .sum th, .ui-table .sum td { color: var(--accent); padding-top: 8px; border-top: 1px solid #36423e; }
.ui-days { list-style: none; padding: 0; display: grid; gap: 6px; }
.ui-days li { display: grid; grid-template-columns: 5.4em 1fr auto; gap: 10px; padding: 8px 10px; background: var(--field-2); }
.ui-days .d { color: var(--muted); }
.ui-days .v { color: var(--ink); }
.ui-days li:first-child { background: var(--accent); color: var(--accent-ink); }
.ui-days li:first-child .d, .ui-days li:first-child .v { color: var(--accent-ink); }
.ui-file-name { font-size: var(--step-body); color: var(--ink); }
.ui-file-meta { color: var(--muted); }

/* the fixed half */
.pin { position: sticky; top: var(--m); height: calc(calc(100 * var(--svh)) - 2 * var(--m)); display: grid; grid-template-rows: 1fr 56px; background: var(--deep); min-width: 0; overflow: hidden; }
.pin-field { display: grid; place-items: start center; padding: 40px 24px 0; overflow: hidden; }
.receipt-wrap { transform: scale(var(--fit, 1)); transform-origin: top center; }
.pin-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 0 22px; background: var(--surface); font-size: var(--step-small); color: var(--ink); }
#pin-caption { transition: opacity 400ms ease; text-align: right; }

.receipt {
  width: 360px; background: var(--paper); color: var(--paper-ink); padding: 26px 24px 40px;
  font-size: var(--step-small); line-height: 1.5;
  clip-path: var(--zig, none);
}
.r-shop { font-size: var(--step-body); text-align: center; font-family: "Gowun Batang", serif; font-weight: 700; }
.r-meta { text-align: center; color: var(--paper-muted); margin-bottom: 6px; }
.r-group { margin-top: 14px; padding-bottom: 2px; color: var(--paper-muted); border-bottom: 1px dashed #9aa09a; } /* taste-skill-ignore: receipt is a data-ui fragment */
.r-row { display: flex; justify-content: space-between; gap: 12px; padding: 1px 6px; margin: 0 -6px; transition: background-color 600ms var(--ease-soft), opacity 600ms var(--ease-soft), color 600ms ease; }
.r-sum { font-weight: 700; }
.r-flag { color: #8a3b12; }
.r-month { margin-top: 14px; padding-top: 6px; border-top: 1px dashed #9aa09a; } /* taste-skill-ignore: receipt is a data-ui fragment */
.r-foot { margin-top: 18px; text-align: center; color: var(--paper-muted); }
.receipt[data-focus]:not([data-focus="all"]) .r-row { opacity: 0.32; }
.receipt[data-focus="sales"] .r-row[data-k~="sales"],
.receipt[data-focus="diff"] .r-row[data-k~="diff"],
.receipt[data-focus="fee"] .r-row[data-k~="fee"],
.receipt[data-focus="deposit"] .r-row[data-k~="deposit"],
.receipt[data-focus="tax"] .r-row[data-k~="tax"] { opacity: 1; background: #c4dcd2; }

/* ---------- try it ---------- */
.try { display: grid; grid-template-columns: 1fr 1fr; }
.try-in, .try-out { min-height: calc(78 * var(--svh)); padding: calc(18 * var(--svh)) var(--pad) 64px; }
.try-in { background: var(--deep); display: grid; align-content: start; justify-items: start; }
.try-out { background: var(--paper); color: var(--paper-ink); display: grid; justify-items: start; align-content: start; }
.try-label { font-size: var(--step-body); color: var(--ink); max-width: 26em; margin-bottom: 20px; }
.try textarea {
  width: min(100%, 15em); min-height: 8.2em; resize: vertical; padding: 18px 20px;
  font: inherit; font-size: var(--step-lead); line-height: 1.55; color: var(--ink);
  background: var(--surface); border: 0; border-radius: 0; caret-color: var(--accent);
  transition: background-color 200ms ease;
}
.try textarea:hover { background: #253030; }
.try textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 0; }
.try-h { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; font-size: var(--step-head); line-height: 1.1; }
.try-h span { padding: 0 var(--pad) 40px; }
.try-h span:first-child { background: var(--deep); color: var(--ink); }
.try-h span:last-child { background: var(--paper); color: var(--paper-ink); }

.closing { width: min(100%, 480px); background: #ecede8; padding: 26px 26px 22px; font-size: var(--step-small); line-height: 1.5; color: var(--paper-ink); }
.c-title { font-size: var(--step-body); margin-bottom: 14px; }
.c-rows { display: grid; gap: 8px; }
.c-row { display: grid; grid-template-columns: 6.5em 1fr 6.2em; align-items: center; gap: 12px; }
.c-bar { height: 10px; background: #dcdad0; }
.c-bar i { display: block; height: 100%; background: var(--paper-ink); transition: width 500ms var(--ease-out); }
.c-val { text-align: right; }
.c-sum { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.c-sum div { background: #e4e2d9; padding: 10px 12px; }
.c-sum dt { color: var(--paper-muted); }
.c-sum dd { font-size: var(--step-body); }
.c-verdict { margin-top: 16px; font-size: var(--step-body); }
.c-verdict.warn { color: #8a3b12; }
.c-note { margin-top: 10px; color: var(--paper-muted); }

/* ---------- night ---------- */
.night { background: var(--field-2); padding-bottom: var(--gap); }
.night-photo { position: relative; }
.photo-crop { height: min(calc(62 * var(--svh)), 620px); overflow: hidden; }
.photo-crop img { width: 100%; height: 118%; object-fit: cover; object-position: 50% 40%; will-change: transform; }
.night-photo figcaption { padding: 12px var(--m) 0; font-size: var(--step-small); color: var(--muted); }
.night-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; padding: 120px var(--m) 0; align-items: start; }
.night-text { grid-column: 1 / span 5; padding-left: calc(var(--pad) - var(--m)); }
.night-grid > * { min-width: 0; }
@media (min-width: 961px) { .night-text { position: sticky; top: calc(22 * var(--svh)); } }
.night-text h2 { font-size: var(--step-head); margin-bottom: 28px; }
.night-text p { max-width: 21em; }
.slip {
  grid-column: 7 / span 5; justify-self: start; width: min(100%, 480px); background: var(--paper); color: var(--paper-ink);
  padding: 30px 28px 52px; clip-path: var(--zig, none); font-size: var(--step-body);
}
.slip-head { font-weight: 700; margin-top: 28px; margin-bottom: 4px; }
.slip-head:first-child { margin-top: 0; }
.slip-row { display: flex; align-items: baseline; gap: 8px; padding: 2px 0; }
.slip-row span:first-child { flex: 0 1 auto; }
.slip-row i { flex: 1 1 0; width: 0; min-width: 24px; overflow: hidden; white-space: nowrap; color: #8c928c; font-style: normal; }
.slip-row i::before { content: "··························································································"; letter-spacing: 3px; }
.slip-row span:last-child { flex: none; }
.slip-end { margin: 28px -28px 0; min-height: 48px; padding: 0 28px; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--paper-ink); color: var(--paper); }

/* ---------- pricing ---------- */
.pricing { display: grid; grid-template-columns: 5fr 7fr; }
.plan { min-height: calc(88 * var(--svh)); padding: 56px var(--pad) 56px; display: grid; grid-template-rows: auto auto 1fr auto; }
.plan-main { order: 2; background: var(--paper); color: var(--paper-ink); }
.plan-more { order: 1; background: var(--surface); }
.plan h2 { font-size: var(--step-head); }
.plan-for { margin-top: 16px; font-size: var(--step-lead); max-width: 16em; }
.plan-what { margin-top: 28px; max-width: 28em; align-self: start; }
.plan-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-top: 48px; }
.price { font-size: var(--step-display); line-height: 0.95; letter-spacing: -0.03em; }
.price span { font-size: var(--step-body); letter-spacing: 0; margin-left: 10px; }
.plan-more .price { font-size: var(--step-head); }
.plan-main .button { background: var(--paper-ink); color: var(--paper); }
.plan-main .button:hover { background: #2c3633; }

/* ---------- faq ---------- */
.faq { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; padding: var(--gap) var(--m) 0; }
.faq h2 { grid-column: 1 / span 3; font-size: var(--step-head); padding-left: calc(var(--pad) - var(--m)); }
.faq-text { grid-column: 5 / span 8; columns: 2; column-gap: 56px; }
.faq-text p { break-inside: avoid; margin-bottom: 22px; line-height: 1.6; }
.faq-text b { font-weight: 700; }

/* ---------- cta ---------- */
.cta { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: end; padding: calc(24 * var(--svh)) var(--m) calc(18 * var(--svh)); }
.cta-text { grid-column: 1 / span 6; padding-left: calc(var(--pad) - var(--m)); }
.msg { grid-column: 8 / span 5; justify-self: end; width: min(100%, 400px); font-size: var(--step-small); line-height: 1.5; }
.msg-from { display: flex; align-items: center; gap: 10px; color: var(--ink); margin-bottom: 10px; }
.msg-mark { width: 36px; height: 36px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-family: "Gowun Batang", serif; font-weight: 700; border-radius: 50%; }
.msg-time { margin-left: auto; color: var(--muted); }
.msg-body { background: var(--paper); color: var(--paper-ink); padding: 18px 20px 20px; border-radius: 0 14px 14px 14px; }
.msg-title { font-size: var(--step-body); margin-bottom: 10px; }
.msg-line { display: flex; justify-content: space-between; gap: 12px; }
.msg-line.warn { color: #8a3b12; }
.msg-btn { margin-top: 14px; padding: 10px; text-align: center; background: #d3d4cc; }
.cta h2 { font-size: var(--step-lead); max-width: 22em; line-height: 1.4; }
.cta-text p { margin-top: 10px; max-width: 30em; color: var(--muted); }
.cta-actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; margin-top: 28px !important; }
.textlink { color: var(--ink); }

/* ---------- footer ---------- */
.foot { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100 * var(--svh)); background: var(--surface); }
.foot-photo { overflow: hidden; position: relative; min-height: calc(50 * var(--svh)); }
.foot-photo img { position: absolute; inset: -6% 0 auto 0; width: 100%; height: 112%; object-fit: cover; object-position: 30% 50%; will-change: transform; }
.foot-menu { padding: 64px var(--pad) 40px; display: grid; grid-template-rows: auto auto auto 1fr; }
.foot-mark { font-family: "Gowun Batang", serif; font-weight: 700; font-size: var(--step-lead); }
.menu { list-style: none; padding: 0; margin-top: 56px; display: grid; gap: 14px; }
.menu a { display: inline-block; font-size: var(--step-head); line-height: 1.15; text-decoration: none; transition: transform 300ms var(--ease-out), color 300ms ease; }
.menu:hover a { color: var(--muted); }
.menu a:hover, .menu a:focus-visible { color: var(--ink); transform: translateX(12px); }
.foot-blocks { margin-top: 64px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; font-size: var(--step-small); color: var(--muted); }
.foot-blocks a { color: var(--ink); }
.legal { align-self: end; margin-top: 48px; font-size: var(--step-small); color: var(--muted); max-width: 62ch; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-rise] { opacity: 0; transform: translateY(18px); animation: rise 800ms var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 70ms + 120ms); }
  .js .receipt [data-rise] { transform: translateY(-14px); animation-duration: 600ms; animation-delay: calc(var(--i, 0) * 55ms + 300ms); }
  .js .receipt { animation: feed 1500ms var(--ease-out) both 200ms; }
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: calc(var(--d, 0) * 80ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
}
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes feed { from { transform: translateY(-40px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; animation: none !important; }
}

/* ---------- tablet and phone ---------- */
@media (max-width: 960px) {
  .stage { grid-template-columns: 1fr; padding: var(--m) var(--m) 0; gap: 0; }
  .pin { order: -1; position: sticky; top: var(--m); height: calc(58 * var(--svh)); z-index: 0; }
  .pin-field { padding-top: 24px; }
  .read { position: relative; z-index: 1; background: var(--bg); }
  .sheet { min-height: 0; margin-top: -calc(8 * var(--svh)); padding-top: 24px; }
  .sheet-body { padding-top: 64px; padding-bottom: 72px; }
  .intro, .features { padding-left: 4px; padding-right: 4px; }
  .intro { padding-top: 96px; max-width: 30em; }
  .features { padding-top: 120px; padding-bottom: 120px; }
  .module + .module { margin-top: 72px; }

  .try { grid-template-columns: 1fr; }
  .try-in { min-height: 0; padding: 72px var(--m) 32px; order: 1; }
  .try-h { order: 2; grid-template-columns: 1fr; }
  .try-h span { padding: 0 var(--m) 24px; }
  .try-h span:last-child { padding-top: 24px; padding-bottom: 0; }
  .try-out { min-height: 0; padding: 32px var(--m) 72px; order: 3; }
  .try textarea { width: 100%; font-size: var(--step-lead); }

  .night-grid { grid-template-columns: 1fr; padding-top: 80px; row-gap: 48px; }
  .night-text, .slip { grid-column: 1; }
  .night-text { padding-left: 0; }
  .slip { width: 100%; max-width: 520px; padding: 26px 20px 48px; }
  .slip-end { margin: 24px -20px 0; padding: 0 20px; }

  .pricing { grid-template-columns: 1fr; }
  .plan { min-height: calc(70 * var(--svh)); padding: 48px var(--m) 32px; }
  .plan-main { order: 1; }
  .plan-more { order: 2; }
  .plan-foot { flex-direction: column; align-items: stretch; }
  .plan-foot .button { width: 100%; }

  .faq { grid-template-columns: 1fr; row-gap: 32px; padding-top: 120px; }
  .faq h2, .faq-text { grid-column: 1; padding-left: 0; }
  .faq-text { column-gap: 32px; }

  .cta { grid-template-columns: 1fr; row-gap: 56px; padding: calc(18 * var(--svh)) var(--m) calc(14 * var(--svh)); }
  .cta-text, .msg { grid-column: 1; padding-left: 0; }
  .msg { justify-self: start; width: 100%; max-width: none; }
  .closing { width: 100%; max-width: none; }
  .slip { max-width: none; }
  .intro { max-width: none; }
  .foot { grid-template-columns: 1fr; }
  .foot-photo { min-height: calc(50 * var(--svh)); }
  .foot-menu { padding: 48px var(--m) 32px; }
  .menu { margin-top: 32px; }
}
@media (max-width: 600px) {
  .pin { height: calc(50 * var(--svh)); }
  .sheet-body { padding-top: 44px; }
  .faq-text { columns: 1; }
  .foot-blocks { grid-template-columns: 1fr; }
  .topline { font-size: var(--step-small); }
  .receipt { width: 320px; padding: 22px 18px 36px; }
  .c-row { grid-template-columns: 5.6em 1fr 5.8em; gap: 8px; }
}
@media (min-width: 961px) and (max-width: 1180px) {
  .module { grid-template-columns: 1fr; gap: 20px; }
}

