/* ============================================================
   ChristmasColoringPages — hand-written design system
   Festive, kid-friendly, premium. No frameworks.
   Palette: red / green / gold on cream + snow.
   ============================================================ */

:root {
  --red: #C8102E;
  --red-dark: #9E0B23;
  --red-soft: #FBE3E7;
  --green: #0E6B3E;
  --green-dark: #084E2C;
  --green-soft: #DDF0E2;
  --gold: #F2A900;
  --gold-soft: #FCEFC9;
  --cream: #FFF8EE;
  --snow: #FFFFFF;
  --ink: #2E1F14;
  --ink-soft: #5C4A38;
  --soft: #FDEFD8;
  --border: 3px solid var(--ink);
  --radius: 24px;
  --radius-sm: 16px;
  --shadow: 0 6px 0 rgba(46, 31, 20, 0.14);
  --shadow-lg: 0 12px 28px rgba(46, 31, 20, 0.16);
  --font-head: "Fredoka", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1200px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--cream);
  /* dotted snow pattern */
  background-image: radial-gradient(rgba(200, 16, 46, 0.055) 1.6px, transparent 1.7px);
  background-size: 26px 26px;
  line-height: 1.65;
  font-size: 17px;
  overflow-x: hidden;
  max-width: 100%;
  position: relative;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.18;
  color: var(--ink);
  letter-spacing: 0.2px;
}

h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.15rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }

p { margin-bottom: 1rem; }

a { color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }

.container { max-width: var(--max); margin: 0 auto; padding: 0 22px; }

.section { padding: 64px 0; }
.section-title { text-align: center; margin-bottom: 10px; }
.section-sub { text-align: center; color: var(--ink-soft); max-width: 640px; margin: 0 auto 36px; font-size: 1.08rem; }

/* gold flourish divider (unicode snowflake, text-presentation) */
.flourish {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--gold);
  font-size: 1.35rem;
  letter-spacing: 10px;
  margin: 8px auto 26px;
  user-select: none;
  line-height: 1;
  white-space: nowrap;
  max-width: 100%;
}
.flourish::before, .flourish::after {
  content: "";
  display: block;
  flex: 0 1 80px;
  min-width: 14px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--gold));
  margin: 0 12px;
}
.flourish::after { background: linear-gradient(90deg, var(--gold), transparent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-head); font-weight: 600; font-size: 1.05rem;
  padding: 14px 28px; border-radius: 999px; border: var(--border);
  cursor: pointer; text-decoration: none; color: var(--snow);
  background: var(--red); box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap; max-width: 100%; box-sizing: border-box;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:hover { transform: translateY(-3px); box-shadow: 0 9px 0 rgba(46,31,20,0.14); color: var(--snow); }
.btn:active { transform: translateY(1px); box-shadow: 0 3px 0 rgba(46,31,20,0.14); }
.btn-green { background: var(--green); }
.btn-green:hover { background: var(--green-dark); color: var(--snow); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { color: var(--ink); background: #ffbe2e; }
.btn-cream { background: var(--snow); color: var(--ink); }
.btn-cream:hover { color: var(--ink); background: var(--cream); }
.btn-sm { padding: 9px 18px; font-size: 0.95rem; }

/* ---------- Sticker badges ---------- */
.badge {
  display: inline-block; font-family: var(--font-head); font-weight: 600; font-size: 0.82rem;
  padding: 5px 14px; border-radius: 999px; border: 2.5px solid var(--ink);
  background: var(--gold-soft); color: var(--ink);
  transform: rotate(-3deg); box-shadow: 0 3px 0 rgba(46,31,20,0.18);
  text-transform: uppercase; letter-spacing: 0.6px;
}
.badge-easy { background: var(--green-soft); transform: rotate(2deg); }
.badge-medium { background: var(--gold-soft); }
.badge-new { background: var(--red); color: var(--snow); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--cream); border-bottom: 3px solid var(--ink);
}
.header-inner {
  max-width: var(--max); margin: 0 auto; padding: 12px 22px;
  display: flex; align-items: center; gap: 26px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.logo svg { width: 42px; height: 42px; flex: none; }
.logo-img { height: 54px; width: auto; display: block; flex: none; }
.logo-word { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; color: var(--ink); line-height: 1.05; }
.logo-word span { color: var(--red); }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a, .main-nav .drop-btn {
  font-family: var(--font-head); font-weight: 600; font-size: 1rem; color: var(--ink);
  text-decoration: none; padding: 10px 14px; border-radius: 14px; background: none; border: none;
  cursor: pointer; font-size: 1rem;
}
.main-nav a:hover, .main-nav .drop-btn:hover { background: var(--soft); color: var(--red-dark); }
.main-nav a.active { background: var(--red-soft); color: var(--red-dark); }

.dropdown { position: relative; }
.drop-btn { display: inline-flex; align-items: center; gap: 6px; }
.drop-btn svg { width: 14px; height: 14px; transition: transform 0.2s; }
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 220px;
  background: var(--snow); border: var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); padding: 8px; display: none;
}
.dropdown-menu a { display: block; padding: 10px 14px; border-radius: 10px; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown.open .drop-btn svg { transform: rotate(180deg); }

.hamburger { display: none; background: none; border: var(--border); border-radius: 12px; padding: 8px 10px; cursor: pointer; }
.hamburger svg { width: 24px; height: 24px; display: block; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--snow);
  background: linear-gradient(135deg, var(--red-dark) 0%, var(--red) 42%, var(--green-dark) 100%);
  border-bottom: 3px solid var(--ink);
}
.hero::before { /* soft glow blobs */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(420px 300px at 12% 18%, rgba(242,169,0,0.28), transparent 70%),
    radial-gradient(520px 380px at 88% 82%, rgba(255,255,255,0.10), transparent 70%);
}
#snow { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-inner {
  position: relative; z-index: 1; max-width: var(--max); margin: 0 auto;
  padding: 70px 22px 60px; display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: 44px; align-items: center;
}
.hero h1 { color: var(--snow); margin: 14px 0 14px; text-shadow: 0 3px 0 rgba(0,0,0,0.18); }
.hero h1 .hl { color: var(--gold); }
.hero p.lead { font-size: 1.15rem; color: #FFF3E2; max-width: 520px; }
.hero-art { position: relative; }
.hero-art img {
  border-radius: 28px; border: 4px solid var(--snow);
  box-shadow: var(--shadow-lg); transform: rotate(2.5deg);
  background: var(--snow);
}
.hero-art .sticker {
  position: absolute; top: -18px; right: -10px;
  background: var(--gold); color: var(--ink); border: var(--border);
  font-family: var(--font-head); font-weight: 700; font-size: 1rem;
  padding: 10px 18px; border-radius: 999px; transform: rotate(8deg);
  box-shadow: var(--shadow);
}
.search-wrap {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 24px 0 18px;
  box-sizing: border-box;
}
.search-wrap svg {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--ink-soft);
  pointer-events: none;
}
.search-wrap input {
  width: 100%;
  padding: 15px 20px 15px 48px;
  font-size: 1.05rem;
  font-family: var(--font-body);
  border: var(--border);
  border-radius: 999px;
  background: var(--snow);
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
}
.search-wrap input:focus { outline: 3px solid var(--gold); outline-offset: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.chip {
  font-family: var(--font-head); font-weight: 600; font-size: 0.95rem;
  padding: 8px 18px; border-radius: 999px; border: 2.5px solid var(--snow);
  background: rgba(255,255,255,0.14); color: var(--snow); cursor: pointer;
  transition: all 0.15s ease;
}
.chip:hover { background: rgba(255,255,255,0.28); }
.chip.active { background: var(--gold); border-color: var(--ink); color: var(--ink); }

.hero-cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 26px; }

/* email capture card inside hero */
.email-card {
  background: var(--snow); color: var(--ink); border: var(--border);
  border-radius: var(--radius); padding: 22px 24px; max-width: 480px; width: 100%;
  box-shadow: var(--shadow-lg); transform: rotate(-1deg); box-sizing: border-box;
}
.email-card h3 { margin-bottom: 6px; display: flex; align-items: center; gap: 10px; }
.email-card h3 svg { width: 24px; height: 24px; color: var(--red); }
.email-card p { font-size: 0.97rem; color: var(--ink-soft); margin-bottom: 12px; }
.email-form { display: flex; gap: 10px; width: 100%; }
.email-form input[type="email"] {
  flex: 1; min-width: 0; padding: 12px 16px; font-size: 1rem; font-family: var(--font-body);
  border: 2.5px solid var(--ink); border-radius: 14px; -webkit-appearance: none; appearance: none;
  box-sizing: border-box;
}
.email-form input[type="email"]:focus { outline: 3px solid var(--gold); outline-offset: 1px; }
.email-note { font-size: 0.82rem; color: var(--ink-soft); margin: 8px 0 0; }

/* ---------- Card grid (home + related) ---------- */
.cards-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 26px; margin-bottom: 10px;
}
.page-card {
  background: var(--snow); border: var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
}
.page-card:hover { transform: translateY(-6px) rotate(-0.5deg); box-shadow: var(--shadow-lg); color: var(--ink); }
.page-card .thumb { background: var(--soft); padding: 18px; border-bottom: var(--border); position: relative; }
.page-card .thumb img {
  border-radius: 14px; border: 2.5px solid var(--ink); background: var(--snow);
  aspect-ratio: 4/5; object-fit: cover; width: 100%;
}
.page-card .thumb .badge { position: absolute; top: 26px; left: 26px; }
.page-card .card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.page-card h3 { font-size: 1.12rem; }
.page-card .card-meta { font-size: 0.88rem; color: var(--ink-soft); }
.page-card .card-link {
  margin-top: auto; font-family: var(--font-head); font-weight: 600; color: var(--red);
  display: inline-flex; align-items: center; gap: 8px; padding-top: 6px;
}
.page-card .card-link svg { width: 18px; height: 18px; }

/* ---------- Ad slots (AdSense-ready placeholders) ---------- */
.ad-slot {
  border: 3px dashed #C9BBA6; border-radius: var(--radius-sm);
  background: repeating-linear-gradient(45deg, #FFFDF8, #FFFDF8 14px, #FBF4E6 14px, #FBF4E6 28px);
  color: #A08C6E; text-align: center; padding: 30px 16px; margin: 40px auto;
  font-family: var(--font-head); font-weight: 600; letter-spacing: 2px; font-size: 0.85rem;
  text-transform: uppercase; max-width: 970px;
}
.ad-slot small { display: block; margin-top: 6px; font-family: var(--font-body); font-weight: 400; letter-spacing: 0; text-transform: none; font-size: 0.8rem; }

/* ---------- Promo band (color online) ---------- */
.band {
  border-top: var(--border); border-bottom: var(--border);
  background: linear-gradient(120deg, var(--green-dark), var(--green) 55%, var(--red-dark));
  color: var(--snow); position: relative; overflow: hidden;
}
.band::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.10) 1.6px, transparent 1.7px);
  background-size: 26px 26px; pointer-events: none;
}
.band-inner {
  position: relative; max-width: var(--max); margin: 0 auto; padding: 56px 22px;
  display: grid; grid-template-columns: 1fr auto; gap: 34px; align-items: center;
}
.band h2 { color: var(--snow); margin-bottom: 10px; }
.band p { color: #EAF6EE; max-width: 560px; margin-bottom: 0; }
.band .band-art { display: flex; gap: 12px; }
.band .mini-palette {
  display: grid; grid-template-columns: repeat(4, 44px); gap: 10px;
  background: var(--snow); border: var(--border); border-radius: 20px; padding: 16px;
  transform: rotate(3deg); box-shadow: var(--shadow-lg);
}
.band .mini-palette span { width: 44px; height: 44px; border-radius: 50%; border: 2.5px solid var(--ink); }

/* ---------- Feature / idea cards ---------- */
.idea-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.idea-card {
  background: var(--snow); border: var(--border); border-radius: var(--radius);
  padding: 28px 24px; box-shadow: var(--shadow); position: relative;
}
.idea-card:nth-child(odd) { transform: rotate(-0.8deg); }
.idea-card:nth-child(even) { transform: rotate(0.8deg); }
.idea-card .icon-dot {
  width: 56px; height: 56px; border-radius: 18px; border: var(--border);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
  background: var(--gold-soft);
}
.idea-card:nth-child(2n) .icon-dot { background: var(--red-soft); }
.idea-card:nth-child(3n) .icon-dot { background: var(--green-soft); }
.idea-card .icon-dot svg { width: 28px; height: 28px; }
.idea-card h3 { margin-bottom: 8px; }
.idea-card p { font-size: 0.97rem; color: var(--ink-soft); margin-bottom: 0; }

/* ---------- Affiliate supply cards ---------- */
.supply-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 26px; }
.supply-card {
  background: var(--snow); border: var(--border); border-radius: var(--radius);
  padding: 28px 24px; text-align: center; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 10px; align-items: center;
}
.supply-card .supply-icon {
  width: 72px; height: 72px; border-radius: 50%; border: var(--border);
  background: var(--gold-soft); display: flex; align-items: center; justify-content: center;
}
.supply-card .supply-icon svg { width: 36px; height: 36px; }
.supply-card h3 { font-size: 1.15rem; }
.supply-card p { font-size: 0.95rem; color: var(--ink-soft); flex: 1; }
.affiliate-note { text-align: center; font-size: 0.82rem; color: var(--ink-soft); margin-top: 18px; }

/* ---------- FAQ accordion ---------- */
.faq-list { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.faq-item { background: var(--snow); border: var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 18px 22px; background: none; border: none; cursor: pointer;
  font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; color: var(--ink); text-align: left;
}
.faq-q svg { width: 22px; height: 22px; flex: none; color: var(--red); transition: transform 0.25s ease; }
.faq-item.open .faq-q svg { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-a p { padding: 0 22px 20px; margin: 0; color: var(--ink-soft); }
.faq-item.open .faq-a { max-height: 400px; }

/* ---------- Newsletter CTA band ---------- */
.newsletter-band {
  background: linear-gradient(120deg, var(--red) 0%, var(--red-dark) 60%, var(--green-dark) 130%);
  border-top: var(--border); border-bottom: var(--border); color: var(--snow);
}
.newsletter-inner { max-width: 720px; margin: 0 auto; padding: 60px 22px; text-align: center; }
.newsletter-inner h2 { color: var(--snow); margin-bottom: 12px; }
.newsletter-inner p { color: #FFE9D6; margin-bottom: 22px; }
.newsletter-inner .email-form { max-width: 480px; margin: 0 auto; }
.newsletter-inner .email-note { color: #F3D9C4; }

/* ---------- Footer ---------- */
.site-footer { background: var(--red-dark); color: #F6E7DC; border-top: 3px solid var(--ink); }
.footer-inner {
  max-width: var(--max); margin: 0 auto; padding: 56px 22px 30px;
  display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 36px;
}
.footer-brand .logo-word { color: var(--snow); }
.footer-brand p { font-size: 0.95rem; color: #EACDB8; margin-top: 12px; max-width: 300px; }
.site-footer h4 { color: var(--gold); font-size: 1.05rem; margin-bottom: 14px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-links a { color: #F6E7DC; text-decoration: none; font-size: 0.97rem; }
.footer-links a:hover { color: var(--gold); text-decoration: underline; }
.social-row { display: flex; gap: 12px; margin-top: 16px; }
.social-row a {
  width: 42px; height: 42px; border-radius: 50%; border: 2.5px solid var(--snow);
  display: flex; align-items: center; justify-content: center; color: var(--snow);
  transition: all 0.15s ease;
}
.social-row a:hover { background: var(--gold); border-color: var(--ink); color: var(--ink); }
.social-row svg { width: 20px; height: 20px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.22); margin-top: 34px; padding-top: 22px;
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: 0.88rem; color: #EACDB8; max-width: var(--max); margin-left: auto; margin-right: auto; padding-left: 22px; padding-right: 22px;
}

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(46,31,20,0.6); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--snow); border: 4px solid var(--ink); border-radius: 28px;
  max-width: 480px; width: 100%; padding: 36px 32px; position: relative;
  box-shadow: var(--shadow-lg); transform: rotate(-0.6deg);
  animation: pop 0.25s ease;
}
@keyframes pop { from { transform: scale(0.92) rotate(-0.6deg); opacity: 0; } }
.modal h2 { font-size: 1.5rem; margin-bottom: 10px; }
.modal p { color: var(--ink-soft); font-size: 0.98rem; }
.modal .modal-close {
  position: absolute; top: 14px; right: 14px; background: var(--soft);
  border: 2.5px solid var(--ink); border-radius: 50%; width: 38px; height: 38px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.modal .modal-close svg { width: 18px; height: 18px; }
.modal .gift-row { display: flex; gap: 8px; margin: 14px 0; justify-content: center; }
.modal .gift-row .badge { font-size: 0.75rem; }

/* ---------- Detail page ---------- */
.breadcrumbs { font-size: 0.9rem; color: var(--ink-soft); margin: 26px 0 6px; }
.breadcrumbs a { color: var(--red); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

.detail-hero { text-align: center; max-width: 800px; margin: 0 auto 30px; }
.detail-hero h1 { margin: 14px 0 12px; }
.detail-hero .meta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 16px 0; }
.detail-hero .intro { text-align: left; color: var(--ink-soft); font-size: 1.06rem; }
.detail-hero .intro h2 { font-size: 1.45rem; margin: 24px 0 12px; color: var(--ink); text-align: center; }
.detail-hero .intro strong { color: var(--ink); }

.print-shell { max-width: 640px; margin: 0 auto 8px; }
.print-area {
  background: var(--snow); border: 4px solid var(--ink); border-radius: 28px;
  padding: 26px; box-shadow: var(--shadow-lg); position: relative;
}
.print-area img { border-radius: 12px; width: 100%; }
.print-area .badge { position: absolute; top: 34px; left: 34px; }

.action-row {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  margin: 26px 0 10px;
}

.feature-list { list-style: none; max-width: 640px; margin: 22px auto; display: flex; flex-direction: column; gap: 12px; }
.feature-list li {
  background: var(--snow); border: 2.5px solid var(--ink); border-radius: var(--radius-sm);
  padding: 14px 18px; display: flex; gap: 12px; align-items: flex-start; font-size: 0.99rem;
}
.feature-list li svg { width: 22px; height: 22px; flex: none; color: var(--green); margin-top: 2px; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; margin-top: 26px; }
.step {
  background: var(--snow); border: var(--border); border-radius: var(--radius);
  padding: 26px 22px; text-align: center; box-shadow: var(--shadow); position: relative;
}
.step .step-num {
  width: 52px; height: 52px; border-radius: 50%; background: var(--red); color: var(--snow);
  border: var(--border); font-family: var(--font-head); font-weight: 700; font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 14px;
}
.step:nth-child(2) .step-num { background: var(--green); }
.step:nth-child(3) .step-num { background: var(--gold); color: var(--ink); }
.step h3 { margin-bottom: 8px; }
.step p { font-size: 0.95rem; color: var(--ink-soft); margin: 0; }

.mini-affiliate {
  background: var(--gold-soft); border: var(--border); border-radius: var(--radius);
  padding: 26px; max-width: 780px; margin: 44px auto; display: flex; gap: 20px; align-items: center;
}
.mini-affiliate .supply-icon {
  width: 64px; height: 64px; flex: none; border-radius: 50%; border: var(--border);
  background: var(--snow); display: flex; align-items: center; justify-content: center;
}
.mini-affiliate .supply-icon svg { width: 30px; height: 30px; }
.mini-affiliate h3 { margin-bottom: 6px; }
.mini-affiliate p { font-size: 0.95rem; color: var(--ink-soft); margin-bottom: 10px; }

.prev-next { display: flex; justify-content: space-between; gap: 16px; margin: 44px 0 10px; flex-wrap: wrap; }
.prev-next a {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font-family: var(--font-head); font-weight: 600; color: var(--ink);
  background: var(--snow); border: var(--border); border-radius: 999px; padding: 12px 22px;
  box-shadow: var(--shadow); transition: transform 0.15s ease;
}
.prev-next a:hover { transform: translateY(-2px); color: var(--red-dark); }
.prev-next a svg { width: 18px; height: 18px; }

/* ---------- Coloring tool page ---------- */
.tool-layout {
  display: grid; grid-template-columns: 200px 1fr 250px; gap: 24px;
  margin: 30px 0 50px; align-items: start;
}
.tool-panel {
  background: var(--snow); border: var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
  min-width: 0; max-width: 100%;
}
.tool-panel h3 { font-size: 1.05rem; margin-bottom: 14px; text-align: center; }
.picker-list { display: flex; flex-direction: column; gap: 10px; max-height: 560px; overflow-y: auto; padding-right: 4px; }
.picker-item {
  border: 2.5px solid transparent; border-radius: 14px; padding: 4px; cursor: pointer; background: var(--soft);
}
.picker-item img { border-radius: 10px; aspect-ratio: 4/5; object-fit: cover; width: 100%; }
.picker-item.active { border-color: var(--red); background: var(--red-soft); }
.picker-item:hover { border-color: var(--gold); }

.tool-stage { display: flex; flex-direction: column; gap: 16px; min-width: 0; max-width: 100%; }
.tool-canvas-wrap {
  background: var(--snow); border: 4px solid var(--ink); border-radius: 28px;
  padding: 20px; box-shadow: var(--shadow-lg); display: flex; justify-content: center;
  min-width: 0; max-width: 100%;
}
.tool-canvas-wrap canvas {
  max-width: 100%; height: auto; border-radius: 10px; cursor: crosshair;
  touch-action: none; background: #ffffff;
}
.tool-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.palette-grid { display: block; }
.palette-group { margin-bottom: 14px; }
.palette-group:last-child { margin-bottom: 0; }
.palette-group-label {
  font-size: 0.75rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--ink-soft); margin-bottom: 8px;
}
.palette-group-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.custom-color-row { display: flex; justify-content: center; margin-top: 16px; }
.custom-color-label { display: flex; align-items: center; gap: 12px; font-weight: 800; cursor: pointer; }
#custom-color {
  width: 54px; height: 54px; border: 3px solid var(--ink); border-radius: 50%;
  padding: 0; background: none; cursor: pointer;
}
#custom-color::-webkit-color-swatch-wrapper { padding: 5px; }
#custom-color::-webkit-color-swatch { border: none; border-radius: 50%; }
#custom-color::-moz-color-swatch { border: none; border-radius: 50%; }
.recent-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.recent-label { font-size: 0.8rem; font-weight: 800; color: var(--ink-soft); }
.recent-colors { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.recent-swatch {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--ink);
  cursor: pointer; padding: 0; transition: transform 0.12s ease;
}
.recent-swatch:hover { transform: scale(1.15); }
.swatch {
  aspect-ratio: 1; border-radius: 50%; border: 3px solid var(--ink); cursor: pointer;
  transition: transform 0.12s ease; padding: 0;
}
.swatch:hover { transform: scale(1.12); }
.swatch.active { outline: 4px solid var(--gold); outline-offset: 2px; transform: scale(1.12); }
.tool-tip { font-size: 0.88rem; color: var(--ink-soft); text-align: center; margin-top: 12px; }

/* ---------- Bundle landing ---------- */
.bundle-hero { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: center; padding: 60px 0; }
.book-mockup { position: relative; display: flex; justify-content: center; padding: 20px; }
.book {
  width: 300px; height: 400px; border-radius: 8px 22px 22px 8px; border: 4px solid var(--ink);
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 70%);
  box-shadow: 14px 14px 0 rgba(46,31,20,0.2); position: relative; transform: rotate(-4deg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: var(--snow); text-align: center; padding: 30px;
}
.book::before { /* spine */
  content: ""; position: absolute; left: 14px; top: 0; bottom: 0; width: 6px;
  background: rgba(0,0,0,0.22); border-radius: 4px;
}
.book .book-flourish { font-size: 2rem; color: var(--gold); letter-spacing: 8px; }
.book h3 { color: var(--snow); font-size: 1.6rem; }
.book p { color: #FFE3D3; font-size: 0.95rem; margin: 0; }
.book .book-badge {
  background: var(--gold); color: var(--ink); border: 3px solid var(--ink); border-radius: 999px;
  font-family: var(--font-head); font-weight: 700; padding: 8px 20px; transform: rotate(3deg);
}
.book-mockup .float-badge { position: absolute; }
.bundle-benefits { list-style: none; display: flex; flex-direction: column; gap: 14px; margin: 24px 0; }
.bundle-benefits li { display: flex; gap: 12px; align-items: flex-start; font-size: 1.02rem; }
.bundle-benefits svg { width: 24px; height: 24px; flex: none; color: var(--green); margin-top: 3px; }

.testimonials { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-top: 30px; }
.testimonial {
  background: var(--snow); border: var(--border); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow); transform: rotate(-0.6deg);
}
.testimonial:nth-child(2n) { transform: rotate(0.6deg); }
.testimonial .stars { display: flex; gap: 3px; margin-bottom: 12px; }
.testimonial .stars svg { width: 20px; height: 20px; color: var(--gold); }
.testimonial p { font-style: italic; color: var(--ink-soft); font-size: 0.98rem; }
.testimonial .who { font-family: var(--font-head); font-weight: 600; font-style: normal; color: var(--ink); margin: 10px 0 0; }

/* ---------- Generic content pages ---------- */
.prose { max-width: 780px; margin: 0 auto; }
.prose h1 { margin: 8px 0 18px; }
.prose h2 { margin: 34px 0 12px; font-size: 1.5rem; }
.prose p { color: var(--ink-soft); }
.prose ul, .prose ol { color: var(--ink-soft); margin: 0 0 1rem 1.4rem; }
.prose li { margin-bottom: 6px; }
.contact-form { max-width: 620px; margin: 26px auto 0; background: var(--snow); border: var(--border); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-family: var(--font-head); font-weight: 600; margin-bottom: 8px; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; padding: 13px 16px; font-size: 1rem; font-family: var(--font-body);
  border: 2.5px solid var(--ink); border-radius: 14px; background: var(--cream);
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-field input:focus, .form-field textarea:focus { outline: 3px solid var(--gold); outline-offset: 1px; background: var(--snow); }

/* ---------- Footer note / misc ---------- */
.skip-link { position: absolute; left: -9999px; }
.empty-state { text-align: center; padding: 50px 20px; color: var(--ink-soft); display: none; }
.empty-state.show { display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .tool-layout { grid-template-columns: 170px minmax(0, 1fr); }
  .tool-panel.palette-panel { grid-column: 1 / -1; }
  .tool-panel.palette-panel .palette-grid { max-width: 480px; margin: 0 auto; }
  .tool-panel.palette-panel .palette-group-grid { grid-template-columns: repeat(8, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; padding: 48px 22px 42px; gap: 36px; }
  .hero-art { max-width: 440px; margin: 0 auto; width: 100%; }
  .band-inner { grid-template-columns: 1fr; text-align: center; }
  .band p { margin: 0 auto; }
  .band .band-art { justify-content: center; }
  .bundle-hero { grid-template-columns: 1fr; gap: 36px; }
  .hamburger { display: block; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--cream); border-bottom: var(--border);
    flex-direction: column; align-items: stretch; padding: 14px 22px 22px; gap: 4px;
    box-shadow: 0 10px 24px rgba(46, 31, 20, 0.12);
  }
  .site-header.nav-open .main-nav { display: flex; }
  .site-header { position: sticky; }
  .header-inner { position: relative; padding: 10px 22px; }
  .dropdown-menu { position: static; box-shadow: none; margin-top: 6px; }
  .mini-affiliate { flex-direction: column; text-align: center; }
}
@media (max-width: 820px) {
  .action-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-width: 520px;
    margin: 22px auto 10px;
    width: 100%;
  }
  .action-row .btn {
    width: 100%;
    justify-content: center;
    padding: 12px 14px;
    font-size: 0.98rem;
    white-space: normal;
    text-align: center;
  }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding: 42px 0; }
  .flourish {
    font-size: 1.15rem;
    letter-spacing: 6px;
    margin: 6px auto 20px;
  }
  .flourish::before, .flourish::after {
    flex: 0 1 44px;
    min-width: 10px;
    margin: 0 8px;
  }
  .btn {
    padding: 12px 20px;
    font-size: 1rem;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
  }
  .hero-cta-row {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }
  .hero-cta-row .btn {
    width: 100%;
    justify-content: center;
    padding: 13px 20px;
    font-size: 1rem;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
  }
  .hero-art img {
    transform: none;
    border-radius: 20px;
  }
  .hero-art .sticker {
    right: 8px;
    top: -12px;
    transform: rotate(4deg);
    font-size: 0.88rem;
    padding: 8px 14px;
  }
  .email-card {
    transform: none;
    max-width: 100%;
    padding: 20px 18px;
  }
  .email-form {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }
  .email-form .btn {
    width: 100%;
    justify-content: center;
  }
  .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
    gap: 18px;
  }
  .print-area {
    padding: 14px;
    border-width: 3px;
    border-radius: 20px;
  }
  .print-area .badge {
    top: 20px;
    left: 20px;
  }
  .band .mini-palette {
    transform: none;
    padding: 12px;
    gap: 8px;
    grid-template-columns: repeat(4, 38px);
  }
  .band .mini-palette span {
    width: 38px;
    height: 38px;
  }
  .idea-card:nth-child(odd), .idea-card:nth-child(even) { transform: none; }
  .testimonial, .testimonial:nth-child(2n) { transform: none; }
  .supply-grid, .idea-grid, .steps, .testimonials { gap: 18px; }
  .tool-layout { grid-template-columns: minmax(0, 1fr); }
  .picker-list {
    flex-direction: row;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }
  .picker-item { min-width: 84px; flex-shrink: 0; }
  .tool-canvas-wrap {
    padding: 12px;
    border-width: 3px;
    border-radius: 20px;
  }
  .tool-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
  }
  .tool-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 11px 12px;
    font-size: 0.92rem;
    white-space: normal;
    text-align: center;
  }
  .tool-actions .btn:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  .book-mockup { padding: 10px 0; }
  .book {
    width: min(280px, 100%);
    height: 370px;
    transform: none;
    box-shadow: 8px 8px 0 rgba(46,31,20,0.2);
    padding: 22px;
  }
  .modal-backdrop { padding: 14px; }
  .modal {
    padding: 28px 18px 22px;
    border-radius: 22px;
    border-width: 3px;
    transform: none;
    max-height: 92vh;
    overflow-y: auto;
  }
  .modal .gift-row { flex-wrap: wrap; gap: 6px; }
  .prev-next a { width: 100%; justify-content: center; white-space: normal; text-align: center; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .header-inner { padding: 10px 16px; }
  .logo-img { height: 42px; }
  .section { padding: 36px 0; }
  .action-row { grid-template-columns: 1fr; gap: 10px; }
  .cards-grid { grid-template-columns: 1fr; gap: 16px; }
  .search-wrap input { padding: 13px 18px 13px 44px; font-size: 0.98rem; }
  .search-wrap svg { left: 14px; width: 18px; height: 18px; }
  .tool-panel.palette-panel .palette-group-grid { gap: 6px; }
  .flourish {
    font-size: 1.05rem;
    letter-spacing: 5px;
  }
  .flourish::before, .flourish::after {
    flex: 0 1 30px;
    min-width: 10px;
    margin: 0 6px;
  }
}
@media (max-width: 360px) {
  .tool-actions {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .tool-actions .btn {
    padding: 9px 8px;
    font-size: 0.84rem;
    gap: 6px;
  }
  .tool-actions .btn svg {
    width: 16px;
    height: 16px;
  }
  .flourish {
    font-size: 0.95rem;
    letter-spacing: 3px;
  }
  .flourish::before, .flourish::after {
    flex: 0 1 20px;
    min-width: 8px;
    margin: 0 4px;
  }
}

/* ---------- Print: artwork only ---------- */
/* Print overlay: hidden on screen, holds the exact A4 sheet for printing. */
#branded-print { display: none; }

@media print {
  /* Branded print pipeline: #branded-print holds the exact composed A4
     sheet (same pixels as the PNG/PDF). The body.print-sheet-ready gate
     ensures a failed render never yields a blank print — without it the
     page prints normally. */
  @page { size: A4; margin: 0; }
  body.print-sheet-ready > *:not(#branded-print) { display: none !important; }
  body.print-sheet-ready #branded-print { display: block !important; }
  #branded-print img { display: block; width: 100%; height: auto; }
}
