:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-soft: #f9fbfd;
  --ink: #061746;
  --muted: #5e6a81;
  --line: #dce3ec;
  --line-strong: #c9d3df;
  --green: #079455;
  --green-dark: #067647;
  --red: #c92f43;
  --gold: #d59a2a;
  --blue: #1d4ed8;
  --shadow: 0 16px 40px rgba(12, 28, 61, 0.08);
  --radius: 8px;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Inter, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(7, 26, 68, 0.03), rgba(7, 26, 68, 0) 360px),
    var(--bg);
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 22px;
  font-weight: 850;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--green);
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-mark path:first-child {
  fill: currentColor;
}

.brand-mark path:last-child {
  fill: #ffffff;
}

.nav {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 22px;
  height: 72px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 88px;
  justify-content: center;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 750;
  border-bottom: 3px solid transparent;
}

.nav-link.is-active,
.nav-link:hover {
  border-bottom-color: var(--ink);
}

.icon {
  font-size: 18px;
  line-height: 1;
}

.top-actions {
  display: flex;
  justify-content: flex-end;
}

main {
  width: min(1500px, calc(100% - 32px));
  margin: 18px auto 34px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.98fr);
  gap: 16px;
  max-width: 100%;
}

.panel {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.model-panel {
  padding: 34px 32px 28px;
  min-height: 430px;
}

.section-label {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  color: var(--green-dark);
  background: #e8f7ef;
  border: 1px solid #bfe9d1;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 800;
}

.hero-title-row {
  display: grid;
  grid-template-columns: 1fr 132px;
  gap: 22px;
  align-items: start;
  margin-top: 18px;
}

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

h1 {
  margin-bottom: 12px;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.04;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 4px;
  font-size: 21px;
  line-height: 1.2;
}

h3 {
  margin-bottom: 8px;
  font-size: 15px;
}

.lead {
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.trophy-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 14px 10px;
  color: var(--ink);
  background: linear-gradient(180deg, #f6fbff, #ffffff);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.trophy-card svg {
  width: 82px;
  height: 82px;
  color: var(--green);
}

.trophy-card path {
  fill: none;
  stroke: currentColor;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trophy-card path:last-child {
  color: var(--red);
}

.trophy-card span {
  font-size: 13px;
  font-weight: 850;
}

.control-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.9fr) minmax(250px, 1fr);
  gap: 32px;
  align-items: start;
  margin-top: 32px;
  max-width: 100%;
}

.control-block {
  min-width: 0;
}

.control-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}

.control-head span,
.control-head output {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.stepper {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  width: 100%;
  min-width: 0;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  overflow: hidden;
}

.stepper button {
  border: 0;
  background: var(--panel-soft);
  color: var(--ink);
  font-size: 19px;
  font-weight: 900;
}

.stepper output {
  display: grid;
  place-items: center;
  border-inline: 1px solid var(--line);
  font-size: 17px;
  font-weight: 900;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.segmented button {
  min-height: 34px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  font-size: 13px;
  font-weight: 800;
}

.segmented button.is-selected {
  color: #ffffff;
  background: var(--ink);
  border-color: var(--ink);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--green);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 13px;
  color: var(--muted);
  font-size: 12px;
}

.run-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 850;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(180deg, #0aa963, var(--green-dark));
  border: 1px solid var(--green-dark);
}

.secondary-button,
.ghost-button {
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line-strong);
}

.ghost-button {
  min-height: 38px;
  padding-inline: 14px;
}

.run-meta {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.probability-panel {
  padding: 20px 22px 16px;
}

.panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-head p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  white-space: nowrap;
  color: #42506a;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 13px;
  font-weight: 800;
}

.ranking-list {
  display: grid;
  gap: 0;
}

.rank-row {
  display: grid;
  grid-template-columns: 34px minmax(120px, 0.75fr) minmax(130px, 1.2fr) 64px;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  border-top: 1px solid var(--line);
}

.rank-num {
  color: var(--ink);
  font-weight: 900;
}

.team-name {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-weight: 850;
}

.team-link-row,
.team-link,
.bracket-link {
  color: var(--ink);
  text-decoration: none;
}

.team-link-row:hover,
.team-link:hover,
.bracket-link:hover {
  color: var(--green-dark);
}

.team-editor-name,
.bracket-link {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.flag {
  position: relative;
  display: inline-block;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  background: var(--crest-a, #64748b);
  border: 2px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, .14);
  overflow: hidden;
}

.rank-row .flag {
  background: var(--green);
}

.team-editor .flag,
.bracket-team .flag {
  display: none;
}

.flag::after {
  display: none;
}

.bar-track {
  height: 14px;
  background: #edf2f7;
  border-radius: 2px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), #30b772);
}

.probability {
  color: var(--green-dark);
  text-align: right;
  font-size: 17px;
  font-weight: 950;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.metric-strip article {
  min-height: 82px;
  padding: 15px 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.metric-strip span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.metric-strip strong {
  display: block;
  margin-top: 9px;
  font-size: 22px;
  line-height: 1.1;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(430px, 0.98fr);
  gap: 16px;
  align-items: start;
  max-width: 100%;
}

.side-stack {
  display: grid;
  gap: 16px;
}

.groups-panel,
.bracket-panel,
.settings-panel,
.updates-panel,
.worldcup-gallery {
  padding: 20px;
}

.updates-panel {
  margin-bottom: 16px;
}

.updates-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 12px;
  align-items: stretch;
}

.update-status,
.match-update {
  padding: 12px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.update-status span,
.match-update span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.update-status strong {
  display: block;
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.35;
}

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

.match-update strong {
  display: block;
  margin-top: 7px;
  font-size: 15px;
}

.match-update p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

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

.group-card {
  min-width: 0;
  padding: 11px 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.group-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 950;
}

.group-title span:last-child {
  color: var(--muted);
  font-weight: 800;
}

.team-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  align-items: center;
  gap: 10px;
  min-height: 30px;
}

.team-editor + .team-editor {
  border-top: 1px solid #edf2f7;
}

.team-editor-name {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 12px;
  font-weight: 780;
}

.team-editor-name a {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.team-editor input {
  width: 48px;
  height: 24px;
  padding: 0 6px;
  color: var(--ink);
  background: #f8fafc;
  border: 1px solid #dbe4ef;
  border-radius: 6px;
  text-align: center;
  font-size: 11px;
  font-weight: 850;
}

.bracket-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(118px, 1fr));
  gap: 18px;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 6px;
}

.round-column {
  min-width: 118px;
}

.round-column h3 {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.bracket-team {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  margin-bottom: 4px;
  padding: 5px 0;
  background: transparent;
  border-bottom: 1px solid #edf2f7;
  border-radius: 0;
  font-size: 12px;
  font-weight: 780;
}

.bracket-team.is-champion {
  color: #ffffff;
  background: var(--green-dark);
  border-color: var(--green-dark);
  padding: 7px 9px;
  border-radius: 7px;
}

.bracket-team.is-champion .bracket-link {
  color: #ffffff;
}

.bracket-more {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.worldcup-gallery .panel-head {
  margin-bottom: 12px;
}

.gallery-feature {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  border-radius: var(--radius);
  background: #071a44;
  box-shadow: var(--shadow);
}

.gallery-feature img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.gallery-feature::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(2, 8, 23, .78));
}

.gallery-feature div {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1;
  display: grid;
  gap: 5px;
  color: #ffffff;
}

.gallery-feature span,
.gallery-strip span {
  font-size: 12px;
  font-weight: 850;
}

.gallery-feature strong {
  font-size: 24px;
  line-height: 1.1;
}

.gallery-feature a {
  width: fit-content;
  color: #ffffff;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .6);
}

.gallery-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.gallery-strip a {
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.gallery-strip img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  object-position: center center;
}

.gallery-strip span {
  display: block;
  padding: 10px;
}

.settings-panel {
  margin-top: 16px;
}

.settings-grid {
  display: grid;
  grid-template-columns: 180px 180px 1fr;
  gap: 12px;
}

.setting-row {
  display: grid;
  gap: 7px;
  padding: 12px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.setting-row input {
  height: 34px;
  padding: 0 10px;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  font-weight: 850;
}

.setting-row code {
  align-self: center;
  color: var(--ink);
  font-size: 13px;
}

.setting-row.wide {
  min-width: 0;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  width: min(1500px, calc(100% - 32px));
  margin: 0 auto 32px;
  color: var(--muted);
  font-size: 13px;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 26px auto 36px;
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  align-items: stretch;
  padding: 34px 32px;
  margin-bottom: 16px;
}

.page-hero h1 {
  max-width: 760px;
  margin-bottom: 14px;
}

.page-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.domain-card {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 20px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.domain-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.domain-card strong {
  font-size: 22px;
  line-height: 1.2;
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

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

.news-card,
.match-card,
.score-card,
.live-card,
.side-card {
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.news-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
}

.news-thumb {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  margin: 0;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 28% 26%, rgba(255,255,255,.9) 0 10%, transparent 11%),
    linear-gradient(135deg, #0a9559, #0d2a68 54%, #c92f43);
}

.news-thumb img,
.article-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-thumb figcaption,
.article-hero figcaption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 10px;
  background: rgba(5, 12, 28, .74);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .18);
  backdrop-filter: blur(8px);
}

.news-thumb figcaption span,
.article-hero figcaption span {
  font-size: 11px;
  font-weight: 800;
  color: rgba(255, 255, 255, .74);
}

.news-thumb figcaption strong,
.article-hero figcaption strong {
  font-size: 15px;
  line-height: 1.2;
}

.news-card h2,
.match-card h2,
.live-card h2 {
  margin-bottom: 8px;
  font-size: 22px;
}

.news-card a,
.side-card a {
  color: var(--ink);
  text-decoration: none;
}

.news-card p,
.match-card p,
.score-card p,
.live-card p,
.side-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 850;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  background: #e8f7ef;
  border: 1px solid #bfe9d1;
  border-radius: 5px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 850;
}

.side-card + .side-card {
  margin-top: 12px;
}

.article-body {
  padding: 30px 34px;
}

.article-hero {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  height: auto;
  margin: 20px 0 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #081225;
  box-shadow: var(--shadow);
}

.article-hero img {
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: contain;
}

.article-hero figcaption {
  left: 18px;
  right: auto;
  min-width: min(360px, calc(100% - 36px));
  padding: 12px 14px;
}

.article-hero figcaption strong {
  font-size: 22px;
}

.article-body h2 {
  margin-top: 30px;
}

.article-body p {
  color: #26344f;
  font-size: 16px;
  line-height: 1.9;
}

.article-body ul {
  display: grid;
  gap: 10px;
  padding-left: 20px;
  color: #26344f;
  line-height: 1.75;
}

.team-hero {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(360px, 1fr);
  gap: 24px;
  align-items: stretch;
  padding: 32px;
}

.team-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.team-hero-copy h1 {
  margin-bottom: 14px;
}

.team-hero-copy p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.team-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}

.team-meta-grid article {
  padding: 14px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.team-meta-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.team-meta-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
  line-height: 1.1;
}

.team-hero-media {
  position: relative;
  overflow: hidden;
  min-height: 330px;
  margin: 0;
  border-radius: var(--radius);
  background: #071a44;
  box-shadow: var(--shadow);
}

.team-hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 330px;
  object-fit: cover;
}

.team-hero-media figcaption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 12px 14px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 10px;
  background: rgba(5, 12, 28, .74);
  font-size: 15px;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.team-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.team-detail-panel,
.related-panel {
  padding: 24px;
}

.history-list,
.player-grid {
  display: grid;
  gap: 12px;
}

.history-item,
.player-card {
  padding: 14px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.history-item span,
.player-card span {
  display: block;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
}

.history-item strong,
.player-card strong {
  display: block;
  margin-top: 7px;
  font-size: 18px;
  line-height: 1.25;
}

.history-item p,
.player-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.related-panel {
  margin-top: 16px;
}

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

.related-actions a {
  text-decoration: none;
}

.match-table {
  display: grid;
  gap: 10px;
}

.match-card,
.score-card {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) 96px;
  gap: 14px;
  align-items: center;
}

.match-time,
.score-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.match-teams,
.score-line {
  font-size: 18px;
  font-weight: 950;
}

.score-number {
  color: var(--green-dark);
  font-size: 24px;
  font-weight: 950;
  text-align: right;
}

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

.live-card {
  min-height: 190px;
}

.live-card .primary-button {
  margin-top: 16px;
  text-decoration: none;
}

.is-busy {
  opacity: 0.72;
  pointer-events: none;
}

@media (max-width: 1120px) {
  .topbar {
    grid-template-columns: 1fr auto;
    min-width: 0;
  }

  .nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    height: 54px;
    width: 100%;
    min-width: 0;
    overflow-x: auto;
  }

  .nav-link {
    flex: 0 0 auto;
  }

  .hero-grid,
  .content-grid,
  .team-hero,
  .team-detail-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .topbar {
    grid-template-columns: 1fr;
    padding: 0 16px;
    gap: 12px;
  }

  .brand {
    min-width: 0;
    font-size: 18px;
  }

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

  .nav {
    gap: 0;
  }

  .nav-link {
    min-width: auto;
    padding: 0 18px 0 2px;
  }

  .top-actions {
    display: none;
  }

  main {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    margin-top: 10px;
  }

  .model-panel,
  .probability-panel,
  .groups-panel,
  .bracket-panel,
  .settings-panel,
  .updates-panel,
  .worldcup-gallery,
  .team-hero,
  .team-detail-panel,
  .related-panel {
    padding: 16px;
  }

  .hero-title-row,
  .control-grid,
  .metric-strip,
  .updates-grid,
  .match-updates,
  .settings-grid,
  .team-meta-grid,
  .gallery-strip {
    grid-template-columns: 1fr;
  }

  .trophy-card {
    display: none;
  }

  h1 {
    font-size: 32px;
    line-height: 1.12;
    overflow-wrap: anywhere;
  }

  .lead {
    font-size: 16px;
  }

  .rank-row {
    grid-template-columns: 26px minmax(78px, 0.8fr) minmax(70px, 1fr) 52px;
    gap: 8px;
  }

  .team-name,
  .bar-track,
  .probability {
    min-width: 0;
  }

  .team-name span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .groups-grid {
    grid-template-columns: 1fr;
  }

  .segmented {
    grid-template-columns: repeat(2, 1fr);
  }

  .control-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .panel-head {
    flex-direction: column;
    align-items: stretch;
  }

  .run-row {
    align-items: stretch;
  }

  .run-meta {
    flex: 1 1 100%;
  }

  .bracket-board {
    grid-template-columns: repeat(5, minmax(112px, 112px));
  }

  .team-hero-media,
  .team-hero-media img {
    min-height: 230px;
  }

  .footer {
    flex-direction: column;
    width: min(100% - 20px, 1500px);
  }

  .page-shell {
    width: calc(100vw - 20px);
    margin-top: 12px;
  }

  .page-hero,
  .page-grid,
  .news-card,
  .match-card,
  .score-card,
  .live-grid {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .article-body {
    padding: 20px 16px;
  }

  .score-number {
    text-align: left;
  }
}
