:root {
  --bg: #f4f8f5;
  --card: #fff;
  --tx: #10231a;
  --mu: #5d7266;
  --gr: #1d9c4a;
  --gr2: #0e6b30;
  --ln: #d9e5dd;
  --er: #c0392b;
  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0c1611;
    --card: #152119;
    --tx: #e8f2ec;
    --mu: #8aa496;
    --gr: #2fbf62;
    --gr2: #143d26;
    --ln: #243a2c;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0c1611;
  --card: #152119;
  --tx: #e8f2ec;
  --mu: #8aa496;
  --gr: #2fbf62;
  --gr2: #143d26;
  --ln: #243a2c;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--tx);
  font:
    16px/1.4 -apple-system,
    system-ui,
    'Segoe UI',
    sans-serif;
}
/* ---- Kopfbereich ---- */
.hd {
  position: relative;
  color: #fff;
  overflow: hidden;
  border-radius: 0 0 26px 26px;
  background: linear-gradient(155deg, #22a85a 0%, #0f7a3c 48%, #0a5a2c 100%);
  box-shadow: 0 6px 24px rgba(6, 60, 30, 0.25);
}
.hd::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.09;
  background: repeating-linear-gradient(60deg, #fff 0 2px, transparent 2px 26px),
    repeating-linear-gradient(-60deg, #fff 0 2px, transparent 2px 26px);
}
.hd-top {
  justify-content: center;
  gap: 14px;
}
.hd-top::before,
.hd-top::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45));
}
.hd-top::after {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.45), transparent);
}
.hd .brand {
  text-align: center;
}
.emb {
  display: flex;
  align-items: center;
  gap: 12px;
}
.emb img {
  height: 36px;
  width: auto;
  display: block;
}
.emb img.rw {
  height: 46px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.18));
}
.emb .sep {
  width: 1px;
  height: 30px;
  background: rgba(255, 255, 255, 0.4);
}
.hd .brand {
  margin-top: 12px;
}
.brand h1 span {
  margin-left: 2px;
}
.hd-in {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 16px 14px;
}
.hd-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand {
  flex: 1;
  min-width: 0;
}
.kick {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.8;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand h1 {
  margin: 2px 0 0;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.brand h1 span {
  font-weight: 400;
  opacity: 0.9;
  white-space: nowrap;
}
.hbtn {
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-radius: 99px;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 600;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.hd-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.hd-bar .hbtn {
  margin-left: auto;
}
/* Saison und Knopf gleich hoch */
.hd-bar .hbtn,
.hd-bar .seas {
  box-sizing: border-box;
  height: 40px;
}
.hd-bar .hbtn {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  font-size: 14px;
}
.hd-bar .seas {
  padding: 0 4px 0 12px;
}
.hd-bar .seas select,
.hd-bar .seasinfo b {
  box-sizing: border-box;
  height: 32px;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  padding-top: 0;
  padding-bottom: 0;
}
.seasinfo {
  padding: 3px 4px 3px 12px;
}
.seasinfo b {
  background: #fff;
  color: #0d5a2c;
  font-size: 15px;
  padding: 5px 12px;
  border-radius: 99px;
}
.seas {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 99px;
  padding: 3px 4px 3px 12px;
}
.seas span {
  font-size: 12px;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.seas select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: #fff;
  color: #0d5a2c;
  font-weight: 700;
  font-size: 15px;
  padding: 5px 26px 5px 11px;
  border-radius: 99px;
  background-image: linear-gradient(45deg, transparent 50%, #0d5a2c 50%),
    linear-gradient(135deg, #0d5a2c 50%, transparent 50%);
  background-position:
    calc(100% - 14px) 52%,
    calc(100% - 9px) 52%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.seg {
  position: relative;
  display: flex;
  gap: 4px;
  max-width: 528px;
  margin: 0 auto 16px;
  padding: 4px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 14px;
}
.seg button {
  flex: 1;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 9px;
  border-radius: 11px;
  opacity: 0.85;
}
.seg button.on {
  background: #fff;
  color: #0d5a2c;
  opacity: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.hd .seg {
  margin-left: 16px;
  margin-right: 16px;
}
@media (min-width: 560px) {
  .hd .seg {
    margin-left: auto;
    margin-right: auto;
  }
}
#lb {
  display: none;
  margin-top: 12px;
}
#lb .lbrow {
  display: flex;
  gap: 8px;
}
#lb input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.18);
  color: #fff;
  border-radius: 99px;
  padding: 9px 16px;
  font-size: 16px;
}
#lb input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}
#lb input:focus {
  outline: none;
  border-color: #fff;
  background: rgba(0, 0, 0, 0.25);
}
#lb button {
  flex: none;
  border: 0;
  background: #fff;
  color: #0d5a2c;
  font-weight: 700;
  font-size: 15px;
  border-radius: 99px;
  padding: 9px 18px;
}
#pwe {
  color: #ffd6d1;
  font-size: 14px;
  margin-top: 6px;
  text-align: center;
}
#pwe:empty {
  display: none;
}
.card.lock {
  text-align: center;
  padding: 24px 18px;
  margin-top: 6px;
}
.card.lock .lk {
  font-size: 34px;
  line-height: 1;
  margin-bottom: 8px;
}
.card.lock input {
  display: block;
  width: 100%;
  margin-top: 16px;
  border-radius: 99px;
  padding: 11px 16px;
  text-align: center;
}
.card.lock button.pr {
  display: block;
  width: 100%;
  margin-top: 10px;
  border-radius: 99px;
  padding: 12px;
}
main {
  padding: 14px 12px 12px;
  max-width: 560px;
  margin: 0 auto;
}
.card {
  background: var(--card);
  border: 1px solid var(--ln);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}
.card h3 {
  margin: 0 0 2px;
  font-size: 17px;
}
.mu {
  color: var(--mu);
  font-size: 13px;
}
.row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  flex-wrap: wrap;
}
input,
select {
  font-size: 17px;
  padding: 9px;
  border: 1px solid var(--ln);
  border-radius: 10px;
  background: var(--bg);
  color: var(--tx);
}
input.n {
  width: 62px;
  text-align: center;
}
button.pr {
  background: var(--gr);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 600;
}
button.sc {
  background: var(--card);
  color: var(--tx);
  border: 1px solid var(--ln);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.chip {
  font-size: 13px;
  padding: 4px 9px;
  border-radius: 99px;
  border: 1px solid var(--ln);
  background: var(--bg);
}
.err {
  color: var(--er);
  font-size: 14px;
  margin-top: 8px;
}
.badge {
  display: inline-block;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--gr);
  color: #fff;
  margin-left: 6px;
}
.badge.z {
  background: var(--mu);
}
.card.won {
  border: 2px solid #d4a017;
  background: linear-gradient(0deg, rgba(212, 160, 23, 0.12), rgba(212, 160, 23, 0.12)), var(--card);
}
.tr.win {
  background: rgba(212, 160, 23, 0.22);
  border-radius: 10px;
  padding: 8px;
  margin: 4px 0;
  border-bottom: 0;
}
.badge.g {
  background: #d4a017;
  color: #1b1400;
  font-weight: 700;
}
.ban {
  margin-top: 8px;
  padding: 10px;
  border-radius: 10px;
  background: var(--bg);
  font-size: 15px;
}
.ban.g {
  background: rgba(212, 160, 23, 0.22);
}
.stats {
  display: flex;
  gap: 8px;
}
.stats div {
  flex: 1;
  text-align: center;
  background: var(--bg);
  border-radius: 10px;
  padding: 10px 4px;
}
.stats b {
  display: block;
  font-size: 22px;
}
.done {
  opacity: 0.95;
}
.tr {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--ln);
}
.tr .nm {
  flex: 1;
  min-width: 0;
}
.tr .nm b {
  display: block;
}
button.pd {
  border: 1px solid var(--ln);
  background: var(--bg);
  color: var(--mu);
  border-radius: 99px;
  padding: 6px 10px;
  font-size: 13px;
}
button.pd.on {
  background: var(--gr);
  color: #fff;
  border-color: var(--gr);
}
button.ic {
  border: 0;
  background: none;
  color: var(--mu);
  font-size: 18px;
  padding: 4px 6px;
}
.prow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--ln);
  gap: 8px;
}
h3.gt {
  line-height: 1.6;
}
.tbl {
  margin-top: 10px;
}
.ordbox {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--ln);
}
.ordbox .oh {
  font-weight: 700;
  font-size: 15px;
}
.chip.on {
  background: rgba(29, 156, 74, 0.15);
  border-color: rgba(29, 156, 74, 0.4);
}
.chip .chx {
  border: 0;
  background: none;
  color: var(--mu);
  font-size: 13px;
  padding: 0 0 0 6px;
  margin: 0;
}
ol.order {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}
ol.order li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--ln);
}
ol.order li:last-child {
  border-bottom: 0;
}
ol.order .no {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--ln);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}
ol.order li.done {
  opacity: 0.6;
}
ol.order li.done .no {
  background: var(--gr);
  border-color: var(--gr);
  color: #fff;
}
ol.order li.next {
  font-weight: 700;
}
ol.order li.next .no {
  background: #d4a017;
  border-color: #d4a017;
  color: #1b1400;
}
ol.order .st {
  margin-left: auto;
  font-size: 13px;
  color: var(--mu);
  font-weight: 400;
}
button.pastbtn {
  width: 100%;
  margin-bottom: 12px;
  text-align: left;
  font-size: 15px;
  padding: 12px 14px;
}
/* aufgeklappt: Knopf grün, vergangene Spiele in einem abgesetzten Bereich */
button.pastbtn.on {
  background: var(--gr);
  border-color: var(--gr);
  color: #fff;
  font-weight: 700;
  margin-bottom: 0;
  border-radius: 14px 14px 0 0;
}
.pastwrap {
  background: color-mix(in srgb, var(--gr) 10%, var(--bg));
  border: 2px solid var(--gr);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  padding: 10px 8px 2px;
  margin-bottom: 6px;
}
.pastwrap .card.past {
  background: color-mix(in srgb, var(--card) 70%, var(--bg));
  box-shadow: none;
}
.pastwrap .card.past h3,
.pastwrap .card.past .mu {
  opacity: 0.85;
}
.pastwrap button.pastclose {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  color: var(--gr);
  font-weight: 700;
}
.pastsep {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 2px 12px;
  color: var(--mu);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.pastsep::before,
.pastsep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--ln);
}
.tbl .tr {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px 108px;
  gap: 6px;
  align-items: center;
}
.tbl.adm .tr {
  grid-template-columns: minmax(0, 1fr) 46px 108px 26px 26px;
}
.tbl button.pd {
  width: 100%;
  white-space: nowrap;
  padding: 6px 4px;
  font-size: 12.5px;
}
.tbl button.ic {
  padding: 4px 0;
  text-align: center;
}
.tbl button.pd.del {
  background: #c0392b;
  color: #fff;
  border-color: #c0392b;
  font-weight: 700;
}
.tbl .th {
  font-size: 12px;
  color: var(--mu);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 0 6px;
  border-bottom: 2px solid var(--ln);
}
.tbl .th button {
  all: unset;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  padding: 4px 0;
}
.tbl .th button.on {
  color: var(--gr);
  font-weight: 700;
}
.tbl .th .c,
.tbl .tp {
  text-align: center;
}
.tbl .tp {
  font-weight: 700;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.tbl .tr.win {
  padding: 8px;
  margin: 4px -8px;
}
.tl {
  width: 26px;
  height: 26px;
  object-fit: contain;
  vertical-align: -7px;
}
.ph.tl {
  display: inline-flex;
}
.ph {
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--ln);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--mu);
}
.dark-logo {
  background: #fff;
  border-radius: 6px;
  padding: 2px;
}
a.wa {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  background: #25d366;
  color: #fff;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 600;
  margin-top: 10px;
}
.brk {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  padding: 4px 0;
}

/* Einstellungen */
.setf {
  margin-top: 16px;
}
.setf label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}
.setrow {
  display: flex;
  align-items: center;
  gap: 8px;
}
.setrow input {
  width: 120px;
  text-align: right;
}
.setrow .unit {
  color: var(--mu);
}
.setf .mu {
  margin-top: 4px;
}

/* Live-Stand */
.live {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #c62828;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.live::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: #fff;
  vertical-align: 1px;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.25;
  }
}
.tr.livehit,
.tbl .tr.livehit {
  background: rgba(198, 40, 40, 0.12);
  border-radius: 10px;
  padding: 8px;
  margin: 4px -8px;
  border-bottom: 0;
}

/* unsichtbar, aber für Passwort-Manager vorhanden (Benutzername im Login-Formular) */
.vh {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0 !important;
  opacity: 0;
}
