:root {
  font-family: Inter, 'Microsoft YaHei UI', 'PingFang SC', system-ui, sans-serif;
  color: #11233b;
  background: #edf3fa;
  font-synthesis: none;
  --ink: #11233b;
  --muted: #546881;
  --blue: #1b54c4;
  --border: #dce6f1;
  --paper: #fff;
  scroll-behavior: smooth;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #5796ff;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
p,
h1,
h2,
h3 {
  margin: 0;
}
.wrap {
  width: min(1240px, calc(100% - 64px));
  margin-inline: auto;
}
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #ffffffed;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.top-inner {
  min-height: 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #1341a5;
  color: #fff;
  font-size: 25px;
}
.brand b,
.brand small {
  display: block;
  white-space: nowrap;
}
.brand b {
  font-size: 16px;
}
.brand small {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.top nav {
  display: flex;
  align-self: stretch;
  gap: 28px;
}
.top nav a {
  display: grid;
  place-items: center;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.top nav a[aria-current],
.top nav a:hover {
  color: var(--blue);
  border-color: var(--blue);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 11px;
}
.clock {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  white-space: nowrap;
}
.refresh,
.star,
.close {
  border: 1px solid var(--border);
  background: white;
  border-radius: 9px;
  color: var(--blue);
  min-width: 34px;
  height: 34px;
  font-size: 20px;
}
.refresh:hover,
.star:hover,
.close:hover {
  background: #eaf2ff;
}
main {
  padding-top: 23px;
}
#overview,
#schedule,
#china {
  scroll-margin-top: 89px;
}
.hero {
  height: 318px;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  background: #081934 url('./assets/ice-racing.webp') 55% center/cover no-repeat;
  color: white;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, #06152df2 0%, #071831aa 38%, transparent 70%),
    linear-gradient(0deg, #05132e66, transparent 35%);
}
.hero-content {
  padding: 30px 46px;
}
.hero-kicker {
  display: flex;
  gap: 9px;
  align-items: center;
  color: #c3defe;
  font-size: 13px;
  letter-spacing: 0.09em;
  font-weight: 650;
}
.hero-kicker span {
  width: 14px;
  height: 2px;
  background: #7db5ff;
}
.hero h1 {
  font-size: clamp(36px, 5.2vw, 66px);
  line-height: 1.13;
  letter-spacing: -0.055em;
  margin: 15px 0 12px;
}
.hero-sub {
  font-size: 15px;
  color: #d7e8fa;
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  gap: 11px;
  flex-wrap: wrap;
  margin-top: 25px;
}
.hero-actions a {
  display: flex;
  gap: 17px;
  align-items: center;
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  background: #eef6ff;
  color: #133466;
}
.hero-actions a + a {
  background: #13294b99;
  border: 1px solid #91b1d559;
  color: white;
}
.hero-actions a:hover {
  background: #c9e2ff;
  color: #102b59;
}
.hero-caption {
  position: absolute;
  bottom: 12px;
  right: 16px;
  font-size: 10px;
  color: #e0edff;
  background: #06152da6;
  padding: 3px 7px;
  border-radius: 5px;
}
.monitor {
  margin-top: 26px;
}
.section-head,
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.section-head {
  margin-bottom: 13px;
}
.section-head h2,
.panel-head h2 {
  font-size: 23px;
  letter-spacing: -0.035em;
  line-height: 1.35;
}
.section-head p,
.panel-head p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.55;
}
.live-dot {
  display: inline-block;
  vertical-align: 3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #245dc9;
  box-shadow: 0 0 0 4px #d7e6ff;
  margin: 0 5px;
}
.live-dot.active {
  background: #c92040;
  box-shadow: 0 0 0 4px #fbdce4;
}
.sync {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 11px;
  color: var(--muted);
  padding-top: 7px;
  text-align: right;
}
.sync label {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.sync input {
  accent-color: var(--blue);
  margin: 0;
}
.featured {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.event-card {
  position: relative;
  background: white;
  border: 1px solid var(--border);
  border-top: 3px solid #adc9f2;
  border-radius: 13px;
  padding: 15px 17px 13px;
  min-width: 0;
}
.event-card.live {
  border-top-color: #e14764;
  background: #fffafd;
}
.event-card .card-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 11px;
}
.pill {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border-radius: 6px;
  background: #e9f1ff;
  color: #164ba7;
  padding: 4px 7px;
  font-size: 11px;
  line-height: 1.3;
  font-weight: 750;
}
.pill.short {
  background: #e0f3f2;
  color: #146662;
}
.pill.figure {
  background: #eee9fe;
  color: #593a9f;
}
.pill.synchro {
  background: #faeaf3;
  color: #8a3668;
}
.pill.live {
  background: #ffe4e9;
  color: #a71834;
}
.pill.quiet {
  background: #edf1f6;
  color: #4e6077;
}
.state-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.event-card h3 {
  font-size: 17px;
  line-height: 1.45;
  margin-bottom: 4px;
}
.card-open {
  padding: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  border: 0;
  background: none;
}
.card-open::after {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  content: '';
}
.card-open:hover,
.card-open:focus-visible {
  color: var(--blue);
}
.event-card .card-foot a {
  position: relative;
  z-index: 1;
}
.event-card .card-foot .card-action {
  color: var(--blue);
  font-weight: 750;
  white-space: nowrap;
}
.live-glance {
  display: grid;
  gap: 3px;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #edf4ff;
  color: #1b3659;
  font-size: 12px;
  line-height: 1.4;
}
.live-glance small {
  color: var(--muted);
}
.event-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.event-card .card-foot {
  margin-top: 12px;
  padding-top: 9px;
  border-top: 1px solid #edf1f7;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.card-foot span {
  font-size: 11px;
  color: var(--muted);
}
.text-button,
.source-link {
  color: var(--blue);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}
.text-button {
  border: 0;
  background: none;
  padding: 5px 0;
}
.text-button:hover,
.source-link:hover {
  text-decoration: underline;
}
.lower {
  margin: 22px 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(310px, 1fr);
  gap: 17px;
  align-items: start;
}
.panel {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 20px;
  min-width: 0;
}
.panel-head {
  margin-bottom: 16px;
}
.panel-head .source-link {
  padding-top: 7px;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 12px;
}
.tabs button {
  padding: 6px 10px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: #f0f4fa;
  color: #40536d;
  font-size: 12px;
  white-space: nowrap;
}
.tabs button[aria-pressed='true'] {
  background: #1747ad;
  color: white;
}
.filters {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 10px;
}
.filters input,
.filters select,
.team-filters select,
#athlete-search {
  width: 100%;
  min-width: 0;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #f8fafd;
  color: #19314e;
  padding: 8px 10px;
  font-size: 13px;
}
.schedule-row {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid #e8eef5;
}
.schedule-row time {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  color: #334f75;
}
.schedule-row h3 {
  font-size: 14px;
  line-height: 1.45;
}
.schedule-row p {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.schedule-row .event-name {
  text-align: left;
  color: inherit;
  font: inherit;
  border: 0;
  background: none;
  padding: 0;
}
.event-name:hover {
  color: var(--blue);
}
.star {
  height: 30px;
  min-width: 31px;
  font-size: 17px;
  color: #506b8b;
}
.star[aria-pressed='true'] {
  color: #a45a05;
  background: #fff5df;
  border-color: #ead19d;
}
.more {
  width: 100%;
  margin-top: 10px;
  color: var(--blue);
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #f7faff;
  padding: 8px;
  font-size: 12px;
  font-weight: 700;
}
.china-mark {
  display: inline-grid;
  vertical-align: 3px;
  place-items: center;
  height: 17px;
  width: 23px;
  background: #cf243b;
  color: #ffe46b;
  border-radius: 4px;
  font-size: 11px;
  margin-right: 3px;
}
.team-filters {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}
.team-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 7px;
  align-items: center;
  margin: 13px 0 3px;
  font-size: 12px;
  color: var(--muted);
}
.athlete-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #edf1f7;
  align-items: center;
}
.athlete-row strong {
  display: block;
  font-size: 13px;
}
.athlete-row small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}
.athlete-row > span {
  font-size: 11px;
  color: #4b607a;
  text-align: right;
  max-width: 110px;
}
.empty {
  padding: 14px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.footer {
  padding-block: 22px 28px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}
.footer a {
  margin-left: 12px;
}
.footer a:hover {
  text-decoration: underline;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
dialog {
  width: min(650px, calc(100% - 24px));
  max-height: 85dvh;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  color: var(--ink);
  box-shadow: 0 14px 60px #0b234b44;
}
dialog::backdrop {
  background: #07162f80;
}
dialog h2 {
  margin: 8px 42px 6px 0;
}
dialog h3 {
  margin: 18px 0 8px;
  font-size: 16px;
}
dialog p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}
.close {
  position: absolute;
  right: 14px;
  top: 14px;
}
.detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 12px 0;
}
.session {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid #edf1f7;
  font-size: 13px;
}
.session time {
  font-variant-numeric: tabular-nums;
  color: #334f75;
}
.session small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
@media (max-width: 850px) {
  .wrap {
    width: calc(100% - 34px);
  }
  .hero {
    height: 292px;
  }
  .hero-content {
    padding-left: 30px;
  }
  .top nav {
    gap: 14px;
  }
  .clock {
    display: none;
  }
  .lower {
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 1fr);
    gap: 12px;
  }
  .panel {
    padding: 15px;
  }
  .event-card {
    padding: 12px;
  }
  .featured {
    gap: 9px;
  }
}
@media (max-width: 660px) {
  .wrap {
    width: calc(100% - 24px);
  }
  .top-inner {
    min-height: 0;
    padding-top: 9px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0;
  }
  .brand-mark {
    width: 33px;
    height: 33px;
    font-size: 21px;
  }
  .brand b {
    font-size: 14px;
  }
  .top nav {
    grid-column: 1/-1;
    grid-row: 2;
    gap: 22px;
    min-height: 37px;
  }
  .top nav a {
    font-size: 12px;
  }
  .header-actions {
    grid-row: 1;
    grid-column: 2;
  }
  .clock {
    display: block;
    font-size: 10px;
  }
  main {
    padding-top: 12px;
  }
  .hero {
    height: 244px;
    background-position: 60% center;
    border-radius: 13px;
  }
  .hero::before {
    background: linear-gradient(90deg, #06152cfb 0%, #06152dda 34%, #06152d35 100%);
  }
  .hero-content {
    padding: 20px;
  }
  .hero h1 {
    margin: 12px 0 8px;
  }
  .hero-kicker,
  .hero-sub {
    font-size: 12px;
  }
  .hero-actions {
    margin-top: 17px;
  }
  .hero-actions a {
    padding: 8px 10px;
    font-size: 12px;
  }
  .hero-caption {
    right: 8px;
    bottom: 7px;
  }
  .monitor {
    margin-top: 19px;
  }
  .section-head h2,
  .panel-head h2 {
    font-size: 20px;
  }
  .sync {
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    padding-top: 2px;
  }
  .featured,
  .lower {
    grid-template-columns: 1fr;
  }
  .event-card .card-top {
    margin-bottom: 6px;
  }
  .event-card .card-foot {
    margin-top: 7px;
    padding-top: 6px;
  }
  .lower {
    margin-top: 14px;
  }
  .footer {
    flex-wrap: wrap;
  }
  .footer a {
    margin: 0 12px 0 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  :root {
    scroll-behavior: auto;
  }
}
.athlete-row {
  cursor: pointer;
  list-style: none;
}
.athlete-row::-webkit-details-marker {
  display: none;
}
.athlete-row > span::after {
  content: ' ＋';
  color: #3869b2;
}
.athlete[open] .athlete-row > span::after {
  content: ' −';
}
.athlete-events,
.athlete-note {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  padding: 9px 8px 9px 21px;
  background: #f5f8fd;
  line-height: 1.65;
}
.athlete-note {
  padding-left: 9px;
}

.timing-panel {
  margin-block: 12px 18px;
  padding: 12px;
  border: 1px solid #dce7f5;
  border-radius: 10px;
  background: #f8fbff;
}
.timing-panel h3 {
  margin-top: 0;
}
.timing-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-size: 13px;
}
.timing-controls select {
  max-width: 100%;
  padding: 5px;
  border: 1px solid #b8cce5;
  border-radius: 5px;
  font: inherit;
  color: inherit;
  background: white;
}
.timing-controls label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.timing-status {
  margin-block: 8px;
}
.timing-table-wrap {
  margin-top: 8px;
  overflow: auto;
  max-height: min(42vh, 26rem);
}
.timing-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  background: white;
}
.timing-table th,
.timing-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #e4edf8;
  vertical-align: top;
}
.timing-table th {
  position: sticky;
  top: 0;
  background: #e8f0fb;
  white-space: nowrap;
}
.timing-table td small {
  display: block;
  color: var(--muted);
}
.timing-table td:not(:nth-child(2)) {
  white-space: nowrap;
}
.timing-china {
  background: #fff4eb;
}
.timing-laps summary {
  color: #1b54c4;
  cursor: pointer;
}
