:root {
  color-scheme: dark;
  --bg: var(--tg-theme-bg-color, #080b19);
  --secondary-bg: var(--tg-theme-secondary-bg-color, #10152a);
  --panel: #141a33;
  --panel-strong: #1a2140;
  --text: var(--tg-theme-text-color, #f8f9ff);
  --hint: var(--tg-theme-hint-color, #919ab6);
  --link: var(--tg-theme-link-color, #9a7cff);
  --border: rgba(255, 255, 255, 0.09);
  --accent: #7b35ff;
  --accent-2: #00ff85;
  --danger: #ff5b78;
  --warning: #ffd34e;
  --success: #00d979;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 90% 0%, rgba(123, 53, 255, 0.16), transparent 32%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

body {
  min-height: var(--tg-viewport-stable-height, 100vh);
}

button,
input,
select {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.hidden {
  display: none !important;
}

.app-shell {
  width: min(780px, 100%);
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px calc(34px + env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.eyebrow {
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

h1 {
  margin: 3px 0 0;
  font-size: clamp(28px, 8vw, 36px);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

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

.icon-button {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--secondary-bg);
  color: var(--text);
  font-size: 28px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.icon-button:active {
  transform: scale(0.95) rotate(20deg);
}

.icon-button.loading {
  animation: spin 0.8s linear infinite;
}

.user-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(16, 21, 42, 0.9);
  backdrop-filter: blur(14px);
}

.user-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent-2), #d6ff00);
  color: #07111b;
  font-weight: 950;
  background-size: cover;
  background-position: center;
}

.user-copy {
  min-width: 0;
  flex: 1;
}

.user-name {
  overflow: hidden;
  font-size: 15px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-status {
  margin-top: 2px;
  color: var(--hint);
  font-size: 12px;
}

.language-pill {
  min-width: 45px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.main-navigation {
  display: flex;
  gap: 8px;
  margin: 0 -16px 18px;
  padding: 0 16px 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-navigation::-webkit-scrollbar {
  display: none;
}

.main-nav-button {
  min-width: 82px;
  min-height: 58px;
  display: grid;
  place-items: center;
  gap: 3px;
  flex: 0 0 auto;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--secondary-bg);
  color: var(--hint);
  font-size: 11px;
  font-weight: 780;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.main-nav-button:active {
  transform: scale(0.96);
}

.main-nav-button.active {
  border-color: rgba(0, 255, 133, 0.4);
  background: linear-gradient(145deg, rgba(123, 53, 255, 0.32), rgba(0, 255, 133, 0.12));
  color: var(--text);
}

.main-nav-icon {
  font-size: 19px;
  line-height: 1;
  color: var(--accent-2);
}

.app-view {
  min-height: 320px;
}

.hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  padding: 24px 20px;
  border: 1px solid rgba(123, 53, 255, 0.38);
  border-radius: 28px;
  background:
    radial-gradient(circle at 82% 25%, rgba(0, 255, 133, 0.32), transparent 24%),
    linear-gradient(135deg, #35106f, #131a3e 58%, #0c2730);
  box-shadow: var(--shadow);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
}

.hero::before {
  width: 180px;
  height: 180px;
  right: -62px;
  top: -74px;
}

.hero::after {
  width: 80px;
  height: 80px;
  right: 38px;
  top: 26px;
}

.hero-eyebrow {
  position: relative;
  z-index: 1;
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.hero-title {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 8px 0 9px;
  font-size: clamp(25px, 7vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.hero-subtitle {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin-bottom: 17px;
  color: rgba(248, 249, 255, 0.74);
  font-size: 14px;
  line-height: 1.48;
}

.hero-chips {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-chip,
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(8, 11, 25, 0.28);
  color: rgba(248, 249, 255, 0.86);
  font-size: 12px;
  font-weight: 750;
}

.section-block {
  margin: 18px 0;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.section-title {
  margin: 0;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.section-copy {
  margin: 4px 0 0;
  color: var(--hint);
  font-size: 12px;
  line-height: 1.4;
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.state-panel {
  display: grid;
  place-items: center;
  min-height: 250px;
  padding: 28px 16px;
  color: var(--hint);
  text-align: center;
}

.state-panel.compact {
  min-height: 150px;
}

.state-panel.error {
  border: 1px solid rgba(255, 91, 120, 0.25);
  border-radius: var(--radius-lg);
  background: rgba(255, 91, 120, 0.06);
}

.spinner {
  width: 36px;
  height: 36px;
  margin-bottom: 13px;
  border: 3px solid var(--border);
  border-top-color: var(--accent-2);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

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

.match-list,
.news-list,
.source-list {
  display: grid;
  gap: 12px;
}

.match-card,
.compact-card,
.team-card,
.player-card,
.source-card,
.settings-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--secondary-bg);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.15);
}

.match-card {
  padding: 15px;
}

.match-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
  color: var(--hint);
  font-size: 11px;
  font-weight: 750;
}

.live-dot {
  color: var(--accent-2);
  font-weight: 900;
}

.match-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.match-team {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 7px;
  text-align: center;
}

.team-badge {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.2));
}

.team-badge.small {
  width: 31px;
  height: 31px;
}

.badge-fallback {
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--panel-strong);
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 900;
}

.match-team-name {
  max-width: 100%;
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
}

.match-score {
  min-width: 62px;
  padding: 9px 8px;
  border-radius: 14px;
  background: var(--panel-strong);
  font-size: 20px;
  font-weight: 950;
  text-align: center;
  white-space: nowrap;
}

.match-score.scheduled {
  color: var(--hint);
  font-size: 13px;
}

.news-toolbar,
.search-toolbar {
  display: flex;
  gap: 8px;
  margin: 0 -16px 15px;
  padding: 0 16px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.news-toolbar::-webkit-scrollbar,
.search-toolbar::-webkit-scrollbar {
  display: none;
}

.filter-button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--hint);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.filter-button.active {
  border-color: transparent;
  background: var(--text);
  color: var(--bg);
}

/* Basketball-style grouping for news filters. */
.news-filter-block {
  margin-bottom: 10px;
}

.news-filter-label {
  margin: 0 0 8px;
  color: var(--hint);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.news-filter-block .league-selector,
.news-filter-block .news-toolbar {
  margin-bottom: 0;
}

.news-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--secondary-bg);
  box-shadow: var(--shadow);
}

.news-image {
  position: relative;
  min-height: 150px;
  aspect-ratio: 16 / 8;
  background:
    radial-gradient(circle at 78% 28%, rgba(0, 255, 133, 0.38), transparent 24%),
    linear-gradient(135deg, #2a0a5d, #10182f);
  background-size: cover;
  background-position: center;
}

.news-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 11, 25, 0.36), transparent 64%);
}

.news-content {
  padding: 15px;
}

.news-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 9px;
}

.category-badge,
.source-badge,
.rumor-badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
}

.category-badge {
  background: rgba(123, 53, 255, 0.18);
  color: #bba6ff;
}

.source-badge {
  border: 1px solid var(--border);
  color: var(--hint);
}

.rumor-badge {
  background: rgba(255, 211, 78, 0.14);
  color: var(--warning);
}

.status-badge.official {
  background: rgba(0, 255, 133, 0.12);
  color: var(--accent-2);
}

.news-title {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.news-summary {
  margin: 0 0 12px;
  color: var(--hint);
  font-size: 13px;
  line-height: 1.48;
}

.news-footer,
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--hint);
  font-size: 11px;
}

.source-link,
.open-link {
  border: 0;
  background: transparent;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.table-shell {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--secondary-bg);
}

.league-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.league-table th,
.league-table td {
  padding: 11px 8px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  text-align: center;
}

.league-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--panel-strong);
  color: var(--hint);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.league-table .club-column {
  min-width: 180px;
  text-align: left;
}

.table-club {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
}

.position-marker {
  width: 4px;
  height: 25px;
  border-radius: 999px;
  background: transparent;
}

.position-marker.champions {
  background: #3788ff;
}

.position-marker.europe {
  background: var(--accent-2);
}

.position-marker.relegation {
  background: var(--danger);
}

.form-row {
  display: flex;
  justify-content: center;
  gap: 3px;
}

.form-dot {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 8px;
  font-weight: 900;
}

.form-dot.W { background: rgba(0, 217, 121, 0.2); color: var(--success); }
.form-dot.D { background: rgba(255, 211, 78, 0.15); color: var(--warning); }
.form-dot.L { background: rgba(255, 91, 120, 0.16); color: var(--danger); }

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

.team-card,
.player-card {
  position: relative;
  min-width: 0;
  padding: 15px;
}

.team-card-head,
.player-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.team-card .team-badge {
  width: 60px;
  height: 60px;
}

.favorite-button {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel-strong);
  color: var(--hint);
  font-size: 20px;
  cursor: pointer;
}

.favorite-button.active {
  border-color: rgba(0, 255, 133, 0.36);
  color: var(--accent-2);
}

.team-name,
.player-name {
  margin: 12px 0 3px;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.2;
}

.team-meta,
.player-meta {
  color: var(--hint);
  font-size: 11px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 13px;
}

.stat-cell {
  padding: 8px 5px;
  border-radius: 11px;
  background: var(--panel-strong);
  text-align: center;
}

.stat-cell strong {
  display: block;
  font-size: 15px;
}

.stat-cell span {
  color: var(--hint);
  font-size: 9px;
}

.player-photo {
  width: 64px;
  height: 78px;
  flex: 0 0 auto;
  object-fit: contain;
  object-position: center bottom;
  border-radius: 12px;
  background: linear-gradient(160deg, var(--panel-strong), rgba(123, 53, 255, 0.22));
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 0.42fr);
  gap: 9px;
  margin-bottom: 14px;
}

.search-input,
.select-input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: 0;
  background: var(--secondary-bg);
  color: var(--text);
  padding: 0 13px;
}

.search-input:focus,
.select-input:focus {
  border-color: rgba(0, 255, 133, 0.45);
}

.source-card,
.settings-card {
  padding: 16px;
}

.source-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.source-card h3,
.settings-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.source-kind {
  color: var(--hint);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.source-note {
  margin: 11px 0 0;
  color: var(--hint);
  font-size: 12px;
  line-height: 1.46;
}

.settings-list {
  display: grid;
  gap: 12px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.setting-label {
  font-size: 13px;
  font-weight: 800;
}

.setting-help {
  margin-top: 3px;
  color: var(--hint);
  font-size: 11px;
}

.source-note-bar {
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(0, 255, 133, 0.15);
  border-radius: 14px;
  background: rgba(0, 255, 133, 0.05);
  color: var(--hint);
  font-size: 11px;
  line-height: 1.45;
}

.empty-card {
  padding: 26px 16px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  color: var(--hint);
  text-align: center;
}

.app-footer {
  padding: 18px 4px 0;
  color: var(--hint);
  font-size: 10px;
  text-align: center;
}

.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  max-width: calc(100vw - 32px);
  transform: translateX(-50%);
  padding: 11px 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(20, 26, 51, 0.96);
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}

@media (max-width: 560px) {
  .card-grid,
  .team-grid,
  .player-grid {
    grid-template-columns: 1fr;
  }

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

  .match-card {
    padding: 13px 10px;
  }

  .match-team-name {
    font-size: 12px;
  }

  .team-badge {
    width: 42px;
    height: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.user-avatar img,
.news-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.news-card-action {
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.news-card-action:active {
  transform: scale(0.992);
}

.news-card-action:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

.news-open-hint {
  color: var(--accent-2);
  font-size: 19px;
  font-weight: 900;
  line-height: 0;
  vertical-align: -1px;
}

/* Basketball-style editorial news cards. */
.news-list {
  gap: 14px;
}

.news-image {
  min-height: 0;
  aspect-ratio: 16 / 9;
}

.news-content {
  padding: 15px 16px 17px;
}

.news-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.4;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.news-card-separator {
  color: var(--hint);
}

.news-title {
  margin: 8px 0 9px;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.news-summary {
  margin: 0;
  color: var(--hint);
  font-size: 14px;
  line-height: 1.45;
}

.news-footer {
  margin-top: 13px;
  font-size: 12px;
}

.news-source-name {
  max-width: 56%;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.detail-open {
  overflow: hidden;
}

.news-detail-backdrop {
  position: fixed;
  z-index: 40;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(3px);
}

.news-detail-sheet {
  position: fixed;
  z-index: 41;
  right: 0;
  bottom: 0;
  left: 0;
  width: min(760px, 100%);
  max-height: calc(var(--tg-viewport-stable-height, 100vh) - 10px);
  margin: 0 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 25px 25px 0 0;
  background: var(--bg);
  box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.42);
  overscroll-behavior: contain;
  animation: news-detail-sheet-up 0.22s ease-out;
}

@keyframes news-detail-sheet-up {
  from {
    transform: translateY(35px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.news-detail-handle {
  position: sticky;
  z-index: 43;
  top: 7px;
  width: 42px;
  height: 5px;
  margin: 7px auto 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.detail-close-button {
  position: absolute;
  z-index: 43;
  top: 18px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(8, 14, 25, 0.72);
  color: #fff;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.news-detail-state {
  min-height: 260px;
  padding: 16px;
}

.news-detail-body {
  min-height: 260px;
}

.news-detail-image {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  margin-top: -16px;
  background:
    radial-gradient(circle at 78% 28%, rgba(0, 255, 133, 0.34), transparent 24%),
    linear-gradient(135deg, #2a0a5d, #10182f);
}

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

.news-detail-content {
  padding: 18px 18px calc(34px + env(safe-area-inset-bottom));
}

.news-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 0;
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.4;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.news-detail-title {
  margin: 10px 0 15px;
  font-size: 27px;
  line-height: 1.16;
  letter-spacing: -0.025em;
}

.news-detail-section {
  margin-top: 23px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.news-detail-section h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.25;
}

.news-detail-summary-section {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.news-detail-summary {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.58;
}

.news-detail-notice {
  margin: 18px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--hint);
  font-size: 12px;
  line-height: 1.45;
}

.news-detail-text {
  color: var(--text);
  font-size: 16px;
  line-height: 1.58;
}

.news-detail-text p {
  margin: 0 0 18px;
}

.news-detail-text p:last-child {
  margin-bottom: 0;
}

.news-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.detail-source-button {
  width: auto;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--secondary-bg);
  color: var(--link);
  font-size: 15px;
  font-weight: 750;
  cursor: pointer;
}

.detail-source-button:disabled {
  opacity: 0.45;
  cursor: default;
}

@media (min-width: 620px) {
  .news-detail-sheet {
    bottom: 16px;
    border-bottom: 1px solid var(--border);
    border-radius: 25px;
  }
}


/* Top-five league selector */
.league-selector {
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
  padding: 2px 1px 7px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}

.league-selector::-webkit-scrollbar {
  display: none;
}

.league-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--secondary-bg);
  color: var(--hint);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.league-chip.active {
  border-color: rgba(0, 255, 133, 0.52);
  background: rgba(0, 255, 133, 0.13);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(0, 255, 133, 0.08);
}

.league-flag {
  font-size: 17px;
  line-height: 1;
}

.league-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid rgba(0, 255, 133, 0.22);
  border-radius: 999px;
  background: rgba(0, 255, 133, 0.08);
  color: var(--accent-2);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Standings only: keep every column inside a phone viewport. */
@media (max-width: 767px) {
  #table-view .league-table {
    min-width: 0;
    table-layout: fixed;
  }

  #table-view .league-table th,
  #table-view .league-table td {
    padding: 7px 2px;
    font-variant-numeric: tabular-nums;
  }

  #table-view .league-table th {
    font-size: 9px;
    letter-spacing: 0;
    overflow-wrap: anywhere;
  }

  #table-view .league-table th:first-child { width: 22px; }
  #table-view .league-table th:nth-child(n+3):nth-child(-n+6) { width: 22px; }
  #table-view .league-table th:nth-child(7) { width: 34px; }
  #table-view .league-table th:nth-child(8) { width: 36px; }
  #table-view .league-table th:nth-child(9) { width: 50px; }

  #table-view .league-table .club-column { min-width: 0; }
  #table-view .table-club { min-width: 0; gap: 4px; }
  #table-view .table-club > span {
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal;
    line-height: 1.25;
  }

  #table-view .table-club .team-badge.small {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    font-size: 8px;
  }

  #table-view .form-row {
    flex-wrap: wrap;
    gap: 2px;
    max-width: 46px;
    margin: 0 auto;
  }

  #table-view .form-dot {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    font-size: 9px;
  }
}

@media (max-width: 359px) {
  #table-view .league-table th,
  #table-view .league-table td { padding-inline: 1px; }
  #table-view .league-table td { font-size: 11px; }
  #table-view .league-table th:first-child { width: 18px; }
  #table-view .league-table th:nth-child(n+3):nth-child(-n+6) { width: 20px; }
  #table-view .league-table th:nth-child(7) { width: 30px; }
  #table-view .league-table th:nth-child(8) { width: 30px; }
  #table-view .league-table th:nth-child(9) { width: 46px; }
  #table-view .form-dot { width: 13px; height: 13px; flex-basis: 13px; }
}
