/* Loaded only at >=1200px. Keep styles.css and the mobile layout unchanged. */
@media (min-width: 1200px) {
  .live-dashboard.run-results.hidden { display: grid; position: sticky; top: 20px; }
  .run-results .live-flow { display: none; }
  .run-results .desktop-categories[hidden] { display: block; padding: 20px 16px; border: 1px solid #dbe6f0; border-radius: 14px; background: #fff; box-shadow: 0 8px 28px #183f6514; }
  .desktop-categories h2 { margin: 0 0 16px; font-size: 21px; }
  .desktop-category-list { display: grid; gap: 8px; max-height: min(55vh, 540px); overflow-y: auto; scrollbar-width: thin; }
  .desktop-category-list button { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 12px; text-align: left; border: 1px solid #e2ebf4; background: #f6f9fc; color: #253f60; }
  .desktop-category-list button > span > small { display: block; font-weight: 400; margin-top: 4px; }
  .desktop-category-list button > small { min-width: 28px; padding: 4px 7px; border-radius: 6px; text-align: center; background: #e4edf8; }
  .desktop-category-list button[aria-pressed="true"] { background: #168ff4; border-color: #168ff4; color: #fff; }
  .desktop-category-list button[aria-pressed="true"] > small { background: #ffffff30; }
  .desktop-category-list button:focus-visible { outline: 3px solid #102343; outline-offset: -3px; }
  body {
    color: #102343;
    background: linear-gradient(rgba(211, 232, 248, .48), rgba(211, 232, 248, .48)),
      var(--event-background-image) center / cover fixed;
  }

  .app-shell {
    display: grid;
    grid-template-columns: clamp(290px, 23vw, 350px) minmax(0, 1fr);
    grid-template-areas: "header header" "code code" "status status" "ticker ticker"
      "facts facts" "sidebar selection" "sidebar results";
    grid-template-rows: repeat(6, auto) 1fr;
    column-gap: 20px;
    width: min(1500px, calc(100% - 64px));
    padding: 28px 0 48px;
    align-items: start;
  }
  .topbar {
    grid-area: header;
    margin: 0 0 20px;
    padding: 22px 28px;
    grid-template-columns: 150px minmax(0, 1fr) auto;
    border: 1px solid #dbe6f0;
    border-radius: 14px;
    box-shadow: 0 8px 28px #183f6514;
  }
  .topbar::before { color: #102343; font-size: 31px; }
  .topbar-title { border-left: 1px solid #cad8e7; padding-left: 28px; }
  .topbar-title h1 { font-size: 25px; color: #102343; }
  .topbar-title .muted { margin-top: 5px; color: #647b94; font-size: 14px; }
  .header-icon-button { width: 44px; height: 44px; border-radius: 9px; }
  .top-menu { right: 28px; top: calc(100% - 10px); }
  .code-panel { grid-area: code; width: 100%; }
  .status { grid-area: status; }
  .event-facts { grid-area: facts; }
  .message-ticker {
    grid-area: ticker;
    margin: 0 0 20px;
    padding: 15px 22px;
    min-height: 60px;
    border: 1px solid #d4e6f5;
    border-radius: 12px;
    background: #f0f8fff2;
    box-shadow: 0 4px 18px #183f650d;
  }
  .ticker-content { display: flex; align-items: center; gap: 24px; min-width: 0; width: 100%; }
  .ticker-heading { flex: 0 0 auto; margin: 0; padding-right: 24px; border-right: 1px solid #b8d4ec; color: #087ce0; font-size: 13px; }
  .ticker-track { flex: 1; min-width: 0; }
  .ticker-copy { color: #253f60; }

  .live-dashboard, .live-dashboard.has-no-sponsors {
    grid-area: sidebar;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 18px;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    min-width: 0;
  }
  .live-dashboard.hidden { display: none; }
  .live-flow {
    padding: 20px 16px;
    background: #fff;
    border: 1px solid #dbe6f0;
    border-radius: 14px;
    box-shadow: 0 8px 28px #183f6514;
    overflow: hidden;
  }
  .flow-table-desktop, .flow-table-mobile { display: none; }
  .desktop-live-cards[hidden] { display: block; }
  .desktop-live-cards h2 { display: flex; gap: 10px; align-items: center; margin: 0 0 18px; font-size: 20px; line-height: 1.3; }
  .desktop-live-dot { flex: 0 0 10px; height: 10px; border-radius: 50%; background: #20bb54; }
  .desktop-flow-group { display: flex; gap: 12px; padding: 15px 12px; margin-top: 10px; background: #f6f9fc; border: 1px solid #e2ebf4; border-radius: 10px; }
  .desktop-flow-icon { color: #168fe6; padding-top: 6px; }
  .desktop-flow-icon svg { width: 26px; height: 26px; }
  .desktop-flow-details { min-width: 0; flex: 1; }
  .desktop-flow-details h3 { margin: 0 0 10px; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
  .desktop-flow-entries { display: grid; gap: 14px; max-height: 280px; overflow-y: auto; scrollbar-width: thin; }
  .desktop-flow-entry { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .desktop-flow-entry .bib { flex: 0 0 34px; min-width: 34px; height: 34px; }
  .desktop-flow-entry strong { display: block; font-size: 13px; overflow-wrap: anywhere; }
  .desktop-flow-entry small { display: block; color: #71869d; margin-top: 4px; font-size: 12px; }
  .sponsor-panel { padding: 7px; min-height: 0; background: #fff; border: 1px solid #dbe6f0; border-radius: 14px; box-shadow: 0 8px 28px #183f6514; }
  .sponsor-panel .sponsor-image-card { min-height: 180px; grid-template-rows: auto minmax(0, 1fr) auto; padding: 15px; }
  .sponsor-image-card img { max-height: 120px; }

  .selection-panel { grid-area: selection; min-width: 0; padding: 18px 20px 0; background: #fff; border: 1px solid #dbe6f0; border-bottom: 0; border-radius: 14px 14px 0 0; }
  .main-result-tabs { margin: 0; padding: 0 0 18px; gap: 12px; border-bottom: 1px solid #e4ecf4; }
  .main-result-tab-buttons { display: flex; gap: 4px; padding: 4px; background: #f0f5fa; border-radius: 10px; }
  .main-result-tab { min-width: 88px; padding: 10px 18px; border: 0; border-radius: 7px; color: #102343; background: transparent; }
  .main-result-tab.selected { color: #fff; background: #168ff4; box-shadow: 0 2px 6px #168ff42b; }
  .live-tab-context { justify-self: end; padding: 10px 14px; border: 1px solid #dbe6f0; border-radius: 8px; font-size: 14px; color: #314c6a; }
  .content { grid-area: results; min-width: 0; gap: 18px; }
  .content-panel { min-width: 0; border: 1px solid #dbe6f0; border-radius: 0 0 14px 14px; border-top: 0; background: #fff; box-shadow: 0 10px 28px #183f6514; padding: 0 18px 18px; }
  .content-panel + .content-panel { border-top: 1px solid #dbe6f0; border-radius: 14px; }
  .panel-header { padding: 24px 2px 22px; background: #fff; border: 0; }
  .panel-header h2 { color: #102343; font-size: 27px; }
  .run-title { color: #71869d; font-weight: 500; font-size: 15px; margin-top: 5px; }
  .live-indicator { background: #f0fcf4; border-color: #afe9c4; box-shadow: none; }
  .table-wrap { border: 1px solid #e1e9f2; border-radius: 10px; }
  .result-table { min-width: 660px; color: #102343; font-variant-numeric: tabular-nums; }
  .result-table th { padding: 14px 10px; background: #f4f7fb; color: #253f60; font-size: 12px; border-bottom-color: #e1e9f2; }
  .result-table td { padding: 18px 10px; font-size: 13px; border-bottom-color: #e8eef5; }
  .result-table tbody tr:last-child td { border-bottom: 0; }
  .result-table tbody tr.has-live { background: #fff; }
  .result-table tbody tr:nth-child(even) { background: #f8fafc; }
  .result-table tbody tr.is-last-finished, .result-table tbody tr.has-live.is-last-finished { background: #fff1ba; }
  .result-table tbody tr:hover { background: #edf6ff; }
  .result-table td:nth-child(3) { font-weight: 650; }
  .rank-value { display: inline-grid; place-items: center; min-width: 34px; height: 34px; border-radius: 8px; background: #edf2f8; font-size: 16px; font-weight: 800; }
  .result-table tbody tr:first-child .rank-value { background: #deedff; color: #0676e4; }
  .result-table .bib { min-width: 34px; height: 34px; }
  .result-time strong { color: #102343; font-size: 15px; }
  .result-time small { color: #71869d; font-weight: 500; }
  .result-table td:nth-last-child(2) .result-time strong { font-size: 18px; font-weight: 800; }
  .selected-competitor-card { grid-template-columns: 46px 52px minmax(120px, 1.4fr) repeat(3, minmax(90px, 1fr)); margin: 18px 0 0; border-color: #f2ce51; border-left: 6px solid #ffce16; box-shadow: none; }
  .selected-competitor-icon { min-height: 104px; font-size: 28px; background: transparent; }
  .selected-competitor-bib, .selected-competitor-name, .selected-competitor-result { padding: 14px 10px; }
  .selected-competitor-bib strong { width: 34px; height: 34px; font-size: 19px; }
  .selected-competitor-name strong { font-size: 15px; white-space: normal; }
  .selected-competitor-name span { font-size: 12px; }
  .selected-competitor-result strong { font-size: 20px; font-variant-numeric: tabular-nums; }
  .selected-competitor-result span { font-size: 11px; }
  .selected-competitor-result.active { background: transparent; border-radius: 0; border-color: #e7e1cc; }
  .selected-competitor-card.single-run { grid-template-columns: 46px 52px minmax(120px, 1.4fr) minmax(120px, 1fr); }
  .selection-panel.hidden { display: none; }
  .live-flow.hidden { display: none; }
}
