:root {
  color-scheme: light;
  --ink: #102343;
  --muted: #526784;
  --blue: #1958b7;
  --line: #dce6f2;
  --wash: #f2f6fd;
  --white: #fff;
  --red: #a92634;
  --shadow: 0 8px 28px #16365e09;
  font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--wash);
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: var(--blue); text-decoration: none; }
button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #408df3; outline-offset: 3px; }
button, a { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin: 0; }
small, time { font-variant-numeric: tabular-nums; }
.wrap { width: min(1232px, calc(100% - 56px)); margin-inline: auto; }
.header { background: #fffffff2; border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 22px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); font-weight: 800; line-height: 1.25; white-space: nowrap; }
.brand small { display: block; color: var(--muted); font-size: .72rem; margin-top: 3px; font-weight: 600; }
.logo { display: grid; place-items: center; width: 44px; height: 38px; background: #122b57; color: #fff; border-radius: 9px; font: 800 italic 19px system-ui; letter-spacing: .08em; }
nav, .header-actions { display: flex; align-items: center; gap: 24px; }
nav a { color: var(--ink); font-size: .9rem; font-weight: 700; white-space: nowrap; }
nav a:hover, .race-title button:hover, .card h3 button:hover { color: var(--blue); }
.header-actions { gap: 10px; }
#clock { color: var(--muted); font-size: .78rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.icon-button { border: 1px solid var(--line); background: var(--white); border-radius: 9px; width: 36px; height: 36px; padding: 0; font-size: 1.4rem; line-height: 1; }
.icon-button:hover { background: #e8f2ff; }
.hero { position: relative; display: flex; align-items: center; min-height: 305px; margin-top: 23px; border-radius: 18px; overflow: hidden; color: #fff; background: #10264a url('./assets/slalom.webp') center / cover no-repeat; }
.hero-content { padding: 38px clamp(24px, 5vw, 72px); position: relative; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.15; margin: 12px 0 10px; letter-spacing: .045em; }
.hero p { color: #d5e6ff; line-height: 1.65; }
.hero .kicker { font-size: .78rem; letter-spacing: .12em; font-weight: 800; }
.hero-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-links a { color: #fff; background: #ffffff25; border: 1px solid #ffffff65; padding: 9px 14px; border-radius: 7px; font-size: .83rem; font-weight: 700; }
.hero-links a:first-child { color: #102343; background: #f5faff; }
.hero-links a:hover { box-shadow: 0 0 0 2px #ffffff45; }
.hero-links span { margin-inline-start: 9px; }
.photo-caption { position: absolute; right: 12px; bottom: 10px; padding: 4px 7px; border-radius: 4px; background: #0b234bca; color: #e0edff; font-size: .68rem; }
.monitor { margin: 28px 0 24px; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.section-head h2 { display: flex; align-items: center; gap: 9px; font-size: 1.32rem; line-height: 1.3; }
.section-head p, .subtle { color: var(--muted); font-size: .82rem; margin-top: 5px; line-height: 1.5; }
.live-dot { width: 10px; height: 10px; background: #d23c50; border-radius: 50%; box-shadow: 0 0 0 4px #f6d9e1; margin-left: 4px; }
.sync { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; text-align: right; color: var(--muted); font-size: .76rem; }
.sync label { white-space: nowrap; }
.sync input { accent-color: var(--blue); vertical-align: -2px; }
.featured { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.card, .panel { border: 1px solid var(--line); background: #fff; border-radius: 13px; box-shadow: var(--shadow); min-width: 0; }
.card { display: grid; align-content: start; gap: 8px; padding: 15px; border-top: 3px solid #82a7df; }
.card-live { border-top-color: #d23c50; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .77rem; }
.pill { display: inline-flex; align-items: center; gap: 5px; width: max-content; white-space: nowrap; padding: 4px 8px; border-radius: 6px; font-size: .72rem; font-weight: 750; color: #31547b; background: #eaf1fa; }
.pill.live { background: #ffebee; color: var(--red); }
.pill.live::before { content: ''; width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
.pill.current { color: #215ea9; background: #e8f2ff; }
.pill.done, .pill.cancelled { color: #546378; background: #edf0f4; }
.card h3 { margin-top: 2px; }
.card h3 button, .race-title button { background: none; border: 0; font-weight: 800; padding: 0; text-align: left; overflow-wrap: anywhere; }
.card h3 button { font-size: 1.02rem; }
.card h3 span { color: var(--blue); }
.venue { font-size: .76rem; color: var(--muted); }
.glance { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 8px; padding: 9px 10px; background: #f1f6fd; border-radius: 8px; }
.glance small { grid-column: 1 / -1; color: var(--muted); font-size: .71rem; }
.glance strong { font-size: .84rem; }
.glance time { color: var(--blue); font-weight: 800; font-size: .77rem; white-space: nowrap; }
.card-note, .china-glance { line-height: 1.5; font-size: .75rem; }
.card-note { color: var(--muted); }
.china-glance { color: #712330; background: #fff3f5; border: 0; border-radius: 7px; text-align: left; padding: 6px 8px; }
.china-glance span { color: var(--red); font-weight: 800; margin-right: 2px; }
.china-glance small { font-size: .71rem; white-space: nowrap; }
.lower { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.panel { padding: 17px; scroll-margin-top: 15px; }
.source { font-size: .78rem; font-weight: 720; }
.section-head .source { white-space: nowrap; margin-top: 4px; }
.source:hover, .athlete a:hover { text-decoration: underline; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tabs button { padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: #29486e; font-size: .77rem; }
.tabs button[aria-pressed="true"] { background: #1855ab; color: #fff; border-color: #1855ab; }
.filters { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
input[type="search"], select { border: 1px solid #ccd9ea; border-radius: 8px; background: #fff; color: var(--ink); min-width: 0; min-height: 38px; padding: 7px 9px; font-size: .83rem; }
#team-event, #athlete-search { width: 100%; margin-bottom: 8px; }
.list-count { color: var(--muted); font-size: .74rem; margin: 12px 0 4px; }
.race-row { display: grid; grid-template-columns: 53px minmax(0, 1fr) auto 26px; gap: 9px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.date-tile { display: grid; place-content: center; text-align: center; min-height: 45px; color: #194d96; background: #eef5fe; border-radius: 7px; font-variant-numeric: tabular-nums; }
.date-tile b { font-size: .84rem; }
.date-tile small { font-size: .66rem; }
.race-title button { font-size: .88rem; }
.race-title p { color: var(--muted); font-size: .74rem; margin-top: 3px; }
.star { border: 0; background: none; color: #805507; font-size: 1.19rem; padding: 0; }
.more { width: 100%; margin-top: 12px; padding: 8px; color: var(--blue); border: 1px solid var(--line); background: #f5f9ff; border-radius: 7px; font-size: .84rem; }
.flag { display: grid; place-items: center; width: 25px; height: 20px; color: #ffe194; background: #ac2737; font-size: .82rem; border-radius: 4px; }
.athlete { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .83rem; }
.athlete strong { overflow-wrap: anywhere; }
.athlete > div:nth-child(2) { text-align: right; }
.athlete small, .home-race small { display: block; color: var(--muted); margin-top: 3px; font-size: .72rem; }
#home-races h3 { margin: 18px 0 8px; font-size: .95rem; }
.home-race { display: flex; justify-content: space-between; align-items: center; text-align: left; gap: 8px; background: #f3f7fc; border: 1px solid var(--line); border-radius: 7px; padding: 8px 9px; margin-top: 6px; width: 100%; font-size: .85rem; }
.home-race time { color: var(--blue); font-size: .76rem; white-space: nowrap; }
.empty { grid-column: 1 / -1; color: var(--muted); font-size: .84rem; padding: 14px 8px; line-height: 1.6; }
.footer { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: .77rem; border-top: 1px solid var(--line); margin-top: 26px; padding: 20px 0; }
.footer a + a { margin-left: 12px; }
dialog { width: min(690px, calc(100% - 26px)); max-height: calc(100dvh - 36px); padding: 22px; color: var(--ink); background: #f8fbff; border: 1px solid var(--line); border-radius: 15px; }
dialog::backdrop { background: #0e2339a8; }
dialog form { position: absolute; top: 12px; right: 12px; }
.detail-kicker, .session time { color: var(--muted); font-size: .8rem; }
#detail-title { margin: 5px 35px 5px 0; font-size: 1.36rem; }
.session { margin-top: 9px; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.session-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.session h3 { margin-top: 4px; font-size: .97rem; }
.session-china { margin-top: 7px; color: #762937; background: #fff3f5; padding: 7px; border-radius: 5px; line-height: 1.6; font-size: .79rem; }
.session-links { display: flex; gap: 12px; margin-top: 8px; }
@media (max-width: 940px) {
  .featured { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lower { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .wrap { width: calc(100% - 24px); }
  .bar { flex-wrap: wrap; min-height: auto; gap: 11px; padding: 9px 0 10px; }
  nav { order: 3; width: 100%; gap: 20px; padding: 3px 0; }
  .hero { min-height: 238px; margin-top: 12px; background-image: linear-gradient(90deg, #071a36ae, #071a3625), url('./assets/slalom.webp'); background-position: center, 63% center; }
  .hero-content { padding: 22px 16px; }
  .hero h1 { letter-spacing: 0; }
  .hero-content > p:not(.kicker) { max-width: 235px; font-size: .86rem; }
  .monitor { margin-top: 20px; }
  .featured, .lower { grid-template-columns: 1fr; }
  .panel { padding: 12px; }
  .race-row { gap: 6px; }
  .sync { gap: 2px 8px; }
  .footer { flex-wrap: wrap; }
}
