/* Presentation palettes and navigation styles; business handlers and artwork stay unchanged. */
@media screen {
  :root[data-theme] {
    --theme-page:#fff; --theme-text:#15171b; --theme-muted:#626976;
    --theme-panel:#fff; --theme-raised:#f2f5fa; --theme-line:#dce2eb;
    --theme-tint:#eaf0ff; --theme-green:#edf5f0; --theme-brown:#f7eee7;
    --theme-accent:#245bff;
    color-scheme:light;
  }
  :root:is([data-theme=vivid],[data-theme=dark]) {
    --theme-page:#090a0c; --theme-text:#f6f7fa; --theme-muted:#bbc4d2;
    --theme-panel:#151b24; --theme-raised:#213044; --theme-line:#3d4b60;
    --theme-tint:#193550; --theme-green:#143a2f; --theme-brown:#4d3224;
    --theme-accent:#91b4ff;
    --ink:var(--theme-text); --muted:var(--theme-muted); --line:var(--theme-line);
    --surface:var(--theme-raised); --blue:var(--theme-accent);
    color-scheme:dark;
  }
  :root[data-theme=dark] {
    --theme-panel:#15181d; --theme-raised:#20252d; --theme-line:#3c4553;
    --theme-tint:#20252d; --theme-green:#20252d; --theme-brown:#20252d;
    --theme-accent:#a8c3ff;
  }
  :root[data-theme] body {background:var(--theme-page); color:var(--theme-text);}
  :root:is([data-theme=light],[data-theme=vivid]) .tools-main [data-tool-tone] {
    --tool-surface:#164b91; --tool-border:#5e8dcb;
  }
  :root:is([data-theme=light],[data-theme=vivid]) .tools-main [data-tool-tone=green] {
    --tool-surface:#174c36; --tool-border:#5c8e6e;
  }
  :root:is([data-theme=light],[data-theme=vivid]) .tools-main .tool-card[data-tool-tone] {
    background-color:var(--tool-surface)!important; border-color:var(--tool-border)!important; color:#fff;
  }
  :root:is([data-theme=light],[data-theme=vivid]) .tool-card :is(.tool-tag,.muted,label small,.tool-card-heading p) {color:#dceaff!important;}
  :root[data-theme=light] .tool-card :is(input,select,textarea,.tool-result) {color:#15171b; background-color:#fff!important;}
  :root[data-theme=light] .tool-card .tool-result :is(.muted,small,span) {color:#536173!important;}
  :root[data-theme=light] .entry-record .record-summary {background-color:#194e49; color:#fff; border-color:#4d8178;}
  :root[data-theme=light] .entry-record .record-summary :is(.muted,small,span,strong) {color:#d2e9e2;}
  :root:is([data-theme=vivid],[data-theme=dark]) :is(
    .card,.race-card,.event-course-card,.athlete-result-card,.favorite-card,.my-entry-card,
    .tool-card,.gpx-panel,.gpx-viewer,.gpx-stat,.gpx-insight,.gpx-section,.gpx-upload,
    .accordion,.album,.empty,.event-qna,.qna-panel,.member-refund-panel,
    .finish-distribution,.record-summary,.record-comparison,.race-highlight-board,
    .admin-nav,.admin-toolbar,.admin-panel .notice,.note-editor,.note-toolbar,.note-statusbar,
    .staff-app,.staff-app-header,.staff-bottom-nav,.staff-sheet,.staff-modal,.staff-panel,
    .snb,.event-nav,.cookie-help,.legal-document,.consent-row,.registration-consent-group
  ) {background-color:var(--theme-panel)!important; color:var(--theme-text); border-color:var(--theme-line)!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) :is(
    .tool-result,.tool-details,.record-summary,.race-highlight-board,.distribution-own,
    .gpx-upload,.gpx-viewer,.gpx-section[aria-pressed=true]
  ) {background-color:var(--theme-tint)!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) :is(
    .tool-local,.plan-phase,.gpx-insight,.tool-details:nth-of-type(even)
  ) {background-color:var(--theme-green)!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) :is(.about-contact,.studio-preview) {background-color:var(--theme-brown)!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),select,textarea) {
    background-color:var(--theme-panel); color:var(--theme-text); border-color:var(--theme-line);
  }
  :root:is([data-theme=vivid],[data-theme=dark]) ::placeholder {color:#aab6c8; opacity:1;}
  :root:is([data-theme=vivid],[data-theme=dark]) :is(.muted,.help,.tool-tag,.tool-method,.gpx-method,.gpx-empty,.gpx-heading p,.gpx-stat>span,.gpx-position,.distribution-pending,.distribution-empty,.distribution-ticks,.distribution-direction,.record-summary .muted,.course-meta,.race-card p,.tool-metrics small,.tool-metrics span,.tool-details>summary small) {color:var(--theme-muted)!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) :is(.admin-nav>a,.tool-method summary,.gpx-method summary,.tool-days span,.tool-local strong,.gpx-section,.gpx-summary strong,.tool-details summary,.tool-metrics strong) {color:var(--theme-text);}
  :root:is([data-theme=vivid],[data-theme=dark]) :is(.button.secondary,button.secondary,.tool-presets button,.segment-input>button,.tool-days span,.tag,.pill,.badge) {background-color:var(--theme-raised); color:var(--theme-text); border-color:var(--theme-line);}
  :root:is([data-theme=vivid],[data-theme=dark]) :is(.button:not(.secondary),button.button:not(.secondary)) {background-color:#245bff; color:#fff;}
  :root:is([data-theme=vivid],[data-theme=dark]) :is(.admin-nav a,.snb a,.tools-sidebar nav a)[aria-current=page] {background-color:var(--theme-tint); color:var(--theme-accent);}
  :root:is([data-theme=vivid],[data-theme=dark]) :is(.snb a,.primary-nav a):is(:hover,:focus-visible) {color:#fff;}
  :root:is([data-theme=vivid],[data-theme=dark]) :is(th,thead,.tool-table th) {background-color:var(--theme-raised)!important; color:var(--theme-text); border-color:var(--theme-line);}
  :root:is([data-theme=vivid],[data-theme=dark]) td {color:var(--theme-text); border-color:var(--theme-line);}
  :root:is([data-theme=vivid],[data-theme=dark]) tbody tr {background-color:var(--theme-panel);}
  :root:is([data-theme=vivid],[data-theme=dark]) tbody tr:nth-child(even) {background-color:var(--theme-green);}
  :root:is([data-theme=vivid],[data-theme=dark]) tbody tr:hover {background-color:var(--theme-raised);}
  :root:is([data-theme=vivid],[data-theme=dark]) :is(.chart-label,.distribution-marker text,.distribution-axis text,.route-profile text,#gpx-profile text) {fill:var(--theme-muted)!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) :is(.chart-grid,.distribution-grid,.route-grid) {stroke:var(--theme-line);}
  :root:is([data-theme=vivid],[data-theme=dark]) :is(.chart-line,.route-profile-line) {stroke:#85b9ff;}
  :root:is([data-theme=vivid],[data-theme=dark]) :is(.gpx-profile-wrap,.route-profile,.pace-chart,.distribution-plot) {background-color:var(--theme-panel);}
  :root:is([data-theme=vivid],[data-theme=dark]) .entry-record .record-summary::before {filter:invert(1); opacity:.18;}
  :root:is([data-theme=vivid],[data-theme=dark]) .site-header.is-floating::before {background:var(--theme-page)!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) body.has-site-kv::before {
    filter:invert(1) hue-rotate(180deg); opacity:.7;
  }
  :root:is([data-theme=vivid],[data-theme=dark]) body[data-site-kv="monteavic.png"] {--site-kv-image:url('/assets/themes/monteavic-inverted.png')!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) body[data-site-kv="monteavic.png"]::before {
    background-image:linear-gradient(#090a0c00,#090a0c4d),var(--site-kv-image);
    background-size:auto,2946px 1212px; filter:none; opacity:.7;
  }
  :root:is([data-theme=vivid],[data-theme=dark]) body.site-kv-enabled .site-header:not(.is-floating)::before {background:#090a0c1a!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) .home-gpx-preview img {content:url('/assets/themes/gpx-vivid.svg');}
  :root[data-theme=light] .home-gpx-preview img {content:url('/assets/themes/gpx-vivid.svg');}
  :root[data-theme=dark] .home-gpx-preview img {content:url('/assets/themes/gpx-dark.svg?v=20261106-gradient1');}
  :root[data-theme] .utmb-index-badge img {background:rgba(255, 255, 255, 0.3);}
  :root[data-theme] .home-race-card .utmb-wordmark,
  :root:is([data-theme=vivid],[data-theme=dark]) .utmb-index-badge .utmb-wordmark {color:#fff;}
  :root[data-theme] .home-content .home-more {color:inherit!important;}
  :root[data-theme] .home-content :is(.home-link,.service-value-link):is(:hover,:focus-visible),
  :root[data-theme] .home-tool-card:hover h3,
  :root[data-theme] .home-race-card:hover .home-race-action-label,
  :root[data-theme] .home-gpx-feature:hover .home-gpx-action {color:#ee5d44!important;}
  :root[data-theme] .home-marketing .home-link:is(:hover,:focus-visible) {color:#102449!important;}
  /* Error, warning, and destructive actions retain distinct semantic colors. */
  :root:is([data-theme=vivid],[data-theme=dark]) :is(.error,.danger,.text-danger,.refund-requested,.tool-error) {color:#ff9588!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) .gpx-warning {background:#4b381d; color:#ffe0aa;}
  :root:is([data-theme=vivid],[data-theme=dark]) :is(.primary-nav,nav.snb) a {color:var(--theme-text)!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) nav.snb a[aria-current=page] {color:var(--theme-accent)!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) :is(.primary-nav,nav.snb) a:is(:hover,:focus-visible) {color:#fff!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) .choice-options>.choice-option {background:var(--theme-panel); color:var(--theme-text); border-color:var(--theme-line);}
  :root:is([data-theme=vivid],[data-theme=dark]) .choice-options>.choice-option[aria-checked=true] {background:var(--theme-raised); color:var(--theme-accent); border-color:var(--theme-accent);}
  :root:is([data-theme=vivid],[data-theme=dark]) :is(.staff-bottom-nav,.staff-tabs,.staff-sheet,.staff-login,.staff-gate,.staff-app-status) {background-color:var(--theme-panel); color:var(--theme-text);}
}

/* Component palettes: pair the surface with its text and interaction states. */
@media screen {
  :root[data-theme] {
    --race-surface:#174b3c; --race-hover:#245e4c; --race-border:#4a806b; --race-muted:#d1e8dc;
    --race-road:#164a7b; --race-road-hover:#286194;
    --control-surface:#fff; --control-text:#172536; --control-border:#aabbd0;
    --control-active:#245bff; --control-on:#fff;
  }
  :root[data-theme=vivid] {
    --race-surface:#143a2f; --race-hover:#204c3c; --race-border:#416b57;
    --race-road:#193550; --race-road-hover:#2b5076;
    --control-surface:#253348; --control-text:#f6f8fc; --control-border:#71839d;
    --control-active:#a8c3ff; --control-on:#102449;
  }
  :root[data-theme=dark] {
    --race-surface:#15181d; --race-hover:#2a313d; --race-border:#3c4553; --race-muted:#d3dce9;
    --race-road:#15181d; --race-road-hover:#2a313d;
    --control-surface:#292f39; --control-text:#f6f8fc; --control-border:#7b879a;
    --control-active:#d7e4ff; --control-on:#102449;
  }
  :root[data-theme] :is(.home-race-card,.race-card,.event-course-card,.favorite-card,.athlete-result-card) {
    background-color:var(--race-surface)!important; background-image:none!important;
    color:#fff!important; border-color:var(--race-border)!important;
  }
  :root[data-theme] :is(.home-race-card,.race-card,.event-course-card,.favorite-card,.athlete-result-card)::before {
    background-image:none!important; content:none!important;
  }
  :root[data-theme] :is(.home-race-card,.race-card,.event-course-card,.favorite-card,.athlete-result-card)[data-sport=road] {background-color:var(--race-road)!important;}
  :root[data-theme] :is(.race-card,.event-course-card,.favorite-card,.athlete-result-card) :is(h3,.metric,.course-text) {color:#fff!important;}
  :root[data-theme] :is(.race-card,.event-course-card,.favorite-card,.athlete-result-card) :is(p,.muted,.course-meta) {color:var(--race-muted)!important;}
  :root[data-theme] :is(.home-race-card,.race-card,.event-course-card,.favorite-card,.athlete-result-card):is(:hover,:focus-visible) {background-color:var(--race-hover)!important;}
  :root[data-theme] :is(.home-race-card,.race-card)[data-sport=road]:is(:hover,:focus-visible) {background-color:var(--race-road-hover)!important;}
  /* Keep the existing active-menu background; only the LNB wrapper is clear. */
  :root[data-theme] nav.snb {background:transparent!important;}

  :root:is([data-theme=light],[data-theme=vivid]) .race-lookup-selected.tool-card {
    background:#164b91!important; color:#fff; border-color:#5e8dcb!important;
  }
  :root[data-theme=dark] .race-lookup-selected.tool-card {background:#20252d!important; color:#fff; border-color:#566174!important;}
  :root[data-theme] .race-lookup-selected :is(h2,h3,legend,label,.eyebrow) {color:#fff!important;}
  :root[data-theme] .race-lookup-selected .race-search-links>.button:first-child {background:#174c36!important; border-color:#5c8e6e!important; color:#fff!important;}
  :root[data-theme] .race-lookup-selected .race-search-links>.button:last-child {background:#70452f!important; border-color:#ab7c59!important; color:#fff!important;}
  :root[data-theme=dark] .race-lookup-selected .race-search-links>.button {background:#303946!important; border-color:#728098!important;}
  :root[data-theme=light] .race-lookup-selected input {background:#fff; color:#172536;}

  :root[data-theme] :is(.tool-card[data-tool-tone],.tool-local,.race-lookup-selected) {
    --control-active:#ff927c; --control-on:#102449;
  }
  :root[data-theme] .choice-options>.choice-option,
  :root[data-theme] .course-toggle span,
  :root[data-theme] :is(.race-toggle,.race-toggles>a) {
    background:var(--control-surface)!important; color:var(--control-text)!important;
    border-color:var(--control-border)!important;
  }
  :root[data-theme] .choice-options>.choice-option small {color:inherit!important;}
  :root[data-theme] .choice-options>.choice-option[aria-checked=true],
  :root[data-theme] .course-toggle input:checked+span,
  :root[data-theme] .race-toggle[aria-pressed=true],
  :root[data-theme] .race-toggles>a[aria-current=page] {
    background:var(--control-active)!important; color:var(--control-on)!important;
    border-color:var(--control-active)!important; box-shadow:inset 0 0 0 1px var(--control-on)!important;
    font-weight:700;
  }
  :root[data-theme] .choice-options>.choice-option:hover,
  :root[data-theme] .course-toggle:hover span {border-color:#ff927c!important;}
  :root[data-theme] .choice-options>.choice-option:focus-visible,
  :root[data-theme] .course-toggle input:focus-visible+span {outline:2px solid #ff927c; outline-offset:3px;}

  :root[data-theme] .tools-main .tool-local {background:var(--race-surface)!important; border-color:var(--race-border)!important; color:#fff;}
  :root[data-theme] .tool-local :is(strong,p,.muted) {color:#e4f0e9!important;}
  :root[data-theme] .tool-local .button {background:var(--control-surface)!important; color:var(--control-text)!important; border-color:var(--control-border)!important; text-decoration:none;}
  :root[data-theme] .tool-card[data-tool-tone]>.tool-method,
  :root[data-theme] .tool-card[data-tool-tone]>.tool-method :is(summary,p,a) {color:#e2edff!important;}
  :root[data-theme] .tool-method a {text-decoration:underline; text-underline-offset:3px;}
  :root[data-theme=light] .tool-result {--muted:#536173; --ink:#172536; color:#172536;}
  :root:is([data-theme=vivid],[data-theme=dark]) .tool-result {color:#f6f8fc;}

  /* GPX uses the same strong blue/green families as the homepage. */
  :root[data-theme] .gpx-tool {--gpx-text:var(--theme-text); --gpx-muted:var(--theme-muted); color:var(--gpx-text);}
  :root[data-theme] .gpx-heading :is(h1,p),
  :root[data-theme] :is(.gpx-status,.gpx-file-heading,.gpx-empty) {color:var(--theme-text)!important;}
  :root[data-theme] .gpx-heading .eyebrow {color:var(--theme-accent)!important;}
  :root[data-theme] .gpx-tool :is(.gpx-upload,.gpx-viewer,.gpx-panel) {
    --gpx-text:#fff; --gpx-muted:#d5e5f2;
    color:var(--gpx-text)!important; border-color:#527d72!important;
  }
  :root:is([data-theme=light],[data-theme=vivid]) .gpx-tool :is(.gpx-upload,.gpx-viewer) {background:#174b3c!important;}
  :root:is([data-theme=light],[data-theme=vivid]) .gpx-tool .gpx-panel {background:#164b91!important;}
  :root[data-theme=dark] .gpx-tool :is(.gpx-upload,.gpx-viewer,.gpx-panel) {background:#20252d!important; border-color:#596678!important;}
  :root[data-theme] .gpx-tool :is(h2,h3,summary,.gpx-position,.gpx-progress-label) {color:var(--gpx-text)!important;}
  :root[data-theme] .gpx-tool :is(p,small,.gpx-hint,.gpx-method,.gpx-section-title p,.gpx-insight p) {color:var(--gpx-muted)!important;}
  :root[data-theme] .gpx-tool :is(.gpx-stat,.gpx-insight,.gpx-section) {
    --gpx-text:var(--theme-text); --gpx-muted:var(--theme-muted);
    background:var(--theme-panel)!important; color:var(--gpx-text)!important;
  }
  :root[data-theme] .gpx-tool :is(.gpx-stat,.gpx-insight,.gpx-section) :is(strong,span,h3) {color:var(--gpx-text)!important;}
  :root[data-theme] .gpx-tool .gpx-profile-wrap {background:#143a2f!important;}
  :root[data-theme=dark] .gpx-tool .gpx-profile-wrap {background:#15181d!important;}
  :root[data-theme] .gpx-tool #gpx-profile text {fill:#fff!important;}
  :root[data-theme] .gpx-tool #gpx-profile path[stroke="#30483e"] {stroke:#baf4d5!important;}
  :root[data-theme] .gpx-tool #gpx-profile line[stroke="#e2e8e4"] {stroke:#597a70!important;}
  :root[data-theme] .gpx-tool .gpx-map-status {background:#fff; color:#172536!important;}
  :root[data-theme] .gpx-tool .gpx-upload .button {background:#fff!important; border-color:#fff!important; color:#174b3c!important;}
  :root[data-theme] .gpx-tool .gpx-upload .button.secondary {background:#10372b!important; border-color:#b4d6c8!important; color:#fff!important;}
  :root[data-theme] .gpx-tool .gpx-section[aria-pressed=true] {background:var(--control-active)!important; --gpx-text:var(--control-on); --gpx-muted:var(--control-on);}

  :root:is([data-theme=vivid],[data-theme=dark]) .refund-period.notice {background:#202d40!important; border-color:#586d8c!important; color:#f5f8ff!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) .refund-period.notice :is(strong,p,.muted) {color:#e0eaff!important;}
  /* The dynamic ranking table must keep the preview's green/charcoal palette. */
  :root[data-theme] .home-live-board.race-highlight-board {background:var(--concept-panel)!important;}
  :root[data-theme] .home-live-board :is(.home-live-rankings,table,tbody,tr) {background:var(--concept-panel)!important;}
  :root[data-theme] .home-live-board :is(.home-live-columns,thead,th) {background:var(--concept-raised)!important; color:var(--concept-secondary)!important;}
  :root[data-theme] .home-live-board td {background:transparent!important; color:var(--concept-on)!important; border-color:var(--concept-line)!important;}
  :root[data-theme] .home-live-board :is(.home-live-row,tr):is(:hover,:focus-within,:focus-visible) {background:var(--concept-raised)!important;}

  .home-content {--theme-more-hover:#ee5d44;}
  .home-content .home-marketing {--theme-more-hover:#102449;}
  .home-content :where(.home-link,.home-tool-copy h3:has(.home-more),.home-race-action-label,.service-value-link,.home-gpx-action) {
    background-image:linear-gradient(var(--theme-more-hover),var(--theme-more-hover))!important;
    background-position:left bottom!important; background-repeat:no-repeat!important; background-size:0 1px!important;
    text-decoration:none!important; transition:color .1s,background-size .1s!important;
  }
  .home-content :is(.home-link,.service-value-link):is(:hover,:focus-visible),
  .home-content .home-tool-card:is(:hover,:focus-visible) h3:has(.home-more),
  .home-content .home-race-card:is(:hover,:focus-visible) .home-race-action-label,
  .home-content .home-gpx-feature:is(:hover,:focus-visible) .home-gpx-action {color:var(--theme-more-hover)!important; background-size:100% 1px!important;}
  .home-content :is(.home-link,.service-value-link):is(:hover,:focus-visible) *,
  .home-content .home-tool-card:hover h3:has(.home-more) *,
  .home-content .home-race-card:hover .home-race-action-label *,
  .home-content .home-gpx-feature:hover .home-gpx-action * {color:inherit!important;}

  /* STAFF is a fixed dark interface, independent of the website preference. */
  .staff-app-body .staff-bottom {background:#252b34!important; border-color:#687489!important; box-shadow:0 4px 24px #0006;}
  .staff-app-body .staff-bottom button {background:transparent!important; color:#e0e6ef!important; border-color:transparent!important;}
  .staff-app-body .staff-bottom button[aria-pressed=true] {background:#3b4657!important; color:#fff!important; border-color:#a8c3ff!important; box-shadow:inset 0 0 0 1px #a8c3ff;}
  .staff-app-body .staff-bottom .material-icon {background-color:currentColor!important; color:inherit!important;}
  .staff-app-body dialog {background:#20252d!important; color:#fff!important; border:1px solid #596678;}
  .staff-app-body dialog::backdrop {background:#080d15b3;}
  .staff-app-body dialog :is(h2,h3,label) {color:#fff!important;}
  .staff-app-body dialog :is(p,.muted,small) {color:#d6e0ed!important;}
  .staff-app-body dialog :is(.dialog-close,button.secondary) {background:#353e4c!important; color:#fff!important; border-color:#728098!important;}
  .staff-app-body .route-elevation {background:#151b24!important; color:#fff;}
  .staff-app-body .route-elevation text {fill:#fff!important; stroke:none!important; paint-order:normal; text-shadow:none;}
  .staff-app-body .route-grid {stroke:#48566c;}
  .staff-app-body .route-area {fill:#26374d!important;}
  .staff-app-body .route-area-passed {fill:#28546a!important;}
  .staff-app-body .route-profile-line {stroke:#b7d2ff!important;}
  .staff-app-body :is(.route-state,.route-info,.route-selection-info) {color:#fff!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) .route-elevation {background:#151b24; color:#fff;}
  :root:is([data-theme=vivid],[data-theme=dark]) .route-elevation text {fill:#fff!important; stroke:none!important; paint-order:normal; text-shadow:none;}
  :root[data-theme=vivid] .route-area {fill:#204c3c!important;}
  :root[data-theme=vivid] .route-area-passed {fill:#2f6855!important;}
  :root[data-theme=dark] .route-area {fill:#303844!important;}
  :root[data-theme=dark] .route-area-passed {fill:#445064!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) .route-profile-line {stroke:#b7d2ff!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) :is([data-course-checkpoints],.checkpoint-table,.gpx-tool table) tbody tr:nth-child(odd),
  :root:is([data-theme=vivid],[data-theme=dark]) :is([data-course-checkpoints],.checkpoint-table,.gpx-tool table) tbody tr:nth-child(odd)>td {background:#171d26!important; color:#fff!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) :is([data-course-checkpoints],.checkpoint-table,.gpx-tool table) tbody tr:nth-child(even),
  :root:is([data-theme=vivid],[data-theme=dark]) :is([data-course-checkpoints],.checkpoint-table,.gpx-tool table) tbody tr:nth-child(even)>td {background:#2c3440!important; color:#fff!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) :is([data-course-checkpoints],.checkpoint-table,.gpx-tool table) :is(td,th) {color:#fff!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) .route-state {color:#fff!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) :is(.distribution-markers>div,.distribution-pending,.distribution-empty,.record-finish-comparison,.record-favorite-button,.race-help-dialog,.notice) {background:#252e3b!important; color:#fff!important; border-color:#63728a!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) :is(.distribution-markers>div,.record-finish-comparison,.notice) :is(strong,p,small,span,.muted) {color:#eef4ff!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) .distribution-after polygon {fill:#303844;}
  :root[data-theme=dark] .distribution-before polygon {fill:#26374d;}
  :root[data-theme=vivid] .distribution-before polygon {fill:#204c3c;}
  :root:is([data-theme=vivid],[data-theme=dark]) .distribution-after polyline {stroke:#b7d2ff;}
  :root:is([data-theme=vivid],[data-theme=dark]) table tbody tr:nth-child(odd),
  :root:is([data-theme=vivid],[data-theme=dark]) table tbody tr:nth-child(odd)>td {background:#171d26!important; color:#fff!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) table tbody tr:nth-child(even),
  :root:is([data-theme=vivid],[data-theme=dark]) table tbody tr:nth-child(even)>td {background:#2c3440!important; color:#fff!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) .race-statistics table :is(th,td) {color:#fff!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) .home-live-board table tbody tr,
  :root:is([data-theme=vivid],[data-theme=dark]) .home-live-board table tbody tr>td {background:var(--concept-panel)!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) .home-live-board table tbody tr:is(:hover,:focus-within)>td {background:var(--concept-raised)!important;}
  :root:is([data-theme=light],[data-theme=vivid]) .race-statistics>.card {
    --stats-base:#164b91; --stats-even:#205daa; --stats-head:#103a71; --stats-border:#5e8dcb;
    background:var(--stats-base)!important; border-color:var(--stats-border)!important; color:#fff;
  }
  :root:is([data-theme=light],[data-theme=vivid]) .race-statistics>.card:nth-of-type(even) {--stats-base:#174b3c; --stats-even:#245e4c; --stats-head:#103b30; --stats-border:#4a806b;}
  :root:is([data-theme=light],[data-theme=vivid]) body .home-content .home-live-board {border-color:var(--race-border)!important;}
  :root:is([data-theme=light],[data-theme=vivid]) .race-statistics>.card :is(h3,p,small,.muted,.stats-row strong,.stats-row small) {color:#e6f1ff!important;}
  :root[data-theme=light] .race-statistics>.card table th {background:var(--stats-head)!important; color:#fff;}
  :root[data-theme=light] .race-statistics>.card table tbody tr:nth-child(odd),
  :root[data-theme=light] .race-statistics>.card table tbody tr:nth-child(odd)>td {background:var(--stats-base)!important; color:#fff;}
  :root[data-theme=light] .race-statistics>.card table tbody tr:nth-child(even),
  :root[data-theme=light] .race-statistics>.card table tbody tr:nth-child(even)>td {background:var(--stats-even)!important; color:#fff;}
  :root:is([data-theme=light],[data-theme=vivid]) .race-statistics .stats-track {background:#ffffff30;}
  :root[data-theme=light] .rankings-page .standings-table {color:#fff;}
  :root[data-theme=light] .rankings-page .standings-table th {background:#103b30; color:#fff;}
  :root[data-theme=light] .rankings-page .standings-table tbody tr:nth-child(odd),
  :root[data-theme=light] .rankings-page .standings-table tbody tr:nth-child(odd)>td {background:#174b3c!important; color:#fff;}
  :root[data-theme=light] .rankings-page .standings-table tbody tr:nth-child(even),
  :root[data-theme=light] .rankings-page .standings-table tbody tr:nth-child(even)>td {background:#245e4c!important; color:#fff;}
  :root[data-theme=light] .rankings-page .standings-table :is(small,.muted,.cp-distance) {color:#d1e8dc;}
  :root:is([data-theme=vivid],[data-theme=dark]) :is(.admin-filters,.admin-form-feedback,.admin-panel .small-form,.record-personal-ranks,.entry-payment,.race-start-notice,.inquiry-contact [role=alert],.event-kv-field) {background:#252e3b!important; color:#f5f8ff!important; border-color:#63728a!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) :is(.admin-nav,.admin-tabs) a {color:#edf3ff!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) .admin-tabs a[aria-current=page] {color:#ffb39d!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) .admin-nav a[aria-current=page] {color:#d2e2ff!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) :is(input,textarea,select)[readonly] {background:#252e3b!important; color:#e7effb!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) :is(.social:not(.kakao),.auth-primary-actions>.signup-button,.record-share-button,.address-clear,.address-close) {background:#2c3440!important; color:#fff!important; border-color:#74839a!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) :is(.admin-choice span,.admin-choice-clear) {background:var(--control-surface)!important; color:var(--control-text)!important; border-color:var(--control-border)!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) .admin-choice input:checked+span {background:var(--control-active)!important; color:var(--control-on)!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) .pagination {color:#eef4ff;}
  :root:is([data-theme=vivid],[data-theme=dark]) .pagination :is(a,span) {color:inherit;}
  :root:is([data-theme=vivid],[data-theme=dark]) .pagination-number[aria-current=page] {color:#fff; background:#344156; border-radius:4px;}
  :root:is([data-theme=vivid],[data-theme=dark]) .pagination a:hover {color:#fff; background:#344156;}
  :root:is([data-theme=vivid],[data-theme=dark]) .pagination-arrow img {filter:invert(1);}
  :root:is([data-theme=vivid],[data-theme=dark]) .pagination-arrow[aria-disabled=true] {opacity:.6;}
  :root[data-theme=vivid] .studio-preview {background:transparent!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) .studio-preview :is(p,a) {color:#e7effb!important;}
  .staff-app-body dialog .dialog-close::before {background-color:currentColor!important;}
  :root[data-theme] .staff-app-body dialog {background:#20252d!important; color:#fff!important;}
  :root[data-theme] body nav.snb[data-snb] {background:transparent!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) input[type=range] {background:transparent!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) table tbody tr:hover>td {background:#344156!important; color:#fff!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) :is(.button.secondary:not(.social),.tool-presets button,.record-favorite-button,.record-share-button):hover {background:#344156!important; color:#fff!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) .gpx-tool .gpx-section:hover {background:#344156!important;}
  :root[data-theme] .tools-main .choice-options .choice-option :is(small,span) {color:inherit!important;}
  :root[data-theme] .tools-main .tool-result .plan-bar span {color:#fff!important;}
  :root[data-theme] .tools-main .tool-result .plan-bar:is(.recovery,.taper) span {color:#fff!important;}
  :root[data-theme=light] .race-statistics .distribution-markers>div {background:var(--stats-head,#164b91); color:#fff;}
  :root[data-theme=light] .race-statistics .distribution-markers>div :is(span,strong) {color:#e6f1ff!important;}
  :root[data-theme=light] .promo-elevation .promo-image img {filter:invert(1) hue-rotate(180deg) brightness(1.5)!important;}
  :root[data-theme] :is(.rich-content img,.note-editable img,img[src^="/media/"],img[src^="/uploads/"]) {background:#fff!important;}
  :root[data-theme] :is(.race-card,.event-course-card,.favorite-card) .utmb-wordmark {color:#fff!important;}
  :root[data-theme] .tools-main .tool-card :is(.field-hint,.tool-method,.tool-method summary,.tool-method a,.tool-method .text-link) {color:#e2edff!important;}
  :root[data-theme] .tool-card[data-tool-tone] small {color:#e2edff!important;}
  :root[data-theme=light] .tool-card[data-tool-tone] .tool-result small {color:#536173!important;}
  :root[data-theme] .segment-input>button {color:#fff; border-color:#a9c3df;}
  :root[data-theme] .home-winner :is(summary,.home-winner-person .number,.pace-chart-legend) {color:var(--concept-secondary)!important;}
  :root[data-theme] .home-winner .rank-key {color:#ffb39e!important;}
  :root[data-theme] .tool-card[data-tool-tone]>.tool-method :is(p,span,small) {color:#e2edff!important;}
  :root[data-theme] .tool-card[data-tool-tone] label small {color:#e2edff!important;}
  :root[data-theme] .plan-bar span {color:#fff!important;}
  :root[data-theme] .plan-bar:is(.recovery,.taper) span {color:#fff!important;}
  :root[data-theme] .stats-track .stats-F {background:#b63d2b; color:#fff;}
  :root[data-theme] .stats-track .stats-X {background:#59677a; color:#fff;}
  :root[data-theme] .race-statistics .distribution-ticks,
  :root[data-theme] .race-statistics .distribution-direction {color:#e6f1ff!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) .race-statistics small {color:#e6f1ff!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) .race-statistics .stats-legend span:first-child {color:#245bff!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) .race-statistics .stats-legend span:last-child {color:#ee5d44!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) .stats-track {background:#394556!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) .distribution-own :is(span,small,strong) {color:#e9f4ff!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) input[type=color] {background:#293445!important; border-color:#71839d!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) table thead tr {background:#202d40!important;}
  :root[data-theme=vivid] .home-live-board table thead tr {background:var(--concept-panel)!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) .gpx-tool .gpx-upload .button {background:#244a3e!important; color:#fff!important; border-color:#9fd8c3!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) .accordion[open]>.prose {background:#252e3b!important; color:#eef4ff!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) .rich-content {background-color:transparent!important; color:#eef4ff!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) .rich-content :is(p,div,span,h1,h2,h3,h4,h5,li,section,blockquote) {background-color:transparent!important; color:#eef4ff!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) .rich-content a {color:#b7d2ff!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) :is(.note-editor .note-editable,.note-editing-area,.note-toolbar,.note-statusbar,.note-dropdown-menu,.note-modal-content) {background:#252e3b!important; color:#eef4ff!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) .note-editable :is(p,span,h1,h2,h3,h4,li) {color:#eef4ff!important;}
  /* Provider branding is an intentional exception to dark panel surfaces. */
  :root[data-theme] .button.social {background:#fff!important; color:#15171b!important; border-color:#d4dce7!important;}
  :root[data-theme] .button.social.naver {background:#03c75a!important; color:#092414!important; border-color:#03c75a!important;}
  :root[data-theme] .button.social.kakao {background:#fee500!important; color:#191919!important; border-color:#fee500!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) .legal-document {background:transparent!important;}
  :root[data-theme=vivid] .home-live-board :is(.home-live-board-heading,.home-live-columns,.home-live-bottom,thead,th) {background:var(--concept-panel)!important;}
  :root[data-theme=vivid] .home-live-board table tbody tr:is(:hover,:focus-within)>td,
  :root[data-theme=vivid] .home-live-board .home-live-row:is(:hover,:focus-visible) {background:#2f6855!important;}
  :root[data-theme=dark] .home-live-board table tbody tr:is(:hover,:focus-within)>td,
  :root[data-theme=dark] .home-live-board .home-live-row:is(:hover,:focus-visible) {background:#344156!important;}
}

/* Final approved preview interaction and certificate sizing parity. */
@media screen {
  :root[data-theme=vivid] {--control-active:#365f4e; --control-on:#fff;}
  :root[data-theme=dark] {--control-active:#46678d; --control-on:#fff;}
  :root[data-theme=vivid] :is(.tool-card[data-tool-tone],.tool-local,.race-lookup-selected) {--control-active:#365f4e; --control-on:#fff;}
  :root[data-theme=dark] :is(.tool-card[data-tool-tone],.tool-local,.race-lookup-selected) {--control-active:#46678d; --control-on:#fff;}
  .home-section[aria-labelledby=home-upcoming-title]:has(.home-empty-copy) .home-section-heading {margin-bottom:16px;}
  .home-section[aria-labelledby=home-upcoming-title] .home-empty-copy {padding:0; margin:0;}
  .home-section[aria-labelledby=home-upcoming-title]:has(.home-empty-copy)+.home-marketing {margin-top:40px;}
  @media(max-width:767px) {.home-section[aria-labelledby=home-upcoming-title]:has(.home-empty-copy)+.home-marketing{margin-top:32px;}}
/* Keep the complete label, including “more +”, in one hover state. */
.home-content .home-more {color:inherit!important}
.home-content :where(.home-link,.home-tool-copy h3:has(.home-more),.home-race-action-label,.service-value-link,.home-gpx-action) {
    --preview-more-hover:#ee5d44;
    font-size:18px!important;
    background-image:linear-gradient(var(--preview-more-hover),var(--preview-more-hover))!important;
    background-position:left bottom!important;
    background-repeat:no-repeat!important;
    background-size:0 1px!important;
    text-decoration:none!important;
    transition:color .1s,background-size .1s!important;
}
.home-content :where(.home-link,.home-tool-copy h3:has(.home-more),.home-race-action-label,.service-value-link,.home-gpx-action) .home-more,
.home-content .service-value-link span {font-size:inherit!important}
.home-content .home-marketing .home-link {--preview-more-hover:#102449}
.home-content .home-race-action {background-image:none!important}
.home-content .home-gpx-action {display:inline-block;gap:0;border-bottom:0;padding-bottom:0}
.home-content .home-gpx-feature:is(:hover,:focus-visible) {text-decoration:none}
.home-content :is(.home-link,.service-value-link):is(:hover,:focus-visible),
.home-content .home-tool-card:is(:hover,:focus-visible) h3:has(.home-more),
.home-content .home-gpx-feature:is(:hover,:focus-visible) .home-gpx-action,
.home-content .home-race-card:is(:hover,:focus-visible) .home-race-action-label {
    color:var(--preview-more-hover)!important;
    background-size:100% 1px!important;
}
@media(max-width:767px) {
    .home-content :where(.home-link,.home-tool-copy h3:has(.home-more),.home-race-action-label,.service-value-link,.home-gpx-action) {font-size:16px!important}
}
.home-content :is(.home-link,.service-value-link):is(:hover,:focus-visible) *,
.home-content .home-tool-card:is(:hover,:focus-visible) h3:has(.home-more) *,
.home-content .home-gpx-feature:is(:hover,:focus-visible) .home-gpx-action *,
.home-content .home-race-card:is(:hover,:focus-visible) .home-race-action-label * {
    color:inherit!important;
    text-decoration:none!important;
}
@media(prefers-reduced-motion:reduce) {
    .home-content :where(.home-link,.home-tool-copy h3:has(.home-more),.home-race-action-label,.service-value-link,.home-gpx-action) {transition:none!important}
}

@media(min-width:768px){.home-certificate-preview{zoom:1.3}}
@media(min-width:1200px){.home-certificate-preview{zoom:1.6}}
}

/* One color family per tool: fields are white only in Light. */
@media screen {
  :root:is([data-theme=light],[data-theme=vivid]) .tools-main .tool-local {
    --control-surface:#205e49; --control-active:#2d8061; --control-text:#fff;
    --control-on:#fff; --control-border:#9bcbb5;
  }
  :root:is([data-theme=light],[data-theme=vivid]) .tools-main .tool-local .button:hover {background:var(--control-active)!important; color:#fff!important;}
  :root:is([data-theme=light],[data-theme=vivid]) .tools-main .tool-card[data-tool-tone] {
    --section-result:#123c73; --section-control:#205b9f; --section-active:#2c70b5;
    --section-odd:#16467f; --section-even:#20558f; --section-input:#112f4a;
    --control-surface:var(--section-control); --control-text:#fff; --control-border:#9cbde0;
    --control-active:var(--section-active); --control-on:#fff;
  }
  :root:is([data-theme=light],[data-theme=vivid]) .tools-main .tool-card[data-tool-tone=green] {
    --section-result:#123c30; --section-control:#205e49; --section-active:#2d8061;
    --section-odd:#164b3c; --section-even:#205d49; --section-input:#0f2d24;
    --control-border:#9bcbb5;
  }
  :root:is([data-theme=light],[data-theme=vivid]) .tools-main .tool-card[data-tool-tone] .tool-result {
    background:var(--section-result)!important; color:#fff!important; border-color:var(--control-border)!important;
  }
  :root:is([data-theme=light],[data-theme=vivid]) .tools-main .tool-card[data-tool-tone] .tool-result :is(strong,span,small,.muted) {color:#eef6ff!important;}
  :root:is([data-theme=light],[data-theme=vivid]) .tools-main .tool-card[data-tool-tone] :is(.button,.tool-presets button,.segment-input>button):not(.social) {
    background:var(--section-control)!important; color:#fff!important; border-color:var(--control-border)!important;
  }
  :root:is([data-theme=light],[data-theme=vivid]) .tools-main .tool-card[data-tool-tone] :is(.button,.tool-presets button,.segment-input>button):hover {background:var(--section-active)!important; color:#fff!important;}
  :root[data-theme=vivid] .tools-main .tool-card[data-tool-tone] :is(input:not([type=range]):not([type=checkbox]):not([type=radio]),select,textarea) {background:var(--section-input)!important; color:#fff;}
  :root[data-theme=light] .tools-main .tool-card[data-tool-tone] :is(input:not([type=range]):not([type=checkbox]):not([type=radio]),select,textarea) {background:#fff!important; color:#172536;}
  :root:is([data-theme=light],[data-theme=vivid]) .tools-main .tool-card[data-tool-tone] .tool-result table :is(th,thead tr) {background:var(--section-control)!important; color:#fff;}
  :root:is([data-theme=light],[data-theme=vivid]) .tools-main .tool-card[data-tool-tone] .tool-result table tbody tr:nth-child(odd)>td {background:var(--section-odd)!important; color:#fff;}
  :root:is([data-theme=light],[data-theme=vivid]) .tools-main .tool-card[data-tool-tone] .tool-result table tbody tr:nth-child(even)>td {background:var(--section-even)!important; color:#fff;}
  :root:is([data-theme=light],[data-theme=vivid]) .tools-main .tool-card[data-tool-tone] .tool-result .plan-bar span {color:#fff!important;}
  :root:is([data-theme=light],[data-theme=vivid]) .tools-main .tool-card[data-tool-tone] .tool-result .plan-bar:is(.recovery,.taper) span {color:#fff!important;}
  :root:is([data-theme=light],[data-theme=vivid]) .race-lookup-selected.tool-card {--control-surface:#123b60; --control-active:#3679b1; --control-text:#fff; --control-on:#fff; --control-border:#9cbde0;}
  :root:is([data-theme=light],[data-theme=vivid]) .race-lookup-selected.tool-card .race-search-links>.button:is(:first-child,:last-child) {background:#205b9f!important; color:#fff!important; border-color:#9cbde0!important;}
  :root[data-theme=dark] .race-lookup-selected.tool-card .race-search-links>.button:is(:first-child,:last-child) {background:#303946!important; color:#fff!important; border-color:#728098!important;}
  :root[data-theme] .gpx-tool .gpx-upload .button {background:#244a3e!important; color:#fff!important; border-color:#9fd8c3!important;}
  :root:is([data-theme=light],[data-theme=vivid]) .gpx-viewer {--gpx-child-surface:#123c30; --gpx-child-active:#2d8061;}
  :root:is([data-theme=light],[data-theme=vivid]) .gpx-panel {--gpx-child-surface:#123c73; --gpx-child-active:#2c70b5;}
  :root:is([data-theme=light],[data-theme=vivid]) .gpx-tool :is(.gpx-viewer,.gpx-panel) :is(.gpx-stat,.gpx-insight,.gpx-section) {--gpx-text:#fff; --gpx-muted:#e2edff; background:var(--gpx-child-surface)!important; color:#fff!important;}
  :root:is([data-theme=light],[data-theme=vivid]) .gpx-tool :is(.gpx-viewer,.gpx-panel) .gpx-section[aria-pressed=true] {background:var(--gpx-child-active)!important; --gpx-text:#fff; --gpx-muted:#fff;}
  :root:is([data-theme=vivid],[data-theme=dark]) body .shell .legal-document {background:none!important;}
}

/* Course navigation shares the LNB typography and underline in every theme. */
@media screen {
  :root[data-theme] body nav.race-toggles:is([aria-label="전체순위 코스"],[aria-label="통계 코스"]) {
    position:relative; width:100%; min-width:0; flex-wrap:nowrap; gap:20px;
    margin:18px 0 36px; padding:0; border:0; border-bottom:1px solid var(--line);
    border-radius:0; background:transparent!important; box-shadow:none;
  }
  :root[data-theme] body nav.race-toggles:is([aria-label="전체순위 코스"],[aria-label="통계 코스"]) .swiper-wrapper {align-items:stretch;}
  :root[data-theme] body nav.race-toggles:is([aria-label="전체순위 코스"],[aria-label="통계 코스"]) a {
    position:relative; display:block; flex:0 0 auto; width:auto; min-height:0;
    padding:0 0 12px; border:0!important; border-radius:0;
    background:transparent!important; color:var(--theme-text)!important;
    font-size:16px; font-weight:500!important; line-height:1.5;
    white-space:nowrap; text-decoration:none; box-shadow:none!important; transition:none;
  }
  :root[data-theme] body nav.race-toggles:is([aria-label="전체순위 코스"],[aria-label="통계 코스"]) a::after {
    content:""; position:absolute; left:0; right:0; bottom:0; height:2px;
    background:transparent; transition:none;
  }
  :root[data-theme] body :is(nav.snb,nav.race-toggles[aria-label="전체순위 코스"],nav.race-toggles[aria-label="통계 코스"]) a:is([aria-current=page],[aria-pressed=true]),
  :root[data-theme] body :is(nav.snb,nav.race-toggles[aria-label="전체순위 코스"],nav.race-toggles[aria-label="통계 코스"]) a:is([aria-current=page],[aria-pressed=true]):hover {
    background:transparent!important; background-image:none!important;
    color:var(--nav-accent,#EE5D44)!important; box-shadow:none!important;
  }
  :root[data-theme] body :is(nav.snb,nav.race-toggles[aria-label="전체순위 코스"],nav.race-toggles[aria-label="통계 코스"]) a:is([aria-current=page],[aria-pressed=true])::after {
    background:var(--nav-accent,#EE5D44)!important;
  }
  :root[data-theme] body nav.snb a:is([aria-current=page],[aria-pressed=true]) :is(span,small) {color:inherit!important;}
  :root[data-theme] body nav.race-toggles:is([aria-label="전체순위 코스"],[aria-label="통계 코스"]) a:focus-visible {
    outline:2px solid var(--nav-accent,#EE5D44); outline-offset:-2px;
  }
  @media(max-width:767px) {
    :root[data-theme] body nav.race-toggles:is([aria-label="전체순위 코스"],[aria-label="통계 코스"]) {margin-bottom:28px;}
    :root[data-theme] body nav.race-toggles:is([aria-label="전체순위 코스"],[aria-label="통계 코스"]) a {font-size:14px;}
  }
}

/* Clear selection and reading states on the dark palettes. */
@media screen {
  :root:is([data-theme=vivid],[data-theme=dark]) .tools-main .tool-days span {
    position:relative; background:#123c73!important; color:#edf5ff!important;
    border-color:#7899bf!important;
  }
  :root[data-theme=dark] .tools-main .tool-days span {background:#252e3b!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) .tools-main .tool-days input:checked+span {
    background:#2c70b5!important; color:#fff!important; border-color:#d2e5ff!important;
    box-shadow:inset 0 0 0 1px #d2e5ff; font-weight:700;
  }
  :root[data-theme=dark] .tools-main .tool-days input:checked+span {background:#46678d!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) .tools-main .tool-days input:checked+span::after {
    content:"✓"; position:absolute; top:1px; right:2px; font-size:10px; line-height:12px; color:#fff;
  }
  :root:is([data-theme=vivid],[data-theme=dark]) .tools-main .tool-days input:focus-visible+span {outline:2px solid #d2e5ff; outline-offset:3px;}
  :root:is([data-theme=vivid],[data-theme=dark]) .route-selection-text {color:#d8ecff!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) .pace-chart {background:transparent!important;}
  .admin-table .admin-entry-contact {font-size:12px; line-height:1.7; overflow-wrap:anywhere; white-space:normal;}
  :root:is([data-theme=vivid],[data-theme=dark]) .admin-table .admin-entry-contact {color:#e6f1ff!important;}
  :root[data-theme=vivid] .race-statistics>.card {--stats-line:#0c3261;}
  :root[data-theme=vivid] .race-statistics>.card:nth-of-type(even) {--stats-line:#0b2b22;}
  :root[data-theme=vivid] .race-statistics>.card :is(.distribution-markers>div,.distribution-pending,.distribution-empty,.distribution-own,.stats-track) {
    background:var(--stats-head)!important; color:#eef6ff!important; border-color:var(--stats-line)!important;
  }
  :root[data-theme=vivid] .race-statistics>.card table :is(thead,thead tr,th) {background:var(--stats-head)!important; color:#fff!important; border-color:var(--stats-line)!important;}
  :root[data-theme=vivid] .race-statistics>.card table tbody tr:nth-child(odd)>td {background:var(--stats-base)!important; color:#fff!important; border-color:var(--stats-line)!important;}
  :root[data-theme=vivid] .race-statistics>.card table tbody tr:nth-child(even)>td {background:var(--stats-even)!important; color:#fff!important; border-color:var(--stats-line)!important;}
  :root[data-theme=vivid] .race-statistics>.card table tbody tr:hover>td {background:var(--stats-head)!important; color:#fff!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) :is(.record-leader-list a,.athlete-matches a,.athlete-search-results .search-results>a):is(:hover,:focus-visible) {
    background:#283546!important; color:#f3f7ff!important;
  }
  :root[data-theme=vivid] :is(.record-leader-list a,.athlete-matches a,.athlete-search-results .search-results>a):is(:hover,:focus-visible) {background:#204c3c!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) :is(.record-leader-list a,.athlete-matches a,.athlete-search-results .search-results>a):is(:hover,:focus-visible) :is(span,strong,small) {color:#eef6ff!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) .help-icon:hover {background:#344156!important; color:#fff!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) .choice-options>.choice-option:not([aria-checked=true]):hover {
    background:var(--section-control,#344156)!important; color:#fff!important;
  }
  :root:is([data-theme=vivid],[data-theme=dark]) .button.secondary:not(.social):hover {
    background:var(--section-control,var(--gpx-child-surface,var(--control-surface,#344156)))!important; color:#fff!important;
  }
  :root:is([data-theme=vivid],[data-theme=dark]) .gpx-section:hover {background:var(--gpx-child-active,#2d4f3f)!important; color:#fff!important;}
  :root:is([data-theme=vivid],[data-theme=dark]) table tbody tr[data-linked-row]:hover>td {background:#344156!important; color:#fff!important;}
  :root[data-theme=vivid] .race-statistics>.card table tbody tr[data-linked-row]:hover>td {background:var(--stats-head)!important;}
}

/* Shared screen-only profile treatment; print palettes keep their original fills. */
@media screen {
  :root[data-theme] {--elevation-fill:#4f9874; --elevation-progress:#428963; --elevation-base:#e6f2eb;}
  :root[data-theme=vivid] {--elevation-fill:#a8edca; --elevation-progress:#91e4b7; --elevation-base:#204c3c;}
  :root[data-theme=dark] {--elevation-fill:#a6b2c2; --elevation-progress:#c0cad7; --elevation-base:#303844;}
  .elevation-fill-top {stop-color:var(--elevation-fill,#4f9874); stop-opacity:.45;}
  .elevation-fill-bottom {stop-color:var(--elevation-fill,#4f9874); stop-opacity:.03;}
  .elevation-progress-top {stop-color:var(--elevation-progress,#428963); stop-opacity:.62;}
  .elevation-progress-bottom {stop-color:var(--elevation-progress,#428963); stop-opacity:.05;}
  :root[data-theme] body :is(.route-area,.route-area-passed) {fill:var(--elevation-area,var(--elevation-base))!important;}
  :root[data-theme] .gpx-tool #gpx-profile .gpx-elevation-area {fill:var(--elevation-area)!important; opacity:1;}
  :root[data-theme=dark] .gpx-tool #gpx-profile path[stroke="#30483e"] {stroke:#c8d4e3!important;}
  :root[data-theme] body .promo-elevation .promo-image img[src^="/assets/promotion/transjeju-elevation-"] {
    content:var(--promo-gradient-image); filter:none!important; mix-blend-mode:normal!important;
  }
  :root[data-theme] .promo-elevation {--promo-gradient-image:url('/assets/themes/elevation-promo-light-desktop.svg');}
  :root[data-theme=vivid] .promo-elevation {--promo-gradient-image:url('/assets/themes/elevation-promo-vivid-desktop.svg');}
  :root[data-theme=dark] .promo-elevation {--promo-gradient-image:url('/assets/themes/elevation-promo-dark-desktop.svg');}
  @media(max-width:600px) {
    :root[data-theme] .promo-elevation {--promo-gradient-image:url('/assets/themes/elevation-promo-light-mobile.svg');}
    :root[data-theme=vivid] .promo-elevation {--promo-gradient-image:url('/assets/themes/elevation-promo-vivid-mobile.svg');}
    :root[data-theme=dark] .promo-elevation {--promo-gradient-image:url('/assets/themes/elevation-promo-dark-mobile.svg');}
  }
}

/* Unfilled status-bar space follows each theme's approved palette. */
:root[data-theme] .race-statistics>.card .stats-row>.stats-track{background:#edf2ff!important}
:root[data-theme=vivid] .race-statistics>.card .stats-row>.stats-track{background:#103a71!important}
:root[data-theme=dark] .race-statistics>.card .stats-row>.stats-track{background:#2c3440!important}

/* Course checkpoints and athlete detail tables share the approved standings/statistics palettes. */
@media screen {
  :root:is([data-theme=light],[data-theme=vivid]) :is(.checkpoint-record .checkpoint-table,[data-course-checkpoints]) {
    color:#fff; border-color:#4a806b;
  }
  :root:is([data-theme=light],[data-theme=vivid]) :is(.checkpoint-record .checkpoint-table,[data-course-checkpoints]) :is(thead,thead tr,th) {
    background:#103b30!important; color:#fff!important;
  }
  :root:is([data-theme=light],[data-theme=vivid]) :is(.checkpoint-record .checkpoint-table,[data-course-checkpoints]) tbody tr:nth-child(odd),
  :root:is([data-theme=light],[data-theme=vivid]) :is(.checkpoint-record .checkpoint-table,[data-course-checkpoints]) tbody tr:nth-child(odd)>td {
    background:#174b3c!important; color:#fff!important;
  }
  :root:is([data-theme=light],[data-theme=vivid]) :is(.checkpoint-record .checkpoint-table,[data-course-checkpoints]) tbody tr:nth-child(even),
  :root:is([data-theme=light],[data-theme=vivid]) :is(.checkpoint-record .checkpoint-table,[data-course-checkpoints]) tbody tr:nth-child(even)>td {
    background:#245e4c!important; color:#fff!important;
  }
  :root:is([data-theme=light],[data-theme=vivid]) :is(.checkpoint-record .checkpoint-table,[data-course-checkpoints]) :is(td,th) {border-color:#91b9a8!important;}
  :root:is([data-theme=light],[data-theme=vivid]) :is(.checkpoint-record .checkpoint-table,[data-course-checkpoints]) :is(small,.cp-distance,.cp-note) {color:#d1e8dc!important;}
  :root:is([data-theme=light],[data-theme=vivid]) :is(.checkpoint-record .checkpoint-table,[data-course-checkpoints]) tbody tr:hover>td {background:#103b30!important;}
  :root:is([data-theme=light],[data-theme=vivid],[data-theme=dark]) .checkpoint-record .checkpoint-table .eta-time {color:#ffe45c;}

  :root:is([data-theme=light],[data-theme=vivid]) .record-rank-tabs {
    background:#164b91!important; color:#fff!important; border-color:#5e8dcb!important;
  }
  :root:is([data-theme=light],[data-theme=vivid]) .record-rank-tabs .record-rank-tablist,
  :root:is([data-theme=light],[data-theme=vivid]) .record-rank-tabs .record-rank-tablist [role=tab] {background:#103a71!important; color:#fff;}
  :root:is([data-theme=light],[data-theme=vivid]) .record-rank-tabs .record-rank-tablist {border-color:#9cbde0;}
  :root:is([data-theme=light],[data-theme=vivid]) .record-rank-tabs .record-leader-list li:nth-child(odd)>a {background:#164b91!important;}
  :root:is([data-theme=light],[data-theme=vivid]) .record-rank-tabs .record-leader-list li:nth-child(even)>a {background:#205daa!important;}
  :root:is([data-theme=light],[data-theme=vivid]) .record-rank-tabs .record-leader-list :is(li,a) {border-color:#9cbde0!important;}
  :root:is([data-theme=light],[data-theme=vivid]) .record-rank-tabs .record-leader-list :is(a,span,strong) {color:#fff!important;}
  :root:is([data-theme=light],[data-theme=vivid]) .record-rank-tabs :is(.record-leader-list small,.record-stat-empty) {color:#e6f1ff!important;}
  :root:is([data-theme=light],[data-theme=vivid]) .record-rank-tabs .record-leader-list li>a:is(:hover,:focus-visible),
  :root:is([data-theme=light],[data-theme=vivid]) .record-rank-tabs .record-rank-tablist [role=tab]:hover {background:#103a71!important; color:#fff!important;}
  :root:is([data-theme=light],[data-theme=vivid]) .record-rank-tabs .record-rank-tablist [role=tab][aria-selected=true] {color:#ee5d44!important; border-bottom-color:#ee5d44;}
}

/* The notice disclosure uses borders, so its arrow needs an explicit dark-theme color. */
@media screen {
  :root:is([data-theme=vivid],[data-theme=dark]) .race-notice>summary::after {border-color:#f6f7fa;}
}
