/**
 * start.css — die Startseite: Spielart, Sitze mit Namen und Farben, Stufe, Beitreten und Weiterspielen.
 *
 * Copyright (c) 2026 Rico Pinzke. Alle Rechte vorbehalten.
 * Stand: 2026-11-23 13:38
 */

.startseite {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 100vh;
  min-height: 100svh;
  padding: max(20px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px))
    max(40px, calc(env(safe-area-inset-bottom, 0px) + 20px)) max(16px, env(safe-area-inset-left, 0px));
}

@media (display-mode: standalone), (display-mode: fullscreen) {
  .startseite {
    min-height: calc(100svh + env(safe-area-inset-top, 0px));
    padding-top: calc(env(safe-area-inset-top, 0px) + 20px);
  }

  .startseite .startbuehne {
    margin-top: 0;
  }
}

:root {
  --buehnenumriss: color-mix(in srgb, var(--rand) 90%, var(--text));
  --buehnenschatten: rgba(70, 55, 25, .13);
  --kehle: 18px;
}

:root[data-theme="dunkel"] {
  --buehnenumriss: color-mix(in srgb, var(--rand) 70%, #ffffff);
  --buehnenschatten: rgba(0, 0, 0, .5);
}

.startbuehne {
  width: 100%;
  max-width: 420px;
  margin: auto;
  filter: drop-shadow(0 0 .5px var(--buehnenumriss)) drop-shadow(0 12px 22px var(--buehnenschatten));
  transform: translateZ(0);
}

.startkopf {
  display: flex;
  justify-content: flex-end;
}

.lasche {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px 3px 14px;
  border-radius: var(--kehle) var(--kehle) 0 0;
  background: var(--karte);
}

.lasche::before {
  content: "";
  position: absolute;
  left: calc(var(--kehle) * -1);
  bottom: 0;
  width: var(--kehle);
  height: var(--kehle);
  background: radial-gradient(circle at 0 0, transparent calc(var(--kehle) - .5px), var(--karte) var(--kehle));
}

.schieber {
  --feld: 28px;
  flex: none;
  --luecke: 2px;
  position: relative;
  display: flex;
  gap: var(--luecke);
  padding: 3px;
  border-radius: 999px;
  background: var(--karte2);
  touch-action: none;
  cursor: pointer;
}

.schieber-knopf {
  position: absolute;
  top: 3px;
  left: 3px;
  width: var(--feld);
  height: var(--feld);
  border-radius: 50%;
  background: linear-gradient(var(--knopf1), var(--knopf2));
  box-shadow: var(--schatten2);
  transform: translateX(calc(var(--stelle, 0) * (var(--feld) + var(--luecke))));
}

.schieber.bereit .schieber-knopf {
  transition: transform .22s cubic-bezier(.3, .7, .3, 1);
}

.schieber.zieht .schieber-knopf {
  transform: translateX(var(--zug, 0));
  transition: none;
}

.themaknopf {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: var(--feld);
  height: var(--feld);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--leise);
  cursor: pointer;
  transition: color .15s;
}

.themaknopf svg.i {
  width: 16px;
  height: 16px;
}

.themaknopf.an {
  color: var(--goldtext);
}

@media (prefers-reduced-motion: reduce) {
  .schieber.bereit .schieber-knopf {
    transition: none;
  }
}

.lasche-trenner {
  width: 1px;
  height: 18px;
  margin: 0 2px;
  background: var(--rand);
}

.lasche .rund {
  width: 32px;
  height: 32px;
  background: transparent;
  box-shadow: none;
}

.lasche .rund svg.i {
  width: 19px;
  height: 19px;
}

.startkarte {
  width: 100%;
  background: var(--karte);
  border-radius: 22px 0 22px 22px;
  padding: 22px 20px 20px;
}

.startmarke {
  display: flex;
  gap: 13px;
  align-items: center;
  margin: 0 0 18px;
}

.startmarke .logo {
  width: 56px;
  height: 56px;
  flex: none;
  fill: var(--symbol);
  padding: 8px;
  border-radius: 15px;
  background: var(--karte2);
  box-shadow: var(--schatten2);
}

.startmarke h1 {
  margin: 0;
  font-size: 33px;
  letter-spacing: .5px;
  line-height: 1.05;
}

.startmarke .punkt {
  color: var(--symbol);
}

.startmarke p {
  margin: 4px 0 0;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--leise);
}

.abschnitt {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--rand) 70%, transparent);
  border-radius: 18px;
  background: color-mix(in srgb, var(--karte2) 45%, var(--karte));
}

.abschnitt-titel {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font: 700 13px "Segoe UI", system-ui, sans-serif;
  color: var(--text);
}

.schritt {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(var(--knopf1), var(--knopf2));
  color: var(--goldtext);
  font: 700 12px / 1 "Segoe UI", system-ui, sans-serif;
  font-variant-numeric: lining-nums tabular-nums;
  padding-bottom: 1px;
}

.abschnitt .segment[hidden] {
  display: none;
}


.sitzliste {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.sitzzeile {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px 0 8px;
  border-radius: 999px;
  border: 1px dashed var(--rand);
}

.sitzzeile.frei {
  opacity: .6;
}

.sitzname {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

button.sitzname {
  align-self: stretch;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: 600 14px "Segoe UI", system-ui, sans-serif;
  text-align: left;
  cursor: text;
}

button.sitzname.leer {
  color: var(--leise);
  font-weight: 400;
}

button.sitzname:focus-visible {
  outline: 2px solid var(--gold1);
  outline-offset: 2px;
  border-radius: 6px;
}

.namenfenster {
  width: min(340px, 100%);
  --fensterrand: 20px;
}

.namenfenster .fenster-inhalt {
  padding-bottom: var(--fensterrand);
}

.namenfenster h2 {
  font-size: 18px;
}

.nameneingabe {
  height: 44px;
  padding: 0 16px;
  border: 1.5px solid var(--rand);
  border-radius: 999px;
  background: var(--karte2);
  color: var(--text);
  font: 600 16px "Segoe UI", system-ui, sans-serif;
  outline: none;
}

.nameneingabe:focus {
  border-color: var(--gold1);
}

.namenknoepfe {
  display: flex;
  gap: 10px;
}

.namenknoepfe .knopf {
  flex: 1 1 0;
  height: 40px;
}

.sitzzeile.frei .sitzname {
  font-weight: 400;
  color: var(--leise);
}

.sitzmarke {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.sitzmarke svg.i {
  width: 16px;
  height: 16px;
}

.erklaer {
  margin: 2px 3px 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--leise);
}

.erklaer b {
  color: var(--text);
}

.zeile2 {
  display: block;
  margin-top: 5px;
}

.knopf.startknopf {
  height: 46px;
  padding: 0 18px;
  font-size: 17px;
  border-radius: 999px;
  gap: 9px;
}

.knopf.startknopf svg.i {
  width: 19px;
  height: 19px;
}

.unten > div {
  margin-top: 20px;
}

.weiterspielen[hidden] {
  display: none;
}

.partieliste {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.partiezeile {
  display: flex;
  align-items: center;
  gap: 8px;
}

.partiezeile .weiterzeile {
  flex: 1 1 auto;
  min-width: 0;
}

.partiezeile.fragt .tonne {
  border-color: var(--rot);
  background: var(--rot);
  color: var(--hell);
}

.trenner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--leise);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.trenner::before,
.trenner::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rand);
}

.hierher {
  display: block;
  width: 100%;
  margin: 14px 0 4px;
  border: 0;
  background: none;
  color: var(--leise);
  font: 12.5px "Segoe UI", system-ui, sans-serif;
  text-decoration: underline;
  text-decoration-color: var(--rand);
  text-underline-offset: 3px;
  cursor: pointer;
}

.codezeile {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 6px 0 16px;
  margin: 0;
  border: 1.5px solid var(--rand);
  border-radius: 999px;
  background: var(--karte2);
  transition: border-color .15s;
}

.codezeile:focus-within {
  border-color: var(--gold1);
}

.codezeile span {
  flex: none;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--leise);
}

.codezeile input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
  color: var(--text);
  font: 20px Georgia, "Times New Roman", serif;
  letter-spacing: 5px;
  text-transform: uppercase;
}

.codezeile input::placeholder {
  color: var(--leise);
  opacity: .5;
  letter-spacing: 6px;
}

.codezeile .rund {
  width: 32px;
  height: 32px;
  border: 1px solid var(--rand);
  color: var(--symbol);
  box-shadow: none;
}

.codezeile .rund svg.i {
  width: 17px;
  height: 17px;
}

.weiterzeile {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 16px;
  border: 1.5px solid var(--rand);
  border-radius: 999px;
  background: var(--karte2);
  color: var(--text);
  font-size: 13.5px;
  text-decoration: none;
}

.weiterzeile svg.i {
  width: 16px;
  height: 16px;
  color: var(--symbol);
}

.weiterzeile b {
  font-weight: 700;
}

.weiterzeile span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.weiterzeile small {
  margin-left: 8px;
  color: var(--leise);
}

.nur-geraet,
.nur-online,
.nur-ki {
  display: none;
}

[data-modus="geraet"] .nur-geraet,
[data-modus="online"] .nur-online,
[data-modus="ki"] .nur-ki {
  display: block;
}

[data-modus="ki"] .segment.nur-ki {
  display: flex;
}

[data-modus="geraet"] span.nur-geraet,
[data-modus="online"] span.nur-online,
[data-modus="ki"] span.nur-ki {
  display: inline;
}

.meldung {
  margin: 12px 0 0;
  min-height: 16px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--rot);
}

.version {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--leise);
}

.version .vcode[hidden] {
  display: inline;
  visibility: hidden;
}

.vcode b {
  color: var(--text);
  letter-spacing: 0.08em;
}

.version > span {
  white-space: nowrap;
}

.vcode-stand {
  margin-left: 0.8em;
  color: var(--text);
}

.vcode-teil {
  margin-right: 0.6em;
}

.vcode-teil .i {
  width: 1.3em;
  height: 1.3em;
  margin-right: 0.15em;
  vertical-align: -0.3em;
}

.segment.meere button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  line-height: 1.15;
}

.segment.meere small {
  font-size: 11px;
  font-weight: 500;
  opacity: .72;
  font-variant-numeric: lining-nums tabular-nums;
}

.erklaer.meer-hinweis {
  display: block;
}

/**
 * farben.css — die Farbauswahl und die antippbaren Spielersymbole.
 *
 * Copyright (c) 2026 Rico Pinzke. Alle Rechte vorbehalten.
 * Stand: 2026-10-25 20:02
 */

:root {
  --farbschrift-dunkel: #241c14;
}

.farb-waehler {
  position: fixed;
  left: var(--x, 0);
  top: var(--y, 0);
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(4, 34px);
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  background: var(--karte);
  border: 1px solid var(--rand);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .28);
}

.farb-waehler[hidden] {
  display: none;
}

.farb-feld {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--karte);
  background: var(--feld);
  box-shadow: 0 0 0 1px var(--rand);
  cursor: pointer;
}

.farb-feld.gewaehlt {
  box-shadow: 0 0 0 2px var(--text);
}

.farb-feld:disabled {
  position: relative;
  cursor: not-allowed;
}

.farb-feld:disabled::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -3px;
  width: 3px;
  height: calc(100% + 6px);
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--text);
  box-shadow: 0 0 0 1.5px var(--karte);
  transform: rotate(45deg);
}

.farb-feld:focus-visible {
  outline: 2px solid var(--gold1);
  outline-offset: 2px;
}

.farb-symbol {
  cursor: pointer;
}

.farb-symbol:focus {
  outline: none;
}

.farb-symbol:focus-visible {
  outline: 2px solid var(--gold1);
  outline-offset: 2px;
  border-radius: 50%;
}

.sitzmarke.farb-symbol {
  color: color-mix(in srgb, var(--symbolfarbe) var(--spielerdeckung), var(--aufheller));
  background: color-mix(in srgb, var(--symbolfarbe) var(--spielerflaeche), transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--symbolfarbe) 30%, transparent);
}

