:root {
  color-scheme: light;
  --page: #f5f6f3;
  --surface: #ffffff;
  --surface-soft: #f7f8f5;
  --ink: #202923;
  --muted: #6a746d;
  --line: #dfe5dc;
  --line-strong: #ccd7c9;
  --green: #4f8c43;
  --green-dark: #316d37;
  --green-soft: #eaf4e6;
  --blue: #3678a8;
  --blue-soft: #eaf3f9;
  --amber: #a66a13;
  --amber-soft: #fbf2df;
  --red: #bd4545;
  --red-soft: #fae9e8;
  --shadow: 0 5px 18px rgba(41, 60, 44, 0.06);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--page); }
body { margin: 0; color: var(--ink); background: var(--page); font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif; letter-spacing: 0; }
button, input { font: inherit; letter-spacing: 0; }
button { color: inherit; }
svg { width: 18px; height: 18px; stroke-width: 1.8; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-main { width: min(1320px, calc(100% - 48px)); min-height: 86px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand { min-width: 0; padding: 0; border: 0; background: transparent; display: flex; align-items: center; gap: 12px; cursor: pointer; text-align: left; }
.brand-mark { width: 44px; height: 44px; border-radius: 7px; display: grid; place-items: center; color: #fff; background: var(--green); }
.brand-mark svg { width: 24px; height: 24px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 22px; font-weight: 700; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.search-box { width: min(480px, 46vw); height: 46px; padding: 0 10px 0 14px; border: 1px solid var(--line-strong); border-radius: 6px; display: flex; align-items: center; gap: 10px; background: #fafbf9; box-shadow: inset 0 0 0 3px rgba(71, 93, 74, 0.03); }
.search-box:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(79, 140, 67, 0.12); }
.search-box > svg { flex: 0 0 auto; color: var(--muted); }
.search-box input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 14px; }
.search-box input::placeholder { color: #919991; }
.search-box kbd { padding: 4px 8px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); background: var(--surface); font-family: inherit; font-size: 11px; white-space: nowrap; }
.primary-nav { background: var(--green); }
.nav-inner { width: min(1320px, calc(100% - 48px)); height: 44px; margin: 0 auto; display: flex; align-items: stretch; overflow-x: auto; scrollbar-width: none; }
.nav-inner::-webkit-scrollbar { display: none; }
.nav-item { min-width: max-content; padding: 0 18px; border: 0; background: transparent; color: rgba(255,255,255,.9); display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; font-size: 13px; }
.nav-item:hover, .nav-item.is-active { color: #fff; background: var(--green-dark); }
.nav-item svg { width: 16px; height: 16px; }
.nav-item b { min-width: 20px; padding: 1px 6px; border-radius: 10px; color: var(--green-dark); background: #fff; font-size: 10px; }

.page-shell { width: min(1320px, calc(100% - 48px)); margin: 22px auto 46px; display: grid; grid-template-columns: 206px minmax(0, 1fr); gap: 20px; align-items: start; }
.category-sidebar { position: sticky; top: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); box-shadow: var(--shadow); }
.sidebar-title { min-height: 48px; padding: 0 14px; display: flex; align-items: center; gap: 9px; color: var(--green-dark); background: var(--green-soft); border-bottom: 1px solid var(--line); }
.sidebar-title svg { width: 17px; height: 17px; }
.sidebar-title strong { font-size: 14px; }
.category-list { padding: 5px 0; }
.category-list button { width: 100%; min-height: 42px; padding: 0 12px; border: 0; border-bottom: 1px solid #eef1ec; background: transparent; display: grid; grid-template-columns: 15px minmax(0, 1fr) auto; gap: 8px; align-items: center; text-align: left; cursor: pointer; color: #4c574f; font-size: 12px; }
.category-list button:last-child { border-bottom: 0; }
.category-list button:hover { background: var(--surface-soft); color: var(--green-dark); }
.category-list button.is-active { color: var(--green-dark); background: #f2f8ef; font-weight: 600; }
.category-list svg { width: 14px; height: 14px; }
.category-list b { color: #909991; font-size: 10px; font-weight: 500; }
.status-legend { padding: 14px; border-top: 1px solid var(--line); background: var(--surface-soft); display: grid; gap: 8px; }
.status-legend strong { margin-bottom: 2px; font-size: 12px; }
.status-legend span { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.legend-dot.open { background: var(--green); }
.legend-dot.ended { background: var(--red); }
.legend-dot.pending { background: #98a19a; }

.content-area { min-width: 0; }
.view { display: none; }
.view.is-visible { display: block; }
.page-heading { min-height: 126px; padding: 24px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; display: flex; align-items: center; justify-content: space-between; gap: 24px; box-shadow: var(--shadow); }
.page-heading h1 { margin: 0; font-size: 25px; line-height: 1.3; font-weight: 700; }
.page-heading > div > p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.eyebrow, .section-kicker { margin: 0 0 4px; color: var(--green); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.quick-stats { display: grid; grid-template-columns: repeat(3, minmax(88px, 1fr)); align-self: stretch; border-left: 1px solid var(--line); }
.quick-stats span { min-width: 95px; padding: 0 20px; display: flex; flex-direction: column; justify-content: center; color: var(--muted); font-size: 11px; }
.quick-stats strong { display: block; color: var(--ink); font-size: 25px; line-height: 1.25; font-weight: 700; font-variant-numeric: tabular-nums; }
.compact-heading { min-height: 112px; margin-bottom: 16px; }
.result-count { color: var(--muted); font-size: 12px; white-space: nowrap; }

.content-section { margin-top: 18px; padding: 22px 0 0; border-top: 1px solid var(--line-strong); }
.section-head { min-height: 43px; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-head h2 { margin: 0; font-size: 17px; font-weight: 700; }
.text-button, .clear-button { border: 0; background: transparent; display: inline-flex; align-items: center; gap: 6px; color: var(--green-dark); cursor: pointer; font-size: 12px; }
.text-button { padding: 8px 0; }
.text-button:hover { text-decoration: underline; }
.text-button svg, .clear-button svg { width: 15px; height: 15px; }

.competition-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.competition-grid.wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.competition-card { min-width: 0; min-height: 220px; padding: 16px; border: 1px solid var(--line); border-top: 3px solid var(--green); border-radius: 7px; background: var(--surface); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.category-chip { color: var(--blue); font-size: 11px; }
.competition-card h2 { margin: 15px 0 10px; font-size: 15px; line-height: 1.55; font-weight: 700; }
.card-time { margin: 0; min-height: 21px; display: flex; align-items: flex-start; gap: 7px; color: #49554c; font-size: 12px; line-height: 1.55; }
.card-time svg { width: 15px; height: 15px; margin-top: 2px; flex: 0 0 auto; color: var(--green); }
.card-note { margin: 8px 0 16px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.competition-card footer { margin-top: auto; padding-top: 11px; border-top: 1px solid #edf0eb; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; }
.competition-card footer button, .competition-card footer a { padding: 0; border: 0; background: transparent; color: var(--green-dark); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; font-size: 11px; }
.competition-card footer button:hover, .competition-card footer a:hover { text-decoration: underline; }
.competition-card footer svg { width: 13px; height: 13px; }

.tag { min-height: 23px; padding: 2px 8px; border-radius: 4px; display: inline-flex; align-items: center; font-size: 10px; font-weight: 600; white-space: nowrap; }
.tag.open { color: var(--green-dark); background: var(--green-soft); }
.tag.ended { color: var(--red); background: var(--red-soft); }
.tag.pending { color: #667169; background: #edf0ed; }

.notice-list { overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); box-shadow: var(--shadow); }
.notice-list.full { margin-top: 12px; }
.notice-item { padding: 16px 18px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 13px; }
.notice-item:last-child { border-bottom: 0; }
.notice-icon { width: 36px; height: 36px; border-radius: 6px; display: grid; place-items: center; }
.notice-icon.topics { color: var(--blue); background: var(--blue-soft); }
.notice-icon.registration { color: var(--green); background: var(--green-soft); }
.notice-icon.rules { color: var(--amber); background: var(--amber-soft); }
.notice-main { min-width: 0; }
.notice-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.notice-title strong { font-size: 14px; }
.notice-title > span { padding: 2px 6px; border-radius: 4px; color: var(--muted); background: var(--surface-soft); font-size: 10px; }
.notice-main > p { margin: 6px 0 8px; color: #4f5b52; font-size: 12px; line-height: 1.7; }
.notice-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 10px; }
.notice-meta span, .notice-meta a { display: inline-flex; align-items: center; gap: 4px; }
.notice-meta a { color: var(--green-dark); text-decoration: none; }
.notice-meta a:hover { text-decoration: underline; }
.notice-meta svg { width: 12px; height: 12px; }

.section-toolbar { min-height: 46px; margin: 0 0 12px; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.competition-toolbar { align-items: center; }
.segmented { padding: 4px; border-radius: 6px; background: #e8ede6; display: flex; flex-wrap: wrap; gap: 4px; }
.segmented button, .filter-row button { min-height: 32px; padding: 0 11px; border: 0; border-radius: 4px; cursor: pointer; color: var(--muted); background: transparent; font-size: 11px; }
.segmented button.is-active { color: var(--ink); background: var(--surface); box-shadow: 0 1px 4px rgba(42, 64, 45, .1); }
.filter-row { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-row button { border: 1px solid var(--line); background: var(--surface); }
.filter-row button.is-active { border-color: var(--green); color: var(--green-dark); background: var(--green-soft); }
.status-filters button[data-registration-filter="ended"].is-active { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.status-filters button[data-registration-filter="pending"].is-active { border-color: #8c978f; color: #566159; background: #edf0ed; }
.clear-button { min-height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--muted); }
.clear-button:hover { color: var(--green-dark); border-color: var(--green); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); box-shadow: var(--shadow); }
table { width: 100%; min-width: 900px; border-collapse: collapse; }
th, td { padding: 13px 15px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; font-size: 12px; }
th { color: var(--muted); background: var(--surface-soft); font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
.competition-row:hover { background: #fbfcfa; }
.competition-name-wrap { display: flex; align-items: center; gap: 9px; }
.competition-name-wrap > div { min-width: 0; }
.competition-name, .track-count { display: block; }
.competition-name { font-size: 13px; font-weight: 600; }
.track-count { margin-top: 3px; color: var(--muted); font-size: 10px; }
.expand-button, .track-expand-button { width: 25px; height: 25px; padding: 0; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 4px; display: grid; place-items: center; color: var(--green-dark); background: var(--surface); cursor: pointer; }
.expand-button:hover, .track-expand-button:hover { border-color: var(--green); background: var(--green-soft); }
.expand-button svg, .track-expand-button svg { width: 14px; height: 14px; transition: transform .16s ease; }
.expand-button[aria-expanded="true"] svg, .track-expand-button[aria-expanded="true"] svg { transform: rotate(90deg); }
.registration-time { color: #526057; font-variant-numeric: tabular-nums; white-space: nowrap; }
.official-link, .track-source { color: var(--green-dark); text-decoration: none; white-space: nowrap; }
.official-link { display: inline-flex; align-items: center; gap: 5px; }
.official-link:hover, .track-source:hover { text-decoration: underline; }
.official-link svg { width: 13px; height: 13px; }
.official-missing, .track-source.muted { color: var(--muted); }
.track-row[hidden], .track-children[hidden] { display: none; }
.track-row td { padding: 0 14px 14px 49px; background: #fbfcfa; }
.track-panel { overflow: hidden; border: 1px solid var(--line); border-left: 3px solid var(--green); border-radius: 6px; }
.track-panel-head { min-height: 41px; padding: 0 12px; border-bottom: 1px solid var(--line); background: #f3f7f1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.track-panel-head strong { font-size: 12px; }
.track-panel-head span { color: var(--muted); font-size: 10px; }
.track-item { min-width: 0; padding: 11px 12px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(180px, 1fr) 88px minmax(170px, .72fr) minmax(180px, 1fr) auto; align-items: center; gap: 12px; background: var(--surface); }
.track-item:last-child { border-bottom: 0; }
.track-level-3 { padding-left: 43px; background: #f7faf6; }
.track-name-line { min-width: 0; display: flex; align-items: center; gap: 8px; }
.track-name strong, .track-name span { display: block; }
.track-name strong { font-size: 12px; font-weight: 600; }
.track-name span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.track-note { color: var(--muted); font-size: 10px; line-height: 1.55; }

.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.guide-card { position: relative; min-height: 210px; padding: 22px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); box-shadow: var(--shadow); }
.guide-card > span { position: absolute; top: 17px; right: 18px; color: #d7ded5; font-size: 28px; font-weight: 700; }
.guide-card > svg { width: 36px; height: 36px; padding: 8px; border-radius: 6px; color: var(--green-dark); background: var(--green-soft); }
.guide-card h2 { margin: 23px 0 8px; font-size: 16px; }
.guide-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }

.empty-inline { grid-column: 1 / -1; padding: 34px 20px; border: 1px dashed var(--line-strong); border-radius: 6px; color: var(--muted); background: var(--surface); text-align: center; font-size: 12px; }
.empty-state { grid-column: 1 / -1; min-height: 260px; display: grid; place-content: center; justify-items: center; gap: 7px; color: var(--muted); }
.empty-state[hidden] { display: none; }
.empty-state svg { width: 28px; height: 28px; }
.empty-state strong { color: var(--ink); font-size: 14px; }
.empty-state span { font-size: 12px; }
.site-footer { min-height: 68px; padding: 14px 24px; border-top: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; justify-content: center; gap: 22px; color: var(--muted); font-size: 11px; }
.site-footer span:first-child { color: var(--green-dark); font-weight: 600; }

@media (max-width: 1120px) {
  .competition-grid, .competition-grid.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-stats { grid-template-columns: 1fr; }
  .quick-stats span { padding: 5px 22px; flex-direction: row; align-items: baseline; gap: 5px; }
  .quick-stats strong { font-size: 20px; }
}

@media (max-width: 820px) {
  .header-main, .nav-inner, .page-shell { width: min(100% - 28px, 720px); }
  .header-main { min-height: 112px; padding: 14px 0; align-items: stretch; flex-direction: column; gap: 12px; }
  .search-box { width: 100%; }
  .nav-item { padding: 0 13px; }
  .page-shell { display: block; margin-top: 14px; }
  .category-sidebar { position: static; margin-bottom: 14px; }
  .category-list { padding: 8px; display: flex; gap: 6px; overflow-x: auto; }
  .category-list button { width: auto; min-width: max-content; min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 4px; grid-template-columns: 14px auto auto; }
  .status-legend { display: none; }
  .page-heading { padding: 20px; }
  .home-heading { display: block; }
  .quick-stats { margin-top: 18px; padding-top: 14px; border-left: 0; border-top: 1px solid var(--line); grid-template-columns: repeat(3, 1fr); }
  .quick-stats span { padding: 0 10px; flex-direction: column; }
}

@media (max-width: 620px) {
  .header-main, .nav-inner, .page-shell { width: calc(100% - 24px); }
  .brand-mark { width: 38px; height: 38px; }
  .brand strong { font-size: 19px; }
  .nav-inner { width: 100%; }
  .nav-item { min-height: 46px; flex: 1 0 auto; }
  .page-heading { min-height: auto; display: block; padding: 18px; }
  .page-heading h1 { font-size: 21px; }
  .compact-heading .result-count { display: block; margin-top: 12px; }
  .quick-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quick-stats span { min-width: 0; font-size: 10px; }
  .quick-stats strong { font-size: 19px; }
  .competition-grid, .competition-grid.wide, .guide-grid { grid-template-columns: 1fr; }
  .competition-card { min-height: 205px; }
  .section-toolbar { align-items: flex-start; flex-direction: column; }
  .competition-toolbar { align-items: stretch; }
  .clear-button { width: fit-content; }
  .notice-item { padding: 14px; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; }
  .notice-icon { width: 32px; height: 32px; }
  .notice-title { align-items: flex-start; flex-direction: column; gap: 5px; }
  .track-row td { padding-left: 12px; }
  .track-panel-head { min-height: 50px; align-items: flex-start; justify-content: center; flex-direction: column; gap: 2px; padding-block: 8px; }
  .track-item { grid-template-columns: 1fr auto; gap: 8px; }
  .track-item .registration-time, .track-note { grid-column: 1 / -1; }
  .track-level-3 { padding-left: 28px; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 5px; }
}

@media (max-width: 390px) {
  .search-box kbd { display: none; }
  .quick-stats { grid-template-columns: 1fr; }
  .quick-stats span { flex-direction: row; align-items: baseline; gap: 5px; }
}
