@font-face { font-family: 'PYImmortal'; src: url('fonts/immortal.ttf') format('truetype'); }
@font-face { font-family: 'PYImmortalB'; src: url('fonts/immortalb.ttf') format('truetype'); }
@font-face { font-family: 'PYTimes'; src: url('fonts/times.ttf') format('truetype'); }
@font-face { font-family: 'PYNiamey'; src: url('fonts/niamey.ttf') format('truetype'); }
@font-face { font-family: 'PYArialB'; src: url('fonts/arialb.ttf') format('truetype'); }
:where(html, html *) { scrollbar-width:thin; scrollbar-color:#c9a24a rgba(40,28,10,.5); }
:where(html) ::-webkit-scrollbar { width:9px; height:9px; }
:where(html) ::-webkit-scrollbar-track { background:rgba(40,28,10,.5); border-radius:5px; }
:where(html) ::-webkit-scrollbar-thumb { background:#c9a24a; border-radius:5px; border:2px solid transparent; background-clip:padding-box; }

html, body { margin: 0; height: 100%; background: #000; overflow: hidden; touch-action: manipulation; }
#wrap { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; }
#stage { position: relative; width: 780px; height: 590px; flex: none; transform-origin: 50% 50%; overflow: hidden;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
#c { position: absolute; left: 0; top: 0; width: 780px; height: 590px; display: block; }
[hidden] { display: none !important; }

.ov { position: absolute; left: 0; top: 0; transform-origin: 0 0; box-sizing: border-box; margin: 0; }

#rules { overflow-y: auto; overflow-x: hidden; line-height: 1.25; -webkit-user-select: text; user-select: text; scrollbar-width: thin;
  padding: 4px 8px; background: rgba(246, 236, 208, .94); border-radius: 4px; color: #2a1c06 !important; }
#rules ul { margin: 2px 0 6px; padding-left: 18px; }
#rules p { margin: 0 0 6px; }
#rules h4 { margin: 8px 0 2px; font-size: 1em; }

#note { position: absolute; left: 190px; top: 280px; width: 400px; text-align: center; font: 14px Arial, sans-serif; color: #ddd; }

#ui { position: fixed; inset: 0; z-index: 30; pointer-events: none; font: 15px/1.4 PYTimes, "Times New Roman", Times, serif; color: #f4e7c5; }
#ui > * { pointer-events: auto; }
#ui [hidden] { display: none !important; }
:where(#ui) svg { width: 22px; height: 22px; flex: none; }
.py-ansage { position: fixed; left: 50%; top: 8px; transform: translate(-50%, -6px); width: max-content; max-width: min(92vw, 620px); padding: 9px 18px;
  background: rgba(30, 21, 8, .92); border: 1px solid #c9a24a; border-radius: 10px; box-shadow: 0 6px 20px rgba(0, 0, 0, .45);
  font-size: 17px; color: #f8e9b9; text-align: center; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none !important; }
.py-ansage.an { opacity: 1; transform: translate(-50%, 0); }
.py-knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 18px; border-radius: 10px;
  font: 700 16px/1.2 PYTimes, "Times New Roman", serif; color: #2a1c06; background: linear-gradient(#ecc96a, #b08430); border: 1px solid #f6dc8c;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .35); cursor: pointer; }
.py-knopf:hover { filter: brightness(1.08); }
.py-knopf:focus-visible, .py-modus:focus-visible, .py-rund:focus-visible, .py-x:focus-visible { outline: 3px solid #ffe08a; outline-offset: 2px; }
.py-knopf.zweit { color: #f4e7c5; background: rgba(255, 240, 200, .08); border-color: #8d7440; box-shadow: none; }
.py-weiter { position: fixed; left: 50%; transform: translateX(-50%); min-width: 220px; white-space: nowrap; font-size: 18px; animation: pyPuls 1.6s ease-in-out infinite; }
.py-weiter.leise { min-width: 0; font-size: 15px; font-weight: 400; color: #f4e7c5; background: rgba(30, 21, 8, .9); border-color: #8d7440; animation: none; }
@keyframes pyPuls { 50% { box-shadow: 0 0 0 6px rgba(236, 201, 106, .25), 0 3px 10px rgba(0, 0, 0, .35); } }
.py-uebung { position: fixed; display: flex; flex-direction: column; gap: 8px; }
.py-uebung.quer { flex-direction: row; }
.py-rund { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 60px; min-height: 56px; padding: 6px 4px;
  border-radius: 12px; background: rgba(30, 21, 8, .9); border: 1px solid #c9a24a; color: #f8e9b9; font: 13px/1.1 PYTimes, "Times New Roman", serif; cursor: pointer; }
.py-rund:disabled { opacity: .45; cursor: default; }
.py-lade { position: fixed; left: 50%; transform: translateX(-50%); padding: 10px 18px; background: rgba(30, 21, 8, .92); border: 1px solid #c9a24a; border-radius: 10px; font-size: 16px; }
.py-fenster { position: fixed; inset: 0; box-sizing: border-box; display: flex; align-items: center; justify-content: center; padding: 8px 12px; background: rgba(8, 6, 2, .45); }
.py-box { position: relative; box-sizing: border-box; width: min(560px, 100%); max-height: 100%; overflow: auto; overscroll-behavior: contain; padding: 18px 20px 16px;
  border-radius: 14px; border: 2px solid #c9a24a; background: linear-gradient(170deg, rgba(64, 47, 20, .97), rgba(28, 20, 8, .97));
  box-shadow: 0 18px 50px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(255, 230, 160, .12); scrollbar-width: thin; scrollbar-color: #c9a24a rgba(40, 28, 10, .5); }
.py-x { position: sticky; top: 0; float: right; margin: -8px -10px 0 8px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  border-radius: 10px; background: rgba(30, 21, 8, .95); border: 1px solid #8d7440; color: #f4e7c5; cursor: pointer; z-index: 2; }
.py-box h2 { margin: 0 0 6px; font: 26px/1.15 PYImmortal, PYTimes, serif; color: #f3d478; letter-spacing: .02em; }
.py-box h3 { margin: 14px 0 6px; font: 18px/1.2 PYImmortal, PYTimes, serif; color: #e8c766; }
.py-box p { margin: 0 0 10px; }
.py-klein { font-size: 13px; color: #d6c59b; }
.py-tipp { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 12px; }
.py-tipp p { flex: 1 1 220px; margin: 0; }
.py-modi { display: grid; gap: 10px; margin: 10px 0 4px; }
.py-modus { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 14px; text-align: left; border-radius: 12px; cursor: pointer;
  color: #f4e7c5; background: rgba(255, 240, 200, .06); border: 1px solid #8d7440; font: inherit; }
.py-modus svg { width: 38px; height: 38px; color: #e8c766; }
.py-modus b { display: block; font: 19px/1.2 PYImmortal, PYTimes, serif; color: #f3d478; }
.py-modus small { display: block; font-size: 14px; color: #e0d0a8; }
.py-modus:hover, .py-modus.gewaehlt { background: rgba(236, 201, 106, .16); border-color: #ecc96a; }
.py-punkte { margin: 6px 0 10px; font-size: 18px; }
.py-punkte b { font: 40px/1 PYImmortal, PYTimes, serif; color: #ffe08a; margin-right: 6px; font-variant-numeric: tabular-nums; }
.py-rekord { color: #ffe08a; font-weight: 700; }
.py-werte { width: 100%; border-collapse: collapse; margin: 4px 0 12px; font-size: 15px; }
.py-werte th { text-align: left; font-weight: 400; color: #d6c59b; padding: 4px 0; border-bottom: 1px solid rgba(201, 162, 74, .25); }
.py-werte td { text-align: right; padding: 4px 0; border-bottom: 1px solid rgba(201, 162, 74, .25); font-variant-numeric: tabular-nums; }
.py-reihe { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.py-mumie { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 6px 0 4px; padding: 10px 12px; border-radius: 12px;
  background: rgba(236, 201, 106, .1); border: 1px dashed #c9a24a; }
.py-mumie svg { width: 34px; height: 34px; color: #e8c766; }
.py-mumie p { flex: 1 1 200px; margin: 0; }
.py-zahlen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.py-zahlen div { padding: 6px 8px; border-radius: 8px; background: rgba(255, 240, 200, .06); }
.py-zahlen small { display: block; font-size: 13px; color: #d6c59b; }
.py-zahlen b { font-size: 18px; color: #f8e9b9; font-variant-numeric: tabular-nums; }
.py-abz { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 6px; }
.py-abz div { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 6px; border-radius: 10px;
  background: rgba(255, 240, 200, .05); border: 1px solid rgba(141, 116, 64, .6); opacity: .5; filter: grayscale(1); }
.py-abz div.hat { opacity: 1; filter: none; border-color: #c9a24a; background: rgba(236, 201, 106, .12); }
.py-abz svg { width: 30px; height: 30px; color: #e8c766; }
.py-abz b { font-size: 14px; color: #f3d478; }
.py-abz small { font-size: 13px; color: #d6c59b; }
.py-anl h4 { margin: 12px 0 4px; font: 18px/1.2 PYImmortal, PYTimes, serif; color: #e8c766; }
.py-anl ul { margin: 4px 0 8px; padding-left: 20px; }
.py-anl p { margin: 0 0 8px; }
.py-liste { margin: 0; padding: 0 0 0 26px; }
.py-liste li { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; border-bottom: 1px solid rgba(201, 162, 74, .2); }
.py-liste b { font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .py-fenster { padding-top: 66px; } }
@media (max-width: 420px) { .py-zahlen { grid-template-columns: repeat(2, 1fr); } .py-box { padding: 14px 14px 12px; } .py-box h2 { font-size: 22px; } }

:root { --sgzl-grund: rgba(30, 21, 8, .96); --sgzl-text: #f4e7c5; --sgzl-akzent: #e8c766; --sgzl-akzent-text: #2a1c06; }
#lo-lern { position: fixed; z-index: 60; width: min(340px, calc(100vw - 24px)); min-height: 66px; justify-content: center; transform: translateX(-50%);
  font-family: PYTimes, 'Times New Roman', serif; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  background: linear-gradient(170deg, rgba(64, 47, 20, .97), rgba(28, 20, 8, .97)); box-shadow: 0 6px 22px rgba(0, 0, 0, .6); }
#lo-lern b { font: 19px PYImmortal, PYTimes, serif; letter-spacing: .05em; text-transform: uppercase; color: #f3d478; }
#lo-lern small { font-size: 14px; }
#pyLernOrt { position: fixed; z-index: 58; box-sizing: border-box; overflow-y: auto; font: 15px/1.4 PYTimes, 'Times New Roman', serif; }
#pyLernOrt .sgzl { margin: 0; padding: 10px 52px 12px 14px; }
#pyLernOrt .sgzl-titel { font: 19px/1.2 PYImmortal, PYTimes, serif; letter-spacing: .03em; color: #f3d478; }
#pyLernOrt .sgzl-kopf { font-family: system-ui, 'Segoe UI', Arial, sans-serif; }
#pyLernOrt .sgzl-text { font-size: 16px; line-height: 1.4; }
#pyLernOrt .sgzl-weiter { min-height: 44px; font: 700 16px PYTimes, 'Times New Roman', serif; }
#pyLernOrt .sgzl-x { width: 44px; height: 44px; }
#pyLernOrt.lo-schmal .sgzl { padding: 9px 56px 11px 12px; }
#pyLernOrt.lo-schmal .sgzl-titel { font-size: 17px; }
#pyLernOrt.lo-schmal .sgzl-text { font-size: 15px; line-height: 1.36; }
.py-lernziel { position: fixed; z-index: 57; box-sizing: border-box; pointer-events: none; border-radius: 6px; background: rgba(255, 224, 138, .14); }
#lernEnde { position: fixed; z-index: 85; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(480px, calc(100vw - 24px));
  max-height: calc(100vh - 24px); overflow-y: auto; box-sizing: border-box; padding: 20px 20px 18px; text-align: center;
  background: linear-gradient(170deg, rgba(64, 47, 20, .97), rgba(28, 20, 8, .97)); border: 2px solid #c9a24a; border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .6); color: #f4e7c5; font: 16px/1.45 PYTimes, 'Times New Roman', serif; }
#lernEnde h2 { margin: 4px 48px 10px; font: 22px PYImmortal, PYTimes, serif; letter-spacing: .05em; color: #f3d478; }
#lernEnde p { margin: 0 0 10px; }
#lernEnde .le-klein { font-size: 14px; color: #d6c59b; }
#lernEnde .le-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 4px; }
#lernEnde .le-knopf { flex: 1 1 180px; min-height: 46px; padding: 8px 14px; border-radius: 10px; cursor: pointer; touch-action: manipulation;
  font: 700 16px/1.15 PYTimes, 'Times New Roman', serif; color: #2a1c06; background: linear-gradient(#ecc96a, #b08430); border: 1px solid #f6dc8c;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .35); }
#lernEnde .le-zweit { color: #f4e7c5; background: rgba(255, 240, 200, .08); border-color: #8d7440; box-shadow: none; }
#lernEnde .le-knopf:hover { filter: brightness(1.08); }
#lernEnde .le-knopf:focus-visible, #lernEnde .le-zu:focus-visible { outline: 3px solid #ffe08a; outline-offset: 2px; }
#lernEnde .le-zu { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; padding: 10px; border-radius: 10px; cursor: pointer;
  color: #f4e7c5; background: rgba(30, 21, 8, .95); border: 1px solid #8d7440; }
#lernEnde .le-zu svg { display: block; width: 100%; height: 100%; }
