/* North Pole Reply — mobile-first bright classic Christmas UI (offline, no external fonts/assets) */
:root {
  --parchment: #f6ecd8;
  --parchment-deep: #efe0c4;
  --paper: #fffaf0;
  --ink: #2a1c12;
  --ink-soft: #4a3424;
  --snow: #2a1c12;
  --snow-dim: #4a3424;
  --gold: #6b4e0e;
  --gold-soft: #6b4e0e;
  --gold-bright: #c9a227;
  --red: #b42318;
  --red-dark: #8a1a12;
  --red-glow: #d6453a;
  --green: #1a5c38;
  --green-dark: #0e3d25;
  --ok: #1a5c38;
  --sky: #f6ecd8;
  --sky-2: #efe0c4;
  --forest: #e8f0e8;
  --card: #fffaf0;
  --card-border: #c9a227;
  --radius: 16px;
  --shadow: 0 8px 24px rgba(80, 40, 20, 0.14);
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(2px 2px at 12% 18%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1.5px 1.5px at 78% 12%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1.5px 1.5px at 42% 8%, rgba(201,162,39,0.35), transparent),
    radial-gradient(ellipse at 20% 0%, rgba(180,35,24,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(26,92,56,0.10) 0%, transparent 50%),
    linear-gradient(180deg, #fbf4e8 0%, var(--parchment) 55%, #e8f0e8 100%);
  background-attachment: fixed;
}

a { color: var(--red-dark); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }

.page {
  width: min(100%, 440px);
  margin: 0 auto;
  padding: 20px 18px 40px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.page-wide { width: min(100%, 720px); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--snow-dim);
}
.brand { font-weight: 700; color: var(--gold-soft); }
.brand span { color: var(--snow-dim); font-weight: 500; }
.topbar-center { justify-content: center; }

h1 { font-size: 1.55rem; line-height: 1.25; margin: 4px 0 0; text-align: center; text-wrap: balance; }
h2 { font-size: 1.25rem; margin: 0; text-align: center; text-wrap: balance; }
h3 { margin: 0 0 10px; font-size: 1rem; color: var(--red-dark); }
.lede { text-align: center; color: var(--ink-soft); font-size: 0.95rem; margin: 0; line-height: 1.4; }
.note { font-size: 0.75rem; color: var(--ink-soft); text-align: center; margin: 0; }
.alert {
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff6d8;
  border: 1px solid var(--card-border);
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.4;
}
.alert.warn {
  background: #fde8e4;
  border-color: #d48a82;
  color: #6a1a14;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.site-footer {
  margin-top: auto;
  padding-top: 16px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--snow-dim);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
}
.site-footer a { color: var(--green-dark); }

/* Home scene: Santa writing at his desk (inline SVG + CSS, original art). */
.home-hero { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 4px 0 8px; }
.scene {
  width: 100%;
  max-width: 560px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 3px solid var(--gold-bright);
  background: #0f2f4f;
  line-height: 0;
}
.scene svg { width: 100%; height: auto; display: block; }
.btn.btn-write {
  font-size: 1.35rem;
  padding: 18px 34px;
  border-radius: 999px;
  min-width: min(100%, 320px);
  box-shadow: 0 6px 0 #7a1810, 0 10px 24px rgba(180, 35, 24, 0.35);
}
.btn.btn-write:active { transform: translateY(3px); box-shadow: 0 3px 0 #7a1810, 0 6px 14px rgba(180, 35, 24, 0.35); }

/* window snow */
.sc-snow circle { animation: sc-fall 7s linear infinite; }
.sc-snow circle:nth-child(3n) { animation-duration: 9s; }
.sc-snow circle:nth-child(4n) { animation-duration: 6s; animation-delay: -2s; }
.sc-snow circle:nth-child(5n) { animation-delay: -4s; }
@keyframes sc-fall { from { transform: translateY(-70px); } to { transform: translateY(90px); } }

/* globe snow */
.sc-globe-snow circle { animation: sc-globe 3.6s ease-in infinite; }
.sc-globe-snow circle:nth-child(2n) { animation-duration: 4.4s; animation-delay: -1.3s; }
.sc-globe-snow circle:nth-child(3n) { animation-duration: 5s; animation-delay: -2.6s; }
@keyframes sc-globe { 0% { transform: translate(0, -26px); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(3px, 22px); opacity: 0.2; } }

/* tree lights */
.sc-lights circle { animation: sc-twinkle 1.8s ease-in-out infinite; }
.sc-lights circle:nth-child(2n) { animation-delay: -0.6s; }
.sc-lights circle:nth-child(3n) { animation-delay: -1.2s; animation-duration: 2.3s; }
@keyframes sc-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.sc-star { animation: sc-glow 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes sc-glow { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }

/* writing arm + glowing quill */
.sc-arm { transform-box: view-box; transform-origin: 262px 178px; animation: sc-write 1.6s ease-in-out infinite; }
@keyframes sc-write {
  0%, 100% { transform: rotate(0deg) translateX(0); }
  25% { transform: rotate(-4deg) translateX(-3px); }
  50% { transform: rotate(1deg) translateX(-6px); }
  75% { transform: rotate(-3deg) translateX(-2px); }
}
.sc-quill-glow { animation: sc-pulse 1.4s ease-in-out infinite; }
@keyframes sc-pulse { 0%, 100% { opacity: 0.9; } 50% { opacity: 0.35; } }
.sc-ink path { stroke-dasharray: 60; stroke-dashoffset: 60; animation: sc-ink 4.8s linear infinite; }
.sc-ink path:nth-child(2) { animation-delay: 1.2s; }
.sc-ink path:nth-child(3) { animation-delay: 2.4s; }
@keyframes sc-ink { 0% { stroke-dashoffset: 60; } 35%, 100% { stroke-dashoffset: 0; } }
.sc-blink { animation: sc-blink 5s infinite; transform-box: fill-box; transform-origin: center; }
@keyframes sc-blink { 0%, 95%, 100% { transform: scaleY(1); } 97% { transform: scaleY(0.1); } }

@media (prefers-reduced-motion: reduce) {
  .scene *, .btn-write { animation: none !important; transition: none !important; }
  .sc-snow circle, .sc-globe-snow circle { transform: none !important; opacity: 1 !important; }
  .sc-ink path { stroke-dashoffset: 0 !important; }
}

/* Steps / samples */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.step { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; }
.step-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(145deg, var(--red), #8a2218);
  display: grid; place-items: center; font-weight: 700;
}
.step-body strong { display: block; margin-bottom: 4px; }
.step-body p { margin: 0; font-size: 0.85rem; color: var(--snow-dim); line-height: 1.35; }
.sample-faces { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.sample-face {
  flex: 1 1 0; min-width: 56px; background: var(--paper);
  border: 1px dashed #cbb896; border-radius: 12px;
  padding: 8px 4px; text-align: center; font-size: 0.7rem; color: var(--ink-soft);
}
.sample-face .emoji { display: block; font-size: 1.5rem; margin-bottom: 2px; }

.previews { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 380px) { .previews { grid-template-columns: repeat(3, 1fr); } }
.preview-card {
  background: linear-gradient(160deg, #f7efe0 0%, #e8d9bc 100%);
  color: #3a2a1a; border-radius: 12px; padding: 10px; min-height: 110px;
  border: 1px solid rgba(232, 197, 71, 0.5);
}
.preview-card .who {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: #8a2218; margin-bottom: 6px;
}
.preview-card .snippet {
  font-size: 0.72rem; line-height: 1.35; font-family: Georgia, "Times New Roman", serif; font-style: italic;
}

/* Age grid */
.age-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.age-btn {
  appearance: none; border: 2px solid #c43c2e; cursor: pointer; height: 64px;
  border-radius: 14px; font-size: 1.45rem; font-weight: 800; color: #1a120c;
  background: repeating-linear-gradient(-45deg, #f7f2ea 0 10px, #f2c9c9 10px 20px);
  box-shadow: 0 4px 0 #8a3a3a, var(--shadow);
}
.age-btn.selected { outline: 3px solid var(--gold); outline-offset: 2px; }
.cheer {
  display: none; text-align: center; padding: 14px; border-radius: var(--radius);
  background: #e7f5ec; border: 1px solid var(--green);
  color: var(--green-dark); font-weight: 700; font-size: 1.05rem;
}
.cheer.show { display: block; }
.cheer .elf { font-size: 1.6rem; display: block; margin-bottom: 4px; }

/* Progress */
.progress { display: flex; flex-direction: column; gap: 6px; }
.progress-label { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--snow-dim); }
.sleigh-track {
  position: relative; height: 14px; border-radius: 999px;
  background: #ead9b8; border: 1px solid #cbb896;
}
.sleigh-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--gold-bright)); width: 0%;
  transition: width 0.25s ease;
}
.sleigh-icon {
  position: absolute; top: 50%; left: 0%; transform: translate(-50%, -50%);
  font-size: 1.25rem; transition: left 0.25s ease;
}

/* Choices */
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice {
  appearance: none; border: 2px solid #e0d0b0; background: var(--paper);
  color: var(--ink); border-radius: 16px; padding: 14px 8px; cursor: pointer;
  text-align: center; min-height: 88px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
}
.choice .emoji { font-size: 2rem; line-height: 1; }
.choice .label { font-size: 0.85rem; font-weight: 600; line-height: 1.2; }
.choice.selected {
  border-color: var(--red); background: #fff3e8;
  box-shadow: 0 0 0 2px rgba(180, 35, 24, 0.2);
}
.choice:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 2px; }
.choices.choices-rows { grid-template-columns: 1fr; }
.choices.choices-rows .choice {
  min-height: 56px;
  flex-direction: row;
  justify-content: flex-start;
  text-align: left;
  padding: 10px 14px;
  gap: 10px;
}
.choices.choices-rows .choice .emoji { font-size: 1.5rem; flex-shrink: 0; }
.choices.choices-rows .choice .label { font-size: 0.9rem; line-height: 1.25; }
.pick-hint { text-align: center; font-size: 0.85rem; color: var(--gold-soft); margin: 8px 0 0; font-weight: 600; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 0.9rem; font-weight: 600; }
.field input, .field textarea, .field select {
  font: inherit; padding: 12px; border-radius: 12px; border: 1px solid #cbb896;
  background: #fff; color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(107, 78, 14, 0.25);
  background: #fffef8;
}
.field textarea { min-height: 88px; resize: vertical; }
.field .hint { font-size: 0.75rem; color: var(--snow-dim); }

.actions { display: flex; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
.btn {
  appearance: none; border: none; cursor: pointer; flex: 1; padding: 14px 16px;
  border-radius: 14px; font-size: 1rem; font-weight: 700; text-align: center;
  text-decoration: none; color: inherit; display: inline-flex; align-items: center; justify-content: center;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(145deg, var(--red), #8a2218); color: #fff;
  box-shadow: 0 4px 14px rgba(196, 60, 46, 0.4);
}
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.btn-ghost {
  background: var(--paper); color: var(--green-dark); border: 1px solid var(--green);
}
.btn-ok { background: linear-gradient(145deg, var(--green), var(--green-dark)); color: #fff; }

.draw-wrap {
  background: #fffaf0; border-radius: 16px; border: 2px dashed #c4a574; overflow: hidden;
}
.draw-wrap canvas { display: block; width: 100%; height: auto; touch-action: none; }

.wave-stage {
  text-align: center; padding: 28px 12px; font-size: 4rem;
  border-radius: var(--radius); background: var(--paper);
}

/* Parent */
.toggle-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid #ead9b8;
}
.toggle-row:last-child { border-bottom: none; }
.switch {
  position: relative; width: 48px; height: 28px; flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; background: #cbb896; border-radius: 999px; cursor: pointer;
}
.switch .slider::before {
  content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform 0.15s ease;
}
.switch input:checked + .slider { background: var(--ok); }
.switch input:checked + .slider::before { transform: translateX(20px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--gold); outline-offset: 2px; }

.style-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.style-opt {
  appearance: none; border: 2px solid #e0d0b0; background: var(--paper);
  color: var(--ink); border-radius: 12px; padding: 12px; cursor: pointer; text-align: left; font-size: 0.85rem;
}
.style-opt.selected { border-color: var(--red); background: #fff3e8; }

/* Letters on screen */
.letter-sheet {
  background: linear-gradient(160deg, #fbf6ea, #f0e2c4);
  color: #2c1e12;
  border-radius: 8px;
  padding: 24px 20px;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.5;
  box-shadow: var(--shadow);
}
.letter-sheet h1, .letter-sheet h2 { color: #8a2218; font-family: Georgia, serif; text-align: left; }
.letter-sheet p { margin: 0 0 0.75em; }
.letter-sheet .domain-foot {
  margin-top: 1.5em; font-size: 0.75rem; color: #7a6a55; text-align: center;
  font-family: var(--font);
}
.letter-sheet .pretend {
  margin-top: 1em; padding: 10px; border: 1px dashed #a89070; border-radius: 8px;
  font-size: 0.8rem; color: #5a4a38; font-family: var(--font);
}
.letter-sheet img.drawing {
  max-width: 100%; height: auto; border: 1px solid #c4a574; border-radius: 8px; margin: 8px 0;
}
.qa-block { margin-bottom: 0.85em; }
.qa-block .q { font-weight: 700; color: #8a2218; font-size: 0.9rem; }
.upgrade-card {
  opacity: 0.95; border-style: dashed;
}
.upgrade-card .price { color: var(--red-dark); font-weight: 700; }

.cert-preview, .envelope-preview {
  border: 2px dashed var(--card-border); border-radius: 12px; padding: 16px; text-align: center;
  color: var(--ink-soft); font-size: 0.9rem;
}

.hidden { display: none !important; }


/* PIN gate */
html.pin-locked body { overflow: hidden; }
html.pin-locked .page { display: none !important; }
.pin-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(42, 28, 18, 0.35);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 24px 16px 40px;
  overflow: auto;
}
.pin-card { width: min(100%, 400px); margin-top: 24px; }
.pin-status { font-size: 0.9rem; text-align: center; color: var(--green-dark); margin: 8px 0 0; }
.pin-status.err { color: var(--red-dark); }
.pin-forgot { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.hold-btn.holding { border-color: var(--red); }
.hold-track {
  height: 10px; border-radius: 999px; background: #ead9b8; border: 1px solid #cbb896; overflow: hidden;
}
.hold-fill { height: 100%; width: 0; background: var(--red); transition: width 0.08s linear; }

/* Letter looks — all bright parchment, distinct framing */
.letter-sheet {
  background: linear-gradient(160deg, #fffaf0, #f3e4c4);
  color: #2c1e12;
  border: 1px solid #c9a227;
}
.letter-sheet.look-classic {
  border: 3px solid var(--red);
  box-shadow: inset 0 0 0 6px #fffaf0, inset 0 0 0 8px var(--red), var(--shadow);
}
.letter-sheet.look-elf {
  background: linear-gradient(160deg, #f6fff6, #e7f0d8);
  border: 3px solid var(--green);
  box-shadow: inset 0 0 0 6px #f6fff6, inset 0 0 0 8px var(--gold-bright), var(--shadow);
}
.letter-sheet.look-elf h1, .letter-sheet.look-elf h2 { color: var(--green-dark); }
.letter-sheet.look-rudolph {
  background: linear-gradient(160deg, #fff8f4, #f8e0d4);
  border: 3px solid var(--red);
  border-top-width: 14px;
}
.letter-sheet.look-little {
  background: linear-gradient(160deg, #fffdf4, #ffe9b8);
  border: 4px dotted var(--red);
  font-size: 1.08rem;
}
.letter-sheet.look-older {
  background: #fbf7ee;
  border: 1px solid var(--green-dark);
  box-shadow: inset 0 0 0 8px #fbf7ee, inset 0 0 0 9px var(--green), var(--shadow);
}
.letter-sheet.look-keepsake {
  background: linear-gradient(180deg, #f7ecd0, #efe0b8);
  border: 8px double #6b4e0e;
  padding: 28px 22px;
}
.letter-sheet.look-keepsake .keepsake-masthead,
.letter-sheet.look-keepsake p:first-child {
  text-align: center;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.82rem;
  color: #6b4e0e;
  font-weight: 700;
}
.letter-edit {
  width: 100%;
  min-height: 360px;
  font: inherit;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.5;
  padding: 16px;
  border-radius: 8px;
  border: 2px solid var(--gold);
  background: #fffef8;
  color: var(--ink);
}
.edit-tools { flex-wrap: wrap; }
.edit-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--green-dark);
  background: #e7f5ec;
  border: 1px solid var(--green);
  border-radius: 999px;
  padding: 2px 8px;
}
.style-grid { grid-template-columns: 1fr 1fr; }
@media (min-width: 520px) {
  .style-grid.styles-six { grid-template-columns: 1fr 1fr 1fr; }
}

.wish-text {
  font: inherit; padding: 10px; border-radius: 10px;
  border: 1px solid #cbb896; background: #fff; color: var(--ink);
}
.wish-text:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(107, 78, 14, 0.25);
}

/* —— Stickers (kid's letter). They live in side margins that text never uses. —— */
.sticker-picker {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
@media (max-width: 420px) { .sticker-picker { grid-template-columns: repeat(4, 1fr); } }
.sticker-choice {
  appearance: none;
  aspect-ratio: 1;
  padding: 6px;
  border: 2px solid #e0d0b0;
  border-radius: 14px;
  background: #fffef8;
  cursor: pointer;
}
.sticker-choice svg { width: 100%; height: 100%; display: block; pointer-events: none; }
.sticker-choice.picked { border-color: var(--red); background: #fff1e6; box-shadow: 0 0 0 2px rgba(180, 35, 24, 0.25); }
.sticker-choice:disabled { opacity: 0.4; cursor: not-allowed; }
.sticker-choice:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.sticker-count { text-align: left; margin: 8px 0 0; }

.letter-sheet.has-stickers {
  position: relative;
  --sticker: 52px;
  padding-left: calc(var(--sticker) + 26px);
  padding-right: calc(var(--sticker) + 26px);
}
.letter-sheet .sticker {
  position: absolute;
  width: var(--sticker, 52px);
  height: var(--sticker, 52px);
  pointer-events: none;
}
.letter-sheet .sticker svg { width: 100%; height: 100%; display: block; }
.letter-sheet .sticker-left { left: 12px; }
.letter-sheet .sticker-right { right: 12px; }
.letter-sheet .sticker-row0 { top: 18px; }
.letter-sheet .sticker-row1 { top: calc(50% - var(--sticker, 52px) / 2); }
.letter-sheet .sticker-row2 { bottom: 18px; }
.letter-sheet .sticker-left.sticker-row0, .letter-sheet .sticker-right.sticker-row2 { transform: rotate(-8deg); }
.letter-sheet .sticker-right.sticker-row0, .letter-sheet .sticker-left.sticker-row2 { transform: rotate(7deg); }
@media print {
  .letter-sheet.has-stickers:not(.letter-illustrated) {
    --sticker: 0.8in;
    padding-left: 1.3in !important;
    padding-right: 1.3in !important;
  }
  .letter-sheet .sticker-left { left: 0.3in; }
  .letter-sheet .sticker-right { right: 0.3in; }
  .letter-sheet .sticker-row0 { top: 0.45in; }
  .letter-sheet .sticker-row2 { bottom: 0.45in; }
}

/* Share PDF draws an off-screen copy using the same spacing as the printout. */
.pdf-render .letter-sheet:not(.letter-illustrated) {
  padding: 0.6in;
  border-radius: 0;
  box-shadow: none;
  font-size: 12pt;
  min-height: 11in;
}
.pdf-render .letter-sheet.has-stickers:not(.letter-illustrated) {
  --sticker: 0.8in;
  padding-left: 1.3in;
  padding-right: 1.3in;
}
.pdf-render .letter-sheet .sticker-left { left: 0.3in; }
.pdf-render .letter-sheet .sticker-right { right: 0.3in; }
.pdf-render .letter-sheet .sticker-row0 { top: 0.45in; }
.pdf-render .letter-sheet .sticker-row2 { bottom: 0.45in; }

/* —— Grown-up shopping links (never printed) —— */
.amazon-link {
  display: inline-block;
  margin: 2px 0 4px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--green-dark);
}
.amazon-disclosure { font-size: 0.88rem; color: var(--ink); text-align: left; line-height: 1.4; margin: 10px 0 6px; }
.gift-list { margin: 0; padding-left: 1.2em; color: var(--snow-dim); line-height: 1.6; }
.wish-cards { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 720px) {
  .wish-cards { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
}
.tip-jar-card {
  color: #2a1c12;
}
.tip-jar-card h3 {
  margin: 0 0 8px;
  color: #7a2018;
}
.tip-jar-card p {
  margin: 0 0 12px;
  color: #2a1c12;
  line-height: 1.45;
}
.tip-jar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  white-space: nowrap;
  text-decoration: none;
  font-size: 0.92rem;
  padding: 12px 14px;
  flex: none;
}
@media (max-width: 400px) {
  .tip-jar-btn { font-size: 0.8rem; padding: 12px 8px; }
}
.tip-jar-btn:disabled,
.tip-jar-btn[aria-disabled="true"] {
  opacity: 0.7;
  cursor: not-allowed;
  filter: grayscale(0.15);
}
.gift-wish-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  background: #fff8e6;
  border: 1px solid #c9a227;
  padding: 12px 14px;
  min-width: 0;
}
.gift-wish-card h3 {
  margin: 0;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: #2a1c12;
}
.gift-wish-card .wish-line {
  margin: 0;
  color: #6a4e3a;
  font-size: 0.85rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.gift-wish-card .amazon-link,
a.btn-amazon {
  display: inline-block;
  align-self: flex-start;
  margin: 2px 0 0;
  padding: 7px 12px;
  background: linear-gradient(180deg, #fce8aa 0%, #d8aa44 48%, #a86c1c 100%);
  color: #481c0c;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 1px solid #8a5a16;
  box-shadow: 0 3px 8px rgba(80, 32, 0, 0.2);
}
.gift-wish { padding: 8px 0; border-bottom: 1px dashed #e0d0b0; }
.gift-wish:last-child { border-bottom: none; }
.gift-wish .amazon-link { display: block; }
.favorites-row { margin-top: 6px; }
.favorites-row .hint { margin: 2px 0; }
@media print { .amazon-link, .amazon-disclosure, .shop-slot, .favorites-row { display: none !important; } }

/* ==========================================================================
   Letter flow (age.html, rebuilt 2026-11-29): simple phone-first form,
   "Send to Santa" confirmation, grown-up box. Nothing here loads from the web.
   ========================================================================== */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.letter-form { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.form-card h3 { display: block; font-size: 1.02rem; line-height: 1.35; }
.npr-letter-flow .topbar .btn { white-space: nowrap; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  margin-right: 6px; vertical-align: 0.08em;
  width: 1.6em; height: 1.6em; border-radius: 50%;
  background: var(--red); color: #fff; font-size: 0.85rem; font-weight: 700;
}
.optional { font-weight: 400; font-size: 0.8rem; color: var(--ink-soft); }
.field-row { display: flex; gap: 10px; align-items: flex-end; }
.field-grow { flex: 1 1 auto; min-width: 0; }
.field-age { flex: 0 0 92px; }
.letter-flow-input, .npr-letter-flow .field input, .npr-letter-flow .field textarea, .npr-letter-flow .field select {
  font-size: 16px; /* 16px keeps phones from zooming in when a box is tapped */
}
.field-error { margin: 4px 0 0; color: #8a1a12; font-size: 0.85rem; font-weight: 600; }
.btn-small { padding: 8px 12px; font-size: 0.85rem; align-self: flex-start; }
.actions-center { justify-content: center; }
.btn-send { font-size: 1.25rem; padding: 16px 40px; min-width: 70%; }
.note-left { text-align: left; margin: 6px 0; }
.link-btn {
  appearance: none; background: none; border: 0; padding: 0; margin-left: 4px;
  color: var(--red-dark); font: inherit; text-decoration: underline; cursor: pointer;
}
/* Grown-ups box: clearly not for kids (green ribbon tag, dashed gold edge). */
.grownup-card { border: 2px dashed #c9a227; background: #fdf7e6; position: relative; }
.grownup-tag {
  display: inline-block; margin: 0 0 8px; padding: 3px 10px; border-radius: 999px;
  background: var(--green); color: #fff; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
}
#step-sent { display: flex; flex-direction: column; gap: 16px; }
#step-sent.hidden { display: none !important; }
.sent-card { text-align: center; padding: 8px 4px 0; }
.sent-card h2:focus { outline: none; }
#sent-title {
  font-size: clamp(1.85rem, 7vw, 2.35rem);
  line-height: 1.2;
  font-weight: 800;
  text-wrap: balance;
  max-width: 22rem;
  margin: 0 auto;
  padding: 0 6px;
}
.sent-envelope { font-size: 3rem; line-height: 1; margin-bottom: 8px; display: inline-block; }

/* Page action row: Home, New Letter, Sound. In-flow, not fixed or sticky.
   Equal-sized buttons in a centered row. Index uses .letter-actions-2 (no Home). */
.letter-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  width: min(100%, 28rem);
  margin: 0 auto 10px;
  position: static;
  box-sizing: border-box;
}
.letter-actions.letter-actions-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 20rem);
}
.letter-actions .dock-sound {
  display: flex;
  align-items: stretch;
  min-width: 0;
  margin: 0;
  width: 100%;
}
.letter-actions > a,
.letter-actions > button,
.letter-actions .sound-toggle {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-sizing: border-box;
  width: 100%;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  margin: 0;
  padding: 0 8px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.72rem;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.dock-home {
  color: #6b1a14;
  background: rgba(255, 248, 232, 0.94);
  border: 1px solid #c9a227;
}
.dock-home-icon {
  display: block;
  flex: none;
  width: 18px;
  height: 18px;
}
.dock-home-label { display: inline; }
.dock-home:focus-visible,
.btn-new-letter:focus-visible,
.letter-actions .sound-toggle:focus-visible {
  outline: 3px solid #6b4e0e;
  outline-offset: 2px;
}
.btn-new-letter {
  appearance: none;
  border: 1px solid #8a1410;
  background: repeating-linear-gradient(
    45deg,
    #c41e1e 0 7px,
    #fff8ee 7px 14px
  );
  color: #6b1a14;
}
.btn-new-letter-label {
  display: inline-block;
  background: rgba(255, 248, 232, 0.96);
  color: #6b1a14;
  border: 1px solid rgba(107, 26, 20, 0.35);
  border-radius: 999px;
  padding: 2px 6px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-shadow: none;
}
.letter-actions .sound-toggle,
.sound-toggle {
  position: static !important;
  top: auto !important;
  right: auto !important;
}
.letter-actions .sound-toggle {
  appearance: none;
  border: 1px solid #c9a227;
  background: rgba(255, 248, 232, 0.94);
  color: #6b1a14;
  z-index: auto;
}
.letter-actions .sound-toggle[aria-pressed="true"] {
  background: #c9a227;
  color: #2a1c12;
}
.letter-actions .sound-toggle[aria-pressed="false"] {
  background: rgba(255, 248, 232, 0.94);
  color: #6b1a14;
}
.letter-actions .sound-bell { display: block; flex: none; width: 16px; height: 16px; }
.sound-toggle-label { font-size: 0.72rem; font-weight: 700; }

#step-sent.npr-sent-fade { animation: npr-sent-fade 0.45s ease both; }
@keyframes npr-sent-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Flying letter on Send to Santa (js/flight.js). ~2.8s: cream paper folds into a
   textured envelope with a gold-edged flap and a red wax seal, then floats up with tilt and depth. */
.npr-flight {
  position: fixed; inset: 0; z-index: 80;
  pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  background: rgba(20, 12, 8, 0);
  transition: background 0.45s ease;
  perspective: 900px;
}
.npr-flight.is-playing { background: rgba(20, 12, 8, 0.32); }
.npr-flight-stage {
  position: relative; width: 200px; height: 150px;
  transform-style: preserve-3d;
  transform-origin: 50% 80%;
}
.npr-flight-paper {
  position: absolute; left: 40px; top: 0; width: 120px; height: 154px;
  background-color: #f3e8cf;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.28), rgba(160,130,80,0.12)),
    url("../img/flight-paper.jpg");
  background-size: cover;
  border: 1px solid #e0d0b0;
  box-shadow: 0 10px 24px rgba(42, 28, 18, 0.32), 0 1px 0 rgba(255,255,255,0.5) inset;
  transform-origin: 50% 100%;
  opacity: 1;
  border-radius: 2px;
}
.npr-flight-paper::before {
  /* faint letter lines on the stationery */
  content: "";
  position: absolute; left: 16px; right: 16px; top: 28px; bottom: 20px;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 11px,
    rgba(140, 110, 70, 0.18) 11px 12px
  );
  pointer-events: none;
}
.npr-flight.is-playing .npr-flight-paper {
  animation: npr-flight-fold 0.8s ease-in forwards;
}
@keyframes npr-flight-fold {
  0% { transform: rotateX(0) scale(1); opacity: 1; }
  70% { transform: rotateX(78deg) scale(0.82, 0.4); opacity: 0.85; }
  100% { transform: rotateX(90deg) scale(0.7, 0.08); opacity: 0; }
}
.npr-flight-envelope {
  position: absolute; left: 22px; top: 38px; width: 156px; height: 100px;
  opacity: 0; transform: scale(0.78) rotateX(8deg);
  filter: drop-shadow(0 14px 18px rgba(20, 8, 0, 0.38));
  transform-style: preserve-3d;
}
.npr-flight.is-playing .npr-flight-envelope {
  animation: npr-flight-appear 0.5s ease-out 0.45s forwards, npr-flight-up 1.9s ease-in 0.95s forwards;
}
.npr-flight-front {
  position: absolute; inset: 0;
  background-color: #ead7b0;
  background-image:
    linear-gradient(180deg, rgba(255,252,240,0.35) 0%, rgba(160,120,60,0.12) 100%),
    url("../img/flight-envelope.jpg");
  background-size: cover;
  border: 1px solid #c9b48a;
  border-radius: 3px 3px 7px 7px;
  box-shadow: 0 12px 28px rgba(42, 28, 18, 0.4), inset 0 1px 0 rgba(255,255,255,0.45);
  overflow: hidden;
}
.npr-flight-front::before,
.npr-flight-front::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
/* soft inner folds on the envelope face */
.npr-flight-front::before {
  inset: 0;
  background:
    linear-gradient(105deg, transparent 46%, rgba(120, 80, 40, 0.12) 50%, transparent 54%),
    linear-gradient(-105deg, transparent 46%, rgba(120, 80, 40, 0.12) 50%, transparent 54%);
}
.npr-flight-flap {
  position: absolute; left: -1px; right: -1px; top: -34px; height: 46px;
  background-color: #e6d3aa;
  background-image:
    linear-gradient(180deg, rgba(255,248,230,0.5), rgba(180,140,70,0.18)),
    url("../img/flight-envelope.jpg");
  background-size: cover;
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
  filter: drop-shadow(0 -2px 4px rgba(42, 28, 18, 0.2));
  transform-origin: 50% 100%;
  border-bottom: 0;
}
/* gold edge along the triangular flap */
.npr-flight-flap::after {
  content: "";
  position: absolute; inset: 0;
  clip-path: polygon(0 100%, 50% 0, 100% 100%, 97% 100%, 50% 8%, 3% 100%);
  background: linear-gradient(90deg, #8a6a12, #e8c85a 40%, #fff3b0 50%, #e8c85a 60%, #8a6a12);
  pointer-events: none;
}
.npr-flight.is-playing .npr-flight-flap {
  animation: npr-flight-flap 0.45s ease-in 0.5s forwards;
  transform: rotateX(-110deg);
}
@keyframes npr-flight-flap {
  0% { transform: rotateX(-110deg); }
  100% { transform: rotateX(0deg); }
}
.npr-flight-seal {
  position: absolute; left: 50%; top: 22px; width: 42px; height: 42px;
  margin-left: -21px;
  background: url("../img/flight-seal.png") center / contain no-repeat;
  filter: drop-shadow(0 3px 4px rgba(40, 0, 0, 0.4));
  opacity: 0;
  transform: scale(0.6);
}
.npr-flight.is-playing .npr-flight-seal {
  animation: npr-flight-seal 0.35s ease-out 0.85s forwards;
}
@keyframes npr-flight-appear {
  0% { opacity: 0; transform: scale(0.78) rotateX(8deg); }
  100% { opacity: 1; transform: scale(1) rotateX(0); }
}
@keyframes npr-flight-seal {
  0% { opacity: 0; transform: scale(0.6) rotate(-12deg); }
  70% { opacity: 1; transform: scale(1.08) rotate(4deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes npr-flight-up {
  0% { transform: translateY(0) translateZ(0) rotate(-2deg) scale(1); opacity: 1; filter: drop-shadow(0 14px 18px rgba(20, 8, 0, 0.38)); }
  60% { transform: translateY(-48vh) translateZ(80px) rotate(-9deg) scale(0.86); opacity: 1; filter: drop-shadow(0 24px 28px rgba(20, 8, 0, 0.28)); }
  100% { transform: translateY(-118vh) translateZ(160px) rotate(-14deg) scale(0.68); opacity: 0; filter: drop-shadow(0 8px 10px rgba(20, 8, 0, 0.12)); }
}
.npr-flight-sparkles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.npr-flight-sparkle {
  position: absolute; width: 8px; height: 8px;
  background: #f0d36a;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  box-shadow: 0 0 8px 2px rgba(240, 211, 106, 0.75);
  opacity: 0;
}
.npr-flight.is-playing .npr-flight-sparkle {
  animation: npr-flight-spark 1.1s ease-out forwards;
}
@keyframes npr-flight-spark {
  0% { opacity: 0; transform: translateY(10px) scale(0.3) rotate(0deg); }
  25% { opacity: 1; transform: translateY(0) scale(1) rotate(20deg); }
  100% { opacity: 0; transform: translateY(-48px) scale(0.25) rotate(50deg); }
}
@media (prefers-reduced-motion: reduce) {
  .npr-flight, .npr-flight.is-playing .npr-flight-paper,
  .npr-flight.is-playing .npr-flight-envelope,
  .npr-flight.is-playing .npr-flight-flap,
  .npr-flight.is-playing .npr-flight-seal,
  .npr-flight.is-playing .npr-flight-sparkle { animation: none !important; display: none !important; }
  #step-sent.npr-sent-fade { animation: npr-sent-fade 0.35s ease both; }
}

/* Off-screen copy of the letter being printed (measured for text fitting, shown only in print). */
#print-stage { position: fixed; left: -10000px; top: 0; width: 8.5in; pointer-events: none; }

/* Short guide pages (printable letter, classroom, postmark). */
.guide-steps { margin: 0.5em 0 0; padding-left: 1.25em; color: var(--snow-dim); font-size: 0.95rem; line-height: 1.5; }
.guide-steps li { margin: 0 0 0.55em; }
.address-block {
  display: block;
  margin: 0.7em 0;
  padding: 10px 12px;
  background: rgba(255, 250, 238, 0.85);
  border: 1px dashed #c9a227;
  border-radius: 8px;
  font-style: normal;
  line-height: 1.45;
  color: var(--ink);
}
.source-note { font-size: 0.82rem; line-height: 1.45; color: var(--snow-dim); }

/* Template guide gallery: 2 per row on phones, 3 on a wide desktop, large readable thumbs. */
.template-thumbs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  margin: 0.6em 0 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 1100px) {
  .template-thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.template-thumb {
  margin: 0;
  padding: 10px;
  border: 2px solid #e0d0b0;
  border-radius: 12px;
  background: #fffef8;
  text-align: center;
}
.template-thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 8.5 / 11;
  object-fit: cover;
  border-radius: 6px;
  background: #f3ead4;
}
.template-thumb figcaption {
  margin: 8px 0 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink, #2a1c12);
}
