/* Standard-Design: D "Blaupause" (ohne Auswahl). Umschaltbar per Link (#d-a … #d-e), ohne JavaScript und ohne Speicherung. :root hält die Basiswerte (= B "Dämmerung"). */
:root {
  color-scheme: dark;
  --bg: #14112b; --fg: #f1eefc; --akzent: #ff9a76; --karte: #1f1a3f; --rand: #332c5e;
  --hintergrund: radial-gradient(60rem 30rem at 15% -10%, #3a2a75 0%, transparent 60%), radial-gradient(50rem 28rem at 100% 0%, #5a2a5e 0%, transparent 55%);
  --radius: 1.25rem; --rand-breite: 1px; --rand-stil: solid;
  --schatten: none; --schatten-hover: 0 18px 40px -18px rgba(255, 154, 118, .45);
  --hover: translateY(-4px);
  --font: system-ui, sans-serif; --font-titel: system-ui, sans-serif;
  --h1-gewicht: 800; --h1-spacing: -.02em; --h1-bg: transparent; --h1-rand: 0 solid transparent; --h1-schatten: none; --h1-pad: 0;
  --marker: transparent; --marker-pad: 0; --marker-text: var(--akzent);
  --bild-linie: 0 solid transparent;
}
html:has(#d-a:target) {
  color-scheme: light;
  --bg: #f5efe4; --fg: #231f1a; --akzent: #b8452d; --karte: #fffdf8; --rand: #e2d8c6;
  --hintergrund: none;
  --radius: .5rem;
  --schatten: 0 1px 2px rgba(60, 40, 10, .08), 0 8px 20px -12px rgba(60, 40, 10, .25);
  --schatten-hover: 0 2px 4px rgba(60, 40, 10, .1), 0 16px 28px -12px rgba(60, 40, 10, .35);
  --hover: translateY(-3px);
  --font-titel: Georgia, "Times New Roman", serif;
  --h1-gewicht: 700; --h1-spacing: -.01em;
}
html:has(#d-c:target) {
  color-scheme: light;
  --bg: #fffbe8; --fg: #111; --akzent: #111; --karte: #fff; --rand: #111;
  --hintergrund: none;
  --radius: .25rem; --rand-breite: 3px;
  --schatten: 6px 6px 0 #111; --schatten-hover: 9px 9px 0 #111;
  --hover: translate(-3px, -3px);
  --font-titel: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --h1-gewicht: 900; --h1-spacing: 0; --h1-bg: #ffd23f; --h1-rand: 3px solid #111; --h1-schatten: 6px 6px 0 #111; --h1-pad: .15em .4em;
  --marker: #ffd23f; --marker-pad: 0 .25em; --marker-text: #111;
  --bild-linie: 3px solid #111;
}
html:is(:not(:has(.dt:target)), :has(#d-d:target)) {
  color-scheme: dark;
  --bg: #0b3a73; --fg: #eaf3ff; --akzent: #ffe27a; --karte: #0e4a8f; --rand: rgba(234, 243, 255, .6);
  --hintergrund: linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
  --radius: .15rem; --rand-breite: 2px; --rand-stil: dashed;
  --schatten: none; --schatten-hover: 0 0 0 4px rgba(255, 226, 122, .25);
  --hover: translateY(-2px);
  --font-titel: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --h1-gewicht: 700; --h1-spacing: .02em;
}
html:has(#d-e:target) {
  color-scheme: light;
  --bg: #fff1f0; --fg: #3b2340; --akzent: #c42a68; --karte: #fff; --rand: #f6cfe0;
  --hintergrund: radial-gradient(50rem 26rem at 0% 0%, #ffe0cf 0%, transparent 60%), radial-gradient(50rem 28rem at 100% 10%, #e6d6ff 0%, transparent 60%);
  --radius: 2rem;
  --schatten: 0 10px 30px -14px rgba(196, 42, 104, .35); --schatten-hover: 0 20px 36px -14px rgba(196, 42, 104, .5);
  --hover: translateY(-5px);
  --font: ui-rounded, system-ui, sans-serif; --font-titel: ui-rounded, system-ui, sans-serif;
  --h1-gewicht: 800; --h1-spacing: -.02em;
}
* { box-sizing: border-box; }
body { position: relative; margin: 0; min-height: 100vh; background-color: var(--bg); background-image: var(--hintergrund); background-size: auto; color: var(--fg); font: 1rem/1.6 var(--font); }
html:is(:not(:has(.dt:target)), :has(#d-d:target)) body { background-size: 40px 40px; }
.dt { position: absolute; top: 0; left: 0; width: 1px; height: 1px; }
.text { max-width: 42rem; margin: 0 auto; padding: 2rem 1rem; }
h1, h2, h3 { line-height: 1.15; font-family: var(--font-titel); }
h1 { margin: 0; display: inline-block; font-size: clamp(2rem, 6vw, 3.2rem); font-weight: var(--h1-gewicht); letter-spacing: var(--h1-spacing); background: var(--h1-bg); border: var(--h1-rand); box-shadow: var(--h1-schatten); padding: var(--h1-pad); }
a { color: var(--akzent); text-underline-offset: 3px; }
a:focus-visible { outline: 3px solid var(--akzent); outline-offset: 3px; }
.fuss { max-width: 42rem; margin: 0 auto; padding: 1rem; font-size: .875rem; opacity: .8; }
.start { max-width: 68rem; margin: 0 auto; padding: 3rem 1rem 2rem; }
.kopf p { margin: .75rem 0 0; opacity: .8; font-size: 1.1rem; }
/* Design-Knopf oben rechts: <details> als Menü, ohne JavaScript */
.designs { position: absolute; top: 1rem; right: 1rem; z-index: 5; font-size: .9rem; }
.designs summary { display: inline-flex; align-items: center; gap: .55rem; padding: .45rem .9rem .45rem .55rem; cursor: pointer; list-style: none; user-select: none; color: var(--fg); background: var(--karte); border: 1px solid var(--rand); border-radius: 999px; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .45); font-weight: 600; transition: border-color .2s, transform .2s; }
.designs summary::-webkit-details-marker { display: none; }
.designs summary::before { content: ""; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: conic-gradient(#ff9a76, #f5efe4, #ffd23f, #0b3a73, #e6d6ff, #ff9a76); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35); }
.designs summary::after { content: ""; width: .45rem; height: .45rem; margin-left: .1rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
.designs details[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.designs summary:hover { border-color: var(--akzent); }
.designs summary:focus-visible { outline: 3px solid var(--akzent); outline-offset: 3px; }
.designs ul { position: absolute; right: 0; margin: .5rem 0 0; padding: .4rem; list-style: none; min-width: 13rem; background: var(--karte); border: 1px solid var(--rand); border-radius: 1rem; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .55); }
.designs a { display: flex; align-items: center; gap: .7rem; padding: .5rem .7rem; color: var(--fg); text-decoration: none; border-radius: .65rem; }
.designs a:hover { background: rgba(127, 127, 127, .18); }
.designs a::before { content: ""; flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 1px solid rgba(127, 127, 127, .45); }
.designs a[href="#d-a"]::before { background: linear-gradient(135deg, #f5efe4 50%, #b8452d 50%); }
.designs a[href="#d-b"]::before { background: linear-gradient(135deg, #14112b 50%, #ff9a76 50%); }
.designs a[href="#d-c"]::before { background: linear-gradient(135deg, #ffd23f 50%, #111 50%); }
.designs a[href="#d-d"]::before { background: linear-gradient(135deg, #0b3a73 50%, #ffe27a 50%); }
.designs a[href="#d-e"]::before { background: linear-gradient(135deg, #ffe0cf 50%, #c42a68 50%); }
html:has(#d-b:target) .designs a[href="#d-b"],
html:has(#d-a:target) .designs a[href="#d-a"],
html:has(#d-c:target) .designs a[href="#d-c"],
html:is(:not(:has(.dt:target)), :has(#d-d:target)) .designs a[href="#d-d"],
html:has(#d-e:target) .designs a[href="#d-e"] { font-weight: 700; background: rgba(127, 127, 127, .18); }
html:has(#d-b:target) .designs a[href="#d-b"]::after,
html:has(#d-a:target) .designs a[href="#d-a"]::after,
html:has(#d-c:target) .designs a[href="#d-c"]::after,
html:is(:not(:has(.dt:target)), :has(#d-d:target)) .designs a[href="#d-d"]::after,
html:has(#d-e:target) .designs a[href="#d-e"]::after { content: "✓"; margin-left: auto; color: var(--akzent); }
html:has(#d-c:target) .designs summary, html:has(#d-c:target) .designs ul { border: 3px solid #111; box-shadow: 4px 4px 0 #111; border-radius: .25rem; }
html:is(:not(:has(.dt:target)), :has(#d-d:target)) .designs summary, html:is(:not(:has(.dt:target)), :has(#d-d:target)) .designs ul { border: 2px dashed var(--rand); border-radius: .15rem; box-shadow: none; }
@media (max-width: 36rem) { .designs { top: .6rem; right: .6rem; } .start { padding-top: 4.5rem; } }
.kacheln { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.kachel { display: block; height: 100%; color: inherit; text-decoration: none; background: var(--karte); border: var(--rand-breite) var(--rand-stil) var(--rand); border-radius: var(--radius); overflow: hidden; box-shadow: var(--schatten); transition: transform .2s, border-color .2s, box-shadow .2s; }
.kachel:hover { transform: var(--hover); border-color: var(--akzent); box-shadow: var(--schatten-hover); }
.kachel:focus-visible { outline: 3px solid var(--akzent); outline-offset: 3px; }
.kachel img { display: block; width: 100%; height: auto; aspect-ratio: 40 / 21; object-fit: cover; border-bottom: var(--bild-linie); }
.kachel .text { display: block; padding: 1rem 1.2rem 1.3rem; }
.kachel .titel { display: block; font-family: var(--font-titel); font-weight: 700; }
.kachel .titel::after { content: " ↗"; color: var(--marker-text); background: var(--marker); padding: var(--marker-pad); }
.kachel .info { display: block; margin-top: .25rem; font-size: .92rem; opacity: .8; }
@media (prefers-reduced-motion: reduce) { .kachel { transition: none; } .kachel:hover { transform: none; } }
.start + .fuss { max-width: 68rem; }

/* Eigene Layouts je Design (nicht nur Farben) */
.kacheln { counter-reset: k; }
.kachel { position: relative; counter-increment: k; }

/* A Papier: Magazin-Liste, Bild links, Nummern, Linien */
html:has(#d-a:target) .kopf { text-align: center; padding-bottom: 1.5rem; border-bottom: 4px double var(--fg); }
html:has(#d-a:target) .kacheln { grid-template-columns: 1fr; gap: 0; max-width: 52rem; margin-left: auto; margin-right: auto; }
html:has(#d-a:target) .kachel { display: grid; grid-template-columns: 15rem 1fr; align-items: center; gap: 1.5rem; padding: 1.5rem 0; background: transparent; border: 0; border-bottom: 1px solid var(--rand); border-radius: 0; box-shadow: none; }
html:has(#d-a:target) .kachel:hover { transform: none; border-color: var(--akzent); background: rgba(184, 69, 45, .05); }
html:has(#d-a:target) .kachel img { border-radius: .25rem; border: 0; }
html:has(#d-a:target) .kachel .text { padding: 0; }
html:has(#d-a:target) .kachel .titel { font-size: 1.5rem; }
html:has(#d-a:target) .kachel .titel::before { content: "Nr. " counter(k) " · "; font-size: .85rem; font-weight: 400; color: var(--akzent); font-family: system-ui, sans-serif; }
@media (max-width: 40rem) { html:has(#d-a:target) .kachel { grid-template-columns: 1fr; gap: .75rem; } }

/* C Spielwiese: schiefe Aufkleber */
html:has(#d-c:target) h1 { transform: rotate(-2deg); }
html:has(#d-c:target) .kacheln { gap: 2.25rem; }
html:has(#d-c:target) .kacheln li:nth-child(odd) .kachel { transform: rotate(-1.5deg); }
html:has(#d-c:target) .kacheln li:nth-child(even) .kachel { transform: rotate(1.2deg); }
html:has(#d-c:target) .kacheln li .kachel:hover { transform: rotate(0) translate(-3px, -3px) scale(1.02); }
html:has(#d-c:target) .kachel::before { content: "#" counter(k); position: absolute; z-index: 1; top: .6rem; left: .6rem; padding: .1rem .5rem; background: #ffd23f; border: 3px solid #111; font: 800 .85rem ui-monospace, Menlo, Consolas, monospace; }
@media (prefers-reduced-motion: reduce) { html:has(#d-c:target) h1, html:has(#d-c:target) .kacheln li .kachel { transform: none; } }

/* D Blaupause: Zeichnung mit Abbildungsnummer und Großbuchstaben */
html:is(:not(:has(.dt:target)), :has(#d-d:target)) .kopf { padding-bottom: 1rem; border-bottom: 2px dashed var(--rand); }
html:is(:not(:has(.dt:target)), :has(#d-d:target)) h1 { text-transform: uppercase; }
html:is(:not(:has(.dt:target)), :has(#d-d:target)) .kopf p { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .95rem; }
html:is(:not(:has(.dt:target)), :has(#d-d:target)) .kachel { padding: .6rem; }
html:is(:not(:has(.dt:target)), :has(#d-d:target)) .kachel img { border: 2px solid var(--rand); }
html:is(:not(:has(.dt:target)), :has(#d-d:target)) .kachel::before { content: "ABB. " counter(k); position: absolute; z-index: 1; top: 1.1rem; left: 1.1rem; padding: .1rem .5rem; background: var(--bg); color: var(--akzent); font: 700 .75rem ui-monospace, Menlo, Consolas, monospace; letter-spacing: .08em; }
html:is(:not(:has(.dt:target)), :has(#d-d:target)) .kachel .text { padding: .8rem .4rem .4rem; }
html:is(:not(:has(.dt:target)), :has(#d-d:target)) .kachel .titel { text-transform: uppercase; letter-spacing: .06em; }

/* E Sorbet: mittig, Bild als Insel, runde Pfeil-Taste */
html:has(#d-e:target) .kopf { text-align: center; }
html:has(#d-e:target) .kachel { padding: .75rem; text-align: center; }
html:has(#d-e:target) .kachel img { border-radius: 1.4rem; }
html:has(#d-e:target) .kachel .text { padding: 1rem .5rem .6rem; }
html:has(#d-e:target) .kachel .titel { font-size: 1.15rem; }
html:has(#d-e:target) .kachel .titel::after { content: "↗"; display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; margin-left: .5rem; border-radius: 50%; background: var(--akzent); color: #fff; font-size: .95rem; }
