:root {
  color-scheme: light;
  --ink: #18201d;
  --muted: #66736e;
  --line: #dfe7e2;
  --paper: #fbfcfb;
  --surface: #ffffff;
  --field: #0b6f4b;
  --field-dark: #0a3e31;
  --gold: #d79b38;
  --red: #c84b3a;
  --blue: #215ca8;
  --shadow: 0 18px 50px rgba(31, 50, 40, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.45;
}

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

button,
input,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 252, 251, 0.92);
  border-bottom: 1px solid rgba(223, 231, 226, 0.9);
  backdrop-filter: blur(14px);
}

.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.18);
}

.top-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.icon-link,
.profile-button,
.quiet-button,
.solid-button,
.chip,
.mini-link {
  min-height: 38px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.icon-link {
  padding: 0 12px;
  font-size: 14px;
}

.profile-button {
  padding: 0 10px 0 8px;
  font-size: 14px;
  font-weight: 800;
}

.profile-button img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.support-dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: min(86vh, 780px);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.support-dialog::backdrop {
  background: rgba(18, 32, 29, 0.45);
  backdrop-filter: blur(5px);
}

.dialog-panel {
  position: relative;
  overflow: auto;
  max-height: min(86vh, 780px);
  padding: 22px;
  border: 1px solid rgba(223, 231, 226, 0.96);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 28px 90px rgba(20, 37, 31, 0.28);
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.creator-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding-right: 38px;
}

.creator-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 26px rgba(31, 50, 40, 0.16);
}

.creator-card h2 {
  margin-top: 4px;
  font-size: 24px;
}

.creator-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.qr-grid {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.qr-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf9;
}

.qr-card h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.qr-card img {
  width: 100%;
  max-width: 260px;
  aspect-ratio: 1;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}

.qr-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.profile-links a,
.footer-links a,
.footer-links button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--field-dark);
  font-size: 13px;
  font-weight: 900;
}

.profile-links a {
  padding: 0 12px;
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px;
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  margin: 6px -18px 0;
  background:
    linear-gradient(135deg, rgba(8, 74, 54, 0.96), rgba(9, 111, 75, 0.9)),
    #0b6f4b;
  color: #fff;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  min-height: 300px;
  padding: 44px 18px 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: end;
}

.hero-field {
  position: absolute;
  inset: 0;
  opacity: 0.42;
  background:
    linear-gradient(90deg, transparent 49.7%, rgba(255, 255, 255, 0.35) 50%, transparent 50.3%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 96px);
}

.field-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 210px;
  height: 210px;
  border: 2px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.field-line {
  position: absolute;
  top: 32px;
  bottom: 32px;
  width: 22%;
  border: 2px solid rgba(255, 255, 255, 0.24);
}

.field-line-a {
  left: -2px;
  border-left: 0;
}

.field-line-b {
  right: -2px;
  border-right: 0;
}

.eyebrow,
.band-label,
.panel-label,
.overview-label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero .eyebrow,
.hero .panel-label {
  color: rgba(255, 255, 255, 0.72);
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 780px;
  margin-top: 8px;
  font-size: clamp(34px, 7vw, 72px);
  line-height: 0.96;
}

.hero-subtitle {
  max-width: 680px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
}

.quick-panel {
  width: 100%;
  max-width: 460px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.next-match {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 800;
}

.next-match small {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 600;
}

.overview {
  margin: -18px 0 18px;
  position: relative;
  z-index: 2;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.overview-item {
  min-height: 96px;
  padding: 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.overview-item:nth-child(2n) {
  border-right: 0;
}

.overview-item:nth-last-child(-n+2) {
  border-bottom: 0;
}

.overview-item strong {
  display: inline-block;
  margin-top: 6px;
  font-size: 32px;
  line-height: 1;
}

.filters {
  padding: 18px 0 8px;
}

.filter-row {
  display: grid;
  gap: 10px;
}

.primary-filter {
  grid-template-columns: minmax(0, 1fr) auto;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.search-box span {
  color: var(--field);
  font-size: 22px;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
}

.quiet-button {
  padding: 0 16px;
}

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

.filter-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--surface);
  color: var(--ink);
  outline: 0;
}

select:focus,
input:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(11, 111, 75, 0.22);
  outline-offset: 2px;
}

.chips {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.chip {
  flex: 0 0 auto;
  padding: 0 14px;
}

.chip.active {
  background: var(--field-dark);
  border-color: var(--field-dark);
  color: #fff;
}

.spotlight-section,
.calendar-band,
.schedule-head {
  display: grid;
  gap: 14px;
  align-items: center;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.spotlight-section {
  display: block;
}

.section-head {
  display: grid;
  gap: 8px;
  align-items: start;
}

.spotlight-section h2,
.calendar-band h2,
.schedule-head h2,
.standings-section h2 {
  margin-top: 4px;
  font-size: 24px;
}

.spotlight-layout {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

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

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

.spotlight-title h3 {
  margin: 0;
  font-size: 17px;
}

.spotlight-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.team-shortcut {
  min-width: 0;
  min-height: 76px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.team-shortcut:hover,
.star-card:hover {
  border-color: rgba(11, 111, 75, 0.45);
  box-shadow: 0 12px 28px rgba(31, 50, 40, 0.1);
}

.shortcut-flag {
  width: 28px;
  font-size: 24px;
  line-height: 1;
  text-align: center;
}

.shortcut-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.shortcut-main strong {
  overflow: hidden;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shortcut-main small,
.shortcut-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.shortcut-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shortcut-meta {
  grid-column: 2;
}

.star-grid {
  display: grid;
  gap: 10px;
}

.star-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.star-head,
.star-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.star-team {
  color: var(--field-dark);
  font-size: 13px;
  font-weight: 900;
}

.star-tag {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 8px;
  background: #edf7f0;
  color: #157245;
  font-size: 11px;
  font-weight: 900;
}

.star-card h3 {
  margin: 0;
  font-size: 18px;
}

.star-card p,
.star-card small {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.star-card small {
  font-weight: 800;
}

.star-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.band-note {
  max-width: 640px;
  margin: 8px 0 0;
  color: var(--muted);
}

.subscription-tool {
  display: grid;
  gap: 10px;
}

.subscription-tool label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.solid-button {
  min-height: 42px;
  padding: 0 16px;
  border-color: var(--field);
  background: var(--field);
  color: #fff;
  font-weight: 800;
}

.solid-button.secondary {
  border-color: var(--blue);
  background: var(--blue);
}

.result-count {
  color: var(--muted);
  font-weight: 700;
}

.standings-section {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.standings-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.standings-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.standings-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #f6faf7;
}

.standings-head h3 {
  margin: 0;
  font-size: 17px;
}

.standings-head span,
.standings-card p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.standings-card table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.standings-card th,
.standings-card td {
  padding: 9px 8px;
  border-bottom: 1px solid #eef3f0;
  font-size: 13px;
  text-align: right;
  white-space: nowrap;
}

.standings-card th:first-child,
.standings-card td:first-child {
  width: 38%;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
}

.standings-card th:last-child,
.standings-card td:last-child {
  width: 86px;
}

.standings-card tr:last-child td {
  border-bottom: 0;
}

.standings-card p {
  margin: 0;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--line);
}

.advance-pill {
  display: inline-flex;
  min-width: 58px;
  justify-content: center;
  border-radius: 999px;
  padding: 3px 7px;
  background: #eef5f1;
  color: var(--field-dark);
  font-size: 11px;
  font-weight: 900;
}

.advance-pill.advanced {
  background: #e8f7ee;
  color: #137b45;
}

.advance-pill.third_pending {
  background: #fff7e6;
  color: #9a640c;
}

.advance-pill.eliminated {
  background: #f3f4f6;
  color: #697386;
}

.schedule-list {
  display: grid;
  gap: 24px;
  padding-bottom: 24px;
}

.date-group {
  display: grid;
  gap: 12px;
}

.date-title {
  position: sticky;
  top: 63px;
  z-index: 9;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  background: rgba(251, 252, 251, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.date-title h3 {
  margin: 0;
  font-size: 18px;
}

.match-grid {
  display: grid;
  gap: 12px;
}

.match-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.match-card:target {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(215, 155, 56, 0.22);
}

.match-meta,
.match-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.match-time {
  font-weight: 900;
  color: var(--field-dark);
}

.status-pill {
  min-width: 58px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef5f1;
  color: var(--field-dark);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.status-pill.played {
  background: #edf0f6;
  color: #526078;
}

.status-pill.live {
  background: #fff0eb;
  color: var(--red);
}

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

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

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

.team-name {
  min-width: 0;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.flag {
  width: 24px;
  flex: 0 0 24px;
  text-align: center;
}

.score-box {
  min-width: 58px;
  padding: 8px 9px;
  border-radius: 8px;
  background: #18201d;
  color: #fff;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

.score-box.upcoming {
  background: #f3f6f4;
  color: var(--muted);
}

.match-detail {
  color: var(--muted);
  font-size: 13px;
}

.match-actions {
  margin-top: 12px;
  justify-content: flex-start;
}

.mini-link {
  min-height: 30px;
  padding: 0 10px;
  color: var(--field-dark);
  font-size: 12px;
  font-weight: 800;
}

.empty-state {
  padding: 44px 0 80px;
  text-align: center;
  color: var(--muted);
}

.footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 18px 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer p {
  margin: 4px 0 0;
}

.footer-main {
  display: grid;
  gap: 18px;
}

.footer-author {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.footer-author img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
}

.footer-author strong,
.footer-main > div > strong {
  color: var(--ink);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.footer-links a,
.footer-links button {
  min-height: 32px;
  padding: 0 10px;
}

.footer-links button {
  cursor: pointer;
}

.skeleton-line {
  opacity: 0.75;
}

@media (min-width: 720px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr) 390px;
    min-height: 340px;
  }

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

  .overview-item,
  .overview-item:nth-child(2n),
  .overview-item:nth-last-child(-n+2) {
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

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

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

  .calendar-band,
  .schedule-head,
  .section-head,
  .footer-main {
    grid-template-columns: minmax(0, 1fr) auto;
  }

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

  .spotlight-layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  }

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

  .subscription-tool {
    min-width: 390px;
  }

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

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

@media (min-width: 1080px) {
  .match-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 520px) {
  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
  }

  .icon-link,
  .profile-button {
    flex: 1;
  }

  .profile-button {
    flex-basis: 100%;
  }

  .dialog-panel {
    padding: 18px;
  }

  .creator-card {
    grid-template-columns: 1fr;
    padding-right: 34px;
  }

  .primary-filter {
    grid-template-columns: 1fr;
  }

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

  .team-shortcuts {
    grid-template-columns: 1fr;
  }

  .calendar-actions .solid-button {
    width: 100%;
  }
}
