/* Turnierplan (A.14.0.0): Turnierbaum als Spalten (seitlich wischbar), Spieltage mit drei
   Knöpfen je Begegnung, Tabelle. */

.buehne-turnier {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 8px 14px 24px;
  min-width: 0;
}
.t-kopf { display: grid; justify-items: center; gap: 6px; }
.t-kopf .segmente button { white-space: nowrap; padding-inline: 14px; } /* „Jeder gegen jeden“ brach um */
.t-info, .t-tipp { margin: 0; font-weight: 550; color: var(--tusche-weich); text-align: center; }
.t-hinweis {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 16px;
  background: #fff7ed;
  box-shadow: inset 0 0 0 1px #fdba74;
  font-weight: 600;
  color: #9a3412;
}
.t-hinweis[hidden], .t-leer[hidden], .t-meister[hidden], .t-ansicht[hidden] { display: none; }
.t-leer { display: grid; justify-items: center; gap: 12px; max-width: 26em; text-align: center; color: var(--tusche-weich); font-weight: 550; }
.t-leer p { margin: 0; }
.t-meister {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  box-shadow: 0 10px 26px rgba(245, 158, 11, .3);
  color: #78350f;
  font-size: 1.2rem;
  font-weight: 750;
  animation: t-meister .5s cubic-bezier(.2, 1.5, .4, 1);
}
.t-meister svg { width: 28px; height: 28px; }
@keyframes t-meister { from { transform: scale(.6); opacity: 0; } }

.t-plan { width: 100%; max-width: 1100px; min-width: 0; transition: opacity .2s; }
.t-plan.alt { opacity: .45; pointer-events: none; }
.t-plan.neu .t-spiel, .t-plan.neu .t-tag { animation: t-rein .45s cubic-bezier(.2, .9, .3, 1.1) both; animation-delay: calc(var(--i) * 45ms); }
@keyframes t-rein { from { opacity: 0; transform: translateY(14px) scale(.96); } }

/* ---------- Turnierbaum ---------- */
.t-baum {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 4px 14px;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
}
.t-runde { display: flex; flex-direction: column; flex: 1 0 168px; max-width: 240px; scroll-snap-align: start; }
.t-runde h4 { margin: 0 0 8px; text-align: center; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--tusche-weich); }
.t-spiele { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 10px; }
.t-spiel {
  display: grid;
  border-radius: 14px;
  background: var(--flaeche);
  -webkit-backdrop-filter: var(--glas-blur);
  backdrop-filter: var(--glas-blur);
  box-shadow: var(--schatten-klein);
  overflow: hidden;
}
.t-seite {
  min-height: 42px;
  padding: 6px 12px;
  border: 0;
  background: none;
  color: var(--tusche);
  font: inherit;
  font-weight: 650;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.t-seite + .t-seite { border-top: 1px solid rgba(139, 92, 246, .14); }
.t-seite:not(:disabled):hover { background: rgba(139, 92, 246, .08); }
.t-seite:disabled { cursor: default; }
.t-seite.frei, .t-seite.offen { color: rgba(30, 27, 58, .38); font-weight: 550; font-style: italic; }
.t-seite.sieger { background: linear-gradient(90deg, rgba(139, 92, 246, .18), rgba(236, 72, 153, .14)); color: #5b21b6; }
.t-seite.sieger::after { content: " ✓"; }
.t-seite.raus { color: rgba(30, 27, 58, .4); text-decoration: line-through; text-decoration-color: rgba(30, 27, 58, .25); }
.t-seite:focus-visible { outline: 2px solid var(--akzent); outline-offset: -2px; }
.t-ziel { flex: 0 0 150px; }
.t-pokal {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 14px 10px;
  border-radius: 18px;
  background: var(--flaeche);
  box-shadow: var(--schatten-klein);
  color: var(--tusche-weich);
  font-weight: 700;
  text-align: center;
}
.t-pokal svg { width: 40px; height: 40px; }
.t-pokal.da { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #78350f; box-shadow: 0 10px 26px rgba(245, 158, 11, .3); }

/* ---------- Jeder gegen jeden ---------- */
.t-tage { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.t-tag { padding: 12px; border-radius: 18px; background: var(--flaeche); -webkit-backdrop-filter: var(--glas-blur); backdrop-filter: var(--glas-blur); box-shadow: var(--schatten-klein); }
.t-tag h4 { margin: 0 0 8px; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; color: var(--tusche-weich); }
.t-tag ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.t-begegnung { display: grid; grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); gap: 4px; }
.t-begegnung button {
  min-height: 42px;
  padding: 4px 10px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, .7);
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, .16);
  color: var(--tusche);
  font: inherit;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.t-begegnung button:first-child { text-align: right; }
.t-begegnung button:last-child { text-align: left; }
.t-begegnung button[data-erg="u"] { padding: 0; color: var(--tusche-weich); }
.t-begegnung button[aria-pressed="true"] { background: var(--verlauf); color: #fff; box-shadow: none; }
.t-begegnung button[data-erg="u"][aria-pressed="true"] { background: #a78bfa; }
.t-begegnung[data-erg="a"] button:last-child, .t-begegnung[data-erg="b"] button:first-child { color: rgba(30, 27, 58, .4); }
.t-frei { padding: 6px 10px; color: var(--tusche-weich); font-style: italic; font-weight: 550; text-align: center; }

.t-tabelle { width: min(100%, 640px); margin: 0 auto; border-collapse: separate; border-spacing: 0 6px; font-weight: 600; }
.t-tabelle th { font-size: .78rem; color: var(--tusche-weich); text-transform: uppercase; letter-spacing: .05em; padding: 0 6px; }
.t-tabelle td { padding: 8px 6px; background: var(--flaeche); text-align: center; }
.t-tabelle td:nth-child(2) { text-align: left; max-width: 12em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-tabelle td:first-child { border-radius: 12px 0 0 12px; color: var(--tusche-weich); }
.t-tabelle td:last-child { border-radius: 0 12px 12px 0; }
.t-tabelle tbody tr:first-child td { background: #fef3c7; }

.t-knoepfe { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.los-knopf { min-width: min(80vw, 300px); min-height: 60px; font-size: 1.3rem; font-weight: 650; letter-spacing: -.01em; }
.los-knopf:not(.haupt) { min-width: 0; min-height: 44px; font-size: 1rem; }

@media (min-width: 980px) {
  .buehne-turnier { padding: 14px 24px 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .t-plan.neu .t-spiel, .t-plan.neu .t-tag, .t-meister { animation: none !important; }
}

/* Der Baum ist breiter als das Handy (A.14.4.0): rechter Rand blendet aus, solange es weitergeht. */
.t-baum.mehr { -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); }
