/* Ausmalhaus · un foglio, linee d'inchiostro, un colore per tema */
:root {
  --papier: #fffcf5;
  --weiss: #ffffff;
  --tinte: #22201c;
  --grau: #5f5a51;
  --linie: #e7dfcf;
  --zart: #f6f0e3;
  --gelb: #f2a93b;
  --akzent: #f2a93b;
  --rund: 18px;
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --titel: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", var(--schrift);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--papier); color: var(--tinte); font: 17px/1.6 var(--schrift); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--titel); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.4rem); }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); }
p { margin: 0 0 1em; }
.breit { width: min(1180px, 100% - 32px); margin-inline: auto; }
.abschnitt { margin-block: 56px; }
.springen { position: absolute; left: -999px; top: 8px; background: var(--tinte); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 10; }
.springen:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--akzent); outline-offset: 3px; border-radius: 6px; }

/* testata */
.kopf { border-bottom: 2px solid var(--tinte); background: var(--papier); position: sticky; top: 0; z-index: 5; }
.kopf-innen { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font: 800 1.35rem/1 var(--titel); flex: none; }
.logo-haus { width: 34px; height: 34px; }
.logo-klein { font-size: 1.15rem; }
.logo-klein .logo-haus { width: 28px; height: 28px; }
.themen-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-left: auto; }
.themen-nav::-webkit-scrollbar { display: none; }
.themen-nav a { text-decoration: none; font-weight: 600; font-size: .95rem; padding: 7px 14px; border-radius: 999px; border: 2px solid transparent; white-space: nowrap; }
.themen-nav a:hover { border-color: var(--akzent); }
.themen-nav a[aria-current] { background: var(--akzent); color: #fff; border-color: var(--tinte); }

/* il foglio: ogni disegno sta su un foglio bianco con bordo d'inchiostro */
.blatt { display: block; background: var(--weiss); border: 2px solid var(--tinte); border-radius: 12px; padding: 6%; overflow: hidden; }
.blatt img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; }

/* apertura */
.held { border-bottom: 2px solid var(--tinte); background:
  radial-gradient(circle at 78% 18%, #fde7c2 0 90px, transparent 91px),
  radial-gradient(circle at 96% 92%, #d9f0ea 0 120px, transparent 121px), var(--zart); overflow: hidden; }
.held-innen { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding-block: 56px 64px; }
.unterzeile { font-size: 1.2rem; color: var(--grau); max-width: 34ch; }
.held-fakten { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 20px 28px; }
.held-fakten span { border: 2px solid var(--tinte); background: var(--weiss); border-radius: 999px; padding: 4px 12px; font-weight: 600; font-size: .9rem; }
.faecher { position: relative; aspect-ratio: 16 / 11; }
.faecher .blatt { position: absolute; width: 52%; top: 50%; left: 50%; box-shadow: 6px 6px 0 var(--tinte); }
.faecher-0 { transform: translate(-105%, -50%) rotate(-9deg); }
.faecher-1 { transform: translate(-50%, -54%) rotate(1deg); z-index: 2; }
.faecher-2 { transform: translate(5%, -46%) rotate(9deg); }

/* bottoni */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 26px;
  background: var(--tinte); color: #fff; border: 2px solid var(--tinte); border-radius: 999px; font: 700 1.05rem/1 var(--titel);
  text-decoration: none; cursor: pointer; box-shadow: 4px 4px 0 var(--akzent); transition: transform .12s ease, box-shadow .12s ease; }
.knopf:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--akzent); }
.knopf:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--akzent); }
.knopf-zwei { background: var(--weiss); color: var(--tinte); }

/* temi */
.themen-raster { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 20px; }
.thema-karte a { display: block; text-decoration: none; }
.thema-karte .blatt { border-color: var(--tinte); box-shadow: 5px 5px 0 var(--akzent); transition: transform .15s ease, box-shadow .15s ease; }
.thema-karte a:hover .blatt { transform: translate(-3px, -3px) rotate(-1deg); box-shadow: 8px 8px 0 var(--akzent); }
.thema-name { display: block; margin-top: 14px; font: 800 1.25rem/1.2 var(--titel); }
.thema-zahl { color: var(--grau); font-size: .95rem; }

/* griglia dei disegni */
.raster { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; }
.raster-klein { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; }
.karte a { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.karte .blatt { transition: transform .15s ease, box-shadow .15s ease; }
.karte a:hover .blatt { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--akzent); }
.karte-text { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-top: 12px; }
.karte-thema { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--grau); }
.karte-titel { font-weight: 700; line-height: 1.3; }
.stufe { display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; border: 1.5px solid var(--tinte); }
.stufe-leicht { background: #dff2d8; }
.stufe-mittel { background: #fdecc8; }
.stufe-detail { background: #f3dcef; }

/* passi */
.schritte-liste { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.schritte-liste li { counter-increment: s; background: var(--weiss); border: 2px solid var(--tinte); border-radius: var(--rund); padding: 22px; display: flex; flex-direction: column; gap: 4px; }
.schritte-liste li::before { content: counter(s); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--gelb); border: 2px solid var(--tinte); font: 800 1.2rem/1 var(--titel); margin-bottom: 8px; }
.schritte-liste b { font: 800 1.2rem/1.2 var(--titel); }
.schritte-liste span { color: var(--grau); }

.lesetext { max-width: 72ch; }
.lesetext p, .lesetext li { color: #3b3731; }
.klein { font-size: .9rem; color: var(--grau); }

/* briciole */
.pfad ol { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: .9rem; color: var(--grau); }
.pfad li + li::before { content: "›"; margin-right: 4px; }
.pfad a { text-decoration: none; }
.pfad a:hover { text-decoration: underline; }

/* pagina del tema */
.themen-kopf { margin-top: 18px; max-width: 760px; margin-left: max(16px, (100% - 1180px) / 2); }
.themen-kopf h1 { text-decoration: underline; text-decoration-color: var(--akzent); text-decoration-thickness: 6px; text-underline-offset: 8px; }
.zahlen { font-weight: 600; color: var(--grau); }
.tipp { background: var(--weiss); border: 2px dashed var(--akzent); border-radius: var(--rund); padding: 20px 24px; max-width: 760px; }
.tipp h2 { font-size: 1.1rem; margin-bottom: .3em; }
.tipp p { margin: 0; }

/* pagina del disegno */
.bild-seite { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; align-items: start; margin-top: 24px; }
.bild-gross { margin: 0; position: sticky; top: 88px; }
.bild-gross .blatt { box-shadow: 8px 8px 0 var(--akzent); padding: 4%; }
.ueber { font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; color: var(--grau); margin-bottom: .4em; }
.merkmale { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.merkmale li { background: var(--weiss); border: 2px solid var(--linie); border-radius: 14px; padding: 8px 14px; display: flex; flex-direction: column; gap: 2px; }
.merkmale span { font-size: .78rem; color: var(--grau); }
.merkmale b { font-size: .98rem; }
.merkmale .stufe { font-size: .9rem; }
.knoepfe { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 28px; }
.bild-info .tipp { margin-block: 24px; }
.blaettern { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.blaettern a { text-decoration: none; border: 2px solid var(--tinte); border-radius: 14px; padding: 12px 14px; font-weight: 700; line-height: 1.3; background: var(--weiss); }
.blaettern a:last-child { text-align: right; }
.blaettern a:hover { box-shadow: 4px 4px 0 var(--akzent); }
.blaettern span { display: block; font-size: .8rem; font-weight: 600; color: var(--grau); margin-bottom: 2px; }
.mehr-link { margin-top: 20px; font-weight: 700; }

/* pagine di testo */
.text-seite { margin-block: 24px 64px; }
.text-seite h2 { font-size: 1.3rem; margin-top: 1.4em; }
.platzhalter { background: #ffe3e3; border: 2px solid #c22; padding: 10px 14px; border-radius: 10px; font-weight: 700; }

/* piede */
.fuss { border-top: 2px solid var(--tinte); background: var(--zart); margin-top: 72px; }
.fuss-innen { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-block: 40px; }
.fuss p { color: var(--grau); margin-top: 10px; max-width: 32ch; }
.fuss nav { display: flex; flex-direction: column; gap: 6px; }
.fuss h2 { font-size: 1rem; margin-bottom: 4px; }
.fuss nav a { text-decoration: none; color: var(--grau); }
.fuss nav a:hover { color: var(--tinte); text-decoration: underline; }

@media (max-width: 860px) {
  .held-innen { grid-template-columns: 1fr; padding-block: 36px 24px; gap: 8px; }
  .faecher { aspect-ratio: 2 / 1; margin-top: 12px; }
  .faecher .blatt { width: 31%; }
  .bild-seite { grid-template-columns: 1fr; gap: 28px; }
  .bild-gross { position: static; }
  .fuss-innen { grid-template-columns: 1fr 1fr; }
  .fuss-innen > div { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .kopf-innen { flex-wrap: wrap; gap: 0; min-height: 0; padding-top: 10px; }
  .themen-nav { margin-left: -16px; margin-right: -16px; padding: 8px 16px 10px; width: calc(100% + 32px);
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .raster { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .raster-klein, .themen-raster { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .knoepfe .knopf { flex: 1 1 100%; }
  .schritte-liste { grid-template-columns: 1fr; gap: 12px; }
  .schritte-liste li { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; padding: 16px; }
  .schritte-liste li::before { grid-row: span 2; margin: 0; }
  .abschnitt { margin-block: 40px; }
  .karte-titel { font-size: .95rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* stampa: solo il disegno, A4 intero */
@media print {
  @page { size: A4 portrait; margin: 8mm; }
  body { background: #fff; }
  .kopf, .fuss, .pfad, .springen, .bild-info, .abschnitt { display: none !important; }
  .bild-seite { display: block; margin: 0; width: auto; }
  .bild-gross { position: static; }
  .bild-gross .blatt { border: 0; box-shadow: none; padding: 0; }
  .bild-gross img { width: 100%; height: 270mm; object-fit: contain; }
  body:not(.seite-bild) main::before { content: "Bitte ein einzelnes Ausmalbild öffnen und dort drucken."; }
}

/* 30 temi: la barra mostra i più cercati e «Alle Themen» */
.themen-nav .nav-alle { border-color: var(--tinte); background: var(--weiss); }
.themen-nav .nav-alle[aria-current] { background: var(--tinte); color: #fff; }
.stufe-erwachsene { background: #dfe3f7; }
