/* Eine Seite, mehrere Räume: gleiche Typo und Kanten, je ein Akzent und Leitmotiv. */

body.page-wichtel {
  --accent: var(--fir);
  --accent-deep: var(--fir-deep);
  --room-paper: #E8D4A0;
  background-color: #E8D4A0;
  background-image:
    repeating-linear-gradient(90deg, transparent, transparent 47px, rgba(58, 36, 18, 0.045) 47px, rgba(58, 36, 18, 0.045) 49px),
    radial-gradient(ellipse 70% 45% at 0% 0%, rgba(44, 74, 52, 0.16), transparent 55%);
}
body.page-shop {
  --accent: #8A6A24;
  --accent-deep: #5C4718;
  --room-paper: #F3E6C4;
  background-color: #F3E6C4;
  background-image:
    radial-gradient(circle at 8px 8px, rgba(198, 160, 74, 0.2) 1.15px, transparent 1.4px),
    radial-gradient(ellipse 80% 40% at 100% 0%, rgba(198, 160, 74, 0.16), transparent 50%);
  background-size: 22px 22px, auto;
}
body.page-paket {
  --accent: #8A6A24;
  --accent-deep: #5C4718;
}
body.page-set {
  --accent: var(--red);
  --accent-deep: var(--red-dark);
  --room-paper: #E9D5B0;
  background-color: #E9D5B0;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(142, 106, 60, 0.22) 1.1px, transparent 1.5px),
    radial-gradient(circle at 72% 64%, rgba(142, 106, 60, 0.16) 1.2px, transparent 1.7px),
    radial-gradient(ellipse 50% 40% at 100% 0%, rgba(139, 46, 40, 0.08), transparent 55%);
  background-size: 16px 16px, 22px 20px, auto;
}
body.page-gratis {
  --accent: #5C3A28;
  --accent-deep: #3A2418;
  --room-paper: #F4EBD4;
  background-color: #F4EBD4;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 27px, rgba(28, 24, 20, 0.045) 28px),
    radial-gradient(ellipse 45% 40% at 100% 0%, rgba(139, 46, 40, 0.07), transparent 55%);
}
body.page-werkzeuge {
  --accent: #3A4A38;
  --accent-deep: #1C1814;
  --room-paper: #E8D6A8;
  background-color: #E8D6A8;
  background-image:
    linear-gradient(90deg, rgba(58, 36, 18, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(58, 36, 18, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
}
body.page-journal {
  --accent: var(--red-dark);
  --accent-deep: #4A1614;
  --room-paper: var(--paper);
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse 60% 40% at 0% 0%, rgba(139, 46, 40, 0.06), transparent 50%);
}

body.page-paper .site-header,
body.page-tool .site-header {
  border-bottom: 0;
}
.header-accent {
  display: block;
  height: 3px;
  background: var(--accent, var(--fir));
  width: 100%;
}
html.shop-open body.page-home .header-accent { background: var(--fir); }
body.page-home:not(.x) .header-accent { background: var(--ochre); }

body.page-paper .nav a.is-current,
body.page-tool .nav a.is-current,
html.shop-open body.page-home .nav a.is-current {
  color: var(--accent, var(--red));
  box-shadow: inset 0 -3px 0 var(--accent, var(--red));
}

.room-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.6rem 2rem;
  align-items: center;
  margin: 0 0 2rem;
  padding: 1.4rem 0 1.8rem;
  border-bottom: 3px solid var(--accent, var(--fir));
}
.room-hero-copy .crumb { margin-top: 0; }
.room-hero-copy h1 { margin: 0 0 0.6rem; }
.room-hero-copy .lede { margin: 0; max-width: 36rem; }
.room-hero-art { min-width: 0; }
.room-hero-art .room-art {
  width: 100%;
  height: auto;
  display: block;
  background: transparent;
}
body.page-journal .room-hero {
  grid-template-columns: 1fr;
  text-align: left;
  border-bottom-width: 2px;
}
body.page-journal .room-hero-art { max-width: 28rem; }

@media (max-width: 860px) {
  .room-hero {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding-top: 0.6rem;
  }
  .room-hero-art { order: -1; }
  .room-hero-art .room-art { max-height: 10.5rem; object-fit: cover; }
}

/* Karten und Kästen nehmen den Raum-Akzent, gleiche Kantensprache */
body.page-wichtel .wichtel-card,
body.page-wichtel .quiz,
body.page-wichtel .cta-box,
body.page-wichtel .faq details,
body.page-wichtel .story-list li {
  box-shadow: 0 0 0 3px var(--accent);
  background: #F6EBD0;
}
body.page-shop .shop-card,
body.page-shop .cta-box,
body.page-paket .paket-art,
body.page-paket .cta-box {
  box-shadow: 0 0 0 3px var(--accent);
}
body.page-set .kit-card,
body.page-set .kit-namebar,
body.page-set .cta-box {
  box-shadow: 0 0 0 3px var(--accent);
  background: #F6EBD0;
}
body.page-set .kit-card { position: relative; }
body.page-set .kit-card::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 1px 0 1px rgba(28, 24, 20, 0.25);
  z-index: 1;
}
body.page-gratis .editor-tools,
body.page-gratis .cta-box,
body.page-gratis .letter-editor {
  /* tools stay paper */
}
body.page-gratis .editor-tools,
body.page-gratis .cta-box {
  box-shadow: 0 0 0 3px var(--accent);
  background: #FBF6E8;
}
body.page-werkzeuge .tool-tile,
body.page-werkzeuge .editor-tools,
body.page-werkzeuge .cta-box,
body.page-werkzeuge .tool-form {
  box-shadow: 0 0 0 3px var(--accent);
  background: #F6EBD0;
  background-image: none;
}
body.page-werkzeuge .tool-tile .icon { background: transparent; }
body.page-journal .journal-print {
  margin: 0 auto 1.8rem;
  max-width: 52rem;
  padding: 0.7rem;
  background: #F6EBD0;
  box-shadow: 0 0 0 3px var(--accent);
}
body.page-journal .journal-print img,
body.page-journal .journal-print picture img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
}

.wichtel-cast { align-items: stretch; gap: 1.1rem; }
.wichtel-card { padding: 1.1rem 0.9rem 1.2rem; display: flex; flex-direction: column; align-items: center; }
.wichtel-card .wichtel-figure {
  width: 150px;
  height: 250px;
  margin: 0 auto 0.65rem;
  overflow: visible;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.wichtel-card .wichtel-figure img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
  object-position: bottom center;
}
.wichtel-card h3 { margin-top: 0.15rem; position: relative; z-index: 1; }
@media (max-width: 860px) {
  .wichtel-cast { grid-template-columns: 1fr; }
  .wichtel-card .wichtel-figure { width: 130px; height: 220px; }
}

/* Briefbogen: Rahmenillustration, Figur, Siegel. Druck bleibt hell. */
.letter-sheet {
  --letter-ink: #1C1814;
  position: relative;
  overflow: hidden;
  background: #FBF6E8;
  color: var(--letter-ink);
  border-radius: 2px;
  min-height: 32rem;
  padding: 2.3rem 1.9rem 6.2rem;
  box-shadow: var(--shadow);
  outline: none;
}
.letter-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.letter-art .letter-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.letter-wichtel {
  position: absolute;
  left: 1.15rem;
  bottom: 1.15rem;
  width: 5.6rem;
  line-height: 0;
}
.letter-wichtel svg { width: 100%; height: auto; display: block; }
.letter-seal-wrap {
  position: absolute;
  right: 1.5rem;
  bottom: 1.4rem;
  width: 4.2rem;
  line-height: 0;
}
.letter-seal-wrap svg { width: 100%; height: auto; display: block; }
.letter-sheet > *:not(.letter-art):not(.preview-mark):not(.letter-foot) { position: relative; z-index: 1; }
.letter-kicker {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 0.45rem;
}
.letter-sheet > h2 {
  text-align: center;
  margin: 0 0 1rem;
  font-size: 2rem;
}
.letter-foot { text-align: center; margin: 1.4rem 0 0; font-size: 0.85rem; }

@media print {
  .letter-sheet, .wish-sheet {
    background: #FBF6E8 !important;
    box-shadow: none !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    padding-bottom: 6rem;
  }
  .letter-art { display: block !important; }
  .sticky-cta, .header-accent { display: none !important; }
}

body.print-set .letter-sheet { background: #FBF6E8; }

.letter-corner {
  position: absolute;
  width: 3.6rem;
  height: 3.6rem;
  line-height: 0;
  z-index: 1;
}
.letter-corner svg { width: 100%; height: 100%; display: block; }
.letter-corner-tl { top: 0.85rem; left: 0.85rem; }
.letter-corner-tr { top: 0.85rem; right: 0.85rem; }
.letter-corner-bl { bottom: 0.85rem; left: 0.85rem; }
.letter-corner-br { bottom: 0.85rem; right: 0.85rem; }
.letter-star-wrap {
  position: absolute;
  top: 0.85rem;
  left: 50%;
  width: 1.7rem;
  margin-left: -0.85rem;
  line-height: 0;
  z-index: 1;
}
.letter-star-wrap svg { width: 100%; height: auto; display: block; }
.letter-sheet { padding-top: 2.8rem; }

.letter-sheet { padding-bottom: 8.2rem; }
.letter-body { padding-bottom: 0.4rem; }
.letter-sign { margin-bottom: 0.4rem; }
.letter-sheet > .letter-foot {
  position: absolute;
  left: 6.4rem;
  right: 6.4rem;
  bottom: 5.4rem;
  margin: 0;
  text-align: center;
  z-index: 1;
}

/* Text bleibt innerhalb der Goldlinie (Prozent, weil der Rahmen mit der Blattbreite skaliert). */
.letter-sheet {
  padding: 9% 12% 24% 12%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.letter-sheet > h2,
.letter-kicker,
.letter-body,
.letter-sign {
  max-width: 100%;
}
.letter-sign {
  margin-top: 1.2rem;
  margin-right: 4.5rem;
  margin-bottom: 0;
}
.letter-sheet > .letter-foot {
  left: 14%;
  right: 14%;
  bottom: 16%;
}
@media print {
  .letter-sheet, .wish-sheet {
    padding: 9% 12% 22% 12% !important;
    overflow-wrap: anywhere;
  }
}

/* E3 Brief: Text 8 mm innerhalb der Goldlinie, Figur rechts, genau 1 A4-Seite beim Druck. */
.letter-wichtel {
  position: absolute;
  right: 8%;
  left: auto;
  bottom: 7%;
  width: 28%;
  max-width: 9.5rem;
  z-index: 1;
  line-height: 0;
}
.letter-wichtel img { width: 100%; height: auto; display: block; }
.letter-seal-wrap { left: 8%; right: auto; bottom: 7%; }
.letter-sign { margin-right: 32%; color: #8B2E28; }
.letter-sheet {
  padding: 12% 13% 26% 13%;
  background: #F0DEBD;
  overflow-wrap: anywhere;
  word-break: break-word;
}
@media print {
  @page { size: A4; margin: 0; }
  html, body { background: #F0DEBD !important; }
  body * { visibility: hidden; }
  .letter-sheet, .letter-sheet * { visibility: visible; }
  header, footer, .no-print, .sticky-cta, .buy-sticky, .editor-tools,
  .chip-row, .letter-editor > :not(.letter-sheet), nav, .share-row,
  .preview-cta, .privacy-note, .snow-canvas, .skip { display: none !important; }
  .letter-sheet {
    position: absolute !important;
    left: 0; top: 0;
    width: 210mm; height: 297mm;
    max-width: 210mm;
    margin: 0 !important;
    padding: 32mm 31mm 30mm 31mm !important;
    box-shadow: none !important;
    overflow: hidden !important;
    background: #F0DEBD !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    page-break-after: avoid;
    page-break-inside: avoid;
  }
  .letter-wichtel { width: 50mm; right: 22mm; bottom: 20mm; }
  .letter-seal-wrap { left: 24mm; bottom: 22mm; }
}
