/* Stick Man Bot. © 2026 Perparim Gashi. Alle Rechte vorbehalten. */
:root {
  --papier: #f2ede2;
  --papier-hell: #faf7f0;
  --tusche: #1d1c1a;
  --grau: #6a655c;
  --linie: rgba(29, 28, 26, .22);
  --akzent: #c8452c;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--papier);
  color: var(--tusche);
  font: 16px/1.5 var(--sans);
  -webkit-text-size-adjust: 100%;
}
a { color: inherit; }
h1, h2 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -.01em; }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }

/* Startseite */
.seite {
  max-width: 1040px;
  margin: 0 auto;
  padding: max(40px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom));
}
.kopf { border-bottom: 2px solid var(--tusche); padding-bottom: 20px; margin-bottom: 28px; }
.kopf h1 { font-size: clamp(44px, 9vw, 76px); line-height: 1; }
.kopf p { margin: 10px 0 0; font-family: var(--serif); font-size: 19px; color: var(--grau); }
.auswahl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; list-style: none; margin: 0; padding: 0; }
.spielkarte {
  display: block;
  height: 100%;
  text-decoration: none;
  background: var(--papier-hell);
  border: 1px solid var(--linie);
  transition: border-color .15s, transform .15s;
}
.spielkarte:hover { border-color: var(--tusche); transform: translateY(-2px); }
.spielkarte canvas { display: block; width: 100%; height: 190px; border-bottom: 1px solid var(--linie); }
.spielkarte-text { padding: 14px 16px 16px; }
.spielkarte .art { margin: 0; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--grau); }
.spielkarte h2 { font-size: 27px; margin-top: 2px; }
.spielkarte .text { margin: 6px 0 12px; font-size: 15px; color: #3e3a34; }
.karte-best { margin: 0; font-size: 14px; font-variant-numeric: tabular-nums; border-top: 1px solid var(--linie); padding-top: 9px; }
.fuss { margin-top: 34px; padding-top: 16px; border-top: 1px solid var(--linie); font-size: 14px; color: var(--grau); }
.fuss p { margin: 0 0 6px; }
.rechtlich a { margin-left: 10px; }

/* Textseite */
.textseite { max-width: 640px; }
.textseite h1 { font-size: 42px; margin-bottom: 18px; }
.textseite h2 { font-size: 22px; margin: 24px 0 6px; }
.textseite address { font-style: normal; }
.textseite p { margin: 0 0 10px; }

/* Spiel */
body.spiel { position: fixed; inset: 0; overflow: hidden; overscroll-behavior: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
#spiel { position: absolute; inset: 0; }
.buehne { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pad { position: absolute; inset: 0; display: flex; touch-action: none; }
.pad-zone {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 calc(16px + env(safe-area-inset-bottom));
  border: 0;
  background: transparent;
  color: var(--tusche);
  font: inherit;
  touch-action: none;
  cursor: pointer;
}
.pad-zone + .pad-zone { border-left: 1px dashed rgba(29, 28, 26, .1); }
.pad-text {
  padding: 8px 18px;
  min-width: 120px;
  border: 1px solid var(--linie);
  background: rgba(250, 247, 240, .82);
  font-size: 15px;
}
.pad-zone.aktiv .pad-text { background: var(--tusche); color: var(--papier-hell); }

.hud {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(8px + env(safe-area-inset-top)) 10px 8px;
  background: rgba(242, 237, 226, .9);
  border-bottom: 1px solid var(--linie);
}
.hud-mitte { flex: 1; min-width: 0; text-align: center; line-height: 1.15; }
.hud-punkte { display: block; font: 22px/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.hud-info { display: block; font-size: 12px; color: var(--grau); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.hud-knopf {
  min-height: 44px;
  min-width: 44px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--linie);
  background: transparent;
  color: inherit;
  font: 13px var(--sans);
  text-decoration: none;
  cursor: pointer;
}
.hud-knopf:hover { border-color: var(--tusche); }
.hud.ruhig .hud-mitte { visibility: hidden; }

.toast {
  position: absolute;
  top: calc(84px + env(safe-area-inset-top));
  left: 0; right: 0;
  text-align: center;
  font: 22px var(--serif);
  opacity: 0;
  pointer-events: none;
}
.toast.zeigen { animation: toast 1.5s ease-out; }
@keyframes toast { 0% { opacity: 0; } 12%, 70% { opacity: 1; } 100% { opacity: 0; } }

.overlay {
  position: absolute;
  inset: 0;
  display: none;
  overflow-y: auto;
  padding: calc(70px + env(safe-area-inset-top)) 16px 16px;
  background: rgba(242, 237, 226, .78);
}
.overlay.offen { display: flex; }
.karte {
  margin: auto;
  width: 100%;
  max-width: 500px;
  padding: 22px 24px 24px;
  background: var(--papier-hell);
  border: 1px solid var(--tusche);
}
.karte h1 { font-size: 44px; line-height: 1.05; }
.karte h2 { font-size: 32px; line-height: 1.1; }
.marke { margin: 0 0 2px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--grau); }
.claim { margin: 6px 0 12px; font: 18px/1.35 var(--serif); }
.anleitung, .ergebnis { margin: 0 0 12px; padding: 0; list-style: none; font-size: 15px; }
.anleitung li, .ergebnis li { padding: 6px 0; border-top: 1px solid var(--linie); }
.bestwert { margin: 0 0 14px; font-size: 14px; color: var(--grau); font-variant-numeric: tabular-nums; }
.endpunkte { margin: 6px 0 0; font: 54px/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 10px; }
.knopf {
  flex: 1 1 auto;
  min-height: 48px;
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--tusche);
  background: transparent;
  color: var(--tusche);
  font: 16px var(--sans);
  text-decoration: none;
  cursor: pointer;
}
.knopf:hover { background: rgba(29, 28, 26, .06); }
.knopf-haupt { background: var(--tusche); color: var(--papier-hell); }
.knopf-haupt:hover { background: #3a3733; }
.hinweis-js { padding: 24px; }
.hilfe { margin: 0 0 10px; font-size: 15px; }
.hilfe summary { min-height: 32px; cursor: pointer; color: var(--grau); }
.levelgitter {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 5px;
  max-height: 212px;
  overflow-y: auto;
  margin: 0 0 14px;
  padding: 1px 4px 1px 1px;
  position: relative;
}
.level {
  min-height: 40px;
  padding: 0;
  border: 1px solid var(--linie);
  background: transparent;
  color: var(--tusche);
  font: 14px var(--sans);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.level:hover:enabled { border-color: var(--tusche); }
.level:disabled { color: rgba(29, 28, 26, .32); background: rgba(29, 28, 26, .04); cursor: default; }
.level.geschafft { background: rgba(29, 28, 26, .1); }
.level.aktuell { border: 2px solid var(--akzent); }

@media (max-width: 820px) {
  .seite { padding-top: max(26px, env(safe-area-inset-top)); }
  .auswahl { grid-template-columns: 1fr; gap: 16px; }
  .spielkarte canvas { height: 150px; }
}
@media (max-height: 520px) {
  .anleitung li { padding: 3px 0; font-size: 14px; }
  .karte { max-width: 640px; padding: 14px 18px; }
  .overlay { padding-top: calc(66px + env(safe-area-inset-top)); }
  .pad-text { padding: 4px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .spielkarte, .spielkarte:hover { transition: none; transform: none; }
}
