:root {
  --bg: #081223;
  --bg-alt: #0d1b33;
  --panel: rgba(11, 27, 53, 0.78);
  --panel-strong: rgba(8, 18, 35, 0.92);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(96, 165, 250, 0.24);
  --text: #f8fbff;
  --muted: #9db1cd;
  --accent: #2f6df6;
  --accent-soft: rgba(47, 109, 246, 0.18);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 24px 60px rgba(1, 8, 20, 0.45);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  color: var(--text);
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(47, 109, 246, 0.28), transparent 24%),
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.12), transparent 18%),
    linear-gradient(180deg, #07111f 0%, #0c1830 100%);
}

button,
select {
  font: inherit;
}

.app-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 24px auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background: rgba(8, 18, 35, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 16px;
  z-index: 10;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: transparent; /* 배경 제거하여 로고 자체 디자인 강조 */
  overflow: hidden;
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 이미지가 꽉 차도록 변경 */
}

.brand-block h1,
.brand-block p {
  margin: 0;
}

.brand-expansion {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand-accent {
  color: #7fb0ff;
  font-weight: 800;
}

.brand-accent-as {
  color: #7fb0ff;
}

.eyebrow,
.section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: #7fb0ff;
}

.mini-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: #7fb0ff;
  white-space: nowrap;
  flex-shrink: 0;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Global Search Bar */
.search-bar {
  position: relative;
  flex: 1;
  max-width: 320px;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
}

#global-search {
  width: 100%;
  padding: 12px 18px 12px 42px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.95rem;
  transition: all 220ms ease;
  outline: none;
}

#global-search:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 109, 246, 0.25);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  right: 0;
  background: var(--panel-strong);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  max-height: 400px;
  overflow-y: auto;
  z-index: 100;
  padding: 8px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 180ms ease;
  color: var(--text);
  text-decoration: none;
}

.search-result-item:hover,
.search-result-item.is-active {
  background: rgba(255, 255, 255, 0.08);
}

.search-result-item.is-active {
  border-left: 3px solid var(--accent);
  padding-left: 11px; /* border-left 두께만큼 보정 */
}

.search-result-item .category {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.search-result-item .name {
  font-size: 0.95rem;
  font-weight: 500;
}

.search-no-results {
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Tournament Awards Styles */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.award-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 200ms ease, background 200ms ease;
}

.award-card:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.award-card .award-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.award-card .award-team {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}

.award-card .award-team strong {
  font-size: 1.1rem;
  color: var(--text);
}

.award-card .award-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.award-card.winner {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(245, 158, 11, 0.02));
}

.award-card.winner .award-title {
  color: #f59e0b;
}

.award-card.runner-up {
  border-color: rgba(157, 177, 205, 0.4);
  background: linear-gradient(135deg, rgba(157, 177, 205, 0.08), rgba(157, 177, 205, 0.02));
}

.award-card.runner-up .award-title {
  color: #9db1cd;
}

.nav-link {
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  padding: 12px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: 180ms ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--text);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.nav-link.is-active {
  color: #fff;
  background: linear-gradient(135deg, rgba(47, 109, 246, 0.9), rgba(23, 59, 132, 0.95));
  box-shadow: 0 16px 30px rgba(19, 61, 149, 0.35);
}

.page-frame {
  margin-top: 24px;
  min-width: 0;
}

.view-panel {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: none;
  min-width: 0;
}

.view-panel.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.dashboard-grid,
.section-grid,
.tournament-layout,
.team-layout,
.stats-grid,
.fixture-grid {
  display: grid;
  gap: 20px;
}

.dashboard-grid {
  grid-template-columns: 1.65fr 1fr;
}

.section-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
}

.card,
.hero-card,
.sidebar-card,
.table-card,
.notice-card,
.stat-card,
.fixture-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  min-width: 0;
}

.hero-card {
  padding: 32px;
  position: relative;
  overflow: hidden;
  min-height: 320px;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -60px -80px auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.35) 0%, transparent 70%);
}

.hero-card h2 {
  margin: 10px 0 14px;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.06;
  max-width: 12ch;
}

.brand-heading {
  max-width: 14ch;
}


.hero-card p {
  margin: 0;
  color: var(--muted);
  max-width: 60ch;
  line-height: 1.7;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.meta-chip {
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #dfeaff;
  border: 1px solid var(--line);
}

.sidebar-card,
.table-card,
.notice-card {
  padding: 24px;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 18px;
}

.section-title-row h3,
.section-title-row h2,
.card-title {
  margin: 6px 0 0;
}

.notice-list,
.tournament-list,
.team-list,
.match-list {
  display: grid;
  gap: 14px;
}

.notice-item,
.tournament-item,
.team-item,
.match-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.notice-item {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.notice-item h4,
.tournament-item h4,
.team-item h4,
.match-item h4,
.standings-table td,
.standings-table th,
.matches-table td,
.matches-table th {
  margin: 0;
  color: var(--text);
}

.notice-item p,
.tournament-item p,
.team-item p,
.match-item p,
.subtext,
.table-caption {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(47, 109, 246, 0.14);
  border: 1px solid rgba(96, 165, 250, 0.25);
  color: #bdd6ff;
  font-size: 0.84rem;
  white-space: nowrap;
}

.kpi-value {
  font-size: 2rem;
  font-weight: 800;
  margin-top: 10px;
}

.tournament-layout {
  grid-template-columns: 340px minmax(0, 1fr);
  min-width: 0;
}

.team-layout {
  grid-template-columns: 320px minmax(0, 1fr);
  min-width: 0;
}

.tournament-layout > *,
.team-layout > *,
.section-grid > * {
  min-width: 0;
}

.tournament-item,
.team-item {
  appearance: none;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: 180ms ease;
}

.tournament-item:hover,
.team-item:hover,
.tournament-item.is-selected,
.team-item.is-selected {
  border-color: var(--line-strong);
  background: rgba(47, 109, 246, 0.12);
  transform: translateY(-2px);
}

.team-badge {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.team-row,
.headline-row,
.select-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.select-row {
  margin-top: 18px;
}

.select-control {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #12294f;
  color: var(--text);
  padding: 14px 16px;
  outline: none;
}

.combobox-display {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.combobox-display:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(47, 109, 246, 0.4);
}

.combobox-display .team-code-badge {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.select-control option {
  background: #12294f;
  color: #f8fbff;
}

/* Searchable Dropdown Styles */
.combobox-container {
  position: relative;
  width: 100%;
}

.combobox-options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  background: #0d1b33;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: var(--shadow);
  z-index: 100;
  list-style: none;
  padding: 6px;
  margin: 0;
}

.combobox-options[hidden] {
  display: none;
}

.combobox-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--muted);
  transition: 160ms ease;
  font-size: 0.95rem;
}

.combobox-option .team-code-badge {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* News Modal Styles */
.news-overlay {
  position: fixed;
  inset: 0;
  background: rgba(1, 8, 20, 0.85);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}

.news-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.news-content-card {
  width: min(800px, 100%);
  max-height: 85vh;
  background: var(--panel-strong);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 300ms ease;
}

.news-overlay.is-active .news-content-card {
  transform: translateY(0);
}

.news-header {
  padding: 24px 32px;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.news-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 200ms ease;
}

.news-close-btn:hover {
  background: var(--danger);
  color: white;
  border-color: transparent;
}

.news-body {
  padding: 32px;
  overflow-y: auto;
  line-height: 1.8;
  color: #e0e6ed;
  font-size: 1.05rem;
}

.news-meta-info {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.85rem;
}

.news-footer {
  padding: 16px 32px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--line);
  text-align: right;
}
.combobox-option.is-selected .team-code-badge {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.combobox-option:hover {
  background: var(--accent-soft);
  color: var(--text);
}

.combobox-option.is-selected {
  background: var(--accent);
  color: #fff;
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

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

.action-button {
  border: 1px solid rgba(96, 165, 250, 0.24);
  background: linear-gradient(135deg, rgba(47, 109, 246, 0.9), rgba(23, 59, 132, 0.95));
  color: #f8fbff;
  padding: 11px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  transition: 180ms ease;
}

.action-button:hover,
.action-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(19, 61, 149, 0.28);
}

.action-button-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.flag-card {
  display: grid;
  gap: 14px;
}

.flag-preview {
  position: relative;
  width: min(100%, 520px);
  aspect-ratio: 3 / 2;
  background: #ffffff;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.flag-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.flag-scania {
  background: #010101;
}

.flag-cross-horizontal,
.flag-cross-vertical,
.flag-eye {
  position: absolute;
  background: #ededed;
}

.flag-cross-horizontal {
  left: 0;
  top: 50%;
  width: 100%;
  height: 18%;
  transform: translateY(-50%);
}

.flag-cross-vertical {
  top: 0;
  left: 50%;
  width: 9%;
  height: 100%;
  transform: translateX(-50%);
}

.flag-eye {
  bottom: 16%;
  width: 11%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: transparent;
  border: 8px solid #ededed;
  border-top-color: transparent;
}

.flag-eye::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 38%;
  width: 16%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ededed;
  transform: translate(-50%, -50%);
}

.flag-eye-left {
  left: 64%;
}

.flag-eye-right {
  left: 80%;
}

.flag-turistan {
  background: #41963e;
}

.flag-turistan-band {
  position: absolute;
  left: 0;
  width: 100%;
}

.flag-turistan-top {
  top: 0;
  height: 33.333%;
  background: #41963e;
}

.flag-turistan-middle {
  top: 33.333%;
  height: 33.333%;
  background: #efefef;
}

.flag-turistan-bottom {
  bottom: 0;
  height: 33.334%;
  background: #41963e;
}

.flag-turistan-star {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 92%,
    50% 71%,
    21% 92%,
    32% 57%,
    2% 35%,
    39% 35%
  );
}

.flag-turistan-star-outer {
  width: 18%;
  aspect-ratio: 1;
  background: #41963e;
}

.flag-turistan-star-inner {
  width: 12%;
  aspect-ratio: 1;
  background: #efefef;
}

.flag-turistan-star-core {
  width: 7%;
  aspect-ratio: 1;
  background: #41963e;
}

.flag-sutino {
  background: #d00000;
}

.flag-sutino-band {
  position: absolute;
  left: 0;
  width: 100%;
}

.flag-sutino-top {
  top: 0;
  height: 33.333%;
  background: #efb800;
}

.flag-sutino-middle {
  top: 33.333%;
  height: 33.333%;
  background: #06256b;
}

.flag-sutino-bottom {
  bottom: 0;
  height: 33.334%;
  background: #d10000;
}

.flag-sutino-medallion {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 31%;
  aspect-ratio: 0.84;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #efefef;
  border: 6px solid #101010;
  overflow: hidden;
  z-index: 1;
}

.flag-sutino-head,
.flag-sutino-face,
.flag-sutino-neck,
.flag-sutino-body {
  position: absolute;
  background: #050505;
}

.flag-sutino-head {
  width: 56%;
  height: 42%;
  left: 18%;
  top: 10%;
  border-radius: 50% 46% 42% 40%;
  transform: rotate(-8deg);
}

.flag-sutino-face {
  width: 34%;
  height: 28%;
  left: 16%;
  top: 30%;
  clip-path: polygon(15% 0%, 100% 6%, 92% 55%, 62% 100%, 18% 88%, 0% 34%);
}

.flag-sutino-neck {
  width: 14%;
  height: 12%;
  left: 40%;
  top: 56%;
  transform: skew(-10deg);
}

.flag-sutino-body {
  width: 66%;
  height: 36%;
  right: -4%;
  bottom: 0;
  clip-path: polygon(14% 0%, 44% 16%, 100% 48%, 100% 100%, 0% 100%, 0% 44%);
}

.flag-hanceania {
  background: #20a6d8;
}

.flag-hanceania-sky {
  position: absolute;
  inset: 0 0 auto 0;
  height: 58%;
  background: #20a6d8;
}

.flag-hanceania-band {
  position: absolute;
  left: 0;
  width: 100%;
}

.flag-hanceania-band-white-top {
  top: 39%;
  height: 9%;
  background: #ededed;
}

.flag-hanceania-band-blue-top {
  top: 48%;
  height: 9%;
  background: #082a76;
}

.flag-hanceania-band-white-bottom {
  top: 57%;
  height: 9%;
  background: #ededed;
}

.flag-hanceania-band-blue-bottom {
  top: 66%;
  height: 34%;
  background: #082a76;
}

.flag-hanceania-emblem {
  position: absolute;
  left: 50%;
  top: 57%;
  width: 38%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #082a76;
  z-index: 1;
}

.flag-hanceania-heart,
.flag-hanceania-triangle,
.flag-hanceania-crossbar {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.flag-hanceania-heart {
  width: 22%;
  height: 18%;
  border: 8px solid #f4f4f4;
  border-bottom: none;
  border-radius: 999px 999px 0 0;
  top: 20%;
  background: transparent;
}

.flag-hanceania-heart.left {
  transform: translateX(-92%) rotate(-45deg);
}

.flag-hanceania-heart.right {
  transform: translateX(-8%) rotate(45deg);
}

.flag-hanceania-triangle {
  width: 0;
  height: 0;
  background: transparent;
}

.flag-hanceania-triangle.top {
  top: 38%;
  border-left: 56px solid transparent;
  border-right: 56px solid transparent;
  border-bottom: 82px solid #f4f4f4;
}

.flag-hanceania-triangle.bottom {
  top: 53%;
  border-left: 30px solid transparent;
  border-right: 30px solid transparent;
  border-top: 52px solid #f4f4f4;
}

.flag-hanceania-crossbar {
  top: 56%;
  width: 38%;
  height: 8px;
  background: #f4f4f4;
}

.profile-item,
.nation-block {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
}

.profile-item {
  padding: 18px;
}

.profile-item strong {
  display: block;
  margin-top: 8px;
  line-height: 1.5;
}

.nation-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.nation-block {
  padding: 20px;
}

.nation-block h4 {
  margin: 14px 0 0;
}

.bullet-list {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.bullet-list li + li {
  margin-top: 10px;
}

.stat-card {
  padding: 22px;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.9rem;
}

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
}

.elo-overview-card {
  margin-top: 20px;
}

.elo-trend-card {
  margin-top: 20px;
}

.elo-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 16px;
}

.elo-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #dfeaff;
  font-size: 0.88rem;
  font-weight: 600;
}

.elo-legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.power-toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.power-toggle-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 10px 14px;
  border: 1px solid rgba(96, 165, 250, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: #dfeaff;
  cursor: pointer;
  transition: 180ms ease;
}

.power-toggle-button:hover,
.power-toggle-button:focus-visible {
  border-color: rgba(127, 176, 255, 0.36);
  transform: translateY(-1px);
}

.power-toggle-button-on {
  background: rgba(47, 109, 246, 0.18);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(127, 176, 255, 0.12);
}

.power-toggle-button-off {
  opacity: 0.55;
}

.elo-chart-shell {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid rgba(96, 165, 250, 0.12);
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.08), transparent 22%),
    linear-gradient(180deg, rgba(7, 17, 31, 0.72), rgba(10, 27, 55, 0.84));
}

.elo-chart {
  display: block;
  width: 100%;
  min-width: 960px;
  height: auto;
}

.elo-grid-line {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}

.elo-axis-line {
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 1.5;
}

.elo-axis-label {
  fill: #9db1cd;
  font-size: 12px;
  font-weight: 700;
}

.elo-axis-label-x {
  fill: #7fb0ff;
}

.elo-series-line {
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.elo-point {
  stroke: rgba(7, 17, 31, 0.95);
  stroke-width: 2;
}

.power-view-stack {
  gap: 20px;
}

.power-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.phase-sequence {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.phase-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(47, 109, 246, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.18);
  color: #dfeaff;
  font-size: 0.84rem;
  font-weight: 700;
}

.elo-chart-wide {
  min-width: 1160px;
}

.elo-phase-separator {
  stroke: rgba(127, 176, 255, 0.28);
  stroke-width: 1.5;
  stroke-dasharray: 4 6;
}

.elo-phase-label {
  fill: #d7e6ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  text-align: left;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9cbaff;
  border-bottom: 1px solid var(--line);
  padding: 14px 12px;
}

tbody td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.rank-cell {
  font-weight: 700;
  width: 50px;
}

.standings-table th,
.standings-table td {
  padding: 12px 8px;
  text-align: center;
}

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

.standings-table td:nth-child(n+3),
.standings-table th:nth-child(n+3) {
  width: 45px;
  font-variant-numeric: tabular-nums;
}

.standings-table td:last-child,
.standings-table th:last-child {
  width: 60px;
  font-weight: 800;
  color: #7fb0ff;
}

.gd-cell {
  font-weight: 700;
  color: var(--muted);
}

.team-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.team-code-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 26px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.team-name {
  font-weight: 600;
}

.elo-change-positive {
  color: #7ff0a6;
  font-weight: 700;
}

.elo-change-negative {
  color: #ff9c9c;
  font-weight: 700;
}

.elo-change-neutral {
  color: var(--muted);
  font-weight: 700;
}

.provisional-label {
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
  opacity: 0.8;
}

.fixture-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 20px;
}

.fixture-group + .fixture-group {
  margin-top: 28px;
}

.fixture-card {
  padding: 20px;
}

.bracket-card {
  margin-top: 28px;
}

.bracket-board {
  overflow-x: hidden;
  max-width: 100%;
  padding: 14px;
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.16), transparent 26%),
    linear-gradient(180deg, rgba(7, 17, 31, 0.95), rgba(10, 27, 55, 0.98));
  border: 1px solid rgba(96, 165, 250, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.vertical-ladder {
  width: min(100%, 760px);
  margin: 0 auto;
}

.compact-step-ladder {
  width: min(100%, 560px);
  margin: 0 auto;
}

.compact-step-ladder-svg {
  display: block;
  width: 100%;
  height: auto;
}

.compact-line {
  stroke: rgba(244, 248, 255, 0.94);
  stroke-width: 3.25;
  fill: none;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.compact-seed-rank,
.compact-seed-name,
.compact-scoreline,
.compact-score-note {
  fill: #f8fbff;
}

.compact-seed-rank {
  font-size: 0.8rem;
  font-weight: 800;
}

.compact-seed-name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.compact-scoreline {
  font-size: 0.9rem;
  font-weight: 800;
}

.compact-score-note {
  fill: #9db1cd;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.compact-champion-panel {
  position: relative;
  left: auto;
  top: auto;
  width: min(100%, 560px);
  min-height: 0;
  margin: 18px auto 0;
  padding: 20px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  background:
    radial-gradient(circle at top left, rgba(243, 199, 66, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(18, 34, 63, 0.96), rgba(10, 21, 40, 0.98));
}

.compact-champion-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.compact-champion-copy p {
  margin: 2px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.compact-champion-meta {
  min-width: 0;
  display: grid;
  justify-items: end;
  gap: 6px;
  text-align: right;
}

.compact-champion-kicker {
  color: #9cbaff;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.compact-champion-score {
  font-size: 1.4rem;
  font-weight: 800;
  color: #f8fbff;
}

.compact-champion-note {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #d9e2f2;
  font-size: 0.76rem;
  font-weight: 700;
}

.vertical-ladder-section {
  position: relative;
}

.vertical-stage-head h4 {
  margin: 6px 0 0;
}

.vertical-seed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.vertical-seed-card {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: linear-gradient(180deg, rgba(44, 51, 67, 0.92), rgba(31, 37, 50, 0.94));
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  padding: 16px 18px;
  display: grid;
  gap: 6px;
}

.vertical-seed-card span:last-child {
  color: var(--muted);
}

.vertical-seed-card-eliminated {
  border-color: rgba(239, 68, 68, 0.22);
  background: linear-gradient(180deg, rgba(67, 35, 42, 0.92), rgba(40, 24, 30, 0.94));
}

.vertical-ladder-link {
  position: relative;
  width: 2px;
  height: 36px;
  margin: 8px auto;
  background: linear-gradient(180deg, rgba(167, 193, 255, 0.18), rgba(167, 193, 255, 0.85));
  box-shadow: 0 0 10px rgba(148, 197, 255, 0.16);
}

.vertical-ladder-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(167, 193, 255, 0.85);
  border-bottom: 2px solid rgba(167, 193, 255, 0.85);
  transform: translateX(-50%) rotate(45deg);
}

.vertical-stage-entry-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
}

.vertical-entry-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #d6e6ff;
  font-size: 0.84rem;
}

.vertical-entry-chip-muted {
  color: #ffb4b4;
  border-color: rgba(239, 68, 68, 0.18);
  background: rgba(239, 68, 68, 0.08);
}

.vertical-ladder .ladder-match {
  position: relative;
  left: auto;
  top: auto;
  width: 100%;
  min-height: 0;
  max-width: none;
}

.ladder-match-vertical {
  margin-top: 0;
}

.ladder-rung {
  margin-top: 4px;
}

.ladder-stage-shell {
  margin-top: 14px;
}

.ladder-source-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 34px;
}

.ladder-source-row::before {
  content: "";
  position: absolute;
  left: 25%;
  right: 25%;
  bottom: 16px;
  height: 2px;
  background: rgba(167, 193, 255, 0.88);
  box-shadow: 0 0 8px rgba(148, 197, 255, 0.15);
}

.ladder-source-row::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 2px;
  height: 28px;
  transform: translateX(-50%);
  background: rgba(167, 193, 255, 0.88);
  box-shadow: 0 0 8px rgba(148, 197, 255, 0.15);
}

.ladder-source-node {
  position: relative;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(25, 37, 63, 0.88), rgba(15, 26, 47, 0.94));
  padding: 12px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.ladder-source-node::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -18px;
  width: 2px;
  height: 18px;
  transform: translateX(-50%);
  background: rgba(167, 193, 255, 0.88);
  box-shadow: 0 0 8px rgba(148, 197, 255, 0.15);
}

.ladder-source-node.is-muted {
  border-color: rgba(239, 68, 68, 0.18);
  background: linear-gradient(180deg, rgba(67, 35, 42, 0.9), rgba(40, 24, 30, 0.94));
}

.ladder-source-label {
  display: block;
  color: #9cbaff;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ladder-source-team {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ladder-source-code {
  min-width: 42px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  padding: 0 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fbff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.ladder-source-team strong {
  font-size: 1rem;
}

.ladder-rung-match {
  width: min(100%, 620px);
  margin: 0 auto;
  min-width: 0;
}

.ladder-rung-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
}

.ladder-rung-progress {
  width: 2px;
  height: 24px;
  background: rgba(167, 193, 255, 0.88);
  box-shadow: 0 0 8px rgba(148, 197, 255, 0.15);
}

.ladder-rung-note {
  margin: 12px 4px 0;
  color: #ffb4b4;
  font-size: 0.92rem;
  text-align: center;
}

.vertical-ladder .champion-panel {
  position: relative;
  left: auto;
  top: auto;
  width: min(100%, 620px);
  margin: 0 auto;
  min-height: 0;
}

.champion-panel-vertical {
  margin-top: 14px;
  padding: 20px 18px;
  gap: 8px;
}

.champion-panel-vertical p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.advance-node {
  margin: 14px auto 0;
  width: min(100%, 320px);
  min-width: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(96, 165, 250, 0.24);
  background: linear-gradient(180deg, rgba(27, 48, 89, 0.94), rgba(15, 31, 58, 0.98));
  box-shadow: 0 12px 24px rgba(6, 14, 28, 0.28);
  text-align: center;
}

.advance-node-label {
  display: block;
  color: #9cbaff;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.advance-node-team {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.advance-node-code {
  min-width: 44px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  padding: 0 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fbff;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.advance-node-team strong {
  font-size: 1rem;
  color: #f8fbff;
}

.vertical-ladder-link {
  width: 2px;
  height: 26px;
  margin: 10px auto;
  background: rgba(167, 193, 255, 0.88);
  box-shadow: 0 0 8px rgba(148, 197, 255, 0.15);
}

.step-ladder-board {
  position: relative;
  width: 1380px;
  min-width: 1380px;
  height: 460px;
}

.first-cup-bracket-board {
  position: relative;
  overflow: hidden;
  --bracket-preview-scale: 1;
  --bracket-preview-height: var(--bracket-base-height, 460px);
  --bracket-base-width: 1380px;
  --bracket-base-height: 460px;
}

.bracket-preview-trigger {
  position: relative;
  display: block;
  cursor: zoom-in;
  user-select: none;
}

.bracket-preview-viewport {
  width: 100%;
  height: var(--bracket-preview-height);
  overflow: hidden;
  border-radius: 14px;
}

.bracket-preview-scale {
  width: var(--bracket-base-width, 1380px);
  height: var(--bracket-base-height, 460px);
  transform: scale(var(--bracket-preview-scale));
  transform-origin: top left;
}

.interactive-bracket-board {
  width: var(--bracket-base-width, 1380px);
  min-height: var(--bracket-base-height, 460px);
  margin: 0 auto;
}

.compact-interactive-bracket,
.modified-interactive-bracket {
  position: relative;
  overflow: hidden;
  --bracket-preview-scale: 1;
  --bracket-preview-height: var(--bracket-base-height, 460px);
}

.compact-bracket-board {
  width: 620px;
  min-height: 390px;
}

.modified-bracket-board {
  --bracket-base-width: 820px;
  --bracket-base-height: 1160px;
}

/* Standard 8-Team Tournament Bracket */
.standard-8-bracket-board {
  --bracket-base-width: 1420px;
  --bracket-base-height: 860px;
  position: relative;
  width: var(--bracket-base-width);
  height: var(--bracket-base-height);
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-lg);
  overflow: visible;
}

.standard-8-bracket-board .ladder-stage-label-qf { left: 150px; }
.standard-8-bracket-board .ladder-stage-label-sf { left: 520px; }
.standard-8-bracket-board .ladder-stage-label-final { left: 890px; }
.standard-8-bracket-board .ladder-stage-label-champ { left: 1220px; }

.standard-8-bracket-board .ladder-match-qf1 { left: 20px; top: 60px; }
.standard-8-bracket-board .ladder-match-qf2 { left: 20px; top: 260px; }
.standard-8-bracket-board .ladder-match-qf3 { left: 20px; top: 460px; }
.standard-8-bracket-board .ladder-match-qf4 { left: 20px; top: 660px; }

.standard-8-bracket-board .ladder-match-sf1 { left: 390px; top: 160px; }
.standard-8-bracket-board .ladder-match-sf2 { left: 390px; top: 560px; }

.standard-8-bracket-board .ladder-match-final { left: 760px; top: 360px; }

.standard-8-bracket-board .champion-panel-8 {
  position: absolute;
  left: 1130px;
  top: 360px;
  width: 260px;
}

.standard-8-bracket-board .ladder-match-card {
  width: 250px;
}

.standard-8-bracket-board .ladder-line {
  stroke: var(--line);
  stroke-width: 2;
  fill: none;
}

.standard-8-bracket-board .ladder-line.is-active {
  stroke: var(--accent);
  stroke-width: 3;
}

.bracket-preview-hint {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 3;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(8, 18, 35, 0.82);
  border: 1px solid rgba(127, 176, 255, 0.22);
  color: #d7e6ff;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.bracket-lightbox-open {
  overflow: hidden;
}

.bracket-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 32px;
  background: rgba(3, 8, 18, 0.8);
  backdrop-filter: blur(10px);
  cursor: zoom-out;
}

.bracket-lightbox[hidden] {
  display: none !important;
}

.info-modal[hidden] {
  display: none !important;
}

.info-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 32px;
  background: rgba(3, 8, 18, 0.76);
  backdrop-filter: blur(10px);
}

.info-modal-dialog {
  width: min(980px, 96vw);
  max-height: min(88vh, 820px);
  overflow: auto;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(127, 176, 255, 0.18);
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(7, 17, 31, 0.98), rgba(10, 27, 55, 0.99));
  box-shadow: 0 32px 60px rgba(0, 0, 0, 0.42);
}

.formula-block {
  margin: 14px 0 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(96, 165, 250, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #dfeaff;
  white-space: pre-wrap;
  font-family: "Inter", sans-serif;
  line-height: 1.7;
}

.bracket-lightbox-dialog {
  position: relative;
  z-index: 10000;
  width: min(96vw, 1420px);
  height: min(88vh, 780px);
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(127, 176, 255, 0.18);
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(7, 17, 31, 0.98), rgba(10, 27, 55, 0.99));
  box-shadow: 0 32px 60px rgba(0, 0, 0, 0.42);
}

.bracket-lightbox-stage {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: auto;
  scrollbar-width: none;
  cursor: crosshair;
}

.bracket-lightbox-stage::-webkit-scrollbar {
  display: none;
}

.bracket-lightbox-board {
  flex: 0 0 auto;
  margin: 0;
}

.ladder-stage-label {
  position: absolute;
  top: 0;
  color: #9cbaff;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ladder-stage-label-seed {
  left: 20px;
}

.ladder-stage-label-r1 {
  left: 286px;
}

.ladder-stage-label-r2 {
  left: 576px;
}

.ladder-stage-label-final {
  left: 866px;
}

.ladder-stage-label-champ {
  left: 1152px;
}

.step-ladder-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
}

.ladder-line {
  fill: none;
  stroke: rgba(167, 193, 255, 0.85);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(148, 197, 255, 0.14));
}

.ladder-seed,
.ladder-match,
.champion-panel {
  position: absolute;
  z-index: 1;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: linear-gradient(180deg, rgba(44, 51, 67, 0.92), rgba(31, 37, 50, 0.94));
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.ladder-seed {
  left: 20px;
  width: 186px;
  height: 74px;
  padding: 14px 16px;
  display: grid;
  gap: 4px;
  align-content: center;
}

.ladder-seed-1 {
  top: 34px;
}

.ladder-seed-2 {
  top: 134px;
}

.ladder-seed-3 {
  top: 234px;
}

.ladder-seed-4 {
  top: 334px;
}

.ladder-seed-rank {
  color: #7fb0ff;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ladder-seed strong {
  font-size: 1rem;
}

.ladder-seed span:last-child {
  color: var(--muted);
}

.ladder-match {
  width: 250px;
  min-height: 192px;
  padding: 14px 14px 12px;
}

.ladder-match-1 {
  left: 286px;
  top: 256px;
}

.ladder-match-2 {
  left: 576px;
  top: 156px;
}

.ladder-match-3 {
  left: 866px;
  top: 56px;
}

.ladder-match-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.ladder-match-title {
  color: #d9e2f2;
  font-size: 0.95rem;
  font-weight: 700;
}

.ladder-match-type {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #d9e2f2;
  font-size: 0.76rem;
  font-weight: 700;
}

.ladder-team-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

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

.ladder-team-row.is-winner {
  background: linear-gradient(90deg, rgba(66, 133, 244, 0.2), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(111, 165, 255, 0.22);
}

.ladder-team-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.ladder-team-meta strong {
  white-space: nowrap;
  font-size: 0.95rem;
  line-height: 1.2;
}

.ladder-code {
  min-width: 42px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  padding: 0 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  color: #eaf2ff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.ladder-score {
  min-width: 44px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fbff;
  font-weight: 800;
  font-size: 1rem;
  flex: 0 0 44px;
  margin-left: 8px;
}

.champion-panel {
  left: 1152px;
  top: 76px;
  width: 164px;
  min-height: 92px;
  padding: 16px 14px;
  display: grid;
  gap: 4px;
  align-content: center;
  background:
    radial-gradient(circle at top left, rgba(243, 199, 66, 0.22), transparent 34%),
    linear-gradient(180deg, rgba(30, 41, 59, 0.95), rgba(13, 24, 43, 0.98));
}

.first-cup-final-panel {
  left: 1188px;
  top: 88px;
  width: 178px;
  z-index: 2;
}

.signature-final-panel {
  left: 1188px;
  top: 88px;
  width: 178px;
  z-index: 2;
}

.third-cup-board {
  width: 1380px;
  min-width: 1380px;
  height: 460px;
}

.third-stage-label-semi {
  left: 366px;
}

.third-stage-label-final {
  left: 866px;
}

.ladder-seed-eliminated {
  border-color: rgba(239, 68, 68, 0.18);
  background: linear-gradient(180deg, rgba(67, 42, 42, 0.92), rgba(40, 28, 28, 0.96));
}

.ladder-match-4 {
  left: 366px;
  top: 218px;
}

.ladder-match-5 {
  left: 866px;
  top: 126px;
}

.third-cup-final-panel {
  top: 158px;
}

.champion-label {
  color: #f3c742;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
  font-weight: 800;
}

.champion-panel strong {
  font-size: 1.55rem;
}

.champion-name {
  color: #d7dfec;
  font-size: 0.88rem;
  line-height: 1.3;
}

.scoreline {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 12px;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 700;
}

.result-win {
  background: rgba(34, 197, 94, 0.14);
  color: #7ff0a6;
}

.result-draw {
  background: rgba(245, 158, 11, 0.15);
  color: #f9cf7a;
}

.result-loss {
  background: rgba(239, 68, 68, 0.14);
  color: #ff9c9c;
}

.footer-note {
  margin-top: 18px;
  color: var(--muted);
}

@media (max-width: 1080px) {
  .dashboard-grid,
  .tournament-layout,
  .team-layout,
  .section-grid,
  .stats-grid,
  .fixture-grid,
  .profile-grid,
  .nation-sections,
  .power-chart-grid {
    grid-template-columns: 1fr;
  }

  .vertical-seed-grid {
    grid-template-columns: 1fr;
  }

  .ladder-source-row {
    grid-template-columns: 1fr;
    padding-bottom: 22px;
  }

  .ladder-source-row::before {
    left: 50%;
    right: auto;
    width: 2px;
    height: calc(100% - 18px);
    bottom: 18px;
    transform: translateX(-50%);
  }

  .ladder-source-node::after {
    display: none;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 20px, 100%);
    margin: 10px auto 24px;
  }

  .topbar,
  .hero-card,
  .sidebar-card,
  .table-card,
  .notice-card,
  .stat-card,
  .fixture-card {
    padding: 18px;
  }

  .topbar,
  .team-row,
  .headline-row,
  .notice-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .topnav {
    width: 100%;
  }

  .action-button {
    width: 100%;
  }

  .nav-link {
    flex: 1 1 calc(33.333% - 10px);
  }

  .hero-card h2 {
    max-width: 100%;
  }

  .compact-seed-name {
    font-size: 0.84rem;
  }

  .compact-scoreline {
    font-size: 0.78rem;
  }

  .compact-score-note {
    font-size: 0.64rem;
  }

  .compact-champion-panel {
    grid-template-columns: 1fr;
  }

  .compact-champion-meta {
    justify-items: start;
    text-align: left;
  }

  .standings-table th,
  .standings-table td {
    padding: 10px 4px;
    font-size: 0.8rem;
  }

  .standings-table td:nth-child(n+3),
  .standings-table th:nth-child(n+3) {
    width: 32px;
  }
  
  .standings-table td:last-child,
  .standings-table th:last-child {
    width: 40px;
  }
}
