/* Weihnachtslöten 2026 – Aufbauanleitung
   Reines CSS, keine externen Ressourcen (keine Webfonts, kein CDN). */

:root {
  --bg: #f7f3ea;
  --paper: #fffdf8;
  --ink: #1d1d1f;
  --muted: #5d5a54;
  --line: #e3dccd;
  --gold: #c99a2e;
  --gold-soft: #f4e4b8;
  --night: #15171b;
  --red: #c8302f;
  --red-soft: #fbe3e1;
  --green: #2e7d4f;
  --green-soft: #e1f2e6;
  --blue-soft: #e4eef8;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111317;
    --paper: #191c21;
    --ink: #ece9e2;
    --muted: #a7a297;
    --line: #2d3138;
    --gold: #e0b44a;
    --gold-soft: #3a3120;
    --red: #ff6b63;
    --red-soft: #3b1f1e;
    --green: #6fcf97;
    --green-soft: #1b3326;
    --blue-soft: #1d2a38;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--font);
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.2; }
h2 { font-size: 1.7rem; margin: 0 0 .6rem; }
h3 { font-size: 1.2rem; margin: 1.6rem 0 .5rem; }
code, kbd { font-family: var(--mono); font-size: .9em; }
kbd { background: var(--gold-soft); border-radius: 5px; padding: .05em .4em; }

/* ---------- Header ---------- */
.hero { background: var(--night); color: #f3efe6; }
.hero-comic {
  margin: 0 auto;
  max-width: 1200px;
  aspect-ratio: 3 / 1;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 30%, rgba(224,180,74,.25), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(200,48,47,.25), transparent 45%),
    #1c1f25;
  display: flex; align-items: center; justify-content: center;
}
.hero-comic img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.hero-comic .placeholder {
  color: rgba(243,239,230,.55); font-size: .95rem; text-align: center; padding: 1rem;
  border: 2px dashed rgba(243,239,230,.25); border-radius: var(--radius); margin: 1.5rem;
}
.hero-text { max-width: 1000px; margin: 0 auto; padding: 1.8rem 1.25rem 2.2rem; }
.hero-text .kicker { color: var(--gold); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; margin: 0; }
.hero-text h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: .3rem 0 .6rem; }
.hero-text p.lead { font-size: 1.15rem; color: #d9d4c8; max-width: 46rem; margin: 0 0 1.2rem; }
.facts { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; list-style: none; }
.facts li { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 999px; padding: .3rem .85rem; font-size: .92rem; }

/* ---------- Navigation ---------- */
nav.toc {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
nav.toc ul { list-style: none; margin: 0 auto; padding: .55rem 1rem; max-width: 1000px; display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; }
nav.toc ul::-webkit-scrollbar { display: none; }
nav.toc a { display: block; white-space: nowrap; text-decoration: none; color: var(--ink); font-size: .9rem; padding: .3rem .75rem; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); }
nav.toc a:hover { border-color: var(--gold); }

/* ---------- Layout ---------- */
main { max-width: 1000px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
section.chapter {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.6rem 1.4rem; margin: 1.4rem 0; scroll-margin-top: 4rem;
}
.chapter-num { color: var(--gold); font-weight: 800; font-size: .9rem; letter-spacing: .06em; text-transform: uppercase; }
.intro { color: var(--muted); margin-top: 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

figure { margin: 1rem 0; }
figure img { border-radius: 10px; border: 1px solid var(--line); background: #222; }
figcaption { color: var(--muted); font-size: .9rem; margin-top: .4rem; }

/* ---------- Callouts ---------- */
.callout { border-radius: 12px; padding: .9rem 1.1rem; margin: 1rem 0; border-left: 5px solid; }
.callout p { margin: .3rem 0; }
.callout strong:first-child { display: block; margin-bottom: .2rem; }
.callout.warn { background: var(--red-soft); border-color: var(--red); }
.callout.tip  { background: var(--green-soft); border-color: var(--green); }
.callout.info { background: var(--blue-soft); border-color: #4a90d9; }
.callout.gold { background: var(--gold-soft); border-color: var(--gold); }

.safety { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; margin: 1rem 0; padding: 0; list-style: none; }
.safety li { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1rem; }
.safety .ico { font-size: 1.6rem; display: block; margin-bottom: .2rem; }
.safety b { display: block; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 1rem 0; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg); font-weight: 700; white-space: nowrap; }
td.dir { font-weight: 700; color: var(--red); }

/* ---------- Steps ---------- */
ol.steps { list-style: none; counter-reset: step; padding: 0; margin: 1rem 0; }
ol.steps > li {
  counter-increment: step; position: relative;
  padding: 1rem 1rem 1rem 4rem; margin: .8rem 0;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg);
}
ol.steps > li::before {
  content: attr(data-step); position: absolute; left: 1rem; top: 1rem;
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  background: var(--badge, var(--gold)); color: #111; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
ol.steps > li h4 { margin: 0 0 .3rem; font-size: 1.05rem; }
ol.steps > li p { margin: .3rem 0; }
ol.steps > li .detail { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; margin-top: .6rem; }
ol.steps > li .detail img { max-width: 240px; border-radius: 8px; border: 1px solid var(--line); }
ol.steps > li.done { opacity: .55; }
ol.steps > li.done h4 { text-decoration: line-through; }
.check { position: absolute; right: .9rem; top: .9rem; font-size: .85rem; color: var(--muted); display: flex; gap: .3rem; align-items: center; cursor: pointer; user-select: none; }
.check input { width: 1.1rem; height: 1.1rem; accent-color: var(--green); }
@media (max-width: 560px) {
  ol.steps > li { padding: 3.4rem 1rem 1rem 1rem; }
  ol.steps > li::before { top: .8rem; }
  .check { top: 1.1rem; }
  ol.steps > li .detail img { max-width: 100%; }
}

.rules { counter-reset: r; list-style: none; padding: 0; }
.rules li { counter-increment: r; padding-left: 2.6rem; position: relative; margin: .7rem 0; }
.rules li::before { content: counter(r); position: absolute; left: 0; top: 0; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--night); color: var(--gold); font-weight: 800; display: flex; align-items: center; justify-content: center; }

.effects { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; list-style: none; }
.effects li { background: var(--gold-soft); border-radius: 999px; padding: .2rem .7rem; font-size: .92rem; }

.extras { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .8rem; }
.extras article { border: 1px solid var(--line); border-radius: 12px; padding: 1rem; background: var(--bg); }
.extras h4 { margin: 0 0 .3rem; }
.extras .tag { display: inline-block; font-size: .78rem; font-weight: 700; background: var(--night); color: var(--gold); border-radius: 6px; padding: .05rem .45rem; margin-right: .3rem; }

footer { text-align: center; color: var(--muted); font-size: .9rem; padding: 2rem 1rem 3rem; }
footer .heart { color: var(--red); }

.progress { font-size: .9rem; color: var(--muted); }
.btn-reset { font: inherit; font-size: .85rem; background: none; border: 1px solid var(--line); border-radius: 999px; padding: .2rem .7rem; color: var(--muted); cursor: pointer; }

/* ---------- Druck ---------- */
@media print {
  nav.toc, .check, .btn-reset, .hero-comic { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .hero { background: #fff; color: #000; }
  .hero-text p.lead { color: #333; }
  .facts li { border-color: #999; background: #fff; }
  section.chapter { box-shadow: none; border: none; padding: 0; break-inside: auto; }
  ol.steps > li, figure, .callout, table { break-inside: avoid; }
  a { color: #000; }
}
