:root {
  --brand: #d90818;
  --brand-dark: #a4000d;
  --brand-soft: #fff0f2;
  --ink: #141419;
  --ink-soft: #5d5d66;
  --line: #dedee3;
  --line-strong: #b9b9c0;
  --surface: #ffffff;
  --surface-soft: #f4f4f6;
  --surface-deep: #e9e9ed;
  --success: #14834d;
  --warning: #c77800;
  --live: #e00018;
  --shadow: 0 14px 36px rgba(20, 20, 25, 0.09);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --max-width: 1480px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 0 0, rgba(217, 8, 24, 0.08), transparent 26rem),
    linear-gradient(#f7f7f9, #efeff2);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
.match-card:focus-visible {
  outline: 3px solid rgba(217, 8, 24, 0.28);
  outline-offset: 3px;
}

.noscript {
  padding: 1rem;
  background: #fee2e2;
  color: #7f1d1d;
  text-align: center;
  font-weight: 700;
}

.topbar {
  position: sticky;
  z-index: 100;
  top: 0;
  background: linear-gradient(118deg, var(--brand-dark), var(--brand) 45%, #f32635);
  color: #fff;
  box-shadow: 0 5px 22px rgba(133, 0, 10, 0.28);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  min-height: 72px;
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.brand__ball {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.07);
  font-size: 23px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.08rem;
  line-height: 1.05;
}

.brand small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.topbar__status {
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.84rem;
}

.connection-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffd166;
  box-shadow: 0 0 0 4px rgba(255, 209, 102, 0.2);
}

.connection-dot.is-online {
  background: #63e6a4;
  box-shadow: 0 0 0 4px rgba(99, 230, 164, 0.2);
}

.connection-dot.is-offline {
  background: #ffd0d5;
  box-shadow: 0 0 0 4px rgba(255, 208, 213, 0.2);
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  margin-left: 4px;
  padding: 8px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.icon-button.is-loading svg {
  animation: rotate 0.8s linear infinite;
}

.icon-button svg {
  width: 20px;
  fill: currentColor;
}

@keyframes rotate {
  to { transform: rotate(360deg); }
}

.app-shell {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 28px auto 40px;
}

.headline-panel {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  padding: 26px 28px;
  border: 1px solid rgba(217, 8, 24, 0.16);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0.98), rgba(255, 243, 244, 0.96)),
    var(--surface);
  box-shadow: var(--shadow);
}

.eyebrow,
.section-kicker {
  margin: 0 0 7px;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 7px;
  font-size: clamp(1.7rem, 3.4vw, 2.75rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.28rem, 2vw, 1.75rem);
  letter-spacing: -0.025em;
}

.headline-panel__subline {
  margin-bottom: 0;
  color: var(--ink-soft);
}

.headline-panel__live {
  display: inline-flex;
  min-width: max-content;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid #ffc4ca;
  border-radius: 999px;
  background: #fff;
  color: var(--brand-dark);
  box-shadow: 0 8px 20px rgba(217, 8, 24, 0.09);
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 5px rgba(224, 0, 24, 0.13);
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  50% { box-shadow: 0 0 0 10px rgba(224, 0, 24, 0); }
}

.headline-panel__live.is-upcoming {
  border-color: #f1d29a;
  background: #fffaf0;
  color: #7a5100;
}

.headline-panel__live.is-upcoming .live-dot {
  background: #e69a00;
  box-shadow: 0 0 0 5px rgba(230, 154, 0, 0.14);
  animation: none;
}

.headline-panel__live.is-idle {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--ink-soft);
}

.headline-panel__live.is-idle .live-dot {
  background: #9b9ba3;
  box-shadow: 0 0 0 5px rgba(155, 155, 163, 0.13);
  animation: none;
}

.main-tabs {
  display: flex;
  gap: 6px;
  margin: 20px 0;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 22px rgba(20, 20, 25, 0.05);
  scrollbar-width: thin;
}

.main-tab {
  display: inline-flex;
  min-width: max-content;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 800;
}

.main-tab:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.main-tab.is-active {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 5px 13px rgba(20, 20, 25, 0.18);
}

.view {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.section-toolbar {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-note {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

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

.control-button,
.date-picker {
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  box-shadow: 0 4px 11px rgba(20, 20, 25, 0.05);
}

.control-button {
  padding: 0 15px;
}

.control-button:hover,
.date-picker:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.control-button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.control-button--square {
  width: 42px;
  padding: 0;
  font-size: 1.6rem;
  line-height: 1;
}

.control-button--dark {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.date-picker {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 0 10px;
}

.date-picker input {
  width: 128px;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font-weight: inherit;
}

.date-ribbon {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.date-chip {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.date-chip.is-today {
  border-color: rgba(217, 8, 24, 0.35);
  background: var(--brand-soft);
}

.date-chip strong,
.date-chip span {
  display: block;
}

.date-chip strong {
  font-size: 0.98rem;
}

.date-chip span {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.date-chip__count {
  min-width: 30px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  text-align: center;
  font-size: 0.78rem;
  font-weight: 900;
}

.match-window {
  min-height: 260px;
}

.day-block + .day-block {
  margin-top: 25px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.day-block__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.day-block__header h3 {
  margin: 0;
  font-size: 1rem;
}

.day-block__header span {
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.match-card {
  position: relative;
  display: flex;
  min-height: 176px;
  padding: 15px;
  flex-direction: column;
  border: 1px solid #aeadb4;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 7px 17px rgba(20, 20, 25, 0.04);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

button.match-card {
  width: 100%;
  color: inherit;
  text-align: left;
}

.match-card:hover {
  z-index: 2;
  border-color: var(--brand);
  box-shadow: 0 12px 28px rgba(20, 20, 25, 0.11);
  transform: translateY(-2px);
}

.match-card.is-live {
  border-color: var(--live);
  box-shadow: inset 4px 0 0 var(--live), 0 10px 24px rgba(224, 0, 24, 0.11);
}

.match-card__competition {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  color: #5f5a59;
  font-size: 0.78rem;
}

.match-card__stage {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-badge {
  min-width: max-content;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--surface-deep);
  color: var(--ink-soft);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.status-badge--live {
  background: var(--live);
  color: #fff;
  animation: statusBlink 1.2s steps(2, jump-none) infinite;
}

.status-badge--finished {
  background: #e5f4ec;
  color: #11633b;
}

@keyframes statusBlink {
  50% { opacity: 0.7; }
}

.team-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 43px;
}

.team-row + .team-row {
  margin-top: 2px;
}

.team-flag {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #e0e0e4;
  border-radius: 50%;
  background: #f7f7f8;
}

.team-flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-flag__fallback {
  color: #65656c;
  font-size: 0.68rem;
  font-weight: 900;
}

.team-name {
  overflow: hidden;
  font-size: 0.94rem;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.team-score {
  min-width: 34px;
  text-align: right;
  font-size: 1.45rem;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.match-card__footer {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 2px solid #d3d3d6;
  color: #5e5858;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.match-card__footer strong {
  color: var(--ink);
}


.match-live-clock {
  margin: 10px 0 2px;
  padding: 10px 11px;
  border: 1px solid #ffc5cb;
  border-radius: 10px;
  background: linear-gradient(135deg, #fff5f6, #fff);
  color: var(--brand-dark);
}

.match-live-clock__headline {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.match-live-clock__headline strong {
  font-size: 0.82rem;
  font-weight: 950;
}

.match-live-clock__headline span {
  color: #6c4146;
  font-size: 0.72rem;
  font-weight: 850;
}

.match-live-clock__remaining {
  display: block;
  margin-top: 4px;
  color: #5f5657;
  font-size: 0.7rem;
  font-weight: 750;
  line-height: 1.35;
}

.live-progress {
  height: 5px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eadcdf;
}

.live-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-dark), var(--live));
  transition: width 0.35s ease;
}

.empty-day {
  display: grid;
  min-height: 145px;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  color: var(--ink-soft);
  text-align: center;
}

.empty-day strong,
.empty-day span {
  display: block;
}

.empty-day span {
  margin-top: 5px;
  font-size: 0.84rem;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.quick-stat {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.quick-stat span,
.quick-stat strong {
  display: block;
}

.quick-stat span {
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quick-stat strong {
  overflow: hidden;
  font-size: 1.2rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 3px;
}

.legend-dot--direct { background: var(--success); }
.legend-dot--third { background: var(--warning); }

.standings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 14px;
}

.standing-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.standing-card__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
  background: var(--ink);
  color: #fff;
}

.standing-card__title h3 {
  margin: 0;
  font-size: 0.98rem;
}

.standing-card__title span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.72rem;
}

.standing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.standing-table th,
.standing-table td {
  padding: 9px 7px;
  border-bottom: 1px solid #ededf0;
  text-align: center;
}

.standing-table th {
  background: #f8f8fa;
  color: #75757d;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.standing-table tr:last-child td {
  border-bottom: 0;
}

.standing-table th:nth-child(2),
.standing-table td:nth-child(2) {
  text-align: left;
}

.standing-table tbody tr:nth-child(-n + 2) {
  box-shadow: inset 4px 0 0 var(--success);
}

.standing-table tbody tr:nth-child(3) {
  box-shadow: inset 4px 0 0 var(--warning);
}

.standing-position {
  width: 26px;
  color: var(--ink-soft);
  font-weight: 900;
}

.standing-team {
  display: flex;
  min-width: 0;
  gap: 7px;
  align-items: center;
  font-weight: 900;
}

.standing-team img,
.mini-flag {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border: 1px solid #e2e2e6;
  border-radius: 50%;
  object-fit: cover;
}

.mini-flag {
  display: grid;
  overflow: hidden;
  place-items: center;
  background: #f7f7f8;
}

.mini-flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.standing-team span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.third-place-section {
  margin-top: 20px;
}

.third-place-section:empty {
  display: none;
}

.third-place-card {
  overflow: hidden;
  border: 1px solid #e6c282;
  border-radius: var(--radius-md);
  background: #fffaf0;
}

.third-place-card h3 {
  margin: 0;
  padding: 14px 15px;
  background: #f6e3bb;
  font-size: 0.98rem;
}

.bracket-board {
  --bracket-gap: clamp(6px, 0.72vw, 11px);
  --bracket-half-gap: calc(var(--bracket-gap) / 2);
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  padding: 8px 8px 18px;
  scrollbar-gutter: stable;
  scrollbar-color: var(--line-strong) transparent;
}

.bracket-pro {
  width: 100%;
  min-width: 0;
}

.bracket-stage-row,
.bracket-canvas {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns:
    minmax(118px, 1.28fr)
    minmax(108px, 1.12fr)
    minmax(102px, 1fr)
    minmax(98px, 0.92fr)
    minmax(132px, 1.12fr)
    minmax(98px, 0.92fr)
    minmax(102px, 1fr)
    minmax(108px, 1.12fr)
    minmax(118px, 1.28fr);
  column-gap: var(--bracket-gap);
}

.bracket-stage-row {
  position: relative;
  z-index: 4;
  padding: 0 0 18px;
  background: transparent;
}

.bracket-stage {
  display: flex;
  min-width: 0;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 6px 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #11131a;
  color: #fff;
  box-shadow: 0 7px 16px rgba(12, 15, 25, 0.075);
  text-align: center;
}

.bracket-stage span {
  overflow: hidden;
  max-width: 100%;
  font-size: clamp(0.56rem, 0.58vw, 0.66rem);
  font-weight: 850;
  letter-spacing: 0.045em;
  line-height: 1.15;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.bracket-stage strong {
  display: none;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.bracket-stage--final {
  border-color: rgba(217, 8, 24, 0.45);
  background: linear-gradient(135deg, #b90010, var(--brand));
  box-shadow: 0 10px 25px rgba(217, 8, 24, 0.2);
}

.bracket-canvas {
  position: relative;
  grid-template-rows: repeat(33, 25px);
  min-height: 837px;
  padding: 14px 0 2px;
  isolation: isolate;
}

.bracket-canvas::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: -3;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(217, 8, 24, 0.16) 20%, rgba(217, 8, 24, 0.16) 80%, transparent);
  content: "";
  transform: translateX(-50%);
}

.bracket-node {
  position: relative;
  z-index: 2;
  align-self: center;
  min-width: 0;
}

.bracket-node--final {
  z-index: 5;
}

.bracket-connector {
  position: absolute;
  top: 50%;
  z-index: -1;
  display: block;
  height: 0;
  border-top: 1.5px solid #c6c9d1;
  pointer-events: none;
}

.bracket-node--left .bracket-connector--outgoing {
  right: calc(-1 * var(--bracket-half-gap));
  width: var(--bracket-half-gap);
}

.bracket-node--right .bracket-connector--outgoing {
  left: calc(-1 * var(--bracket-half-gap));
  width: var(--bracket-half-gap);
}

.bracket-node--left .bracket-connector--incoming {
  left: calc(-1 * var(--bracket-half-gap));
  width: var(--bracket-half-gap);
}

.bracket-node--right .bracket-connector--incoming {
  right: calc(-1 * var(--bracket-half-gap));
  width: var(--bracket-half-gap);
}

.bracket-connector--incoming::before {
  position: absolute;
  top: calc(var(--branch-height) / -2);
  width: 0;
  height: var(--branch-height);
  border-left: 1.5px solid #c6c9d1;
  content: "";
}

.bracket-node--left .bracket-connector--incoming::before { left: 0; }
.bracket-node--right .bracket-connector--incoming::before { right: 0; }

.bracket-node--semi .bracket-connector--outgoing {
  border-color: rgba(217, 8, 24, 0.68);
}

.bracket-node--left.bracket-node--semi .bracket-connector--outgoing {
  right: calc(-1 * var(--bracket-gap));
  width: var(--bracket-gap);
}

.bracket-node--right.bracket-node--semi .bracket-connector--outgoing {
  left: calc(-1 * var(--bracket-gap));
  width: var(--bracket-gap);
}

.bracket-match {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 6px 15px rgba(20, 20, 25, 0.06);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

button.bracket-match:hover,
button.bracket-match:focus-visible {
  border-color: rgba(217, 8, 24, 0.48);
  box-shadow: 0 10px 22px rgba(20, 20, 25, 0.1);
  outline: none;
  transform: translateY(-1px);
}

.bracket-match.is-live {
  border-color: rgba(217, 8, 24, 0.58);
  box-shadow: 0 9px 22px rgba(217, 8, 24, 0.12);
}

.bracket-match--final {
  border: 2px solid rgba(217, 8, 24, 0.62);
  box-shadow: 0 12px 30px rgba(217, 8, 24, 0.14);
}

.bracket-match--placeholder {
  border-style: dashed;
  background: rgba(249, 249, 251, 0.88);
  box-shadow: none;
  cursor: default;
}

.bracket-match__time {
  overflow: hidden;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: clamp(0.55rem, 0.52vw, 0.64rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.bracket-match.is-live .bracket-match__time,
.bracket-match--final .bracket-match__time {
  background: #fff1f2;
  color: var(--brand);
}

.bracket-team {
  display: grid;
  min-width: 0;
  min-height: 26px;
  grid-template-columns: 21px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  padding: 5px 7px;
  font-size: clamp(0.67rem, 0.61vw, 0.75rem);
  font-weight: 850;
}

.bracket-team + .bracket-team {
  border-top: 1px solid #ededf0;
}

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

.bracket-team strong {
  min-width: 14px;
  font-size: clamp(0.8rem, 0.73vw, 0.91rem);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.bracket-team.is-winner {
  background: #f1faf4;
}

.bracket-team.is-winner > span:not(.mini-flag),
.bracket-team.is-winner strong {
  color: #08743d;
  font-weight: 950;
}

.bracket-team.is-winner strong::before {
  margin-right: 3px;
  color: #0c8b4c;
  content: "✓";
  font-size: 0.64rem;
}

.bracket-team--placeholder {
  color: #93949b;
  font-weight: 760;
}

.mini-flag--empty {
  display: inline-grid;
  place-items: center;
  border: 1px dashed #c8cad0;
  border-radius: 50%;
  background: #f0f1f4;
  color: #9a9ca4;
  font-size: 0.65rem;
  font-weight: 900;
}

.bracket-champion {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  display: grid;
  width: min(188px, 94%);
  grid-template-columns: 35px minmax(0, 1fr);
  gap: 2px 9px;
  align-items: center;
  margin: 0;
  padding: 10px 11px;
  border: 1px solid #e5bc5f;
  transform: translateX(-50%);
  border-radius: 11px;
  background: linear-gradient(135deg, #fff9df, #fff2b8);
  box-shadow: 0 10px 24px rgba(139, 98, 11, 0.14);
}

.bracket-champion > span {
  grid-column: 1 / -1;
  color: #7d5a0b;
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.11em;
  text-align: center;
}

.bracket-champion__flag {
  width: 35px;
  height: 35px;
}

.bracket-champion strong {
  overflow: hidden;
  color: #2b220b;
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bracket-consolation {
  display: grid;
  max-width: 590px;
  grid-template-columns: minmax(150px, 0.55fr) minmax(240px, 1fr);
  gap: 14px;
  align-items: center;
  margin: 24px auto 0;
  padding: 13px;
  border: 1px solid #e5c279;
  border-radius: 13px;
  background: linear-gradient(135deg, #fffdf5, #fff8e5);
}

.bracket-consolation__title span,
.bracket-consolation__title strong {
  display: block;
}

.bracket-consolation__title span {
  color: #906b17;
  font-size: 0.64rem;
  font-weight: 950;
  letter-spacing: 0.09em;
}

.bracket-consolation__title strong {
  margin-top: 3px;
  font-size: 0.95rem;
}

.bracket-consolation__match .bracket-match {
  box-shadow: none;
}

.bracket-consolation--empty {
  grid-template-columns: minmax(150px, 0.55fr) minmax(240px, 1fr);
  color: var(--ink-soft);
}

.bracket-consolation--empty > .bracket-consolation__title span,
.bracket-consolation--empty > .bracket-consolation__title strong {
  display: block;
}

@media (max-width: 1180px) {
  .bracket-pro {
    width: 1120px;
    min-width: 1120px;
  }

  .bracket-stage-row,
  .bracket-canvas {
    grid-template-columns:
      132px 120px 112px 106px 142px 106px 112px 120px 132px;
  }

  .bracket-stage span { font-size: 0.62rem; }
  .bracket-match__time { font-size: 0.61rem; }
  .bracket-team { font-size: 0.72rem; }
  .bracket-team strong { font-size: 0.88rem; }
}

@media (max-width: 620px) {
  .bracket-board {
    margin-inline: -9px;
    padding-inline: 9px;
  }

  .bracket-consolation {
    width: 100%;
    grid-template-columns: 1fr;
  }
}

.statistics-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(360px, 1.2fr);
  gap: 16px;
}

.stats-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.stats-panel h3 {
  margin: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  font-size: 1rem;
}

.stats-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stats-list div {
  padding: 17px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stats-list div:nth-child(2n) {
  border-right: 0;
}

.stats-list span,
.stats-list strong {
  display: block;
}

.stats-list span {
  margin-bottom: 6px;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stats-list strong {
  font-size: 1.55rem;
}

.scorer-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.scorer-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 15px;
  border-bottom: 1px solid var(--line);
}

.scorer-row:last-child {
  border-bottom: 0;
}

.scorer-row__rank {
  color: var(--ink-soft);
  font-weight: 900;
}

.scorer-row strong,
.scorer-row span {
  display: block;
}

.scorer-row__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scorer-row__team {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 0.72rem;
}


.scorer-row__team {
  display: flex !important;
  min-width: 0;
  gap: 7px;
  align-items: center;
}

.scorer-row__team > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scorer-flag {
  position: relative;
  display: grid !important;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #dedee3;
  border-radius: 50%;
  background: #f5f5f7;
}

.scorer-flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scorer-flag .team-flag__fallback,
.scorer-flag--empty {
  color: #777780;
  font-size: 0.58rem;
  font-weight: 950;
}

.scorer-row__goals {
  min-width: 40px;
  padding: 6px 9px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  text-align: center;
  font-size: 1rem;
  font-weight: 950;
}

.error-panel {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding: 15px 17px;
  border: 1px solid #edb3ba;
  border-radius: var(--radius-md);
  background: #fff0f2;
  color: #7d111d;
}

.error-panel p {
  margin: 4px 0 0;
  color: #96505a;
  font-size: 0.84rem;
}

.footer {
  display: flex;
  width: min(calc(100% - 32px), var(--max-width));
  gap: 12px 28px;
  flex-wrap: wrap;
  justify-content: space-between;
  margin: 0 auto 30px;
  color: #74747c;
  font-size: 0.76rem;
}

.match-dialog {
  width: min(680px, calc(100% - 28px));
  max-height: min(88vh, 860px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.36);
}

.match-dialog::backdrop {
  background: rgba(12, 12, 16, 0.68);
  backdrop-filter: blur(4px);
}

.dialog-close {
  position: absolute;
  z-index: 4;
  top: 10px;
  right: 10px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 1.5rem;
}

.dialog-hero {
  padding: 24px 22px 20px;
  background: linear-gradient(125deg, #1a1a20, #33333c);
  color: #fff;
}

.dialog-hero__meta {
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
}

.dialog-scoreboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.dialog-team {
  min-width: 0;
  text-align: center;
}

.dialog-team .team-flag {
  width: 66px;
  height: 66px;
  margin: 0 auto 10px;
}

.dialog-team strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dialog-score {
  min-width: 100px;
  font-size: 2.6rem;
  font-weight: 950;
  text-align: center;
  letter-spacing: -0.06em;
}

.dialog-score small {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}


.dialog-live-clock {
  margin-top: 18px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 11px;
  background: rgba(217, 8, 24, 0.2);
}

.dialog-live-clock > div:first-child {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.dialog-live-clock strong,
.dialog-live-clock span,
.dialog-live-clock b {
  display: block;
}

.dialog-live-clock strong {
  font-size: 0.94rem;
}

.dialog-live-clock span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.78rem;
  font-weight: 800;
}

.dialog-live-clock b {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.78rem;
}

.dialog-live-clock .live-progress {
  background: rgba(255, 255, 255, 0.2);
}

.dialog-live-clock .live-progress span {
  background: #fff;
}

.dialog-body {
  padding: 20px 22px 24px;
}

.dialog-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 20px;
}

.dialog-info {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
}

.dialog-info span,
.dialog-info strong {
  display: block;
}

.dialog-info span {
  margin-bottom: 4px;
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.goal-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.goal-list li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.goal-list li:last-child {
  border-bottom: 0;
}

.goal-minute {
  color: var(--brand);
  font-weight: 950;
}

.goal-score {
  color: var(--ink-soft);
  font-weight: 900;
}

.loading-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #e9e9ed;
}

.skeleton::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.68), transparent);
  content: "";
  transform: translateX(-100%);
  animation: shimmer 1.25s infinite;
}

.skeleton--card { min-height: 176px; }
.skeleton--table { min-height: 260px; }
.skeleton--bracket { min-width: 1080px; min-height: 520px; }

@keyframes shimmer {
  to { transform: translateX(100%); }
}


/* FIFA-Weltrangliste */
.ranking-explainer {
  margin-top: 7px;
}

.ranking-meta {
  display: flex;
  max-width: 560px;
  gap: 8px 14px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.ranking-meta strong {
  color: var(--ink);
}

.ranking-source {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ranking-source.is-official {
  background: #e9f8ef;
  color: #167243;
}

.ranking-source.is-fallback {
  background: #fff3d8;
  color: #8a5b00;
}

.ranking-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.ranking-search {
  display: flex;
  min-width: min(360px, 100%);
  min-height: 43px;
  gap: 9px;
  align-items: center;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  color: var(--ink-soft);
}

.ranking-search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(217, 8, 24, 0.08);
}

.ranking-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.ranking-filters {
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.ranking-filter {
  min-height: 35px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 850;
}

.ranking-filter:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.ranking-filter.is-active {
  background: var(--ink);
  color: #fff;
}

.world-ranking-content {
  display: grid;
  gap: 16px;
}

.swiss-ranking-spotlight {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  overflow: hidden;
  padding: 20px 22px;
  border: 1px solid rgba(217, 8, 24, 0.22);
  border-radius: 15px;
  background:
    radial-gradient(circle at 92% 20%, rgba(255, 255, 255, 0.22), transparent 26%),
    linear-gradient(120deg, #d90818, #9f0010);
  color: #fff;
  box-shadow: 0 14px 30px rgba(159, 0, 16, 0.18);
}

.swiss-ranking-spotlight::after {
  position: absolute;
  right: 78px;
  width: 85px;
  height: 85px;
  border: 16px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  content: "";
}

.swiss-ranking-spotlight > * {
  position: relative;
  z-index: 1;
}

.ranking-card-label {
  display: block;
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.15em;
}

.swiss-ranking-spotlight strong,
.swiss-ranking-spotlight small {
  display: block;
}

.swiss-ranking-spotlight strong {
  margin-bottom: 4px;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
}

.swiss-ranking-spotlight small {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 700;
}

.swiss-ranking-spotlight__rank {
  min-width: 72px;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 950;
  line-height: 1;
  text-align: right;
}

.ranking-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.ranking-podium-card {
  position: relative;
  display: flex;
  min-height: 150px;
  gap: 7px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 18px 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-align: center;
  box-shadow: 0 8px 20px rgba(20, 20, 25, 0.06);
}

.ranking-podium-card--winner {
  min-height: 176px;
  border-color: #e0b54d;
  background: linear-gradient(180deg, #fff9e7, #fff);
}

.ranking-podium-card__position {
  position: absolute;
  top: 9px;
  left: 11px;
  color: var(--ink-soft);
  font-size: 1.35rem;
  font-weight: 950;
}

.ranking-podium-card--winner .ranking-podium-card__position {
  color: #a77800;
}

.ranking-podium-card strong {
  font-size: 0.95rem;
}

.ranking-podium-card small {
  color: var(--ink-soft);
  font-weight: 750;
}

.ranking-flag {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  overflow: hidden;
  place-items: center;
  border: 1px solid #e1e1e5;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 12px rgba(20, 20, 25, 0.08);
}

.ranking-flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-flag--large {
  width: 64px;
  height: 64px;
  border: 3px solid rgba(255, 255, 255, 0.7);
}

.ranking-flag--podium {
  width: 54px;
  height: 54px;
}

.ranking-table-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.ranking-table-card__header {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.ranking-table-card__header strong,
.ranking-table-card__header span {
  display: block;
}

.ranking-table-card__header > div span,
.ranking-table-card__header > span {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.ranking-table-card__header > span {
  max-width: 360px;
  text-align: right;
}

.ranking-table-scroll {
  overflow-x: auto;
}

.world-ranking-table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
}

.world-ranking-table th,
.world-ranking-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.world-ranking-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8f8fa;
  color: #75757d;
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.world-ranking-table th:nth-child(1),
.world-ranking-table td:nth-child(1),
.world-ranking-table th:nth-child(4),
.world-ranking-table td:nth-child(4),
.world-ranking-table th:nth-child(5),
.world-ranking-table td:nth-child(5) {
  text-align: center;
}

.world-ranking-table tbody tr:last-child td {
  border-bottom: 0;
}

.world-ranking-table tbody tr:hover {
  background: #fffafb;
}

.world-ranking-table tbody tr.is-switzerland {
  background: #fff0f2;
  box-shadow: inset 4px 0 0 var(--brand);
}

.ranking-position {
  width: 70px;
  color: var(--ink-soft);
  font-size: 1.05rem;
  font-weight: 950;
}

.ranking-team-cell {
  display: flex;
  min-width: 220px;
  gap: 11px;
  align-items: center;
}

.ranking-team-cell strong,
.ranking-team-cell span {
  display: block;
}

.ranking-team-cell span {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 800;
}

.ranking-confederation {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 850;
}

.ranking-movement {
  display: inline-flex;
  min-width: 48px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 950;
}

.ranking-movement.is-up {
  background: #e8f7ee;
  color: #137243;
}

.ranking-movement.is-down {
  background: #fff0f2;
  color: #bd1023;
}

.ranking-movement.is-steady {
  background: #f0f0f3;
  color: #777780;
}

.ranking-points {
  min-width: 110px;
  font-variant-numeric: tabular-nums;
  font-weight: 950;
}

.ranking-empty {
  padding: 34px 16px;
  color: var(--ink-soft);
  text-align: center;
}


@media (max-width: 900px) {
  .headline-panel,
  .section-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .headline-panel__live {
    min-width: 0;
  }

  .section-toolbar {
    gap: 14px;
  }

  .date-controls {
    width: 100%;
  }

  .date-picker {
    flex: 1;
  }

  .date-picker input {
    width: 100%;
  }

  .quick-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .statistics-layout {
    grid-template-columns: 1fr;
  }

  .ranking-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .ranking-search {
    min-width: 0;
  }

  .ranking-filters {
    overflow-x: auto;
  }
}

@media (max-width: 620px) {
  .topbar__inner {
    min-height: 64px;
    padding: 0 14px;
  }

  .topbar__status > span:not(.connection-dot) {
    display: none;
  }

  .brand__ball {
    width: 38px;
    height: 38px;
  }

  .app-shell,
  .footer {
    width: min(calc(100% - 18px), var(--max-width));
  }

  .app-shell {
    margin-top: 12px;
  }

  .headline-panel,
  .view {
    padding: 17px;
    border-radius: 13px;
  }

  .headline-panel__subline {
    font-size: 0.9rem;
  }

  .main-tabs {
    margin: 10px 0;
  }

  .main-tab {
    padding: 10px 14px;
  }

  .date-controls {
    display: grid;
    grid-template-columns: 42px 1fr 42px;
  }

  .date-picker {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .date-ribbon {
    grid-template-columns: 1fr;
  }

  .match-grid,
  .loading-grid,
  .standings-grid {
    grid-template-columns: 1fr;
  }

  .quick-stats {
    grid-template-columns: 1fr 1fr;
  }

  .quick-stat strong {
    font-size: 1.02rem;
  }

  .standing-table {
    font-size: 0.75rem;
  }

  .ranking-meta {
    justify-content: flex-start;
  }

  .ranking-podium {
    grid-template-columns: 1fr;
  }

  .ranking-podium-card,
  .ranking-podium-card--winner {
    min-height: 128px;
  }

  .swiss-ranking-spotlight {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 18px;
  }

  .swiss-ranking-spotlight__rank {
    grid-column: 1 / -1;
    font-size: 2.2rem;
    text-align: left;
  }

  .ranking-table-card__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .ranking-table-card__header > span {
    text-align: left;
  }

  .standing-table th,
  .standing-table td {
    padding: 8px 4px;
  }


  .match-live-clock__headline,
  .dialog-live-clock > div:first-child {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .footer {
    flex-direction: column;
  }

  .dialog-scoreboard {
    grid-template-columns: 1fr;
  }

  .dialog-score {
    order: -1;
  }

  .dialog-info-grid {
    grid-template-columns: 1fr;
  }
}
