:root {
  --bg: #071015;
  --panel: rgba(255, 255, 255, 0.075);
  --panel-strong: rgba(255, 255, 255, 0.11);
  --card: #f7f1e6;
  --ink: #101010;
  --muted: #6f716a;
  --line: rgba(255, 255, 255, 0.13);
  --green: #27f2a4;
  --cyan: #5bd7ff;
  --red: #ff3550;
  --gold: #e8ba60;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

img,
.player-avatar,
.hero,
.hero-atmosphere {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(39, 242, 164, 0.2), transparent 30%),
    radial-gradient(circle at 72% 14%, rgba(232, 186, 96, 0.18), transparent 25%),
    radial-gradient(circle at 88% 10%, rgba(91, 215, 255, 0.15), transparent 28%),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    var(--bg);
  background-size: auto, auto, auto, 42px 42px, 42px 42px, auto;
  color: #f7fbf7;
  font-family: "Microsoft YaHei", "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", "Segoe UI", Arial, sans-serif;
  overflow-x: hidden;
}

body.modal-open {
  position: fixed;
  top: var(--dialog-scroll-top, 0);
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
}

body::before {
  display: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  background:
    linear-gradient(90deg, rgba(39, 242, 164, .08), transparent 34%, rgba(232, 186, 96, .08)),
    rgba(5, 14, 18, 0.9);
  padding: 14px clamp(18px, 5vw, 80px);
  backdrop-filter: blur(20px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 950;
  letter-spacing: 0;
}

.brand-badge {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 16px;
  background:
    radial-gradient(circle at 30% 20%, #fff, transparent 18%),
    linear-gradient(135deg, var(--green), var(--cyan));
  color: #071015;
  box-shadow: 0 16px 42px rgba(39,242,164,.18);
}

.brand-badge b {
  line-height: .9;
  font-size: 20px;
}

.brand-badge small {
  margin-top: -12px;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .16em;
}

.brand strong {
  display: grid;
  gap: 2px;
}

.brand strong span {
  color: #fff;
  font-size: 20px;
}

.brand strong small {
  color: rgba(255,255,255,.48);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}

nav {
  display: flex;
  gap: 10px;
}

nav a {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 9px 15px;
  color: rgba(247, 251, 247, 0.68);
  font-weight: 850;
}

nav a:hover {
  border-color: rgba(39,242,164,.18);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

main {
  width: min(1460px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, .8fr);
  gap: 36px;
  min-height: 620px;
  align-items: center;
  overflow: hidden;
  margin: 24px 0 28px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 32px;
  padding: 86px clamp(22px, 4vw, 56px) 58px;
  background: rgba(6, 20, 19, .68);
  box-shadow: 0 42px 120px rgba(0,0,0,.36), inset 0 1px 0 rgba(255,255,255,.12);
}

.hero-copy {
  align-self: center;
  transform: translateY(-24px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(5,14,18,.96) 0%, rgba(5,14,18,.84) 34%, rgba(5,14,18,.28) 66%, rgba(5,14,18,.12) 100%),
    linear-gradient(0deg, rgba(5,14,18,.76), rgba(5,14,18,.05) 42%, rgba(5,14,18,.4)),
    url("assets/home-hero-bg.png") center / cover no-repeat;
  filter: saturate(1.08) contrast(1.04);
}

.hero::after {
  content: "";
  position: absolute;
  z-index: 1;
  left: -7%;
  bottom: -18%;
  width: min(700px, 52vw);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 49.5%, rgba(255,255,255,.14) 50%, transparent 50.5%),
    linear-gradient(0deg, transparent 49.5%, rgba(255,255,255,.14) 50%, transparent 50.5%);
  opacity: 0.32;
  pointer-events: none;
}

.hero-copy,
.hero-atmosphere {
  position: relative;
  z-index: 2;
}

.hero-identity,
.kicker,
.meta {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-identity {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: fit-content;
  margin-bottom: 18px;
  border: 1px solid rgba(39, 242, 164, .22);
  border-radius: 999px;
  background: rgba(3, 17, 17, .42);
  padding: 10px 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 20px 60px rgba(0,0,0,.18);
  backdrop-filter: blur(12px);
}

.hero-identity i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 24px rgba(232, 186, 96, .72);
}

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

h1 {
  max-width: 940px;
  margin-bottom: 18px;
  font-size: clamp(50px, 7.3vw, 104px);
  line-height: 0.98;
  letter-spacing: 0;
  font-weight: 950;
  color: #fff;
  text-shadow: 0 0 38px rgba(39, 242, 164, .12);
}

h1 span {
  display: block;
}

h1 span:last-child {
  width: fit-content;
  background: linear-gradient(90deg, #ffffff 0%, #d7f6ec 38%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-mark {
  position: relative;
  width: fit-content;
  margin: 0 0 22px;
  border: 1px solid rgba(39, 242, 164, .62);
  border-left: 4px solid var(--green);
  border-radius: 6px 18px 18px 6px;
  background: rgba(2, 15, 15, .82);
  color: #dffdf3;
  padding: 12px 18px 11px;
  font-size: clamp(28px, 4.1vw, 58px);
  font-weight: 950;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 0 14px rgba(39, 242, 164, .34);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 0 28px rgba(39, 242, 164, .12),
    0 20px 50px rgba(0,0,0,.22);
}

.hero-mark::after {
  content: "LIVE INDEX";
  position: absolute;
  right: 12px;
  bottom: -18px;
  display: block;
  width: auto;
  height: auto;
  margin-top: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--green);
  font-size: 10px;
  letter-spacing: .18em;
  box-shadow: none;
}

h2 {
  margin-bottom: 0;
  color: #f7fbf7;
  font-size: clamp(30px, 4vw, 50px);
  letter-spacing: -0.045em;
}

.hero p:not(.kicker) {
  max-width: 700px;
  color: rgba(247, 251, 247, 0.68);
  font-size: 18px;
  line-height: 1.75;
}

.kickoff-countdown {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(680px, 100%);
  margin: 22px 0 20px;
  border: 1px solid rgba(39, 242, 164, .24);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(39, 242, 164, .18), rgba(91, 215, 255, .06) 48%, rgba(232, 186, 96, .12)),
    rgba(3, 16, 17, .74);
  padding: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 20px 60px rgba(0,0,0,.22),
    0 0 34px rgba(39, 242, 164, .08);
  backdrop-filter: blur(14px);
}

.countdown-copy {
  display: grid;
  gap: 4px;
  min-width: 172px;
}

.countdown-copy span {
  color: #fff;
  font-size: 18px;
  font-weight: 950;
}

.countdown-copy small {
  color: rgba(247, 251, 247, .58);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
}

.countdown-units {
  display: grid;
  grid-template-columns: repeat(4, minmax(66px, 1fr));
  gap: 9px;
  flex: 1;
}

.countdown-units time {
  position: relative;
  display: grid;
  min-height: 70px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.035)),
    rgba(4, 15, 16, .66);
}

.countdown-units time::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(39, 242, 164, .18), transparent);
  opacity: .42;
  transform: translateX(-120%);
  animation: countdownSweep 3.8s linear infinite;
}

.countdown-units b {
  position: relative;
  z-index: 1;
  color: #ffffff;
  font-size: 30px;
  line-height: .9;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(39, 242, 164, .42);
}

.countdown-units small {
  position: relative;
  z-index: 1;
  color: var(--green);
  font-size: 11px;
  font-weight: 950;
}

.countdown-units b.is-changing {
  animation: countdownPulse .42s ease;
}

@keyframes countdownPulse {
  0% { transform: translateY(0) scale(1); }
  38% { transform: translateY(-2px) scale(1.08); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes countdownSweep {
  to { transform: translateX(120%); }
}

.hero-atmosphere {
  display: none;
}

.hero-atmosphere::before,
.hero-atmosphere::after {
  display: none;
}

.hero-atmosphere::before {
  display: none;
}

.hero-atmosphere::after {
  display: none;
}

.pitch-orbit {
  display: none;
}

.orbit-one {
  inset: 14% 10% 12% 0;
  transform: rotate(17deg) scaleX(1.46);
}

.orbit-two {
  inset: 28% 18% 23% 12%;
  border-color: rgba(39,242,164,.2);
  transform: rotate(-19deg) scaleX(1.9);
}

.football-mark {
  display: none;
}

.hero-field {
  position: relative;
  display: grid;
  min-height: 380px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(90deg, transparent 49.6%, rgba(255,255,255,.2) 50%, transparent 50.4%),
    radial-gradient(circle at center, transparent 0 92px, rgba(255,255,255,.22) 93px 95px, transparent 96px),
    linear-gradient(135deg, rgba(39,242,164,.17), rgba(91,215,255,.08));
  box-shadow: 0 30px 100px rgba(0,0,0,.32), inset 0 0 80px rgba(39,242,164,.07);
  overflow: hidden;
}

.hero-field::before,
.hero-field::after {
  content: "";
  position: absolute;
  width: 38%;
  height: 56%;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 18px;
}

.hero-field::before {
  left: -8%;
}

.hero-field::after {
  right: -8%;
}

.hero-field strong {
  font-size: 112px;
  line-height: .8;
  letter-spacing: -.08em;
}

.hero-field small {
  position: absolute;
  bottom: 34px;
  color: var(--green);
  font-weight: 950;
  letter-spacing: .24em;
}

.ball-dot {
  position: absolute;
  right: 24%;
  top: 30%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 36px rgba(39,242,164,.55);
}

.hero-trophy {
  position: relative;
  display: grid;
  min-height: 448px;
  place-items: center;
  overflow: visible;
  isolation: isolate;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 52% 36%, rgba(232, 186, 96, .28), transparent 31%),
    radial-gradient(circle at 50% 82%, rgba(39, 242, 164, .14), transparent 35%),
    radial-gradient(ellipse at 50% 48%, rgba(255,255,255,.08), transparent 58%);
  box-shadow: none;
}

.hero-trophy::before {
  content: "";
  position: absolute;
  inset: -28% -18%;
  background:
    linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, transparent 0 20%, rgba(255,255,255,.12) 20.2% 20.7%, transparent 20.9%),
    radial-gradient(circle at 50% 50%, transparent 0 42%, rgba(255,255,255,.1) 42.2% 42.7%, transparent 43%);
  background-size: 70px 70px, 70px 70px, 100% 100%, 100% 100%;
  opacity: .42;
  transform: rotate(-13deg);
  mask-image: radial-gradient(circle at 50% 50%, #000 0 48%, transparent 72%);
}

.hero-trophy::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: auto 7% 4% 7%;
  height: 30%;
  border-radius: 999px 999px 20px 20px;
  background: radial-gradient(ellipse at center, rgba(232,186,96,.18), rgba(7, 16, 21, .68) 58%, transparent 73%);
  filter: blur(12px);
}

.hero-trophy img {
  position: relative;
  z-index: 3;
  width: min(88%, 500px);
  max-height: 430px;
  object-fit: contain;
  transform: translateY(8px) rotate(-1.6deg);
  filter: drop-shadow(0 34px 44px rgba(0,0,0,.56)) drop-shadow(0 0 42px rgba(232,186,96,.16)) saturate(1.08) contrast(1.04);
}

.trophy-orbit {
  position: absolute;
  z-index: 2;
  width: min(88%, 470px);
  aspect-ratio: 1;
  border: 1px solid rgba(232, 186, 96, .24);
  border-radius: 50%;
  transform: rotate(-8deg) scaleX(1.08);
  box-shadow: inset 0 0 38px rgba(39,242,164,.06), 0 0 52px rgba(232,186,96,.1);
}

.trophy-orbit::before,
.trophy-orbit::after {
  content: "";
  position: absolute;
  inset: 13%;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  transform: rotate(23deg) scaleX(1.36);
}

.trophy-orbit::after {
  inset: 22%;
  border-color: rgba(39,242,164,.18);
  transform: rotate(-17deg) scaleX(1.72);
}

.overview {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 16px;
  margin-bottom: 26px;
}

.overview article,
.group-jump {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 18px;
}

.overview .wide {
  min-width: 0;
}

.overview span {
  color: rgba(247,251,247,.58);
  font-weight: 850;
}

.overview strong {
  display: block;
  margin-top: 8px;
  color: #fff;
  font-size: 36px;
  letter-spacing: -0.04em;
}

#hotTeams,
#groupJump {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

#hotTeams {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

#hotTeams::-webkit-scrollbar {
  display: none;
}

#hotTeams a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  padding: 8px 12px;
  font-weight: 900;
}

#hotTeams b {
  color: var(--gold);
  font-size: 13px;
  letter-spacing: .05em;
}

#hotTeams img {
  width: 32px;
  height: 22px;
  border-radius: 5px;
  object-fit: cover;
}

#groupJump a {
  border: 1px solid rgba(39,242,164,.24);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(39,242,164,.22), rgba(91,215,255,.12));
  color: #fff;
  padding: 10px 15px;
  font-weight: 950;
}

.mobile-stick-tabs {
  display: none;
}

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

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.group-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  grid-column: 1 / -1;
  margin-top: 14px;
}

.group-heading span {
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  padding: 9px 12px;
  font-weight: 950;
}

.group-heading strong {
  color: rgba(247,251,247,.58);
}

.team-card,
.admin-panel {
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.team-card {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.team-card:hover {
  transform: translateY(-5px);
  border-color: rgba(39,242,164,.32);
  box-shadow: 0 26px 76px rgba(0,0,0,.34);
}

.team-body {
  padding: 18px;
}

.team-topline {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.group-pill {
  border-radius: 999px;
  border: 1px solid rgba(217, 21, 47, 0.12);
  background:
    linear-gradient(135deg, rgba(217, 21, 47, 0.08), rgba(232, 186, 96, 0.08));
  color: rgba(16, 16, 16, 0.72);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 950;
}

.country-code {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(16,16,16,.1);
  border-radius: 50%;
  background: #f3eee3;
  color: rgba(17, 17, 17, 0.72);
  font-size: 16px;
  font-weight: 850;
}

.team-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.team-title img {
  width: 58px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid #ded7ca;
  border-radius: 6px;
  background: #fff;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(45, 38, 26, 0.1);
}

.team-body h3 {
  margin-bottom: 0;
  color: var(--ink);
  font-size: 30px;
  letter-spacing: -0.04em;
}

.team-body small {
  color: var(--muted);
  font-size: 16px;
}

.team-copy {
  min-height: 92px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.62;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

button {
  min-height: 46px;
  border-radius: 9px;
  cursor: pointer;
  font: inherit;
  font-weight: 950;
}

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

.vote-button:disabled {
  background: #9f9a8f;
  cursor: not-allowed;
}

.detail-button {
  border: 1px solid #ded7ca;
  background: #fffaf1;
  color: var(--ink);
}

.vote-count {
  margin: 12px 0 0;
  color: #d9152f;
  font-weight: 950;
}

.full-ranking {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin-bottom: 24px;
}

.site-disclaimer {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 32px 0 8px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(39,242,164,.08), rgba(255,255,255,.035)),
    rgba(5,18,17,.58);
  padding: 14px 18px;
  color: rgba(247,251,247,.64);
  box-shadow: 0 18px 44px rgba(0,0,0,.16);
}

.site-disclaimer span {
  flex: 0 0 auto;
  border: 1px solid rgba(39,242,164,.24);
  border-radius: 999px;
  background: rgba(39,242,164,.1);
  color: rgba(247,251,247,.82);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 950;
}

.site-disclaimer p {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
}

.site-disclaimer div {
  display: grid;
  gap: 7px;
}

.full-rank-row {
  display: grid;
  grid-template-columns: 44px 42px 1fr 72px auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.075);
  padding: 9px 12px;
}

.full-rank-row span {
  color: rgba(247,251,247,.52);
  font-weight: 950;
}

.full-rank-row img {
  width: 42px;
  height: 30px;
  border-radius: 6px;
  object-fit: cover;
}

.full-rank-row small {
  color: rgba(247,251,247,.45);
}

.full-rank-row em {
  color: var(--green);
  font-style: normal;
  font-weight: 950;
}

.ranking-strip {
  display: none;
}

.team-dialog {
  width: min(980px, calc(100% - 30px));
  max-height: min(86vh, 900px);
  border: 0;
  border-radius: 22px;
  background: #f7f1e6;
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.48);
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.team-dialog::backdrop {
  background: rgba(3, 8, 11, 0.68);
  backdrop-filter: blur(12px);
}

.close-dialog {
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 1px solid #ded7ca;
  background: #fff;
  font-size: 26px;
  line-height: 1;
}

.dialog-hero {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  align-items: center;
  border-bottom: 1px solid #ded7ca;
  padding: 26px;
}

.dialog-hero img {
  width: 100%;
  height: 220px;
  border-radius: 16px;
  object-fit: cover;
}

.dialog-hero h2 {
  color: var(--ink);
  font-size: clamp(42px, 6vw, 70px);
}

.dialog-hero p:not(.meta) {
  color: var(--muted);
  line-height: 1.72;
}

.dialog-title {
  margin: 24px 26px 14px;
  color: var(--ink);
  font-size: 28px;
}

.world-cup-history {
  margin: 18px 26px 0;
  padding: 18px 20px;
  border: 1px solid rgba(9, 32, 28, .12);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(39, 242, 164, .09), rgba(244, 213, 138, .16)),
    rgba(255, 255, 255, .58);
  box-shadow: 0 18px 42px rgba(14, 23, 19, .08);
}

.dialog-info-section {
  margin: 18px 26px 0;
  padding: 18px 20px;
  border: 1px solid rgba(9, 32, 28, .12);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(39, 242, 164, .09), rgba(244, 213, 138, .16)),
    rgba(255, 255, 255, .58);
  box-shadow: 0 18px 42px rgba(14, 23, 19, .08);
}

.dialog-info-section h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 24px;
  font-weight: 950;
  text-align: center;
}

.world-cup-history > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.world-cup-history span {
  color: #0d6a55;
  font-size: 14px;
  font-weight: 950;
}

.world-cup-history strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
  text-align: right;
}

.world-cup-history ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.world-cup-history li {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.world-cup-history small {
  display: block;
  margin-top: 12px;
  color: rgba(16, 27, 23, .45);
  font-size: 12px;
}

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

.player-card {
  position: relative;
  border: 1px solid #ded7ca;
  border-radius: 18px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255,255,255,.22), transparent 28%),
    linear-gradient(135deg, #fffaf1, #eee5d5);
  padding: 16px;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.player-card:hover {
  transform: perspective(900px) rotateX(2deg) rotateY(-3deg) translateY(-4px);
  box-shadow: 0 24px 70px rgba(45, 38, 26, 0.22);
}

.player-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent),
    linear-gradient(rgba(0,0,0,.035) 1px, transparent 1px);
  background-size: auto, 100% 28px;
  pointer-events: none;
}

.shirt-number {
  display: none;
}

.player-avatar {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 9;
  place-items: end center;
  border: 1px solid #ded7ca;
  border-radius: 14px;
  overflow: hidden;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.fallback-face {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.72);
  border-radius: 50% 50% 44% 44%;
  background:
    radial-gradient(circle at 35% 42%, #111 0 3px, transparent 4px),
    radial-gradient(circle at 65% 42%, #111 0 3px, transparent 4px),
    radial-gradient(ellipse at 50% 68%, transparent 0 13px, rgba(17,17,17,.5) 14px, transparent 16px),
    linear-gradient(#f2c7a0, #d99a72);
  color: #111;
  font-size: 24px;
  font-weight: 950;
  margin-bottom: 20px;
}

.player-avatar.has-photo {
  border-color: rgba(10, 42, 36, .26);
  background-color: #10231f;
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.10), 0 12px 28px rgba(30, 42, 34, .12);
}

.avatar-0 {
  background: linear-gradient(145deg, #e5edff, #88b6ff);
}

.avatar-1 {
  background: linear-gradient(145deg, #fff2d6, #f2b85e);
}

.avatar-2 {
  background: linear-gradient(145deg, #dff8ef, #6fc7a2);
}

.avatar-3 {
  background: linear-gradient(145deg, #f8dff0, #cc86b1);
}

.player-card-content {
  position: relative;
  z-index: 1;
}

.player-card h4 {
  margin: 14px 0 7px;
  color: var(--ink);
  font-size: clamp(16px, 1.35vw, 20px);
  line-height: 1.02;
  letter-spacing: 0;
  white-space: nowrap;
  text-align: center;
}

.player-facts {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.player-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 1px solid rgba(217,21,47,.14);
  border-radius: 12px;
  background: rgba(255,255,255,.62);
  color: #d9152f;
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 950;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72), 0 8px 18px rgba(95,57,31,.06);
}

.nickname-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0;
  border: 1px solid rgba(217,21,47,.16);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(217,21,47,.08), rgba(232,186,96,.11)),
    rgba(255,255,255,.64);
  color: #8e1224;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 950;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72), 0 8px 20px rgba(95,57,31,.08);
}

.nickname-chip::before {
  content: "";
  width: 5px;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #d9152f, #e8ba60);
  box-shadow: 0 0 12px rgba(217,21,47,.22);
}

.highlight-chip {
  margin-top: 6px;
  border-left: 3px solid #d9152f;
  background: rgba(255,255,255,.52);
  border-radius: 0 10px 10px 0;
  padding: 10px 12px;
  color: var(--muted);
  line-height: 1.62;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 80;
  transform: translateX(-50%) translateY(18px);
  border-radius: 999px;
  background: #111;
  color: #fff;
  opacity: 0;
  padding: 12px 18px;
  transition: 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.locked {
  display: none !important;
}

.password-box {
  display: flex;
  gap: 10px;
  max-width: 520px;
}

.admin-help {
  margin-top: 12px;
  color: rgba(247,251,247,.62);
  font-size: 14px;
}

.password-box input,
.admin-row input {
  min-height: 48px;
  border: 1px solid #ded7ca;
  border-radius: 10px;
  background: #fff;
  padding: 0 14px;
  font: inherit;
}

.password-box button,
.admin-row button {
  border: 0;
  background: #111;
  color: #fff;
  padding: 0 18px;
}

.admin-panel {
  margin-bottom: 70px;
  padding: 18px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.admin-stats article {
  border: 1px solid #ded7ca;
  border-radius: 14px;
  background: #fffaf1;
  padding: 14px;
}

.admin-stats span,
.admin-stats strong {
  display: block;
  color: var(--ink);
}

.admin-stats span {
  color: var(--muted);
  font-weight: 900;
}

.admin-stats strong {
  margin-top: 6px;
  font-size: 24px;
}

.admin-dashboard {
  display: grid;
  grid-template-columns: minmax(360px, .85fr) minmax(460px, 1.15fr);
  gap: 18px;
}

.admin-dashboard h3 {
  color: var(--ink);
  margin: 0 0 12px;
}

.admin-votes {
  display: grid;
  gap: 12px;
  max-height: 740px;
  overflow: auto;
  padding-right: 4px;
}

.admin-row {
  display: grid;
  grid-template-columns: 1fr 120px 76px 76px;
  gap: 14px;
  align-items: center;
  border: 1px solid #ded7ca;
  border-radius: 14px;
  background: #fffaf1;
  padding: 14px;
}

.admin-team {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-team img {
  width: 64px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
}

.admin-team strong,
.admin-team small {
  display: block;
  color: var(--ink);
}

.admin-team small {
  margin-top: 4px;
  color: var(--muted);
}

.admin-editor {
  border: 1px solid #ded7ca;
  border-radius: 16px;
  background: #fffaf1;
  padding: 16px;
}

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

.admin-editor label,
.admin-player-editor label {
  display: grid;
  gap: 6px;
}

.admin-editor label span,
.admin-player-editor label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.admin-editor input,
.admin-editor textarea,
.admin-player-editor input,
.admin-player-editor textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #ded7ca;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
}

.admin-editor textarea,
.admin-player-editor textarea {
  min-height: 88px;
  resize: vertical;
}

.admin-editor .wide {
  grid-column: 1 / -1;
}

.admin-player-editor {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.admin-player-editor fieldset {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  border: 1px solid #ded7ca;
  border-radius: 14px;
  padding: 14px;
}

.admin-player-editor legend {
  color: var(--ink);
  font-weight: 950;
  padding: 0 6px;
}

.admin-primary {
  width: 100%;
  min-height: 52px;
  margin-top: 14px;
  border: 0;
  border-radius: 12px;
  background: #111;
  color: #fff;
  font: inherit;
  font-weight: 950;
}

.admin-page main {
  width: min(1320px, calc(100% - 32px));
}

.admin-page .hero {
  grid-template-columns: 1fr;
  min-height: auto;
  padding: 56px clamp(22px, 4vw, 56px);
}

.admin-page .hero h1 {
  font-size: clamp(42px, 6vw, 82px);
}

.admin-page .hero strong {
  color: var(--gold);
}

.admin-shell {
  margin: 28px 0 70px;
}

.admin-login .hero-copy {
  max-width: 760px;
}

.admin-logout {
  width: auto;
  min-width: 120px;
  margin-top: 0;
  padding: 0 20px;
}

.admin-panel {
  color: var(--ink);
}

.admin-row button:hover,
.password-box button:hover,
.admin-primary:hover {
  filter: brightness(1.08);
}

.admin-row button:disabled {
  opacity: .55;
  cursor: wait;
}

.admin-editor input:focus,
.admin-editor textarea:focus,
.password-box input:focus,
.admin-row input:focus {
  border-color: rgba(39, 242, 164, .72);
  outline: 2px solid rgba(39, 242, 164, .18);
}

@media (max-width: 1180px) {
  .team-grid,
  .overview {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    grid-template-columns: 1fr;
    background-position: center;
  }

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

  .hero::before {
    background:
      linear-gradient(180deg, rgba(5,14,18,.9) 0%, rgba(5,14,18,.58) 48%, rgba(5,14,18,.82) 100%),
      url("assets/home-hero-bg.png") center / cover no-repeat;
  }

  .hero-atmosphere {
    min-height: 240px;
  }

  .overview .wide {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  main {
    width: min(100% - 20px, 460px);
  }

  .site-nav,
  .section-title {
    align-items: stretch;
    flex-direction: column;
  }

  .site-nav {
    gap: 12px;
    padding: 12px 14px;
  }

  .brand-badge {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .brand strong span {
    font-size: 18px;
  }

  nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  nav a {
    flex: 1 0 auto;
    text-align: center;
    padding: 8px 12px;
  }

  .team-grid,
  .overview,
  .dialog-hero,
  .player-grid,
  .admin-stats,
  .admin-editor-grid,
  .admin-player-editor fieldset,
  .admin-row,
  .full-rank-row {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 18px;
    margin-top: 12px;
  }

  .hero-identity {
    gap: 8px;
    max-width: 100%;
    overflow: hidden;
    padding: 10px 10px !important;
    font-size: 10px;
    letter-spacing: .06em;
    white-space: nowrap;
  }

  .hero-mark {
    font-size: clamp(34px, 13vw, 58px);
    line-height: .9;
    opacity: .9;
  }

  .hero-mark::after {
    width: 72%;
    margin-top: 12px;
  }

  h1 {
    margin-bottom: 14px;
    font-size: clamp(42px, 15vw, 64px);
    line-height: 1;
  }

  .hero p:not(.kicker) {
    font-size: 15px;
    line-height: 1.65;
  }

  .overview {
    gap: 10px;
    margin-bottom: 18px;
  }

  .overview article,
  .group-jump {
    border-radius: 14px;
    padding: 14px;
  }

  .overview strong {
    font-size: 30px;
  }

  #hotTeams,
  #groupJump {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  #hotTeams::-webkit-scrollbar,
  #groupJump::-webkit-scrollbar {
    display: none;
  }

  #groupJump a {
    flex: 0 0 auto;
    padding: 9px 13px;
  }

  .section-title {
    gap: 8px;
    margin: 24px 0 14px;
  }

  .team-card {
    min-height: auto;
  }

  .team-title {
    align-items: center;
  }

  .team-title h3 {
    font-size: 30px;
  }

  .card-actions {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .full-rank-row {
    gap: 10px;
    padding: 12px;
  }

  .hero-field {
    min-height: 300px;
  }

  .hero {
    min-height: auto;
    border-radius: 24px;
    padding: 56px 20px 28px;
  }

  .hero-atmosphere {
    min-height: 170px;
  }

  .football-mark {
    width: 52px;
    right: 8%;
  }

}

/* Soft visual pass: keep the sports identity, but make surfaces friendlier. */
:root {
  --soft-radius-lg: 34px;
  --soft-radius-md: 24px;
  --soft-radius-sm: 16px;
  --soft-border: rgba(255, 255, 255, 0.16);
}

.site-nav {
  margin: 14px auto 0;
  width: min(1460px, calc(100% - 28px));
  border: 1px solid rgba(255, 255, 255, .12);
  border-bottom-color: transparent;
  border-radius: 32px 32px 0 0;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .24);
}

.brand-badge {
  border-color: rgba(39, 242, 164, .22);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.1), rgba(255,255,255,.035)),
    rgba(7, 25, 24, .82);
  color: #dffdf3;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 14px 34px rgba(0,0,0,.2);
}

.brand-badge b {
  color: #ffffff;
}

.brand-badge small {
  color: var(--green);
}

nav a {
  border-radius: 999px;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

nav a:hover {
  transform: translateY(-1px);
}

.hero {
  border-radius: 42px;
  border-color: var(--soft-border);
}

.hero-identity,
.overview article,
.group-jump,
.team-card,
.admin-panel,
.admin-stats article,
.admin-row,
.admin-editor,
.admin-player-editor fieldset,
.full-rank-row {
  border-radius: var(--soft-radius-md);
}

.team-card,
.overview article,
.group-jump,
.admin-panel,
.full-rank-row {
  box-shadow: 0 22px 70px rgba(0, 0, 0, .26);
}

.team-card {
  border-color: rgba(255, 255, 255, .18);
}

.team-body {
  padding: 22px;
}

.team-title img,
.admin-team img,
.full-rank-row img {
  border-radius: 14px;
}

.group-pill,
.country-code,
#hotTeams a,
#groupJump a,
.toast {
  border-radius: 999px;
}

button,
.vote-button,
.detail-button,
.password-box input,
.password-box button,
.admin-row input,
.admin-row button,
.admin-primary,
.admin-editor input,
.admin-editor textarea,
.admin-player-editor input,
.admin-player-editor textarea {
  border-radius: var(--soft-radius-sm);
}

.vote-button,
.password-box button,
.admin-row button,
.admin-primary {
  background: linear-gradient(135deg, #141a1e, #242b2f);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .16);
}

.detail-button {
  background: linear-gradient(135deg, #fffaf1, #f7eddc);
}

.full-rank-row {
  padding: 13px 16px;
  background: rgba(255, 255, 255, .09);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.full-rank-row:hover {
  transform: translateY(-2px);
  border-color: rgba(39, 242, 164, .26);
  background: rgba(255, 255, 255, .12);
}

.team-dialog {
  border-radius: 32px;
}

.dialog-hero img,
.player-card,
.player-avatar,
.highlight-chip {
  border-radius: var(--soft-radius-md);
}

.close-dialog {
  border-radius: 50%;
}

@media (min-width: 761px) {
  .site-nav {
    position: relative;
    top: auto;
    justify-content: flex-start;
    margin-bottom: 0;
  }

  .site-nav nav {
    display: none;
  }

  main {
    margin-top: 0;
  }

  .hero {
    margin-top: 0;
    border-top: 0;
    border-radius: 0 0 42px 42px;
  }

  .overview {
    grid-template-columns: minmax(180px, .9fr) minmax(180px, .9fr) minmax(660px, 2.8fr);
  }

  #hotTeams {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    overflow: visible;
    padding-bottom: 0;
  }

  #hotTeams a {
    min-width: 0;
    justify-content: center;
    padding: 9px 10px;
  }

  #hotTeams span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .group-jump {
    position: sticky;
    top: 12px;
    z-index: 35;
    display: grid;
    grid-template-columns: minmax(250px, .48fr) minmax(0, 1.52fr);
    gap: 14px;
    align-items: center;
    padding: 14px;
    background: rgba(7, 16, 21, .88);
    backdrop-filter: blur(18px);
  }

  .group-jump .kicker {
    display: none;
  }

  .mobile-stick-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .mobile-stick-tabs a,
  #groupJump a {
    min-height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    white-space: nowrap;
  }

  .mobile-stick-tabs a {
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.08);
    color: rgba(247,251,247,.86);
    font-weight: 950;
  }

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

  #groupJump a {
    padding: 0 8px;
  }
}

@media (max-width: 760px) {
  .site-nav {
    width: min(100% - 20px, 460px);
    margin-top: 10px;
    border-radius: 22px;
  }

  .hero {
    border-radius: 30px;
  }

  .team-card,
  .overview article,
  .group-jump,
  .full-rank-row {
    border-radius: 22px;
  }
}

/* Mobile-only polish. Desktop keeps the existing layout above 760px. */
@media (max-width: 760px) {
  html {
    scroll-padding-top: 118px;
  }

  body {
    background:
      radial-gradient(circle at 12% 0%, rgba(39, 242, 164, 0.16), transparent 28%),
      radial-gradient(circle at 86% 10%, rgba(232, 186, 96, 0.14), transparent 26%),
      linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px),
      var(--bg);
    background-size: auto, auto, 34px 34px, 34px 34px, auto;
  }

  main {
    width: min(100% - 16px, 480px);
  }

  .site-nav {
    width: min(100% - 16px, 480px);
    margin-top: 0;
    margin-bottom: 0;
    position: relative;
    top: auto;
    gap: 0;
    padding: 10px 12px 8px;
    border-bottom-color: transparent;
    border-radius: 24px 24px 0 0;
    background: rgba(5, 14, 18, 0.84);
    box-shadow: 0 14px 46px rgba(0,0,0,.2);
  }

  .brand {
    gap: 10px;
    transform: translateY(2px);
  }

  .brand-badge {
    width: 40px;
    height: 40px;
  }

  .brand strong span {
    font-size: 16px;
  }

  .brand strong small {
    font-size: 9px;
    letter-spacing: 0;
  }

  nav {
    display: none;
  }

  nav a {
    min-height: 41px !important;
    border-color: rgba(255,255,255,.1);
    background: rgba(255,255,255,.07);
    padding: 9px 6px;
    font-size: 13px;
  }

  .hero {
    min-height: 470px;
    align-content: end;
    margin: 0 0 14px;
    padding: 18px 18px 16px;
    border-top: 0;
    border-radius: 0 0 28px 28px;
  }

  .hero-copy {
    transform: translateY(-44px);
  }

  .hero::before {
    background:
      linear-gradient(180deg, rgba(5,14,18,.24) 0%, rgba(5,14,18,.58) 36%, rgba(5,14,18,.96) 100%),
      url("assets/home-hero-bg.png") 58% 34% / cover no-repeat;
  }

  .hero::after,
  .hero-atmosphere {
    display: none;
  }

  .hero-identity {
    margin-bottom: 12px;
    white-space: normal;
    line-height: 1.25;
  }

  .hero-mark {
    margin-bottom: 16px;
    border-color: rgba(39, 242, 164, .86);
    border-left-width: 5px;
    background:
      linear-gradient(90deg, rgba(39,242,164,.32), rgba(91,215,255,.12)),
      rgba(0, 10, 11, .94);
    color: #ffffff;
    padding: 10px 14px 9px;
    font-size: 38px;
    letter-spacing: .04em;
    text-shadow: 0 0 10px rgba(39,242,164,.78), 0 0 26px rgba(39,242,164,.36);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 0 32px rgba(39,242,164,.24);
  }

  .hero-mark::after {
    right: 10px;
    bottom: -16px;
    color: #a3ffe2;
    font-size: 9px;
  }

  h1 {
    max-width: 330px;
    font-size: 48px;
    line-height: .98;
  }

  .hero p:not(.kicker) {
    display: -webkit-box;
    max-width: 330px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    font-size: 14px;
  }

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

  .overview article {
    min-height: 104px;
    padding: 13px;
  }

  .overview article.wide {
    grid-column: 1 / -1;
    min-height: auto;
  }

  .overview span,
  .group-jump .kicker,
  .section-title .kicker {
    font-size: 12px;
  }

  .overview strong {
    font-size: 26px;
    line-height: 1.08;
    word-break: break-word;
  }

  #hotTeams a {
    padding: 8px 10px;
    font-size: 13px;
  }

  #hotTeams {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
    padding-bottom: 0;
  }

  #hotTeams a {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 5px;
    min-width: 0;
    min-height: 74px;
    border-radius: 16px;
    padding: 9px 4px 8px;
  }

  #hotTeams span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    font-size: 12px;
    line-height: 1.1;
  }

  #hotTeams img {
    width: 42px;
    height: 30px;
    border-radius: 9px;
  }

  .group-jump {
    position: sticky;
    top: 8px;
    z-index: 30;
    margin: 0 -2px 8px;
    padding: 10px;
    border-radius: 22px;
    background: rgba(7, 16, 21, .86);
    backdrop-filter: blur(16px);
  }

  .group-jump .kicker {
    display: none;
  }

  .mobile-stick-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    margin-bottom: 8px;
  }

  .mobile-stick-tabs a {
    display: grid;
    min-height: 34px;
    place-items: center;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    color: rgba(247,251,247,.86);
    font-size: 13px;
    font-weight: 950;
  }

  #groupJump {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
    margin-top: 0;
  }

  #groupJump a {
    min-height: 32px;
    padding: 7px 4px;
    text-align: center;
    font-size: 12px;
  }

  .section-title {
    margin: 22px 0 12px;
  }

  h2 {
    font-size: 28px;
  }

  .team-grid {
    gap: 12px;
  }

  .group-heading {
    position: static;
    z-index: 1;
    margin: 8px 0 0;
    border-radius: 999px;
    background: transparent;
    padding: 0;
    backdrop-filter: none;
    scroll-margin-top: 118px;
  }

  .group-heading span {
    border-radius: 999px;
    padding: 8px 12px;
  }

  .team-card {
    border-radius: 26px;
  }

  .team-card:hover {
    transform: none;
  }

  .team-body {
    padding: 16px;
  }

  .team-topline {
    margin-bottom: 12px;
  }

  .group-pill {
    padding: 7px 11px;
    font-size: 12px;
  }

  .team-title {
    gap: 13px;
  }

  .team-title img {
    width: 66px;
    height: 46px;
    border-radius: 16px;
  }

  .team-body h3,
  .team-title h3 {
    font-size: 28px;
    line-height: 1.02;
    letter-spacing: 0;
  }

  .team-body small {
    font-size: 14px;
  }

  .team-copy {
    min-height: auto;
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.62;
  }

  .card-actions {
    grid-template-columns: 1.1fr .9fr;
    gap: 9px;
  }

  button {
    min-height: 48px;
    font-size: 15px;
  }

  .vote-count {
    margin-top: 11px;
    font-size: 15px;
  }

  .full-ranking {
    gap: 8px;
    margin-bottom: 44px;
  }

  .full-rank-row {
    grid-template-columns: 34px 48px minmax(0, 1fr) auto;
    gap: 9px;
    padding: 11px 12px;
  }

  .full-rank-row img {
    width: 48px;
    height: 34px;
  }

  .full-rank-row strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .full-rank-row small {
    display: none;
  }

  .full-rank-row em {
    font-size: 13px;
    white-space: nowrap;
  }

  .team-dialog {
    position: relative;
    width: 100%;
    max-width: none;
    height: calc(100dvh - 10px);
    max-height: none;
    margin: 10px 0 0;
    border-radius: 24px 24px 0 0;
    background: linear-gradient(180deg, #fff7e8, #efe0ca);
    overflow: hidden;
    opacity: 0;
    transform: translate3d(0, 18px, 0) scale(.985);
    transition: transform .24s ease, opacity .24s ease;
    will-change: transform, opacity;
  }

  .team-dialog.is-open {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }

  .team-dialog.is-closing {
    opacity: 0;
    transform: translate3d(46px, 0, 0) scale(.985);
  }

  .close-dialog {
    position: absolute;
    top: 26px;
    right: 16px;
    left: auto;
    width: 42px;
    height: 42px;
    min-height: 42px;
    font-size: 22px;
    box-shadow: 0 12px 32px rgba(0,0,0,.18);
  }

  .dialog-hero {
    display: block;
    padding: 0 18px 20px;
  }

  .dialog-hero img {
    height: 190px;
    margin-bottom: 18px;
    border-radius: 22px;
  }

  .dialog-hero h2 {
    font-size: 42px;
    line-height: 1;
    letter-spacing: 0;
  }

  .dialog-hero p:not(.meta) {
    font-size: 14px;
  }

  .dialog-title {
    margin: 0 58px 8px;
    padding-top: 36px;
    font-size: 19px;
    text-align: center;
  }

  .player-grid {
    height: calc(100dvh - 112px);
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: 7px;
    padding: 0 14px 10px;
    overflow: hidden;
  }

  .player-card {
    display: grid;
    grid-template-columns: minmax(160px, 1.22fr) minmax(116px, .78fr);
    gap: 8px;
    align-items: center;
    padding: 8px;
    border-radius: 18px;
    min-height: 0;
    overflow: hidden;
    text-align: left;
    background:
      linear-gradient(135deg, rgba(217,21,47,.15), rgba(232,186,96,.18)),
      linear-gradient(90deg, rgba(17,17,17,.045) 0 1px, transparent 1px 100%),
      #fff8ea;
    background-size: auto, 18px 100%, auto;
  }

  .player-card:hover {
    transform: none;
  }

  .player-avatar {
    width: min(100%, 238px);
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 15px;
    background-position: center;
    background-size: cover;
    margin: 0;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.26), 0 10px 22px rgba(45,38,26,.12);
  }

  .fallback-face {
    align-self: center;
    width: 58px;
    height: 58px;
    margin: 0;
    font-size: 16px;
  }

  .shirt-number {
    right: 8px;
    top: -10px;
    font-size: 46px;
  }

  .player-card h4 {
    margin: 0 0 3px;
    font-size: 17px;
    line-height: 1.05;
    letter-spacing: 0;
    white-space: nowrap;
  }

  .player-facts {
    flex-wrap: nowrap;
    justify-content: center;
    gap: 6px;
  }

  .player-meta,
  .highlight-chip {
    font-size: 12px;
  }

  .player-meta {
    margin-bottom: 0;
    padding: 4px 8px;
    white-space: nowrap;
  }

  .nickname-chip {
    margin: 0;
    padding: 4px 8px;
    font-size: 11px;
    white-space: nowrap;
  }

  .highlight-chip {
    border-left: 0;
    border-radius: 12px;
    padding: 6px 7px;
    text-align: left;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }

  .toast {
    width: calc(100% - 28px);
    bottom: 14px;
    text-align: center;
  }
}

@media (max-width: 380px) {
  .card-actions,
  .overview {
    grid-template-columns: 1fr;
  }

  .full-rank-row {
    grid-template-columns: 30px 42px minmax(0, 1fr);
  }

  .full-rank-row em {
    grid-column: 3;
  }

  h1 {
    font-size: 42px;
  }

  #groupJump {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Copy and label refinement. */
.hero-identity,
.kicker,
.meta {
  letter-spacing: .04em;
}

.hero-identity,
.kicker {
  color: #c8fff0;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  border: 1px solid rgba(39, 242, 164, .18);
  border-radius: 999px;
  background: rgba(39, 242, 164, .08);
  padding: 7px 11px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 18px rgba(232, 186, 96, .58);
}

.hero-mark {
  color: rgba(255, 255, 255, .13);
}

@media (max-width: 760px) {
  .hero {
    min-height: 430px;
    align-content: end;
    padding: 132px 18px 22px;
  }

  .hero::before {
    background:
      linear-gradient(180deg, rgba(5,14,18,.2) 0%, rgba(5,14,18,.54) 36%, rgba(5,14,18,.96) 100%),
      url("assets/home-hero-bg.png") 58% center / cover no-repeat;
  }

  .hero-identity {
    padding: 8px 11px;
    font-size: 11px;
  }

  .hero-mark {
    margin-bottom: 10px;
    font-size: 32px;
  }

  h1 {
    max-width: 350px;
    font-size: 44px;
  }

  .hero p:not(.kicker) {
    max-width: 350px;
  }

  .team-dialog .dialog-hero {
    display: none;
  }

  .team-dialog .world-cup-history {
    margin: 0 18px 10px;
    padding: 10px 12px;
    border-radius: 16px;
    background:
      linear-gradient(135deg, rgba(39, 242, 164, .08), rgba(244, 213, 138, .18)),
      rgba(255, 255, 255, .62);
  }

  .team-dialog .world-cup-history > div {
    display: grid;
    gap: 4px;
    margin-bottom: 7px;
  }

  .team-dialog .world-cup-history span {
    font-size: 12px;
  }

  .team-dialog .world-cup-history strong {
    font-size: 13px;
    line-height: 1.35;
    text-align: left;
  }

  .team-dialog .world-cup-history ul {
    gap: 4px;
  }

  .team-dialog .world-cup-history li {
    font-size: 12px;
    line-height: 1.35;
  }

  .team-dialog .world-cup-history small {
    margin-top: 6px;
    font-size: 10px;
  }

  .team-dialog .dialog-title {
    margin: 0 18px 14px;
    padding-top: 2px;
  }

  .team-dialog .player-grid {
    padding-top: 0;
  }
}

/* Final interaction and mobile archive polish. */
.hero-mark {
  position: relative;
  z-index: 5;
  isolation: isolate;
  border: 1px solid rgba(39, 242, 164, .8);
  border-left: 5px solid var(--green);
  background:
    linear-gradient(90deg, rgba(39, 242, 164, .3), rgba(91, 215, 255, .1)),
    rgba(0, 10, 12, .96);
  color: #ffffff;
  text-shadow: 0 0 8px rgba(39, 242, 164, .72), 0 0 22px rgba(91, 215, 255, .28);
}

.hero-mark::after {
  content: none;
}

#hotTeams img,
.team-title img,
.full-rank-row img,
.dialog-hero img,
.admin-team img {
  border-radius: 6px;
  object-fit: cover;
}

.team-title img {
  width: 74px;
  height: 49px;
}

@media (max-width: 760px) {
  .team-dialog {
    width: calc(100% - 18px) !important;
    max-width: none !important;
    height: 86dvh !important;
    max-height: 86dvh !important;
    margin: auto !important;
    border: 1px solid rgba(39, 242, 164, .18);
    border-radius: 20px !important;
    background:
      linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
      radial-gradient(circle at 12% 0%, rgba(39, 242, 164, .18), transparent 30%),
      rgba(4, 14, 17, .98) !important;
    background-size: 38px 38px, 38px 38px, auto, auto;
    box-shadow: 0 34px 120px rgba(0,0,0,.52);
    overflow: hidden !important;
    overscroll-behavior: contain;
  }

  .team-dialog::backdrop {
    background: rgba(2, 7, 10, .72);
    backdrop-filter: blur(10px);
  }

  #dialogContent {
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 18px 0 20px;
  }

  .team-dialog .close-dialog {
    top: 14px;
    right: 14px;
    z-index: 4;
    background: rgba(255,255,255,.9);
    box-shadow: 0 12px 28px rgba(0,0,0,.22);
  }

  .team-dialog .dialog-info-section {
    margin: 12px 14px;
    border: 1px solid rgba(39,242,164,.16);
    border-radius: 18px;
    background:
      linear-gradient(135deg, rgba(39, 242, 164, .1), rgba(244, 213, 138, .1)),
      rgba(255, 253, 248, .94);
    box-shadow: 0 18px 46px rgba(0,0,0,.18);
  }

  .team-dialog .dialog-info-section h3 {
    color: #08201c;
    font-size: 18px;
    text-align: center;
  }

  .team-dialog .world-cup-history strong {
    display: block;
    text-align: center;
  }

  .team-dialog .player-grid {
    height: auto !important;
    grid-template-columns: 1fr;
    grid-template-rows: none !important;
    gap: 9px;
    overflow: visible !important;
    padding: 0;
  }

  .team-dialog .player-card {
    min-height: 0;
  }
}

/* Final mobile countdown balance: taller timer, less empty hero tail. */
@media (max-width: 760px) {
  .hero {
    min-height: 488px !important;
    padding-bottom: 6px !important;
  }

  .kickoff-countdown {
    min-height: 68px !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }

  .kickoff-countdown .countdown-units time {
    min-height: 46px !important;
  }
}

/* Final mobile countdown sizing lock. */
@media (max-width: 760px) {
  .kickoff-countdown {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }

  .kickoff-countdown .countdown-units time {
    min-height: 41px !important;
  }
}

/* Final compact mobile hero controls. */
@media (max-width: 760px) {
  .hero {
    min-height: 500px !important;
    padding-bottom: 12px !important;
  }

  .hero-copy {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    align-content: end;
    column-gap: 7px;
  }

  .hero-identity,
  .hero-mark,
  .hero h1,
  .hero p:not(.kicker),
  .kickoff-countdown {
    grid-column: 1 / -1;
  }

  .schedule-open,
  .predictor-open {
    justify-content: center !important;
    width: 100% !important;
    min-width: 0;
    min-height: 40px !important;
    margin: 0 !important;
    gap: 3px !important;
    padding: 7px 4px !important;
    text-align: center;
  }

  .schedule-open span,
  .predictor-open span {
    font-size: 12px;
    line-height: 1.1;
    white-space: nowrap;
  }

  .schedule-open small,
  .predictor-open small {
    display: none !important;
  }

  .schedule-open {
    grid-column: 1;
    order: 10;
  }

  .predictor-open:not(.more-schedule-open) {
    grid-column: 2;
    order: 11;
  }

  .more-schedule-open {
    grid-column: 3;
    order: 12;
  }

  .more-schedule-open small {
    display: block !important;
    padding: 0 !important;
    background: transparent !important;
    font-size: 9px !important;
    line-height: 1.05 !important;
  }

  .kickoff-countdown {
    grid-column: 2 / 4 !important;
    order: 13;
    display: grid !important;
    grid-template-columns: 58px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 8px 0 0 !important;
    padding: 7px !important;
  }

  .countdown-copy {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 2px !important;
  }

  .countdown-copy span {
    font-size: 11px;
    line-height: 1.1;
  }

  .countdown-copy small {
    font-size: 7px !important;
    line-height: 1.25 !important;
    white-space: nowrap;
  }

  .countdown-units {
    gap: 4px !important;
  }

  .countdown-units time {
    min-height: 36px !important;
  }

  .countdown-units b {
    font-size: 15px !important;
  }

  .countdown-units small {
    font-size: 8px;
  }
}

/* Final compact mobile hero controls. */
@media (max-width: 760px) {
  .hero {
    min-height: 620px;
    padding-bottom: 14px;
  }

  .hero-copy {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-content: end;
    column-gap: 7px;
  }

  .hero-identity,
  .hero-mark,
  .hero h1,
  .hero p:not(.kicker),
  .kickoff-countdown {
    grid-column: 1 / -1;
  }

  .schedule-open,
  .predictor-open {
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    gap: 3px;
    padding: 8px 5px;
    text-align: center;
  }

  .schedule-open span,
  .predictor-open span {
    font-size: 12px;
    line-height: 1.1;
    white-space: nowrap;
  }

  .schedule-open small,
  .predictor-open small {
    display: none;
  }

  .schedule-open {
    grid-column: 1;
    order: 10;
  }

  .predictor-open:not(.more-schedule-open) {
    grid-column: 2;
    order: 11;
  }

  .more-schedule-open {
    grid-column: 3;
    order: 12;
  }

  .more-schedule-open small {
    display: block;
    padding: 0;
    background: transparent;
    font-size: 9px;
    line-height: 1;
  }

  .kickoff-countdown {
    order: 13;
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    margin: 9px 0 0;
    padding: 9px;
  }

  .countdown-copy {
    display: flex;
    justify-content: space-between;
    gap: 8px;
  }

  .countdown-copy span {
    font-size: 13px;
  }

  .countdown-copy small {
    font-size: 8px;
    white-space: nowrap;
  }

  .countdown-units {
    gap: 5px;
  }

  .countdown-units time {
    min-height: 42px;
  }

  .countdown-units b {
    font-size: 19px;
  }

  .countdown-units small {
    font-size: 9px;
  }
}

@media (max-width: 760px) {
  .hero-copy {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    column-gap: 7px;
  }

  .schedule-open {
    grid-column: 1;
    order: 10;
  }

  .predictor-open:not(.more-schedule-open) {
    grid-column: 2;
    order: 11;
  }

  .more-schedule-open {
    grid-column: 3;
    order: 12;
  }

  .kickoff-countdown {
    grid-column: 1 / -1 !important;
    order: 13;
    display: grid !important;
    grid-template-columns: 132px minmax(0, 1fr) !important;
    width: calc(100% + 12px);
    justify-self: center;
    align-items: center;
    gap: 9px;
    margin: 8px -6px 11px !important;
    border-radius: 16px;
    padding: 10px 10px;
  }

  .countdown-copy {
    min-width: 0;
    display: block;
  }

  .countdown-copy span {
    font-size: 14px;
  }

  .countdown-copy small {
    display: block;
    font-size: 8.5px;
    text-align: left;
  }

  .countdown-units {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }

  .countdown-units time {
    min-height: 41px;
    border-radius: 12px;
  }

  .countdown-units b {
    font-size: 18px;
  }

  .countdown-units small {
    font-size: 9px;
  }
}

@media (max-width: 760px) {
  .team-dialog {
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  #dialogContent {
    min-height: calc(100dvh + 120px);
    padding-bottom: 28px;
  }

  .team-dialog .dialog-info-section {
    margin: 8px 18px 12px;
    padding: 13px 13px 14px;
    border-radius: 18px;
    background:
      linear-gradient(135deg, rgba(39, 242, 164, .08), rgba(244, 213, 138, .18)),
      rgba(255, 255, 255, .64);
  }

  .team-dialog .dialog-info-section h3 {
    margin-bottom: 10px;
    font-size: 18px;
    line-height: 1.2;
  }

  .team-dialog .world-cup-history {
    margin: 8px 18px 12px;
  }

  .team-dialog .world-cup-history strong {
    display: block;
    text-align: center;
  }

  .team-dialog .world-cup-history li {
    font-size: 12px;
    line-height: 1.42;
  }

  .team-dialog .player-section {
    padding-bottom: 16px;
  }

  .team-dialog .player-grid {
    height: auto !important;
    grid-template-columns: 1fr;
    grid-template-rows: none !important;
    gap: 8px;
    padding: 0;
    overflow: visible !important;
  }

  .team-dialog .player-card {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .team-dialog {
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .team-dialog .dialog-title {
    margin: 8px 18px 10px;
    padding-top: 0;
    text-align: center;
  }

  .team-dialog .world-cup-history {
    margin: 6px 18px 12px;
  }

  .team-dialog .player-grid {
    height: auto;
    grid-template-rows: none;
    padding-bottom: 26px;
    overflow: visible;
  }

  .team-dialog .player-card {
    min-height: 0;
  }
}

/* Sticky tab bar should sit flush with the viewport top. */
.group-jump {
  top: 4px;
}

@media (max-width: 760px) {
  .group-jump {
    margin-top: 0;
  }
}

.schedule-open {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  min-height: 44px;
  margin-top: 4px;
  border: 1px solid rgba(39, 242, 164, .42);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(39, 242, 164, .18), rgba(91, 215, 255, .08)),
    rgba(3, 17, 17, .72);
  color: #f7fbf7;
  padding: 10px 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 18px 46px rgba(0,0,0,.22);
  backdrop-filter: blur(12px);
}

.schedule-open span {
  font-size: 15px;
  font-weight: 950;
}

.schedule-open small {
  border-radius: 999px;
  background: rgba(232, 186, 96, .16);
  color: #f4d58a;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 950;
}

.schedule-open:hover {
  border-color: rgba(39, 242, 164, .72);
  background:
    linear-gradient(135deg, rgba(39, 242, 164, .28), rgba(91, 215, 255, .12)),
    rgba(3, 17, 17, .82);
}

.predictor-open {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  min-height: 44px;
  margin: 10px 0 0 10px;
  border: 1px solid rgba(255, 53, 80, .36);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 53, 80, .18), rgba(232, 186, 96, .1)),
    rgba(3, 17, 17, .72);
  color: #f7fbf7;
  padding: 10px 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 18px 46px rgba(0,0,0,.22);
  backdrop-filter: blur(12px);
}

.predictor-open span {
  font-size: 15px;
  font-weight: 950;
}

.predictor-open small {
  border-radius: 999px;
  background: rgba(39, 242, 164, .12);
  color: #a3ffe2;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 950;
}

.more-schedule-open {
  border-color: rgba(255,255,255,.14);
  cursor: not-allowed;
  opacity: .74;
}

.more-schedule-open small {
  background: rgba(255,255,255,.10);
  color: rgba(247,251,247,.66);
}

.schedule-dialog {
  width: min(1120px, calc(100% - 28px));
  height: min(84vh, 820px);
  max-height: min(84vh, 820px);
  border: 1px solid rgba(39, 242, 164, .18);
  border-radius: 22px;
  background:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    radial-gradient(circle at 12% 0%, rgba(39, 242, 164, .18), transparent 30%),
    rgba(4, 14, 17, .98);
  background-size: 38px 38px, 38px 38px, auto, auto;
  color: #f7fbf7;
  padding: 0;
  box-shadow: 0 34px 120px rgba(0,0,0,.52);
  overflow: hidden;
  overscroll-behavior: contain;
}

.schedule-dialog::backdrop {
  background: rgba(2, 7, 10, .72);
  backdrop-filter: blur(10px);
}

.schedule-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}

.schedule-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  padding: 22px 22px 18px;
}

.schedule-head h2 {
  color: #fff;
  font-size: clamp(28px, 4vw, 46px);
}

.schedule-head span {
  display: block;
  margin-top: 6px;
  color: rgba(247,251,247,.58);
  font-size: 14px;
}

.schedule-close {
  flex: 0 0 auto;
  width: 44px;
  min-height: 44px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 24px;
}

.schedule-table {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  padding: 14px 16px 18px;
}

.schedule-table-head {
  display: grid;
  grid-template-columns: 118px minmax(420px, 1fr) 112px 72px;
  align-items: center;
  gap: 12px;
}

.schedule-table-head {
  position: sticky;
  top: 0;
  z-index: 2;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  background: rgba(8, 28, 30, .96);
  color: rgba(247,251,247,.56);
  padding: 10px 26px;
  font-size: 12px;
  font-weight: 950;
}

.schedule-table-head span {
  text-align: center;
}

.schedule-list {
  display: grid;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 10px 2px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(39,242,164,.48) rgba(255,255,255,.08);
}

.schedule-day {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(39,242,164,.08), rgba(255,255,255,.035)),
    rgba(255,255,255,.045);
  padding: 12px;
}

.schedule-day > time {
  display: grid;
  min-width: 0;
  min-height: 38px;
  align-content: center;
  justify-items: center;
  gap: 2px;
  border: 1px solid rgba(232, 186, 96, .24);
  border-radius: 999px;
  background: rgba(232, 186, 96, .1);
  color: #f4d58a;
  font-weight: 950;
  white-space: nowrap;
  line-height: 1.05;
}

.schedule-day > time span {
  font-size: 15px;
}

.schedule-day > time small {
  color: rgba(244, 213, 138, .78);
  font-size: 11px;
  font-weight: 900;
}

.schedule-day-matches {
  display: grid;
  gap: 7px;
}

.schedule-row {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) 112px 72px;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 13px;
  background: rgba(255,255,255,.052);
  padding: 9px 12px;
}

.schedule-row > strong {
  color: var(--green);
  font-size: 18px;
  text-align: center;
}

.schedule-row > span {
  display: grid;
  min-height: 34px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 53, 80, .16);
  color: #ff8da0;
  font-size: 13px;
  font-weight: 950;
}

.schedule-match {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.schedule-match b {
  color: rgba(247,251,247,.36);
  font-size: 12px;
  text-align: center;
}

.schedule-team {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.schedule-team:first-child {
  justify-content: flex-end;
}

.schedule-team:last-child {
  justify-content: flex-start;
}

.schedule-team img {
  width: 38px;
  height: 25px;
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 5px;
  background: #fff;
  object-fit: cover;
}

.schedule-team em {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-style: normal;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.predictor-page {
  min-height: 100vh;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

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

.predictor-leaving .predictor-app {
  opacity: 0;
  transform: translate3d(46px, 0, 0) scale(.985);
  transform-origin: center center;
  transition: opacity .22s ease, transform .22s ease;
  pointer-events: none;
  will-change: opacity, transform;
}

.predictor-hero {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 26px;
  background:
    radial-gradient(circle at 14% 0%, rgba(39,242,164,.18), transparent 34%),
    radial-gradient(circle at 78% 8%, rgba(255,53,80,.14), transparent 28%),
    rgba(5,18,17,.72);
  padding: 22px;
  box-shadow: var(--shadow);
}

.predictor-back {
  width: fit-content;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: rgba(247,251,247,.78);
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 950;
}

.predictor-hero h1 {
  margin-bottom: 10px;
  font-size: clamp(42px, 6vw, 74px);
}

.predictor-hero p:not(.kicker) {
  max-width: 820px;
  margin: 0;
  color: rgba(247,251,247,.66);
  font-size: 16px;
  line-height: 1.7;
}

.predictor-bottom-risk {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin: 18px auto 0;
  padding: 8px 14px;
  border: 1px solid rgba(244,213,138,.28);
  border-radius: 999px;
  background: rgba(244,213,138,.1);
  color: #f4d58a;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.35;
}

.predictor-toolbar {
  position: sticky;
  top: 4px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  background: rgba(7,16,21,.88);
  padding: 12px 14px;
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 46px rgba(0,0,0,.24);
}

.predictor-toolbar span {
  display: block;
  color: rgba(247,251,247,.68);
  font-size: 13px;
  font-weight: 900;
}

.predictor-toolbar strong {
  display: block;
  margin-top: 4px;
  color: #f4d58a;
  font-size: 12px;
  font-weight: 950;
}

.predictor-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.predictor-toolbar button,
.predictor-group-head button {
  border: 1px solid rgba(39,242,164,.22);
  border-radius: 999px;
  background: rgba(39,242,164,.1);
  color: #dffdf3;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 950;
}

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

.predictor-group {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.07), rgba(255,255,255,.035)),
    rgba(4, 14, 17, .72);
  padding: 14px;
  box-shadow: 0 22px 60px rgba(0,0,0,.22);
}

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

.predictor-group h2 {
  margin: 0;
  color: #fff;
  font-size: 24px;
}

.predictor-group-head small {
  display: block;
  margin-top: 3px;
  color: rgba(247,251,247,.48);
  font-size: 12px;
  font-weight: 900;
}

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

.predictor-team {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 7px;
  min-height: 132px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  background: rgba(255,255,255,.07);
  color: #f7fbf7;
  padding: 12px 8px 10px;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.predictor-team:hover {
  transform: translateY(-2px);
  border-color: rgba(39,242,164,.32);
}

.predictor-team.is-picked {
  border-color: rgba(39,242,164,.7);
  background:
    linear-gradient(135deg, rgba(39,242,164,.22), rgba(232,186,96,.14)),
    rgba(255,255,255,.09);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 16px 34px rgba(39,242,164,.08);
}

.predictor-team img {
  width: 66px;
  height: 44px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 6px;
  background: #fff;
  object-fit: cover;
}

.predictor-team strong {
  max-width: 100%;
  overflow: hidden;
  color: #fff;
  font-size: 17px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.predictor-team small {
  max-width: 100%;
  overflow: hidden;
  color: rgba(247,251,247,.48);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.predictor-rank {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  color: transparent;
  font-weight: 950;
}

.predictor-team.is-picked .predictor-rank {
  background: var(--green);
  color: #071015;
  box-shadow: 0 0 24px rgba(39,242,164,.34);
}

@media (max-width: 760px) {
  .schedule-open {
    min-height: 40px;
    padding: 9px 13px;
  }

  .predictor-open {
    min-height: 40px;
    margin: 8px 0 0;
    padding: 9px 13px;
  }

  .schedule-dialog {
    width: calc(100% - 18px);
    height: 86dvh;
    max-height: 86dvh;
    border-radius: 20px;
    opacity: 0;
    transform: translate3d(0, 18px, 0) scale(.985);
    transition: transform .24s ease, opacity .24s ease;
    will-change: transform, opacity;
  }

  .schedule-dialog.is-open {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }

  .schedule-dialog.is-closing {
    opacity: 0;
    transform: translate3d(46px, 0, 0) scale(.985);
  }

  .schedule-head {
    padding: 16px 14px 12px;
  }

  .schedule-head h2 {
    font-size: 25px;
  }

  .schedule-head span {
    max-width: 260px;
    font-size: 12px;
    line-height: 1.45;
  }

  .schedule-close {
    width: 40px;
    min-height: 40px;
  }

  .schedule-table {
    padding: 10px 10px 14px;
  }

  .schedule-table-head {
    grid-template-columns: 50px minmax(150px, 1fr) 52px 38px;
    gap: 5px;
  }

  .schedule-day {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 6px;
  }

  .schedule-row {
    grid-template-columns: minmax(150px, 1fr) 52px 38px;
    gap: 5px;
  }

  .schedule-table-head {
    padding: 8px 9px;
    font-size: 10px;
  }

  .schedule-list {
    gap: 9px;
  }

  .schedule-day {
    border-radius: 14px;
    padding: 9px;
  }

  .schedule-day > time {
    min-height: 100%;
    white-space: normal;
    text-align: center;
  }

  .schedule-day > time span {
    font-size: 12px;
  }

  .schedule-day > time small {
    font-size: 10px;
  }

  .schedule-row {
    padding: 8px 7px;
    border-radius: 12px;
  }

  .schedule-row > strong {
    font-size: 13px;
  }

  .schedule-row > span {
    min-height: 28px;
    font-size: 11px;
  }

  .schedule-match {
    grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr);
    gap: 6px;
  }

  .schedule-match b {
    font-size: 10px;
  }

  .schedule-team {
    gap: 5px;
  }

  .schedule-team img {
    width: 28px;
    height: 19px;
    border-radius: 4px;
  }

  .schedule-team em {
    font-size: 12px;
  }

  .predictor-app {
    width: min(100% - 18px, 520px);
    padding: 10px 0 28px;
  }

  .predictor-hero {
    border-radius: 22px;
    padding: 16px;
  }

  .predictor-hero h1 {
    font-size: 38px;
  }

  .predictor-hero p:not(.kicker) {
    font-size: 13px;
  }

  .predictor-bottom-risk {
    display: flex;
    width: 100%;
    justify-content: center;
    padding: 8px 11px;
    text-align: center;
    font-size: 12px;
  }

  .predictor-toolbar {
    display: grid;
    top: 4px;
    border-radius: 16px;
    padding: 10px;
  }

  .predictor-toolbar span {
    font-size: 12px;
    line-height: 1.35;
  }

  .predictor-toolbar button {
    flex: 0 0 auto;
  }

  .predictor-actions {
    justify-content: flex-start;
  }

  .predictor-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .predictor-group {
    border-radius: 18px;
    padding: 12px;
  }

  .predictor-group h2 {
    font-size: 22px;
  }

  .predictor-teams {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .predictor-team {
    min-height: 120px;
    border-radius: 15px;
    padding: 11px 7px 9px;
  }

  .predictor-team img {
    width: 70px;
    height: 46px;
  }

  .predictor-team strong {
    font-size: 16px;
  }
}

@media (min-width: 761px) {
  #overview,
  #teams,
  #ranking {
    scroll-margin-top: 96px;
  }

  .group-heading {
    scroll-margin-top: 96px;
  }

  .team-card {
    scroll-margin-top: 96px;
  }
}

@media (max-width: 760px) {
  .hero {
    align-content: center;
  }

  .hero-copy {
    transform: translateY(-34px);
  }

  .hero-mark {
    margin-bottom: 14px;
    padding: 10px 14px;
    font-size: 38px;
    letter-spacing: .03em;
  }

  .group-heading {
    scroll-margin-top: 56px;
  }

  .team-card {
    scroll-margin-top: 56px;
  }

  #overview,
  #teams,
  #ranking {
    scroll-margin-top: 96px;
  }

  .team-dialog {
    background:
      radial-gradient(circle at 18% 0%, rgba(217, 21, 47, .12), transparent 28%),
      linear-gradient(180deg, #fff7e8, #efe0ca);
    overflow: hidden;
  }

  .team-dialog .dialog-title {
    margin: 0 58px 6px;
    font-size: 19px;
    text-align: center;
  }

  .player-grid {
    height: calc(100dvh - 112px);
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 0 10px 10px;
    overflow: hidden;
  }

  .player-card {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 5px;
    padding: 7px 8px;
    border: 1px solid rgba(21, 21, 21, .1);
    border-radius: 18px;
    min-height: 0;
    overflow: hidden;
    background: linear-gradient(180deg, #fffdf8, #f7eddf);
    background-size: auto;
    text-align: center;
    box-shadow: 0 14px 34px rgba(45, 38, 26, .12);
  }

  .player-avatar {
    width: min(100%, 222px);
    max-height: 125px;
    aspect-ratio: 16 / 9;
    margin: 0 auto;
    border: 1px solid rgba(21, 21, 21, .1);
    border-radius: 15px;
    background:
      linear-gradient(135deg, rgba(7, 16, 21, .92), rgba(31, 45, 42, .88)),
      radial-gradient(circle at 20% 20%, rgba(39, 242, 164, .18), transparent 28%);
    background-position: center;
    background-size: cover;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 12px 24px rgba(45,38,26,.14);
  }

  .player-card-content {
    width: 100%;
    display: grid;
    justify-items: center;
    gap: 4px;
  }

  .player-card h4 {
    margin: 0;
    color: var(--ink);
    font-size: 17px;
    line-height: 1.05;
    letter-spacing: 0;
    white-space: nowrap;
  }

  .player-facts {
    width: 100%;
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 6px;
  }

  .player-meta {
    margin: 0;
    min-height: 26px;
    border-color: rgba(217, 21, 47, .16);
    border-radius: 10px;
    background: rgba(255, 253, 248, .88);
    color: #d9152f;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 950;
    white-space: nowrap;
  }

  .nickname-chip {
    flex: 0 1 auto;
    width: auto;
    min-height: 26px;
    margin: 1px 0 2px;
    border-color: rgba(135, 74, 44, .14);
    background:
      linear-gradient(90deg, rgba(217, 21, 47, .07), rgba(232, 186, 96, .16)),
      rgba(255, 253, 248, .86);
    color: #811425;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 950;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 8px 18px rgba(82,56,31,.08);
  }

  .nickname-chip::before {
    width: 4px;
    height: 15px;
  }

  .highlight-chip {
    width: 100%;
    margin: 1px 0 0;
    border-left: 0;
    border-radius: 14px;
    background: rgba(255,255,255,.72);
    color: rgba(16,16,16,.68);
    padding: 6px 8px;
    font-size: 12px;
    line-height: 1.28;
    text-align: center;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  .site-disclaimer {
    display: grid;
    gap: 10px;
    margin: 22px 0 4px;
    border-color: rgba(39,242,164,.16);
    border-radius: 18px;
    background:
      linear-gradient(145deg, rgba(39,242,164,.09), rgba(255,255,255,.025)),
      rgba(3,15,15,.72);
    padding: 13px 14px 14px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 16px 34px rgba(0,0,0,.18);
  }

  .site-disclaimer span {
    width: max-content;
    border-color: rgba(39,242,164,.3);
    background: rgba(39,242,164,.12);
    padding: 5px 10px;
    font-size: 11px;
  }

  .site-disclaimer div {
    gap: 6px;
  }

  .site-disclaimer p {
    font-size: 12px;
    line-height: 1.55;
  }
}

/* Keep flags rectangular after all desktop/mobile overrides. */
#hotTeams img,
.team-title img,
.full-rank-row img,
.dialog-hero img,
.admin-team img {
  border-radius: 6px;
  object-fit: cover;
}

.team-title img {
  width: 74px;
  height: 49px;
}

/* Final mobile team profile modal override: keep it aligned with the schedule dialog. */
@media (max-width: 760px) {
  .team-dialog {
    width: calc(100% - 18px) !important;
    max-width: none !important;
    height: 86dvh !important;
    max-height: 86dvh !important;
    margin: auto !important;
    border: 1px solid rgba(39, 242, 164, .18) !important;
    border-radius: 20px !important;
    background:
      linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
      radial-gradient(circle at 12% 0%, rgba(39, 242, 164, .18), transparent 30%),
      rgba(4, 14, 17, .98) !important;
    background-size: 38px 38px, 38px 38px, auto, auto !important;
    box-shadow: 0 34px 120px rgba(0,0,0,.52) !important;
    overflow: hidden !important;
    overscroll-behavior: contain;
  }

  .team-dialog::backdrop {
    background: rgba(2, 7, 10, .72);
    backdrop-filter: blur(10px);
  }

  .team-dialog #dialogContent {
    height: 100% !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 18px 0 20px;
  }

  .team-dialog .close-dialog {
    top: 14px !important;
    right: 14px !important;
    z-index: 4;
    background: rgba(255,255,255,.9);
    box-shadow: 0 12px 28px rgba(0,0,0,.22);
  }

  .team-dialog .dialog-info-section {
    margin: 12px 14px !important;
    border: 1px solid rgba(39,242,164,.16);
    border-radius: 18px;
    background:
      linear-gradient(135deg, rgba(39, 242, 164, .1), rgba(244, 213, 138, .1)),
      rgba(255, 253, 248, .94);
    box-shadow: 0 18px 46px rgba(0,0,0,.18);
  }

  .team-dialog .dialog-info-section h3 {
    color: #08201c;
    font-size: 18px;
    text-align: center;
  }

  .team-dialog .world-cup-history strong {
    display: block;
    text-align: center;
  }

  .team-dialog .player-grid {
    height: auto !important;
    grid-template-columns: 1fr;
    grid-template-rows: none !important;
    gap: 9px;
    overflow: visible !important;
    padding: 0;
  }

  .team-dialog .player-card {
    min-height: 0;
  }
}

/* Final mobile countdown balance after all other overrides. */
@media (max-width: 760px) {
  .hero {
    min-height: 488px !important;
    padding-bottom: 6px !important;
  }

  .kickoff-countdown {
    min-height: 70px !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }

  .kickoff-countdown .countdown-units time {
    min-height: 46px !important;
  }
}
