/* ===== 테마 토큰 ===== */
:root,
[data-theme='tree'] {
  --bg: #0d2420;
  --bg-2: #18403a;
  --ink: #f6efe1;
  --ink-soft: rgba(246, 239, 225, 0.72);
  --accent: #d6453a;
  --accent-ink: #fff;
  --gold: #e8c36a;
  --surface: rgba(255, 255, 255, 0.07);
  --surface-strong: rgba(255, 255, 255, 0.12);
  --line: rgba(255, 255, 255, 0.16);
  --field: rgba(0, 0, 0, 0.22);
  --snow: 255, 255, 255;
}

[data-theme='letter'] {
  --bg: #efe4d0;
  --bg-2: #e3d3b8;
  --ink: #3a2a1d;
  --ink-soft: #6e5a48;
  --accent: #a2322a;
  --accent-ink: #fff;
  --gold: #a87a2c;
  --surface: rgba(255, 252, 245, 0.7);
  --surface-strong: #fffaf0;
  --line: #d4c2a4;
  --field: #fffaf0;
}

[data-theme='newyear'] {
  --bg: #191c47;
  --bg-2: #b9634a;
  --ink: #fff5e8;
  --ink-soft: rgba(255, 245, 232, 0.75);
  --accent: #f2b84b;
  --accent-ink: #2a1c08;
  --gold: #f6cf7a;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.14);
  --line: rgba(255, 255, 255, 0.18);
  --field: rgba(0, 0, 0, 0.2);
  --snow: 255, 214, 140;
}

[data-theme='birthday'] {
  --bg: #fff0f3;
  --bg-2: #ffdccc;
  --ink: #4a2b33;
  --ink-soft: #85606a;
  --accent: #e5527a;
  --accent-ink: #fff;
  --gold: #d9822b;
  --surface: rgba(255, 255, 255, 0.65);
  --surface-strong: #fff;
  --line: #f1c3cf;
  --field: #fff;
}

[data-theme='graduation'] {
  --bg: #1b2440;
  --bg-2: #3b4a7a;
  --ink: #f7f3e8;
  --ink-soft: rgba(247, 243, 232, 0.76);
  --accent: #e6c36a;
  --accent-ink: #2a2208;
  --gold: #f0d48a;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.14);
  --line: rgba(255, 255, 255, 0.18);
  --field: rgba(0, 0, 0, 0.22);
}

/* ===== 기본 ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Gowun Dodum', system-ui, -apple-system, 'Malgun Gothic', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 35%, var(--bg-2) 140%) fixed;
  background-color: var(--bg);
  word-break: keep-all;
  overflow-wrap: anywhere;
}

[data-theme='newyear'] body,
body[data-theme='newyear'] {
  background: linear-gradient(180deg, #14173d 0%, #2c2560 45%, #8a4a5c 80%, #d98a52 120%) fixed;
}

[data-theme='letter'] body,
body[data-theme='letter'] {
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.5), transparent 40%),
    repeating-linear-gradient(0deg, rgba(120, 90, 50, 0.03) 0 2px, transparent 2px 4px),
    #efe4d0;
}

body[data-theme='birthday'] {
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 183, 77, 0.18), transparent 30%),
    radial-gradient(circle at 88% 30%, rgba(102, 187, 170, 0.16), transparent 32%),
    linear-gradient(180deg, #fff0f3 0%, #ffe6dc 100%) fixed;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: 'Gowun Batang', serif;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}

.snow {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

.narrow {
  max-width: 640px;
}

/* ===== 헤더 / 푸터 ===== */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Gowun Batang', serif;
  font-weight: 700;
  font-size: 20px;
  text-decoration: none;
}

.logo-mark {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font-size: 13px;
}

.top nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 15px;
  margin-left: 16px;
}

.top nav a:hover {
  color: var(--ink);
}

.foot {
  position: relative;
  z-index: 1;
  margin-top: 80px;
  padding: 28px 16px 40px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
}

.foot a {
  margin: 0 8px;
}

/* ===== 버튼 / 입력 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, background 0.12s ease;
}

.btn:hover {
  background: var(--surface-strong);
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

.btn-primary:hover {
  background: var(--accent);
  filter: brightness(1.08);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  min-height: 38px;
  padding: 0 14px;
  font-size: 14px;
}

.field {
  display: block;
  margin-bottom: 18px;
}

.field-label {
  display: block;
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

input[type='text'],
input[type='date'],
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  outline: none;
}

input:focus,
textarea:focus {
  border-color: var(--gold);
}

input::placeholder,
textarea::placeholder {
  color: var(--ink-soft);
  opacity: 0.7;
}

.counter {
  text-align: right;
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 4px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip input,
.theme-tile input,
.swatch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip span {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 14px;
  cursor: pointer;
}

.chip input:checked + span {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.chip input:focus-visible + span,
.theme-tile input:focus-visible + span,
.swatch input:focus-visible + span {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ===== 카드 패널 ===== */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
}

/* ===== 메인 히어로 ===== */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 40px 0 24px;
}

.eyebrow {
  display: inline-block;
  font-size: 14px;
  color: var(--gold);
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(32px, 5.4vw, 52px);
  margin-bottom: 18px;
}

.hero h1 em {
  font-style: normal;
  color: var(--gold);
}

.hero p.lead {
  font-size: 18px;
  color: var(--ink-soft);
  margin: 0 0 28px;
}

.hero-notes {
  position: relative;
  height: 180px;
}

.hero-notes .note {
  position: absolute;
  width: 170px;
  font-size: 19px;
}

.hero-notes .note:nth-child(1) {
  left: 0;
  top: 10px;
  transform: rotate(-5deg);
}

.hero-notes .note:nth-child(2) {
  left: 140px;
  top: 0;
  transform: rotate(3deg);
}

.hero-notes .note:nth-child(3) {
  left: 280px;
  top: 30px;
  transform: rotate(-2deg);
}

.form-title {
  font-size: 22px;
  margin-bottom: 20px;
}

.theme-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.theme-tile {
  position: relative;
  cursor: pointer;
}

.theme-tile span {
  display: block;
  border-radius: 14px;
  border: 2px solid transparent;
  padding: 44px 8px 10px;
  font-size: 14px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.theme-tile span::before {
  content: attr(data-icon);
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  font-size: 24px;
}

.theme-tile .t-tree {
  background: linear-gradient(160deg, #0d2420, #2a5a4f);
}

.theme-tile .t-letter {
  background: linear-gradient(160deg, #f3e9d6, #dcc7a3);
  color: #3a2a1d;
}

.theme-tile .t-newyear {
  background: linear-gradient(160deg, #191c47, #c47454);
}

.theme-tile .t-birthday {
  background: linear-gradient(160deg, #ffe3ea, #ffc9b5);
  color: #4a2b33;
}

.theme-tile .t-graduation {
  background: linear-gradient(160deg, #1b2440, #4a5a8c);
}

.theme-tile input:checked + span {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(232, 195, 106, 0.25);
}

.result h2 {
  font-size: 24px;
  margin-bottom: 6px;
}

.result p {
  color: var(--ink-soft);
  margin: 0 0 18px;
}

.link-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.link-row input {
  flex: 1;
  min-width: 0;
  font-size: 14px;
}

.warn {
  font-size: 13px;
  color: var(--gold);
  margin: 0 0 18px;
}

.mode-badge {
  display: inline-block;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--gold);
  color: #2a1c08;
  margin-left: 8px;
  vertical-align: middle;
}

/* ===== 섹션 ===== */
.section {
  padding: 56px 0 0;
}

.section > h2 {
  font-size: 26px;
  margin-bottom: 22px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.step {
  padding: 22px;
}

.step b {
  display: block;
  font-family: 'Gowun Batang', serif;
  color: var(--gold);
  font-size: 15px;
  margin-bottom: 6px;
}

.step h3 {
  font-size: 19px;
  margin-bottom: 6px;
}

.step p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.faq summary::after {
  content: '+';
  float: right;
  color: var(--gold);
}

.faq details[open] summary::after {
  content: '−';
}

.faq p {
  margin: 10px 0 0;
  color: var(--ink-soft);
}

.my-boards {
  display: grid;
  gap: 10px;
}

.my-boards a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  text-decoration: none;
}

.my-boards small {
  color: var(--ink-soft);
}

.prose h1 {
  font-size: 32px;
  margin: 24px 0 18px;
}

.prose h2 {
  font-size: 21px;
  margin: 32px 0 10px;
}

.prose p,
.prose li {
  color: var(--ink-soft);
}

/* ===== 편지지 (공통) ===== */
.note {
  --paper: #fff8e7;
  position: relative;
  background: var(--paper);
  color: #3a2e25;
  padding: 22px 18px 14px;
  border-radius: 3px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08), 0 8px 22px rgba(0, 0, 0, 0.18);
  font-family: 'Nanum Pen Script', cursive;
  font-size: 23px;
  line-height: 1.4;
}

.note::before {
  content: '';
  position: absolute;
  top: -9px;
  left: 50%;
  width: 64px;
  height: 20px;
  transform: translateX(-50%) rotate(-2deg);
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.note[data-color='pink'] { --paper: #ffe2e3; }
.note[data-color='mint'] { --paper: #dcf2e3; }
.note[data-color='sky'] { --paper: #dcecfb; }
.note[data-color='lemon'] { --paper: #fff2b3; }

.note .body {
  white-space: pre-wrap;
  margin: 0 0 10px;
}

.note .from {
  text-align: right;
  font-size: 21px;
  color: #6b5444;
}

.note .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Gowun Dodum', sans-serif;
  font-size: 12px;
  color: #8b7766;
  border-top: 1px dashed rgba(58, 46, 37, 0.18);
  padding-top: 8px;
  margin-top: 6px;
}

.note .meta button {
  border: 0;
  background: none;
  color: #8b7766;
  font: inherit;
  cursor: pointer;
  padding: 4px 6px;
}

.note .meta button:hover {
  color: #a2322a;
}

.note.locked .body {
  font-family: 'Gowun Dodum', sans-serif;
  font-size: 15px;
  color: #8b7766;
}

/* 봉인된 봉투 */
.envelope {
  position: relative;
  background: var(--paper, #fff8e7);
  color: #3a2e25;
  aspect-ratio: 1.55;
  border-radius: 6px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 14px;
  font-family: 'Nanum Pen Script', cursive;
  font-size: 22px;
}

.envelope[data-color='pink'] { --paper: #ffe2e3; }
.envelope[data-color='mint'] { --paper: #dcf2e3; }
.envelope[data-color='sky'] { --paper: #dcecfb; }
.envelope[data-color='lemon'] { --paper: #fff2b3; }

.envelope::before {
  content: '';
  position: absolute;
  inset: 0 0 38% 0;
  background: rgba(0, 0, 0, 0.06);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.envelope .seal {
  position: absolute;
  top: 46%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #a2322a;
  color: #f6d9c8;
  display: grid;
  place-items: center;
  font-size: 16px;
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.12);
}

/* ===== 롤링페이퍼 화면 ===== */
.board-head {
  text-align: center;
  padding: 28px 0 8px;
}

.board-head .to {
  font-family: 'Gowun Batang', serif;
  color: var(--gold);
  font-size: 18px;
}

.board-head h1 {
  font-size: clamp(34px, 7vw, 56px);
  margin: 4px 0 10px;
}

.board-head .title {
  font-size: 18px;
  color: var(--ink-soft);
  margin: 0;
}

.board-meta {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 14px;
}

.pill {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.sealed-banner {
  text-align: center;
  margin: 22px auto 0;
  max-width: 520px;
  padding: 18px 20px;
}

.sealed-banner strong {
  display: block;
  font-family: 'Gowun Batang', serif;
  font-size: 22px;
  color: var(--gold);
  margin-bottom: 4px;
}

.sealed-banner p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.owner-box {
  margin: 22px auto 0;
  max-width: 620px;
}

.owner-box h2 {
  font-size: 18px;
  margin-bottom: 12px;
}

.actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 26px 0 30px;
  flex-wrap: wrap;
}

.actions .btn {
  min-width: 150px;
}

.grid {
  columns: 250px;
  column-gap: 22px;
}

.grid > * {
  break-inside: avoid;
  margin-bottom: 28px;
  display: block;
}

.grid.envelopes {
  columns: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 18px;
}

.grid.envelopes > .envelope {
  display: flex;
  margin: 0;
}

.envelope > span:last-child {
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grid > .note:nth-child(5n + 1) { transform: rotate(-1.2deg); }
.grid > .note:nth-child(5n + 2) { transform: rotate(0.8deg); }
.grid > .note:nth-child(5n + 3) { transform: rotate(-0.4deg); }
.grid > .note:nth-child(5n + 4) { transform: rotate(1.3deg); }

.grid > .new {
  animation: stick 0.5s ease;
}

@keyframes stick {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.96);
  }
}

.empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--ink-soft);
}

.empty strong {
  display: block;
  font-family: 'Gowun Batang', serif;
  font-size: 22px;
  color: var(--ink);
  margin-bottom: 6px;
}

.cta {
  margin: 40px auto 0;
  max-width: 560px;
  text-align: center;
}

.cta h2 {
  font-size: 22px;
  margin-bottom: 6px;
}

.cta p {
  color: var(--ink-soft);
  margin: 0 0 16px;
}

.ad-slot {
  margin: 36px auto 0;
  max-width: 728px;
  text-align: center;
}

/* ===== 후원 ===== */
.donate {
  position: relative;
  z-index: 1;
  margin: 64px auto -48px;
  padding: 0 16px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
}

.donate a {
  display: inline-block;
  margin: 6px 4px 0;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}

.donate a:hover {
  background: var(--surface-strong);
}

/* ===== 쿠팡 선물 추천 ===== */
.gift-slot {
  margin: 36px auto 0;
  max-width: 560px;
  text-align: center;
}

.gift-slot h2 {
  font-size: 19px;
  margin-bottom: 14px;
}

.gift-frame iframe {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  border-radius: 8px;
  background: #fff;
}

.gift-note {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--ink-soft);
}

/* ===== 문구 모음 ===== */
.phrases-head {
  padding: 24px 0 8px;
}

.phrases-head h1 {
  font-size: clamp(30px, 5vw, 44px);
  margin-bottom: 12px;
}

.phrases-head .lead {
  color: var(--ink-soft);
  margin: 0 0 22px;
}

.phrase-nav {
  gap: 8px;
}

.chip-link {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 14px;
  text-decoration: none;
}

.chip-link:hover {
  background: var(--surface-strong);
}

.phrase-group {
  padding-top: 48px;
  scroll-margin-top: 12px;
}

.phrase-group h2 {
  font-size: 24px;
  margin-bottom: 8px;
}

.group-desc {
  color: var(--ink-soft);
  margin: 0 0 20px;
}

.phrase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.phrase {
  --paper: #fff8e7;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 18px 12px;
  border-radius: 4px;
  background: var(--paper);
  color: #3a2e25;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06), 0 6px 16px rgba(0, 0, 0, 0.1);
}

.phrase[data-color='pink'] { --paper: #ffe2e3; }
.phrase[data-color='mint'] { --paper: #dcf2e3; }
.phrase[data-color='sky'] { --paper: #dcecfb; }
.phrase[data-color='lemon'] { --paper: #fff2b3; }

.phrase p {
  margin: 0;
  font-family: 'Nanum Pen Script', cursive;
  font-size: 23px;
  line-height: 1.4;
}

.copy-btn {
  align-self: flex-end;
  border: 1px solid rgba(58, 46, 37, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  color: #6b5444;
  font: inherit;
  font-size: 13px;
  padding: 5px 12px;
  cursor: pointer;
}

.copy-btn:hover {
  background: #fff;
}

.group-cta {
  min-height: 42px;
  font-size: 15px;
}

.write-help {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: #8b6a3e;
}

/* ===== 편지 쓰기 다이얼로그 ===== */
dialog {
  width: min(520px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  border: 0;
  border-radius: 20px;
  padding: 0;
  background: #fffaf0;
  color: #3a2a1d;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

dialog::backdrop {
  background: rgba(8, 14, 12, 0.6);
}

dialog form,
dialog .done {
  padding: 24px;
}

dialog h2 {
  font-size: 22px;
  margin-bottom: 18px;
}

dialog .x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 22px;
  color: #6e5a48;
  cursor: pointer;
}

dialog {
  --ink: #3a2a1d;
  --ink-soft: #6e5a48;
  --line: #d9c9ad;
  --field: #fff;
  --surface: #f3ead9;
  --gold: #a87a2c;
  --bg: #fffaf0;
}

dialog textarea {
  min-height: 170px;
  resize: vertical;
  font-family: 'Nanum Pen Script', cursive;
  font-size: 24px;
  line-height: 1.4;
  background: var(--paper, #fff8e7);
}

.swatches {
  display: flex;
  gap: 10px;
}

.swatch {
  position: relative;
  cursor: pointer;
}

.swatch span {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.1);
}

.swatch input:checked + span {
  border-color: #3a2a1d;
  box-shadow: 0 0 0 3px rgba(58, 42, 29, 0.15);
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 20px;
  font-size: 15px;
  cursor: pointer;
}

.check input {
  width: 18px;
  height: 18px;
  accent-color: #a2322a;
}

.error {
  color: #b3261e;
  font-size: 14px;
  min-height: 20px;
  margin: 0 0 8px;
}

dialog .btn {
  --line: #d9c9ad;
}

dialog .btn-primary {
  background: #a2322a;
  border-color: #a2322a;
  color: #fff;
}

.done {
  text-align: center;
}

.done .big {
  font-size: 46px;
}

.done p {
  color: #6e5a48;
  margin: 6px 0 20px;
}

.done .btn {
  margin-bottom: 8px;
}

/* ===== 토스트 ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 50;
  transform: translate(-50%, 20px);
  opacity: 0;
  padding: 12px 20px;
  border-radius: 999px;
  background: #1d1a17;
  color: #fff;
  font-size: 15px;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: calc(100% - 32px);
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.loading {
  text-align: center;
  padding: 80px 0;
  color: var(--ink-soft);
}

[hidden] {
  display: none !important;
}

/* ===== 반응형 ===== */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 16px;
  }

  .hero-notes {
    display: none;
  }

  .steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .panel {
    padding: 20px 16px;
  }

  .theme-tile span {
    padding-top: 40px;
    font-size: 13px;
  }

  .top nav a {
    margin-left: 12px;
    font-size: 14px;
  }

  .actions .btn {
    flex: 1;
    min-width: 0;
  }
}
