/* ==========================================================================
   Stile der Website
   --------------------------------------------------------------------------
   Der aktive Stil steht als data-style am <html>-Element (siehe assets/style.js).
   "sonnig" ist der Standard und braucht keine Extra-Regeln – er ist bereits in
   style.css hinterlegt. Jeder Stil setzt die Gestaltungsvariablen aus
   style.css um: Farben, Ecken, Schatten, Schrift.
   ========================================================================== */

/* ---------- Retro: Pixel-Optik und Arcade-Farben ---------- */
html[data-style="retro"]{
  --radius:0px; --radius-sm:0px; --radius-md:0px; --radius-lg:0px; --border-w:4px;
  --font:"Consolas","Courier New",ui-monospace,"DejaVu Sans Mono",monospace;
  --shadow:6px 6px 0 var(--shade,#1e2233);
  --shadow-hover:9px 9px 0 var(--shade,#1e2233);
  --shadow-soft:6px 6px 0 var(--shade,#1e2233);
  --title-filter:contrast(1.25) saturate(1.2);
}
html[data-style="retro"]:not([data-theme="dark"]){
  --page:
    repeating-linear-gradient(0deg,rgba(30,34,51,.06) 0 2px,transparent 2px 18px),
    repeating-linear-gradient(90deg,rgba(30,34,51,.06) 0 2px,transparent 2px 18px),
    #f6f3e7;
  --ink:#1e2233; --muted:#5c6072; --card:#fffdf5; --line:#2a2f45;
  --brand:#e4572e; --brand-dark:#a83a1a;
  --panel:#fffdf5; --panel-solid:#fffdf5; --side-bg:#fffdf5; --stage-bg:#fffdf5;
  --soft:#e9e5d4; --soft-2:#f1eddf; --hover:#e4e0cd; --cell-hover:#dcd8c4;
  --top-bg:rgba(255,253,245,.96); --overlay:rgba(255,253,245,.96);
  --chip-bg:#fffdf5; --chip-hover:#ffe9a8;
  --input-bg:#fffdf5; --input-border:#2a2f45; --focus:#ffd166;
  --icon-bg:#fffdf5; --shade:#1e2233;
}
html[data-theme="dark"][data-style="retro"]{
  --page:
    repeating-linear-gradient(0deg,rgba(255,255,255,.05) 0 2px,transparent 2px 18px),
    repeating-linear-gradient(90deg,rgba(255,255,255,.05) 0 2px,transparent 2px 18px),
    #0f1330;
  --ink:#f2f0ff; --muted:#a7a9d0; --card:#1a1e44; --line:#3d4270;
  --brand:#ffcf4f; --brand-dark:#d9a520;
  --panel:rgba(26,30,68,.97); --panel-solid:#1a1e44; --side-bg:#1a1e44; --stage-bg:#12153a;
  --soft:#242a58; --soft-2:#1f2450; --hover:#2b3168; --cell-hover:#333a7d;
  --top-bg:rgba(15,19,48,.96); --overlay:rgba(12,15,38,.97);
  --chip-bg:#1a1e44; --chip-hover:#2f3570;
  --input-bg:#12153a; --input-border:#4b5190; --focus:#ffcf4f;
  --icon-bg:#242a58; --shade:#05060f;
}
html[data-style="retro"] .sky{display:none}
html[data-style="retro"] .logo{font-size:1.15rem}
html[data-style="retro"] .namebox input{width:8rem; flex:0 1 8rem}
html[data-style="retro"] .namebox label{font-size:.9rem}
/* Pixelige Titelbilder (nur wenn der Browser das kann) */
html[data-style="retro"] .banner img,html[data-style="retro"] .gamehead img{filter:contrast(1.25) saturate(1.2)}
@supports (filter:pixelate(4px)){
  html[data-style="retro"] .banner img,html[data-style="retro"] .gamehead img{filter:contrast(1.25) saturate(1.2) pixelate(3px)}
}
html[data-style="retro"] button,html[data-style="retro"] .btn{border-radius:0; box-shadow:4px 4px 0 var(--shade,#1e2233)}
html[data-style="retro"] button:active{box-shadow:1px 1px 0 var(--shade,#1e2233)}
html[data-style="retro"] button.secondary{background:transparent; color:var(--brand); border:3px solid var(--brand)}
html[data-style="retro"] .logo,html[data-style="retro"] .hero h1{text-transform:uppercase; letter-spacing:.08em}
html[data-style="retro"] a.gcard:hover{transform:translate(-4px,-4px) scale(1.01)}
html[data-style="retro"] .playbtn,html[data-style="retro"] .chip{border-radius:0}
html[data-style="retro"] .banner{border-bottom:4px solid var(--line)}
html[data-style="retro"] .gamehead img{border-width:4px; border-color:var(--line)}
html[data-style="retro"] .stage{box-shadow:6px 6px 0 var(--shade,#1e2233),0 0 0 6px transparent}
html[data-style="retro"] .table th{text-transform:uppercase; letter-spacing:.04em}
html[data-style="retro"] .foot .impressum{border-bottom-style:dashed}

/* ---------- Comic: dicke Konturen, Raster-Punkte, schiefe Karten ---------- */
html[data-style="comic"]{
  --radius:8px; --radius-sm:8px; --radius-md:8px; --radius-lg:10px; --border-w:3px;
  --font:"Comic Sans MS","Comic Neue","Chalkboard SE","Segoe Print","Trebuchet MS",cursive;
  --shadow:6px 6px 0 var(--shade,#171717);
  --shadow-hover:9px 9px 0 var(--shade,#171717);
  --shadow-soft:5px 5px 0 var(--shade,#171717);
  --title-filter:contrast(1.12) saturate(1.22);
}
html[data-style="comic"]:not([data-theme="dark"]){
  --page:
    radial-gradient(circle at 1px 1px,rgba(23,23,23,.13) 1px,transparent 0) 0 0/16px 16px,
    #fff8e6;
  --ink:#171717; --muted:#5b5b5b; --card:#fffdf5; --line:#171717;
  --brand:#ff3d6e; --brand-dark:#c2184a;
  --panel:#fffdf5; --panel-solid:#fffdf5; --side-bg:#fffdf5; --stage-bg:#fffdf5;
  --soft:#ffe9c9; --soft-2:#fff1d9; --hover:#ffe3b0; --cell-hover:#ffd9a3;
  --top-bg:#fffdf5; --overlay:rgba(255,248,230,.97);
  --chip-bg:#fffdf5; --chip-hover:#ffe066;
  --input-bg:#fffdf5; --input-border:#171717; --focus:#ff3d6e;
  --icon-bg:#fffdf5; --shade:#171717;
}
html[data-theme="dark"][data-style="comic"]{
  --page:
    radial-gradient(circle at 1px 1px,rgba(255,255,255,.09) 1px,transparent 0) 0 0/16px 16px,
    #171226;
  --ink:#fff6e8; --muted:#c0b6cf; --card:#241c38; --line:#0d0a16;
  --brand:#ffd23f; --brand-dark:#d9a520;
  --panel:rgba(36,28,56,.97); --panel-solid:#241c38; --side-bg:#241c38; --stage-bg:#1c1630;
  --soft:#3a2f52; --soft-2:#2f2647; --hover:#4a3b66; --cell-hover:#584479;
  --top-bg:rgba(23,18,38,.96); --overlay:rgba(18,14,32,.97);
  --chip-bg:#241c38; --chip-hover:#4a3b66;
  --input-bg:#1c1630; --input-border:#0d0a16; --focus:#ffd23f;
  --icon-bg:#3a2f52; --shade:#000;
}
html[data-style="comic"] .sky{display:none}
html[data-style="comic"] .gcard{border-color:var(--ink)}
html[data-style="comic"] a.gcard:hover{transform:rotate(-1.2deg) scale(1.03)}
html[data-style="comic"] .gcard .icon{border:3px solid var(--ink)}
html[data-style="comic"] button,html[data-style="comic"] .btn{border:3px solid var(--ink); box-shadow:4px 4px 0 var(--shade,#171717)}
html[data-style="comic"] button:active{box-shadow:1px 1px 0 var(--shade,#171717)}
html[data-style="comic"] button.secondary{background:transparent; color:var(--brand); border-color:var(--ink)}
html[data-style="comic"] .panel{border:3px solid var(--ink); box-shadow:6px 6px 0 var(--shade,#171717)}
html[data-style="comic"] .rainbow{-webkit-text-stroke:.5px var(--ink)}
html[data-style="comic"] .hero h1{text-shadow:2px 2px 0 var(--shade,#171717)}
html[data-style="comic"] .banner{border-bottom:3px solid var(--ink)}
html[data-style="comic"] .gamehead img{border:4px solid var(--ink)}
html[data-style="comic"] .stage{border-color:var(--ink); box-shadow:6px 6px 0 var(--shade,#171717)}
html[data-style="comic"] .table{border:3px solid var(--ink)}
html[data-style="comic"] .foot .impressum{border-bottom-style:solid; border-bottom-width:3px}

/* ---------- Schlicht: ruhig, flach, ohne Schnickschnack ---------- */
html[data-style="schlicht"]{
  --radius:6px; --radius-sm:6px; --radius-md:6px; --radius-lg:8px; --border-w:1px;
  --font:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",sans-serif;
  --shadow:none; --shadow-hover:0 2px 8px rgba(0,0,0,.10); --shadow-soft:none;
  --title-filter:saturate(.92);
}
html[data-style="schlicht"]:not([data-theme="dark"]){
  --page:#f6f6f7;
  --ink:#1c1c1e; --muted:#6b6b70; --card:#ffffff; --line:#e3e3e6;
  --brand:#2b6cb0; --brand-dark:#245a91;
  --panel:#ffffff; --panel-solid:#ffffff; --side-bg:#ffffff; --stage-bg:#ffffff;
  --soft:#f0f0f2; --soft-2:#f7f7f8; --hover:#e9e9ec; --cell-hover:#dedee2;
  --top-bg:rgba(255,255,255,.95); --overlay:rgba(255,255,255,.96);
  --chip-bg:#ffffff; --chip-hover:#eef2f7;
  --input-bg:#ffffff; --input-border:#d3d3d8; --focus:#9ec5e8;
  --icon-bg:#ffffff; --shade:#000;
}
html[data-theme="dark"][data-style="schlicht"]{
  --page:#101012;
  --ink:#ececee; --muted:#9a9aa2; --card:#191a1d; --line:#2c2d31;
  --brand:#7fb2e5; --brand-dark:#a6cdee;
  --panel:#191a1d; --panel-solid:#191a1d; --side-bg:#191a1d; --stage-bg:#141517;
  --soft:#232429; --soft-2:#1e1f23; --hover:#2b2c31; --cell-hover:#35363c;
  --top-bg:rgba(16,16,18,.95); --overlay:rgba(16,16,18,.97);
  --chip-bg:#191a1d; --chip-hover:#2b2c31;
  --input-bg:#141517; --input-border:#35363c; --focus:#3d6d9e;
  --icon-bg:#232429; --shade:#000;
}
html[data-style="schlicht"] .sky{display:none}
html[data-style="schlicht"] .gcard{border-color:var(--line)}
html[data-style="schlicht"] a.gcard:hover{transform:translateY(-2px)}
html[data-style="schlicht"] button,html[data-style="schlicht"] .btn{box-shadow:none; border:1px solid var(--line)}
html[data-style="schlicht"] button:active{transform:none}
html[data-style="schlicht"] .panel,html[data-style="schlicht"] .table,html[data-style="schlicht"] .side{box-shadow:none}
html[data-style="schlicht"] .banner{border-bottom:1px solid var(--line)}
html[data-style="schlicht"] .gamehead img{border-width:1px; border-color:var(--line)}
html[data-style="schlicht"] .stage{box-shadow:none}
html[data-style="schlicht"] .foot .impressum{border-bottom-style:solid}

/* ---------- Auswahl der Stile (Fußzeile und Startseite) ---------- */
.stylepick{display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:.4rem; margin:.2rem 0}
.stylepick.block{flex-direction:row; gap:.55rem .4rem; margin:1.2rem 0 .2rem}
.stylepick.block .stylelabel{flex:0 0 100%; text-align:center; font-size:1rem; color:var(--ink); font-weight:800}
.stylelabel{font-weight:800; color:var(--muted); font-size:.9rem}
.stylebtn{
  display:inline-flex; align-items:center; gap:.4rem; font:inherit; font-weight:700; font-size:.9rem; cursor:pointer;
  padding:.3rem .7rem .3rem .35rem; border:2px solid var(--line); border-radius:999px; background:var(--chip-bg); color:var(--ink);
  box-shadow:none; transition:transform .12s, border-color .2s, background .2s;
}
.stylebtn:hover{filter:none; transform:translateY(-1px); border-color:var(--brand)}
.stylebtn:active{transform:none; box-shadow:none}
.stylebtn[aria-pressed="true"]{border-color:var(--brand); background:var(--hover); color:var(--brand-dark)}
.stylebtn .swatch{
  width:1.15rem; height:1.15rem; border-radius:50%; flex:0 0 auto; border:2px solid var(--line);
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.5);
}
.stylebtn .swatch.sonnig{background:linear-gradient(135deg,#8ec5ff 0 50%,#ffd166 50% 100%)}
.stylebtn .swatch.retro{background:linear-gradient(135deg,#e4572e 0 50%,#ffcf4f 50% 100%); border-radius:2px}
.stylebtn .swatch.comic{background:linear-gradient(135deg,#ff3d6e 0 50%,#171717 50% 100%)}
.stylebtn .swatch.schlicht{background:linear-gradient(135deg,#f6f6f7 0 50%,#2b6cb0 50% 100%)}
