/* Components: icon, button, panel, LED board, lamp, tile, table with
   expandable rows, dialog (bottom sheet on the phone), PIN pad, tabs,
   swipe container, Pingi speech bubble, form notice. */

/* ---- neon line icon ---- */
.icon {
  width: 24px;
  height: 24px;
  flex: none;
  stroke: var(--icon);
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: var(--glow-icon);
}
.icon--lg { width: 36px; height: 36px; }
.icon--xl { width: 48px; height: 48px; }
[data-glow=off] .icon, [data-glow=off] .pingi__img { filter: none; }
[data-glow=off] .led--pulse, [data-glow=off] .lamp--warn .lamp__dot { animation: none; }

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--touch);
  min-width: var(--touch);
  padding: 0 16px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--surface-hover); color: var(--text); }
.btn:disabled, .btn[aria-disabled=true] { opacity: .5; cursor: not-allowed; }
.btn .icon { width: 20px; height: 20px; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--text-on-accent); }
.btn--primary:hover { background: var(--accent-hover); color: var(--text-on-accent); }
.btn--primary .icon { stroke: currentColor; filter: none; }
.btn--danger { border-color: var(--danger); color: var(--danger-text); }
.btn--ghost { background: transparent; border-color: transparent; }
.btn--icon { padding: 0; width: var(--touch); }

/* ---- panel ---- */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  min-width: 0;
}
.panel__title {
  margin: 0 0 6px;
  color: var(--text-muted);
  font-size: .75rem;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.stat-value { font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-value--neg { color: var(--danger-text); }

/* ---- LED scoreboard ---- */
.led-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 10px 8px;
  background-color: var(--led-bg);
  background-image: radial-gradient(circle, var(--led-grid) 1px, transparent 1.6px);
  background-size: 4px 4px;
  border: 2px solid var(--led-frame);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
}
.led-board__team { text-align: center; min-width: 0; }
.led-board__name {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .08em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.led-board__side { display: block; color: var(--text-muted); font-size: .75rem; }
.led-board__center { text-align: center; }
.led-board__meta { display: flex; justify-content: center; gap: 6px; margin-top: 4px; }
.led-board__meta .icon { width: 20px; height: 20px; }
.led {
  color: var(--led);
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 2px;
  text-shadow: var(--glow-led);
}
.led--xl { font-size: 1.6rem; }
.led--pulse { animation: led-pulse 2.4s ease-in-out infinite; }
@keyframes led-pulse { 50% { text-shadow: 0 0 12px var(--led), 0 0 2px var(--led); } }

/* ---- warning lamps ---- */
.lamps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(max(var(--touch), 64px), 1fr));
  gap: 4px;
}
.lamp {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: var(--touch);
  padding: 6px 2px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: .7rem;
  line-height: 1.1;
  text-align: center;
  cursor: pointer;
}
.lamp:hover { background: var(--surface-2); }
@media (max-width: 479px) {
  .lamps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 2px; }
}
.lamp__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--lamp-ok);
  box-shadow: 0 0 6px var(--lamp-ok);
}
.lamp .icon { width: 22px; height: 22px; }
.lamp__label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.lamp--warn { color: var(--text); }
.lamp--warn .lamp__dot {
  background: var(--lamp-warn);
  box-shadow: 0 0 9px var(--lamp-warn);
  animation: lamp-glow 1.6s ease-in-out infinite;
}
.lamp--warn .icon { stroke: var(--lamp-warn); filter: drop-shadow(0 0 3px var(--lamp-warn)); }
@keyframes lamp-glow { 50% { box-shadow: 0 0 3px var(--lamp-warn); } }

/* ---- tile menu ---- */
.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 84px;
  padding: 10px 2px 8px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: .78rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.tile:hover { background: var(--surface-hover); color: var(--text); }
.tile .icon { width: 34px; height: 34px; }
.tile[aria-disabled=true] { opacity: .45; pointer-events: none; }
@media (min-width: 600px) {
  .tile { min-height: 104px; font-size: .9rem; }
  .tile .icon { width: 40px; height: 40px; }
}

/* ---- table with expandable rows ---- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table caption { text-align: left; padding: 8px 10px; color: var(--text-muted); font-size: .8rem; }
.data-table th {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-size: .75rem;
  font-weight: 650;
  letter-spacing: .04em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.data-table td { padding: 6px 10px; border-bottom: 1px solid var(--border); }
.data-table th.num, .data-table td.num { text-align: right; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr.is-own td, .data-table tr.is-own th { background: var(--row-own); font-weight: 650; }
.data-table .col-toggle { width: var(--touch); padding: 0; text-align: center; }
.data-table .col-extra { display: none; }
.row-detail td { background: var(--bg); }
.row-detail dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 4px 0; }
.row-detail dt { color: var(--text-muted); }
.row-detail dd { margin: 0; font-variant-numeric: tabular-nums; }
.expand-btn {
  width: var(--touch);
  height: var(--touch);
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.expand-btn .icon { transition: transform .15s; }
.expand-btn[aria-expanded=true] .icon { transform: rotate(180deg); }
@media (min-width: 1024px) {
  .data-table .col-extra { display: table-cell; }
  .data-table .col-toggle, .row-detail { display: none; }
}

/* ---- dialog: centred, a bottom sheet on the phone ---- */
.dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}
.dialog::backdrop { background: var(--scrim); }
.dialog__head { display: flex; align-items: center; gap: 8px; padding: 8px 8px 0 16px; }
.dialog__head h2 { flex: 1; margin: 0; font-size: 1.1rem; }
.dialog__body { padding: 8px 16px; }
.dialog__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 8px 16px 16px; }
@media (max-width: 599px) {
  .dialog {
    width: 100vw;
    max-width: 100vw;
    margin: auto 0 0;
    border-radius: 14px 14px 0 0;
    border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom);
    animation: sheet-up .2s ease-out;
  }
  .dialog__actions .btn { flex: 1; }
}
@keyframes sheet-up { from { transform: translateY(40%); opacity: .4; } }

/* ---- PIN pad ---- */
.pinpad { display: grid; justify-items: center; gap: 14px; max-width: 300px; margin: 0 auto; padding: 4px; border-radius: var(--radius); }
.pinpad__dots { display: flex; gap: 12px; min-height: 18px; }
.pinpad__dot { width: 16px; height: 16px; border: 2px solid var(--icon); border-radius: 50%; }
.pinpad__dot.is-set { background: var(--icon); box-shadow: 0 0 6px var(--glow); }
.pinpad__keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
.pinpad__key {
  min-height: 56px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
}
.pinpad__key:hover { background: var(--surface-hover); }
.pinpad__key .icon { vertical-align: middle; }
.pinpad__key--ok { background: var(--accent); border-color: var(--accent); }
.pinpad__key--ok .icon { stroke: var(--text-on-accent); filter: none; }
.pinpad__key:disabled { opacity: .45; cursor: not-allowed; }

/* ---- tabs ---- */
.tabs__list { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--border); scrollbar-width: thin; }
.tabs__tab {
  min-height: var(--touch);
  padding: 0 14px;
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}
.tabs__tab[aria-selected=true] { color: var(--text); border-bottom-color: var(--accent); }
.tabs__panel { padding-top: 12px; }

/* ---- swipe container (scroll snap); side by side from 1024 px ---- */
.swipe__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: var(--gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.swipe__track::-webkit-scrollbar { display: none; }
.swipe__item { scroll-snap-align: start; min-width: 0; }
.swipe__nav { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0; margin-top: 6px; }
.swipe__dot {
  display: inline-grid;
  place-items: center;
  width: var(--touch);
  height: var(--touch);
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}
.swipe__dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.swipe__dot[aria-current=true]::before { background: var(--icon); box-shadow: 0 0 6px var(--glow); }
@media (min-width: 1024px) {
  .swipe__track { grid-auto-flow: row; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); overflow: visible; }
  .swipe__nav { display: none; }
}

/* ---- Pingi speech bubble ---- */
.pingi { display: flex; align-items: flex-end; gap: 10px; }
.pingi__img { width: 64px; height: 64px; flex: none; filter: drop-shadow(0 0 3px var(--glow)); }
.pingi__bubble {
  position: relative;
  flex: 1;
  margin-bottom: 18px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 14px 14px 14px 4px;
}
.pingi__bubble p { margin: 0; }
.pingi__name { display: block; color: var(--text-muted); font-size: .75rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.pingi--alert .pingi__bubble { border-color: var(--lamp-warn); }

/* ---- forms ---- */
.form { display: grid; gap: var(--gap); }
.field { display: grid; gap: 4px; }
.field__label { color: var(--text-muted); font-size: .85rem; }
.field--check { display: flex; align-items: center; gap: 10px; min-height: var(--touch); }
.form-notice { margin: 0; padding: 10px 12px; border-left: 4px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2); }
.form-notice--error { border-left-color: var(--danger); }
.form-notice--matchday { border-left-color: var(--led); }
.form-notice--ok { border-left-color: var(--lamp-ok); }

/* ---- connection pill ---- */
.conn { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: .8rem; }
.conn::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lamp-ok); }
.conn--closed::before { background: var(--lamp-warn); }

/* ---- styleguide ---- */
.sg-section { margin-bottom: 28px; }
.sg-section > h2 { padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.swatch { display: flex; align-items: center; gap: 8px; font-size: .8rem; }
.swatch__chip { width: 36px; height: 36px; flex: none; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--chip); }
.swatch code { color: var(--text-muted); }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.icon-cell { display: grid; justify-items: center; gap: 6px; padding: 10px 4px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .72rem; color: var(--text-muted); }
.icon-cell .icon { width: 32px; height: 32px; }
.formats { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0; }
.formats dt { color: var(--text-muted); }
.formats dd { margin: 0; font-variant-numeric: tabular-nums; }

/* ---- profile bar: who acts right now (always visible in the top bar) ---- */
.profilebar { display: flex; align-items: center; gap: 4px; min-width: 0; }
.profilebar__list { display: flex; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.profilebar__list::-webkit-scrollbar { display: none; }
.avatar {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border: 2px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
  font-size: .9rem;
  line-height: 1;
}
.avatar--lg { width: 40px; height: 40px; font-size: 1.1rem; }
.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--touch);
  max-width: 150px;
  padding: 0 10px 0 6px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 22px;
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
}
.profile-chip:hover { background: var(--surface-2); color: var(--text); }
.profile-chip__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-chip.is-acting { background: var(--surface-2); border-color: var(--accent); color: var(--text); }
.profile-chip.is-acting .avatar { border-color: var(--accent); background: var(--accent); color: var(--text-on-accent); box-shadow: 0 0 6px var(--glow); }
/* on the phone the other profiles' names are cut shorter */
@media (max-width: 599px) {
  .profile-chip { max-width: 124px; }
  .profile-chip:not(.is-acting) { max-width: 100px; padding-right: 6px; }
}

/* ---- lists, badges, game cards ---- */
.list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.list__item { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.list__item:last-child { border-bottom: 0; }
.list__main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.list__main strong { overflow-wrap: anywhere; }
.badge {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: .75rem;
  font-weight: 650;
  white-space: nowrap;
}
.badge--led { border-color: var(--led); color: var(--led); text-shadow: var(--glow-led); }
.game-list { display: grid; gap: var(--gap); margin: 0; padding: 0; list-style: none; }
.game-card { display: grid; gap: 8px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius); min-width: 0; }
.game-card__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.game-card__head h3 { margin: 0; overflow-wrap: anywhere; }
.game-card__round { font-size: .85rem; letter-spacing: 1px; }
.game-card p { margin: 0; }

/* ---- club choice: clubs of a league as cards, taken ones greyed ---- */
.club-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 8px; min-width: 0; }
.club-pick {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: start;
  gap: 2px 8px;
  min-height: var(--touch);
  min-width: 0;
  padding: 8px 12px;
  text-align: left;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  cursor: pointer;
}
.club-pick:hover:not(:disabled) { background: var(--surface-hover); }
.club-pick[aria-pressed=true] { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.club-pick:disabled { cursor: not-allowed; }
.club-pick--taken, .club-pick:disabled { background: var(--surface); border-style: dashed; border-color: var(--border); color: var(--text-muted); }
.club-pick__name { font-weight: 650; overflow-wrap: anywhere; }
.club-pick__note { grid-column: 1 / -1; font-size: .85rem; color: var(--text-muted); overflow-wrap: anywhere; }
/* a game the server cannot load: greyed, no play link */
.game-card--broken { background: var(--surface); border-style: dashed; border-color: var(--border); color: var(--text-muted); }
/* seat: avatar, club and profile, state; the action below on the phone,
   at the end of the row from 600 px */
.seat {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 10px;
  padding: 8px 0 4px;
  border-top: 1px solid var(--border);
}
.seat > .btn { grid-column: 2 / -1; justify-self: end; }
@media (min-width: 600px) {
  .seat { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .seat > .btn { grid-column: auto; }
}
.seat__main { display: flex; flex-direction: column; min-width: 0; }
.seat__club { font-weight: 650; overflow-wrap: anywhere; }
.seat__state { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.seat__time { display: inline-flex; align-items: center; gap: 4px; }
.seat__time .icon { width: 18px; height: 18px; }
.seat--turn .seat__club { color: var(--led); }

/* ---- forms: fieldset, invite link, warning ---- */
.fieldset { display: grid; gap: 0; margin: 0; padding: 0; border: 0; min-width: 0; }
.fieldset legend { padding: 0; margin-bottom: 4px; }
.invite__url { font-family: var(--font-mono); font-size: .85rem; }
.warning { display: flex; align-items: center; gap: 8px; color: var(--danger-text); }
.warning .icon { stroke: var(--danger); filter: none; }

/* ---- login and register ---- */
.auth { max-width: 440px; margin: 0 auto; }
.auth__brand { display: flex; align-items: center; gap: 12px; }
.auth__brand h1 { margin: 0; }
.auth__switch { text-align: center; }
.auth__switch a { display: inline-block; min-height: var(--touch); line-height: var(--touch); }

/* legal pages (Impressum, Datenschutz) and the quiet links to them */
.legal { max-width: 70ch; margin: 0 auto; line-height: 1.6; }
.legal h2 { margin-top: calc(var(--gap) * 2); }
.legal ul { padding-left: 1.4em; list-style: disc; }
.legal li { margin: .3em 0; }
.legal__lead { color: var(--text-muted); }
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin-top: 12px; font-size: .8rem; color: var(--text-muted); }
.legal-links a { color: inherit; display: inline-block; min-height: var(--touch); line-height: var(--touch); }

/* ---- round bar (Task 4) ---- */
.roundbar__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; max-width: var(--max-width); margin: 0 auto; }
.roundbar__round { font-size: .95rem; letter-spacing: 1px; white-space: nowrap; }
.roundbar__date { white-space: nowrap; color: var(--text-muted); }
.roundbar__clock { display: inline-flex; align-items: center; gap: 4px; }
.roundbar__clock .icon { width: 20px; height: 20px; }
.roundbar__time { font-family: var(--font-mono); font-size: 1.05rem; font-weight: 700; color: var(--text-muted); }
.roundbar__time.is-running { color: var(--led); text-shadow: var(--glow-led); }
.roundbar__pause, .roundbar__phase { display: inline-flex; align-items: center; gap: 6px; }
.roundbar__mates { display: flex; gap: 8px; min-width: 0; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.roundbar__mates::-webkit-scrollbar { display: none; }
.roundbar__mate { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-size: .8rem; }
.roundbar__mate.is-ready .badge { border-color: var(--lamp-ok); color: var(--ok-text); }
.roundbar__mate.is-running .badge { border-color: var(--led); color: var(--led); }
.roundbar__actions { display: flex; gap: 6px; margin-left: auto; }
.roundbar__note { flex-basis: 100%; margin: 0; font-size: .85rem; color: var(--danger-text); }
@media (max-width: 599px) {
  /* phone: round, clock and buttons in the first row, the others below */
  .roundbar__mates { order: 5; flex-basis: 100%; }
  .roundbar__note { order: 6; }
}

/* ---- round bar: the next step of the result flow (play-test round 3 A3) ---- */
.roundbar__next { margin-left: auto; }

/* ---- main menu (Task 4) ---- */
.led-board__link { display: inline-block; max-width: 100%; min-height: var(--touch); line-height: var(--touch); overflow: hidden; text-overflow: ellipsis; color: inherit; text-decoration: none; vertical-align: middle; }
.led-board__link:hover { text-decoration: underline; color: var(--text); }
.led-board__meta { flex-wrap: wrap; align-items: center; }
.led-board__kickoff { flex-basis: 100%; color: var(--text-muted); font-family: var(--font); font-size: .75rem; }
/* table-place curve (tr6-O; ui/rankchart.js): place 1 at the top */
.rank-curve { display: grid; gap: 6px; min-width: 0; }
.rank-chart { display: block; width: 100%; height: auto; max-height: 220px; overflow: visible; }
.rank-chart__grid { stroke: var(--border); stroke-width: .6; stroke-dasharray: 2 3; }
.rank-chart__label { fill: var(--text-muted); font-family: var(--font); font-size: 8px; font-variant-numeric: tabular-nums; }
.rank-chart__zone { stroke: var(--text-muted); stroke-width: .8; stroke-dasharray: 5 3; opacity: .55; }
.rank-chart__own, .rank-chart__other { fill: none; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.rank-chart__own { stroke: var(--curve-own); filter: drop-shadow(0 0 2px var(--curve-own)); }
.rank-chart__other { stroke: var(--curve-other); opacity: .8; }
.rank-chart__dot--own { fill: var(--curve-own); }
.rank-chart__dot--other { fill: var(--curve-other); }
.rank-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; list-style: none; font-size: .85rem; }
.rank-legend li::before { content: ""; display: inline-block; width: 16px; height: 3px; margin-right: 6px; vertical-align: middle; border-radius: 2px; }
.rank-legend .rank-legend__own::before { background: var(--curve-own); }
.rank-legend .rank-legend__other::before { background: var(--curve-other); }
.h2h__score { font-weight: 700; }
.h2h__score.is-W, .h2h__score.is-OTW { color: var(--ok-text); }
.h2h__score.is-L, .h2h__score.is-OTL { color: var(--danger-text); }
.list__item > .icon { width: 20px; height: 20px; }

/* ---- team info (Task 4) ---- */
.fixture__date { min-width: 5.5em; }
.fixture a { flex: 1; min-width: 0; min-height: var(--touch); line-height: var(--touch); }
/* the visually hidden header text stays inside the scrolling table */
.table-wrap { position: relative; }

/* ---- team section (Task 5) ---- */
.badge--import { border-color: var(--accent); color: var(--accent); }
.badge--u21, .badge--young { border-color: var(--lamp-ok); color: var(--ok-text); }
.badge--injured, .badge--tired, .badge--unlicensed { border-color: var(--danger); color: var(--danger-text); }
.badge--warn { border-color: var(--led); color: var(--led); }
.is-tired { color: var(--danger-text); font-weight: 700; }
.savebar { display: grid; gap: 8px; }
.link-btn {
  min-height: var(--touch);
  padding: 0;
  background: none;
  border: 0;
  color: var(--accent);
  font: inherit;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }
.player-link--icon { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: var(--touch); }
.bench__item { display: flex; align-items: stretch; gap: 4px; }
.bench__item .bench__player { flex: 1; width: auto; min-width: 0; }
.sort-btn { display: inline-flex; align-items: center; gap: 4px; min-height: var(--touch); padding: 0; background: none; border: 0; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.sort-btn__dir { min-width: 1em; color: var(--accent); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0; }
.facts dt { color: var(--text-muted); }
.facts dd { margin: 0; font-variant-numeric: tabular-nums; }

/* player skills: one expandable group per row (44 px summary) */
.skill-group__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: var(--touch); cursor: pointer; }
.skill-group .facts { grid-template-columns: minmax(0, 1fr) auto; padding-bottom: 8px; }
.skill-group .facts dt { overflow-wrap: anywhere; }
.skill-group__head > :first-child { min-width: 0; overflow-wrap: anywhere; }
.skill-group .facts dd { text-align: right; }

/* development arrows (play-test round 6, N): ▲ green / ▼ red behind an own
   player's shown value, since the season start; small, never wrapping away
   from its value (phone width) */
.trend-value { display: inline-flex; align-items: baseline; gap: 3px; white-space: nowrap; }
.trend { display: inline-block; font-size: .7em; line-height: 1; font-weight: 700; text-shadow: none; cursor: help; }
.trend--up { color: var(--ok-text); }
.trend--down { color: var(--danger-text); }
.squad-card__side .trend { font-size: .8rem; margin-left: -4px; }
.youth__junior-ovr .trend { margin-left: 3px; }

/* squad: cards on the phone, the table from 1024 px */
.squad__sort { align-items: flex-end; }
.squad-cards { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.squad-card__btn {
  display: grid;
  grid-template-columns: 4em minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: var(--touch);
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.squad-card__btn:hover { background: var(--surface-2); }
.squad-card__pos, .bench__pos, .contract__pos { white-space: nowrap; font-family: var(--font-mono); font-weight: 700; color: var(--icon); }
.squad-card__main { display: grid; gap: 2px; min-width: 0; }
.squad-card__main strong { overflow-wrap: anywhere; }
.squad-card__facts { font-size: .8rem; }
.squad-card__overall { font-family: var(--font-mono); font-size: 1.3rem; font-weight: 700; color: var(--led); text-shadow: var(--glow-led); }
.squad__name { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.squad-table { display: none; }
.data-table tr.is-expiring > :first-child { box-shadow: inset 3px 0 0 var(--led); }
.squad-table .data-table th, .squad-table .data-table td { padding-left: 6px; padding-right: 6px; }
.squad-table .link-btn { white-space: nowrap; }
@media (min-width: 1024px) {
  .squad-cards { display: none; }
  .squad-table { display: block; }
}

/* lineup: sections of cards (lines, pairs, power play, penalty kill, goalies) stacked; a line, pair or unit is a row of slots */
.lineup__hint { margin: 0; color: var(--text-muted); }
.lineup__import-box { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.lineup__imports { margin: 0; font-weight: 600; }
.lineup__imports.is-over { color: var(--danger-text); }
.lineup__imports-hint { margin: 0; font-size: .85rem; }
.lineup__section, .lineup__block { min-width: 0; }
.lineup__card-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 6px; }
.lineup__card-title { margin: 0; font-size: .95rem; }
.lineup__card-head .lineup__chem { margin: 0; }
.lineup__block + .lineup__block { margin-top: var(--gap); padding-top: var(--gap); border-top: 1px solid var(--border); }
.slots { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.slots + .slots { margin-top: 4px; }
.slots--row { grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); }
.slots--row > li { min-width: 0; }
.slot__row { display: flex; align-items: stretch; gap: 4px; }
.slot__tap {
  display: grid;
  flex: 1;
  min-width: 0;
  min-height: var(--touch);
  padding: 4px 8px;
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.slot__tap:hover { background: var(--surface-hover); }
.slot__pos { overflow-wrap: anywhere; color: var(--text-muted); font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; }
.slot__name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot__meta { color: var(--text-muted); font-size: .8rem; text-align: left; }
.slot__pos--short { display: none; }
/* in a row a slot is a compact card: the name and the position on top, the icons in a second line on the right */
.slots--row .slot__row { flex-wrap: wrap; }
.slots--row .slot__tap { flex: 1 1 100%; }
.slots--row .slot__row > .slot__tap + * { margin-left: auto; }
.slots--row .slot__name { white-space: normal; overflow-wrap: anywhere; }
.slots--row .slot__meta { overflow-wrap: anywhere; }
@media (max-width: 599px) {
  .slots--row .slot__pos--short { display: inline; }
  .slots--row .slot__pos--long { display: none; }
  .slots--row .slot__tap { padding: 4px 6px; }
}
.slot__tap.is-selected, .bench__player.is-selected { border: 2px solid var(--focus); background: var(--surface-hover); }
.slot__tap.has-error { border-color: var(--danger); border-style: solid; }
.slot__tap.has-warning { border-color: var(--led); border-style: solid; }
.problems { display: grid; gap: 2px; margin: 4px 0 0; padding: 0; list-style: none; font-size: .82rem; }
.problem { padding-left: 8px; border-left: 3px solid var(--danger); color: var(--danger-text); }
.problem--warning { border-left-color: var(--led); color: var(--led); }
.problems--general { font-size: .9rem; }
.bench { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.bench__player {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  width: 100%;
  min-height: var(--touch);
  padding: 4px 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: grab;
}
.bench__player:hover { background: var(--surface-hover); }
.bench__player.is-placed { opacity: .7; }
.bench__name { flex: 1; min-width: 8em; font-weight: 600; }

/* lineup layout: the player list is a drawer at the bottom on the phone, a sticky left column from 768 px */
.lineup__layout { display: block; }
.lineup__main { min-width: 0; }
.lineup { padding-bottom: calc(var(--lineup-bottom, 0px) + var(--touch)); }
.lineup__bench {
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--lineup-bottom, 0px); /* above the round bar (measured in lineup.js) */
  z-index: 11;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.lineup__drawer-toggle {
  display: block;
  width: 100%;
  min-height: var(--touch);
  padding: 4px var(--gutter);
  background: var(--surface);
  border: 0;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.lineup__list { display: none; max-height: 50vh; overflow-y: auto; padding: 0 var(--gutter) var(--gutter); }
.player-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 8px; align-items: end; }
.player-filters select { width: 100%; min-width: 0; }
.player-filters [data-action="filter-reset"] { grid-column: 1 / -1; justify-self: start; }
.lineup__filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 8px; margin-bottom: 8px; }
@media (min-width: 768px) and (max-width: 1023px) { .lineup__filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 768px) { .listing__filters { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.lineup__drawer-toggle[aria-expanded="true"] + .lineup__list { display: block; }
@media (min-width: 768px) {
  .lineup { padding-bottom: var(--lineup-bottom, 0px); }
  .lineup__layout { display: grid; grid-template-columns: minmax(16em, 1fr) 2fr; gap: var(--gap); align-items: start; }
  .lineup__bench {
    position: sticky;
    top: var(--lineup-top, 56px); /* below the top bar and a round bar at the top */
    bottom: auto;
    z-index: auto;
    max-height: calc(100vh - var(--lineup-top, 56px) - var(--lineup-bottom, 0px));
    overflow-y: auto;
    background: none;
    border-top: 0;
  }
  .lineup__drawer-toggle { display: none; }
  .lineup__list { display: block; max-height: none; overflow: visible; padding: 0; }
}

/* training: one day per card on the phone, the week as a grid from 1024 px */
.training__unit, .training__group, .training__area, .training__template { width: 100%; min-width: 0; }
.training__templatebar { align-items: end; }
.training__templatebar .field { flex: 1 1 12em; min-width: 0; }
.training__picks:empty { display: none; }
.training__cell { padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.training__cell:last-child { border-bottom: 0; }
.training__bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--surface-hover); }
.training__seg { min-width: 0; }
.training__seg--skill { background: var(--led); }
.training__seg--team { background: var(--accent); }
.training__seg--recovery { background: var(--lamp-ok); }
.training__seg--rest { background: transparent; }
.training__legend li::before { content: ""; display: inline-block; width: .7em; height: .7em; margin-right: .35em; border-radius: 2px; background: var(--border-strong); }
.training__legend li.training__legend--skill::before { background: var(--led); }
.training__legend li.training__legend--team::before { background: var(--accent); }
.training__legend li.training__legend--recovery::before { background: var(--lamp-ok); }
.training__legend { margin: 4px 0 0; padding: 0; list-style: none; font-size: .8rem; gap: 4px 12px; }
.training__drop { font-size: .75rem; }
.training__hint { margin: 0; font-size: .8rem; }
.training__paid.is-paid { color: var(--led); }
@media (min-width: 1024px) {
  .training__day { padding: 8px; }
  .training__day .field__label { font-size: .75rem; }
}

/* tactics */
.tactics__scale { margin: -4px 0 0; font-size: .8rem; }
.tactics__summary { margin: 0; font-size: .8rem; overflow-wrap: anywhere; }

/* contracts */
.contract.is-expiring { box-shadow: inset 3px 0 0 var(--led); padding-left: 8px; }
.contract .list__main { min-width: 11em; }
.contract__renew { margin-left: auto; }
.renew__answer:empty { display: none; }
.renew input[aria-invalid=true] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
/* the tab bar scrolls by itself: it must not widen the page */
.tabs, .tabs__panel { min-width: 0; }
.team > *, .tabs__panel > *, .team .stack > * { min-width: 0; }

/* ---- transfers (Task 6) ---- */
/* filters: a collapsible panel on the phone, always open from 1024 px */
.market-filters { display: grid; gap: 8px; }
.market-filters__toggle { justify-self: start; }
.market-filters__toggle[aria-expanded=true] .icon { transform: rotate(180deg); }
.market-filters__body { display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px var(--gap); align-items: end; }
.market-filters.is-open .market-filters__body { display: grid; }
.market-filters__reset { grid-column: 1 / -1; }
/* tr3 G3: strength filter switch and band hint */
.market-filters__all { min-width: 0; }
.market-filters__band { grid-column: 1 / -1; margin: 0; }
/* market: cards on the phone, the table from 1024 px */
.market-cards { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.market-card {
  display: grid;
  grid-template-columns: 4em minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.market-card.is-own { background: var(--row-own); }
.market-card__side { display: grid; justify-items: end; gap: 6px; }
.market-table { display: none; }
.market-table .data-table th, .market-table .data-table td { padding-left: 6px; padding-right: 6px; }
.badge--own, .badge--bid, .badge--free { border-color: var(--accent); color: var(--accent); }
.badge--won { border-color: var(--lamp-ok); color: var(--ok-text); }
.badge--offer_made { border-color: var(--led); color: var(--led); }
.badge--lost { border-color: var(--danger); color: var(--danger-text); }
/* the sealed-bid hint (not a form notice: it never changes) */
.transfer-hint { margin: 0; padding: 10px 12px; border-left: 4px solid var(--led); border-radius: var(--radius-sm); background: var(--surface-2); }
/* rows with commands: the notice line and the reason of a lock below */
.transfer-row__actions { margin-left: auto; }
.transfer-row__note, .transfer-row > .form-notice { flex-basis: 100%; margin: 0; }
.transfer-row.is-forced { box-shadow: inset 3px 0 0 var(--led); padding-left: 8px; }
.bid input[aria-invalid=true] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
/* the offer terms (Lohngefüge part 5): the agent's words wrap at 360 px,
   the selects never wider than the dialog */
.bid select, .renew select { max-width: 100%; }
.agent-words { display: grid; gap: 4px; padding: 10px 12px; border-left: 4px solid var(--accent); border-radius: var(--radius-sm); background: var(--surface-2); overflow-wrap: anywhere; }
.agent-words p { margin: 0; }
.agent-words__warn { color: var(--danger-text); }
.motives { overflow-wrap: anywhere; }
.motives p { margin: 0; }
@media (min-width: 600px) {
  .market-filters__body { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .market-filters__toggle { display: none; }
  .market-filters__body { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .market-filters__reset { grid-column: auto; }
  .market-cards { display: none; }
  .market-table { display: block; }
}
/* manager section (Task 7): finance, arena, inbox; misc and bye */
.form-hint { margin: 0; padding: 8px 12px; border-left: 4px solid var(--led); border-radius: var(--radius-sm); background: var(--surface-2); }
.finance__forms, .arena__sections { display: grid; gap: var(--gap); }
.finance__form, .arena__section { padding: var(--gap); border: 1px solid var(--border); border-radius: var(--radius); }
.finance__form h3, .arena__section h3 { margin: 0; font-size: 1rem; }
.facts dd.stat-value--neg { color: var(--danger-text); }
.inbox__item { display: grid; gap: 8px; }
.inbox__item.is-unread { border-left: 4px solid var(--led); padding-left: 8px; }
.inbox__item.is-unread .inbox__text { font-weight: 700; }
.inbox__open { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; width: 100%; min-height: var(--touch); padding: 6px 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.inbox__date { color: var(--text-muted); }
.inbox__text { flex: 1 1 16em; }
@media (min-width: 1024px) {
  .finance__forms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .arena__sections { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* tables, schedule, strengths, stats (Task 8) */
.data-table tr.is-own th { color: var(--text); }
.data-table tr[class*="zone-"] > :first-child { border-left: 4px solid var(--zone-color, transparent); }
.zone-direct { --zone-color: var(--zone-direct); }
.zone-playoff { --zone-color: var(--zone-playoff); }
.zone-playdown { --zone-color: var(--zone-playdown); }
.zone-relegation { --zone-color: var(--zone-relegation); }
.zone-promotion { --zone-color: var(--zone-promotion); }
.zone-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; list-style: none; font-size: .85rem; color: var(--text-muted); }
.zone-legend li::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 2px; vertical-align: middle; background: var(--zone-color); }
.table-link { color: inherit; }
/* the coach as the second line of a table's club cell: from 768 px only,
   so a phone's table (360 px) stays as it is */
.table-coach { display: none; }
@media (min-width: 768px) {
  .table-coach { display: block; color: var(--text-muted); font-size: .85em; }
}
.round-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.round-nav select { flex: 1 1 12em; min-height: var(--touch); }
.game-list { margin: 0; padding: 0; list-style: none; }
.game-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.game-row:last-child { border-bottom: 0; }
.game-row.is-own { background: var(--row-own); }
.game-row__home { text-align: right; }
.game-row__score { min-width: 4.5em; text-align: center; font-family: var(--font-mono); font-weight: 700; color: var(--led); }
.game-row__score.is-open { color: var(--text-muted); font-weight: 400; }
.series-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.series-list li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.series-list .is-winner { font-weight: 700; }
.meter { width: 100%; min-width: 80px; height: 10px; accent-color: var(--accent); }
@media (min-width: 1024px) {
  .data-table .meter { min-width: 120px; }
}
.meter-cell { display: flex; align-items: center; gap: 8px; }
.meter-cell .num { min-width: 3ch; text-align: right; }
/* live matchday and season end (Task 9) */
.live__main .led-board__meta { flex-direction: column; align-items: center; gap: 2px; }
.live-main__period { color: var(--text); font-size: .85rem; letter-spacing: .04em; }
.live-main__clock { font-size: 1.15rem; }
.live-main__aggregate { color: var(--led); font-family: var(--font-mono); font-size: .85rem; }
.live-sides { display: grid; gap: var(--gap); }
.live-side { padding: var(--gap); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.live-side__name { margin: 0; font-size: 1rem; }
.live-side__facts, .live-side__goalie { margin: 4px 0; color: var(--text-muted); font-size: .9rem; }
.live-side__goalie.is-empty-net { color: var(--lamp-warn); font-weight: 600; }
.live-side__label { display: block; font-size: .75rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.live-side__ice, .live-side__pens { display: flex; flex-wrap: wrap; gap: 2px 10px; margin: 2px 0 6px; padding: 0; list-style: none; }
.live-side__box { padding: 6px 8px; border-radius: var(--radius-sm); background: var(--led-bg); }
.live-side__box.is-full { border: 1px solid var(--lamp-warn); }
.live-chances { display: grid; grid-template-columns: auto auto; justify-content: start; gap: 2px 16px; margin: 0; }
.live-chances__title { grid-column: 1 / -1; font-size: .75rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.live-chances dd { margin: 0; color: var(--led); font-family: var(--font-mono); }
.live-rows { display: grid; gap: 6px; }
.live-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 2px 8px;
  width: 100%;
  min-height: var(--touch);
  padding: 6px 10px;
  border: 2px solid var(--led-frame);
  border-radius: var(--radius-sm);
  background: var(--led-bg);
  color: var(--text);
  font: inherit;
  font-family: var(--font-mono);
  cursor: pointer;
}
.live-row:hover { border-color: var(--border-strong); }
.live-row[aria-pressed=true] { border-color: var(--led); }
.live-row.is-own .live-row__home, .live-row.is-own .live-row__away { font-weight: 700; }
.live-row__home { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-row__away { text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-row__score { min-width: 3.5em; text-align: center; }
.live-row__state { grid-column: 1 / -1; color: var(--text-muted); font-size: .8rem; text-align: center; }
.live-row .badge { grid-column: 1 / -1; justify-self: center; }
.live-commands__grid, .live-sub__fields, .live-tactics__fields, .live-tactics__minutes { display: grid; gap: var(--gap); }
.live-tactics__minutes { grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); }
.live-tactics__slot { display: grid; gap: 0.25rem; min-width: 0; }
.live-tactics__summary { margin: 0; font-size: .8rem; overflow-wrap: anywhere; }
.live-tactics__slots .btn[aria-pressed=true] { border-color: var(--led); color: var(--led); }
.cluster.live-tactics__slots, .live-quick__slots { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(9rem, 100%), 1fr)); }
.live-quick__slots .btn[aria-pressed=true] { border-color: var(--led); color: var(--led); }
.ticker { margin: 0; padding: 0; list-style: none; max-height: 24rem; overflow-y: auto; }
.ticker__line { display: flex; gap: 10px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.ticker__line:last-child { border-bottom: 0; }
.ticker__time { flex: 0 0 auto; color: var(--led); font-family: var(--font-mono); }
.live__ticker-head { justify-content: space-between; align-items: center; }
.live__ticker-head .panel__title { margin: 0; }
.ticker__line.is-hit .ticker__text, .ticker__line.is-faceoff .ticker__text, .ticker__line.is-shot .ticker__text, .ticker__line.is-blocked_shot .ticker__text { color: var(--text-muted); }
.ticker__line.is-fight .ticker__text { color: var(--danger-text); }
.live-result__shots { grid-column: 1 / -1; text-align: center; font-size: .8rem; color: var(--text-muted); }
.ticker__line.is-goal .ticker__text { font-weight: 700; color: var(--led); }
.ticker__line.is-penalty .ticker__text { color: var(--danger-text); }
.live-results__board { padding: 4px 10px; border: 2px solid var(--led-frame); border-radius: var(--radius-sm); background: var(--led-bg); font-family: var(--font-mono); }
.live-results__board .game-row__score { text-shadow: var(--glow-led); }
.live-result__note { color: var(--text-muted); font-weight: 400; }
.season-end__item .icon--lg { flex: 0 0 auto; }
.season-end__item.is-own { background: var(--row-own); }
@media (min-width: 600px) {
  .live-sub__fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .live-tactics__fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .live-sides { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .live-commands__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .live__area { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--gap); align-items: start; }
  /* board and commands over the full width; below them the ticker (left)
     next to the rows of all games (right), with or without commands */
  .live__area > .live__main, .live__area > .live-commands { grid-column: 1 / -1; }
  .live__area > .live__ticker-panel { grid-column: 1; }
  .live__area > .live__rows-panel { grid-column: 2; }
  .live__ticker-panel .ticker { max-height: 40rem; }
}

/* 360 px: long club names wrap inside their column, the score column keeps
   its width, nothing pushes the page wider than the screen */
.game-row { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.game-row__home, .game-row__away { min-width: 0; overflow-wrap: anywhere; }
.live-results__board .game-row__score { min-width: 3.5em; white-space: nowrap; }
.live-result__note { display: block; font-size: .7rem; }
.live-row__home, .live-row__away { min-width: 0; }
.page-head > * { min-width: 0; }
.page-head h1 { overflow-wrap: anywhere; }
.page-head .cluster { max-width: 100%; }
.page-head .btn { max-width: 100%; white-space: normal; }
/* the hockey world (world.js) and the league choice of the league pages:
   the country as its ISO code in a frame (no flag images) */
.country-code {
  display: inline-block;
  min-width: 2.6em;
  padding: 1px 6px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: .85em;
  text-align: center;
  color: var(--accent);
}
.league-picker, .league-picker > *, .league-picker__leagues > * { min-width: 0; }
.league-picker__country { max-width: 22rem; }
.league-picker__country select { min-height: var(--touch); max-width: 100%; }
.world-league { min-height: var(--touch); }
/* the farm-team link of the team info: a 44 px target of its own */
.farm-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; }
.farm-link { display: inline-flex; align-items: center; min-height: var(--touch); min-width: 0; overflow-wrap: anywhere; }
.world-league__name { display: inline-flex; align-items: center; min-height: var(--touch); min-width: 0; overflow-wrap: anywhere; font-weight: 700; }
.world-league.is-own { background: var(--row-own); }
.world-ranking { margin: 0; padding: 0; list-style: none; }
.world-ranking .list__item > span { min-width: 0; overflow-wrap: anywhere; }
/* the European cup (eurocup.js): the group tables side by side from the
   tablet on, each tie a small table (club, first leg, second leg, total),
   the advancing group places marked like the play-off places */
.zone-advance { --zone-color: var(--zone-playoff); }
.euro-groups { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 36rem), 1fr)); }
.euro-groups > * { min-width: 0; }
.euro-ties { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); }
.euro-tie { min-width: 0; padding: 4px 0; border-bottom: 1px solid var(--border); }
.euro-tie.is-own { background: var(--row-own); }
.euro-tie__table th[scope="row"] { min-width: 0; padding: 0 10px; border-bottom: 1px solid var(--border); color: var(--text); font-size: inherit; font-weight: 400; letter-spacing: normal; text-transform: none; white-space: normal; overflow-wrap: anywhere; }
.euro-tie__table tr:last-child th[scope="row"] { border-bottom: 0; }
.euro-tie__table .table-link { display: inline-flex; align-items: center; min-height: var(--touch); }
.euro-tie__table tr.is-winner th[scope="row"] { font-weight: 700; }
.euro-tie__table td.num { width: 3.5em; font-family: var(--font-mono); }
.euro-tie__note { margin: 4px 10px 0; font-size: .85rem; }
/* a game with its stage line (schedule.js gameRow with a stage) */
.game-entry { border-bottom: 1px solid var(--border); padding-top: 4px; }
.game-entry:last-child { border-bottom: 0; }
.game-entry.is-own { background: var(--row-own); }
.game-entry .game-row { border-bottom: 0; }
.game-entry .table-link { display: inline-flex; align-items: center; min-height: var(--touch); }
.game-entry__stage { display: block; font-size: .8rem; }
.euro-clubs .list__item { align-items: baseline; }
.euro-clubs__names { min-width: 0; overflow-wrap: anywhere; }
.euro-clubs .is-own { font-weight: 700; }
.euro-entry .panel__title .icon { vertical-align: middle; }
.home__cup { align-self: flex-start; max-width: 100%; white-space: normal; }
/* friendlies (friendlies.js): an entry wraps, its actions on their own line */
.friendly__main { flex: 1 1 14em; min-width: 0; overflow-wrap: anywhere; }
.friendly .table-link { display: inline-flex; align-items: center; min-height: var(--touch); }
.friendly > .cluster:empty { display: none; }
.friendly > .cluster, .friendly > .form-notice { flex-basis: 100%; }
/* career (career.js): the board's confidence as a bar, its level in words
   too; the colour follows the level (ok, warning, last warning, danger) */
.confidence { display: grid; gap: 4px; }
.confidence__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; }
.confidence__label { color: var(--text-muted); }
.confidence__track { height: 14px; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; }
.confidence__fill { height: 100%; background: var(--lamp-ok); }
.confidence--warning .confidence__fill { background: var(--zone-playdown); }
.confidence--last_warning .confidence__fill, .confidence--danger .confidence__fill { background: var(--danger); }
.confidence__level { margin: 0; }
.confidence__level.is-warn { color: var(--danger-text); font-weight: 700; }
.career-offer__main { flex: 1 1 14em; min-width: 0; overflow-wrap: anywhere; }
.career-offer .table-link { display: inline-flex; align-items: center; min-height: var(--touch); }
/* the chronicle (chronicle.js): icon, date, text, the way to the club */
.chronicle__entry { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.chronicle__text { flex: 1 1 14em; min-width: 0; overflow-wrap: anywhere; }
.chronicle__coach { display: block; color: var(--text-muted); }
.chronicle__club, .team-coach__history .table-link { display: inline-flex; align-items: center; min-height: var(--touch); }
.chronicle__filters { align-items: flex-end; }
.chronicle__filters select { min-height: var(--touch); max-width: 100%; }
.career-offer > .cluster, .career-offer > .form-notice { flex-basis: 100%; }
.career-offer__due { color: var(--danger-text); }
.career__history .list__item, .career__goal .list__item, .season-end__own .list__item, .farm__limits .list__item { overflow-wrap: anywhere; }
.career__history .is-dismissed { color: var(--danger-text); }
.roundbar__clubless { align-self: center; }
/* farm team (team/farm.js): a player with his "Zurückholen" */
.farm__player { flex-wrap: wrap; }
.farm__player > .form-notice { flex-basis: 100%; }
.lineup__chem { margin: 0 0 6px; font-size: .85rem; color: var(--text-muted); }
.training__areas { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.training__area-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 3ch; gap: 8px; align-items: center; font-size: .9rem; }
.training__area-bar { display: block; height: 10px; border-radius: 5px; overflow: hidden; background: var(--surface-hover); }
.training__area-fill { display: block; height: 100%; background: var(--accent); }
.training__area-value { text-align: right; }

/* character traits and mood (own squad): symbol + text, never colour only */
.squad-card__side { display: inline-flex; align-items: center; gap: 8px; }
.mood { font-weight: 650; white-space: nowrap; }
.mood--great, .mood--good { color: var(--ok-text); }
.mood--neutral { color: var(--text-muted); }
.mood--bad, .mood--awful { color: var(--danger-text); }
.team-mood { margin: 0; }
.badge--moodLow { border-color: var(--danger); color: var(--danger-text); }
.trait-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.trait-chip { display: grid; gap: 2px; flex: 1 1 14em; min-width: 0; padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius); }
.trait-chip__name, .trait-chip__effect { overflow-wrap: anywhere; }
.trait-chip__effect { font-size: .85rem; }
.mood-bar { max-width: 100%; height: 10px; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 5px; overflow: hidden; }
.mood-bar__fill { height: 100%; background: var(--text-muted); }
.mood-bar--great .mood-bar__fill, .mood-bar--good .mood-bar__fill { background: var(--lamp-ok); }
.mood-bar--bad .mood-bar__fill, .mood-bar--awful .mood-bar__fill { background: var(--danger); }

/* talks and transfer requests (part 4) */
.badge--wantsOut { border-color: var(--danger); color: var(--danger-text); }
.talk { max-width: 100%; }
.talk h3 { margin: 0; }
.talk__active, .talk__distrust { overflow-wrap: anywhere; }
.talk select { max-width: 100%; }

/* estimates of foreign players: range text + bar (the text is the value) */
.range-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; width: 100%; }
.range-bar { grid-column: 1 / -1; position: relative; display: block; max-width: 100%; height: 8px; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 4px; overflow: hidden; }
.range-bar__fill { position: absolute; top: 0; bottom: 0; background: var(--text-muted); }
.skill-group--range .skill-group__head { cursor: default; }
.market__open { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: inherit; text-align: left; text-decoration: underline; cursor: pointer; min-height: var(--touch); overflow-wrap: anywhere; }
.chip--estimate { font-size: .85rem; }
@media (max-width: 1023px) {
  .skill-group--range .facts { display: none; }
}

/* the newspaper (newspaper.js; play-test round 3, E2): a paper sheet on the
   dark page. Masthead with motto line, the name in Fraktur and the issue
   line between double rules; serif headline and body, columns with rules
   (one on the phone, two from 720 px, three from 1024 px), comic pictures,
   newspaper boxes for rumours, letters and quotes. Items outside the sheet
   (the moments page) keep the dark look. */
.paper__tabs { gap: 6px; margin-bottom: -6px; padding: 0 6px; position: relative; z-index: 1; }
.paper__tabs .btn { min-height: var(--touch); border-bottom-left-radius: 0; border-bottom-right-radius: 0; box-shadow: none; }
.paper__tabs .btn--ghost { background: var(--surface-2); border-color: var(--ink); }
.paper__tabs .btn--primary { background: var(--paper); color: var(--paper-ink); }
.paper__sheet {
  min-width: 0;
  padding: 14px 14px 18px;
  background-color: var(--paper);
  background-image: radial-gradient(var(--paper-dots) 1px, transparent 1.2px);
  background-size: 6px 6px;
  color: var(--paper-ink);
  border: var(--line) solid var(--ink);
  border-radius: 4px var(--radius) var(--radius) var(--radius);
  box-shadow: 6px 6px 0 var(--ink);
  font-family: var(--font-serif);
  font-weight: 400;
}
.paper__masthead { text-align: center; }
.paper__topline {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; margin: 0; padding-bottom: 4px;
  border-bottom: 1px solid var(--paper-ink); color: var(--paper-muted);
  font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
}
.paper__name { margin: 8px 0 4px; font-family: var(--font-mast); font-weight: 400; font-size: clamp(1.9rem, 7vw, 4.2rem); line-height: 1.1; overflow-wrap: anywhere; }
.paper__masthead .paper__issue { margin: 0; padding: 4px 0; border-block: 3px double var(--paper-ink); color: var(--paper-ink); font-size: .85rem; font-weight: 600; }
.paper__sheet .badge { border-color: var(--paper-ink); color: var(--paper-ink); }
.paper__unread { margin-inline-start: 8px; background: var(--paper-red); color: var(--paper-on-red); }
.paper__sheet .paper__unread { border-color: var(--ink); color: var(--paper-on-red); }
.paper__empty { margin: 16px 0; color: var(--paper-muted); font-style: italic; }
.paper__item { min-width: 0; overflow-wrap: anywhere; }
.paper__item--headline .paper__head { font-size: 1.6rem; line-height: 1.2; margin: 4px 0 8px; }
.paper__item--headline { padding-bottom: 12px; border-bottom: 1px solid var(--border-strong); }
.paper__cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); margin-top: var(--gap); }
@media (min-width: 720px) {
  .paper__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .paper__item--headline .paper__head { font-size: 2.1rem; }
}
.paper__cols .paper__item { padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.paper__head { margin: 2px 0 6px; }
.paper__body { margin: 0; }
blockquote.paper__body { margin: 0; padding-left: 12px; border-left: 3px solid var(--border-strong); font-style: italic; }
.paper__rubric { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.paper__crests { display: inline-flex; gap: 6px; vertical-align: middle; margin-inline-end: 6px; }
.paper__picture { margin: 0 0 8px; }
.paper__picture img { display: block; width: 100%; height: auto; border: var(--line) solid var(--ink); background: var(--bubble); }
.paper__rumour { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; }
.paper__actions .btn { min-height: var(--touch); max-width: 100%; white-space: normal; }
.paper__pager { justify-content: space-between; margin-top: 14px; }
.paper__pager .btn, .paper__seasons .btn { min-height: var(--touch); max-width: 100%; white-space: normal; }
.paper__pager { flex-wrap: wrap; }
.paper__page-at { align-self: center; font-variant-numeric: tabular-nums; }
.paper__next { margin: 8px 0 0; font-weight: 600; }
.paper__quiet-table { margin: 12px 0; }

/* the short-news box "Kurz gemeldet" (newspaper.js shortBox; tr5-fix,
   owner 2026-11-16): below the items of the front page, a framed box with
   a small caps title and one line per entry between thin rules */
.paper__short { margin-top: var(--gap); padding: 8px 12px; border: var(--line-thin) solid var(--paper-ink); background: var(--paper-2); min-width: 0; overflow-wrap: anywhere; }
.paper__short-title { margin: 0 0 4px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.paper__short-list { margin: 0; padding: 0; list-style: none; }
.paper__short-item { padding: 4px 0; border-top: 1px solid var(--paper-rule); font-weight: 600; }
.paper__short-item:first-child { border-top: 0; }
.paper__entry { overflow-wrap: anywhere; }
.paper__entry--old { color: var(--text-muted); }

/* inside the sheet: ink on paper, serif type, rules between the columns */
.paper__sheet .paper__item--headline { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 18px; padding: 14px 0 16px; border-bottom: 2px solid var(--paper-ink); }
.paper__sheet .paper__item--headline .paper__head { font-family: var(--font-head); font-weight: 900; font-size: clamp(1.8rem, 6vw, 3.2rem); line-height: 1.04; letter-spacing: -.01em; }
.paper__sheet .paper__item--headline .paper__body { font-size: 1.05rem; line-height: 1.55; }
.paper__sheet .paper__item--headline > .paper__body::first-letter { float: left; margin: 4px 8px 0 0; color: var(--paper-red); font-family: var(--font-head); font-weight: 900; font-size: 3.4rem; line-height: .85; }
@media (min-width: 720px) {
  .paper__sheet { padding: 20px 26px 26px; }
  .paper__sheet .paper__item--headline:has(> .paper__picture) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .paper__sheet .paper__item--headline > .paper__picture { grid-column: 2; grid-row: 1 / span 6; align-self: start; }
  .paper__sheet .paper__cols { gap: 0; }
  .paper__sheet .paper__cols > .paper__item { padding: 0 14px 12px; border-left: 1px solid var(--paper-rule); }
}
@media (min-width: 1024px) {
  .paper__sheet .paper__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.paper__sheet .paper__cols .paper__item { border-bottom: 1px solid var(--paper-rule); padding-top: 10px; }
.paper__sheet .paper__head { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; line-height: 1.15; color: var(--paper-ink); }
.paper__sheet .paper__body { font-size: .98rem; line-height: 1.5; hyphens: auto; }
.paper__sheet .paper__rubric {
  padding: 1px 8px; background: var(--paper-red); color: var(--paper-on-red); border: var(--line-thin) solid var(--ink);
  font-family: var(--font); font-size: .72rem; letter-spacing: .08em; transform: rotate(-1.5deg);
}
.paper__sheet .paper__item--rubric,
.paper__sheet .paper__cols > .paper__item--rubric { background: var(--paper-2); border: var(--line-thin) solid var(--paper-ink); padding: 10px 12px; margin: 10px 0; }
.paper__sheet .paper__item--headline > .paper__rubric, .paper__sheet .paper__item--headline > .paper__crests { justify-self: start; }
.paper__sheet .form-notice { background: var(--paper-2); color: var(--paper-ink); }
.paper__sheet .paper__item[data-kind^="rumour"] { border-style: dashed; }
.paper__sheet blockquote.paper__body { border-left-color: var(--paper-red); }
.paper__sheet .muted, .paper__sheet .paper__speaker { color: var(--paper-muted); }
.paper__sheet .paper__intro { color: var(--paper-ink); }
.paper__sheet .paper__check { color: var(--paper-muted); font-style: italic; }
.paper__sheet .paper__state { border-color: var(--paper-red); color: var(--paper-red); transform: rotate(-4deg); text-transform: uppercase; letter-spacing: .08em; }
.paper__sheet .paper__denied { border-color: var(--paper-ink); }
.paper__sheet .paper__pager { padding-top: 10px; border-top: 3px double var(--paper-ink); }
.paper__sheet a:not(.btn) { color: var(--paper-red); }

/* newspaper pages (tr3-j): the page tabs under the masthead, the report
   page (the box score of package D printed on the paper), the results per
   competition, the tables (own league open, the others folded) and the
   short reports of the league. One column on the phone; every wide table
   scrolls inside its own wrapper. */
.paper__pages { gap: 6px; margin: 10px 0 0; padding-bottom: 10px; border-bottom: 1px solid var(--paper-rule); }
.paper__pages .btn { min-height: var(--touch); max-width: 100%; white-space: normal; }
.paper__sheet .paper__pages .btn--primary { background: var(--paper-ink); color: var(--paper); border-color: var(--paper-ink); }
.paper__page { min-width: 0; overflow-wrap: anywhere; margin-top: 12px; }
.paper__sheet .paper__page-head { font-family: var(--font-head); font-weight: 900; font-size: clamp(1.5rem, 5vw, 2.4rem); line-height: 1.08; margin: 4px 0 10px; }
.paper__scroll { max-width: 100%; overflow-x: auto; }
.paper__groups, .paper__games-grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) {
  .paper__groups, .paper__games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.paper__games, .paper__scorers, .paper__goalies { margin: 0; padding-left: 18px; }
.paper__games { list-style: none; padding-left: 0; }
.paper__game-line { padding: 3px 0; border-bottom: 1px dotted var(--paper-rule); }
.paper__group--own .paper__head { color: var(--paper-red); }
.paper__table { margin: 10px 0; }
.paper__fold-head { min-height: var(--touch); display: flex; align-items: center; cursor: pointer; font-family: var(--font-head); font-weight: 700; color: var(--paper-ink); }
.paper__sheet .paper__game .paper__rubric { margin: 8px 0 2px; }
.paper__forfeit { font-style: italic; }
.paper__marker { margin-inline-end: 6px; }
/* the box score and the tables on paper: ink on paper, no dark surface */
.paper__sheet .box-score, .paper__sheet .table-wrap { background: transparent; border-color: var(--paper-ink); color: var(--paper-ink); }
.paper__sheet .box-score__caption, .paper__sheet .box-score__table tbody th, .paper__sheet .data-table caption { color: var(--paper-ink); font-family: var(--font-head); }
.paper__sheet .box-score__table thead th, .paper__sheet .data-table thead th { color: var(--paper-muted); }
.paper__sheet .box-score__table th, .paper__sheet .box-score__table td, .paper__sheet .data-table th, .paper__sheet .data-table td { border-bottom-color: var(--paper-rule); color: var(--paper-ink); }

/* stories and press (stories.js, press.js): story cards with one button per
   option, the help and default marks, the press answers; theme switches */
.home__stories .btn { min-height: var(--touch); max-width: 100%; white-space: normal; }
.story { min-width: 0; overflow-wrap: anywhere; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.story__title, .press__text { margin: 2px 0 6px; }
.story__options, .press__answers { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.story__option, .press__answer { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.story__choice, .press__tone { min-height: var(--touch); max-width: 100%; white-space: normal; text-align: left; }
.story__marks { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.story__hint, .press__claim { flex-basis: 100%; }
.press__quote { flex-basis: 100%; font-style: italic; overflow-wrap: anywhere; }
/* the post-game press (press.js postSection, tr3 R): question cards one
   column, the answers wrap like .press__answers; the chosen answer as a
   quote; nothing wider than a 360 px phone */
.postpress { min-width: 0; overflow-wrap: anywhere; }
.postpress__questions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.postpress__question { min-width: 0; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.postpress__asked, .postpress__lead, .postpress__kicker { margin: 0; }
.postpress__lead { font-style: italic; }
.postpress__chosen { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 8px 0 0; min-width: 0; }
.postpress__skip { flex-wrap: wrap; }
.postpress__pre { margin-top: 8px; }
.story__past { margin: 4px 0 0; padding-left: 18px; }
.themes .field--check { min-height: var(--touch); }
/* Board and fans (manager/board): the trust bar sits beside the mood word,
   never the colour alone; a shareholder wraps on a 360 px phone. */
.board__holder { flex-wrap: wrap; gap: 8px; }
.board__trust { flex: 1 1 120px; min-width: 120px; }
.board__formers .list__item { flex-wrap: wrap; gap: 8px; }
.badge--mood-backs { border-color: var(--lamp-ok); color: var(--ok-text); }
.badge--mood-doubts { border-color: var(--danger); color: var(--danger-text); }
.board__request .btn { max-width: 100%; white-space: normal; min-height: var(--touch); }
/* the private page and the negotiation dialogs (private.js, negotiate.js):
   every block may shrink (min-width 0) and wraps long texts at 360 px */
.private, .private > *, .private .panel, .private .split > * { min-width: 0; }
.private .btn, .negotiate .btn, .package .btn { min-height: var(--touch); max-width: 100%; white-space: normal; }
.private__options { gap: 8px; }
.private__vacation { display: grid; gap: 4px; }
.shop-item { min-width: 0; display: grid; gap: 4px; overflow-wrap: anywhere; }
.shop-item__main { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.shop-item__confirm { margin: 0; flex-basis: 100%; }
.stress--high .confidence__fill { background: var(--danger); }
.stress--mid .confidence__fill { background: var(--zone-playdown); }
.negotiate, .negotiate > * { min-width: 0; overflow-wrap: anywhere; }
.negotiate h3 { margin: 4px 0; }
.negotiate__counter, .negotiate__fallback, .negotiate__relocation { border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 8px 12px; }
.negotiate input, .negotiate select { max-width: 100%; }
.package-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); }
@media (min-width: 720px) {
  .package-list { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
}
.package { min-width: 0; overflow-wrap: anywhere; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 8px 12px; }
.fame-stars { margin: 4px 0 0; }

/* moments (moments.js, cv.js): prizes, banners, yearbook, CV */
.award-list { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) {
  .award-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.award { display: flex; gap: 8px; align-items: flex-start; min-width: 0; overflow-wrap: anywhere; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; background: var(--surface); }
.award--own { border-color: var(--led); }
.award__main { min-width: 0; flex: 1 1 auto; }
.award__name, .award__winner, .award__text, .award__fan, .award__cheer { margin: 0 0 4px; }
.gala__group { margin: 12px 0 4px; }
.banners { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); padding: 0; }
.banner { display: flex; gap: 8px; align-items: flex-start; min-width: 0; overflow-wrap: anywhere; border: 1px solid var(--border-strong); border-top-width: 4px; border-radius: var(--radius-sm); padding: 8px 12px; }
.banner__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.banner__badges, .cv__badges { display: flex; flex-wrap: wrap; gap: 4px; }
.cv__station { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; min-width: 0; overflow-wrap: anywhere; }
.cv__main { display: flex; flex-direction: column; min-width: 0; }
.yearbook__season { border-top: 1px solid var(--border); padding-top: 8px; min-width: 0; }
.paper--special .paper__sheet { box-shadow: 6px 6px 0 var(--led); }
.paper__special { margin-inline-start: 8px; border-color: var(--led); color: var(--led); }
.paper__sheet .paper__special { background: var(--paper-red); border-color: var(--ink); color: var(--paper-on-red); }

/* celebration (ui/celebrate.js): overlay with CSS confetti; a still banner
   under prefers-reduced-motion (base.css also stops every animation) */
.celebrate { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: var(--gutter); background: rgba(0, 0, 0, .6); overflow: hidden; }
.celebrate--still { position: static; inset: auto; z-index: auto; padding: 0; background: none; overflow: visible; }
.celebrate__card { position: relative; max-width: 100%; box-sizing: border-box; border: 2px solid var(--led); border-radius: var(--radius-sm); background: var(--surface-2); padding: 16px; text-align: center; overflow-wrap: anywhere; }
.celebrate--still .celebrate__card { width: 100%; }
.celebrate__kicker { margin: 0 0 4px; font-size: 1.25rem; font-weight: 800; }
.celebrate__text { margin: 0 0 12px; }
.celebrate__confetti { position: absolute; inset: 0; pointer-events: none; }
.celebrate__piece { position: absolute; top: -16px; left: var(--x); width: 8px; height: 14px; background: var(--tint); animation: celebrate-fall var(--fall) linear var(--delay) infinite; }
@keyframes celebrate-fall {
  to { transform: translateY(110vh) rotate(540deg); }
}
@media (prefers-reduced-motion: reduce) {
  .celebrate { position: static; inset: auto; z-index: auto; padding: 0; background: none; overflow: visible; }
  .celebrate__confetti { display: none; }
}

/* hall (views/manager/hall.js, ui/hallmap.js): the top view of the hall,
   the block list of the phone, the order dialog and the finance months */
.hall__map { min-width: 0; }
.hall__ladder { padding: 0; list-style: none; }
.hall__step { border-left: 4px solid var(--border); padding-left: 8px; }
.hall__step .badge { margin-left: 8px; }
.hall__step--done { border-left-color: var(--text-muted); }
.hall__step--now { border-left-color: var(--accent); font-weight: 600; }
.hallmap { display: block; width: 100%; max-width: 960px; height: auto; margin-inline: auto; }
/* the editor's map (blocks are buttons) is drawn no narrower than its
   viewBox (MIN_DRAW_PX), so every block is a 44-px target; the static map of
   a foreign hall has no targets and scales down to the container (360 px) */
.hallmap--pick { min-width: 640px; }
.hallmap--static { max-width: 100%; }
.hallmap__ice { fill: var(--surface-2); stroke: var(--border-strong); stroke-width: 1.5; }
.hallmap__shape { stroke: var(--bg); stroke-width: 1.5; }
.hallmap__block { cursor: pointer; }
.hallmap__block--standing .hallmap__shape { fill: var(--kind-standing); }
.hallmap__block--seated .hallmap__shape { fill: var(--kind-seated); }
.hallmap__block--vip .hallmap__shape { fill: var(--kind-vip); }
.hallmap__block--empty .hallmap__shape { fill: var(--surface); stroke: var(--border); }
.hallmap__block--closed .hallmap__shape { stroke: var(--lamp-warn); stroke-dasharray: 4 3; opacity: .7; }
.hallmap__block--locked { cursor: not-allowed; opacity: .45; }
.hallmap__block:focus-visible { outline: none; }
.hallmap__block:focus-visible .hallmap__shape, .hallmap__block:hover .hallmap__shape { stroke: var(--focus); stroke-width: 3; }
.hallmap__block--locked:hover .hallmap__shape { stroke: var(--bg); stroke-width: 1.5; }
.hallmap__hatch { stroke: var(--lamp-warn); stroke-width: 3; pointer-events: none; }
.hallmap__site { fill: var(--focus); stroke: var(--bg); stroke-width: 1.5; pointer-events: none; }
.hallmap__banner { fill: var(--led); stroke: var(--bg); stroke-width: 1; }
.hallmap-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0; padding: 0; list-style: none; font-size: .85rem; }
.hallmap-legend__item::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: middle; border-radius: 2px; background: var(--surface); border: 1px solid var(--border); }
.hallmap-legend__item--standing::before { background: var(--kind-standing); }
.hallmap-legend__item--seated::before { background: var(--kind-seated); }
.hallmap-legend__item--vip::before { background: var(--kind-vip); }
.hall__list { display: grid; gap: 8px; padding: 0; list-style: none; }
.hall__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; width: 100%; min-height: 44px; text-align: left; border-left-width: 6px; }
.hall__row--standing { border-left-color: var(--kind-standing); }
.hall__row--seated { border-left-color: var(--kind-seated); }
.hall__row--vip { border-left-color: var(--kind-vip); }
.hall__row:disabled { opacity: .55; }
.hall__row-title { font-weight: 700; }
.hall__order { min-width: min(100%, 320px); }
.hall__quote { min-height: 1.5em; }
.hall__build { display: grid; gap: 4px; }
.hall__progress { width: 100%; height: 12px; }
.hall__funds .btn { min-height: 44px; max-width: 100%; white-space: normal; }
/* object catalog (views/manager/catalog.js): cards stacked, the area tabs
   a horizontally scrollable bar with 44-px targets, no table, no fixed width */
.catalog { min-width: 0; }
.catalog__area { min-width: 0; max-width: 100%; }
.catalog__area .tabs__list { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.catalog__area .tabs__tab { flex: none; min-height: 44px; }
.catalog__cards { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.catalog__card { min-width: 0; display: grid; gap: 8px; align-content: start; overflow-wrap: anywhere; }
.catalog__name { margin: 0; }
.catalog__level { width: 100%; height: 12px; }
.catalog__actions .btn { min-height: 44px; max-width: 100%; white-space: normal; }
.catalog__order { min-width: 0; }
@media (min-width: 900px) {
  .catalog__cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
}
.data-table tr.is-total th, .data-table tr.is-total td { font-weight: 800; border-top: 2px solid var(--border-strong); }
@media (max-width: 480px) {
  .hall__order { min-width: 0; }
}

/* Arena licence (hall tab) and travel plan (pairings, own league) */
.licence__scroll { overflow-x: auto; }
.licence__table th, .licence__table td { padding: 6px 8px; text-align: left; }
.licence__table .num { text-align: right; }
.licence__row--met { box-shadow: inset 6px 0 0 var(--lamp-ok); }
.licence__row--begun { box-shadow: inset 6px 0 0 var(--warn-text); }
.licence__row--open { box-shadow: inset 6px 0 0 var(--danger); }
.licence__state--met { border-color: var(--lamp-ok); color: var(--ok-text); }
.licence__state--begun { border-color: var(--warn-text); color: var(--warn-text); }
.licence__state--open { border-color: var(--danger); color: var(--danger-text); }
.licence__all { margin: 0; padding: 8px 12px; border-left: 6px solid var(--border-strong); font-weight: 700; }
.licence__all--met { border-left-color: var(--lamp-ok); color: var(--ok-text); background: color-mix(in srgb, var(--lamp-ok) 12%, transparent); }
.licence__all--begun { border-left-color: var(--warn-text); color: var(--warn-text); background: color-mix(in srgb, var(--warn-text) 12%, transparent); }
.licence__all--open { border-left-color: var(--danger); color: var(--danger-text); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.travel__rule { max-width: 100%; }
.travel__rule input { max-width: 100%; min-height: var(--touch); }
.travel__list { display: grid; gap: 8px; padding: 0; list-style: none; }
.travel__item { display: grid; gap: 8px; min-width: 0; }
.travel__game { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 2px 12px; width: 100%; min-height: var(--touch); text-align: left; }
.travel__opponent { flex: 1 1 8em; min-width: 0; font-weight: 700; }
.travel__options { display: grid; gap: 8px; padding: 0; list-style: none; }
.travel__option { width: 100%; min-height: var(--touch); justify-content: flex-start; text-align: left; }
.travel__option.is-active { border-color: var(--accent); }
.travel__more { width: 100%; }

/* Sponsors tab (manager): contracts, offers side by side, board surfaces */
.sponsors { min-width: 0; }
.sponsors, .sponsors__card, .sponsors__surface { overflow-wrap: anywhere; }
.finance__deals, .finance__deals .list__item { overflow-wrap: anywhere; }
.sponsors__area { display: grid; gap: 10px; }
.sponsors__area .panel__title { margin: 0; }
.sponsors__area .panel__title:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.sponsors__due, .sponsors__bridge { margin: 0; }
.sponsors__bridge { font-weight: 650; }
.sponsors__ask-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.sponsors__ask { display: grid; gap: 6px; }
.sponsors__ask-act { min-height: var(--touch); }
.sponsors__offers { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.sponsors__card { display: grid; gap: 6px; align-content: start; min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.sponsors__firm { font-weight: 700; }
.sponsors__facts { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; font-variant-numeric: tabular-nums; }
.sponsors__expected { font-weight: 650; }
.sponsors__card .btn { justify-self: stretch; }
.sponsors__surfaces { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.sponsors__surface { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; min-height: var(--touch); padding: 6px 0; border-bottom: 1px solid var(--border); }
.sponsors__surface:last-child { border-bottom: 0; }
.sponsors__name { flex: 1 1 10em; min-width: 0; }
.sponsors__toggle { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 2px 12px; width: 100%; min-height: var(--touch); text-align: left; }
.sponsors__surface:has(.sponsors__toggle) { display: grid; }
.sponsors__surface .sponsors__offers { padding-top: 6px; }
.sponsors__fill { justify-self: stretch; }
.tabs__dot { display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: var(--led); vertical-align: middle; }

.sponsors__status { margin: 0; }
.sponsors__status:not(:empty) { padding: 10px 12px; border-left: 4px solid var(--lamp-ok); border-radius: var(--radius-sm); background: var(--surface-2); }

/* ---- autosave of lineup, tactics and training (tr3-b) ---- */
.autosave { display: grid; gap: 8px; }
.autosave__status { margin: 0; color: var(--text-muted); font-size: .875rem; }

/* tr3-b lineup tabs and empty slots */
.lineup .tabs__tab { flex: none; }
.lineup__tab-warn { margin-left: 6px; color: var(--led); font-variant-numeric: tabular-nums; }
.slot__tap.is-empty { border: 2px dashed var(--led); }
.slot__tap.is-empty.has-error { border-color: var(--danger); }
.slot__tap.is-empty .slot__name { color: var(--led); }
.lineup__tab-problem { margin-left: 6px; color: var(--led); font-weight: 800; }
.lineup__tab-problem.is-error { color: var(--danger-text); }

/* club crests (ui/crest.js, play-test round 3 E3): an inline SVG beside the club name */
.crest { flex: none; display: inline-block; vertical-align: middle; overflow: visible; }
.crest text { font-family: var(--font); letter-spacing: -.5px; }
.table-link:has(> .crest) { display: inline-flex; align-items: center; gap: 6px; }
.page-head > .crest { margin-right: 4px; }

/* ---- busy states (play-test round 3 A4) ---- */
.btn.is-busy { cursor: progress; }
.btn.is-busy::after {
  content: "";
  display: inline-block;
  box-sizing: border-box;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: busy-spin .8s linear infinite;
}
@keyframes busy-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .btn.is-busy::after { animation: none; border-style: dotted; border-top-color: currentColor; }
}

/* tr3-D: rink, box score, pre-game */
/* the live rink (live/rink.js): the video cube, the rink of at most 480 px
   (centred) and the comparison of the lines; stacked on phones, rink and
   comparison side by side from 768 px. Colours only from the tokens (black
   outlines aside). */
.rink-view__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); align-items: start; }
@media (min-width: 768px) {
  .rink-view__grid { grid-template-columns: minmax(0, 480px) minmax(0, 1fr); }
}
.rink-cube { width: 100%; max-width: 480px; margin: 0 auto; padding: 8px 12px 10px; border: 2px solid var(--led-frame); border-radius: var(--radius); background: var(--led-bg); text-align: center; }
.rink-cube__row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; }
.rink-cube__team { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; font-size: 1.1rem; font-weight: 700; letter-spacing: .06em; color: var(--text); }
/* tr3-P: crests beside the short names; smaller on phones */
.rink-cube__team > .crest { width: 34px; height: auto; }
@media (max-width: 480px) { .rink-cube__team > .crest { width: 24px; } }
.rink-cube__score { font-family: var(--font-mono); font-size: 2.4rem; line-height: 1; color: var(--led); text-shadow: var(--glow-led); }
.rink-cube__meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 14px; margin-top: 4px; font-size: .875rem; color: var(--text-muted); }
.rink-cube__clock { font-family: var(--font-mono); color: var(--led); }
.rink-panel { width: 100%; max-width: 480px; margin: 0 auto; }
.rink { display: block; width: 100%; height: auto; }
.rink text { font-family: var(--font); font-weight: 700; }
.rink__ice { fill: var(--text); stroke: #000; stroke-width: 1.6; }
.rink__red { fill: none; stroke: var(--danger); }
.rink__blue { fill: none; stroke: var(--kind-seated); }
.rink__crease { fill: var(--accent); stroke: var(--danger); }
.rink__goal { fill: none; stroke: #000; }
.rink__bench rect { fill: var(--surface-2); stroke: #000; }
.rink__box rect { fill: var(--surface); stroke: #000; }
.rink__box.is-full rect { stroke: var(--lamp-warn); }
.rink__title { fill: var(--text-muted); letter-spacing: .04em; }
.rink__fact { fill: var(--text); font-weight: 400; }
.rink__pen { fill: var(--led); }
.rink__player circle { fill: var(--surface-2); stroke: #000; stroke-width: 1; }
.rink__player text { fill: var(--text); }
.rink__player--away circle { fill: var(--led); }
.rink__player--away text { fill: var(--led-bg); }
.rink__player--home.rink__player--goalie circle { fill: var(--curve-own); }
.rink__player--away.rink__player--goalie circle { fill: var(--curve-other); }
.rink__player--goalie text { fill: var(--led-bg); }
.rink__puck { fill: var(--led-bg); transition: transform .6s ease-out; }
.rink__puck.is-still { transition: none; }
.rink__burst { opacity: 0; transform-box: fill-box; transform-origin: center; pointer-events: none; }
.rink__burst polygon { fill: var(--curve-own); stroke: #000; stroke-linejoin: round; }
.rink__burst-text { fill: var(--led-bg); }
.rink__burst.is-on { animation: rink-goal 1.6s ease-out forwards; }
@keyframes rink-goal {
  0% { opacity: 0; transform: scale(.2) rotate(-14deg); }
  15% { opacity: 1; transform: scale(1.12) rotate(4deg); }
  30% { transform: scale(1) rotate(-3deg); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.05) rotate(-3deg); }
}
@media (prefers-reduced-motion: reduce) {
  .rink__puck { transition: none; }
  .rink__burst.is-on { animation: none; opacity: 1; }
}
.rink__onice { margin: 6px 0 0; font-size: .8rem; color: var(--text-muted); overflow-wrap: anywhere; }
.rink-cmp__scroll { max-width: 100%; overflow-x: auto; }
.rink-cmp { width: 100%; border-collapse: separate; border-spacing: 0 4px; font-size: .875rem; }
.rink-cmp th { padding: 0 4px; font-weight: 650; color: var(--text-muted); text-align: center; }
.rink-cmp abbr { text-decoration: none; }
.rink-cmp td { padding: 4px; background: var(--surface-2); text-align: center; }
.rink-cmp td.is-on { background: var(--surface-hover); box-shadow: inset 0 2px 0 var(--lamp-ok), inset 0 -2px 0 var(--lamp-ok); }
.rink-cmp th.rink-cmp__mid { padding: 4px 8px; white-space: nowrap; color: var(--text); background: var(--surface); }
.rink-energy { position: relative; min-width: 40px; height: 10px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--led-bg); overflow: hidden; }
.rink-energy__bar { display: block; height: 100%; background: var(--lamp-ok); }
.rink-energy.is-low .rink-energy__bar { background: var(--led); }
/* the ceiling: the track from the ceiling to 100 is hatched (a tired player stays tired) */
.rink-energy__cap { position: absolute; top: 0; right: 0; height: 100%; background: repeating-linear-gradient(135deg, var(--border-strong) 0 2px, transparent 2px 4px); opacity: .7; }
.rink-cmp__legend { margin: 6px 0 0; font-size: .8rem; }
/* tr6 J: during a power play the special units on top, under their title */
.rink-cmp__special th.rink-cmp__special-title { padding: 6px 8px; text-align: left; white-space: normal; color: var(--text); background: var(--surface-hover); border-left: 3px solid var(--lamp-ok); }
.rink-cmp__kinds th { padding-top: 2px; }
.rink-cmp__special tr:last-child td, .rink-cmp__special tr:last-child th { border-bottom: 2px solid var(--border-strong); }
/* the box score (live/boxscore.js) at the end of a live matchday: the own
   game open under the results board, the others behind the "Spielbericht"
   button of their row; the tables scroll sideways inside the panel on a
   phone. */
.live-result__report-btn { grid-column: 1 / -1; justify-self: center; font-family: var(--font); font-size: .875rem; }
.live-results__reports { display: grid; gap: var(--gap); margin-top: var(--gap); }
.box-score { min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.box-score__title { margin: 0; font-size: 1.1rem; }
.box-score__match { margin: 2px 0 8px; font-weight: 650; color: var(--text); }
.box-score__scroll { max-width: 100%; overflow-x: auto; margin-bottom: 10px; }
.box-score__table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.box-score__caption { caption-side: top; padding: 4px 0; text-align: left; font-weight: 650; color: var(--text); }
.box-score__table th, .box-score__table td { padding: 4px 6px; border-bottom: 1px solid var(--border); text-align: left; }
.box-score__table thead th { font-weight: 650; color: var(--text-muted); white-space: nowrap; }
.box-score__table td.num { text-align: right; }
.box-score__table tbody th { font-weight: 400; color: var(--text); white-space: nowrap; }
.box-score__table abbr { text-decoration: none; }
.box-score__total th, .box-score__total td { font-weight: 700; }
.box-score__note, .box-score__legend { margin: 0 0 10px; font-size: .8rem; }
/* the pre-game comparison (pregame.js): per row a label and the two sides
   (home, away) next to each other; on a phone the label on top and the two
   sides stacked under it. */
.pregame__match { margin: 0; font-weight: 650; color: var(--text); overflow-wrap: anywhere; }
.pregame-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 9rem) minmax(0, 1fr); grid-template-areas: "home label away"; align-items: start; gap: 4px var(--gap); padding: 6px 0; border-bottom: 1px solid var(--border); }
.pregame-row:last-child { border-bottom: 0; }
.pregame-row__label { grid-area: label; font-weight: 650; color: var(--text-muted); text-align: center; overflow-wrap: anywhere; }
.pregame-row__side { min-width: 0; overflow-wrap: anywhere; }
.pregame-row__side--home { grid-area: home; }
.pregame-row__side--away { grid-area: away; }
.pregame-row--value, .pregame-row--clubs { align-items: center; }
.pregame-club { font-weight: 650; }
.pregame-club.is-own { padding: 2px 6px; border-radius: var(--radius); background: var(--row-own); }
.pregame-note { margin: 4px 0 0; font-size: .875rem; }
.pregame-unit__names { margin: 0; padding: 0; list-style: none; }
.pregame-unit__facts { margin: 2px 0 0; font-size: .8rem; }
@media (max-width: 400px) {
  .pregame-row { grid-template-columns: minmax(0, 1fr); grid-template-areas: "label" "home" "away"; }
  .pregame-row__label { text-align: left; }
  .pregame-row--clubs .pregame-row__label { display: none; }
}

/* Live matchday pauses (tr3 C): banner, substitution and talk dialog */
.live-pause { display: grid; gap: 4px; padding: 10px 12px; border: 2px solid var(--led); border-radius: var(--radius); background: var(--surface-2); }
.live-pause__line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; margin: 0; overflow-wrap: anywhere; }
.live-pause__by { font-weight: 700; min-width: 0; }
.live-pause__secs { color: var(--led); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.live-pause__left { margin: 0; }
.dialog:has(.live-dialog) { width: min(760px, calc(100vw - 32px)); overflow-y: auto; }
.live-dialog { min-width: 0; }
.live-dialog__clock { margin: 0; color: var(--led); font-family: var(--font-mono); font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.live-dialog__phase { margin: 0; font-weight: 700; }
.live-dialog__queue { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.live-dialog__item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; min-height: var(--touch); border-bottom: 1px solid var(--border); }
.live-dialog__item:last-child { border-bottom: 0; }
.live-dialog__text { flex: 1 1 12em; min-width: 0; overflow-wrap: anywhere; }
.live-dialog__hint:empty { display: none; }
.live-dialog__forms { display: grid; gap: var(--gap); }
.live-dialog__talks { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); }
.live-dialog__talks .btn { min-height: var(--touch); }
/* dressing-room talk feedback (tr3-Q): the mark of the outcome */
.talk-mark { display: inline-block; padding: 2px 10px; border: 1px solid currentColor; border-radius: 999px; font-weight: 700; font-size: .85rem; }
.talk-mark--good { color: var(--ok-text); }
.talk-mark--flat { color: var(--warn-text); }
.talk-mark--bad { color: var(--danger-text); }
.live-talk-result { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: .9rem; }
.live-dialog__hothead { margin: 0; font-size: .9rem; color: var(--warn-text); }
/* intermission statistics (tr6-k): period and total, home:away */
.live-stats { display: grid; gap: 4px; min-width: 0; }
.live-stats__teams { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.live-stats__table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.live-stats__table th, .live-stats__table td { padding: 3px 6px; border-bottom: 1px solid var(--border); text-align: left; }
.live-stats__table .num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.live-stats__table th[scope="row"] { font-weight: 400; overflow-wrap: anywhere; }
.live-stats__energy, .live-stats__hint { margin: 0; font-size: .9rem; }
.live-stats__hint { color: var(--text-muted); }
@media (max-width: 599px) {
  .dialog:has(.live-dialog) { width: 100vw; max-width: 100vw; }
}
@media (min-width: 1024px) {
  .live-dialog__forms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* rename (tr3 P): long club and player names in the admin selects stay in the panel */
.rename-admin select, .rename input { min-width: 0; max-width: 100%; }
.rename__field .muted { margin: 4px 0 0; font-size: .85rem; }

/* ---- tr4-d phone check: shell ---- */
@media (max-width: 599px) {
  .topbar__brand { flex: none; min-width: var(--touch); justify-content: center; }
  .topbar__brand .icon { flex: none; }
}
.profilebar .btn--icon { flex: none; }
.roundbar[data-live-page] .roundbar__live { display: none; }
.tabs__list.has-more-end { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
.tabs__list.has-more-start { -webkit-mask-image: linear-gradient(to right, transparent, #000 28px); mask-image: linear-gradient(to right, transparent, #000 28px); }
.tabs__list.has-more-start.has-more-end { -webkit-mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent); }
@media (min-width: 600px) {
  .tabs__list.has-more-start, .tabs__list.has-more-end { -webkit-mask-image: none; mask-image: none; }
}
/* below 480 px the profile chips are avatars only; the name stays for screen readers (aria-label) */
@media (max-width: 479px) {
  .profile-chip, .profile-chip:not(.is-acting) { flex: none; justify-content: center; min-width: var(--touch); max-width: none; padding: 0; }
  .profile-chip__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---- tr4-d phone check: transfer ---- */
.market-card__main, .market-card .squad-card__main { min-width: 0; }
.market-card .squad-card__facts, .market-card .cluster { min-width: 0; overflow-wrap: anywhere; }
.market-card .badge { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 599px) {
  /* position and text on the first row, strength range and Bieten below */
  .market-card { grid-template-columns: 4em minmax(0, 1fr); align-items: start; }
  .market-card__side { grid-column: 1 / -1; grid-auto-flow: column; justify-content: space-between; align-items: center; justify-items: start; }
  /* the listing rows: the name gets the whole row, the buttons wrap below it */
  .transfer-row .list__main { flex: 1 1 100%; }
  .transfer-row__actions { margin-left: 0; }
}
.market__open { min-height: var(--touch); min-width: var(--touch); }

/* ---- tr4-d phone check: tables ---- */
/* the paper wraps text anywhere; in a table that breaks club and player names
   in the middle of a word: wrap between words only, the wrapper scrolls */
.paper__page .box-score__table, .paper__page .data-table { overflow-wrap: normal; word-break: normal; hyphens: auto; }
.paper__page .table-wrap, .paper__tables .paper__scroll { max-width: 100%; }
@media (max-width: 599px) {
  /* club links of every league table, and the archive / report links of the paper: tap size */
  .data-table .table-link { display: inline-flex; align-items: center; gap: 6px; min-height: var(--touch); }
  .paper__entry .table-link, .paper__report-link { display: inline-block; padding-block: 10px; }
  /* standings: tighter cells so Pl., Verein, Sp., Pkt. and the toggle fit 360 px */
  .data-table th, .data-table td { padding-inline: 6px; }
  .data-table .col-toggle { width: var(--touch); padding: 0; }
  .data-table td .crest, .data-table td .table-link > :first-child:not(:last-child) { flex: none; }
  /* box score: smaller type, names wrap between words, event tables get a readable team column */
  .box-score { padding-inline: 8px; }
  .box-score__table { font-size: .8rem; }
  .box-score__table th, .box-score__table td { padding: 4px 3px; }
  .box-score__table tbody th { white-space: normal; }
  .box-score__players tbody th, .box-score__goalies tbody th { min-width: 5.5em; }
}
/* a folded table has no boxes at all (it kept its layout rects under the summary) */
.paper__fold:not([open]) > :not(summary) { display: none; }

/* ---- tr4-d phone check: shell, top bar at 360 with the ready button ---- */
@media (max-width: 399px) {
  .topbar { gap: 4px; }
  .topbar__round { gap: 4px; }
  .topbar__round .btn { padding-left: 10px; padding-right: 10px; }
  .topbar__home { padding-left: 8px; padding-right: 8px; }
  .profilebar { gap: 2px; }
  .topbar__slot { flex: 0 1 auto; min-width: 0; }
}

/* ---- tr4-d phone check: manager ---- */
@media (max-width: 599px) {
  /* private page: price lines are prose, they wrap inside the card and read left-aligned */
  .private p.num, .shop-item__facts { white-space: normal; text-align: left; overflow-wrap: anywhere; }
  .shop-item__facts { display: block; }
  /* club page: "Alle anzeigen" is a full tap target */
  .btn.team-info__more { min-height: var(--touch); }
  /* shareholders: name and preference on their own line, bar + value + mood below */
  .board__holder > .list__main { flex: 1 1 100%; }
  .board__holder .board__trust { flex: 1 1 140px; min-width: 0; }
  .board__holder .badge { white-space: normal; }
}

/* ---- tr4-d phone check: home and lineup ---- */
@media (max-width: 599px) {
  /* scoreboard: club shorts are a 40 px wide tap area, centred so the text does not jump */
  .led-board__link { min-width: 40px; text-align: center; }
  /* lineup slot cards: position and rating wrap inside the card instead of running off its edge;
     the two icon buttons stay 44 px each and fit side by side in a 3-slot row */
  .slots--row .slot__meta { white-space: normal; overflow-wrap: anywhere; }
  .slots--row .slot__row > .slot__tap + * { margin-left: 0; }
  .slots--row .slot__row { justify-content: flex-end; gap: 0; }
}

/* the lineup tabs carry sr-only spans (absolute); without a positioned tab they escape the scrolling tab row
   and stretch the document to the right edge of the last tab (width-neutral fix) */
.lineup .tabs__tab { position: relative; }

/* ---- tr4-d phone check: live ---- */
@media (max-width: 599px) {
  /* pause dialogs (substitution, talk) are the same full-width bottom sheet as every other dialog */
  /* rink: the SVG bench and penalty-box text is ~8 px at 360 and cannot wrap, so the two strips are cropped
     and the same facts stand under the ice as wrapping HTML text (12 px) */
  .rink { margin: calc(-1 * var(--rink-top, 0%)) 0 calc(-1 * var(--rink-bottom, 0%)); pointer-events: none; }
  .rink__bench, .rink__box { display: none; }
  .rink-panel { overflow: hidden; }
  .rink-facts {
    position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; white-space: normal;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto auto; grid-auto-flow: column; gap: 6px; padding-top: 8px;
    font-size: .75rem; line-height: 1.35; overflow-wrap: anywhere;
  }
  .rink-facts p { margin: 0; padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
  /* line comparison: the header "Energie" fits its column */
  .rink-cmp th { padding: 0 2px; font-size: .75rem; }
  .rink-cmp td { padding: 4px 2px; }
  .rink-cmp th.rink-cmp__mid { padding: 4px 6px; }
  .rink-energy { min-width: 28px; }
}

/* tr5 A4 busy overlay: while a request runs longer than 300 ms (ui/busy.js
   BUSY_DELAY_MS) a centred card with a comic spinner and "Bitte warten …"
   stands over the whole page, above the top bar and the round bar. Hidden
   ([hidden], base.css) it takes no clicks; shown, its backdrop catches them.
   The spinner is a puck seen from above: ink outline, comic-yellow rim with
   a cyan quarter, turning in hard comic steps. */
.busy-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
  background: var(--scrim);
  background: color-mix(in srgb, var(--ink) 55%, transparent);
  cursor: progress;
}
.busy-overlay__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap);
  max-width: 100%;
  box-sizing: border-box;
  padding: 20px 28px;
  border: var(--line) solid var(--ink);
  border-radius: var(--radius);
  background: var(--surface-2);
  box-shadow: var(--shadow);
  color: var(--text);
  text-align: center;
}
.busy-overlay__spinner {
  display: block;
  box-sizing: border-box;
  width: 56px;
  height: 56px;
  border: 9px solid var(--comic-yellow);
  border-top-color: var(--comic-cyan);
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 var(--line) var(--ink), var(--shadow-sm);
  animation: busy-overlay-spin .8s steps(8) infinite;
}
.busy-overlay__text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: .04em;
  overflow-wrap: anywhere;
}
@keyframes busy-overlay-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  /* no turning: the puck stands still, the text says what happens */
  .busy-overlay__spinner { animation: none; }
}

/* tr5-d: the player profile's tab bar scrolls inside the dialog, tabs keep their size */
.player .tabs__tab { flex: none; min-height: 44px; }

/* live action bar (play-test round 6, C): pause, goalie and tactics stay in
   reach. Phone: fixed above the round bar with safe-area padding; desktop:
   sticky under the top bar and the round bar. */
.live__stage { display: block; }
.live-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--roundbar-h, 0px);
  z-index: 9;
  display: flex;
  gap: 8px;
  padding: 6px var(--gutter) calc(6px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.live-bar .btn { flex: 1 1 0; min-width: 0; justify-content: center; white-space: nowrap; }
.live-bar .live-bar__short { display: none; }
/* phone: short labels, one line at 360 px; the padding matches one bar row */
@media (max-width: 599px) {
  .live-bar { gap: 4px; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .live-bar .btn { padding-left: 4px; padding-right: 4px; gap: 4px; overflow: hidden; }
  .live-bar .live-bar__long { display: none; }
  .live-bar .live-bar__short { display: inline; overflow: hidden; text-overflow: ellipsis; }
}
.live__stage { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom)); }
@media (min-width: 1024px) {
  .live__stage { padding-bottom: 0; }
  .live-bar {
    position: sticky;
    top: calc(56px + var(--roundbar-h, 0px));
    bottom: auto;
    z-index: 8;
    margin-bottom: var(--gap);
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
  }
  .live-bar .btn { flex: 0 1 auto; }
}
/* ---- tr6-m goalie load: "n. Spiel in Folge" and the tired mark (lineup slot and bench, pre-game) ---- */
.goalie-load { white-space: nowrap; }
.goalie-load.is-tired .goalie-load__tired { color: var(--warn-text); font-weight: 600; }
.bench__player .goalie-load { font-size: .8125rem; color: var(--text-muted); }
.pregame__goalie-warn { color: var(--warn-text); font-weight: 600; }

/* tr6-i: the switch "Hauptrunde / Playoffs" of the statistics and team
   statistics pages (ui/tabs.js inside the league picker); two short tabs,
   they fit the phone width without scrolling */
.playoffstats .tabs__panel { padding-top: var(--gap); }
.playoffstats__empty { margin: 0; }
