/* =========================================================
   spiele.top – Katalog & Spielbühne (100 Spiele)
   Ergänzt style.css, keine externen Ressourcen
   ========================================================= */


/* ---------- Katalog-Filter ---------- */
.k-filter{display:flex; flex-wrap:wrap; gap:8px; margin:0 0 16px}
.k-chip{
  display:inline-flex; align-items:center; gap:7px; cursor:pointer;
  font:inherit; font-size:.86rem; font-weight:600; color:var(--ink-2);
  background:#fff; border:1px solid var(--line); padding:8px 14px; border-radius:999px;
  transition:border-color .15s, background .15s, color .15s;
}
.k-chip:hover{border-color:#CFC6F0; color:var(--ink)}
.k-chip[aria-pressed="true"]{background:var(--brand); border-color:var(--brand); color:#fff; box-shadow:0 8px 18px rgba(109,91,246,.24)}
.k-chip b{font-weight:700; opacity:.62; font-variant-numeric:tabular-nums}

.k-bar{display:flex; flex-wrap:wrap; gap:12px; align-items:center; margin:0 0 20px}
.k-bar .search-box{margin:0; flex:1 1 260px}
.k-bar .search-box input{padding:12px 16px; border-radius:999px}
.k-sort{
  font:inherit; font-size:.88rem; font-weight:600; color:var(--ink-2);
  background:#fff; border:1px solid var(--line); color:var(--ink);
  padding:12px 16px; border-radius:999px; cursor:pointer;
}
.k-count{font-size:.85rem; color:var(--ink-3); white-space:nowrap}
.k-leer{padding:34px 20px; text-align:center; color:var(--ink-3); background:#fff; border:1px dashed var(--line); border-radius:var(--r)}
.k-mehr{display:flex; justify-content:center; margin:26px 0 0}

/* ---------- Karten-Ergänzungen ---------- */
.cover .cover-glyph.emoji{font-size:3.1rem; transform:none; filter:drop-shadow(0 6px 12px rgba(0,0,0,.22))}
.cover .cover-num{
  position:absolute; right:10px; top:10px; z-index:2; font-size:.68rem; font-weight:800;
  letter-spacing:.08em; color:rgba(255,255,255,.88); font-variant-numeric:tabular-nums;
}
.card h3 .lvl{
  font-size:.62rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase;
  color:var(--ink-3); background:var(--bg); border:1px solid var(--line);
  padding:2px 6px; border-radius:5px; vertical-align:2px; margin-left:6px;
}

/* ---------- Spielbühne (spiel.html) ---------- */
.buehne{position:relative; display:flex; flex-direction:column; gap:12px}
.buehne .stage-bar{margin-bottom:0}
.spiel-tafel{display:block; width:100%}
.stage{position:relative}
.overlay{
  position:absolute; inset:0; z-index:8; display:grid; place-items:center; text-align:center;
  background:rgba(25,23,51,.78); color:#fff; border-radius:var(--r-lg); padding:24px;
  backdrop-filter:blur(3px);
}
.overlay[hidden]{display:none}
.overlay b{display:block; font-size:1.35rem; margin-bottom:6px; color:#fff}
.overlay p{color:rgba(255,255,255,.82); margin:0 0 16px; font-size:.95rem}
.overlay .btn{background:#fff; color:var(--ink); box-shadow:none}

/* ---------- Genrische Spielelemente ---------- */
.g-grid{display:grid; gap:6px; margin:0 auto; touch-action:manipulation; user-select:none}
.g-grid button{font:inherit; border:0; padding:0; cursor:pointer}

.g-kachel{
  display:grid; place-items:center; background:linear-gradient(160deg,#F7F4FF,#ECE6FB); border:1px solid #DED4F6;
  border-radius:10px; font-weight:800; color:var(--ink); aspect-ratio:1;
  transition:background .12s, transform .1s, border-color .12s;
}
.g-kachel:hover{background:linear-gradient(160deg,#EFE9FF,#E2D8FA); border-color:#C9BCF2}
.g-kachel.leer{background:transparent; border-color:transparent; cursor:default}
.g-kachel.gewaehlt{background:var(--brand-soft); border-color:#C0B2FA; color:var(--brand-dk)}

.g-brett{display:grid; gap:2px; background:var(--line); padding:2px; border-radius:10px; margin:0 auto}
.g-zelle{
  border:0;
  display:grid; place-items:center; background:#fff; border-radius:3px;
  font-size:.8rem; font-weight:700; color:var(--ink-3); cursor:pointer; aspect-ratio:1;
}
.g-zelle.wand{background:#2A2745; cursor:default}
.g-zelle.spieler{background:var(--brand); color:#fff}
.g-zelle.ziel{background:#EAF9F2; color:#12A87A; font-size:1rem}
.g-zelle.ziel.spieler{background:var(--brand); color:#fff}
.g-zelle.fund{background:#DFF7EE; color:#0B7A5F; border-radius:4px}
.g-zelle.start{outline:2px solid var(--brand); outline-offset:-2px}

.g-wortgrid .g-zelle{font-size:.82rem; letter-spacing:0; text-transform:uppercase; color:var(--ink); font-weight:700}
.g-gewaehlt{background:var(--brand-soft)!important; color:var(--brand-dk)!important; border-radius:4px}

.g-tasten{display:flex; flex-wrap:wrap; gap:8px; justify-content:center; margin-top:14px}
.g-taste{
  font:inherit; font-weight:800; font-size:.95rem; cursor:pointer;
  min-width:42px; padding:10px 14px; border-radius:10px;
  background:#fff; color:var(--ink); border:1px solid var(--line);
}
.g-taste:hover{background:var(--brand-soft); border-color:#CFC6F0; color:var(--brand-dk)}
.g-taste:disabled{opacity:.38; cursor:default}
.g-taste.richtig{background:#E9FBF4; border-color:#A8ECD6; color:#0B7A5F}
.g-taste.falsch{background:#FFEFEA; border-color:#FFC7B8; color:#C0392B}

.tipp-text{
  font-size:1.02rem; line-height:1.9; color:var(--ink-3); letter-spacing:.01em;
  background:var(--bg); border:1px solid var(--line); border-radius:var(--r); padding:16px 18px;
  margin:0 0 12px; max-height:190px; overflow:auto;
}
.tipp-text span.ok{color:var(--ink)}
.tipp-text span.falsch{background:#FFE1D8; color:#B03A1E; border-radius:3px}
.tipp-text span.jetzt{border-bottom:2px solid var(--brand)}
.tipp-input{
  width:100%; font:inherit; font-size:1rem; padding:12px 16px; border-radius:12px;
  border:1px solid var(--line); background:#fff; color:var(--ink); resize:vertical;
}
.tipp-input:focus{outline:none; border-color:var(--brand); box-shadow:0 0 0 4px rgba(109,91,246,.14)}

.schuss-feld{
  position:relative; width:100%; max-width:520px; height:360px; margin:0 auto;
  background:radial-gradient(circle at 50% 40%, #F4F1FF, #E9E4FB);
  border:1px solid var(--line); border-radius:var(--r); overflow:hidden; cursor:crosshair;
}
.schuss-ziel{
  position:absolute; display:grid; place-items:center; border-radius:50%; border:0; cursor:pointer;
  background:radial-gradient(circle at 34% 32%, #FF8A6B, #E8431F);
  box-shadow:0 8px 18px rgba(232,67,31,.32), inset 0 0 0 4px rgba(255,255,255,.55);
  color:#fff; font-weight:800;
}
.schuss-ziel::after{content:""; position:absolute; inset:26%; border-radius:50%; border:2px solid rgba(255,255,255,.75)}

.pads{display:grid; grid-template-columns:repeat(2,minmax(90px,1fr)); gap:12px; max-width:340px; margin:0 auto}
.pad{
  aspect-ratio:1; border:0; border-radius:18px; cursor:pointer;
  opacity:.62; transition:opacity .1s, transform .1s, filter .1s;
  box-shadow:inset 0 -6px 0 rgba(0,0,0,.14);
}
.pad.an{opacity:1; transform:scale(.97); filter:brightness(1.25)}

.karten-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:8px; max-width:420px; margin:0 auto}
.g-karte{
  aspect-ratio:3/4; border-radius:12px; border:0; cursor:pointer; position:relative;
  background:linear-gradient(150deg,#6D5BF6,#9B5BF6); color:#fff; font-size:1.6rem;
  display:grid; place-items:center; transition:transform .16s, background .16s;
  box-shadow:0 4px 10px rgba(25,23,51,.12);
}
.g-karte::before{
  content:"?"; position:absolute; font-weight:800; font-size:1.2rem; opacity:.7;
}
.g-karte.offen, .g-karte.weg{background:#fff; border:1px solid var(--line); color:var(--ink); transform:rotateY(0)}
.g-karte.offen::before, .g-karte.weg::before{content:none}
.g-karte .motiv{font-size:1.7rem; line-height:1; opacity:0; transition:opacity .14s}
.g-karte.offen .motiv, .g-karte.weg .motiv{opacity:1}
.g-karte.weg{opacity:.45}
.g-karte.offen{box-shadow:0 6px 16px rgba(25,23,51,.16)}

.hanoi{display:grid; grid-template-columns:repeat(3,1fr); gap:14px; width:100%; max-width:520px; margin:0 auto}
.hanoi .stab{
  position:relative; min-height:205px; display:flex; flex-direction:column-reverse; align-items:center;
  justify-content:flex-start; gap:4px; padding:10px 4px 0; cursor:pointer;
  background:var(--bg); border:1px solid var(--line); border-radius:12px;
}
.hanoi .stab.aktiv{border-color:var(--brand); background:var(--brand-soft)}
.hanoi .stab::before{content:""; position:absolute; bottom:8px; width:6px; height:150px; background:#D7D1EC; border-radius:3px}
.hanoi .scheibe{
  position:relative; z-index:1; height:20px; border-radius:5px; color:#fff; font-size:.7rem;
  font-weight:800; display:grid; place-items:center; background:linear-gradient(140deg,#7B5BF6,#4B32C3);
}
.hanoi small{position:absolute; bottom:-22px; color:var(--ink-3); font-size:.72rem}

.mino{display:flex; flex-wrap:wrap; gap:5px; margin:0 0 6px}
.mino i{width:9px; height:24px; border-radius:3px; background:linear-gradient(#FFB87A,#E8892B); display:block}
.haufen{display:flex; align-items:center; gap:14px; flex-wrap:wrap; padding:12px 14px; background:#fff; border:1px solid var(--line); border-radius:12px; margin:0 0 10px}
.haufen b{font-size:.9rem; min-width:78px}
.haufen .btn-row{margin:0}

.quiz-frage{font-size:1.15rem; font-weight:700; margin:0 0 16px; max-width:52ch}
.quiz-opts{display:grid; gap:9px; width:100%; max-width:560px}
.quiz-opt{
  width:100%; font:inherit; font-size:.97rem; font-weight:600; text-align:left; cursor:pointer;
  padding:13px 16px; border-radius:12px; background:#fff; color:var(--ink);
  border:1px solid var(--line); transition:border-color .15s, background .15s;
}
.quiz-opt:hover:not(:disabled){border-color:#C9BEFB; background:#FBFAFF}
.quiz-opt:disabled{cursor:default}
.quiz-opt.richtig{background:#E9FBF4; border-color:#A8ECD6; color:#0B7A5F}
.quiz-opt.falsch{background:#FFEFEA; border-color:#FFC7B8; color:#C0392B}

.laby{display:grid; gap:1px; margin:0 auto; background:#EAE6F5; padding:3px; border-radius:8px}
.laby div{width:100%; aspect-ratio:1; border-radius:1px; background:#fff}
.laby div.w{background:#2A2745}
.laby div.p{background:var(--brand)}
.laby div.z{background:var(--mint)}
.laby div.w, .laby div.p, .laby div.z{border-radius:2px}

canvas.spielcanvas{margin:0 auto; background:#12111F; border-radius:12px; max-width:100%; height:auto; display:block; touch-action:none}

.reakt-flaeche{
  display:grid; place-items:center; width:100%; max-width:520px; height:300px; margin:0 auto;
  border-radius:var(--r); border:1px solid var(--line); background:#E9E4FB; color:var(--ink-2);
  font-weight:700; cursor:pointer; text-align:center; padding:20px; user-select:none;
}

@media (max-width:600px){
  .karten-grid{grid-template-columns:repeat(4,1fr); gap:6px}
  .g-zelle{font-size:.66rem}
  .tipp-text{font-size:.94rem; max-height:150px}
  .ziel-feld{height:320px}
  .hanoi .stab{min-height:160px}
  .quiz-frage{font-size:1.02rem}
}

/* Karten-Metazeile: ganze Angaben umbrechen, nicht mitten im Wort */
.card-meta{flex-wrap:wrap; gap:4px 10px}
.card-meta span{white-space:nowrap}

/* ---------- Nonogramm ---------- */
.g-nono{
  display:grid; gap:3px; margin:0 auto; width:min(100%,470px);
  background:#fff; padding:8px; border:1px solid var(--line); border-radius:12px;
}
.g-nono .nono-ecke{background:transparent}
.g-nono .hinweis{
  display:flex; align-items:center; justify-content:flex-end;
  font-size:.64rem; font-weight:800; color:#5B5478;
  line-height:1.15; padding:0 4px; letter-spacing:.02em;
}
.g-nono .hinweis span{white-space:nowrap}
.g-nono .hinweis.spalte{flex-direction:column; justify-content:flex-end; align-items:center; min-height:32px}
.g-nono .g-zelle{border:1px solid var(--line); background:#fff; color:transparent; font-size:.7rem}
.g-nono .g-zelle:hover{background:#F4F1FD}
.g-nono .g-zelle.gefuellt{background:var(--ink); border-color:var(--ink)}
.g-nono .g-zelle.kreuz{color:#B9B2D0}

/* ---------- Kisten / Lichter ---------- */
.g-zelle.kiste{background:#FDE9C8; color:#92400E; font-size:1rem}
.g-zelle.kiste.auf{background:#D6F6E6; color:#0B7A5F}
.g-zelle.an{background:#FFC53D; border-color:#E8A800; box-shadow:inset 0 0 0 1px #E8A800}
.g-zelle.fest{color:var(--ink); cursor:default}
.g-zelle.gleich{background:#F1ECFE}
.g-zelle.gewaehlt{background:var(--brand-soft); box-shadow:inset 0 0 0 2px var(--brand)}
.g-zelle.kante-r{border-right:2px solid #2A2745}
.g-zelle.kante-u{border-bottom:2px solid #2A2745}

/* ---------- Rohre ---------- */
.rohr-gitter{
  display:grid; gap:0; margin:0 auto; width:min(100%,470px);
  background:#F7F5FE; border:1px solid var(--line); border-radius:12px; padding:6px;
}
.rohr{
  position:relative; aspect-ratio:1; background:#fff; border:1px solid #E4DEFA;
  border-radius:6px; cursor:pointer; padding:0; transition:background .12s;
}
.rohr:hover{background:#F4F0FE}
.rohr.start{border-color:var(--brand); box-shadow:inset 0 0 0 2px rgba(109,91,246,.28)}
.rohr.ziel{border-color:#0B7A5F; box-shadow:inset 0 0 0 2px rgba(11,122,95,.28)}
.rohr i{position:absolute; background:#6D5BF6; border-radius:3px; display:none}
.rohr i.an{display:block}
.rohr i.o{left:50%; top:0; width:26%; height:52%; transform:translateX(-50%)}
.rohr i.r{top:50%; right:0; height:26%; width:52%; transform:translateY(-50%)}
.rohr i.u{left:50%; bottom:0; width:26%; height:52%; transform:translateX(-50%)}
.rohr i.l{top:50%; left:0; height:26%; width:52%; transform:translateY(-50%)}

/* ---------- Würfelpoker ---------- */
.wuerfel-reihe{display:flex; flex-wrap:wrap; gap:10px; justify-content:center; margin:0 0 16px}
.wuerfel{
  font:inherit; font-weight:800; font-size:1.5rem; width:58px; height:58px; cursor:pointer;
  display:grid; place-items:center; background:#fff; color:var(--ink);
  border:2px solid var(--line); border-radius:12px; transition:.12s;
}
.wuerfel:hover{border-color:#CFC6F0}
.wuerfel.fest{background:var(--brand-soft); border-color:var(--brand); color:var(--brand-dk)}
.wuerfel-tabelle{display:grid; gap:6px; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); width:100%}
.wuerfel-feld{
  font:inherit; display:flex; justify-content:space-between; align-items:center; gap:10px;
  padding:9px 13px; background:#fff; border:1px solid var(--line); border-radius:10px; cursor:pointer;
}
.wuerfel-feld:hover{border-color:#CFC6F0; background:#FBFAFF}
.wuerfel-feld.belegt{background:#F7F6F2; color:var(--ink-3); cursor:default}
.wf-name{font-size:.86rem}
.wf-wert{font-weight:800; font-variant-numeric:tabular-nums}

/* ---------- Mühle ---------- */
.muehle-brett{
  display:grid; grid-template-columns:repeat(7,1fr); grid-template-rows:repeat(7,1fr);
  gap:2px; width:min(100%,430px); aspect-ratio:1; margin:0 auto; position:relative;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 700 700'%3E%3Cg fill='none' stroke='%23D9D2EE' stroke-width='10'%3E%3Crect x='50' y='50' width='600' height='600'/%3E%3Crect x='150' y='150' width='400' height='400'/%3E%3Crect x='250' y='250' width='200' height='200'/%3E%3Cpath d='M350 50V250M350 450V650M50 350H250M450 350H650'/%3E%3C/g%3E%3C/svg%3E") center/100% 100% no-repeat,
    #FBFAFF;
  border-radius:12px; padding:4px;
}
.muehle-punkt{
  align-self:center; justify-self:center; width:76%; aspect-ratio:1; max-width:38px;
  border-radius:50%; border:2px solid #D9D2EE; background:#fff; cursor:pointer; padding:0;
  transition:transform .1s, border-color .12s, background .12s;
}
.muehle-punkt:hover{border-color:var(--brand); transform:scale(1.08)}
.muehle-punkt.weiss{background:linear-gradient(160deg,#fff,#EDE9FE); border-color:var(--brand); box-shadow:0 2px 6px rgba(109,91,246,.28)}
.muehle-punkt.schwarz{background:linear-gradient(160deg,#3B3757,#191733); border-color:#191733; box-shadow:0 2px 6px rgba(25,23,51,.3)}
.muehle-punkt.gewaehlt{outline:3px solid #F59E0B; outline-offset:2px}

/* ---------- Blackjack ---------- */
.bj{display:grid; gap:16px; width:100%}
.bj-block b{display:block; font-size:.82rem; color:var(--ink-3); margin:0 0 6px; letter-spacing:.02em}
.bj-karten{display:flex; gap:8px; flex-wrap:wrap}
.bj-karte{
  display:grid; place-items:center; min-width:52px; height:72px; padding:0 8px;
  background:#fff; border:1px solid var(--line); border-radius:10px;
  font-weight:800; font-size:1.05rem; color:#191733; box-shadow:0 3px 10px rgba(25,23,51,.07);
}
.bj-karte.rot{color:#C0392B}
.bj-karte.zurueck{background:linear-gradient(160deg,#6D5BF6,#4B32C3); color:#fff; border-color:#4B32C3}

/* ---------- Zahlen merken ---------- */
.zahlen-anzeige{
  display:grid; place-items:center; min-height:96px; padding:14px;
  background:#FBFAFF; border:1px dashed #D9D2EE; border-radius:12px;
  font-size:1.05rem; color:var(--ink-3); text-align:center;
}
.zahlen-anzeige.gross{
  font-size:clamp(1.8rem,7vw,2.8rem); font-weight:800; letter-spacing:.14em;
  color:var(--ink); border-style:solid; border-color:var(--line); background:#fff;
}

/* ---------- Farbwörter ---------- */
.stroop-wort{
  display:grid; place-items:center; min-height:110px; margin:0 0 16px;
  font-size:clamp(1.8rem,7vw,2.6rem); font-weight:800; letter-spacing:.1em;
  background:#FBFAFF; border-radius:12px;
}
.stroop-opt{display:flex; align-items:center; gap:10px}
.stroop-punkt{width:14px; height:14px; border-radius:50%; flex:0 0 auto}
