/* SimiFactory: dunkles Werkshallen-Design mit Signalgelb */
:root {
  --bg: #14130f;
  --bg2: #1c1a14;
  --bg3: #26231b;
  --line: #38342a;
  --text: #f6f0e2;
  --muted: #b2a88f;
  --gelb: #ffc21a;
  --rot: #ff6b3d;
  --tuerkis: #37d6c0;
  --radius: 10px;
  --titel: 'Bricolage Grotesque', Inter, system-ui, sans-serif;
  --breit: 1180px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: var(--gelb); text-underline-offset: 2px; }
a:hover { color: #ffd65e; }
h1, h2, h3 { font-family: var(--titel); font-weight: 800; line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
small { font-weight: 400; }
:focus-visible { outline: 3px solid var(--gelb); outline-offset: 2px; border-radius: 3px; }
.wrap { width: min(100% - 40px, var(--breit)); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--gelb); color: #14130f; padding: 8px 14px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.dach { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gelb); margin-bottom: .6em; }
.anriss { font-size: 1.1rem; color: #dcd4bf; max-width: 62ch; }

/* Knoepfe */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--gelb); color: #14130f; border: 2px solid var(--gelb); border-radius: 8px;
  padding: 9px 18px; font: 700 .95rem/1.2 Inter, system-ui, sans-serif; text-decoration: none; cursor: pointer;
  transition: transform .1s ease, background .15s ease;
}
.knopf:hover { background: #ffd65e; border-color: #ffd65e; color: #14130f; }
.knopf:active { transform: translateY(1px); }
.knopf:disabled { opacity: .55; cursor: wait; }
.knopf.zweit { background: transparent; color: var(--text); border-color: #5b5444; }
.knopf.zweit:hover { background: var(--bg3); border-color: #7a715c; color: var(--text); }
.knopf.gefahr { background: transparent; color: #ff9a7a; border-color: #a34a2c; }
.knopf.gefahr:hover { background: #3a1b10; color: #ffb39a; }
.knopf.gross { padding: 13px 24px; font-size: 1.02rem; }
.knopf.klein { padding: 6px 13px; font-size: .86rem; }
.knoepfe { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.4em; }
.knoepfe.mitte { justify-content: center; }

/* Kopf */
.kopf { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 20; }
.kopf-innen { display: flex; align-items: center; gap: 28px; min-height: 62px; }
.marke { display: inline-flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; font: 500 1.28rem var(--titel); }
.marke:hover { color: var(--text); }
.marke b { font-weight: 800; color: var(--gelb); }
.haupt { display: flex; gap: 4px; }
.haupt a { color: #d4ccb6; text-decoration: none; font-weight: 600; font-size: .95rem; padding: 7px 12px; border-radius: 6px; }
.haupt a:hover { background: var(--bg3); color: var(--text); }
.haupt a[aria-current] { color: var(--gelb); }
.konto-kurz { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.link-leise { color: #d4ccb6; font-weight: 600; font-size: .95rem; text-decoration: none; }
.chip-user { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text); line-height: 1.15; }
.chip-user:hover { color: var(--gelb); }
.chip-user small { display: block; color: var(--muted); font-size: .76rem; }
.chip-user b { font-size: .92rem; }
.avatar { display: inline-grid; place-items: center; flex: none; border-radius: 7px; background: var(--c); color: #14130f; font-family: var(--titel); font-weight: 800; line-height: 1; }

/* Startseite */
.buehne { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background: radial-gradient(1000px 500px at 80% 0%, #2d2613, transparent 70%); }
.streifen { height: 10px; background: repeating-linear-gradient(-45deg, var(--gelb) 0 18px, #14130f 18px 36px); }
.buehne-innen { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: center; padding-block: clamp(32px, 6vw, 72px); }
.buehne h1 { font-size: clamp(2.8rem, 7vw, 5.2rem); line-height: .98; }
.buehne h1 em { font-style: normal; color: var(--gelb); }
.buehne-spiel { display: block; background: var(--bg2); color: var(--text); text-decoration: none; border-radius: 14px; overflow: hidden; border: 1px solid #574c2c; box-shadow: 0 24px 60px rgba(0, 0, 0, .55); transition: transform .2s ease; }
.buehne-spiel:hover { transform: translateY(-3px); }
.buehne-spiel:hover { color: var(--text); }
.buehne-spiel img { display: block; width: 100%; height: auto; }
.buehne-etikett { display: block; padding: 12px 18px 14px; }
.buehne-etikett b { display: block; font: 800 1.35rem var(--titel); }
.buehne-etikett span { font-size: .92rem; color: #dcd4bf; }
.abschnitt { padding-block: clamp(32px, 5vw, 56px); }
.abschnitt + .abschnitt { padding-top: 0; }
.kopfzeile { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.kopfzeile a { font-size: .9rem; font-weight: 600; }
.karten { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.karte { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s ease, transform .15s ease; }
.karte:hover { border-color: var(--akzent); transform: translateY(-3px); }
.karte-bild { display: block; aspect-ratio: 16 / 9; overflow: hidden; }
.karte-bild svg { display: block; width: 100%; height: 100%; }
.karte-text { padding: 16px 18px 20px; }
.karte-text p:last-child { margin: 0; color: #d4ccb6; font-size: .95rem; }
.karte-art { font-size: .78rem; font-weight: 700; letter-spacing: .05em; color: var(--akzent); margin-bottom: .35em; text-transform: uppercase; }
.karte h3 { font-size: 1.4rem; margin-bottom: .3em; }
.karte h3 a { color: var(--text); text-decoration: none; }
.karte h3 a::after { content: ''; position: absolute; inset: 0; }
.karte { position: relative; }
.karte h3 a:hover { color: var(--akzent); }

.band-tag { background: #1f1b10; border-block: 1px solid #4a4020; padding-block: clamp(32px, 5vw, 56px); }
.band-innen { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 40px; align-items: start; }
.band-kopf p:not(.dach) { color: #d4ccb6; }
.band-listen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.kurzliste { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; min-width: 0; }
.kurzliste h3 a { color: var(--text); text-decoration: none; }
.kurzliste h3 a:hover { color: var(--gelb); }
.zwei-spalten { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
.werk { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.werk ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; color: #d4ccb6; }
.werk b { color: var(--text); }
.werk-zahl { margin: 18px 0 0; color: var(--gelb); font-weight: 700; }

/* Listen */
.liste { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.liste.breit, .breit { max-width: 720px; }
.zeile { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 7px; background: var(--bg2); }
.kurzliste .zeile { background: transparent; padding: 5px 2px; grid-template-columns: 22px minmax(0, 1fr) auto; font-size: .88rem; }
.zeile.ich { outline: 2px solid var(--gelb); outline-offset: -2px; }
.platz { font: 800 .98rem var(--titel); color: var(--muted); text-align: center; }
.top1 .platz { color: var(--gelb); }
.top2 .platz { color: #d9d4c7; }
.top3 .platz { color: #dd9866; }
.wer { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--text); text-decoration: none; font-weight: 600; }
.wer span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wer:hover { color: var(--gelb); }
.wert { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; color: #e8e0cb; }
.leer { color: var(--muted); font-size: .94rem; margin: .5em 0 0; }

/* Spielseite */
.spielrahmen { background: #0c0b08; padding: 10px; }
.spielflaeche {
  --verhaeltnis: 1.6;
  width: min(100%, calc((100vh - 136px) * var(--verhaeltnis)), 1320px); min-width: min(100%, 640px); margin-inline: auto;
  display: flex; flex-direction: column; background: var(--bg); border-radius: 8px; overflow: hidden; outline: none; border: 1px solid var(--line);
}
.spielfeld { position: relative; flex: 1; min-height: 0; aspect-ratio: var(--verhaeltnis); }
.spielflaeche:fullscreen { width: 100vw; height: 100vh; border: 0; border-radius: 0; }
.spielflaeche:fullscreen .spielfeld { aspect-ratio: auto; }
#leinwand { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; cursor: pointer; }
.ueberlage { position: absolute; inset: 0; display: grid; place-items: center; padding: 14px; background: rgba(10, 9, 6, .78); overflow-y: auto; }
.startbild { position: absolute; inset: 0; z-index: -1; opacity: .5; }
.startbild svg { display: block; width: 100%; height: 100%; }
.ueberlage:has(.startbild) { isolation: isolate; background: #0c0b08; }
.ueberlage[hidden] { display: none; }
.tafel { position: relative; width: min(100%, 560px); max-height: 100%; overflow-y: auto; background: var(--bg2); border: 1px solid #574c2c; border-radius: 12px; padding: clamp(16px, 3vw, 28px); text-align: center; box-shadow: 0 16px 50px rgba(0, 0, 0, .6); }
.tafel h1, .tafel h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); margin-bottom: .25em; }
.anleitung { text-align: left; margin: 0; padding: 12px 12px 12px 34px; background: var(--bg); border-radius: 8px; font-size: .92rem; color: #d4ccb6; display: grid; gap: 4px; }
.endstand { font: 800 clamp(2.4rem, 7vw, 3.6rem)/1 var(--titel); color: var(--gelb); margin: .1em 0 .2em; }
.endstand small { font-size: .42em; color: var(--muted); font-weight: 500; }
.rekord { display: inline-block; background: var(--gelb); color: #14130f; font-weight: 800; font-size: .86rem; padding: 3px 11px; border-radius: 99px; margin-bottom: 8px; }
.detailzeile { color: var(--muted); font-size: .9rem; display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: center; margin-bottom: 8px; }
.ergebnis-status, .ep { color: #d4ccb6; font-size: .94rem; margin-bottom: 8px; }
.ep { color: var(--tuerkis); font-weight: 700; }
.aufstieg { background: #2a2410; border: 1px solid #6d5d1f; border-radius: 7px; padding: 6px 10px; }
.gast-hinweis { background: var(--bg); border-radius: 8px; padding: 10px 14px; font-size: .92rem; margin-bottom: 0; }
.neu-erfolge, .erfolge { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 7px; text-align: left; }
.neu-erfolge li, .erfolge li { display: flex; align-items: center; gap: 12px; background: var(--bg); border-radius: 8px; padding: 8px 12px; }
.neu-erfolge small, .erfolge small { display: block; color: var(--muted); font-size: .84rem; line-height: 1.35; }
.erfolg-icon { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 7px; background: var(--gelb); color: #14130f; font: 800 1.05rem var(--titel); }
.mini-liste { list-style: none; padding: 0; margin: 10px 0 0; font-size: .9rem; }
.mini-liste li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 6px; padding: 3px 8px; text-align: left; border-radius: 5px; }
.mini-liste li span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-liste .ich { background: #3b3313; color: var(--gelb); }
.spielleiste { flex: none; display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-top: 1px solid var(--line); background: var(--bg2); }
.spielname { margin-right: auto; font-size: .86rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spielname b { color: var(--text); margin-right: 6px; }
.rund { width: 34px; height: 34px; border-radius: 7px; border: 1px solid #574c2c; background: rgba(20, 19, 15, .86); color: var(--text); font-size: .86rem; cursor: pointer; padding: 0; }
.rund:hover { background: var(--bg3); }
.rund.aus { color: #7f7560; text-decoration: line-through; }
.rund[hidden] { display: none; }
.unter-spiel { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); gap: 36px; padding-block: 36px 56px; }
.spiel-info p { color: #d4ccb6; }
.mehr { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.mehr a { display: block; padding: 9px 12px; border-radius: 7px; background: var(--bg2); text-decoration: none; color: var(--text); }
.mehr a:hover { background: var(--bg3); color: var(--text); }
.mehr span { display: block; color: var(--muted); font-size: .86rem; line-height: 1.35; }

/* Tagesschicht, Rangliste */
.seitenkopf { padding-block: clamp(30px, 5vw, 56px) 18px; }
.serie { display: inline-block; background: #2a2410; border: 1px solid #6d5d1f; border-radius: 8px; padding: 7px 14px; }
.serie b { color: var(--gelb); font: 800 1.2rem var(--titel); }
.tagesraster { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding-bottom: 56px; align-items: start; }
.tageskarte { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; padding-bottom: 14px; }
.tageskarte .liste, .tageskarte .leer { margin-inline: 12px; }
.tageskarte .zeile { background: var(--bg); }
.tageskarte-text { padding: 14px 16px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; }
.tageskarte h2 { margin: 0; font-size: 1.35rem; }
.gespielt { order: 3; width: 100%; margin: 0; font-size: .9rem; color: #d4ccb6; }
.reiter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.reiter a { padding: 7px 14px; border-radius: 7px; background: var(--bg2); color: #d4ccb6; text-decoration: none; font-weight: 600; font-size: .94rem; }
.reiter a:hover { background: var(--bg3); color: var(--text); }
.reiter a[aria-current] { background: var(--gelb); color: #14130f; }
.reiter.klein a { padding: 4px 11px; font-size: .86rem; }
.hinweis { color: var(--muted); font-size: .92rem; }
.mitte-text { margin-top: 24px; }
section.wrap:has(> .liste, > .breit, > .reiter) { padding-bottom: 56px; }

/* Profil */
.stempelkarte { margin-top: clamp(24px, 4vw, 44px); background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: clamp(18px, 3vw, 30px); width: min(100% - 40px, var(--breit)); }
.stempel-kopf { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.stempel-kopf h1 { margin: 0; overflow-wrap: anywhere; }
.stempel-kopf .dach { margin: 0 0 3px; }
.titel { margin: 2px 0 0; color: #d4ccb6; font-weight: 600; }
.rechts { margin-left: auto; }
.fortschritt { height: 10px; border-radius: 99px; background: var(--bg); margin-top: 18px; overflow: hidden; }
.fortschritt i { display: block; height: 100%; background: var(--gelb); }
.fortschritt-text { font-size: .88rem; color: var(--muted); margin: 6px 0 16px; }
.zahlen { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; }
.zahlen div { background: var(--bg); border-radius: 8px; padding: 10px 14px; }
.zahlen dt { font-size: .8rem; color: var(--muted); }
.zahlen dd { margin: 0; font: 800 1.45rem var(--titel); }
.bestwerte { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.bestwert { display: block; padding: 14px 16px; background: var(--bg2); border: 1px solid var(--line); border-left: 4px solid var(--akzent); border-radius: 8px; color: var(--text); text-decoration: none; }
.bestwert:hover { color: var(--text); background: var(--bg3); }
.bestwert span { display: block; font-size: .86rem; color: var(--muted); }
.bestwert b { font: 800 1.25rem var(--titel); }
h2 small { font: 500 .95rem Inter, sans-serif; color: var(--muted); margin-left: 6px; }
.erfolge { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.erfolge li { background: var(--bg2); }
.erfolge .fehlt { opacity: .52; }
.erfolge .fehlt .erfolg-icon { background: var(--bg3); color: var(--muted); }

/* Formulare und Texte */
.formular { width: min(100% - 40px, 480px); padding-block: clamp(30px, 5vw, 56px); }
.formular h2 { margin-top: 1.6em; font-size: 1.25rem; }
.formular form { display: grid; gap: 14px; margin-bottom: 12px; }
.formular form:has(> .knopf:only-of-type) { justify-items: start; }
label { display: grid; gap: 5px; font-weight: 600; font-size: .94rem; }
label small { color: var(--muted); font-size: .82rem; }
input:not([type=hidden]) { width: 100%; padding: 10px 12px; background: var(--bg); color: var(--text); border: 1px solid #5b5444; border-radius: 7px; font: 400 1rem Inter, system-ui, sans-serif; }
input:focus { border-color: var(--gelb); outline: 2px solid var(--gelb); outline-offset: 0; }
.falle { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fehler, .erfolgreich { padding: 10px 14px; border-radius: 8px; font-size: .94rem; }
.fehler { background: #3a1b10; border: 1px solid #a34a2c; color: #ffc7b3; }
.erfolgreich { background: #103029; border: 1px solid #2a8474; color: #b4f2e6; }
.code-box { font: 700 1.2rem ui-monospace, Consolas, monospace; letter-spacing: .05em; background: var(--bg); border: 2px dashed var(--gelb); border-radius: 8px; padding: 14px; text-align: center; color: var(--gelb); overflow-wrap: anywhere; }
.unter-form { font-size: .92rem; color: var(--muted); }
.rechtstext { max-width: 760px; padding-block: clamp(30px, 5vw, 56px); margin-left: max(20px, calc((100% - var(--breit)) / 2)); }
.rechtstext h2 { font-size: 1.2rem; margin-top: 1.7em; margin-bottom: .4em; }
.rechtstext p { color: #dcd4bf; overflow-wrap: anywhere; }
.fehlerseite { padding-bottom: 80px; }

/* Fuss, Meldung */
.fuss { border-top: 1px solid var(--line); padding-block: 26px; font-size: .9rem; color: var(--muted); }
.fuss-innen { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; }
.fuss b { color: var(--text); }
.fuss nav { display: flex; gap: 18px; }
.fuss a { color: #d4ccb6; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--gelb); color: #14130f; font-weight: 700; padding: 11px 18px; border-radius: 8px; z-index: 50; box-shadow: 0 8px 30px rgba(0, 0, 0, .5); max-width: calc(100% - 30px); }

@media (max-width: 980px) {
  .buehne-innen { grid-template-columns: minmax(0, 1fr); }
  .band-innen { grid-template-columns: minmax(0, 1fr); }
  .unter-spiel { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .spiel-info { grid-column: 1 / -1; }
  .tagesraster, .karten { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .kopf { position: static; }
  .kopf-innen { flex-wrap: wrap; gap: 6px 14px; padding-block: 10px; }
  .haupt { order: 3; width: 100%; margin-inline: -12px; }
  .konto-kurz .knopf.klein { display: none; }
  .karten, .tagesraster, .band-listen, .zwei-spalten, .unter-spiel, .bestwerte { grid-template-columns: minmax(0, 1fr); }
  .zahlen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spielrahmen { padding: 0; }
  .spielflaeche { border-radius: 0; border-inline: 0; width: 100%; min-width: 0; }
  .spielflaeche:not(.laeuft) .spielfeld { aspect-ratio: auto; flex: none; height: max(68vh, 460px); }
  .fuss-innen { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.quer-hinweis { display: none; margin: 10px 0 0; color: var(--gelb); font-size: .9rem; }
@media (orientation: portrait) and (max-width: 680px) { .quer-hinweis { display: block; } }
