/* Warcry Einstieg: eigenständiges Stylesheet ("Ruinen und Runen").
   Bronze, Pergament, Blutrot. Ohne fremde Schriften, ohne /killteam/killteam.css.
   Die Variablen --bg, --bg2, --panel, --panel2, --ink, --muted, --line, --accent
   nutzt auch /regeln/regelchat.js. --accent ist eine Füllfarbe (dunkle Schrift darauf). */

:root {
  color-scheme: dark;
  --bg: #14110d;
  --bg2: #1b1712;
  --panel: #231d16;
  --panel2: #2d251c;
  --line: #4d3f2d;
  --ink: #f0e6d2;
  --muted: #c2b39b;
  --accent: #c8913f;        /* Bronze als Fläche */
  --accent-2: #e8cb8f;      /* Bronze als Schrift */
  --on-accent: #1b1208;
  --blood: #a8322a;
  --blood-ink: #f08a76;
  --ally: #5b9bd5;
  --ok: #8cc277;
  --crit: #ecc77a;
  --miss: #8d867a;
  --heavy: #6b6258;
  --g2: #8cc277;
  --g3: #6aa8e0;
  --g4: #d197e6;
  --wild: #e98a68;
  --stone-a: rgba(255, 236, 200, 0.025);
  --stone-b: rgba(0, 0, 0, 0.18);
  --shadow: 0 14px 30px -18px rgba(0, 0, 0, 0.8);
  --radius: 10px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", P052, Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-family: var(--sans);
  font-size: 17px;
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f2e8d3;
    --bg2: #e9dcc0;
    --panel: #fbf5e8;
    --panel2: #f0e4c9;
    --line: #c9b48c;
    --ink: #2b2117;
    --muted: #5d4b36;
    --accent: #c08a3e;
    --accent-2: #7a4810;
    --blood: #a8322a;
    --blood-ink: #9a2a20;
    --ally: #2f6fb0;
    --ok: #3d7629;
    --crit: #865500;
    --miss: #6f675c;
    --heavy: #a69a88;
    --g2: #3d7629;
    --g3: #23609c;
    --g4: #87389f;
    --wild: #ad4526;
    --stone-a: rgba(255, 255, 255, 0.35);
    --stone-b: rgba(120, 90, 40, 0.06);
    --shadow: 0 12px 26px -18px rgba(70, 45, 10, 0.5);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; color: var(--ink); line-height: 1.58; overflow-x: hidden;
  background:
    radial-gradient(1100px 480px at 85% -8%, rgba(200, 145, 63, 0.16), transparent 60%),
    radial-gradient(800px 420px at -12% 12%, rgba(168, 50, 42, 0.12), transparent 60%),
    radial-gradient(circle, var(--stone-a) 0 1px, transparent 1.5px) 0 0 / 9px 9px,
    radial-gradient(circle, var(--stone-b) 0 1.5px, transparent 2px) 4px 6px / 13px 13px,
    var(--bg);
}
a { color: var(--accent-2); text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 0.5em; font-weight: 700; }
h2 { font-size: clamp(1.55rem, 3.6vw, 2.15rem); display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; letter-spacing: 0.01em; }
h3 { font-size: 1.16rem; letter-spacing: 0.01em; }
p { margin: 0 0 0.8em; }
.wrap { width: min(1080px, 100%); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 99; background: var(--panel); color: var(--ink); padding: 8px 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.small { font-size: 0.9rem; color: var(--muted); }
.muted { color: var(--muted); }
.fine { font-size: 0.84rem; color: var(--muted); }
svg.ico { width: 1.15em; height: 1.15em; vertical-align: -0.2em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Kopfzeile ---------- */
.top { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg2) 94%, transparent), color-mix(in srgb, var(--bg) 90%, transparent));
  backdrop-filter: blur(10px); }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent) 20%, var(--blood) 50%, var(--accent) 80%, transparent); opacity: 0.6; }
.top-in { display: flex; align-items: center; gap: 14px; height: 58px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); white-space: nowrap; font-family: var(--serif); font-weight: 700; font-size: 1.08rem; min-height: 44px; }
.brand svg { width: 28px; height: 28px; color: var(--accent); }
.brand em { font-style: normal; color: var(--accent-2); font-variant: small-caps; letter-spacing: 0.06em; }
.toc-btn { display: none; }
.toc { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; mask-image: linear-gradient(90deg, #000 88%, transparent); padding-right: 28px; }
.toc::-webkit-scrollbar { display: none; }
.toc a { color: var(--muted); text-decoration: none; padding: 8px 10px; border-radius: 6px; font-size: 0.9rem; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }
.toc a b { font-family: var(--serif); color: var(--accent-2); font-size: 0.82rem; }
.toc a:hover, .toc a.on, .toc a[aria-current="true"] { color: var(--ink); background: var(--panel2); box-shadow: inset 0 -2px 0 var(--accent); }

/* ---------- Hero ---------- */
.hero { padding: 54px 0 30px; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 34px; align-items: start; }
.kicker { font-family: var(--serif); font-variant: small-caps; letter-spacing: 0.12em; font-size: 0.98rem; color: var(--accent-2); font-weight: 700; margin-bottom: 6px; }
.hero h1 { font-size: clamp(2.7rem, 7vw, 4.6rem); letter-spacing: 0.01em; line-height: 1.02; }
.hero h1 span { display: block; font-size: 0.52em; color: var(--accent-2); font-style: italic; font-weight: 600; margin-top: 8px; }
.lead { font-size: 1.08rem; color: var(--ink); max-width: 36em; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #7a5520; cursor: pointer; font: inherit; font-weight: 800; text-decoration: none; min-height: 44px;
  background: linear-gradient(180deg, #ddb069, var(--accent) 55%, #a8742c); color: var(--on-accent); padding: 10px 20px; border-radius: 6px;
  box-shadow: 0 3px 0 #6b4512, inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #6b4512; }
.btn:disabled { filter: grayscale(0.8); opacity: 0.6; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { border-color: var(--accent); }

.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.facts li { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: 8px 8px 22px 22px / 8px 8px 14px 14px; padding: 12px 14px 14px; box-shadow: var(--shadow); }
.facts b { display: block; font-family: var(--serif); font-size: 1.75rem; color: var(--accent-2); line-height: 1.1; }
.facts span { color: var(--muted); font-size: 0.9rem; }

/* Einsteigerpfad */
.path { margin: 30px 0 0; padding: 18px 20px; border: 1px solid var(--accent); border-radius: var(--radius); position: relative;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--panel)), var(--panel)); box-shadow: var(--shadow); }
.path h2 { font-size: 1.3rem; margin-bottom: 4px; }
.path p { margin: 0 0 10px; }
.path-steps { list-style: none; margin: 10px 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 6px; align-items: center; }
.path-steps li { display: flex; align-items: center; gap: 6px; }
.path-steps li + li::before { content: ""; width: 14px; height: 2px; background: var(--accent); opacity: 0.8; }
.path-steps a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 700; }
.path-steps a:hover { border-color: var(--accent); }
.path-steps .num { font-size: 0.9rem; }

/* ---------- Abschnitte ---------- */
.sec { padding: 64px 16px 8px; position: relative; }
.sec + .sec::before { content: ""; position: absolute; top: 18px; left: 50%; width: min(360px, 80%); height: 24px; transform: translateX(-50%); opacity: 0.75;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 360 24'%3E%3Cg fill='none' stroke='%23b98436' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M10 12h138M212 12h138'/%3E%3Cpath d='M166 3l28 18M194 3l-28 18'/%3E%3Cpath d='M162 6l6-4M198 6l-6-4M163 20l4 3M197 20l-4 3'/%3E%3Ccircle cx='180' cy='12' r='3' fill='%23b98436'/%3E%3Cpath d='M148 12l5-3v6zM212 12l-5-3v6z' fill='%23b98436'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat; }
.sec > p { max-width: 72ch; }
.num { display: inline-grid; place-items: center; width: 1.75em; height: 1.95em; flex: none; font-family: var(--serif); font-size: 0.8em; font-weight: 700; color: var(--on-accent);
  clip-path: polygon(50% 0, 100% 24%, 100% 76%, 50% 100%, 0 76%, 0 24%);
  background: radial-gradient(circle at 35% 30%, #f0cf8e, var(--accent) 55%, #8a5d22); box-shadow: inset 0 0 0 2px rgba(60, 35, 5, 0.5); }
.lvl { font-family: var(--sans); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; border: 1px solid; line-height: 1.2; }
.lvl.first { color: var(--accent-2); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.lvl.deep { color: var(--muted); border-color: var(--line); }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 18px 0; align-items: start; }
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 18px 0; align-items: start; }
.tile, .panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.tile p, .panel p { margin: 0; }
.tile .ic { width: 46px; height: 46px; color: var(--accent-2); margin-bottom: 8px; }
.tile h3, .panel h3 { color: var(--ink); }
.small-tiles .tile p { font-size: 0.94rem; }
.note { background: var(--bg2); border-left: 3px solid var(--accent); padding: 12px 16px; border-radius: 0 8px 8px 0; color: var(--ink); }
.callout { background: color-mix(in srgb, var(--blood) 13%, var(--panel)); border: 1px solid color-mix(in srgb, var(--blood) 55%, transparent); border-radius: var(--radius); padding: 14px 18px; margin: 18px 0; }
.callout.tip { background: color-mix(in srgb, var(--ok) 11%, var(--panel)); border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.callout p { margin: 0; }
.sub { margin-top: 30px; }
.steps { margin: 0; padding-left: 1.2em; }
.steps li { margin-bottom: 8px; }

.steps-num { counter-reset: s; list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 8px; }
.steps-num li { counter-increment: s; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 12px 54px; position: relative; }
.steps-num li::before { content: counter(s); position: absolute; left: 14px; top: 10px; width: 28px; height: 31px; display: grid; place-items: center; font-family: var(--serif); font-weight: 700; color: var(--on-accent);
  clip-path: polygon(50% 0, 100% 24%, 100% 76%, 50% 100%, 0 76%, 0 24%); background: radial-gradient(circle at 35% 30%, #f0cf8e, var(--accent) 55%, #8a5d22); }
.bg-icons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.bg { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg2); font-size: 0.9rem; }
.bg svg { width: 22px; height: 22px; color: var(--accent-2); }

.merke { position: relative; margin: 28px 0 8px; padding: 22px 18px 14px; border: 1px solid var(--accent); border-radius: var(--radius);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 10%, var(--panel)), var(--panel)); }
.merke::before { content: "Merke"; position: absolute; top: -0.85em; left: 14px; padding: 2px 14px; font-family: var(--serif); font-variant: small-caps; letter-spacing: 0.1em; font-weight: 700; font-size: 0.95rem;
  background: linear-gradient(180deg, #ddb069, var(--accent)); color: var(--on-accent); border-radius: 3px; clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 50%, calc(100% - 6px) 100%, 6px 100%, 0 50%); }
.merke > :last-child { margin-bottom: 0; }
.merke p { max-width: none; }

/* ---------- Abbildungen ---------- */
.figure { margin: 22px 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.figure svg { display: block; width: 100%; height: auto; }
.figure figcaption { color: var(--muted); font-size: 0.92rem; margin-top: 10px; }
.figure p { max-width: none; }
.deploy .board, .climb .board, .cover .board { fill: var(--bg2); }
.zone circle { stroke-width: 2.5; }
.zone.r circle { fill: color-mix(in srgb, var(--blood) 24%, transparent); stroke: var(--blood); }
.zone.b circle { fill: color-mix(in srgb, var(--ally) 22%, transparent); stroke: var(--ally); }
.zone circle.res { stroke-dasharray: 6 5; fill-opacity: 0.45; }
.dep-ic { color: var(--ink); }
.dep-lab text { fill: var(--ink); font-size: 14px; font-weight: 800; text-anchor: middle; font-family: var(--sans); }
.dep-lab .rnd { fill: var(--accent-2); font-size: 12px; }
.dep-r3 path { stroke: var(--ink); stroke-width: 1.6; fill: none; }
.dep-r3 text { fill: var(--ink); font-size: 13px; font-weight: 700; }
.floor { stroke: var(--muted); stroke-width: 3; }
.tower { fill: var(--heavy); stroke: color-mix(in srgb, var(--ink) 45%, var(--heavy)); stroke-width: 2; }
.plat { stroke: var(--accent); stroke-width: 5; }
.path-l { fill: none; stroke: var(--accent-2); stroke-width: 3; stroke-dasharray: 8 6; }
.arrowhead { fill: var(--accent-2); }
.me { fill: var(--ally); stroke: #fff; stroke-width: 2; }
.foe { fill: var(--blood); stroke: #fff; stroke-width: 2; }
.me.ghost { fill-opacity: 0.35; stroke-dasharray: 4 3; }
.cl-lab text { fill: var(--ink); font-size: 16px; font-weight: 800; text-anchor: middle; paint-order: stroke; stroke: var(--bg2); stroke-width: 4px; }
.cl-lab .sm { font-size: 13px; font-weight: 600; fill: var(--muted); }
.cl-lab .warn { fill: var(--blood-ink); }
.cv-h { fill: var(--accent-2); font-size: 16px; font-weight: 800; text-anchor: middle; font-family: var(--serif); }
.cv-t { fill: var(--muted); font-size: 13px; text-anchor: middle; }
.los { stroke: var(--accent-2); stroke-width: 3; stroke-dasharray: 8 6; }
.dim { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 3 3; }

/* Schlachtplan-Karten */
.plan { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.plan-card { background: linear-gradient(170deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 4px 4px var(--radius) var(--radius); padding: 16px; box-shadow: var(--shadow); }
.plan-card h3 { margin-top: 8px; }
.plan-card h3 small { display: block; font-family: var(--sans); font-size: 0.74rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 3px; }
.plan-card p { margin: 0; font-size: 0.93rem; }
.pc-n { display: inline-grid; place-items: center; width: 30px; height: 33px; font-family: var(--serif); font-weight: 700; color: var(--on-accent);
  clip-path: polygon(50% 0, 100% 24%, 100% 76%, 50% 100%, 0 76%, 0 24%); background: radial-gradient(circle at 35% 30%, #f0cf8e, var(--accent) 55%, #8a5d22); }

/* Pipeline */
.pipeline { list-style: none; padding: 0; margin: 18px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.pipeline li { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; gap: 12px; box-shadow: var(--shadow); }
.pipeline li > span { flex: none; width: 30px; height: 33px; display: grid; place-items: center; font-family: var(--serif); font-weight: 700; color: var(--on-accent);
  clip-path: polygon(50% 0, 100% 24%, 100% 76%, 50% 100%, 0 76%, 0 24%); background: radial-gradient(circle at 35% 30%, #f0cf8e, var(--accent) 55%, #8a5d22); }
.pipeline p { margin: 4px 0 0; font-size: 0.93rem; color: var(--muted); }

/* ---------- Initiative-Ablaufschema ---------- */
.ini-flow { list-style: none; margin: 22px 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; counter-reset: f; }
.ini-flow > li { position: relative; counter-increment: f; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 12px 14px; margin-right: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.ini-flow > li:last-child { margin-right: 0; }
.ini-flow > li::after { content: ""; position: absolute; top: 50%; right: -20px; width: 18px; height: 22px; transform: translateY(-50%);
  background: var(--accent); clip-path: polygon(0 30%, 55% 30%, 55% 0, 100% 50%, 55% 100%, 55% 70%, 0 70%); }
.ini-flow > li:last-child::after { display: none; }
.ini-flow > li.key { border-color: var(--accent); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 14%, var(--panel)), var(--panel)); }
.ini-flow > li.seize { border-color: color-mix(in srgb, var(--blood) 70%, var(--line)); }
.ini-flow .fl-n { font-family: var(--serif); font-variant: small-caps; letter-spacing: 0.08em; color: var(--accent-2); font-size: 0.88rem; font-weight: 700; }
.ini-flow .fl-n::before { content: counter(f) ". "; }
.ini-flow h4 { margin: 0; font-family: var(--serif); font-size: 1.06rem; line-height: 1.2; }
.ini-flow p { margin: 0; font-size: 0.88rem; color: var(--muted); }
.ini-flow p b { color: var(--ink); }
.ini-flow .fl-v { min-height: 30px; display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.ini-flow .fl-v .d { --ds: 22px; }
.fl-opts { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 3px; font-size: 0.84rem; }
.fl-opts li { padding: 2px 8px; border-radius: 4px; background: var(--bg2); border: 1px solid var(--line); }

/* ---------- Würfel mit Augen ---------- */
.dice { display: flex; flex-wrap: wrap; gap: 8px 6px; margin: 8px 0; align-items: flex-start; }
.d { --ds: 42px; --pip: calc(var(--ds) * 0.095); width: var(--ds); height: var(--ds); flex: none; border-radius: calc(var(--ds) * 0.22); display: inline-grid; place-items: center; font-style: normal; font-weight: 900;
  font-size: calc(var(--ds) * 0.45); line-height: 1; border: 2px solid; position: relative; transition: transform 0.2s, opacity 0.2s; vertical-align: middle;
  background-color: var(--panel2); border-color: var(--miss); color: var(--ink); }
.d[data-v] { font-size: 0; background-repeat: no-repeat; }
.d[data-v="1"] { background-image: radial-gradient(circle at 50% 50%, currentColor var(--pip), transparent calc(var(--pip) + 0.6px)); }
.d[data-v="2"] { background-image: radial-gradient(circle at 27% 27%, currentColor var(--pip), transparent calc(var(--pip) + 0.6px)), radial-gradient(circle at 73% 73%, currentColor var(--pip), transparent calc(var(--pip) + 0.6px)); }
.d[data-v="3"] { background-image: radial-gradient(circle at 27% 27%, currentColor var(--pip), transparent calc(var(--pip) + 0.6px)), radial-gradient(circle at 50% 50%, currentColor var(--pip), transparent calc(var(--pip) + 0.6px)), radial-gradient(circle at 73% 73%, currentColor var(--pip), transparent calc(var(--pip) + 0.6px)); }
.d[data-v="4"] { background-image: radial-gradient(circle at 27% 27%, currentColor var(--pip), transparent calc(var(--pip) + 0.6px)), radial-gradient(circle at 73% 27%, currentColor var(--pip), transparent calc(var(--pip) + 0.6px)), radial-gradient(circle at 27% 73%, currentColor var(--pip), transparent calc(var(--pip) + 0.6px)), radial-gradient(circle at 73% 73%, currentColor var(--pip), transparent calc(var(--pip) + 0.6px)); }
.d[data-v="5"] { background-image: radial-gradient(circle at 27% 27%, currentColor var(--pip), transparent calc(var(--pip) + 0.6px)), radial-gradient(circle at 73% 27%, currentColor var(--pip), transparent calc(var(--pip) + 0.6px)), radial-gradient(circle at 50% 50%, currentColor var(--pip), transparent calc(var(--pip) + 0.6px)), radial-gradient(circle at 27% 73%, currentColor var(--pip), transparent calc(var(--pip) + 0.6px)), radial-gradient(circle at 73% 73%, currentColor var(--pip), transparent calc(var(--pip) + 0.6px)); }
.d[data-v="6"] { background-image: radial-gradient(circle at 27% 25%, currentColor var(--pip), transparent calc(var(--pip) + 0.6px)), radial-gradient(circle at 27% 50%, currentColor var(--pip), transparent calc(var(--pip) + 0.6px)), radial-gradient(circle at 27% 75%, currentColor var(--pip), transparent calc(var(--pip) + 0.6px)), radial-gradient(circle at 73% 25%, currentColor var(--pip), transparent calc(var(--pip) + 0.6px)), radial-gradient(circle at 73% 50%, currentColor var(--pip), transparent calc(var(--pip) + 0.6px)), radial-gradient(circle at 73% 75%, currentColor var(--pip), transparent calc(var(--pip) + 0.6px)); }
.d.single { border-color: var(--ink); color: var(--ink); background-color: var(--panel); }
.d.g2 { background-color: color-mix(in srgb, var(--g2) 16%, var(--panel)); border-color: var(--g2); color: var(--g2); }
.d.g3 { background-color: color-mix(in srgb, var(--g3) 18%, var(--panel)); border-color: var(--g3); color: var(--g3); border-width: 3px; border-style: double; }
.d.g4 { background-color: color-mix(in srgb, var(--g4) 18%, var(--panel)); border-color: var(--g4); color: var(--g4); border-width: 3px; box-shadow: 0 0 0 2px color-mix(in srgb, var(--g4) 35%, transparent); }
.d.wild { background-color: color-mix(in srgb, var(--wild) 16%, var(--panel)); border-color: var(--wild); color: var(--wild); border-style: dashed; }
.d.wild:not([data-v]) { font-family: var(--serif); }
.d.used { opacity: 0.45; }
.d.ok { background-color: color-mix(in srgb, var(--ok) 16%, var(--panel)); border-color: var(--ok); color: var(--ok); }
.d.crit { background-color: color-mix(in srgb, var(--crit) 22%, var(--panel)); border-color: var(--crit); color: var(--crit); border-width: 3px; box-shadow: 0 0 12px color-mix(in srgb, var(--crit) 45%, transparent); }
.d.miss { background-color: transparent; border-color: var(--miss); color: var(--miss); }
.d.sm { --ds: 24px; border-width: 1.5px; border-radius: 5px; }
.d.rolling { animation: roll 0.45s ease; }
@keyframes roll { 0% { transform: rotate(-200deg) scale(0.4); opacity: 0; } 100% { transform: none; opacity: 1; } }
p .dice, .note .dice { display: inline-flex; vertical-align: middle; gap: 4px; margin: 0 2px; }
/* Würfelgruppen: bleiben zusammen */
.grp { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; white-space: nowrap; }
.grp-d { display: inline-flex; flex-wrap: nowrap; gap: 4px; padding: 3px; border-radius: 8px; }
.grp.g2 .grp-d, .grp.g3 .grp-d, .grp.g4 .grp-d { border-bottom: 2px solid; }
.grp.g2 .grp-d { border-color: var(--g2); }
.grp.g3 .grp-d { border-color: var(--g3); }
.grp.g4 .grp-d { border-color: var(--g4); }
.grp-l { font-size: 0.72rem; font-weight: 700; color: var(--muted); letter-spacing: 0.02em; }
.dex-h { font-weight: 800; margin: 0; font-family: var(--serif); font-size: 1.05rem; }
.legend-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 12px 0 0; }
.legend-row span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Simulatoren ---------- */
.sim { background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--accent); border-radius: var(--radius); padding: 18px; margin: 24px 0; box-shadow: var(--shadow), inset 0 0 0 4px color-mix(in srgb, var(--accent) 10%, transparent); }
.sim-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.sim-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.sim-head h3 svg { width: 26px; height: 26px; color: var(--accent-2); }
.ini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 14px 0; }
.ini-side { background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; min-width: 0; }
.ini-side.lead { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.ini-side.lead .dex-h::after { content: " · Initiative"; color: var(--accent-2); font-size: 0.85rem; font-family: var(--sans); }
.ini-sum { margin: 4px 0 0; }
.ini-wild { margin: 8px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chips button { font: inherit; font-size: 0.92rem; cursor: pointer; background: var(--bg2); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; min-height: 44px; }
.chips button:hover { border-color: var(--accent); color: var(--accent-2); }
.ini-res { font-weight: 700; margin: 10px 0 0; min-height: 1.5em; }
.ini-again { margin-top: 10px; }
.atk-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 14px 0; }
.atk-form label { display: grid; gap: 4px; font-size: 0.9rem; color: var(--muted); }
.atk-form input[type="number"] { font: inherit; font-size: 1.05rem; color: var(--ink); background: var(--bg2); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; width: 100%; min-height: 44px; }
.atk-form input[aria-invalid="true"] { border-color: var(--blood-ink); box-shadow: 0 0 0 1px var(--blood-ink) inset; }
.atk-form .chk { display: flex; align-items: center; gap: 10px; color: var(--ink); grid-column: 1 / -1; min-height: 44px; cursor: pointer; }
.atk-form .chk input { width: 22px; height: 22px; accent-color: var(--accent); }
.atk-info { margin: 0; color: var(--muted); font-size: 0.93rem; }
.atk-info.err { color: var(--blood-ink); font-weight: 700; }
.atk-out { font-weight: 700; margin: 6px 0 0; }
.atk-out b { color: var(--accent-2); font-size: 1.2rem; }

/* Stärke gegen Zähigkeit */
.st-rule { list-style: none; margin: 18px 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.st-rule li { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 6px; box-shadow: var(--shadow); }
.st-rule .st-k { font-size: 0.9rem; color: var(--muted); }
.st-rule .st-v { font-family: var(--serif); font-size: 1.9rem; font-weight: 700; color: var(--accent-2); line-height: 1; }
.st-rule .st-v small { font-family: var(--sans); font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.st-rule .dice { margin: 0; gap: 3px; flex-wrap: nowrap; }
.st-rule .d { --ds: 22px; border-width: 1.5px; border-radius: 5px; }
.st-rule li.crit { border-color: var(--crit); }

/* ---------- Kämpferkarte (Pergament in beiden Modi) ---------- */
.card-demo { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; margin: 18px 0; align-items: start; }
.datacard { --pc-ink: #2b2117; --pc-muted: #5d4b36; --pc-line: #b89c6a;
  background: radial-gradient(ellipse at 30% 20%, #fbf3df, #ecdcb8 70%, #dfc999); color: var(--pc-ink);
  border: 2px solid #8a6a36; border-radius: 6px; overflow: hidden; box-shadow: 0 18px 40px -20px #000, inset 0 0 0 4px #f6ebd2, inset 0 0 0 5px #b89c6a; }
.dc-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: linear-gradient(90deg, #6e1f19, #3a120f); color: #f6e6c6; border-bottom: 3px solid #b98436; }
.dc-name { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 1.3rem; font-variant: small-caps; letter-spacing: 0.06em; }
.dc-sub { margin: 0; font-size: 0.82rem; color: #ead3a6; }
.dc-skull { width: 38px; height: 38px; color: #e4b866; }
.dc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 16px 14px 10px; }
.stat { font: inherit; cursor: pointer; color: var(--pc-ink); padding: 8px 4px 14px; display: grid; gap: 2px; text-align: center; min-height: 64px;
  background: linear-gradient(180deg, #fffaf0, #efe0bf); border: 2px solid #8a6a36; border-radius: 8px 8px 50% 50% / 8px 8px 34% 34%; }
.stat span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--pc-muted); font-weight: 700; }
.stat b { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; }
.stat:hover, .stat.on { border-color: #a8322a; background: linear-gradient(180deg, #fff, #f5e4c4); box-shadow: 0 0 0 2px #a8322a; }
.dc-weap { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.dc-weap th, .dc-weap td { padding: 7px 6px; text-align: center; border-top: 1px solid var(--pc-line); }
.dc-weap th:first-child, .dc-weap td:first-child { text-align: left; padding-left: 16px; white-space: nowrap; font-weight: 700; }
.dc-weap td { font-family: var(--serif); font-size: 1.08rem; font-weight: 700; }
.dc-weap td:first-child { font-family: var(--sans); font-size: 0.95rem; }
.dc-weap td.dmg { color: #8a241c; font-size: 1.15rem; }
.th { min-height: 44px; min-width: 44px; font: inherit; font-size: 0.85rem; font-weight: 800; cursor: pointer; background: none; color: var(--pc-muted); border: 1px solid transparent; border-radius: 6px; padding: 2px 6px; letter-spacing: 0.04em; }
.th:hover, .th.on { border-color: #a8322a; color: #8a241c; background: rgba(168, 50, 42, 0.08); }
.dc-runes { margin: 0; padding: 8px 12px 14px; border-top: 1px solid var(--pc-line); }
.th.rune { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--pc-ink); }
.seal { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #c4473c, #7d1d17); color: #f6e6c6; box-shadow: inset 0 0 0 2px #e4b866; }
.seal svg { width: 18px; height: 18px; }
.explain { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); padding: 18px; min-height: 140px; position: sticky; top: 76px; box-shadow: var(--shadow); }
.ex-k { font-weight: 700; color: var(--accent-2); font-size: 1.15rem; margin-bottom: 6px; font-family: var(--serif); }
.ex-t { margin: 0; }

/* ---------- Aktionen ---------- */
.actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 12px 0; }
.act { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 6px; align-content: start; box-shadow: var(--shadow); }
.act-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.act-h b { font-family: var(--serif); font-size: 1.12rem; }
.act-h small { color: var(--muted); font-weight: 600; }
.act p { margin: 0; font-size: 0.93rem; }

/* ---------- Tabellen ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 0.94rem; margin: 12px 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tbl th, .tbl td { text-align: left; padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.tbl thead th { border-top: 0; color: var(--accent-2); font-family: var(--serif); font-variant: small-caps; letter-spacing: 0.06em; font-size: 0.98rem; background: var(--bg2); }
.tbl tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--panel2) 45%, transparent); }
.tbl-wrap { overflow-x: auto; margin: 12px 0; -webkit-overflow-scrolling: touch; position: relative; }
.tbl-wrap > .tbl { margin: 0; }
.swipe-hint { display: none; font-size: 0.82rem; color: var(--muted); margin: 4px 0 0; }
.tbl-wrap.scrolls + .swipe-hint { display: block; }

/* ---------- Häufige Fehler / aufklappbar ---------- */
.faq { display: grid; gap: 8px; margin: 14px 0; }
.faq details, .faq-more, .faq-glossar { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.faq-more, .faq-glossar { margin: 18px 0; }
.faq summary, .faq-more > summary, .faq-glossar > summary { cursor: pointer; padding: 12px 16px; min-height: 48px; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.faq summary { font-weight: 800; }
.faq summary::-webkit-details-marker, .faq-more > summary::-webkit-details-marker, .faq-glossar > summary::-webkit-details-marker { display: none; }
.faq summary::after, .faq-more > summary::after, .faq-glossar > summary::after { content: "+"; color: var(--accent-2); font-size: 1.4rem; line-height: 1; flex: none; font-family: var(--serif); }
.faq details[open] summary::after, .faq-more[open] > summary::after, .faq-glossar[open] > summary::after { content: "–"; }
.faq details p { margin: 0; padding: 0 16px 14px; }
.faq-more > .cols-3 { margin: 0; padding: 0 16px 16px; }
.faq-glossar > .tbl-wrap { margin: 0 12px 12px; }
.links li { margin-bottom: 6px; }

/* ---------- Kriegerbanden ---------- */
.alliances { display: grid; gap: 12px; margin: 18px 0; }
.ally { --al: var(--accent); border-left: 4px solid var(--al); overflow: hidden; }
.ally[data-al="order"] { --al: #d4a640; --al-bg: #2a5c9a; }
.ally[data-al="chaos"] { --al: #c0392b; --al-bg: #5e1612; }
.ally[data-al="death"] { --al: #8fb5a8; --al-bg: #2f4640; }
.ally[data-al="destruction"] { --al: #7fae3f; --al-bg: #3b5420; }
.ally > summary { gap: 14px; justify-content: flex-start; padding: 10px 16px 10px 10px; background: linear-gradient(90deg, color-mix(in srgb, var(--al) 16%, transparent), transparent 70%); }
.ally > summary::after { margin-left: auto; }
.al-ic { flex: none; width: 46px; height: 52px; display: grid; place-items: center; color: #f6e6c6;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--al-bg) 60%, #fff), var(--al-bg)); border-radius: 6px 6px 50% 50% / 6px 6px 36% 36%; box-shadow: inset 0 0 0 2px var(--al); }
.al-ic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.al-t { display: grid; line-height: 1.2; }
.al-t b { font-family: var(--serif); font-size: 1.25rem; }
.al-t span { color: var(--muted); font-size: 0.9rem; }
.al-n { font-family: var(--serif); font-weight: 700; font-size: 0.9rem; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--al); color: var(--ink); white-space: nowrap; }
ul.wb { list-style: none; margin: 0; padding: 4px 14px 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
ul.wb li { margin: 0; background: var(--bg2); border: 1px solid var(--line); border-top: 2px solid color-mix(in srgb, var(--al) 70%, var(--line)); border-radius: 6px; padding: 10px 12px; }
ul.wb li a { display: block; font-family: var(--serif); font-weight: 700; font-size: 1.04rem; margin-bottom: 3px; text-decoration: none; color: var(--ink); }
ul.wb li a::after { content: " ↗"; color: var(--accent-2); font-size: 0.85em; }
ul.wb li a:hover { color: var(--accent-2); text-decoration: underline; }
ul.wb li span { font-size: 0.9rem; color: var(--muted); }

/* ---------- Fuß, Nach-oben ---------- */
.foot { margin-top: 56px; border-top: 1px solid var(--line); padding: 20px 0 32px; color: var(--muted); }
.foot-in { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.foot a { color: var(--muted); }
.to-top { position: fixed; left: 16px; bottom: 16px; z-index: 40; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 48px; height: 48px; padding: 0 14px;
  border-radius: 999px; background: var(--panel2); color: var(--ink); border: 1px solid var(--accent); text-decoration: none; font-weight: 700; font-size: 0.9rem; box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.6);
  transition: opacity 0.2s, transform 0.2s; }
.to-top[hidden] { display: none; }
.to-top svg { width: 20px; height: 20px; }
.to-top span { display: none; }
.to-top { padding: 0; width: 48px; }

/* Fokus */
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--accent-2); outline-offset: 2px; border-radius: 6px; }

/* ---------- Breakpoints ---------- */
@media (max-width: 980px) {
  .ini-flow { grid-template-columns: 1fr; gap: 18px; }
  .ini-flow > li { margin-right: 0; }
  .ini-flow > li::after { top: auto; bottom: -17px; right: auto; left: 28px; transform: rotate(90deg); width: 16px; height: 18px; }
  .st-rule { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .toc-btn { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; min-height: 44px; padding: 8px 14px; font: inherit; font-weight: 700; cursor: pointer;
    background: var(--panel2); color: var(--ink); border: 1px solid var(--accent); border-radius: 6px; }
  .toc-btn svg { width: 18px; height: 18px; transition: transform 0.2s; }
  .toc-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
  .toc { display: none; position: absolute; left: 0; right: 0; top: 100%; mask-image: none; padding: 10px 16px 16px; max-height: calc(100dvh - 70px); overflow-y: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; background: var(--bg2); border-bottom: 2px solid var(--accent); box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.6); }
  .toc.open { display: grid; }
  .toc a { white-space: normal; min-height: 44px; font-size: 0.95rem; color: var(--ink); background: var(--panel); border: 1px solid var(--line); }
  .toc a:first-child { grid-column: 1 / -1; }
  .hero-grid, .card-demo { grid-template-columns: 1fr; }
  .cols-3 { grid-template-columns: 1fr; }
  .plan { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .explain { position: static; }
}
@media (max-width: 600px) {
  .hero { padding-top: 34px; }
  .cols-2, .plan, .ini-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
  .facts { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .facts li { padding: 10px 10px 12px; }
  .facts b { font-size: 1.35rem; }
  .facts span { font-size: 0.8rem; display: block; line-height: 1.3; }
  .path { padding: 16px 14px; }
  .path-steps li + li::before { width: 6px; }
  .sec { padding-top: 58px; }
  .sim { padding: 14px; }
  .sim-head .btn { width: 100%; }
  .d { --ds: 34px; }
  .d.sm { --ds: 24px; }
  .st-rule .d, .ini-flow .fl-v .d { --ds: 20px; }
  .st-rule .st-v { font-size: 1.6rem; }
  .explain { min-height: 0; }
  .dc-weap { font-size: 0.85rem; }
  .dc-weap th, .dc-weap td { padding: 6px 2px; }
  .dc-weap th:first-child, .dc-weap td:first-child { padding-left: 10px; }
  .th { min-width: 40px; padding: 2px 3px; }
  .stat b { font-size: 1.35rem; }
  .merke { padding-inline: 14px; }
  .r-lab text { font-size: 22px; }
  /* Tabellen als Karten */
  .tbl.cards, .tbl.cards tbody, .tbl.cards tr, .tbl.cards td { display: block; width: 100%; }
  .tbl.cards { border: 0; background: none; }
  .tbl.cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tbl.cards tr { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; padding: 8px 12px; }
  .tbl.cards tbody tr:nth-child(even) td { background: none; }
  .tbl.cards td { border: 0; padding: 3px 0; }
  .tbl.cards td[data-l]::before { content: attr(data-l); display: block; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; }
  .tbl.cards td.c-head { font-family: var(--serif); font-weight: 700; font-size: 1.08rem; color: var(--accent-2); }
  .tbl.cards td.c-head::before { display: none; }
  .tbl.cards tr { display: flex; flex-direction: column; gap: 2px; }
  .tbl.cards td.c-head { order: -1; }
  ul.wb { grid-template-columns: 1fr; padding-inline: 10px; }
  .al-ic { width: 40px; height: 46px; }
  .al-t b { font-size: 1.12rem; }
  .al-n { font-size: 0.8rem; padding: 2px 8px; }
  main, .foot { padding-bottom: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .d.rolling { animation: none; }
}

/* ---------- Druck ---------- */
@media print {
  :root { color-scheme: light; --bg: #fff; --bg2: #f3efe6; --panel: #fff; --panel2: #f3efe6; --line: #bbb; --ink: #111; --muted: #444; --accent-2: #6b4410; --shadow: none; }
  html { font-size: 11pt; scroll-behavior: auto; }
  body { background: #fff !important; color: #111; }
  .top, .toc, .toc-btn, .hero-cta, .skip, .btn, .sim, .to-top, .path { display: none !important; }
  .wrap, .sec { width: 100%; max-width: none; }
  .sec { padding-top: 20px; }
  .sec + .sec::before { display: none; }
  a { color: #000; }
  .tile, .panel, .act, .figure, .datacard, .pipeline li, .steps-num li, .merke, .callout, .faq details, .tbl tr, .plan-card, .ini-flow > li, .st-rule li { break-inside: avoid; }
  h2, h3 { break-after: avoid; }
  .explain { position: static; }
  .d, .num, .pc-n, .steps-num li::before, .pipeline li > span, .merke::before, svg, .datacard, .dc-head, .seal { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tbl-wrap { overflow: visible; }
}
