/* 메리카드 — 두 잉크가 겹쳐 찍히는 작은 인쇄소. 찍혀 나오는 표지가 주인공이고 나머지는 흰 종이처럼 조용하게. */
:root {
  --paper: #fff;
  --ink: #262f52;       /* 글 — 두 잉크가 겹친 남색 */
  --blue: #3558c7;      /* 첫째 잉크 */
  --coral: #f0566b;     /* 둘째 잉크 */
  --yellow: #ffd84d;
  --sub: #5d6684;
  --line: #d9dff0;
  --wash: #f3f6fd;      /* 파랑 잉크를 아주 옅게 깐 종이 */
  --bad: #b9283f;
  --serif: 'Hahmlet', 'Nanum Myeongjo', 'Batang', serif;
  --sans: 'Gothic A1', -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.7 var(--sans); word-break: keep-all; overflow-wrap: break-word; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.34; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(33px, 5.2vw, 56px); line-height: 1.22; }
h2 { font-size: clamp(25px, 3.4vw, 36px); }
h3 { font-size: 20px; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: inherit; text-underline-offset: 3px; }
img, svg { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; border-radius: 4px; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(740px, 100% - 40px); margin-inline: auto; }
.lead { font-size: 19px; line-height: 1.65; }
.note { font-size: 15px; color: var(--sub); line-height: 1.65; }
.nowrap { white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--paper); padding: 8px 14px; z-index: 50; }

/* 머리 */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font: 600 23px/1 var(--serif); letter-spacing: -.02em; }
.brand svg { width: 40px; height: 26px; flex: none; }
.top nav { display: flex; gap: 22px; font-size: 16px; }
.top nav a { text-decoration: none; padding: 8px 0; white-space: nowrap; }
.top nav a:hover { text-decoration: underline; }

/* 단추와 칸 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 10px 24px; border: 1.5px solid var(--ink); border-radius: 999px; background: none; font-weight: 700; font-size: 17px; line-height: 1.3; text-decoration: none; cursor: pointer; text-align: center; }
.btn:hover { background: var(--wash); }
.btn.main { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.main:hover { background: #2a48a8; border-color: #2a48a8; }
.btn.s { min-height: 42px; padding: 6px 16px; font-size: 15.5px; font-weight: 500; border-color: var(--line); }
.btn.s:hover { border-color: var(--ink); }
.btn[disabled] { opacity: .55; cursor: default; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.field { display: block; margin: 0 0 16px; }
.field > span:first-child, .label { display: block; font-weight: 700; font-size: 15.5px; margin-bottom: 6px; }
input[type=text], input[type=tel], input[type=password], input[type=date], input[type=time], input[type=number], input[type=url], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 13px; border: 1.5px solid #bfc8e0; border-radius: 8px; background: #fff; font-size: 17px; line-height: 1.4; }
input:focus, select:focus, textarea:focus { outline: 2.5px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
textarea { min-height: 120px; line-height: 1.65; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; line-height: 1.5; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--blue); }
.err { color: var(--bad); font-size: 15.5px; font-weight: 500; margin: 8px 0 0; }
.hid { position: absolute; left: -9999px; width: 1px; height: 1px; }

/* 찍혀 나오는 종이 — 맞춤표와 잉크 띠가 있는 인쇄지 */
.sheet { position: relative; background: #fff; padding: 34px; }
.sheet .mark { position: absolute; width: 22px; height: 22px; color: var(--ink); }
.sheet .mark.a { left: 0; top: 0; } .sheet .mark.b { right: 0; top: 0; transform: scaleX(-1); }
.sheet .mark.c { left: 0; bottom: 0; transform: scaleY(-1); } .sheet .mark.d { right: 0; bottom: 0; transform: scale(-1); }
.sheet .reg { position: absolute; left: 50%; width: 20px; height: 20px; margin-left: -10px; }
.sheet .reg.t { top: 6px; } .sheet .reg.u { bottom: 6px; }
.sheet .strip { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: grid; gap: 4px; }
.sheet .strip i { width: 14px; height: 14px; display: block; }
.sheet .print { position: relative; overflow: hidden; background: #fff; container-type: inline-size; }

/* 첫 화면 */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 414px); gap: clamp(28px, 6vw, 96px); align-items: center; padding: 26px 0 70px; }
.hero .lead { margin: 18px 0 28px; max-width: 34em; }
.try { max-width: 480px; }
.try .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.try .field { margin-bottom: 14px; }
.press { width: 100%; }
.press .note { text-align: center; margin: 10px 0 0; min-height: 1.65em; }
.hero .sheet { width: 100%; }
.hero .print { aspect-ratio: 390 / 700; width: 100%; box-shadow: 0 0 0 1px var(--line); }
.hero .print .layer { position: absolute; inset: 0; }
.hero .print .layer.in { animation: press .7s cubic-bezier(.3, .7, .2, 1) both; }
@keyframes press { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
.kinds { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 22px; border: 0; padding: 0; }
.kinds legend { font-weight: 700; font-size: 15.5px; padding: 0; margin-bottom: 8px; }
.kinds label { position: relative; cursor: pointer; }
.kinds input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.kinds span { display: flex; align-items: center; gap: 8px; padding: 8px 15px 8px 10px; border: 1.5px solid #bfc8e0; border-radius: 999px; font-size: 16px; line-height: 1.3; }
.kinds i { width: 26px; height: 18px; position: relative; flex: none; }
.kinds i::before, .kinds i::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; top: 0; left: 0; background: var(--x); mix-blend-mode: multiply; }
.kinds i::after { left: 8px; background: var(--y); }
.kinds input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); font-weight: 700; }
.kinds input:focus-visible + span { outline: 3px solid var(--coral); outline-offset: 2px; }

section.part { padding: 74px 0 0; }
section.part > h2 + p { margin-top: 12px; max-width: 40em; }
.wall { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px 24px; margin-top: 34px; }
.wall a { text-decoration: none; }
.wall img { display: block; width: 100%; aspect-ratio: 390 / 700; object-fit: cover; background: var(--wash); box-shadow: 0 0 0 1px var(--line); transition: transform .25s; }
.wall a:hover img { transform: translateY(-5px); }
.wall b { display: block; font: 600 19px/1.4 var(--serif); margin: 13px 0 2px; }
.wall span { font-size: 15.5px; color: var(--sub); line-height: 1.55; display: block; }

.peek { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: clamp(28px, 6vw, 90px); align-items: center; margin-top: 30px; }
.peek iframe { width: 100%; height: 720px; border: 0; box-shadow: 0 0 0 1px var(--line), 0 24px 60px rgba(38, 47, 82, .13); background: #fff; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: 15px 0; border-bottom: 1px solid var(--line); }
.plain-list b { display: block; font-size: 17.5px; }
.plain-list span { color: var(--sub); font-size: 16px; }

.price { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(24px, 5vw, 70px); margin-top: 32px; padding: clamp(24px, 4vw, 46px); background: var(--wash); }
.price .won { font: 600 clamp(44px, 6vw, 66px)/1.1 var(--serif); letter-spacing: -.03em; white-space: nowrap; }
.price table th { font-weight: 500; white-space: nowrap; }
table { width: 100%; border-collapse: collapse; font-size: 16.5px; }
th, td { text-align: left; padding: 11px 10px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 700; }
.price td, .price th { border-color: #cfd8ee; }
.price tr:last-child > * { border-bottom: 0; }

.moons { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-top: 24px; }
.end { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; margin-top: 90px; padding: 40px 0; border-block: 1.5px solid var(--ink); }

details.q { border-bottom: 1px solid var(--line); }
details.q summary { cursor: pointer; font: 600 18.5px/1.6 var(--serif); padding: 16px 34px 16px 0; list-style: none; position: relative; }
details.q summary::-webkit-details-marker { display: none; }
details.q summary::after { content: ''; position: absolute; right: 8px; top: 25px; width: 9px; height: 9px; border: solid var(--ink); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s; }
details.q[open] summary::after { transform: rotate(-135deg); top: 30px; }
details.q > div { padding: 0 0 20px; max-width: 44em; }

/* 글 화면(약관·도움 글) */
.doc { padding-top: 22px; }
.doc h1 { font-size: clamp(30px, 4.6vw, 44px); }
.doc h2 { margin: 46px 0 12px; font-size: 25px; }
.doc h3 { margin: 28px 0 8px; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin-bottom: 6px; }
.doc table th { width: 170px; }
.words { display: grid; gap: 14px; margin-top: 18px; }
.words article { border: 1.5px solid var(--line); border-radius: 10px; padding: 20px 22px; display: grid; grid-template-columns: 1fr auto; gap: 8px 18px; align-items: start; }
.words h3 { margin: 0; font-size: 17px; font-family: var(--sans); font-weight: 700; }
.words p { grid-column: 1 / -1; white-space: pre-line; margin: 0; line-height: 1.85; }
.jump { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 18px 0 0; padding: 0; list-style: none; }

/* 창 */
dialog { border: 0; border-radius: 14px; padding: 0; width: min(500px, 100% - 28px); color: inherit; background: #fff; max-height: calc(100dvh - 28px); }
dialog::backdrop { background: rgba(28, 36, 70, .55); }
dialog .in { padding: 28px 26px 26px; }
dialog h2 { font-size: 25px; margin-bottom: 12px; }
dialog.wide { width: min(760px, 100% - 28px); }
dialog .btns { margin-top: 20px; }
.sum { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; margin-bottom: 18px; border-block: 1px solid var(--line); font-size: 18px; }
.code { font: 700 31px/1.3 ui-monospace, 'Consolas', monospace; letter-spacing: .12em; }
.toast { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 13px 22px; border-radius: 10px; z-index: 90; width: max-content; max-width: calc(100% - 32px); box-shadow: 0 10px 30px rgba(28, 36, 70, .3); }

footer.foot { margin-top: 96px; padding: 32px 0 46px; border-top: 1px solid var(--line); font-size: 15px; color: var(--sub); line-height: 1.75; }
footer.foot .links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 14px; }
footer.foot a { color: inherit; }
.bizbox summary { cursor: pointer; }
.biz { margin: 6px 0 0; }

@media (max-width: 900px) {
  .wall { grid-template-columns: repeat(3, 1fr); }
  .peek { grid-template-columns: 1fr; }
  .peek iframe { width: min(390px, 100%); margin-inline: auto; height: 640px; display: block; }
  .price { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16.5px; }
  .wrap, .narrow { width: calc(100% - 36px); }
  .top { padding: 13px 0; }
  .top nav { gap: 16px; font-size: 15.5px; }
  .brand { font-size: 21px; } .brand svg { width: 35px; height: 23px; }
  .hero { grid-template-columns: 1fr; gap: 30px; padding: 12px 0 40px; }
  .hero .lead { margin: 12px 0 20px; font-size: 17px; }
  .press { margin-inline: auto; width: 100%; max-width: 400px; }
  .hero .sheet { padding: 30px; }
  section.part { padding-top: 62px; }
  .wall { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -18px; padding: 0 18px 12px; }
  .wall a { flex: 0 0 62%; scroll-snap-align: center; }
  .end { grid-template-columns: 1fr; margin-top: 70px; padding: 32px 0; }
  .doc table th { width: 104px; }
  .words article { padding: 18px; }
  dialog .in { padding: 24px 20px 22px; }
}
@media (max-width: 380px) { .top nav a.opt { display: none; } }
@media (prefers-reduced-motion: reduce) { *, ::before, ::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
