/* Bürokratopia – Minispiel „Grüner Stift, roter Stift“ (0.16.0). Gehört zu assets/js/spiel_stifte.js. Präfix s-stifte-.
   Stiftfarbe kommt je Knopf aus --s-stifte-farbe (setzt das JS per setProperty aus dem Pool); alles andere aus app.css. */
.s-stifte { display: grid; gap: 10px; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.s-stifte-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; }
.s-stifte-zahl { display: flex; align-items: baseline; gap: 6px; line-height: 1; }
.s-stifte-zahl b { font-size: 2.3rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.s-stifte-zahl span { font-size: .78rem; color: var(--leise); font-weight: 600; }
.s-stifte-stand { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--leise); }
.s-stifte-stand b { color: var(--text); font-size: 1.2rem; }

/* Farbregel als Chips */
.s-stifte-regel { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.s-stifte-regel li { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 10px; border-radius: 99px; background: var(--flaeche2); border: 1px solid var(--linie); font-size: .82rem; font-weight: 600; }
.s-stifte-regel li b { color: var(--text); }
.s-stifte-punkt { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--s-stifte-farbe, var(--text)); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--flaeche) 60%, transparent); }
.s-stifte-nachbar-regel { border: 1px dashed var(--gold); border-radius: var(--radius-k); padding: 6px 10px; background: var(--gold-hell); }
.s-stifte-nachbar-regel summary { cursor: pointer; font-weight: 700; font-size: .86rem; color: var(--gold-text); min-height: 32px; display: flex; align-items: center; }
.s-stifte-nachbar-regel .s-stifte-regel { margin-top: 8px; }

/* Bühne mit der Umlaufmappe */
.s-stifte-buehne { position: relative; width: 100%; max-width: 420px; margin: 0 auto; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--linie); background: var(--flaeche2); touch-action: none; }
.s-stifte-mappe { position: absolute; left: 8%; right: 8%; top: 8%; bottom: 8%; z-index: 2; display: grid; align-content: center; justify-items: center; gap: 6px; padding: 14px 12px 18px; text-align: center; background: var(--flaeche); border: 2px solid var(--linie2); border-left-width: 10px; border-left-color: var(--akzent); border-radius: 8px 12px 12px 8px; box-shadow: var(--schatten-hoch); }
.s-stifte-mappe-nachbar { border-left-color: var(--gold); border-style: dashed; border-left-style: solid; background: linear-gradient(180deg, var(--flaeche), var(--gold-hell)); }
.s-stifte-nachbar { padding: 3px 10px; border-radius: 99px; background: var(--gold); color: var(--flaeche); font-size: .74rem; font-weight: 800; letter-spacing: .02em; }
.s-stifte-vor { font-size: .82rem; color: var(--leise); font-weight: 600; }
.s-stifte-rolle { font-size: clamp(1.4rem, 7vw, 2rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; color: var(--text); }
.s-stifte-uhr { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; background: var(--akzent); transform-origin: left; }
.s-stifte-uhr.s-stifte-knapp { background: var(--rot); }
.s-stifte-mappe.s-stifte-neu { animation: s-stifte-rein .22s var(--kurve) both; }
.s-stifte-mappe.s-stifte-weg { animation: s-stifte-weg .3s ease-in .25s forwards; }
@keyframes s-stifte-rein { from { transform: translateX(60%) rotate(2deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes s-stifte-weg { to { transform: translateX(-80%) rotate(-3deg); opacity: 0; } }
.s-stifte-rueck { position: absolute; left: 50%; top: 10%; z-index: 4; transform: translateX(-50%); padding: 6px 14px; border-radius: 99px; font-weight: 800; white-space: nowrap; pointer-events: none; animation: aufploppen .2s var(--kurve); font-variant-numeric: tabular-nums; }
.s-stifte-rueck-ok { background: var(--gruen); color: var(--flaeche); }
.s-stifte-rueck-falsch { background: var(--rot); color: var(--flaeche); }
.s-stifte-rueck-offen { background: var(--gold); color: var(--flaeche); }
.s-stifte-start { position: absolute; inset: 0; z-index: 6; display: grid; align-content: center; justify-items: center; gap: 14px; padding: 18px; text-align: center; background: color-mix(in srgb, var(--flaeche) 90%, transparent); backdrop-filter: blur(3px); }
.s-stifte-start p { margin: 0; font-weight: 600; font-size: .95rem; line-height: 1.4; max-width: 300px; }
.s-stifte-start .knopf { min-width: 160px; min-height: 56px; font-size: 1.2rem; border-radius: 16px; }

/* Stift-Knöpfe: drei oder vier nebeneinander, jeder mindestens 84 px hoch */
.s-stifte-stifte { display: flex; gap: 8px; max-width: 420px; margin: 0 auto; width: 100%; }
.s-stifte-stift { flex: 1 1 0; min-width: 0; min-height: 88px; display: grid; justify-items: center; align-content: end; gap: 4px; padding: 8px 4px 8px; margin: 0; border: 2px solid var(--linie2); border-radius: 14px; background: var(--flaeche); color: var(--text); font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: transform .1s, border-color .1s, background .1s; }
.s-stifte-stift svg { width: 26px; height: 64px; display: block; }
.s-stifte-stift:active { transform: translateY(2px); border-color: var(--s-stifte-farbe, var(--akzent)); }
.s-stifte-stift:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--akzent) 35%, transparent); }
.s-stifte-stift:disabled { cursor: default; opacity: .55; }
.s-stifte-schaft { fill: var(--s-stifte-farbe, var(--text)); }
.s-stifte-kappe { fill: color-mix(in srgb, var(--s-stifte-farbe, var(--text)) 70%, var(--text)); }
.s-stifte-spitze { fill: var(--pfirsich); stroke: var(--linie2); stroke-width: 1; }
.s-stifte-mine { fill: var(--s-stifte-farbe, var(--text)); }
.s-stifte-stift span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.s-stifte-ende { cursor: default; }
.s-stifte-ergebnis { margin: 0; text-align: center; font-weight: 700; padding: 9px 12px; border-radius: var(--radius-k); background: var(--gruen-hell); color: var(--gruen-text); }
.s-stifte-pointe { margin: 0; text-align: center; font-style: italic; }

@media (prefers-reduced-motion: reduce) { .s-stifte-stift { transition: none; } }
