:root {
  --lime: #b8d934;
  --lime-dark: #95b520;
  --lime-soft: #f1f7d8;
  --blue: #2f6fd1;
  --blue-dark: #1f4f9c;
  --blue-soft: #eaf1fb;
  --ink: #1a1f2c;
  --ink-soft: #4b5468;
  --ink-mute: #8189a0;
  --bg: #f7f8fa;
  --card: #ffffff;
  --border: #e6e8ee;
  --border-soft: #f0f1f5;
  --danger: #d24545;
  --warn: #d99720;
  --good: #2fa367;
  --tie: #f59e0b;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(20,25,45,.04), 0 4px 14px rgba(20,25,45,.04);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ======= HEADER ======= */
.site-header {
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.site-header.scrolled {
  background: rgba(255,255,255,.92);
  border-bottom-color: var(--border);
  box-shadow: 0 6px 24px rgba(20,25,45,.08);
}
.header-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  transition: padding .25s cubic-bezier(.4,0,.2,1);
}
.site-header.scrolled .header-inner { padding: 8px 24px; }

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
}
.brand:hover,
.brand:hover .brand-name,
.brand:hover .brand-sub {
  text-decoration: none;
  color: inherit;
}
.brand:hover .brand-name { color: var(--lime-dark); }
.brand:hover .brand-logo {
  transform: translateY(-1px) rotate(-3deg);
  box-shadow: 0 6px 18px rgba(149,181,32,.55), inset 0 1px 0 rgba(255,255,255,.5);
}
.brand:hover .brand-logo svg {
  transform: rotate(15deg);
}
.brand-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--lime) 0%, var(--lime-dark) 100%);
  display: grid;
  place-items: center;
  color: #1a2200;
  box-shadow: 0 4px 14px rgba(149,181,32,.45), inset 0 1px 0 rgba(255,255,255,.4);
  transition: width .25s cubic-bezier(.4,0,.2,1),
              height .25s cubic-bezier(.4,0,.2,1),
              border-radius .25s cubic-bezier(.4,0,.2,1),
              box-shadow .2s ease,
              transform .2s ease;
}
.brand-logo svg {
  width: 42px;
  height: 42px;
  display: block;
  transition: width .25s cubic-bezier(.4,0,.2,1),
              height .25s cubic-bezier(.4,0,.2,1),
              transform .3s cubic-bezier(.4,0,.2,1);
}
.site-header.scrolled .brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(149,181,32,.35), inset 0 1px 0 rgba(255,255,255,.4);
}
.site-header.scrolled .brand-logo svg {
  width: 24px;
  height: 24px;
}

.brand-text { line-height: 1.1; overflow: hidden; }
.brand-name {
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -.8px;
  transition: font-size .25s cubic-bezier(.4,0,.2,1),
              letter-spacing .25s ease,
              color .2s ease;
}
.brand-sub {
  font-size: 13px;
  color: var(--ink-mute);
  margin-top: 4px;
  max-height: 20px;
  opacity: 1;
  transition: max-height .25s cubic-bezier(.4,0,.2,1),
              opacity .2s ease,
              margin-top .25s ease,
              font-size .25s ease;
}
.site-header.scrolled .brand-name {
  font-size: 16px;
  letter-spacing: -.3px;
}
.site-header.scrolled .brand-sub {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  font-size: 0;
}

.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
  align-items: center;
}
.nav a {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 14px;
  position: relative;
}
.nav a:hover { background: var(--border-soft); text-decoration: none; color: var(--ink); }
.nav a.active { background: var(--lime); color: #1a2200; }
.nav .map-link {
  margin-left: 8px;
  padding: 8px;
  border-radius: 8px;
  color: var(--ink-mute);
  display: grid;
  place-items: center;
}
.nav .map-link:hover { background: var(--border-soft); }

.mobile-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  margin: 3px 0;
  border-radius: 2px;
}

/* ======= LAYOUT ======= */
.page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 260px 1fr 280px;
  gap: 20px;
  align-items: start;
}
.col-left, .col-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 88px;
}
.col-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* ======= CARD ======= */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border-soft);
}
.card-header h2,
.card-header h3,
.sequence-card-header .sequence-static-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .2px;
  text-transform: uppercase;
}
.card-header h3 { font-size: 13px; }
.card-body { padding: 18px; }
.card-body.compact { padding: 14px 18px; }

.card-link {
  font-size: 12px;
  color: var(--blue);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

/* ======= HERO: NAJBLIZSI ZAPAS ======= */
.hero {
  background:
    radial-gradient(circle at 100% 0%, rgba(184,217,52,.18) 0%, transparent 45%),
    linear-gradient(180deg, #f6faea 0%, #fbfdf2 60%, #fcfdf6 100%);
  border-color: #dfe6c2;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--lime) 0%, var(--lime-dark) 100%);
}
.hero .card-body { padding: 22px; }

.hero-headblock {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "label  .       countdown"
    "meta   status  countdown";
  align-items: center;
  column-gap: 16px;
  row-gap: 6px;
}
.hero-left { display: contents; }
.hero-label     { grid-area: label; }
.hero-meta      { grid-area: meta; }
.hero-status    { grid-area: status; justify-self: center; }
.hero-countdown { grid-area: countdown; }
.hero-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--lime-dark);
  font-weight: 700;
}
.hero-countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--lime) 0%, var(--lime-dark) 100%);
  padding: 10px 18px;
  border-radius: 12px;
  color: #1a2200;
  min-width: 84px;
  text-align: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(149,181,32,.35), inset 0 1px 0 rgba(255,255,255,.4);
}
.hero-countdown .num {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  color: #1a2200;
}
.hero-countdown .lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #1a2200;
  opacity: .8;
  font-weight: 700;
  margin-top: 3px;
}
.hero-countdown.is-today {
  background: linear-gradient(135deg, #ff9f9f 0%, #e04848 100%);
  color: #fff7f7;
  box-shadow: 0 2px 6px rgba(176,38,38,.28), inset 0 1px 0 rgba(255,255,255,.22);
}
.hero-countdown.is-today .num,
.hero-countdown.is-today .lbl {
  color: #fff7f7;
}
.hero-countdown.is-today .num {
  font-size: 24px;
  letter-spacing: .6px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
}
.hero-date {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.5px;
  color: var(--ink);
  line-height: 1.1;
}
.hero-time {
  color: var(--ink-soft);
  font-size: 15px;
}
.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  color: var(--ink);
  padding: 5px 12px 5px 9px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .1px;
  position: relative;
  top: -3px;
  box-shadow: 0 1px 3px rgba(20,25,45,.10), 0 5px 14px rgba(20,25,45,.09);
}
.hero-status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(184,217,52,.28);
}

.roster {
  margin-top: 18px;
  display: grid;
  gap: 8px;
  /* Column ladder — divisors of 12 only. Avatar size never shrinks.
     12  | ≥ 920px (single-col page, no sidebars)
      6  | ≥ 480px (default; also ≥1100 desktop with sidebars)
      4  | 380–479px
      3  | 300–379px
      2  | < 300px */
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 300px)  { .roster { grid-template-columns: repeat(3,  1fr); } }
@media (min-width: 380px)  { .roster { grid-template-columns: repeat(4,  1fr); } }
@media (min-width: 480px)  { .roster { grid-template-columns: repeat(6,  1fr); } }
@media (min-width: 920px)  { .roster { grid-template-columns: repeat(12, 1fr); } }
@media (min-width: 1100px) { .roster { grid-template-columns: repeat(6,  1fr); } }
.player-chip {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 10px 8px 8px;
  text-align: center;
  transition: border-color .15s, transform .15s;
  box-shadow: 0 1px 2px rgba(20,25,45,.03);
}
.player-chip:hover {
  border-color: var(--lime-dark);
  transform: translateY(-1px);
}
.player-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  margin: 0 auto 6px;
  background: #e6e8ee;
  color: var(--ink-soft);
  display: block;
  object-fit: cover;
  border: 2px solid var(--card);
  box-shadow: 0 0 0 1px var(--border);
}
.player-nick {
  font-size: 12px;
  color: var(--ink);
  font-weight: 600;
}

.subs {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  font-size: 13px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.subs .lbl {
  color: var(--ink-mute);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-right: 6px;
}
.subs .nicks {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.subs .nicks span {
  background: var(--border-soft);
  color: var(--ink);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.logistics {
  margin-top: 16px;
  display: grid;
  /* Only two layouts: 3 in a row (default), or 1 per row (narrow). No 2+1. */
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 600px) {
  .logistics { grid-template-columns: repeat(3, 1fr); }
}
.logistics .item {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.logistics .item .icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--lime-soft);
  color: var(--lime-dark);
  display: grid;
  place-items: center;
  border: 1px solid #e0eaa8;
}
.logistics .item .icon svg {
  width: 20px;
  height: 20px;
}
.logistics .item .text { min-width: 0; }
.logistics .item .k {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--ink-mute);
  margin-bottom: 2px;
  font-weight: 600;
}
.logistics .item .v {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}

.recent-activity {
  margin-top: 14px;
  border-top: 1px solid var(--border-soft);
  padding-top: 12px;
}
.recent-activity .ra-title {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--ink-mute);
  letter-spacing: 1px;
  margin-bottom: 8px;
  font-weight: 600;
}
.ra-row {
  display: grid;
  grid-template-columns: 110px 80px minmax(0, 1fr);
  align-items: baseline;
  padding: 6px 0;
  font-size: 13px;
  color: var(--ink-soft);
  column-gap: 8px;
}
.ra-row .time {
  color: var(--ink-mute);
  font-size: 12px;
  white-space: nowrap;
}
.ra-row .who {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.ra-row .action {
  white-space: normal;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.ra-row .action-target {
  color: var(--ink-soft);
}

.ra-more {
  margin-top: 8px;
}

.ra-more[open] {
  margin-top: 0;
}

.ra-more summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  color: inherit;
  line-height: inherit;
  appearance: none;
}

.ra-more summary:hover {
  color: inherit;
}

.ra-more-label {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  line-height: 1.4;
}

.ra-more summary::marker {
  content: "";
  font-size: 0;
}

.ra-more summary::-webkit-details-marker {
  display: none;
}

.ra-more-arrow {
  color: var(--ink-mute);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  flex: 0 0 auto;
  display: inline-block;
}

.ra-more[open] > summary {
  display: none !important;
}

.ra-more .ra-row:first-of-type {
  margin-top: 0;
}

/* Termíny zápasov pod hero */
.schedule-strip {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
}
.schedule-strip .lbl {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink-mute);
  font-weight: 700;
}
.schedule-strip .dates { display: flex; gap: 8px; flex-wrap: wrap; }
.date-pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--lime-soft);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #e0eaa8;
}
.date-pill.next {
  background: var(--lime);
  border-color: var(--lime-dark);
  color: #1a2200;
}

/* ======= TWO-COL: LOSOVANIE + ROZHODOVANIE ======= */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.two-col > .lineup-card { order: 1; }
.two-col > .zreb-card { order: 2; }
.two-col > .rozhodca-card { order: 3; }
.two-col > .full-span {
  grid-column: 1 / -1;
}
.count-list { padding: 4px 0; }
.count-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: start;
  padding: 10px 18px;
  gap: 10px;
  border-top: 1px solid var(--border-soft);
}
.count-row:first-child { border-top: none; }
.count-badge {
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-weight: 700;
  border-radius: 8px;
  padding: 4px 0;
  text-align: center;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.count-row.top .count-badge {
  background: var(--lime);
  color: #1a2200;
}
.count-badge.is-today {
  background: linear-gradient(135deg, #ff9f9f 0%, #e04848 100%);
  color: #fff7f7;
  box-shadow: 0 2px 6px rgba(176,38,38,.16);
}
.name-list,
.disc-text {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.4;
}
.name-list .n {
  display: inline-block;
  padding: 2px 7px;
  margin: 2px 3px 2px 0;
  background: var(--border-soft);
  color: var(--ink);
  border-radius: 6px;
  font-weight: 500;
  font-size: 12px;
}
.name-list .n.captain {
  background: linear-gradient(135deg, rgba(184,217,52,.95) 0%, rgba(152,189,30,.95) 100%);
  color: #1a2200;
  box-shadow: inset 0 0 0 1px rgba(111,139,18,.24), 0 4px 12px rgba(149,181,32,.20);
}
.lineup-grid {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: start;
  column-gap: 10px;
  row-gap: 14px;
  padding-top: 2px;
}
.lineup-grid .section-label {
  white-space: nowrap;
  margin-bottom: 0;
}
.lineup-grid .name-list {
  min-width: 0;
}
.lineup-grid .name-list .n {
  margin-top: 0;
}
.lineup-grid > .section-label:nth-child(3),
.lineup-grid > .name-list:nth-child(4) {
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}

/* ======= TABULKY ======= */
.tabs {
  display: inline-flex;
  background: var(--border-soft);
  padding: 4px;
  border-radius: 10px;
  gap: 2px;
}
.tab-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}
.tab-btn.active {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
/* Responsive label swap — desktop shows .hd-long/.tab-long, mobile shows .hd-short/.tab-short. */
.hd-short, .tab-btn .tab-short { display: none; }
@media (max-width: 768px) {
  .hd-long,  .tab-btn .tab-long  { display: none; }
  .hd-short, .tab-btn .tab-short { display: inline; }
}
.tab-content { display: none; }
.tab-content.active { display: block; }

.ranks-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-soft);
}
.ranks-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.rank-col {
  background: var(--card);
  padding: 14px 16px;
}
.rank-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--lime-dark);
  letter-spacing: .8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
}
.rank-list { list-style: none; padding: 0; margin: 0; }
.rank-list li {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: baseline;
  gap: 8px;
  padding: 5px 0;
  font-size: 13px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  position: relative;
}
.rank-list .rnk,
.scorer-rank {
  color: var(--ink-mute);
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}
.rank-list .nick {
  color: var(--ink);
  font-weight: 500;
}
.rank-list .val {
  color: var(--ink);
  font-weight: 600;
  font-size: 13px;
}
.rank-list .sub {
  position: absolute;
  left: 26px;
  bottom: calc(100% - 2px);
  background: var(--ink);
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease;
  z-index: 20;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.rank-list .sub::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 12px;
  border: 4px solid transparent;
  border-top-color: var(--ink);
}
.rank-list li:hover .sub {
  opacity: 1;
  transform: translateY(0);
}
.rank-list li:hover {
  background: var(--border-soft);
  margin: 0 -8px;
  padding-left: 8px;
  padding-right: 8px;
  border-radius: 6px;
}
/* Top 3 — descending lime tint pills */
.rank-list li:nth-child(-n+3) {
  margin: 3px -8px;
  padding: 7px 8px;
  border-radius: 8px;
}
/* Top-3 lime tints — shared across .rank-list, .seq-row, .scorer-row. */
.rank-list li:nth-child(1), .seq-row.top1, .scorer-row.top-1 { background: rgba(184,217,52,.38); }
.rank-list li:nth-child(2), .seq-row.top2, .scorer-row.top-2 { background: rgba(184,217,52,.22); }
.rank-list li:nth-child(3), .seq-row.top3, .scorer-row.top-3 { background: rgba(184,217,52,.11); }

.rank-list li:nth-child(-n+3) .rnk {
  color: var(--ink);
  font-weight: 800;
  font-size: 13px;
}
.rank-list li:nth-child(-n+3) .nick { font-weight: 700; }
.rank-list li:nth-child(-n+3) .val { font-weight: 700; }

.rank-list li:nth-child(1):hover { background: rgba(184,217,52,.50); }
.rank-list li:nth-child(2):hover { background: rgba(184,217,52,.32); }
.rank-list li:nth-child(3):hover { background: rgba(184,217,52,.20); }

/* ======= HISTORIA PRIHLASOVANIA ======= */
.history-table,
.attend-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
/* Shared th cosmetics — padding overridden per table. */
.history-table th,
.attend-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--ink-mute);
  font-weight: 600;
  background: var(--border-soft);
  border-bottom: 1px solid var(--border);
}
.history-table th { padding: 10px 18px; }
.history-table td {
  padding: 10px 18px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--ink-soft);
}
.history-table tr:last-child td { border-bottom: none; }
.history-table .player { color: var(--ink); font-weight: 600; }
.history-table td:first-child {
  color: var(--ink-mute);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  width: 1%;
}
.history-table td:last-child {
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
  width: 1%;
}
.stats-history-table td {
  vertical-align: top;
}
.stats-history-table tbody tr:first-child td {
  padding-top: 0;
}
.stats-history-table td:last-child {
  white-space: normal;
  width: auto;
}
.history-table .prep {
  color: var(--ink-mute);
  font-weight: 400;
  margin-right: 2px;
}
.action-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
}
.action-tag::before,
.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.action-tag.in { background: #e6f5ec; color: var(--good); }
.action-tag.in::before { background: var(--good); }
.action-tag.out { background: #fbe7e3; color: var(--danger); }
.action-tag.out::before { background: var(--danger); }
.action-tag.auto { background: var(--blue-soft); color: var(--blue-dark); }
.action-tag.auto::before { background: var(--blue); }
.action-tag.queue { background: #fbf2dd; color: #8a6512; }
.action-tag.queue::before { background: var(--warn); }

/* ======= CIERNA LISTINA ======= */
.blacklist-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}
.blacklist-row .penalty {
  background: #fbe7e3;
  color: var(--danger);
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.blacklist-row .who { font-weight: 600; }
/* Shared small-uppercase-label — see also .award-cat. */
.section-label,
.award-cat {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--ink-mute);
  font-weight: 700;
}
.section-label { margin-bottom: 8px; }
.award-cat { padding-top: 4px; }

/* ======= SIDEBARS ======= */
.preview-comments .game-result {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.game-date { color: var(--ink-mute); font-size: 12px; }
.game-block { padding: 14px 0; border-bottom: 1px solid var(--border-soft); }
.game-block:last-child { border-bottom: none; padding-bottom: 0; }
.game-block:first-child { padding-top: 0; }
.pending {
  font-style: italic;
  color: var(--ink-mute);
  font-size: 13px;
  margin: 4px 0 8px;
}
.writers {
  font-size: 12px;
  color: var(--ink-soft);
  margin: 4px 0 0;
}
.writers .lbl {
  text-transform: uppercase;
  letter-spacing: .5px;
  font-size: 10px;
  color: var(--ink-mute);
  display: block;
  margin-bottom: 4px;
}
.writers .nicks { display: flex; flex-wrap: wrap; gap: 4px; }
.writers .nicks span {
  background: var(--border-soft);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
}
.penalty-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--danger);
  font-weight: 600;
}

.discussion-list { list-style: none; padding: 0; margin: 0; }
.discussion-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}
.discussion-list li:last-child { border-bottom: none; padding-bottom: 0; }
.discussion-list li:first-child { padding-top: 0; }
.disc-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}
.disc-head .author,
.diskusia-author { font-weight: 600; font-size: 13px; color: var(--ink); }
.disc-head .when { color: var(--ink-mute); font-size: 11px; }
/* .disc-text shares rule with .name-list above. */

/* Right sidebar */
.login-form label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--ink-mute);
  font-weight: 600;
  margin-bottom: 4px;
}
.login-form input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 12px;
  background: var(--bg);
  color: var(--ink);
}
.login-form input:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--card);
  box-shadow: 0 0 0 3px var(--blue-soft);
}
.btn-primary {
  width: 100%;
  background: var(--lime);
  color: #1a2200;
  border: none;
  padding: 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}
.btn-primary:hover { background: var(--lime-dark); color: #0a0f00; }
.login-form .forgot {
  display: block;
  text-align: center;
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-mute);
}

.login-user {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
}

.login-user-avatar-wrap {
  flex: 0 0 56px;
  width: 56px;
}

.login-user-avatar {
  width: 56px;
  height: 56px;
  margin: 0;
}

.login-user-avatar-fallback {
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  background: linear-gradient(135deg, var(--lime-soft), #f3f5dd);
}

.login-user-copy {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.login-user-name {
  font-size: 18px;
  line-height: 1.1;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 8px;
}

.login-user-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.login-user-logout {
  width: auto;
  padding-inline: 14px;
  text-decoration: none;
}

.subscription .price {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.subscription .price strong { color: var(--ink); font-weight: 700; }
.debt-list { list-style: none; margin: 0; padding: 0; }
.debt-list li {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 13px;
  color: var(--ink-soft);
  border-top: 1px solid var(--border-soft);
}
.debt-list li:first-child { border-top: none; }
.debt-list .who { color: var(--ink); font-weight: 500; }
.debt-list .amount {
  color: var(--danger);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.rules-link { font-size: 13px; }
.rules-link a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 0;
}

/* Mobile compact login */
.mobile-login { display: none; }

/* ======= HRACI: GALLERY ======= */
.card-header-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-mute);
  text-transform: none;
  letter-spacing: 0;
  margin-left: 4px;
  white-space: nowrap;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
}
.gallery-item {
  text-align: center;
}
.gallery-photo {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  object-fit: cover;
  background: var(--border-soft);
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(20,25,45,.05);
  margin-bottom: 6px;
}
.gallery-nick,
.seq-nick {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.gallery-divider {
  margin: 22px 0 16px;
  border-top: 1px dashed var(--border);
  position: relative;
  height: 0;
  text-align: center;
}
.gallery-divider-label {
  background: var(--card);
  padding: 0 12px;
  position: relative;
  top: -10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink-mute);
  font-weight: 700;
}
/* .gallery-subs uses same grid as .gallery — item size stays consistent via auto-fill */

/* ======= HRACI: PORADIE — SEQUENCE LIST ======= */
.sequence-legend-wrap {
  padding-top: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-soft);
}
.seq-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  font-size: 12px;
  color: var(--ink-soft);
}
.seq-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  vertical-align: middle;
}
.icon.v   { background: var(--good); }
.icon.r   { background: var(--tie); }
.icon.p   { background: var(--danger); }
.icon.n   { background: var(--border); border: 1px solid var(--border); }
.icon.blb { background: #7a1a1a; }

/* Sequence card header — toggle (mobile) vs static title (desktop) */
.sequence-toggle { display: none; }
.sequence-card-header { padding: 0 !important; }
.sequence-card-header .sequence-static-title { padding: 14px 18px; }

/* Desktop season-header — Jeseň · Jar labels above the icon columns */
.seq-season-header {
  display: grid;
  grid-template-columns: 28px 80px 1fr 1fr auto;
  column-gap: 10px;
  padding: 12px 18px 4px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink-mute);
  font-weight: 700;
  border-bottom: 1px solid var(--border-soft);
}
.seq-season-header .lab-jesen { grid-column: 3; }
.seq-season-header .lab-jar { grid-column: 4; padding-left: 10px; }
.seq-season-header .seq-koef-spacer {
  grid-column: 5;
  text-align: right;
  min-width: 38px;
}

.sequence-list { padding: 4px 0; }
.seq-row {
  display: grid;
  grid-template-columns: 28px 80px 1fr 1fr auto;
  column-gap: 10px;
  align-items: center;
  padding: 8px 18px;
  border-top: 1px solid var(--border-soft);
}
.seq-row:first-child { border-top: none; }
.sequence-list .qual-divider + .seq-row { border-top: none; }
.seq-rank {
  text-align: right;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}
/* .seq-row.top1/2/3 backgrounds merged with .rank-list above. */
.seq-row.top1 .seq-rank, .seq-row.top2 .seq-rank, .seq-row.top3 .seq-rank { color: var(--ink); font-weight: 800; }
.seq-row.top1 .seq-nick, .seq-row.top2 .seq-nick, .seq-row.top3 .seq-nick { font-weight: 700; }
.seq-row.top1 .seq-koef, .seq-row.top2 .seq-koef, .seq-row.top3 .seq-koef { font-weight: 800; }
.seq-row.is-unqual { opacity: .72; }

/* .seq-nick base styles share rule with .gallery-nick above. */
.seq-half {
  min-width: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.seq-half-jar { padding-left: 10px; }  /* visual gap between jeseň and jar */
.seq-half-label { display: none; }
.seq-half .seq-icons {
  display: flex;
  gap: 1px;
  align-items: center;
  min-width: 0;
}
.seq-half .seq-icons .icon {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  border-radius: 2px;
}

/* Compact form (last 5 played) — hidden on desktop */
.seq-form { display: none; }
.seq-form .icon { width: 14px; height: 14px; border-radius: 3px; }
.seq-form-empty { color: var(--ink-mute); font-size: 12px; }

/* Mobile-only column header (mode-poradie) — hidden on desktop */
.seq-poradie-labels { display: none; }

.seq-koef {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  min-width: 38px;
  text-align: right;
}

/* ======= HRACI: STATS PAIR (Kanonieri + Asistencie) ======= */
.stats-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.stats-card { display: block; }

.stats-pair-header {
  padding: 0 !important;
  display: flex;
}
.stats-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 14px 18px;
  margin: 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .2px;
  color: var(--ink-mute);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.stats-tab-btn.active {
  color: var(--ink);
}
.stats-tab-btn:hover:not(.active) {
  color: var(--ink-soft);
  background: var(--bg);
}

/* Side-by-side (≥600px): each card shows its OWN label regardless of JS toggle state.
   We hide the "other" button per card-type so kanonieri card always shows "Kanonieri",
   asistencie card always shows "Asistencie". */
@media (min-width: 600px) {
  .stats-kanonieri  .stats-tab-asistencie,
  .stats-asistencie .stats-tab-kanonieri {
    display: none;
  }
  .stats-pair-header .stats-tab-btn {
    flex: none;
    cursor: default;
    text-align: left;
    color: var(--ink);
  }
}

/* Narrow (< 600px): collapse to one card at a time with tab toggle. */
@media (max-width: 599px) {
  .stats-pair { grid-template-columns: 1fr; gap: 0; }
  .stats-card { display: none; }
  .stats-card.active { display: block; }
  .stats-pair-header { border-bottom: 1px solid var(--border-soft); }
  .stats-tab-btn { padding: 12px 16px; }
  .stats-tab-btn.active { border-bottom-color: var(--lime-dark); }
}

/* ======= HRACI: KANONIERI ======= */
.scorers {
  list-style: none;
  margin: 0;
  padding: 0;
}
.scorer-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: baseline;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 8px;
  font-variant-numeric: tabular-nums;
  break-inside: avoid;
  page-break-inside: avoid;
}
/* .scorer-rank base rule merged with .rank-list .rnk above. */
.scorer-nick {
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
}
.scorer-goals {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 600;
}
.scorer-goals-unit { color: var(--ink-mute); font-weight: 400; }
.scorer-row.top { background: rgba(184,217,52,.10); }
/* .scorer-row.top-1/2/3 backgrounds merged with .rank-list above. */
.scorer-row.top .scorer-rank { color: var(--ink); font-weight: 800; }
.scorer-row.top .scorer-nick { font-weight: 700; }
.scorer-row.top .scorer-goals { font-weight: 700; color: var(--ink); }

/* ======= HRACI: UCAST TABLE — base table rules shared with .history-table above. ======= */
.attend-table th { padding: 10px 14px; }
.attend-table th:nth-child(3) {
  width: 8ch;
  text-align: center;
}
.attend-table td:nth-child(3) {
  width: 8ch;
  text-align: center;
  white-space: nowrap;
}
.attend-table .attend-pct {
  display: inline-block;
  min-width: 6.5ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.attend-table th:nth-child(4),
.attend-table td:nth-child(4) {
  text-align: center;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.attend-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--ink-soft);
  vertical-align: middle;
}
.attend-table tr:last-child td { border-bottom: none; }
.attend-table .ta-num { text-align: right; font-variant-numeric: tabular-nums; }
.attend-table .ta-rank { color: var(--ink-mute); font-size: 12px; font-weight: 600; }
.attend-table .ta-player { color: var(--ink); font-weight: 600; }
.attend-table tr.qual-last td { border-bottom: none; }
.attend-table tr.attend-divider-row td { padding: 0; border-bottom: none; }
.attend-table tr.nonqual td { color: var(--ink-mute); }
.attend-table tr.nonqual .ta-player { color: var(--ink-soft); font-weight: 500; }

.pct-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}
.pct-bar {
  flex: 1;
  height: 6px;
  background: var(--border-soft);
  border-radius: 3px;
  overflow: hidden;
  min-width: 80px;
}
.pct-fill {
  height: 100%;
  background: linear-gradient(90deg, #fbbf24 0%, #d97706 100%);
  border-radius: 3px;
}
.pct-fill.qual {
  background: linear-gradient(90deg, var(--lime) 0%, var(--lime-dark) 100%);
}
.pct-val {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  min-width: 44px;
  text-align: right;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
/* .status-pill::before base shared with .action-tag::before above. */
.status-qual {
  background: var(--lime-soft);
  color: var(--lime-dark);
  border: 1px solid #e0eaa8;
}
.status-qual::before { background: var(--lime-dark); }
.status-nonqual {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}
.status-nonqual::before { background: #d97706; }

/* ======= HRACI: AWARDS ======= */
.awards {
  display: grid;
  grid-template-columns: 1fr;
}
.award-row {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
  padding: 12px 18px;
  border-top: 1px solid var(--border-soft);
  align-items: start;
}
.award-row:first-child { border-top: none; }
/* .award-cat cosmetics consolidated with .section-label above. */
.award-winners {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.award-winner {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.award-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}
.award-detail {
  font-size: 12px;
  color: var(--ink-soft);
}
.award-empty {
  font-size: 14px;
  color: var(--ink-mute);
  font-style: italic;
}

/* ======= FOOTER ======= */
.site-footer {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px;
  border-top: 1px solid var(--border);
  margin-top: 24px;
  color: var(--ink-mute);
  font-size: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  align-items: center;
  justify-content: center;
}
.site-footer a { color: var(--ink-soft); }
.site-footer .sep { color: var(--border); }

/* ======= RESPONSIVE ======= */
/* Below desktop (1100): collapse to single column; sidebars stack below main.
   Also collapse the nav to a hamburger and show inline header login (600+). */
@media (max-width: 1099px) {
  .page {
    grid-template-columns: 1fr;
    padding: 14px;
    gap: 14px;
  }
  .col-right, .col-left { position: static; }
  .col-right { order: 3; }
  .col-left { order: 2; display: flex; }

  .nav { display: none; }
  .mobile-toggle { display: block; }
  .nav.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 8px;
  }
  .nav.open a { padding: 12px 14px; border-radius: 8px; }
}

/* Shared focus state for both header-login and mobile-login inputs. */
.header-login input:focus,
.mobile-login input:focus {
  outline: none;
  border-color: var(--lime-dark);
  box-shadow: 0 0 0 3px rgba(149,181,32,.15);
}

/* Header login — visible only in the mid range where col-main is single column
   but the header has free horizontal space (between logo and hamburger). */
.header-login { display: none; }
@media (min-width: 600px) and (max-width: 1099px) {
  .header-login {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    margin-right: 12px;
  }
  .header-login input {
    width: 110px;
    min-width: 0;
    padding: 7px 9px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--card);
    font-size: 13px;
    color: var(--ink);
    font-family: inherit;
  }
  .header-login button {
    width: 34px;
    height: 32px;
    background: linear-gradient(135deg, var(--lime), var(--lime-dark));
    border: none;
    border-radius: 7px;
    cursor: pointer;
    color: #1a2200;
    display: grid;
    place-items: center;
    flex-shrink: 0;
  }
  .header-login button svg { width: 16px; height: 16px; }
  /* When header has its own login, drop the mobile-login from col-main. */
  .mobile-login { display: none !important; }
}

@media (max-width: 768px) {
  body { font-size: 14px; }
  .header-inner { padding: 12px 16px; }

  .mobile-login {
    display: flex;
    gap: 6px;
    margin-bottom: 4px;
  }
  .mobile-login input {
    flex: 1;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    font-size: 13px;
    color: var(--ink);
    font-family: inherit;
  }
  .mobile-login button {
    flex-shrink: 0;
    width: 42px;
    background: linear-gradient(135deg, var(--lime), var(--lime-dark));
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: #1a2200;
    display: grid;
    place-items: center;
    box-shadow: 0 1px 3px rgba(149,181,32,.3);
  }
  .mobile-login button svg { width: 18px; height: 18px; }

  .hero-date { font-size: 22px; }
  .two-col { grid-template-columns: 1fr; }
  .lineup-grid {
    grid-template-columns: 1fr;
    row-gap: 8px;
  }
  .lineup-grid > .section-label:nth-child(3),
  .lineup-grid > .name-list:nth-child(4) {
    padding-top: 0;
    border-top: none;
  }
  .lineup-grid > .section-label:nth-child(3) {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-soft);
  }
  .ranks-grid, .ranks-grid.cols-3 { grid-template-columns: 1fr; }
  .recent-activity .ra-row {
    display: grid;
    grid-template-columns: 84px max-content minmax(0, 1fr);
    align-items: baseline;
    padding: 6px 0;
    font-size: 12px;
    line-height: 1.35;
    column-gap: 6px;
  }
  .recent-activity .ra-row .time,
  .recent-activity .ra-row .who,
  .recent-activity .ra-row .action {
    display: block;
    white-space: nowrap !important;
    font-size: 12px;
  }
  .recent-activity .ra-row .time { font-size: 11px; }
  .recent-activity .ra-row .action {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .history-table, .history-table tbody, .history-table tr { display: block; width: 100%; }
  .history-table tr {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-soft);
  }
  .history-table tr:last-child { border-bottom: none; }
  .history-table td {
    display: inline;
    padding: 0;
    border: none;
  }
  .history-table td:first-child {
    display: block;
    font-size: 11px;
    color: var(--ink-mute);
    margin-bottom: 4px;
    white-space: nowrap;
  }
  .history-table td:nth-child(2) { margin-right: 6px; }
  .history-table td:nth-child(3) { margin-right: 6px; }
  .history-table td:nth-child(4) { white-space: nowrap; }
  .history-table .action-tag { white-space: nowrap; }
  .year { display: none; }
  .schedule-strip { padding: 12px 14px; }

  /* HRACI mobile */
  .gallery { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 10px; }
  .gallery-photo { border-radius: 10px; }

  /* Mobile: hide desktop static title + season-header, show toggle */
  .sequence-card-header .sequence-static-title { display: none; }
  .sequence-card-header .sequence-toggle {
    display: flex;
    flex: 1;
    border-bottom: 1px solid var(--border-soft);
  }
  .sequence-card-header .sequence-toggle .stats-tab-btn { flex: 1; padding: 12px 16px; }
  .sequence-card-header .sequence-toggle .stats-tab-btn.active {
    border-bottom-color: var(--lime-dark);
  }
  .sequence-card .seq-season-header { display: none; }

  /* Mode: PORADIE — single line per player, last 5 form */
  .sequence-card.mode-poradie .seq-poradie-labels {
    display: grid;
    grid-template-columns: 28px 80px 1fr auto;
    column-gap: 10px;
    padding: 10px 14px 6px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--ink-mute);
    font-weight: 700;
    border-bottom: 1px solid var(--border-soft);
  }
  .sequence-card.mode-poradie .seq-poradie-labels .lab-form {
    grid-column: 3;
    text-align: right;
  }
  .sequence-card.mode-poradie .seq-poradie-labels .lab-koef {
    grid-column: 4;
    text-align: right;
    min-width: 38px;
  }
  .sequence-card.mode-poradie .seq-row {
    grid-template-columns: 28px 80px 1fr auto;
    grid-template-areas: "rank nick form koef";
    column-gap: 10px;
    padding: 10px 14px;
  }
  .sequence-card.mode-poradie .seq-rank { grid-area: rank; }
  .sequence-card.mode-poradie .seq-nick { grid-area: nick; }
  .sequence-card.mode-poradie .seq-koef { grid-area: koef; }
  .sequence-card.mode-poradie .seq-form {
    grid-area: form;
    display: flex;
    gap: 3px;
    align-items: center;
    justify-content: flex-end;
  }
  .sequence-card.mode-poradie .seq-half-jesen,
  .sequence-card.mode-poradie .seq-half-jar { display: none; }

  /* Mode: CELÁ SEZÓNA — 3 rows per player; "Jeseň"/"Jar" labels sit in rank column */
  .sequence-card.mode-celasezona .seq-row {
    grid-template-columns: 44px 1fr auto;
    grid-template-areas:
      "rank nick koef"
      "jlab j    j"
      "rlab r    r";
    column-gap: 10px;
    row-gap: 6px;
    padding: 12px 14px;
  }
  .sequence-card.mode-celasezona .sequence-list .qual-divider + .seq-row { border-top: none; }
  .sequence-card.mode-celasezona .seq-rank { grid-area: rank; align-self: start; padding-top: 1px; }
  .sequence-card.mode-celasezona .seq-nick { grid-area: nick; }
  .sequence-card.mode-celasezona .seq-koef { grid-area: koef; align-self: start; padding-top: 1px; }
  /* .seq-half disappears from layout — its children become direct grid items of .seq-row */
  .sequence-card.mode-celasezona .seq-half { display: contents; }
  .sequence-card.mode-celasezona .seq-half-jesen > .seq-half-label { grid-area: jlab; }
  .sequence-card.mode-celasezona .seq-half-jesen > .seq-icons { grid-area: j; }
  .sequence-card.mode-celasezona .seq-half-jar > .seq-half-label { grid-area: rlab; }
  .sequence-card.mode-celasezona .seq-half-jar > .seq-icons { grid-area: r; }
  .sequence-card.mode-celasezona .seq-half-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--ink-mute);
    font-weight: 700;
    text-align: right;
    align-self: center;
  }
  .sequence-card.mode-celasezona .seq-half-jesen .seq-icons,
  .sequence-card.mode-celasezona .seq-half-jar .seq-icons {
    display: grid;
    grid-template-columns: repeat(18, 1fr);
    gap: 2px;
    justify-items: start;
  }
  .sequence-card.mode-celasezona .seq-half .seq-icons .icon {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    max-width: 18px;
    border-radius: 2px;
  }
  .sequence-card.mode-celasezona .seq-form { display: none; }


  .attend-table thead { display: none; }
  .attend-table, .attend-table tbody, .attend-table tr { display: block; width: 100%; }
  .attend-table tr {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-soft);
    display: grid;
    grid-template-columns: 22px 1fr auto auto;
    grid-template-areas:
      "rank player pct games"
      ".    status status status";
    column-gap: 10px;
    row-gap: 6px;
    align-items: center;
  }
  .attend-table tr.attend-divider-row {
    display: block;
    width: 100%;
    padding: 0;
    border-bottom: none;
  }
  .attend-table tr.attend-divider-row td {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
  }
  .attend-table tr.qual-last { border-bottom: none; }
  .attend-table tr:last-child { border-bottom: none; }
  .attend-table td { display: block; padding: 0; border: none; }
  .attend-table .ta-rank {
    grid-area: rank;
    text-align: right;
    align-self: start;
    padding-top: 1px;
    font-size: 12px;
    color: var(--ink-mute);
    font-weight: 600;
  }
  .attend-table .ta-player {
    grid-area: player;
    font-size: 14px;
    font-weight: 600;
  }
  .attend-table tr td:nth-child(3) {
    grid-area: pct;
    min-width: 0;
    text-align: right;
  }
  .attend-table tr td:nth-child(4) {
    grid-area: games;
    font-size: 12px;
    color: var(--ink-mute);
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  .attend-table tr td:nth-child(5) {
    grid-area: status;
    text-align: left;
  }

  /* compact pct cell on mobile */
  .pct-cell { min-width: 0; gap: 8px; }
  .pct-bar { min-width: 60px; height: 5px; }
  .pct-val { font-size: 11px; min-width: 40px; }


  .award-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .award-cat { padding-top: 0; }
  .award-winner {
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 12px;
  }
  .award-detail { text-align: right; }
}

@media (max-width: 480px) {
  /* Narrow phones: stack status below meta when it can't fit inline. */
  .hero-headblock {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "label   countdown"
      "meta    countdown"
      "status  status";
    align-items: center;
    column-gap: 16px;
    row-gap: 6px;
  }
  .hero-status { justify-self: start; }
}

@media (max-width: 420px) {
  .hero-date { font-size: 19px; }
  .hero-countdown .num { font-size: 24px; }
  .recent-activity .ra-row .action-target { display: none; }
}

@media (max-width: 360px) {
  .brand-volume { display: none; }
}

/* ============================================================
   ZÁPASY page
   ============================================================ */

/* Header summary (V : R : P) */
.matches-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.matches-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 15px;
  padding: 4px 12px;
  background: var(--border-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink);
}
.matches-summary .ms-v { color: var(--good); }
.matches-summary .ms-r { color: var(--tie); }
.matches-summary .ms-p { color: var(--danger); }
.matches-summary .ms-sep { color: var(--ink-mute); font-weight: 400; }
.matches-summary .ms-note {
  margin-left: 6px;
  padding-left: 8px;
  border-left: 1px solid var(--border);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-mute);
  text-transform: lowercase;
  letter-spacing: .02em;
}

/* List body: matches stacked */
.matches-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 12px 14px;
}

/* Single match card */
/* Match card — outer grid defines 3 columns; .match-head and .match-body use
   subgrid so avatars and scorers share columns (right-edge of bieli scorers
   aligns with rightmost bieli avatar; left-edge of čierni scorers with leftmost). */
.match-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  transition: box-shadow .15s ease, transform .15s ease;
}
.match-card:hover { box-shadow: var(--shadow); }
.match-card.win-bieli  { border-left: 3px solid var(--good); }
.match-card.win-cierni { border-left: 3px solid var(--danger); }
.match-card.draw       { border-left: 3px solid var(--tie); }

.match-head {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
  align-items: center;
  column-gap: 14px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #fafbfd, #f4f5f8);
  border-bottom: 1px solid var(--border-soft);
}
.match-body {
  position: relative;
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
  column-gap: 14px;
  padding: 12px 14px;
  align-items: start;
}
/* Subtle vertical divider between bieli and čierni scorers */
.match-body::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 50%;
  width: 1px;
  background: var(--border);
  transform: translateX(-50%);
  pointer-events: none;
}

.match-center  { grid-column: 2; display: flex; flex-direction: column; align-items: center; gap: 8px; white-space: nowrap; }
.lineup-bieli  { grid-column: 1; justify-self: end;   }
.lineup-cierni { grid-column: 3; justify-self: start; }
.scorers-right { grid-column: 1; justify-self: end;   }
.scorers-left  { grid-column: 3; justify-self: start; }

/* Scoreboard look — shared visual style for match scores across pages. */
.match-score,
.koment-score,
.preview-comments .score {
  display: inline-block;
  padding: 4px 9px;
  background: linear-gradient(180deg, #2a3142 0%, #1a1f2c 100%);
  color: #fff;
  border-radius: 8px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.09),
    inset 0 -1px 0 rgba(0,0,0,.25),
    0 2px 4px rgba(20,25,45,.18);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1.05;
}
.match-score                { font-size: 24px; }
.preview-comments .score    { font-size: 20px; }
/* Colon — slightly muted, with breathing room on both sides. */
.match-score .score-sep,
.koment-score .score-sep,
.preview-comments .score .sep {
  color: rgba(255,255,255,.82);
  margin: 0 4px;
  font-weight: 400;
}
.match-date {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

/* Note star — appended to a player's nick in the lineup when that match has a note about them. */
.note-star {
  color: var(--danger);
  font-size: 10px;
  margin-left: 2px;
  vertical-align: super;
  cursor: help;
}
.lineup-item.is-noted img {
  box-shadow: 0 0 0 1px var(--danger), 0 0 0 3px rgba(210, 69, 69, .18);
}

/* Lineup avatars */
.lineup {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.lineup-bieli  { justify-content: flex-end; }
.lineup-cierni { justify-content: flex-start; }
.lineup-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 38px;
  position: relative;
}
.lineup-item img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--border);
}
.lineup-item.is-captain img {
  border-color: var(--lime);
  box-shadow: 0 0 0 1px var(--lime-dark), 0 0 0 3px rgba(184, 217, 52, .25);
}
.lineup-item.is-captain::after {
  content: 'C';
  position: absolute;
  top: -3px;
  right: -3px;
  width: 14px;
  height: 14px;
  background: var(--lime-dark);
  color: #fff;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 800;
  line-height: 14px;
  text-align: center;
}
.lineup-nick {
  font-size: 10px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 38px;
  line-height: 1.1;
}

/* Scorers list — 4-column grid: nick | G | + | A
   Each <li class="scorer"> uses display:contents so its children land directly
   in the parent grid → goals, plus signs, assists & nicks all align by column. */
.scorers {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-auto-flow: row dense;
  align-items: baseline;
  row-gap: 2px;
  column-gap: 8px;
  font-size: 13px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
.scorers-right {
  /* bieli (right side): [ nick ][ stats="3+0" ] */
  grid-template-columns: 1fr auto;
  justify-content: end;
}
.scorers-left {
  /* čierni (left side): [ stats="6+1" ][ nick ] */
  grid-template-columns: auto 1fr;
  justify-content: start;
}
.scorer { display: contents; }

.sc-nick {
  font-weight: 500;
  color: var(--ink);
}
.scorers-right .sc-nick  { grid-column: 1; text-align: right; }
.scorers-right .sc-stats { grid-column: 2; text-align: left; }
.scorers-left  .sc-stats { grid-column: 1; text-align: right; }
.scorers-left  .sc-nick  { grid-column: 2; text-align: left; }

.sc-stats {
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
/* .sc-g / .sc-a inherit font-weight:700 from .sc-stats — no need to repeat. */
.sc-plus {
  color: var(--ink-mute);
  font-weight: 400;
  margin: 0 1px;
}

/* Special rows: "bez asistencie" / "vlastný" — single number aligned with stats column,
   label sits in nick column. */
.sc-special-label {
  font-style: italic;
  color: var(--ink-mute);
  font-weight: 400;
  font-size: 12px;
}
.sc-special-num {
  font-weight: 700;
  color: var(--ink);
}
/* Special row: label + num sit together in a single block at the far end of the row
   (under A for bieli, under G for čierni) so the count lines up with the regular A/G column. */
.sc-special-content {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.scorers-right .sc-special-content { grid-column: 1 / -1; justify-self: end; }
.scorers-left  .sc-special-content { grid-column: 1 / -1; justify-self: start; flex-direction: row-reverse; }

/* Archive table */
.archive-card .card-body { padding: 0; }
.archive-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.archive-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.archive-table thead th {
  text-align: left;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-mute);
  padding: 10px 14px;
  background: var(--border-soft);
  border-bottom: 1px solid var(--border);
}
.archive-table tbody td {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--ink);
  white-space: nowrap;
}
.archive-name { font-weight: 500; }
.archive-stat {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-mute);
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}
.archive-table tbody tr:last-child td { border-bottom: none; }
.archive-table tbody tr:hover { background: #fafbfd; }
.archive-season a {
  font-weight: 700;
  color: var(--lime-dark);
  text-decoration: none;
}
.archive-season a:hover { text-decoration: underline; }
.archive-covid td { color: var(--ink-mute); }
.archive-covid-label { text-align: left; }
.muted { color: var(--ink-mute); }

/* Archive TOP block */
.archive-top {
  padding: 14px;
  background: linear-gradient(180deg, #fafbfd 0%, #fff 100%);
  border-top: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.archive-top-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.archive-top-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-mute);
  min-width: 110px;
}
.archive-top-list {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.archive-top-item {
  font-size: 14px;
  color: var(--ink);
}
.archive-top-item strong { color: var(--lime-dark); }

/* ----------- Mobile (Zápasy) ----------- */
@media (max-width: 768px) {
  .matches-body { padding: 10px; gap: 12px; }

  /* Keep desktop horizontal layout [bieli][score][čierni] on mobile,
     keep desktop avatar size (38px). Lineup wrap handled in a separate
     narrower breakpoint below — for wider tablets 6-per-row fits naturally. */
  .match-head { padding: 10px 8px; column-gap: 6px; }
  .match-body { padding: 10px 8px; column-gap: 6px; }

  .match-score { font-size: 24px; }
  .match-date  { font-size: 10px; }

  /* Archive table — keep table but compact */
  .archive-table { font-size: 13px; }
  .archive-table thead th,
  .archive-table tbody td { padding: 7px 8px; }
  .archive-stat { font-size: 11px; margin-left: 3px; }
  .archive-top { padding: 12px 10px; }
  .archive-top-label { min-width: auto; }
}

/* Force 3-per-row lineup wrap when the natural 6-in-row doesn't fit horizontally.
   Threshold ~700px — above this both teams fit in one line, below it we wrap. */
@media (max-width: 699px) {
  .lineup-bieli,
  .lineup-cierni {
    width: calc(3 * 38px + 2 * 4px);  /* 122px → exactly 3 avatars per row */
    align-content: start;
  }
  /* Same threshold for the card header — stack title + V:R:P summary when too narrow. */
  .matches-card-header {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .matches-summary {
    align-self: flex-start;
    font-size: 14px;
  }
}

/* Narrow phones — shrink avatars so 3 still fit per row */
@media (max-width: 420px) {
  .lineup-item { width: 34px; }
  .lineup-item img { width: 28px; height: 28px; }
  .lineup-nick { font-size: 9px; max-width: 34px; }
  .lineup { gap: 3px; }
  .lineup-bieli,
  .lineup-cierni { width: calc(3 * 34px + 2 * 3px); }  /* 108px */
  .match-head, .match-body { padding: 8px 4px; column-gap: 3px; }
  .match-score { font-size: 22px; }
}

@media (max-width: 360px) {
  .lineup-item { width: 30px; }
  .lineup-item img { width: 26px; height: 26px; }
  .lineup-bieli,
  .lineup-cierni { width: calc(3 * 30px + 2 * 3px); }  /* 96px */
}

/* ============================================================
   KOMENTARE — list of matches with optional written comment
   ============================================================ */
.koment-card-wrap .card-body { padding: 0; }

.koment-body {
  display: flex;
  flex-direction: column;
}

.koment-item {
  padding: 14px 18px;
  border-top: 1px solid var(--border-soft);
  border-left: 3px solid transparent;
  position: relative;
}
.koment-item:first-child { border-top: none; }
.koment-item.win-bieli  { border-left-color: var(--good); }
.koment-item.win-cierni { border-left-color: var(--danger); }
.koment-item.draw       { border-left-color: var(--tie); }

.koment-item.is-written {
  background: var(--lime-soft);
}
.koment-item.is-empty {
  padding: 8px 18px;
  opacity: .58;
}

/* Header row: score · captains ............... varia · date */
.koment-head {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}
.koment-score {
  font-size: 16px;
  flex: 0 0 auto;
  text-align: center;
  min-width: 54px;
}
.is-empty .koment-score { font-size: 14px; min-width: 48px; padding: 3px 10px; }

.koment-caps {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  color: var(--ink);
  flex: 0 0 auto;
}
.koment-caps .cap { font-weight: 600; }
.koment-caps .cap-vs {
  font-size: 11px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: .8px;
  font-weight: 500;
}

.koment-right {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-soft);
  white-space: nowrap;
}
.koment-slot {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.koment-slot-star  { width: 14px; justify-content: center; }
.koment-slot-jombo { width: 58px; justify-content: flex-end; margin-left: 12px; }
.koment-date {
  width: 88px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.koment-note-star {
  color: var(--danger);
  font-size: 14px;
  line-height: 1;
  cursor: help;
}

.koment-jombo {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--blue);
  text-decoration: none;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card);
  transition: background .15s, border-color .15s, color .15s;
}
.koment-jombo:hover {
  background: var(--blue-soft);
  border-color: var(--blue);
  color: var(--blue-dark);
  text-decoration: none;
}
.koment-jombo svg { stroke: currentColor; }

/* Pending state — placeholder with writer list */
.koment-pending {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.koment-pending-lead {
  color: var(--ink);
  font-weight: 500;
  margin-right: 4px;
}
.koment-pending-writers .writer {
  display: inline;
  color: var(--ink);
}

/* Written comment */
.koment-text {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  max-width: 64ch;
}
.koment-text p { margin: 0 0 10px; }
.koment-text p:last-of-type { margin-bottom: 6px; }
.koment-author {
  font-size: 12px;
  color: var(--ink-mute);
  margin-top: 4px;
}
.koment-author strong { color: var(--ink-soft); font-weight: 600; }

.is-empty .koment-right { font-size: 11px; }
.is-empty .koment-caps .cap-vs { font-size: 10px; }

.koment-empty-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  color: var(--ink-mute);
  font-style: italic;
  white-space: nowrap;
  pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
  .koment-item { padding: 12px 12px; }
  .koment-item.is-empty { padding: 7px 12px; }
  .koment-head { gap: 10px; }
  .koment-right { gap: 10px; font-size: 11px; }
  /* On mobile, drop fixed-width alignment — slots size to content, empty ones disappear. */
  .koment-slot-star,
  .koment-slot-jombo { width: auto; margin-left: 0; }
  .koment-slot:empty { display: none; }
  .koment-date { width: auto; }
  /* "bez komentára" — preč na mobile, opacity stačí ako signál. */
  .koment-empty-label { display: none; }
  .koment-score { font-size: 14px; min-width: 46px; padding: 3px 10px; }
  .koment-text { font-size: 13px; }
}

@media (max-width: 420px) {
  .koment-item { padding: 10px 10px; }
  .koment-head { gap: 8px; }
  .koment-right { gap: 8px; }
  .koment-jombo { padding: 1px 5px; font-size: 10px; }
  .koment-caps { gap: 6px; }
  .koment-caps .cap { font-size: 13px; }
  .koment-date { font-size: 11px; }
  .koment-pending { font-size: 12px; }
}

/* ============================================================
   DISKUSIA — microblog feed
   ============================================================ */
.diskusia-card .card-body { padding: 0; }

.diskusia-post {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid var(--border-soft);
}
.diskusia-post:first-child { border-top: none; }

.diskusia-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  background: var(--border-soft);
}
.diskusia-post.is-sub .diskusia-avatar {
  filter: grayscale(.6);
  opacity: .85;
}

.diskusia-content {
  flex: 1 1 auto;
  min-width: 0;
}

.diskusia-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 2px;
}
/* .diskusia-author base rule merged with .disc-head .author above. */
.diskusia-post.is-sub .diskusia-author {
  color: var(--ink-soft);
  font-style: italic;
}
.diskusia-date {
  font-size: 11px;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}

.diskusia-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  word-wrap: break-word;
}

@media (max-width: 768px) {
  .diskusia-post { padding: 12px 12px; gap: 10px; }
  .diskusia-avatar { width: 32px; height: 32px; }
  .diskusia-text { font-size: 13px; }
}

@media (max-width: 420px) {
  .diskusia-post { padding: 10px 10px; gap: 8px; }
  .diskusia-avatar { width: 30px; height: 30px; }
}

/* ============================================================
   PREDPLATNE — financial ledger with KPI strip + expandable rows
   ============================================================ */

/* KPI strip */
.predp-kpi {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.predp-kpi-tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  border-left: 3px solid var(--border);
}
.predp-kpi-tile.is-credit { border-left-color: var(--good); }
.predp-kpi-tile.is-debt   { border-left-color: var(--danger); }
/* Small-label cosmetics shared with header rows below. */
.predp-kpi-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.predp-kpi-tile.is-credit .predp-kpi-value { color: var(--good); }
.predp-kpi-tile.is-debt   .predp-kpi-value { color: var(--danger); }
.predp-kpi-sub {
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 2px;
}

/* Ledger card */
.predp-card .card-body { padding: 0; }

/* Single grid template — header row + data rows share it. */
.predp-row {
  border-top: 1px solid var(--border-soft);
}
.predp-row:first-child { border-top: none; }

.predp-summary,
.predp-header-row {
  display: grid;
  grid-template-columns:
    minmax(140px, 1.4fr)  /* nick */
    50px 36px 64px 64px 78px 56px  /* P, Z, Cena, Cash, Ostáva, +záp. */
    minmax(110px, 1fr);   /* history */
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  width: 100%;
}

/* Header-row + KPI-label cosmetics — shared by ledger tables (predplatné, double-koef) and KPI tiles. */
.predp-kpi-label,
.predp-header-row,
.double-header-row {
  font-size: 11px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: .6px;
  font-weight: 600;
}
.predp-header-row,
.double-header-row {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.predp-header-row .col-num { text-align: right; }

.predp-summary {
  background: none;
  border: 0;
  font: inherit;
  color: inherit;
  text-align: inherit;
  cursor: pointer;
  font-size: 13px;
}
.predp-summary:hover { background: var(--border-soft); }
.predp-row.is-sub .predp-summary { opacity: .85; }

.col-nick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--ink);
}
.col-nick img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.is-sub .col-nick img { filter: grayscale(.6); }

.col-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.col-num .muted { color: var(--ink-mute); }
.col-num .is-credit { color: var(--good); font-weight: 600; }
.col-num .is-debt   { color: var(--danger); font-weight: 600; }
.col-ostava strong { font-weight: 700; }

.col-hist { text-align: right; }

.predp-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ink-soft);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--border-soft);
  transition: background .15s;
}
.predp-summary:hover .predp-toggle { background: var(--lime-soft); }
.predp-toggle-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--ink-soft);
}
.predp-toggle-icon-minus { display: none; }
.predp-row.is-open .predp-toggle-icon-plus  { display: none; }
.predp-row.is-open .predp-toggle-icon-minus { display: inline-block; }

/* Expanded detail row */
.predp-detail {
  padding: 4px 18px 14px;
  background: var(--bg);
  border-top: 1px dashed var(--border);
}
.predp-payments {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.predp-pay {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.predp-pay-amt { font-weight: 700; color: var(--ink); }
.predp-pay-date { color: var(--ink-mute); font-size: 11px; }
.predp-pay.is-neg {
  background: #fceaea;
  border-color: #e8b8b8;
}
.predp-pay.is-neg .predp-pay-amt { color: var(--danger); }

/* Responsive */
@media (max-width: 768px) {
  .predp-kpi {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 12px;
  }
  .predp-kpi-tile { padding: 10px 12px; }
  .predp-kpi-value { font-size: 18px; }

  /* Hide table header, switch each row to card grid. */
  .predp-header-row { display: none; }
  .predp-summary {
    grid-template-columns: 1fr 1fr;
    grid-auto-flow: row;
    gap: 4px 12px;
    padding: 12px 14px;
  }
  .col-nick {
    grid-column: 1 / -1;
    font-size: 14px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border-soft);
    margin-bottom: 4px;
  }
  .col-num {
    text-align: left;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
  }
  .col-num::before {
    content: attr(data-label);
    color: var(--ink-mute);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 600;
    margin-right: 8px;
  }
  .col-hist {
    grid-column: 1 / -1;
    text-align: left;
    margin-top: 4px;
  }
  .predp-detail { padding: 4px 14px 12px; }
}

@media (max-width: 420px) {
  .predp-summary { padding: 10px 10px; }
  .col-nick img { width: 24px; height: 24px; }
  .predp-detail { padding: 4px 10px 10px; }
}

/* ============================================================
   PRAVIDLA — categorized rules list
   ============================================================ */
.pravidla-body { padding: 0; }

.pravidla-section {
  padding: 18px 20px;
  border-top: 1px solid var(--border-soft);
}
.pravidla-section:first-child { border-top: none; }

.pravidla-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--blue);
}

.pravidla-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pravidla-list li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}
.pravidla-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 10px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--blue);
}
.pravidla-list strong { font-weight: 700; }
.pravidla-list .rule-emph {
  color: var(--danger);
  font-weight: 700;
}

/* Šatňa SVG schema */
.satna-figure {
  margin: 0;
  text-align: center;
}
.satna-svg {
  display: block;
  margin: 0 auto;
  max-width: 360px;
  width: 100%;
  height: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
}
.satna-wall   { stroke: var(--ink-soft); stroke-width: 2.5; }
.satna-bench  { fill: var(--lime-soft); }
.satna-seat   { fill: var(--lime-dark); }
.satna-name   { font-size: 14px; font-weight: 600; fill: var(--ink); font-family: var(--font); }
.satna-name-right { text-anchor: end; }
.satna-label  { font-size: 13px; font-weight: 500; fill: var(--ink-soft); font-family: var(--font); }
.satna-label-strong { font-weight: 700; letter-spacing: 1px; fill: var(--ink); font-size: 14px; }
.satna-arrow  { stroke: var(--danger); }

@media (max-width: 768px) {
  .pravidla-section { padding: 14px 14px; }
  .pravidla-list li { font-size: 13px; line-height: 1.5; }
}

@media (max-width: 420px) {
  .pravidla-section { padding: 12px 12px; }
  .pravidla-title { font-size: 12px; }
}

/* ============================================================
   DOUBLE ŠTATISTIKA — composite ranking (koef body + koef góly)
   ============================================================ */
.double-card .card-body { padding: 0; }

.double-intro {
  padding: 14px 18px;
  margin: 0;
  font-size: 12px;
  color: var(--ink-mute);
  line-height: 1.6;
  border-top: 1px solid var(--border-soft);
  background: var(--bg);
  font-style: italic;
}
.double-intro strong { color: var(--ink-soft); font-weight: 600; font-style: normal; }

.double-row,
.double-header-row {
  display: grid;
  grid-template-columns: 36px minmax(140px, 1.6fr) 80px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-top: 1px solid var(--border-soft);
}
.double-row:first-of-type { border-top: none; }
.double-body .qual-divider + .double-row { border-top: none; }

.double-header-row { border-top: none; }  /* override .double-row border-top */
.double-header-row .col-total,
.double-header-row .col-breakdown { text-align: left; }

.double-row .col-rnk {
  font-weight: 600;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}

/* .col-nick and .col-nick img defined once in the predplatné section above — reused as-is. */

.double-row .col-total {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.double-row .col-breakdown {
  font-size: 13px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}
.bd-plus { color: var(--ink-mute); }

.double-row.is-unqual {
  opacity: .72;
}
.double-row.is-unqual .col-rnk,
.double-row.is-unqual .col-nick img { filter: grayscale(.3); }

/* Divider: 60% threshold — thin rule with centered pill label */
.qual-divider {
  position: relative;
  padding: 10px 0 8px;
  text-align: center;
}
.qual-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--border);
}
.qual-divider-label {
  position: relative;
  display: inline-block;
  padding: 3px 12px;
  background: var(--lime-soft);
  color: var(--lime-dark);
  border: 1px solid var(--lime-dark);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
}
.qual-divider-label .hd-short { display: none; }
.qual-divider-label .hd-long { display: inline; }

@media (max-width: 768px) {
  .double-header-row { display: none; }

  /* Force single-row flex layout on mobile (grid behavior was wrapping). */
  .double-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
  }
  .double-row .col-rnk       { flex: 0 0 22px; font-size: 12px; }
  .double-row .col-nick      { flex: 1 1 auto; min-width: 0; gap: 6px; }
  .double-row .col-nick > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .double-row .col-nick img  { width: 24px; height: 24px; }
  .double-row .col-total     { flex: 0 0 auto; font-size: 16px; }
  .double-row .col-breakdown { flex: 0 0 auto; font-size: 11px; gap: 3px; }

  .qual-divider { padding: 8px 0 6px; }
  .qual-divider::before { left: 0; right: 0; }
  .double-intro { padding: 12px 14px; }
}

@media (max-width: 640px) {
  .qual-divider-label .hd-long { display: none; }
  .qual-divider-label .hd-short { display: inline; }
}

@media (max-width: 420px) {
  .double-row { gap: 6px; padding: 7px 10px; }
  .double-row .col-rnk       { flex: 0 0 18px; font-size: 11px; }
  .double-row .col-nick img  { width: 22px; height: 22px; }
  .double-row .col-total     { font-size: 14px; }
  .double-row .col-breakdown { font-size: 10px; }
}
