/* zufall.css — /tools/zufall (05.10.2026). Baut auf werkzeug.css auf. */
@media (min-width: 761px) { .zf .wz-reiter { justify-content: center; } }
.zf-buehne {
  max-width: 40rem; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 1.2rem;
  padding-top: clamp(1.6rem, 4vw, 2.6rem);
  perspective: 900px;
}
.zf-unten { width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem; }
.zf-los { min-width: 8.5rem; height: 46px; font-size: 0.95rem; border-radius: 14px; }
.zf-summe {
  margin: 0; min-height: 1.6em; font: 800 clamp(1.3rem, 4vw, 1.7rem) 'Sora', sans-serif; letter-spacing: -0.02em; color: var(--sub);
  transition: color 0.2s;
}
.zf-summe.zeigt { color: var(--text); animation: zfPop 0.45s var(--ease-out); }
@keyframes zfPop { 0% { opacity: 0; transform: scale(0.7); } 60% { opacity: 1; transform: scale(1.08); } }
.zf-klein { margin: 0.4rem 0 0; font-size: 0.8rem; color: var(--sub); }

/* ═══ Würfel ═══ */
.zf-wuerfelfeld {
  display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(0.8rem, 3vw, 1.4rem);
  min-height: 9rem; align-items: center; padding: 1rem; border: 0; background: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.zf-w {
  width: clamp(64px, 17vw, 92px); aspect-ratio: 1; padding: 13%;
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); place-items: center;
  border-radius: 22%;
  background: linear-gradient(150deg, #ffffff, #eaf2fb);
  box-shadow: 0 10px 22px rgba(15, 42, 74, 0.14), inset 0 -4px 0 rgba(26, 106, 170, 0.08), inset 0 0 0 1px rgba(26, 106, 170, 0.08);
}
.zf-wuerfelfeld[data-anzahl="1"] .zf-w { width: clamp(96px, 26vw, 128px); }
.zf-w i { width: 62%; aspect-ratio: 1; border-radius: 50%; background: transparent; transition: background 0.08s; }
.zf-w i.an { background: radial-gradient(circle at 35% 35%, #2f86c6, #0f2a4a); }

/* ═══ Münze ═══ */
.zf-muenze {
  position: relative; width: clamp(130px, 34vw, 170px); aspect-ratio: 1; padding: 0; border: 0; background: none;
  cursor: pointer; transform-style: preserve-3d; -webkit-tap-highlight-color: transparent;
}
.zf-m-seite {
  position: absolute; inset: 0; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.2rem;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  color: #7a5410;
  background: radial-gradient(circle at 32% 28%, #ffe7a3, #f2c14e 45%, #d79b23 100%);
  box-shadow: inset 0 0 0 7px rgba(255, 255, 255, 0.35), inset 0 0 0 10px rgba(183, 125, 20, 0.35), 0 14px 28px rgba(120, 80, 10, 0.25);
}
.zf-m-zahl { transform: rotateY(180deg); background: radial-gradient(circle at 32% 28%, #f2f6fa, #c9d6e3 45%, #98abbf 100%); color: #3c5168;
  box-shadow: inset 0 0 0 7px rgba(255, 255, 255, 0.4), inset 0 0 0 10px rgba(80, 100, 125, 0.3), 0 14px 28px rgba(15, 42, 74, 0.2); }
.zf-m-seite svg { width: 42%; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; }
.zf-m-seite em { font: 800 3.2rem/1 'Sora', sans-serif; font-style: normal; }
.zf-m-seite b { font: 700 0.75rem 'Inter', sans-serif; letter-spacing: 0.16em; text-transform: uppercase; }
.zf-strich { display: flex; align-items: center; gap: 1rem; font-size: 0.9rem; color: var(--sub); }
.zf-strich b { color: var(--text); font-variant-numeric: tabular-nums; }

/* ═══ Zahl ═══ */
.zf-zahlen { min-height: 7.5rem; width: 100%; display: flex; align-items: center; justify-content: center; }
.zf-zahlen.viele { flex-wrap: wrap; align-content: center; gap: 0.45rem; max-height: 18rem; overflow-y: auto; padding: 0.3rem; }
.zf-grosszahl {
  font: 800 clamp(3.6rem, 13vw, 5.6rem)/1 'Sora', sans-serif; letter-spacing: -0.04em; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.zf-grosszahl.fertig { color: var(--pri); animation: zfPop 0.45s var(--ease-out); }
.zf-chip {
  min-width: 3rem; padding: 0.45rem 0.75rem; border-radius: 12px; text-align: center;
  background: var(--bg2); color: var(--pri); font: 700 1.05rem 'Sora', sans-serif; font-variant-numeric: tabular-nums;
  animation: zfPop 0.4s var(--ease-out) backwards;
}
.zf-bereich { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }

/* ═══ Glücksrad und Teams ═══ */
.zf-zweier { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.zf-zweier[hidden] { display: none; }
@media (max-width: 820px) { .zf-zweier { grid-template-columns: 1fr; } }
.zf-radkarte { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; }
.zf-rad { position: relative; width: min(100%, 25rem); aspect-ratio: 1; }
.zf-rad canvas { width: 100%; height: 100%; display: block; border-radius: 50%; cursor: pointer; filter: drop-shadow(0 14px 26px rgba(15, 42, 74, 0.16)); }
.zf-zeiger {
  position: absolute; left: 50%; top: -6px; width: 30px; height: 38px; margin-left: -15px; z-index: 2;
  background: var(--text); clip-path: polygon(50% 100%, 0 0, 100% 0); border-radius: 4px;
  transform-origin: 50% 0;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.25));
}
.zf-zeiger.tick { animation: zfTick 0.16s ease-out; }
@keyframes zfTick { 40% { transform: rotate(-16deg); } }
.zf-radknopf {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2;
  width: 26%; aspect-ratio: 1; border-radius: 50%; border: 5px solid var(--card);
  background: linear-gradient(145deg, #2288cc, #0f2a4a); color: #fff;
  font: 800 clamp(0.8rem, 2.6vw, 1rem) 'Sora', sans-serif; cursor: pointer;
  box-shadow: 0 8px 20px rgba(15, 42, 74, 0.3);
  transition: transform 0.2s var(--ease-out);
}
.zf-radknopf:hover { transform: translate(-50%, -50%) scale(1.05); }
.zf-radknopf:active { transform: translate(-50%, -50%) scale(0.94); }
.zf-rad.dreht .zf-radknopf { pointer-events: none; opacity: 0.85; }
.zf-raus { font-size: 0.84rem; }
.zf-liste textarea { min-height: 13rem; }

.zf-teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); gap: 0.8rem; }
.zf-team {
  background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 0.9rem 1rem;
  box-shadow: var(--shadow); border-top: 4px solid var(--tf);
  animation: zfTeam 0.45s var(--ease-out) backwards;
}
@keyframes zfTeam { from { opacity: 0; transform: translateY(12px) scale(0.97); } }
.zf-team h3 { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.6rem; font: 700 0.98rem 'Sora', sans-serif; }
.zf-team h3 i { width: 10px; height: 10px; border-radius: 50%; background: var(--tf); }
.zf-team h3 span { margin-left: auto; font: 700 0.74rem 'Inter', sans-serif; color: var(--sub); }
.zf-team ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.3rem; }
.zf-team li { padding: 0.4rem 0.6rem; border-radius: 10px; background: var(--card2); font-size: 0.9rem; font-weight: 500; }
.zf-teamwahl { display: flex; align-items: center; gap: 0.7rem; font-size: 0.88rem; font-weight: 600; color: var(--text2); }
.zf-liste .zf-unten { margin-top: 0.9rem; }

@media (max-width: 480px) { .zf-bereich { grid-template-columns: 1fr 1fr; } .zf-bereich label:last-child { grid-column: 1 / -1; } }
@media (prefers-reduced-motion: reduce) { .zf-summe.zeigt, .zf-grosszahl.fertig, .zf-chip, .zf-team, .zf-zeiger.tick { animation: none; } }
