:root {
  color-scheme: light;
  --page: #eef3f8;
  --panel: rgb(255 255 255 / 0.58);
  --ink: #18181b;
  --muted: #71717a;
  --glass-edge: rgb(100 116 139 / 0.38);
  --glass-edge-strong: rgb(71 85 105 / 0.52);
  --glass-edge-soft: rgb(148 163 184 / 0.32);
  --soft: rgb(255 255 255 / 0.62);
  --soft-2: rgb(255 255 255 / 0.46);
  --green: #047857;
  --green-bg: #ecfdf5;
  --amber: #b45309;
  --amber-bg: #fffbeb;
  --red: #dc2626;
  --red-bg: #fef2f2;
  --sky: #0369a1;
  --sky-bg: #f0f9ff;
  --drop-radius: 30px 38px 34px 44px / 34px 44px 32px 42px;
  --drop-radius-small: 18px 24px 20px 28px / 20px 28px 18px 26px;
  --drop-radius-pill: 999px 999px 999px 999px / 999px 999px 999px 999px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 8%, rgb(219 234 254 / 0.9), transparent 30%),
    radial-gradient(circle at 88% 12%, rgb(204 251 241 / 0.75), transparent 26%),
    linear-gradient(135deg, #f8fafc 0%, var(--page) 45%, #f7fbff 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.shell {
  min-height: 100vh;
  padding: 24px 16px 36px;
}

.container {
  width: min(1280px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel,
.metric,
.notice,
.section-card,
.group-card {
  border: 1px solid rgb(255 255 255 / 0.62);
  background: var(--panel);
  border-radius: var(--drop-radius);
  box-shadow:
    0 22px 64px rgb(15 23 42 / 0.1),
    inset 0 1px 0 rgb(255 255 255 / 0.64),
    inset 0 -18px 34px rgb(255 255 255 / 0.18);
  backdrop-filter: blur(24px) saturate(1.45);
  -webkit-backdrop-filter: blur(24px) saturate(1.45);
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.panel:hover,
.metric:hover,
.section-card:hover,
.group-card:hover {
  border-color: rgb(255 255 255 / 0.48);
  background: rgb(255 255 255 / 0.64);
  box-shadow:
    0 26px 70px rgb(15 23 42 / 0.13),
    inset 0 1px 0 rgb(255 255 255 / 0.72),
    inset 0 -20px 38px rgb(255 255 255 / 0.2);
}

.hero {
  padding: 20px;
}

.hero-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
}

.hero-copy {
  min-width: 0;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: var(--drop-radius-pill);
  border: 1px solid var(--soft);
  background: var(--soft-2);
  color: #52525b;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

.badge.green {
  color: var(--green);
  border-color: #bbf7d0;
  background: var(--green-bg);
}

.badge.red {
  color: var(--red);
  border-color: #fecaca;
  background: var(--red-bg);
}

.badge.amber {
  color: var(--amber);
  border-color: #fde68a;
  background: var(--amber-bg);
}

.badge.sky {
  color: var(--sky);
  border-color: #bae6fd;
  background: var(--sky-bg);
}

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

h1 {
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.05;
  letter-spacing: 0;
}

.hero p {
  margin-top: 10px;
  max-width: 760px;
  color: #52525b;
  font-size: 16px;
  line-height: 1.55;
}

.refresh-button,
.filter-button {
  border-radius: var(--drop-radius-pill);
  border: 1px solid rgb(255 255 255 / 0.72);
  background: rgb(255 255 255 / 0.5);
  color: var(--ink);
  font-weight: 750;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.refresh-button {
  min-height: 44px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  white-space: nowrap;
}

.refresh-button:hover {
  background: rgb(255 255 255 / 0.72);
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.last-updated {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgb(186 230 253 / 0.72);
  border-radius: var(--drop-radius-pill);
  background: rgb(240 249 255 / 0.62);
  color: #0369a1;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.last-updated strong {
  color: var(--ink);
}

.refresh-symbol {
  display: inline-block;
  font-size: 18px;
  line-height: 1;
}

.spin {
  animation: spin 0.8s linear infinite;
}

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

.metric {
  padding: 18px;
}

.metric-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.metric-value {
  margin-top: 12px;
  font-size: 27px;
  font-weight: 800;
  line-height: 1.1;
}

.scorer-card {
  min-height: 100%;
}

.scorer-list {
  margin-top: 11px;
  display: grid;
  gap: 8px;
}

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

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

.scorer-rank {
  width: 18px;
  flex: 0 0 auto;
  color: #a1a1aa;
  font-size: 12px;
  font-weight: 850;
}

.scorer-copy {
  min-width: 0;
}

.scorer-copy strong,
.scorer-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scorer-copy strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
}

.scorer-copy span,
.scorer-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.scorer-empty {
  margin: 12px 0 0;
}

.goal-badge {
  border-radius: var(--drop-radius-pill);
  border: 1px solid rgb(228 228 231 / 0.9);
  background: rgb(255 255 255 / 0.7);
  color: var(--ink);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 850;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

.scorer-row:hover .goal-badge {
  border-color: rgb(255 255 255 / 0.38);
  background: rgb(255 255 255 / 0.5);
}

.badge-green {
  color: var(--green);
  border: 1px solid rgb(187 247 208 / 0.78);
  border-radius: var(--drop-radius-pill);
  background: rgb(236 253 245 / 0.72);
  padding: 4px 9px;
}

.badge-red {
  color: var(--red);
  border: 1px solid rgb(254 202 202 / 0.78);
  border-radius: var(--drop-radius-pill);
  background: rgb(254 242 242 / 0.72);
  padding: 4px 9px;
}

.badge-amber {
  color: var(--amber);
  border: 1px solid rgb(253 230 138 / 0.78);
  border-radius: var(--drop-radius-pill);
  background: rgb(255 251 235 / 0.72);
  padding: 4px 9px;
}

.badge-sky {
  color: var(--sky);
  border: 1px solid rgb(186 230 253 / 0.78);
  border-radius: var(--drop-radius-pill);
  background: rgb(240 249 255 / 0.72);
  padding: 4px 9px;
}

.totals-card {
  position: relative;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgb(255 255 255 / 0.82), rgb(240 249 255 / 0.46)),
    rgb(255 255 255 / 0.62);
  isolation: isolate;
}

.totals-card::before {
  content: "";
  position: absolute;
  inset: 1px 1px auto 1px;
  height: 46%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.74), transparent);
  pointer-events: none;
  z-index: -1;
}

.totals-card .metric-label {
  align-items: center;
}

.total-goals {
  margin-top: 14px;
  min-height: 142px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(167 243 208 / 0.8);
  border-radius: 34px 42px 38px 50px / 40px 50px 34px 46px;
  background:
    linear-gradient(135deg, rgb(209 250 229 / 0.82), rgb(240 253 250 / 0.5) 48%, rgb(255 255 255 / 0.64)),
    linear-gradient(90deg, rgb(255 255 255 / 0.7), transparent 42%, rgb(255 255 255 / 0.46)),
    rgb(236 253 245 / 0.66);
  padding: 18px;
  text-align: center;
  box-shadow:
    0 14px 30px rgb(5 150 105 / 0.12),
    inset 0 1px 0 rgb(255 255 255 / 0.82),
    inset 0 -18px 30px rgb(255 255 255 / 0.24);
  transition:
    border-color 180ms ease,
    background-color 180ms ease;
}

.total-goals::before {
  content: "";
  position: absolute;
  inset: 10px 14px auto;
  height: 34px;
  border-radius: var(--drop-radius-pill);
  background: linear-gradient(180deg, rgb(255 255 255 / 0.72), transparent);
  pointer-events: none;
}

.totals-card:hover .total-goals {
  border-color: rgb(167 243 208 / 0.45);
  background: rgb(236 253 245 / 0.48);
}

.total-goals span,
.total-goals strong {
  display: block;
}

.total-goals span {
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  position: relative;
  z-index: 1;
}

.total-goals strong {
  margin-top: 8px;
  color: var(--ink);
  font-size: 64px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  position: relative;
  z-index: 1;
  text-align: center;
}

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

.card-total {
  min-height: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--drop-radius-small);
  border: 1px solid var(--soft);
  padding: 12px 14px;
  transition:
    border-color 180ms ease,
    background-color 180ms ease;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.66);
  text-align: center;
}

.card-total:hover {
  border-color: rgb(255 255 255 / 0.36);
  background: rgb(255 255 255 / 0.4);
}

.card-total span,
.card-total strong {
  display: block;
}

.card-total span {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  min-height: 13px;
}

.card-total strong {
  margin-top: 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.card-total.yellow {
  border-color: #fde68a;
  background: var(--amber-bg);
  color: var(--amber);
}

.card-total.red {
  border-color: #fecaca;
  background: var(--red-bg);
  color: var(--red);
}

.notice {
  padding: 13px 16px;
  color: #92400e;
  background: var(--amber-bg);
  border-color: #fde68a;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}

.notice p + p {
  margin-top: 4px;
  color: #a16207;
  font-weight: 550;
}

.grid-main {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.8fr);
  gap: 20px;
  align-items: start;
}

.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.85fr);
  gap: 20px;
  align-items: start;
}

.standings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 20px;
  align-items: start;
}

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

.section-card {
  overflow: hidden;
}

.section-head {
  min-height: 54px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 220px;
  font-size: 16px;
  font-weight: 800;
}

.section-title h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
}

.compact-head {
  min-height: 48px;
}

.compact-head a {
  color: #52525b;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.section-note {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  text-align: right;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.third-table {
  min-width: 580px;
}

.performance-scroll {
  max-height: 690px;
  overflow: auto;
}

.performance-table {
  min-width: 720px;
}

.performance-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgb(255 255 255 / 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.performance-table th,
.performance-table td {
  padding-top: 10px;
  padding-bottom: 10px;
}

.performance-top {
  background: rgb(240 249 255 / 0.62);
}

.performance-qualified {
  background: rgb(236 253 245 / 0.42);
}

.performance-third {
  background: rgb(255 251 235 / 0.5);
}

.group-pill {
  display: inline-flex;
  border-radius: var(--drop-radius-pill);
  border: 1px solid rgb(255 255 255 / 0.68);
  background: rgb(255 255 255 / 0.5);
  color: #52525b;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 850;
}

thead {
  background: #fafafa;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

th,
td {
  padding: 12px 16px;
  border-bottom: 1px solid #f4f4f5;
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.num {
  text-align: right;
}

.strong {
  font-weight: 800;
}

.inside-row {
  background: rgb(236 253 245 / 0.55);
}

.edge-row {
  background: rgb(255 251 235 / 0.72);
}

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

.team-cell.align-right {
  justify-content: flex-end;
  text-align: right;
}

.flag {
  width: 40px;
  height: 28px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 12px 16px 13px 18px / 13px 18px 12px 16px;
  border: 1px solid var(--soft);
  background: rgb(255 255 255 / 0.66);
  color: var(--muted);
  box-shadow: 0 1px 2px rgb(24 24 27 / 0.08);
  font-size: 10px;
  font-weight: 800;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

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

.team-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 750;
}

.team-cell.compact .team-name {
  font-size: 14px;
}

.state-pill {
  display: inline-flex;
  border-radius: var(--drop-radius-pill);
  border: 1px solid var(--soft);
  background: var(--soft-2);
  color: #52525b;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.state-pill.inside {
  color: var(--green);
  border-color: #bbf7d0;
  background: var(--green-bg);
}

.state-pill.edge {
  color: var(--amber);
  border-color: #fde68a;
  background: var(--amber-bg);
}

.goal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.goal-item {
  min-width: 0;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-right: 1px solid #f4f4f5;
}

.goal-item:last-child {
  border-right: 0;
}

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

.goal-copy strong,
.goal-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goal-copy strong {
  font-size: 14px;
}

.goal-copy span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

.knockout-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgb(255 255 255 / 0.68);
  border-radius: var(--drop-radius-small);
  background: rgb(255 255 255 / 0.44);
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.knockout-item:hover {
  border-color: rgb(255 255 255 / 0.34);
  background: rgb(255 255 255 / 0.34);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.42);
}

.knockout-meta {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.knockout-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.knockout-line .team-cell {
  width: 100%;
}

.versus {
  border-radius: var(--drop-radius-pill);
  border: 1px solid rgb(63 63 70 / 0.42);
  background: rgb(24 24 27 / 0.1);
  color: var(--ink);
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-align: center;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

.knockout-item:hover .versus {
  border-color: rgb(24 24 27 / 0.52);
  background: rgb(24 24 27 / 0.14);
}

.empty {
  padding: 18px 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.match-toolbar {
  padding: 12px 16px;
  border-bottom: 1px solid rgb(255 255 255 / 0.58);
}

.match-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1 1 320px;
  justify-content: flex-end;
}

.search-box {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgb(255 255 255 / 0.7);
  border-radius: var(--drop-radius-pill);
  background: rgb(255 255 255 / 0.52);
  padding: 0 11px;
  color: var(--muted);
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.search-box input {
  width: 128px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

select {
  min-height: 40px;
  border: 1px solid rgb(255 255 255 / 0.7);
  border-radius: var(--drop-radius-pill);
  background: rgb(255 255 255 / 0.52);
  color: #3f3f46;
  padding: 0 10px;
  outline: 0;
  font-weight: 650;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.search-box:hover,
select:hover {
  border-color: rgb(255 255 255 / 0.38);
  background: rgb(255 255 255 / 0.38);
}

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

.filter-button {
  min-height: 36px;
  background: rgb(255 255 255 / 0.44);
  color: #52525b;
  border-color: rgb(255 255 255 / 0.72);
}

.filter-button.active {
  background: rgb(254 242 242 / 0.78);
  color: var(--red);
  border-color: rgb(254 202 202 / 0.8);
}

.match-list {
  max-height: 620px;
  overflow-y: auto;
}

.match-card {
  padding: 13px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid rgb(255 255 255 / 0.56);
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.match-card:hover {
  background: rgb(255 255 255 / 0.28);
  border-bottom-color: rgb(255 255 255 / 0.34);
}

.match-card:last-child {
  border-bottom: 0;
}

.match-meta {
  display: flex;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.score-line {
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.score {
  min-width: 64px;
  border-radius: var(--drop-radius-pill);
  border: 1px solid rgb(228 228 231 / 0.9);
  background: rgb(255 255 255 / 0.72);
  color: var(--ink);
  padding: 8px 12px;
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  font-weight: 850;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

.match-card:hover .score {
  border-color: rgb(255 255 255 / 0.36);
  background: rgb(255 255 255 / 0.48);
}

.away-cell {
  justify-self: end;
  min-width: 0;
}

.venue {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goal-mini {
  margin-top: 8px;
  border: 1px solid rgb(255 255 255 / 0.68);
  border-radius: var(--drop-radius-small);
  background: rgb(255 255 255 / 0.42);
  padding: 7px 8px;
  transition:
    border-color 160ms ease,
    background-color 160ms ease;
}

.match-card:hover .goal-mini {
  border-color: rgb(255 255 255 / 0.36);
  background: rgb(255 255 255 / 0.3);
}

.goal-mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #3f3f46;
  font-size: 12px;
  font-weight: 700;
}

.goal-mini-row + .goal-mini-row {
  margin-top: 5px;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--ink);
  font-weight: 850;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--drop-radius-pill);
  border: 1px solid rgb(255 255 255 / 0.66);
  background: rgb(255 255 255 / 0.48);
  color: #52525b;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

.match-card:hover .status {
  border-color: rgb(255 255 255 / 0.36);
  background: rgb(255 255 255 / 0.38);
}

.status.live {
  color: var(--red);
  border-color: rgb(254 202 202 / 0.78);
  background: rgb(254 242 242 / 0.72);
}

.status.scheduled {
  color: var(--sky);
  border-color: #bae6fd;
  background: var(--sky-bg);
}

.next-kickoff {
  padding: 15px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.next-kickoff strong {
  font-size: 16px;
}

.next-kickoff span {
  color: #52525b;
  font-size: 14px;
  font-weight: 800;
}

.instagram-card {
  overflow: hidden;
}

.instagram-metric {
  display: flex;
  min-height: 100%;
  flex-direction: column;
}

.instagram-metric .metric-label a {
  color: #52525b;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.instagram-metric .instagram-body {
  flex: 1;
  padding: 16px 0 12px;
}

.instagram-body {
  padding: 14px 16px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.instagram-label,
.instagram-delta span,
.instagram-body small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.instagram-body strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 34px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.instagram-body small {
  margin-top: 6px;
  font-size: 10px;
  font-weight: 750;
}

.instagram-delta {
  min-width: 142px;
  border: 1px solid var(--glass-edge-soft);
  border-radius: var(--drop-radius-small);
  background: rgb(255 255 255 / 0.48);
  padding: 9px 10px;
  text-align: right;
}

.instagram-delta strong {
  font-size: 16px;
  line-height: 1.15;
  white-space: normal;
}

.instagram-delta.positive strong {
  color: var(--green);
}

.instagram-delta.negative strong {
  color: var(--red);
}

.instagram-foot,
.instagram-error {
  border-top: 1px solid var(--glass-edge-soft);
  padding: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.instagram-error {
  color: var(--red);
}

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

.group-card {
  overflow: hidden;
}

.group-head {
  min-height: 50px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.group-head h3 {
  font-size: 16px;
}

.group-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-align: right;
}

.group-card table {
  font-size: 14px;
}

.third-in-group {
  background: rgb(255 251 235 / 0.72);
}

.loading-shell {
  min-height: 100vh;
  padding: 24px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--soft);
  border-radius: var(--drop-radius-small);
  background: white;
  padding: 16px 18px;
  color: #52525b;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 1px 2px rgb(24 24 27 / 0.05);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #d4d4d8;
  border-top-color: var(--ink);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

.error-box {
  width: min(1280px, 100%);
  margin: 0 auto;
  border: 1px solid #fecaca;
  border-radius: var(--drop-radius);
  background: var(--red-bg);
  color: #991b1b;
  padding: 18px;
  font-weight: 750;
}

.panel,
.metric,
.notice,
.section-card,
.group-card {
  border-color: var(--glass-edge);
  border-radius: var(--drop-radius);
  background: rgb(255 255 255 / 0.62);
  box-shadow:
    0 24px 70px rgb(15 23 42 / 0.11),
    inset 0 1px 0 rgb(255 255 255 / 0.68),
    inset 0 -18px 34px rgb(255 255 255 / 0.18);
}

.panel:hover,
.metric:hover,
.section-card:hover,
.group-card:hover {
  border-color: var(--glass-edge-strong);
  background: rgb(255 255 255 / 0.7);
  box-shadow:
    0 28px 78px rgb(15 23 42 / 0.14),
    inset 0 1px 0 rgb(255 255 255 / 0.76),
    inset 0 -20px 38px rgb(255 255 255 / 0.22);
}

.badge,
.refresh-button,
.last-updated,
.flag,
.goal-badge,
.total-goals,
.card-total,
.state-pill,
.group-pill,
.knockout-item,
.versus,
.search-box,
select,
.filter-button,
.score,
.goal-mini,
.status,
.group-card table {
  border-color: var(--glass-edge-soft);
}

.knockout-item:hover,
.card-total:hover,
.search-box:hover,
select:hover,
.match-card:hover .score,
.match-card:hover .goal-mini,
.match-card:hover .status,
.knockout-item:hover .versus {
  border-color: var(--glass-edge-strong);
}

.match-card {
  border-bottom-color: var(--glass-edge-soft);
}

.match-card:hover {
  border-bottom-color: var(--glass-edge-strong);
}

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

@media (max-width: 1080px) {
  .metrics,
  .goal-grid,
  .groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-main,
  .feature-grid,
  .standings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .shell {
    padding: 16px 12px 28px;
  }

  .hero-row,
  .match-top,
  .next-kickoff {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .refresh-button {
    width: 100%;
  }

  .last-updated {
    width: 100%;
  }

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

  .goal-item {
    border-right: 0;
    border-bottom: 1px solid #f4f4f5;
  }

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

  .knockout-list {
    grid-template-columns: 1fr;
  }

  .knockout-item,
  .knockout-item:nth-child(2n) {
    border: 1px solid var(--glass-edge-soft);
  }

  .knockout-item:last-child {
    border-bottom: 1px solid var(--glass-edge-soft);
  }

  .controls {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    justify-content: flex-start;
  }

  .search-box input,
  select {
    width: 100%;
  }

  .match-card {
    grid-template-columns: 1fr;
  }

  .match-status {
    justify-self: start;
  }

  .score-line {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 8px;
  }

  .away-cell {
    grid-column: auto;
    justify-self: end;
  }
}
