/* 트렌다 우편번호: 빨간 우편번호 칸이 있는 흰 편지봉투 */
:root {
  --bg: #fbf6f0;
  --paper: #ffffff;
  --ink: #24211f;
  --muted: #6a625b;
  --line: #e6ddd3;
  --red: #d8432f;
  --red-soft: #fdeee9;
  --pen: #1f3f8f;
  --sans: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --hand: 'Nanum Pen Script', cursive;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.8 var(--sans); word-break: keep-all; overflow-wrap: anywhere; }
a { color: var(--red); text-underline-offset: 3px; }
.wrap { width: min(980px, 100% - 32px); margin-inline: auto; }

.top { background: var(--paper); border-bottom: 3px solid var(--red); }
.bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 24px; padding: 12px 0; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 900; font-size: 19px; letter-spacing: -0.03em; }
.logo svg { width: 40px; height: 29px; }
.nav { display: flex; flex-wrap: wrap; gap: 2px 4px; font-size: 14.5px; }
.nav a { padding: 5px 10px; color: var(--muted); text-decoration: none; border-radius: 3px; }
.nav a:hover { color: var(--ink); background: var(--bg); }
.nav a[aria-current='page'] { color: #fff; background: var(--red); font-weight: 700; }

.hero { padding: 38px 0 22px; text-align: center; }
.hero h1 { margin: 0 0 10px; font-size: clamp(30px, 5.4vw, 46px); font-weight: 900; line-height: 1.2; letter-spacing: -0.04em; }
.lede { margin: 0 auto; max-width: 640px; color: var(--muted); font-size: 16.5px; }

/* 편지봉투 */
.letter { position: relative; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 2px 0 var(--line), 0 24px 50px -30px rgb(36 33 31 / 0.45); }
.letter::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 4px; background: linear-gradient(90deg, var(--red) 0 33%, transparent 33% 67%, var(--pen) 67%); opacity: 0.18; }
.letter-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 26px 28px 8px; }
.zipbox { display: flex; gap: 8px; }
.zipbox span { display: grid; place-items: center; width: clamp(44px, 9vw, 64px); height: clamp(54px, 11vw, 76px); border: 2px solid var(--red); background: #fff; font: 400 clamp(40px, 8vw, 58px)/1 var(--hand); color: var(--pen); }
.letter.ready .zipbox span { animation: write 0.35s ease-out both; }
.letter.ready .zipbox span:nth-child(2) { animation-delay: 0.06s; }
.letter.ready .zipbox span:nth-child(3) { animation-delay: 0.12s; }
.letter.ready .zipbox span:nth-child(4) { animation-delay: 0.18s; }
.letter.ready .zipbox span:nth-child(5) { animation-delay: 0.24s; }
@keyframes write { from { color: transparent; } to { color: var(--pen); } }
.post-stamp { flex: none; display: grid; justify-items: center; align-content: center; width: 74px; height: 86px; border: 2px dashed var(--red); color: var(--red); font-size: 12px; line-height: 1.2; transform: rotate(3deg); }
.post-stamp strong { font: 400 40px/1 var(--hand); }
.letter-body { padding: 10px 28px 28px; }
.hint { margin: 6px 0 12px; color: var(--muted); font-size: 14.5px; }
.finder { height: 430px; border: 1px solid var(--line); }
.picked { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; background: var(--red-soft); border-left: 4px solid var(--red); }
.picked p { margin: 0; color: var(--muted); font-size: 14.5px; }
.again { padding: 7px 13px; border: 1px solid var(--red); border-radius: 3px; background: #fff; color: var(--red); font: 700 14px var(--sans); cursor: pointer; }
.again:hover { background: var(--red); color: #fff; }
.warn { margin: 0; padding: 16px; color: var(--red); }
.region { margin: 14px 0 0; font-weight: 700; color: var(--red); min-height: 0; }
.region:empty { display: none; }

/* 봉투 위 주소 줄 */
.rows { margin: 14px 0 0; }
.row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 2px 16px; padding: 12px 0 10px; border-bottom: 1px solid var(--line); background-image: none; }
.row dt { padding-top: 3px; font-size: 14px; font-weight: 700; color: var(--muted); }
.row dd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-width: 0; }
.val { flex: 1 1 260px; min-width: 0; font-size: 17px; font-weight: 500; }
.row.main .val { font-size: 21px; font-weight: 700; }
.row.placeholder .val { color: #a39a91; font-size: 15px; font-weight: 400; }
.row small { flex-basis: 100%; color: var(--muted); font-size: 13px; }
.copy { flex: none; padding: 5px 11px; border: 1px solid var(--line); border-radius: 3px; background: #fff; color: var(--ink); font: 700 13px var(--sans); cursor: pointer; }
.copy:hover { border-color: var(--red); color: var(--red); }
.copy.done { background: var(--red); border-color: var(--red); color: #fff; }

/* 본문 */
.prose { max-width: 740px; padding: 52px 0 8px; }
.prose h2 { position: relative; margin: 46px 0 12px; padding-left: 16px; font-size: 23px; font-weight: 900; line-height: 1.4; letter-spacing: -0.03em; }
.prose h2::before { content: ''; position: absolute; left: 0; top: 0.3em; width: 6px; height: 1.05em; background: var(--red); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 24px 0 6px; font-size: 17.5px; }
.prose p { margin: 0 0 14px; }
.prose table { width: 100%; margin: 6px 0 18px; border-collapse: collapse; background: var(--paper); font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 9px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose thead th { background: var(--red-soft); white-space: nowrap; }
.prose tbody th { font-weight: 700; }
.prose td.n { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--pen); }
.faq h3 { color: var(--red); }

.others { padding: 40px 0 56px; }
.others h2 { margin: 0 0 14px; font-size: 20px; font-weight: 900; }
.others ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.others a { display: block; height: 100%; padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--red); text-decoration: none; color: var(--ink); }
.others a:hover { border-color: var(--red); }
.others strong { display: block; }
.others span { font-size: 14px; color: var(--muted); }

.foot { background: var(--ink); color: #cfc7bf; }
.foot .wrap { padding: 24px 0 32px; font-size: 13.5px; }
.foot nav { display: flex; gap: 16px; margin-bottom: 8px; }
.foot nav a { color: #fff; }
.foot p { margin: 0; }

@media (max-width: 640px) {
  .letter-top { padding: 20px 16px 6px; }
  .letter-body { padding: 8px 16px 22px; }
  .zipbox { gap: 5px; }
  .post-stamp { width: 58px; height: 70px; }
  .post-stamp strong { font-size: 32px; }
  .finder { height: 460px; }
  .row { grid-template-columns: 1fr; }
  .hero { text-align: left; }
}

/* 표 안에서는 단어 중간에서 줄을 바꾸지 않고, 좁으면 표만 가로로 밀어 봅니다. */
.prose table { overflow-wrap: normal; -webkit-overflow-scrolling: touch; }
@media (max-width: 640px) {
  .prose table { font-size: 14px; }
  .prose th, .prose td { padding: 8px 9px; }
}
