/* Trail Events – unified responsive design system
   Shared visual tokens and responsive layout polish for iPhone and iPad.
   Existing app behavior and data markup remain unchanged. */
:root{--ui-font:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",sans-serif;--ui-text:16px;--ui-label:13px;--ui-caption:13px;--ui-title:24px;--ui-section:20px;--ui-control:48px;--ui-touch:44px;--ui-radius:14px;--ui-radius-control:11px;--ui-gap:12px;--ui-content-max:1440px}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{font-family:var(--ui-font);font-size:var(--ui-text);line-height:1.5;padding-bottom:env(safe-area-inset-bottom);-webkit-tap-highlight-color:transparent}
button,input,select,textarea{font-family:var(--ui-font)}
button,[role="button"],a{touch-action:manipulation}
:where(button,input,select,textarea,a,summary):focus-visible{outline:3px solid #8fd5ff;outline-offset:2px}
.wrap{width:min(100%,var(--ui-content-max));margin-inline:auto}
.hero{width:min(calc(100% - 36px),var(--ui-content-max))}
.hero h1{font-size:clamp(28px,3vw,40px);line-height:1.12}
.planner h2,.event-detail-head h2,.elevation-popup-head h2{font-size:var(--ui-title);line-height:1.2}
.planner h3,.planner-panel h3,.planner-review h3{font-size:var(--ui-section);line-height:1.25}
.planner label,.edit-grid label,.radius-location-field label,.toolbar-field,.planner-grid label{font-size:var(--ui-label);line-height:1.35;font-weight:650}
.field,.toolbar-field .field,.planner select,.planner input,.edit-grid input,.run-tools .race-status-control select,.year-race-status select,.app-menu-account #cloudAuthForm input{min-height:var(--ui-control);border-radius:var(--ui-radius-control);font-size:16px;line-height:1.35}
.field{padding:11px 14px}
.planner select,.planner input,.edit-grid input{padding:10px 12px}
.primary,.secondary,.tab-button,.app-menu-item,.more-nav-item,.radius-action-field button,.filter-reset-wrap button{min-height:var(--ui-touch);border-radius:var(--ui-radius-control);line-height:1.25}
.primary{min-height:48px;padding:12px 18px;font-size:15px}
.secondary{padding:10px 13px;font-size:13px}
.tab-button{padding:12px 15px;font-size:14px}
.event,.planner,.planner-panel,.planner-review,.route,.plan-card,.year-group,.event-filter-panel,.race-tools-section,.review-card,.integration-status,.integration-provider{border-radius:var(--ui-radius)}
.event{margin-block:0}
.eventhead{min-height:76px;padding:16px 18px}
.eventtitle{font-size:17px;line-height:1.35}
.meta,.plan-meta,.year-race-meta,.routegrid{line-height:1.5}
.detail{padding:16px 18px 18px}
.routes{gap:var(--ui-gap)}
.route{padding:14px}
.route strong{font-size:15px;line-height:1.35}
.routegrid{gap:8px 14px}
.link{min-height:38px;display:inline-flex;align-items:center;padding:8px 11px}
.tag{line-height:1.35}
.resultsline{min-height:28px}
.event-filter-panel>summary{min-height:52px;padding:13px 16px}
.event-filter-panel .toolbar{gap:var(--ui-gap);padding:14px 16px 16px}
.tabbar{gap:7px;padding:6px}
.planner{padding:20px}
.planner-grid{gap:var(--ui-gap)}
.planner-columns{gap:16px}
.planner-panel,.planner-review{padding:16px}
.edit-grid{gap:var(--ui-gap)}
.run-tools{gap:10px 14px}
.run-tools label{min-height:var(--ui-touch)}
.run-tools input[type=checkbox],.checklist-group input{width:20px;height:20px}
.star-btn{min-width:34px;min-height:38px}
.app-menu-dropdown{border-radius:16px;padding:14px}
.app-menu-item,.more-nav-item{display:flex;align-items:center}
.empty{padding:32px 22px}
.note,.foot{line-height:1.55}
/* iPhone */
@media(max-width:700px){
header{padding-left:max(14px,env(safe-area-inset-left));padding-right:max(14px,env(safe-area-inset-right))}
.hero{width:auto;margin:22px 14px 0}
.wrap{padding-left:max(14px,env(safe-area-inset-left));padding-right:max(14px,env(safe-area-inset-right))}
.toolbar,#eventsTab .toolbar{gap:9px}
#events{display:grid;grid-template-columns:minmax(0,1fr);gap:11px}
.eventhead{grid-template-columns:minmax(0,1fr) auto;gap:10px;padding:14px}
.eventtitle{font-size:16px}
.detail{padding:13px 14px 15px}
.routes{grid-template-columns:minmax(0,1fr)}
.planner{padding:15px}
.planner-panel,.planner-review{padding:13px}
.planner-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.planner-columns{grid-template-columns:minmax(0,1fr)}
.edit-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.event-filter-panel .toolbar{padding:12px}
.event-filter-panel .toolbar-field,.event-filter-panel .field{min-width:0;width:100%}
.tabbar{margin-top:16px}
.tab-button{flex:1 1 130px}
.app-menu-dropdown{right:max(10px,env(safe-area-inset-right))}
}
@media(max-width:390px){
.hero h1{font-size:27px}
.stats{gap:6px}
.stat{min-width:0;flex:1 1 calc(50% - 6px);padding:9px 10px}
.eventhead{grid-template-columns:minmax(0,1fr)}
.date{white-space:normal}
.edit-grid,.planner-grid{grid-template-columns:minmax(0,1fr)}
.planner-grid .event-choice,.planner-grid .primary{grid-column:auto}
}
/* iPad and tablet */
@media(min-width:760px){
.wrap{padding-inline:24px}
.hero{width:min(calc(100% - 48px),var(--ui-content-max))}
#events{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start}
.event{min-width:0}
.routes,.planner-columns{grid-template-columns:repeat(2,minmax(0,1fr))}
.planner{padding:22px}
.event-filter-panel .toolbar{grid-template-columns:repeat(3,minmax(0,1fr))}
.planner-grid{grid-template-columns:minmax(0,1.5fr) minmax(160px,.7fr) auto}
.tabbar{flex-wrap:nowrap}
.tab-button{flex:1 1 0;min-width:0}
}
@media(min-width:1100px){.routes{grid-template-columns:repeat(3,minmax(0,1fr))}#events{gap:16px}}
#events[hidden],.tab-panel[hidden],.tab-panel[hidden] #events{display:none!important}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important}}

/* Compact route overview in the planned-event detail dialog */
.event-detail-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0 14px}
.event-detail-metric,.event-detail-gpx{min-width:0;padding:11px 12px;border:1px solid var(--line);border-radius:12px;background:var(--card)}
.event-detail-metric small,.event-detail-gpx small{display:block;margin-bottom:4px;color:var(--muted);font-size:11px;font-weight:750;letter-spacing:.035em;text-transform:uppercase}
.event-detail-metric strong{display:block;font-size:20px;line-height:1.15;font-variant-numeric:tabular-nums}
.event-detail-metric em{margin-left:4px;color:var(--muted);font-size:11px;font-style:normal;font-weight:650}
.event-detail-gpx{grid-column:1/-1;display:flex;align-items:flex-start;gap:12px}
.event-detail-gpx small{flex:0 0 auto;margin:2px 0 0}
.event-detail-gpx strong{min-width:0;font-size:12px;line-height:1.4;overflow-wrap:anywhere}
@media(max-width:480px){.event-detail-overview{gap:6px}.event-detail-metric,.event-detail-gpx{padding:9px}.event-detail-metric strong{font-size:18px}.event-detail-gpx{display:block}.event-detail-gpx small{margin-bottom:4px}}


/* Alpine Performance v101 – clearer route metrics and GPX planning status */
.event-detail-overview{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:14px 0 16px}
.event-detail-overview .event-detail-metric{position:relative;display:flex;min-height:94px;flex-direction:column;justify-content:space-between;gap:8px;padding:13px;border-color:color-mix(in srgb,var(--line) 78%,#f28a38);background:linear-gradient(155deg,color-mix(in srgb,var(--card) 94%,#f28a38 6%),var(--card));box-shadow:0 5px 16px #0000000b}
.event-detail-overview .event-detail-metric small{font-size:10px;letter-spacing:.075em}
.event-detail-overview .event-detail-metric strong{font-size:clamp(19px,2vw,24px);letter-spacing:-.035em;line-height:1.05}
.event-detail-overview .event-detail-metric em{margin-left:3px;font-size:11px;letter-spacing:0}
.event-detail-overview .event-detail-gpx{align-items:center;gap:10px;padding:12px 14px;border-color:color-mix(in srgb,var(--line) 75%,#f28a38);background:color-mix(in srgb,var(--card) 94%,#f28a38 6%)}
.event-detail-overview .event-detail-gpx small{font-size:10px;letter-spacing:.075em}
.event-detail-overview .event-detail-gpx strong{font-size:13px;line-height:1.45}
@media(max-width:480px){.event-detail-overview{gap:6px;margin:11px 0 13px}.event-detail-overview .event-detail-metric{min-height:82px;padding:10px 9px;gap:6px}.event-detail-overview .event-detail-metric small{font-size:9px}.event-detail-overview .event-detail-metric strong{font-size:18px}.event-detail-overview .event-detail-gpx{display:flex;align-items:flex-start;gap:8px;padding:10px}.event-detail-overview .event-detail-gpx small{flex:0 0 auto;margin:1px 0 0}.event-detail-overview .event-detail-gpx strong{font-size:12px}}
@media(prefers-reduced-motion:no-preference){.event-detail-overview .event-detail-metric{transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}.event-detail-overview .event-detail-metric:hover{transform:translateY(-1px);border-color:#ffad62;box-shadow:0 8px 20px #00000016}}


/* =========================================================
   ALPINE PERFORMANCE – unified visual language
   Dark alpine surfaces, glacier text, signal-orange actions.
   ========================================================= */
:root{
  color-scheme:dark;
  --bg:#0b1119;
  --ink:#edf3f7;
  --muted:#9aaab8;
  --green:#f28a38;
  --lime:#ffad62;
  --line:#293746;
  --card:#141e29;
  --panel:#101a25;
  --shadow:0 12px 34px #0008;
  --ui-radius:16px;
  --ui-radius-control:12px;
}
html,body{background:var(--bg);color:var(--ink)}
body{
  background:
    radial-gradient(ellipse at 82% -12%,#23435a55 0,transparent 38rem),
    linear-gradient(180deg,#0b1119 0%,#0d1620 48%,#0b1119 100%);
  color:var(--ink);
}
header{
  position:relative;
  overflow:hidden;
  background:linear-gradient(112deg,#101d2b 0%,#172b3d 58%,#10202e 100%);
  border-bottom:1px solid #385064;
  box-shadow:0 12px 36px #0005;
}
header:after{
  content:"";position:absolute;inset:0;pointer-events:none;opacity:.12;
  background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22260%22%20height%3D%22180%22%20viewBox%3D%220%200%20260%20180%22%20fill%3D%22none%22%3E%3Cg%20stroke%3D%22%23b8d0df%22%20stroke-width%3D%221.15%22%20opacity%3D%22.9%22%3E%3Cpath%20d%3D%22M-24%2093C-10%2040%2029%2010%2076%2015c42%204%2054%2038%2091%2038%2039%200%2053-34%2091-25%2026%206%2035%2029%2031%2055-6%2042-39%2069-82%2063-37-5-53-32-91-24-37%208-48%2042-88%2039-39-3-67-31-71-68Z%22%2F%3E%3Cpath%20d%3D%22M-5%2091C7%2051%2037%2029%2073%2031c34%202%2049%2030%2084%2030%2033%200%2050-27%2082-20%2022%205%2029%2024%2025%2045-5%2032-31%2053-64%2048-34-5-48-27-82-19-32%207-43%2033-76%2031-30-2-51-23-47-55Z%22%2F%3E%3Cpath%20d%3D%22M14%2089C24%2061%2045%2047%2072%2048c28%201%2043%2023%2075%2023%2028%200%2044-19%2070-14%2017%204%2022%2019%2018%2034-4%2024-25%2039-49%2035-29-4-42-21-70-14-26%206-36%2025-62%2023-23-2-39-17-40-46Z%22%2F%3E%3Cpath%20d%3D%22M33%2088C40%2070%2054%2062%2073%2063c21%201%2034%2017%2058%2017%2023%200%2036-13%2056-9%2013%203%2017%2014%2014%2025-3%2016-18%2027-36%2023-23-4-35-15-56-10-19%205-27%2017-46%2016-17-1-29-12-30-37Z%22%2F%3E%3Cpath%20d%3D%22M-14%20164c33-19%2059-15%2082%201%2023%2016%2044%2017%2066%202%2024-16%2048-18%2074-2%2022%2013%2040%2011%2062-4%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  background-size:260px 180px;
  mask-image:linear-gradient(90deg,transparent,#000 55%,#000);
}
header .top,header .brand,header .utmb-header-index,header .app-menu-button{position:relative;z-index:1}
.brand{color:#dce8ef;letter-spacing:.17em}
.hero{position:relative}
.hero h1{color:#f3f7fa;letter-spacing:-.045em}
h1,h2,h3,h4{color:var(--ink);letter-spacing:-.025em}
p,.note,.foot{color:var(--muted)}
a,.event-detail-row a{color:#ffad62}
button,.primary,.tab-button,.app-menu-item,.more-nav-item{
  transition:background .18s ease,border-color .18s ease,transform .18s ease,box-shadow .18s ease;
}
.primary{
  color:#101820!important;
  background:linear-gradient(135deg,#ffb36e,#f18431)!important;
  border:1px solid #ffbf83!important;
  box-shadow:0 5px 16px #e8792838,inset 0 1px #fff7;
  font-weight:850;
}
.primary:hover{transform:translateY(-1px);box-shadow:0 8px 22px #e8792848}
.secondary,.tab-button,.app-menu-item,.more-nav-item{
  background:#172432;color:#dce7ee;border:1px solid #34495b;
}
.secondary:hover,.tab-button:hover,.app-menu-item:hover,.more-nav-item:hover{
  background:#213447;border-color:#58758b;
}
.tab-button[aria-selected="true"],.tab-button.active,.tab-button[aria-current="page"]{
  background:#f28a38;color:#111a22;border-color:#ffb36e;font-weight:850;
}
.field,input,select,textarea,.planner select,.planner input,.edit-grid input{
  background:#0e1823!important;color:#edf3f7!important;border:1px solid #344657!important;
  accent-color:#f28a38;
}
::placeholder{color:#8293a2!important;opacity:1}
:where(button,input,select,textarea,a,summary):focus-visible{outline-color:#ffad62}
.event,.planner,.planner-panel,.planner-review,.route,.plan-card,.year-group,
.event-filter-panel,.race-tools-section,.review-card,.integration-status,.integration-provider,
.stat,.event-detail-data,.event-detail-group,.season-timeline,.calendar-card{
  background:var(--card);color:var(--ink);border:1px solid var(--line);
  box-shadow:0 8px 26px #0003;
}
.event{overflow:hidden}
.eventhead{background:linear-gradient(105deg,#172635,#121d29);border-bottom:1px solid #2c3d4d}
.eventtitle,.route strong,.event-detail-metric strong{color:#f1f6f9}
.meta,.plan-meta,.year-race-meta,.routegrid,.event-detail-row{color:#c0ccd5}
.event-detail-row{border-color:#293746}
.event-detail-row b{color:#94a7b6}
.event-detail-overview .event-detail-metric{
  background:linear-gradient(150deg,#1a2a38,#121d28);
  border-color:#344a5b;box-shadow:inset 0 1px #ffffff08,0 7px 20px #0003;
}
.event-detail-overview .event-detail-metric small,.event-detail-overview .event-detail-gpx small{
  color:#a6bac8;letter-spacing:.1em;
}
.event-detail-overview .event-detail-metric strong{color:#ffb36e}
.event-detail-overview .event-detail-gpx{
  background:#172735;border-color:#344a5b;color:#e6eef3;
}
.tag,.pill{background:#203344;color:#dce9f0;border-color:#3b566a}
.date{color:#ffad62;font-weight:850}
.app-menu-dropdown{background:#111d29;color:var(--ink);border:1px solid #3a4e60;box-shadow:0 18px 46px #0009}
.app-menu-heading{color:#ffad62}
.app-menu-account,.app-menu-info{background:#182a39;border-color:#3a5366}
.app-menu-hint,.app-menu-info p{color:#b4c4ce}
.info-tip-content{background:#1a2a38;color:#e4edf2;border:1px solid #3b5264}
.info-tip summary{background:#20384a;color:#ffb36e;border-color:#49677c}
.event-filter-panel>summary{color:#edf3f7}
.event-filter-panel .toolbar{background:#111d29}
.event-detail-group summary,.year-jumpbar a{background:#172634;color:#e5edf2;border-color:#34495a}
.year-jumpbar{background:var(--bg)}
.stat{background:linear-gradient(150deg,#1a2b39,#111c27)}
.stat strong,.stat b{color:#ffad62}
.gpx-restriction{background:#351b21;border-color:#b94c56;color:#ffe9e9}
.gpx-import{background:#111d29;border-color:#42596b;color:#dce7ed}
.map,.leaflet-container{background:#101b26}
.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#172635;color:#edf3f7}
.empty{background:#131f2b;border:1px dashed #3b5264;border-radius:16px;color:#b8c7d1}
hr,.divider{border-color:var(--line)}
.badge,.status-badge{border-radius:999px}
@media(max-width:700px){
  header{padding-top:max(16px,env(safe-area-inset-top))}
  .hero{margin-top:18px}
  .eventhead{background:linear-gradient(110deg,#192a39,#121d29)}
}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{transition:none!important;scroll-behavior:auto!important}
}

.gpx-planning-notice{
  margin:10px 0 2px!important;padding:10px 12px!important;
  border:1px solid #79512f;border-left:3px solid #f28a38;border-radius:10px;
  background:#2a211b;color:#f4d7bd!important;font-size:12px;line-height:1.5;
}
.gpx-planning-notice:before{content:"PLANUNGSHINWEIS";display:block;margin-bottom:4px;color:#ffad62;font-size:10px;font-weight:900;letter-spacing:.12em}


/* Alpine Performance – yearly calendar and race-status accents */
.year-calendar-year{
  background:linear-gradient(145deg,#172837,#111d28);
  border-color:#354b5d;box-shadow:0 10px 28px #0004;
}
.year-calendar-year h3{color:#ffad62}
.year-calendar-month{background:#111d28;border-color:#304455}
.year-calendar-month h4{color:#e6eef3}
.year-calendar-week span{color:#93a8b7}
.year-calendar-day{background:#1a2a38;color:#dce7ee;border:1px solid #2a4051}
.year-calendar-day.empty{background:transparent;border:0}
.year-calendar-day.today{outline:2px solid #ffad62;outline-offset:-2px}
.year-calendar-day.has-event{background:#652d36;border-color:#a64c55;color:#fff}
.year-calendar-day.has-hotel{background:#214d70;border-color:#3e739a;color:#fff}
.year-calendar-day .hotel-range-stack{display:flex;flex-direction:column;gap:2px;width:100%;margin-top:auto}
.year-calendar-day .hotel-range-bar{display:block;flex:0 0 4px;width:100%;min-height:4px;background:#8fd5ff;border-radius:0;box-shadow:0 0 0 1px #0b2940}
.year-calendar-day .hotel-range-bar.start{border-radius:4px 0 0 4px}
.year-calendar-day .hotel-range-bar.end{border-radius:0 4px 4px 0}
.year-calendar-day .hotel-range-bar.start.end{border-radius:4px}
.year-calendar-day.hotel-range-start .hotel-range-bar{border-radius:4px 0 0 4px}
.year-calendar-day.hotel-range-end .hotel-range-bar{border-radius:0 4px 4px 0}
.year-calendar-day.hotel-range-start.hotel-range-end .hotel-range-bar{border-radius:4px}
.year-calendar-day.has-event .hotel-range-bar{background:#8fd5ff;box-shadow:0 0 0 1px #381c25}

.year-calendar-day.has-event.has-hotel{background:linear-gradient(135deg,#79313b 0 50%,#24577f 50%);color:#fff}
.year-calendar-legend{color:#c1ced7}
.year-view-switch button.active{background:#f28a38;color:#111a22;border-color:#ffb36e}
.sold-out-stamp{
  border-color:#ff6b70;background:#351b22;color:#ff9a9e;
  box-shadow:0 2px 8px #0006;text-shadow:0 1px #0005;
}
.sold-out-overview{
  border-color:#bd535a;background:#351b22;color:#ffb0b2;
}
.sold-out-overview::before{color:#ff747b}
.sold-out-text{border-left-color:#f05c64;background:#351b22;color:#ffb0b2}
#yearOverview .year-race{
  background:linear-gradient(145deg,#172634,#121d28);
  border-color:#314657;border-left-color:#f28a38;
  box-shadow:0 5px 18px #0003;
}
#yearOverview .year-race strong{color:#edf3f7}
#yearOverview .year-race-meta{color:#aebdca}
#yearOverview .year-heading{color:#ffad62}
#yearOverview .year-totals{color:#e1eaf0;border-color:#304354}


/* Alpine Performance – responsive season overview */
#yearOverview .year-race{
  position:relative;min-width:0;overflow:hidden;
  border-radius:14px;
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}
#yearOverview .year-race:focus-within{
  border-color:#ffad62;box-shadow:0 0 0 2px #f28a3840,0 8px 22px #0004;
}
#yearOverview .year-race-head{gap:10px;min-width:0}
#yearOverview .year-race strong{line-height:1.35;overflow-wrap:anywhere}
#yearOverview .year-race-meta{line-height:1.5}
.year-calendar-grid{align-items:stretch}
.year-calendar-month{box-shadow:inset 0 1px #ffffff08,0 4px 12px #0002}
.year-calendar-day{display:flex;flex-direction:column;justify-content:flex-start;gap:2px;overflow:hidden}
.year-calendar-day .day-number{font-size:11px;line-height:1.25}
.year-calendar-day .day-mark{color:#f5f8fa;font-size:8px;font-weight:750}
.year-calendar-day.has-event .day-mark,.year-calendar-day.has-hotel .day-mark{color:#fff}
.year-calendar-legend{align-items:center}
.year-calendar-legend>*{display:inline-flex;align-items:center;gap:5px}
@media(min-width:760px){
  #yearOverview .year-group{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
  #yearOverview .year-heading,#yearOverview .year-totals,#yearOverview .year-load-chart{grid-column:1/-1}
  .year-calendar-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:700px){
  #yearOverview .year-group{grid-template-columns:minmax(0,1fr)}
  .year-calendar-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .year-calendar-year{padding:10px}
  .year-calendar-month{padding:6px}
  .year-calendar-day{min-height:30px;padding:2px}
}
@media(max-width:360px){
  .year-calendar-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
  .year-calendar-month{padding:4px}
  .year-calendar-day{min-height:27px}
  .year-calendar-day .day-mark{font-size:7px}
}
@media(hover:hover){
  #yearOverview .year-race:hover{transform:translateY(-2px);border-color:#59778d;box-shadow:0 10px 24px #0005}
}
@media(prefers-reduced-motion:reduce){
  #yearOverview .year-race{transition:none}
}


/* Alpine Performance – connected planning surfaces */
.season-timeline,.calendar-card{
  background:linear-gradient(145deg,#172634,#111c27);
  border:1px solid #314657;border-radius:16px;
  box-shadow:0 8px 24px #0003;
}
.season-timeline :where(h2,h3,h4),.calendar-card :where(h2,h3,h4){color:#edf3f7}
.event-detail-group{
  overflow:hidden;border:1px solid #304556;border-radius:13px;
  background:#131f2b;
}
.event-detail-group>summary{
  padding:12px 14px;background:#182a39;color:#e7eef3;
  font-weight:800;cursor:pointer;
}
.event-detail-group[open]>summary{border-bottom:1px solid #304556;color:#ffad62}
.event-detail-group-body{padding:12px 14px;color:#c5d0d9}
@media(max-width:700px){
  .season-timeline,.calendar-card{border-radius:13px}
  .event-detail-group>summary{min-height:44px}
}


/* Alpine Performance – race preparation and travel readiness */
.race-check-progress{display:grid;gap:7px;margin:10px 0 14px}
.race-check-progress>b{font-size:12px;color:var(--ink)}
.race-check-track,.checklist-group-track{height:6px;overflow:hidden;border-radius:99px;background:#293b49}
.race-check-track i,.checklist-group-track i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#d87531,#ffad62);transition:width .2s ease}
.checklist-group{margin:9px 0;padding:11px 12px;border:1px solid var(--line);border-radius:12px;background:linear-gradient(145deg,#162431,#121d28)}
.checklist-group-heading{display:grid;gap:7px;margin-bottom:8px}
.checklist-group-heading>b{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--ink)}
.checklist-group-heading>b span{font-size:15px}
.checklist-group-track{height:4px}
.checklist-group>label{display:flex;align-items:center;gap:9px;min-height:40px;padding:7px 2px;border-top:1px solid #ffffff0d;color:#d4dee6;font-size:12px;line-height:1.4}
.checklist-group>label input{flex:none;width:17px;height:17px;accent-color:#f28a38}
.checklist-group-travel{border-color:#4b6170;background:linear-gradient(145deg,#1b3040,#142331);box-shadow:inset 3px 0 #f28a38}
.checklist-group-travel .checklist-group-heading>b{color:#ffbd85}
.checklist-group>label:has(input:checked){color:#8fa1af}
@media(max-width:480px){
 .checklist-group{padding:9px 10px}
 .checklist-group>label{min-height:42px;font-size:12px}
}
@media(prefers-reduced-motion:reduce){.race-check-track i,.checklist-group-track i{transition:none}}


/* Alpine Performance – editable travel window per planned route */
.travel-plan-editor{
  margin:12px 0 2px;padding:13px;border:1px solid #40596b;border-radius:14px;
  background:linear-gradient(145deg,#1b3040,#121f2c);
  box-shadow:inset 3px 0 #f28a38,0 6px 18px #0002;
}
.travel-plan-editor h5{margin:0 0 5px;color:#ffbd85;font-size:14px}
.travel-plan-editor .edit-grid{gap:9px;margin:10px 0}
.travel-plan-editor label{display:grid;gap:5px;min-width:0;color:#b9c8d3;font-size:11px;font-weight:750}
.travel-plan-editor input:not([type=checkbox]){
  width:100%;min-width:0;min-height:40px;padding:8px 9px;
  border:1px solid #40596b;border-radius:9px;background:#0e1923;color:#edf3f7;
  color-scheme:dark;font:inherit;font-size:12px
}
.travel-plan-editor .travel-paid{display:flex;align-items:center;gap:9px;min-height:40px}
.travel-plan-editor .travel-paid input{width:18px;height:18px;accent-color:#f28a38}
.travel-plan-editor [data-travel-save]{min-height:42px;margin-top:3px}
.travel-plan-editor [data-travel-status]{min-height:16px;margin:7px 0 0}
@media(min-width:700px){.travel-plan-editor .edit-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:420px){.travel-plan-editor{padding:10px}.travel-plan-editor .edit-grid{gap:7px}}


/* Alpine Performance – compact race cards for a dense but readable season overview */
#yearOverview .year-month-races{padding:4px 8px 9px}
#yearOverview .year-month-races .year-race{
  display:grid;grid-template-columns:minmax(0,1fr);gap:0;
  margin:6px 0;padding:10px 11px;border:1px solid #2d4050;
  border-left:3px solid #f28a38;border-radius:11px;
  background:linear-gradient(112deg,#172634 0%,#121e29 76%);
  box-shadow:0 3px 10px #0002;
}
#yearOverview .year-month-races .year-race-head{align-items:center;gap:8px}
#yearOverview .year-month-races .year-race-head>strong{
  min-width:0;font-size:13px;line-height:1.3;letter-spacing:-.015em
}
#yearOverview .year-month-races .year-race-head>.secondary{
  min-width:34px;min-height:34px;width:34px;height:34px;padding:4px;
  border-radius:10px
}
#yearOverview .year-month-races .year-race-meta{
  display:flex;flex-wrap:wrap;align-items:center;gap:4px 9px;
  margin:4px 0 6px;color:#b5c4cf;font-size:10px;line-height:1.4
}
#yearOverview .year-month-races .year-race-status-controls{
  grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:5px 0 2px
}
#yearOverview .year-month-races .year-race-status{
  gap:3px;font-size:9px;letter-spacing:.025em
}
#yearOverview .year-month-races .year-race-status select{
  min-height:35px;padding:5px 7px;border-radius:8px;font-size:10px
}
#yearOverview .year-month-races .year-race-more{
  margin-top:5px;border-radius:8px;background:#0e1923
}
#yearOverview .year-month-races .year-race-more>summary{
  min-height:33px;padding:7px 9px;font-size:10px
}
#yearOverview .year-month-races .year-race-more-content{padding:0 9px 8px}
#yearOverview .year-month-races .year-race:focus-within{
  border-color:#ffad62;box-shadow:0 0 0 2px #f28a3830,0 5px 14px #0003
}
@media(min-width:760px){
  #yearOverview .year-month-races .year-race{padding:11px 12px}
  #yearOverview .year-month-races .year-race-head>strong{font-size:13px}
}
@media(max-width:390px){
  #yearOverview .year-month-races{padding-inline:5px}
  #yearOverview .year-month-races .year-race{padding:9px}
  #yearOverview .year-month-races .year-race-status-controls{gap:5px}
  #yearOverview .year-month-races .year-race-status select{padding-inline:5px;font-size:9px}
}


/* Alpine Performance – annual planning summary above the month navigator */
#yearOverview .year-season-summary{
  display:flex;flex-wrap:wrap;align-items:stretch;gap:7px;
  margin:9px 0 3px;padding:0;
}
#yearOverview .year-season-summary-item{
  display:inline-flex;align-items:baseline;gap:6px;min-height:34px;
  padding:7px 10px;border:1px solid #304556;border-radius:9px;
  background:linear-gradient(120deg,#192b3a,#121e29);
}
#yearOverview .year-season-summary-item strong{
  color:#ffad62;font-size:13px;font-weight:900;font-variant-numeric:tabular-nums;
}
#yearOverview .year-season-summary-item small{
  color:#b4c3cd;font-size:10px;font-weight:700;line-height:1.2;
}
@media(max-width:390px){
  #yearOverview .year-season-summary{gap:5px}
  #yearOverview .year-season-summary-item{min-height:32px;padding:6px 8px;gap:5px}
  #yearOverview .year-season-summary-item strong{font-size:12px}
  #yearOverview .year-season-summary-item small{font-size:9px}
}


/* Alpine Performance – scan-friendly race facts without changing their source values */
#yearOverview .year-month-races .year-race-meta{
  display:flex;flex-wrap:wrap;align-items:center;gap:5px;margin:5px 0 7px
}
#yearOverview .year-month-races .year-race-meta-item{
  display:inline-flex;align-items:center;min-height:22px;max-width:100%;
  padding:3px 7px;border:1px solid #304657;border-radius:7px;
  background:#0f1b26;color:#bdcbd5;font-size:10px;font-weight:650;
  line-height:1.25;overflow-wrap:anywhere
}
#yearOverview .year-month-races .year-race-meta-item[data-meta-kind="date"]{
  color:#ffbd85;border-color:#704c32;background:#2a211b;font-weight:800
}
#yearOverview .year-month-races .year-race-meta-item[data-meta-kind="distance"]{
  color:#e7f0f5;border-color:#40586b;background:#1b3040;font-weight:800;
  font-variant-numeric:tabular-nums
}
#yearOverview .year-month-races .year-race-meta-item[data-meta-kind="elevation"]{
  color:#a9d5ef;border-color:#345b73;background:#142b3b;font-weight:800;
  font-variant-numeric:tabular-nums
}
#yearOverview .year-month-races .year-race-meta-item[data-meta-kind="type"]{
  color:#ffbd85;border-color:#704c32;background:#2a211b
}


/* Annual planner – factual spacing and same-day race collision indicators */
#yearOverview .year-month-races .year-race-spacing{
  display:inline-flex;align-items:center;gap:5px;width:max-content;max-width:100%;
  margin:1px 0 5px;padding:5px 8px;border:1px solid #6c5734;border-radius:8px;
  background:#2a2419;color:#f3c77e;font-size:10px;font-weight:750;line-height:1.3
}
#yearOverview .year-month-races .year-race-spacing.is-conflict{
  border-color:#914b45;background:#351f20;color:#ffb0a7
}
#yearOverview .year-month-races .year-race-spacing.is-close{
  border-color:#665438;background:#2b271e;color:#f1d39a
}


/* Compact season interval summary */
.year-season-summary-note{
  grid-column:1/-1;margin:0;padding-top:7px;border-top:1px solid var(--line);
  color:var(--muted);font-size:10px;line-height:1.45
}
.year-season-summary-item{font-variant-numeric:tabular-nums}


#yearOverview .year-season-summary-item[data-source="history"]{
  border-color:color-mix(in srgb,#70b7e5 48%,var(--line));
  background:linear-gradient(145deg,color-mix(in srgb,#70b7e5 13%,var(--card)),var(--card))
}
#yearOverview .year-season-summary-item[data-source="history"] strong{color:#83c4ef}


/* Event metadata: UTMB values and organizer-reported sold-out status */
#yearOverview .year-month-races .year-race-meta-item[data-meta-kind="utmb-index"],
#yearOverview .year-month-races .year-race-meta-item[data-meta-kind="utmb-score"]{
  border-color:#796b9d;background:#28243b;color:#d7c9ff;font-weight:800
}
#yearOverview .year-month-races .year-race-meta-item[data-meta-kind="soldout"]{
  border-color:#bd535a;background:#351b22;color:#ffb0b2;font-weight:850
}
#yearOverview .year-month-races .year-race-head .sold-out-stamp{
  display:inline-flex;align-items:center;justify-content:center;flex:none;
  padding:5px 9px;border:2px solid #ff6b70;border-radius:5px;
  font-size:9px;font-weight:950;letter-spacing:.12em;line-height:1;
  transform:rotate(-5deg);white-space:nowrap
}
@media(max-width:420px){
  #yearOverview .year-month-races .year-race-head .sold-out-stamp{font-size:8px;padding:4px 6px}
}


/* Shared race-detail visual language: alpine header and compact metric tiles */
.race-detail-overview{
  margin:0 0 14px;padding:15px;border:1px solid #354b5d;border-left:3px solid #f28a38;
  border-radius:15px;background:linear-gradient(145deg,#1b2c3b,#111d28);
  box-shadow:0 7px 20px #0003
}
.race-detail-overview-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:12px}
.race-detail-kicker{display:block;margin-bottom:5px;color:#f4a45e;font-size:9px;font-weight:900;letter-spacing:.14em}
.race-detail-overview-heading h4{margin:0;color:#f1f5f8;font-size:17px;line-height:1.25}
.race-detail-overview-heading p{margin:4px 0 0;color:#b9c8d3;font-size:12px}
.race-detail-date{max-width:125px;padding:6px 8px;border:1px solid #40586c;border-radius:9px;background:#172a3a;color:#c9d9e5;font-size:10px;font-weight:750;text-align:right}
.race-detail-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:13px}
.race-detail-metric{min-width:0;padding:9px;border:1px solid #344b5e;border-radius:10px;background:#142331}
.race-detail-metric strong,.race-detail-metric span{display:block;overflow-wrap:anywhere}
.race-detail-metric strong{color:#f3f6f8;font-size:15px;font-variant-numeric:tabular-nums;line-height:1.25}
.race-detail-metric span{margin-top:4px;color:#9fb1bf;font-size:9px;font-weight:750}
.race-detail-tools>h4{margin:8px 0 10px;color:var(--ink);font-size:15px}
.race-detail-tools .race-tools-section{margin:10px 0}
@media(max-width:440px){
 .race-detail-overview{padding:12px}
 .race-detail-overview-heading{grid-template-columns:minmax(0,1fr)}
 .race-detail-date{max-width:none;width:max-content;text-align:left}
 .race-detail-metrics{gap:6px}
 .race-detail-metric{padding:8px 6px}
 .race-detail-metric strong{font-size:13px}
}


/* Alpine elevation profile */
.elevation-chart-wrap{margin:10px 0 13px;padding:11px;border:1px solid var(--line);border-radius:12px;background:var(--bg)}
.elevation-chart-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-bottom:8px}
.elevation-chart-summary span{min-width:0;padding:7px;border-radius:9px;background:var(--card);text-align:center}
.elevation-chart-summary b,.elevation-chart-summary small{display:block}
.elevation-chart-summary b{font-size:14px;color:var(--ink);font-variant-numeric:tabular-nums}
.elevation-chart-summary small{margin-top:3px;color:var(--muted);font-size:9px}
.elevation-chart{display:block;width:100%;height:auto;overflow:visible}
.elevation-chart line{stroke:var(--line);stroke-width:1;stroke-dasharray:4 5}
.elevation-chart polygon{fill:#e98a3b22;stroke:none}
.elevation-chart polyline{fill:none;stroke:#e98a3b;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.elevation-chart text{fill:var(--muted);font-size:10px}
.segment-table{margin-top:10px;border:1px solid var(--line);border-radius:10px;overflow:hidden}
.segment-row{grid-template-columns:1fr .8fr .9fr;align-items:center;gap:6px}
.segment-row b:nth-child(2),.segment-row span:nth-child(2){color:var(--ink);font-variant-numeric:tabular-nums}
.segment-head{background:var(--bg);font-size:10px;font-weight:800}
@media(max-width:440px){.elevation-chart-wrap{padding:8px}.elevation-chart-summary{gap:4px}.elevation-chart-summary span{padding:6px 3px}.elevation-chart-summary b{font-size:12px}.elevation-chart-summary small{font-size:8px}.segment-row{font-size:10px;padding:7px 5px}}


/* Consistent map and GPX presentation across event and route details */
.gpx-import{
  position:relative;display:block;min-width:0;margin:12px 0;padding:14px;
  border:1px solid #40586b;border-radius:14px;
  background:linear-gradient(145deg,#192b3a,#111d28);
  box-shadow:0 7px 20px #0003;overflow:hidden
}
.gpx-import:before{
  content:"STRECKEN-DATEI";display:block;margin:0 0 8px;
  color:#f4a45e;font-size:9px;font-weight:900;letter-spacing:.14em
}
.gpx-import :is(button,a){max-width:100%;overflow-wrap:anywhere}
.gpx-import input[type=file]{max-width:100%;font-size:12px;color:#c8d6df}
.gpx-import .gpx-planning-notice{margin-top:12px!important}
.gpx-restriction{
  display:flex;align-items:flex-start;gap:10px;margin:10px 0;padding:12px 13px;
  border:1px solid #a94b55;border-left:4px solid #e05d68;border-radius:12px;
  background:linear-gradient(120deg,#3a1d25,#281820);color:#ffe9e9;
  font-size:12px;line-height:1.5
}
.map,.leaflet-container{
  min-width:0;max-width:100%;border:1px solid #354b5d;border-radius:14px;
  box-shadow:0 8px 22px #0003;overflow:hidden
}
.leaflet-container{font:inherit;isolation:isolate}
.leaflet-control-zoom a{
  background:#172b3b!important;color:#f1f6f9!important;border-color:#40586b!important
}
.leaflet-control-attribution{
  background:#101d29dd!important;color:#c1ced7!important;font-size:9px!important
}
.leaflet-control-attribution a{color:#ffb36e!important}
.leaflet-popup-content-wrapper,.leaflet-popup-tip{
  background:#172b3b;color:#edf3f7;border:1px solid #40586b;
  box-shadow:0 8px 24px #0008
}
.leaflet-popup-content{margin:11px 13px;font-size:12px;line-height:1.45}
.leaflet-popup-content b,.leaflet-popup-content strong{color:#ffad62}
.leaflet-popup-close-button{color:#e6eef3!important}
@media(max-width:480px){
  .gpx-import{padding:11px;border-radius:12px}
  .map,.leaflet-container{border-radius:11px}
  .leaflet-control-attribution{font-size:8px!important}
}


/* Annual race cards – clearer hierarchy, readable chips and touch targets */
#yearOverview .year-month-races .year-race{
  position:relative;min-width:0;transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease
}
#yearOverview .year-month-races .year-race:focus-within{
  border-color:color-mix(in srgb,var(--green) 62%,var(--line));
  box-shadow:0 0 0 2px color-mix(in srgb,var(--green) 16%,transparent),0 5px 16px #0002
}
#yearOverview .year-month-races .year-race-head{
  align-items:center;gap:9px;flex-wrap:wrap
}
#yearOverview .year-month-races .year-race-head>strong{
  flex:1 1 190px;min-width:0;font-size:14px;font-weight:800;line-height:1.35
}
#yearOverview .year-month-races .year-race-head>.secondary{
  min-width:40px;min-height:40px;border-radius:10px
}
#yearOverview .year-month-races .year-race-meta{
  gap:5px 6px;margin:7px 0 9px
}
#yearOverview .year-month-races .year-race-meta-item{
  min-height:25px;padding:4px 8px;border-radius:8px;font-size:10px;
  letter-spacing:.005em
}
#yearOverview .year-month-races .year-race-meta-item[data-meta-kind="utmb-series"]{
  color:#e1d7ff;border-color:#76649d;background:#28233c;font-weight:850
}
#yearOverview .year-month-races .year-race-meta-item[data-meta-kind="cutoff"]{
  color:#f3d7a2;border-color:#80643a;background:#302719;font-weight:750
}
#yearOverview .year-month-races .year-race-meta-item[data-meta-kind="time-limit"]{
  color:#bfeaff;border-color:#345b73;background:#142b3b;font-weight:800;
  font-variant-numeric:tabular-nums
}
#yearOverview .year-month-races .year-race-status-controls{
  gap:7px;margin:9px 0 7px
}
#yearOverview .year-month-races .year-race-status select{
  min-height:42px;padding:7px 9px;border-radius:10px
}
#yearOverview .year-month-races .year-race-more>summary{
  min-height:40px;display:flex;align-items:center;gap:8px
}
@media(hover:hover) and (prefers-reduced-motion:no-preference){
 #yearOverview .year-month-races .year-race:hover{
   border-color:#526c7e;box-shadow:0 7px 18px #0003;transform:translateY(-1px)
 }
}
@media(max-width:420px){
 #yearOverview .year-month-races .year-race-head>strong{flex-basis:150px;font-size:13px}
 #yearOverview .year-month-races .year-race-meta-item{font-size:9px;padding:4px 6px}
 #yearOverview .year-month-races .year-race-status select{min-height:40px}
}
@media(prefers-reduced-motion:reduce){
 #yearOverview .year-month-races .year-race{transition:none}
}


/* Annual overview – quick year navigation and clearer season summary */
#yearOverview{scroll-margin-top:16px}
#yearOverview .year-overview-nav{
  position:sticky;top:env(safe-area-inset-top,0px);z-index:8;
  display:flex;align-items:center;gap:7px;overflow-x:auto;
  margin:0 0 12px;padding:9px 10px;border:1px solid #354b5d;
  border-radius:13px;background:#111d28ee;backdrop-filter:blur(12px);
  scrollbar-width:none;scrollbar-padding-inline:10px
}
#yearOverview .year-overview-nav::-webkit-scrollbar{display:none}
#yearOverview .year-overview-nav-label{
  flex:none;padding-right:3px;color:#9fb1bf;font-size:10px;
  font-weight:850;letter-spacing:.08em;text-transform:uppercase
}
#yearOverview .year-overview-nav-button{
  flex:none;min-width:54px;min-height:36px;padding:6px 11px;
  border:1px solid #40586b;border-radius:9px;background:#192b3a;
  color:#cbd8e0;font-size:12px;font-weight:850;font-variant-numeric:tabular-nums
}
#yearOverview .year-overview-nav-button[aria-current="true"]{
  border-color:#f28a38;background:#382719;color:#ffc18d;
  box-shadow:inset 0 0 0 1px #f28a3840
}
#yearOverview .year-group{scroll-margin-top:78px}
#yearOverview .year-season-summary{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(105px,1fr));
  gap:7px;margin:10px 0 12px;padding:11px;
  border:1px solid #354b5d;border-radius:13px;
  background:linear-gradient(145deg,#192b3a,#111d28)
}
#yearOverview .year-season-summary-item{
  display:flex;flex-direction:column;justify-content:center;gap:4px;
  min-width:0;padding:8px;border:1px solid #354b5d;border-radius:9px;
  background:#142331
}
#yearOverview .year-season-summary-item strong{
  color:#ffad62;font-size:17px;line-height:1.15;font-weight:900;
  font-variant-numeric:tabular-nums;overflow-wrap:anywhere
}
#yearOverview .year-season-summary-item small{
  color:#aebfca;font-size:9px;line-height:1.3;font-weight:700
}
#yearOverview .year-season-summary-note{color:#9fb1bf;font-size:10px}
@media(max-width:480px){
 #yearOverview .year-overview-nav{margin-inline:-2px;padding:8px;gap:6px}
 #yearOverview .year-overview-nav-button{min-width:49px;min-height:38px;padding-inline:9px}
 #yearOverview .year-season-summary{grid-template-columns:repeat(2,minmax(0,1fr));padding:8px;gap:6px}
 #yearOverview .year-season-summary-item{padding:8px}
 #yearOverview .year-season-summary-item strong{font-size:16px}
}
@media(prefers-reduced-motion:reduce){
 #yearOverview .year-overview-nav-button{scroll-behavior:auto}
}


/* NORTHBOUND / ALPINE PERFORMANCE – brand alignment */
:root{
  --bg:#0B1117;
  --ink:#F5F7FA;
  --muted:#AAB5C0;
  --green:#FF6A00;
  --lime:#FF6A00;
  --line:#34414D;
  --card:#151D25;
  --panel:#101820;
  --northbound-orange:#FF6A00;
  --northbound-ice:#7FD8FF;
}
html,body{background-color:#0B1117;color:#F5F7FA}
body{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
h1,h2,h3,h4,.hero h1,.eventtitle,.year-heading{
  font-family:Montserrat,Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
a,.date,.app-menu-heading,.year-calendar-year h3,
#yearOverview .year-heading{color:#FF6A00}
.primary,.tab-button[aria-selected="true"],.tab-button.active,
.year-view-switch button.active,#yearOverview .year-overview-nav-button[aria-current="true"]{
  background:#FF6A00!important;border-color:#FF8A36!important;color:#0B1117!important;
}
.stat strong,.stat b,.event-detail-overview .event-detail-metric strong,
#yearOverview .year-season-summary-item strong{color:#FF6A00}
:where(button,input,select,textarea,a,summary):focus-visible{outline-color:#7FD8FF}
.tabbar{
  background:rgba(11,17,23,.96)!important;
  border:1px solid #34414D!important;
  box-shadow:0 12px 30px #0007!important;
  backdrop-filter:blur(16px);
}
.tab-button,.secondary,.app-menu-item,.more-nav-item{
  background:#151D25;color:#F5F7FA;border-color:#34414D;
}
.tab-button[aria-selected="true"],.tab-button.active{box-shadow:0 4px 16px #FF6A0033}
.year-view-switch,.year-view-switch button{
  background:#151D25;color:#F5F7FA;border-color:#34414D;
}
.year-view-switch button.active{background:#FF6A00!important;color:#0B1117!important}
.year-calendar-day.has-hotel{background:#163449;border-color:#7FD8FF;color:#F5F7FA}
.year-calendar-day .hotel-range-bar{background:#7FD8FF}
.gpx-planning-notice{border-color:#87502d;border-left-color:#FF6A00}
@media(max-width:700px){
  .tabbar{border-radius:16px;background:rgba(11,17,23,.97)!important}
}


/* NORTHBOUND v102 — final stacking and neutral-surface pass */
header{
  overflow:visible!important;
  isolation:isolate!important;
  position:relative!important;
  z-index:1000!important;
}
header:after{z-index:0!important;pointer-events:none!important}
header>.top{position:relative!important;z-index:1002!important}
header>.hero{position:relative!important;z-index:1!important}
header .pill{position:relative!important;z-index:1003!important}
header .app-menu-dropdown,
header .app-settings-panel{
  position:absolute!important;
  z-index:10000!important;
  max-height:min(78vh,760px)!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
  background:#101922!important;
  color:#F5F7FA!important;
  border:1px solid #40505E!important;
  box-shadow:0 22px 60px #000D!important;
}
@media(max-width:700px){
  header .app-menu-dropdown,
  header .app-settings-panel{
    position:fixed!important;
    top:calc(env(safe-area-inset-top,0px) + 82px)!important;
    right:max(12px,env(safe-area-inset-right))!important;
    left:auto!important;
    width:min( min(440px, calc(100vw - 24px)), 440px)!important;
    max-width:calc(100vw - 24px)!important;
    max-height:calc(100dvh - env(safe-area-inset-top,0px) - 100px)!important;
    z-index:2147483000!important;
  }
}
/* One palette across every app surface; no green-tinted cards or chips. */
:root{
  --bg:#0B1117!important;
  --ink:#F5F7FA!important;
  --muted:#AAB5C0!important;
  --line:#34414D!important;
  --card:#151D25!important;
  --panel:#101820!important;
  --northbound-orange:#FF6A00!important;
  --northbound-ice:#7FD8FF!important;
}
html,body,main.wrap,.wrap,.tab-panel{background-color:#0B1117!important;color:#F5F7FA!important}
body{
  background:
    radial-gradient(ellipse at 82% -12%,#173044 0,transparent 38rem),
    linear-gradient(180deg,#0B1117 0%,#101820 52%,#0B1117 100%)!important;
}
:is(.event,.planner,.planner-panel,.planner-review,.route,.plan-card,.year-group,
.event-filter-panel,.race-tools-section,.review-card,.integration-status,
.integration-provider,.stat,.event-detail-data,.event-detail-group,
.season-timeline,.calendar-card,.year-calendar-year,.year-calendar-month,
.year-season-summary,.year-profile-panel,.year-load-chart,.year-month-races,
.event-detail-overview,.race-detail-overview,.elevation-chart-wrap,
.segment-table,.gpx-import,.app-menu-account,.app-menu-info,
.settings-group,.settings-connection,.info-tip-content,.empty,.plan-empty){
  background-color:#131C25!important;
  background-image:none!important;
  color:#F5F7FA!important;
  border-color:#2B3945!important;
  box-shadow:0 8px 24px #0005!important;
}
.eventhead,#events .eventhead{
  background:linear-gradient(105deg,#1A2732,#121B24)!important;
  color:#F5F7FA!important;border-color:#2B3945!important;
}
.tag,#events .meta>.tag,
.year-race-meta-item,.year-season-summary-item,
.year-calendar-day,.year-view-switch,.year-view-switch button,
.year-overview-nav-button,.secondary,.tab-button,.app-menu-item,.more-nav-item{
  background:#18232D!important;color:#DCE6ED!important;border-color:#354653!important;
}
.date,#events .date{
  background:#1D3442!important;color:#BFEAFF!important;border-color:#49687B!important;
}
.tab-button[aria-selected="true"],.tab-button.active,
.tab-button[aria-current="page"],.year-view-switch button.active,
.year-overview-nav-button[aria-current="true"]{
  background:#FF6A00!important;color:#0B1117!important;border-color:#FF8A36!important;
}
.eventtitle,.route strong,.event-detail-metric strong,
.year-race strong,.year-heading,h1,h2,h3,h4,
.app-menu-heading,.settings-group>strong{color:#F5F7FA!important}
.stat b,.stat strong,.year-season-summary-item strong,
.event-detail-overview .event-detail-metric strong{color:#7FD8FF!important}
a,.link,.date{color:#7FD8FF}
:where(button,input,select,textarea,a,summary):focus-visible{outline-color:#7FD8FF!important}
input,select,textarea,.field{background:#0E1720!important;color:#F5F7FA!important;border-color:#354653!important}
::placeholder{color:#9AA8B4!important}
#yearOverview .year-month-races .year-race-meta-item[data-meta-kind="type"],
#yearOverview .year-month-races .year-race-meta-item[data-meta-kind="time-limit"]{
  background:#18232D!important;color:#DCE6ED!important;border-color:#354653!important;
}
.event-detail-overview .event-detail-metric,
.event-detail-overview .event-detail-gpx,
.race-detail-metric,.race-detail-date,
.year-season-summary-item,.year-calendar-month{
  background:#18232D!important;border-color:#354653!important;
}
.year-calendar-day.has-hotel{background:#163449!important;border-color:#7FD8FF!important}
.year-calendar-day.has-event{background:#512A31!important;border-color:#A85B63!important}
.year-calendar-day.has-event.has-hotel{background:linear-gradient(135deg,#512A31 0 50%,#163449 50%)!important}
.gpx-planning-notice{background:#202A32!important;color:#DCE6ED!important;border-color:#765333!important}
.gpx-restriction{background:#351B21!important;color:#FFE9E9!important;border-color:#A94B55!important}
.sold-out-stamp,.sold-out-overview,.sold-out-text{background:#351B22!important;color:#FFB0B2!important}
.app-menu-hint,.app-menu-info p,.note,.foot,.meta,.plan-meta,.year-race-meta{color:#B5C2CC!important}


/* Header finish: real contour-map lines, never the former diamond grid. */
header:after{
  opacity:.2!important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 420 320' fill='none'%3E%3Cg stroke='%237FD8FF' stroke-width='1.15' stroke-linecap='round'%3E%3Cpath d='M-35 185C8 150 35 155 67 126S119 62 164 74s56 55 91 45 49-63 91-55 68 35 109 5 57-54 94-35'/%3E%3Cpath d='M-30 204C14 170 39 176 78 146s55-52 87-49 58 52 91 43 52-57 85-48 68 37 108 7 58-48 94-31'/%3E%3Cpath d='M-22 224C21 192 50 197 88 169s51-40 78-39 60 47 90 40 55-50 80-42 70 37 110 10 60-42 95-27'/%3E%3Cpath d='M-10 245C30 214 60 218 98 193s46-31 70-30 60 41 88 35 57-43 77-36 70 36 111 13 61-37 94-23'/%3E%3Cpath d='M25 265C58 240 78 242 112 220s39-23 60-22 57 34 82 29 55-35 73-29 66 31 105 15 58-31 86-18'/%3E%3Cpath d='M102 122c18-22 44-31 65-24 17 6 24 25 18 41-7 18-29 29-48 24-20-5-34-23-35-41Z'/%3E%3Cpath d='M113 123c14-16 34-22 49-17 13 5 18 18 13 30-5 13-21 21-35 17-15-4-25-17-27-30Z'/%3E%3Cpath d='M125 124c9-10 22-14 32-10 8 3 11 11 8 19-4 8-14 13-23 10-9-2-16-10-17-19Z'/%3E%3C/g%3C/svg%3E")!important;
  background-repeat:no-repeat!important;
  background-size:min(52vw,520px) auto!important;
  background-position:right center!important;
  mask-image:linear-gradient(90deg,transparent 0%,#000 38%,#000 100%)!important;
}
.pill button#cloudProfileButton{
  background:#18232D!important;color:#F5F7FA!important;border-color:#40505E!important;
}
.app-menu-account #cloudStatus,
.app-menu-account #cloudCheckStatus,
.app-menu-account #cloudAuthForm input,
.app-menu-account #cloudAccountActions,
.app-menu-account .app-menu-hint{
  color:#B5C2CC!important;border-color:#354653!important;
}
.app-menu-account #cloudAuthForm input{background:#0E1720!important}


/* NORTHBOUND: UTMB profile/result panels use the same neutral surface as the rest of the app. */
div[class*="utmb-profile"],
div[class*="utmb-result"],
div[class*="utmb-score"]{
  background:linear-gradient(145deg,#1A2732 0%,#121B24 100%)!important;
  color:#F5F7FA!important;
  border:1px solid #40505E!important;
  border-left:4px solid #FF6A00!important;
  box-shadow:0 8px 24px #0005!important;
}
div[class*="utmb-profile"] :is(strong,b),
div[class*="utmb-result"] :is(strong,b),
div[class*="utmb-score"] :is(strong,b){
  color:#F5F7FA!important;
}
div[class*="utmb-profile"] a,
div[class*="utmb-result"] a,
div[class*="utmb-score"] a{
  color:#7FD8FF!important;
}


/* NORTHBOUND v103 — mobile filter clarity and neutral alpine surfaces */
@media(max-width:560px){
  .event-filter-panel .toolbar{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:12px!important;
    padding:14px!important;
  }
  .event-filter-panel .toolbar-field,
  .event-filter-panel .toolbar-field>*,
  .event-filter-panel .field{
    min-width:0!important;
    width:100%!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }
  .event-filter-panel .toolbar-field{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:6px!important;
    font-size:13px!important;
    line-height:1.4!important;
    white-space:normal!important;
  }
  .event-filter-panel .toolbar-field label,
  .event-filter-panel .toolbar-field>label{
    display:block!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }
  .event-filter-panel input,
  .event-filter-panel select,
  .event-filter-panel .field{
    min-height:50px!important;
    padding:11px 13px!important;
    font-size:15px!important;
    line-height:1.35!important;
    text-overflow:ellipsis!important;
  }
  .event-filter-panel .radius-location-field{grid-column:1/-1!important}
  .event-filter-panel .radius-action-field{
    display:grid!important;
    grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr)!important;
    gap:9px!important;
    align-items:stretch!important;
  }
  .event-filter-panel .radius-action-field button{
    min-width:0!important;
    width:100%!important;
    padding:10px!important;
    white-space:normal!important;
    line-height:1.25!important;
  }
}
@media(min-width:561px) and (max-width:759px){
  .event-filter-panel .toolbar{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .event-filter-panel .toolbar-field{min-width:0!important}
  .event-filter-panel .toolbar-field label{white-space:normal!important}
  .event-filter-panel input,.event-filter-panel select{min-width:0!important;width:100%!important}
}
/* The route cards use graphite/slate surfaces; green is not a brand surface. */
#events .route,
#events .route .route-metric,
#events .route .route-data,
#events .route .route-details,
#events .route .route-profile,
#events .route .route-info,
#events .route .route-status,
#events .route .status-badge,
#events .route .tag,
#events .route .pill{
  background-color:#18232D!important;
  background-image:none!important;
  color:#DCE6ED!important;
  border-color:#354653!important;
}
#events .route :is(button:not(.primary),a.secondary,.secondary){
  background:#18232D!important;
  color:#DCE6ED!important;
  border-color:#40505E!important;
}
#events .route :is(.success,.complete,.completed,.status-success,.data-complete){
  background:#1D3442!important;
  color:#BFEAFF!important;
  border-color:#49687B!important;
}
/* Remove remaining green-tinted completion panels and accents without changing status meaning. */
:is(.checklist-group,.checklist-group-travel,.race-check-track,.checklist-group-track){
  background:#18232D!important;
  border-color:#354653!important;
}
.checklist-group-travel{box-shadow:inset 3px 0 #7FD8FF!important}
#yearOverview .year-month-races .year-race-meta-item[data-meta-kind="time-limit"]{
  background:#18232D!important;color:#DCE6ED!important;border-color:#354653!important;
}


/* NORTHBOUND v104 — absolute ban on green-tinted UI surfaces */
:root{
  --green:#FF6A00!important;
  --lime:#7FD8FF!important;
  --success:#7FD8FF!important;
  --success-bg:#18232D!important;
}
/* Former green completion/time-limit chips become neutral slate. */
#yearOverview .year-month-races .year-race-meta-item[data-meta-kind="time-limit"],
#yearOverview .year-month-races .year-race-meta-item[data-meta-kind="type"],
#yearOverview .year-month-races .year-race-meta-item[data-meta-kind="cutoff"],
.year-race-meta-item[data-meta-kind="time-limit"],
.year-race-meta-item[data-meta-kind="type"],
.year-race-meta-item[data-meta-kind="cutoff"]{
  background:#18232D!important;
  color:#DCE6ED!important;
  border-color:#354653!important;
}
/* Planner, route and completion details: graphite only, with ice-blue status accents. */
.checklist-group,.checklist-group-travel,
.checklist-group-track,.race-check-track,
.travel-plan-editor,.travel-plan-editor *,
.route .route-metric,.route .route-data,.route .route-details,
.route .route-profile,.route .route-info,.route .route-status,
.route .status-badge,.route .tag,.route .pill,
.route [class*="success"],.route [class*="complete"],
.race-tools-section,.planner-panel,.planner-review,
.event-detail-group-body,.event-detail-group summary,
.year-race,.year-month-races,.year-season-summary-item{
  background-color:#151D25!important;
  background-image:none!important;
  color:#DCE6ED!important;
  border-color:#34414D!important;
}
.checklist-group-travel,.travel-plan-editor{
  box-shadow:inset 3px 0 #7FD8FF!important;
}
.checklist-group-travel :is(b,strong,h3,h4),
.travel-plan-editor :is(b,strong,h3,h4){
  color:#F5F7FA!important;
}
:is(.success,.complete,.completed,.status-success,.data-complete,
[data-status="success"],[data-status="complete"],[data-state="success"]){
  background:#18232D!important;
  color:#BFEAFF!important;
  border-color:#49687B!important;
}
/* No emerald/olive tones in form controls, progress or selected states. */
input,select,textarea,progress,
input[type="checkbox"],input[type="radio"]{
  accent-color:#FF6A00!important;
}
.race-check-track i,.checklist-group-track i{
  background:linear-gradient(90deg,#7FD8FF,#FF6A00)!important;
}


/* NORTHBOUND v105 — screenshot-driven green removal across planner and event cards */
:root{
  --green:#FF6A00!important;
  --lime:#7FD8FF!important;
  --success:#7FD8FF!important;
  --success-bg:#151D25!important;
}
/* The booking / accommodation block must use graphite, not forest green. */
:is([class*="travel"],[class*="hotel"],[class*="accommodation"],[id*="travel"],[id*="hotel"]):not(button):not(a){
  background-color:#151D25!important;
  background-image:none!important;
  border-color:#34414D!important;
  color:#DCE6ED!important;
}
:is([class*="travel"],[class*="hotel"],[class*="accommodation"],[id*="travel"],[id*="hotel"]) :is(.card,.panel,.box,.notice,.info,.content,.inner,.section){
  background:#151D25!important;
  background-image:none!important;
  border-color:#34414D!important;
  color:#DCE6ED!important;
}
:is([class*="travel"],[class*="hotel"],[class*="accommodation"],[id*="travel"],[id*="hotel"]) :is(button.primary,a.primary,.primary){
  background:#174A63!important;
  background-image:none!important;
  border-color:#5BBDEB!important;
  color:#F5F7FA!important;
}
/* Elevation chart: neutral graphite canvas and ice-blue profile line. */
.elevation-chart-wrap,
.elevation-chart-wrap :is(svg,canvas),
.elevation-chart-summary span{
  background:#151D25!important;
  background-color:#151D25!important;
  border-color:#34414D!important;
}
.elevation-chart :is(polyline,path){
  stroke:#7FD8FF!important;
}
.elevation-chart :is(polygon){
  fill:#243746!important;
}
.elevation-chart line{stroke:#43515E!important}
/* Race-type chips, completion indicators and status pills are slate, never olive. */
#yearOverview .year-month-races .year-race-meta-item[data-meta-kind="type"],
#yearOverview .year-month-races .year-race-meta-item[data-meta-kind="time-limit"],
#yearOverview .year-month-races .year-race-meta-item[data-meta-kind="status"],
#events .tag,#events .pill,#events .meta>.tag,
#yearOverview .tag,#yearOverview .pill,
.year-race-meta-item[data-meta-kind="type"],
.year-race-meta-item[data-meta-kind="time-limit"],
.year-race-meta-item[data-meta-kind="status"],
:is(.completed,.complete,.success,.status-success,.data-complete,.is-complete,.is-success){
  background:#18232D!important;
  background-image:none!important;
  color:#BFEAFF!important;
  border-color:#40586B!important;
  box-shadow:none!important;
}
/* Green-tinted card bodies and panels in the event and planner areas. */
#events :is(.route,.routegrid,.route-details,.route-data,.route-metric,.route-profile,.route-info,.route-status),
#yearOverview :is(.year-race,.year-month-races,.year-season-summary-item),
:is(.checklist-group,.checklist-group-travel,.checklist-group-track,.race-check-track,.planner-panel,.planner-review,.event-detail-group-body){
  background:#151D25!important;
  background-image:none!important;
  color:#DCE6ED!important;
  border-color:#34414D!important;
}


/* NORTHBOUND v106 — global, unscoped overrides for remaining legacy green components */
:root{
  --bg:#0B1117!important;
  --card:#151D25!important;
  --panel:#101820!important;
  --line:#34414D!important;
  --green:#FF6A00!important;
  --lime:#7FD8FF!important;
  --success:#7FD8FF!important;
  --success-bg:#151D25!important;
}
/* Route detail cards are also rendered outside #events (planner/detail overlays). */
.route,.routegrid,.route-metric,.route-data,.route-details,.route-profile,.route-info,.route-status,
.route .route-metric,.route .route-data,.route .route-details,.route .route-profile,.route .route-info,.route .route-status,
.status-badge,.route .status-badge,.route .tag,.route .pill,
.route .success,.route .complete,.route .completed,.route .status-success,.route .data-complete{
  background:#151D25!important;
  background-color:#151D25!important;
  background-image:none!important;
  color:#DCE6ED!important;
  border-color:#34414D!important;
  box-shadow:none!important;
}
.route :is(button,a,.secondary):not(.primary){
  background:#18232D!important;color:#DCE6ED!important;border-color:#40505E!important;
}
.route :is(.success,.complete,.completed,.status-success,.data-complete){
  background:#18232D!important;color:#BFEAFF!important;border-color:#40586B!important;
}
/* Legacy Alpine-green metric blocks and route labels. */
.route-metric,.route-data,.route-details .metric,.route-details .data,
.route-info .metric,.route-info .data,.route-profile,.route-profile-wrap,
.route-stat,.route-statistic,.route-fact,.route-facts,
.event-detail-metric,.event-detail-gpx,.race-detail-metric,
.race-detail-overview,.race-detail-tools,.race-tools-section{
  background-color:#151D25!important;
  background-image:none!important;
  color:#DCE6ED!important;
  border-color:#34414D!important;
}
/* Booking/accommodation sections and their nested callouts: no forest/olive panels. */
[class*="travel"],[class*="hotel"],[class*="accommodation"],[class*="booking"],
[id*="travel"],[id*="hotel"],[id*="accommodation"],[id*="booking"]{
  --green:#FF6A00!important;
  --success:#7FD8FF!important;
}
:is([class*="travel"],[class*="hotel"],[class*="accommodation"],[class*="booking"],[id*="travel"],[id*="hotel"],[id*="accommodation"],[id*="booking"]) :is(div,section,article,aside,header,summary,p,span){
  background-color:transparent;
  background-image:none!important;
}
:is([class*="travel"],[class*="hotel"],[class*="accommodation"],[class*="booking"],[id*="travel"],[id*="hotel"],[id*="accommodation"],[id*="booking"]){
  background:#151D25!important;
  background-color:#151D25!important;
  background-image:none!important;
  border-color:#34414D!important;
  color:#DCE6ED!important;
}
:is([class*="travel"],[class*="hotel"],[class*="accommodation"],[class*="booking"]) :is(button.primary,a.primary,.primary){
  background:#174A63!important;color:#F5F7FA!important;border-color:#5BBDEB!important;
}
/* Elevation charts, including modal copies and their parent cards. */
.elevation-chart-wrap,.elevation-chart-summary,.elevation-chart-summary span,
.elevation-chart-modal,.elevation-profile-modal,.elevation-popup,.profile-popup,
.elevation-chart-container,.elevation-profile-container{
  background:#151D25!important;
  background-color:#151D25!important;
  background-image:none!important;
  border-color:#34414D!important;
  color:#DCE6ED!important;
}
.elevation-chart polygon{fill:#243746!important}
.elevation-chart polyline{stroke:#7FD8FF!important}
.elevation-chart line{stroke:#43515E!important}
.elevation-chart text{fill:#AAB8C4!important}
/* Category/status chips everywhere: slate with ice-blue text. */
.year-race-meta-item,.year-race-meta-item[data-meta-kind="type"],
.year-race-meta-item[data-meta-kind="time-limit"],.year-race-meta-item[data-meta-kind="status"],
.year-season-summary-item,.tag,.pill,.meta>.tag,
:is(.completed,.complete,.success,.status-success,.data-complete,.is-complete,.is-success){
  background:#18232D!important;
  background-color:#18232D!important;
  background-image:none!important;
  color:#BFEAFF!important;
  border-color:#40586B!important;
  box-shadow:none!important;
}
/* Explicitly neutralize progress bars and success fills. */
.race-check-track,.checklist-group-track,.race-check-track i,.checklist-group-track i,
.progress,.progress-bar,.status-fill,.success-fill{
  background:#243746!important;
  background-image:none!important;
  border-color:#40586B!important;
}


/* NORTHBOUND v107 — final Alpine Performance palette enforcement */
#seasonRaceCards .season-state-pill.is-completed{
  color:#BFEAFF!important;background:#18232D!important;border-color:#40586B!important;
}
#seasonTimeline .season-block{
  border-top-color:#7FD8FF!important;
  background:linear-gradient(155deg,#18232D,#151D25)!important;
}
/* The route-detail and elevation popup markup is rendered by the planner, outside #events. */
.elevation-chart-wrap{
  background:#151D25!important;background-color:#151D25!important;background-image:none!important;
  border-color:#34414D!important;color:#DCE6ED!important;
}
.elevation-chart-wrap .elevation-chart-summary span{
  background:#18232D!important;background-color:#18232D!important;border-color:#34414D!important;
}
.elevation-chart polygon{fill:#243746!important;stroke:none!important}
.elevation-chart polyline{stroke:#7FD8FF!important;fill:none!important}
.elevation-chart line{stroke:#43515E!important}
.elevation-chart text{fill:#AAB8C4!important}
/* The event/route summary chips shown above detail panels. */
#events .eventhead~*,#events .route,
#events .route :is(.route-metric,.route-data,.route-details,.route-profile,.route-info,.route-status,.tag,.pill,.status-badge),
#events .route .route-data *,
#events .route .route-details *{
  --success:#7FD8FF!important;
}
#events .route :is(.route-metric,.route-data,.route-details,.route-profile,.route-info,.route-status,.tag,.pill,.status-badge,.success,.complete,.completed){
  background:#18232D!important;background-color:#18232D!important;background-image:none!important;
  color:#DCE6ED!important;border-color:#40586B!important;
}
/* Green primary accommodation map button becomes a restrained deep-slate action, not green. */
:is([class*="travel"],[class*="hotel"],[class*="accommodation"],[class*="booking"]) a,
:is([class*="travel"],[class*="hotel"],[class*="accommodation"],[class*="booking"]) button{
  background-color:#18232D!important;background-image:none!important;
  color:#BFEAFF!important;border-color:#40586B!important;
}
:is([class*="travel"],[class*="hotel"],[class*="accommodation"],[class*="booking"]) :is(a,button).primary{
  background:#174A63!important;color:#F5F7FA!important;border-color:#5BBDEB!important;
}


/* NORTHBOUND v108 — screenshot-driven removal of remaining olive/green detail surfaces */
:root,body{
  --green:#7FD8FF!important;
  --success:#7FD8FF!important;
  --success-bg:#18232D!important;
  --lime:#7FD8FF!important;
}
/* Route detail and personal race preparation panels (including nested metric tiles). */
.race-detail-overview,.race-detail-tools,.race-detail-metric,
.race-tools-section,.checklist-group,.checklist-group label,
.segment-table,.segment-row,.race-season-context,
.event-detail-group,.event-detail-group-body,.event-detail-data,
.route-detail,.route-details,.route-data,.route-metric,.route-stat,
#plannedEventDetailContent .plan-meta,
#plannedEventDetailContent .race-detail-overview *,
#plannedEventDetailContent .race-detail-tools *{
  background-color:#151D25!important;
  background-image:none!important;
  border-color:#34414D!important;
  color:#DCE6ED!important;
}
#plannedEventDetailContent .race-detail-overview,
#plannedEventDetailContent .race-detail-tools,
#plannedEventDetailContent .race-tools-section,
#plannedEventDetailContent .checklist-group,
#plannedEventDetailContent .segment-table{
  background:#151D25!important;
  border:1px solid #34414D!important;
}
#plannedEventDetailContent :is(.race-detail-metric,.checklist-group label,.segment-row,.race-season-context){
  background:#18232D!important;
  border:1px solid #40505E!important;
}
/* Completion badges and progress bars: ice blue on slate. */
#plannedEventDetailContent :is(.race-cutoff-ok,.race-detail-metric strong){
  color:#7FD8FF!important;
}
#plannedEventDetailContent :is(.race-check-track i,.training-bar){
  background-color:#7FD8FF!important;
}
#plannedEventDetailContent .race-check-track i,
#plannedEventDetailContent .training-bar{
  background:#7FD8FF!important;
}
/* The enlarged elevation chart is rendered in a separate modal layer. */
.elevation-chart-wrap,
.elevation-chart-wrap *,
.elevation-chart-modal,.elevation-chart-modal *,
.elevation-profile-modal,.elevation-profile-modal *,
.elevation-popup,.elevation-popup *,
.profile-popup,.profile-popup *{
  background-color:transparent!important;
  background-image:none!important;
  border-color:#34414D!important;
  color:#DCE6ED!important;
}
.elevation-chart-wrap,.elevation-chart-modal,.elevation-profile-modal,.elevation-popup,.profile-popup{
  background:#151D25!important;
}
.elevation-chart-wrap .elevation-chart,
.elevation-chart-modal .elevation-chart,
.elevation-profile-modal .elevation-chart{
  background:#151D25!important;
}
.elevation-chart-wrap .elevation-chart-summary span{
  background:#18232D!important;
}
.elevation-chart polygon{fill:#243746!important}
.elevation-chart polyline{stroke:#7FD8FF!important}
.elevation-chart line{stroke:#43515E!important}
.elevation-chart text{fill:#AAB8C4!important}
/* Accommodation callouts and map action must not inherit legacy success green. */
:is([class*="travel"],[class*="hotel"],[class*="accommodation"],[class*="booking"],[id*="travel"],[id*="hotel"],[id*="accommodation"],[id*="booking"]) :is(.success,.complete,.completed,.status-success,.primary){
  background:#18232D!important;
  background-color:#18232D!important;
  background-image:none!important;
  border-color:#40586B!important;
  color:#BFEAFF!important;
}



/* =========================================================
   NORTHBOUND UI OVERHAUL · 2026-11-24
   Shared visual hierarchy for cockpit, events, calendar,
   planning, history and responsive navigation.
   No data, business rules or existing control IDs changed.
   ========================================================= */
:root{
  --nb-bg:#0B1117;
  --nb-surface:#131C25;
  --nb-surface-raised:#18232D;
  --nb-surface-soft:#101820;
  --nb-line:#34414D;
  --nb-text:#F5F7FA;
  --nb-muted:#AAB5C0;
  --nb-ice:#7FD8FF;
  --nb-orange:#FF6A00;
  --nb-orange-soft:#FFAD62;
  --nb-radius:16px;
  --nb-radius-small:11px;
  --nb-shadow:0 12px 32px #0006;
}
html,body{background:var(--nb-bg);color:var(--nb-text)}
body{line-height:1.52}
:where(button,input,select,textarea,a,summary,[tabindex]):focus-visible{
  outline:2px solid var(--nb-ice)!important;outline-offset:3px!important
}
:where(button,a,summary,[role="button"]){-webkit-tap-highlight-color:transparent}
:where(.primary,.secondary,.more-nav-item,.app-menu-item,.tab-button,.link){
  min-height:44px;touch-action:manipulation
}

/* 1 · Single, predictable navigation */
.app-menu-dropdown{
  width:min(390px,calc(100vw - 24px))!important;
  padding:14px!important;
  border:1px solid #40505E!important;
  border-radius:18px!important;
  background:#101922!important;
  color:var(--nb-text)!important;
  box-shadow:0 24px 64px #000D!important;
}
.app-menu-heading{
  position:sticky;top:-14px;z-index:3;
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  margin:-14px -14px 10px!important;padding:13px 14px!important;
  background:#101922!important;border-bottom:1px solid var(--nb-line);
  color:var(--nb-text)!important
}
.northbound-primary-links{display:grid;gap:7px}
.northbound-menu-group{
  margin:0!important;padding:5px!important;
  border:1px solid #2B3945!important;border-radius:13px;
  background:#131C25!important
}
.northbound-menu-group>summary,.app-menu-group>summary{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  min-height:46px;padding:10px 11px!important;border-radius:9px;
  color:var(--nb-text)!important;font-size:13px;font-weight:800;
  cursor:pointer;list-style:none
}
.northbound-menu-group>summary::-webkit-details-marker,
.app-menu-group>summary::-webkit-details-marker{display:none}
.northbound-menu-group>summary:after,.app-menu-group>summary:after{
  content:"＋";color:var(--nb-ice);font-size:16px;font-weight:500
}
.northbound-menu-group[open]>summary:after,.app-menu-group[open]>summary:after{content:"−"}
.northbound-menu-group>.more-nav-item{
  width:calc(100% - 8px);margin:3px 4px!important;
  justify-content:flex-start;padding:10px 12px!important;
  border:1px solid transparent!important;border-radius:9px!important;
  background:transparent!important;color:#DCE6ED!important;
  text-align:left;font-size:13px;font-weight:650
}
.northbound-menu-group>.more-nav-item:hover,
.northbound-menu-group>.more-nav-item:focus-visible{
  background:#1C2A36!important;border-color:#40505E!important
}
.northbound-menu-group>.more-nav-item[aria-pressed="true"],
.northbound-menu-group>.more-nav-item[aria-current="page"]{
  background:#30251F!important;border-color:var(--nb-orange)!important;
  color:#FFBD91!important
}
.app-menu-group{margin-top:10px!important;border-top:1px solid var(--nb-line)!important;padding-top:8px!important}
.app-menu-account{background:#131C25!important;border:1px solid #34414D!important;border-radius:13px!important}
@media(max-width:700px){
  .app-menu-dropdown{
    top:calc(env(safe-area-inset-top,0px) + 72px)!important;
    right:max(12px,env(safe-area-inset-right))!important;
    left:auto!important;width:min(420px,calc(100vw - 24px))!important;
    max-height:calc(100dvh - env(safe-area-inset-top,0px) - 88px)!important;
    border-radius:16px!important
  }
}

/* 2 · Cockpit: clearer hero and useful metric hierarchy */
.hero{max-width:var(--ui-content-max);margin-inline:auto}
.hero h1{max-width:900px;font-size:clamp(29px,4.5vw,46px);letter-spacing:-.045em}
.hero p{max-width:680px;color:var(--nb-muted)}
.stats{
  display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px!important;margin-top:20px!important
}
.stat{
  min-width:0!important;min-height:104px;padding:15px!important;
  display:flex;flex-direction:column;justify-content:space-between;gap:9px;
  border:1px solid #2B3945!important;border-radius:15px!important;
  background:linear-gradient(145deg,#18232D,#111922)!important;
  box-shadow:0 8px 24px #0004!important
}
.stat b,.stat strong{
  color:var(--nb-ice)!important;font-size:clamp(21px,2.6vw,30px);
  line-height:1.05;font-variant-numeric:tabular-nums;letter-spacing:-.035em
}
.stat span{color:#B8C5CE!important;font-size:11px;line-height:1.35}
@media(max-width:760px){.stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}.stat{min-height:88px;padding:12px!important}}
@media(max-width:360px){.stat{padding:10px!important}.stat b,.stat strong{font-size:20px}}

/* 3 · Event discovery: scan-friendly cards and filters */
.event-filter-panel{
  overflow:hidden;border:1px solid #2B3945!important;
  border-radius:16px!important;background:#131C25!important
}
.event-filter-panel>summary{
  display:flex;align-items:center;justify-content:space-between;
  gap:12px;color:var(--nb-text)!important;font-weight:800
}
.event-filter-panel .toolbar{background:transparent!important}
.toolbar{grid-template-columns:minmax(0,1.5fr) repeat(2,minmax(130px,.8fr))}
.field,.toolbar .field,.planner input,.planner select,.edit-grid input{
  background:#0E1720!important;color:var(--nb-text)!important;
  border:1px solid #354653!important;border-radius:11px!important
}
.field:focus,.planner input:focus,.planner select:focus{
  border-color:var(--nb-ice)!important;box-shadow:0 0 0 3px #7FD8FF20!important
}
#events{align-items:stretch}
#events>.event{height:fit-content;min-width:0;border:1px solid #2B3945!important;border-radius:16px!important;overflow:hidden}
#events .eventhead{
  min-height:82px;padding:15px!important;
  background:linear-gradient(110deg,#1A2732,#121B24)!important;
  border-bottom:1px solid #2B3945!important
}
#events .eventtitle{font-size:16px;font-weight:800;line-height:1.35;color:var(--nb-text)!important}
#events .meta{gap:6px}
#events .meta>.tag,.tag,.type-select{
  background:#18232D!important;color:#DCE6ED!important;border:1px solid #354653!important
}
#events .date{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:30px;padding:5px 8px;border:1px solid #49687B!important;
  border-radius:8px;background:#1D3442!important;color:#BFEAFF!important;
  font-size:11px;font-weight:850
}
#events .detail{background:#101820!important;border-top:1px solid #2B3945!important}
#events .route{
  background:#151F29!important;border:1px solid #2E3D49!important;
  border-radius:13px!important
}
#events .route strong{color:var(--nb-text)!important}
#events .routegrid{color:#B8C5CE!important}
#events .routegrid b{color:#F5F7FA!important}
#events .link,.link{
  color:var(--nb-ice)!important;border-color:#405565!important;
  background:#17232D!important;border-radius:9px!important
}
#events .link:hover,.link:hover{background:#203342!important}
.resultsline{color:var(--nb-muted)!important;font-size:12px}

/* 4 · Event detail: consistent information blocks and readable metrics */
.event-detail-overlay{background:#050A10D9!important;backdrop-filter:blur(7px)}
.event-detail-dialog{
  background:#101922!important;color:var(--nb-text)!important;
  border:1px solid #40505E!important;border-radius:18px!important;
  box-shadow:0 24px 70px #000D!important
}
.event-detail-head{
  position:sticky;top:-18px;z-index:4;padding:4px 0 12px;
  background:#101922!important;border-bottom:1px solid #34414D
}
.event-detail-head h2{color:var(--nb-text)!important}
.event-detail-group{
  border:1px solid #2B3945!important;border-radius:12px!important;
  background:#131C25!important;overflow:hidden
}
.event-detail-group>summary{
  min-height:48px;background:#18232D!important;color:#F5F7FA!important;
  font-weight:750
}
.event-detail-group-body{padding:10px 12px 13px}
.event-detail-row{border-color:#2B3945!important;color:#C5D0D8!important}
.event-detail-row b{color:#91A4B2!important}
.event-detail-row a{color:var(--nb-ice)!important}
.event-detail-overview .event-detail-metric,
.race-detail-metric{
  background:linear-gradient(145deg,#1B2A36,#131C25)!important;
  border:1px solid #354653!important;border-radius:12px!important
}
.event-detail-overview .event-detail-metric strong{color:var(--nb-ice)!important}
.event-detail-overview .event-detail-gpx{
  background:#17232D!important;border:1px solid #354653!important
}
.elevation-chart-wrap{background:#101820!important;border:1px solid #34414D!important}
.elevation-chart polyline{stroke:var(--nb-orange)!important;stroke-width:3.5}
.elevation-chart polygon{fill:#FF6A0022!important}
.elevation-chart text{fill:#B9C6D0!important}

/* 5 · Year overview: calendar first, race blocks easy to scan */
#yearOverview .year-overview-nav{
  background:#101922F2!important;border:1px solid #34414D!important;
  border-radius:13px!important;backdrop-filter:blur(14px)
}
#yearOverview .year-overview-nav-button{
  background:#18232D!important;color:#DCE6ED!important;border-color:#354653!important
}
#yearOverview .year-overview-nav-button[aria-current="true"]{
  background:var(--nb-orange)!important;color:#0B1117!important;border-color:#FF8A36!important
}
#yearOverview .year-season-summary{
  background:linear-gradient(145deg,#18232D,#111922)!important;
  border:1px solid #34414D!important;border-radius:15px!important
}
#yearOverview .year-season-summary-item{
  background:#101820!important;border:1px solid #2B3945!important;border-radius:10px!important
}
#yearOverview .year-season-summary-item strong{color:var(--nb-ice)!important}
#yearOverview .year-calendar-year{
  background:#131C25!important;border:1px solid #34414D!important;border-radius:16px!important
}
#yearOverview .year-calendar-month{
  background:#101820!important;border:1px solid #2B3945!important;border-radius:12px!important
}
#yearOverview .year-calendar-day{
  background:#18232D!important;color:#DCE6ED!important;border-color:#34414D!important
}
#yearOverview .year-calendar-day.has-event{
  background:#512A31!important;color:#FFF!important;border-color:#A85B63!important
}
#yearOverview .year-calendar-day.has-hotel{
  background:#163449!important;color:#F5F7FA!important;border-color:#4C86A8!important
}
#yearOverview .year-calendar-day.has-event.has-hotel{
  background:linear-gradient(135deg,#512A31 0 50%,#163449 50%)!important
}
#yearOverview .year-race{
  background:#151F29!important;border:1px solid #34414D!important;
  border-left:3px solid var(--nb-orange)!important;border-radius:12px!important
}
#yearOverview .year-race strong{color:var(--nb-text)!important}
#yearOverview .year-race-meta-item{background:#18232D!important;color:#DCE6ED!important;border-color:#354653!important}
.year-load-chart{background:#101820!important;border:1px solid #34414D!important}
.load-fill{background:var(--nb-ice)!important}
.load-fill.actual{background:var(--nb-orange-soft)!important}

/* 6 · Planning: clearer hierarchy without changing planner logic */
.planner{
  background:#131C25!important;border:1px solid #34414D!important;
  border-radius:17px!important;box-shadow:var(--nb-shadow)!important
}
.planner h2,.planner h3,.planner-panel h3{color:var(--nb-text)!important}
.planner-intro,.planner small{color:var(--nb-muted)!important}
.planner-grid{gap:12px!important}
.planner-panel,.planner-review,.plan-card{
  background:#101820!important;border:1px solid #2E3D49!important;
  border-radius:13px!important
}
.planner-review-stat{background:#18232D!important;border:1px solid #34414D!important}
.planner-review-stat b{color:var(--nb-ice)!important}
.planner-status{background:#18232D!important;color:var(--nb-text)!important;border:1px solid #34414D!important}
.primary{
  background:var(--nb-orange)!important;color:#0B1117!important;
  border:1px solid #FF8A36!important;box-shadow:0 5px 16px #FF6A0030!important;
  font-weight:850!important
}
.primary:hover{background:#FF812A!important}
.secondary{
  background:#18232D!important;color:#DCE6ED!important;
  border:1px solid #40505E!important
}

/* 7 · Running history: results and ratings get their own visual emphasis */
#historyList>.plan-card{
  background:#131C25!important;border:1px solid #34414D!important;
  border-radius:14px!important;padding:14px!important
}
#historyList .plan-card strong{color:var(--nb-text)!important}
#historyList .plan-meta{color:var(--nb-muted)!important}
#historyList .overview-stars,.overview-stars{color:#FFBE65!important}
#historyList .run-summary{color:var(--nb-ice)!important}
#historyList .run-record-summary{
  background:#101820!important;border:1px solid #34414D!important
}
#historyList .run-record-summary>strong{color:var(--nb-ice)!important}
.star-btn.active{color:#FFBE65!important}
.run-tools,.route-edit,.race-tools-section{
  background:#101820!important;border:1px solid #34414D!important
}

/* 8 · iPhone/iPad/Desktop: same interaction grammar, adaptive density */
@media(max-width:700px){
  .wrap{padding-left:max(14px,env(safe-area-inset-left));padding-right:max(14px,env(safe-area-inset-right))}
  .toolbar{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}
  .toolbar>input:first-child{grid-column:1/-1}
  #events{grid-template-columns:minmax(0,1fr)!important;gap:10px!important}
  .eventhead{grid-template-columns:minmax(0,1fr) auto!important}
  .event-detail-overlay{padding:8px!important}
  .event-detail-dialog{max-height:calc(100dvh - 16px)!important;padding:13px!important}
  .event-detail-head{top:-13px}
  .event-detail-overview{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .event-detail-row{grid-template-columns:1fr!important;gap:3px!important}
  .planner{padding:14px!important}
  .planner-grid,.planner-columns{grid-template-columns:minmax(0,1fr)!important}
  .planner-grid .event-choice,.planner-grid .primary{grid-column:auto!important}
  #historyList{grid-template-columns:minmax(0,1fr)!important}
  #yearOverview .year-season-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .app-menu-dropdown{overscroll-behavior:contain}
}
@media(min-width:701px) and (max-width:1099px){
  .wrap{padding-inline:22px}
  .hero{width:min(calc(100% - 44px),var(--ui-content-max))}
  #events{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:13px!important}
  .planner-columns{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(min-width:1100px){
  #events{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:16px!important}
  .wrap{padding-inline:26px}
}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}
}


/* NORTHBOUND menu audit · neutralize legacy green count badges */
.northbound-menu-group .more-nav-item :is(
  .badge,.count,[class*="badge"],[class*="count"]
){
  background:#243746!important;
  background-color:#243746!important;
  background-image:none!important;
  border:1px solid #40586B!important;
  color:#BFEAFF!important;
  box-shadow:none!important;
}
.northbound-menu-group .more-nav-item :is(
  .badge,.count,[class*="badge"],[class*="count"]
)::before,
.northbound-menu-group .more-nav-item :is(
  .badge,.count,[class*="badge"],[class*="count"]
)::after{
  background:transparent!important;
  color:inherit!important;
}
.app-menu-account>summary{
  color:#F5F7FA!important;
}
.app-menu-account[open]>summary{
  border-bottom:1px solid #34414D!important;
}
.app-menu-account>summary::after{
  color:#FF6A00!important;
}
.app-menu-account :is(button,a,.more-nav-item){
  background:#18232D!important;
  border-color:#40586B!important;
  color:#BFEAFF!important;
}


/* NORTHBOUND settings: compact, readable status rows on phone and desktop. */
.app-settings-content{display:grid;gap:10px;min-width:0}
.app-settings-intro{margin:2px 3px 4px;color:var(--nb-muted,#aab7c2);font-size:12px;line-height:1.5}
.app-settings-content .settings-group{margin:0;padding:13px;border:1px solid #344b5d;border-radius:13px;background:#14212c}
.app-settings-content .settings-group>strong{display:block;margin:0 0 8px;color:#7fd8ff;font-size:13px;font-weight:800}
.app-settings-content .settings-connection{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:10px 0;border-top:1px solid #ffffff12;font-size:12px;line-height:1.4}
.app-settings-content .settings-connection:first-of-type{border-top:0}
.app-settings-content .settings-connection b{max-width:180px;white-space:normal;color:#ffbd91;font-size:11px;font-weight:750;text-align:right}
.app-settings-content .settings-connection b.settings-ok{color:#7fd8ff}
.app-settings-content .settings-connection b.settings-neutral{color:#b9c8d2}
.app-settings-content .app-menu-item{width:100%;margin:7px 0 0;min-height:44px}
@media(max-width:560px){
 .app-settings-content .settings-connection{grid-template-columns:minmax(0,1fr);gap:4px;align-items:start}
 .app-settings-content .settings-connection b{max-width:none;text-align:left}
}


/* NORTHBOUND · Cockpit hierarchy 2026-11-24
   Keep the three live metrics, make their grouping intentional,
   and improve legibility on narrow screens without changing data logic. */
header>.hero{
  width:min(calc(100% - 40px),var(--ui-content-max))!important;
  max-width:var(--ui-content-max)!important;
  margin:clamp(24px,4vw,48px) auto 28px!important;
  padding:clamp(20px,3vw,30px)!important;
  border:1px solid #344653!important;
  border-radius:22px!important;
  background:linear-gradient(115deg,#111B25F2 0%,#14212BEF 62%,#101922F2 100%)!important;
  box-shadow:0 18px 48px #0006!important;
}
header>.hero h1{
  margin:0!important;
  max-width:760px!important;
  color:#F5F7FA!important;
  font-size:clamp(34px,5vw,54px)!important;
  line-height:1.02!important;
  letter-spacing:-.055em!important;
}
header>.hero .hero-kicker{
  display:flex;align-items:center;gap:9px;
  margin:12px 0 22px!important;
  color:#AFC2CF!important;
  font-size:11px!important;font-weight:800!important;
  letter-spacing:.16em!important;
}
header>.hero .hero-kicker:before{
  content:"";display:block;width:22px;height:2px;
  background:#FF6A00;border-radius:2px;
}
header>.hero .stats{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:12px!important;margin:0!important;
}
header>.hero .stat{
  position:relative;overflow:hidden;
  min-height:104px!important;padding:17px 18px!important;
  justify-content:center!important;gap:10px!important;
  border:1px solid #354653!important;border-radius:14px!important;
  background:linear-gradient(145deg,#1A2935,#121C25)!important;
  box-shadow:inset 0 1px #FFFFFF0A,0 8px 22px #0003!important;
}
header>.hero .stat:before{
  content:"";position:absolute;left:0;top:14px;bottom:14px;width:3px;
  border-radius:0 3px 3px 0;background:#7FD8FF;
}
header>.hero .stat:nth-child(3):before{background:#FF6A00}
header>.hero .stat b{
  color:#F5F7FA!important;
  font-size:clamp(27px,3vw,36px)!important;
  line-height:1!important;letter-spacing:-.04em!important;
}
header>.hero .stat:nth-child(3) b{color:#FFAD62!important}
header>.hero .stat span{
  color:#AAB8C3!important;font-size:11px!important;
  font-weight:750!important;letter-spacing:.055em!important;
  text-transform:uppercase;
}
@media(max-width:680px){
  header>.hero{width:calc(100% - 24px)!important;margin:16px auto 22px!important;padding:18px 14px!important;border-radius:17px!important}
  header>.hero h1{font-size:clamp(31px,9vw,42px)!important}
  header>.hero .hero-kicker{margin:10px 0 16px!important;font-size:9px!important;letter-spacing:.13em!important}
  header>.hero .stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  header>.hero .stat{min-height:82px!important;padding:13px 13px 13px 15px!important;gap:8px!important}
  header>.hero .stat:nth-child(3){grid-column:1/-1;min-height:70px!important}
  header>.hero .stat b{font-size:29px!important}
}
@media(prefers-reduced-motion:no-preference){
  header>.hero .stat{transition:border-color .18s ease,transform .18s ease,background .18s ease}
  header>.hero .stat:hover{transform:translateY(-2px);border-color:#597487!important}
}

/* NORTHBOUND · Event discovery 2026-11-24
   Improve scanning, filter clarity and completed-event contrast.
   Existing filter controls, IDs and event data/rendering remain unchanged. */
#eventsTab .event-filter-panel{
  margin:0 0 14px!important;
  border:1px solid #354653!important;
  border-radius:16px!important;
  background:#111B24!important;
  box-shadow:0 8px 24px #0003!important;
}
#eventsTab .event-filter-panel>summary{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  min-height:58px!important;padding:13px 16px!important;
  color:#F5F7FA!important;font-size:14px;font-weight:850;
  list-style:none;cursor:pointer;
}
#eventsTab .event-filter-panel>summary::-webkit-details-marker{display:none}
#eventsTab .event-filter-panel>summary:after{
  content:"＋";display:inline-flex;align-items:center;justify-content:center;
  flex:0 0 28px;width:28px;height:28px;border:1px solid #496174;
  border-radius:8px;color:#7FD8FF;font-size:17px;font-weight:500;
}
#eventsTab .event-filter-panel[open]>summary:after{content:"−"}
#eventsTab .filter-summary-meta{
  margin-left:auto;color:#AFC2CF;font-size:11px;font-weight:650;
  text-align:right;line-height:1.35
}
#eventsTab .event-filter-panel .toolbar{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:12px!important;padding:15px!important;
  border-top:1px solid #2B3945;
  background:#0E1720!important;
}
#eventsTab .event-filter-panel .toolbar-field{
  display:flex;flex-direction:column;justify-content:flex-end;gap:6px;
  min-width:0!important;color:#AAB8C3!important;
  font-size:11px!important;font-weight:750!important;
}
#eventsTab .event-filter-panel .toolbar-field>label,
#eventsTab .event-filter-panel .toolbar-field>span{
  min-height:15px;color:#AAB8C3!important
}
#eventsTab .event-filter-panel .field{
  width:100%!important;min-width:0!important;min-height:46px!important;
  padding:10px 12px!important;border:1px solid #354653!important;
  border-radius:10px!important;background:#131F29!important;
  color:#F5F7FA!important;font-size:14px!important
}
#eventsTab .event-filter-panel .field:focus{
  border-color:#7FD8FF!important;box-shadow:0 0 0 3px #7FD8FF20!important
}
#eventsTab .radius-search-status{
  grid-column:1/-1;margin:0!important;padding:8px 10px;
  border-left:2px solid #7FD8FF;background:#14212B;
  color:#B8C8D3;font-size:11px;line-height:1.4
}
#eventsTab .filter-reset-wrap button,
#eventsTab .radius-action-field button{
  width:100%;min-height:46px!important
}
#eventsTab .resultsline{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  margin:14px 2px 10px!important;padding:0 2px;
  color:#AAB8C3!important;font-size:12px!important
}
#eventsTab .resultsline #resultCount{
  color:#F5F7FA!important;font-size:13px;font-weight:800
}
#eventsTab .resultsline>span:last-child{
  padding:5px 8px;border:1px solid #344653;border-radius:7px;
  color:#AFC2CF;font-size:10px;white-space:nowrap
}
#events>.event{
  position:relative;margin:0!important;min-width:0;height:100%;
  border:1px solid #2F414F!important;border-radius:16px!important;
  background:#121C25!important;box-shadow:0 8px 24px #0003!important;
  transition:border-color .18s ease,transform .18s ease,box-shadow .18s ease
}
#events>.event:hover{
  border-color:#526B7D!important;box-shadow:0 12px 28px #0005!important
}
#events .eventhead{
  min-height:90px!important;padding:16px!important;
  background:linear-gradient(110deg,#1A2935,#121C25)!important;
  border-bottom:1px solid #2D3D49!important
}
#events .eventtitle{
  color:#F5F7FA!important;font-size:17px!important;
  font-weight:850!important;line-height:1.28!important
}
#events .meta{gap:6px!important;margin-top:9px!important}
#events .meta .tag{
  display:inline-flex;align-items:center;min-height:26px;
  padding:4px 8px!important;border:1px solid #354653!important;
  border-radius:7px!important;background:#192733!important;
  color:#C8D5DE!important;font-size:10px!important;font-weight:700
}
#events .type-select{
  max-width:190px!important;min-height:30px!important;
  border:1px solid #496174!important;border-radius:8px!important;
  background:#14212B!important;color:#BFEAFF!important;
  font-size:11px!important
}
#events .date{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:74px;min-height:32px;padding:6px 9px!important;
  border:1px solid #49687B!important;border-radius:8px!important;
  background:#1B3443!important;color:#BFEAFF!important;
  font-size:11px!important;font-weight:850!important;line-height:1.25
}
#events .chev{color:#7FD8FF!important}
#events .detail{
  padding:12px!important;background:#101820!important;
  border-top:1px solid #2B3945!important;color:#DCE6ED!important
}
#events .routes{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:9px!important}
#events .route{
  min-width:0;padding:13px!important;border:1px solid #354653!important;
  border-radius:12px!important;background:#17232D!important;
  color:#DCE6ED!important
}
#events .route>strong{color:#F5F7FA!important;font-size:14px}
#events .routegrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px!important;color:#AFC0CC!important;font-size:12px}
#events .routegrid>span{min-width:0;overflow-wrap:anywhere}
#events .routegrid b{color:#F5F7FA!important;font-variant-numeric:tabular-nums}
#events #events .routefoot,#events .staylinks{display:flex;flex-wrap:wrap;gap:8px}
#events .routefoot .link,#events .staylinks a{
  min-height:40px;display:inline-flex;align-items:center;justify-content:center;
  padding:8px 11px;border:1px solid #405565!important;border-radius:9px!important;
  background:#1B2B37!important;color:#BFEAFF!important;font-size:11px;font-weight:750
}
/* Completed items stay dark and readable; orange is the completion cue, never green. */
#events>.event.event-done,
#events>.event.event-done .eventhead,
#events>.event.event-done .detail{
  background:#17232D!important;color:#F5F7FA!important;border-color:#79502F!important
}
#events>.event.event-done{border-left:3px solid #FF6A00!important}
#events>.event.event-done .eventhead{background:linear-gradient(110deg,#30251F,#17232D)!important}
#events>.event.event-done .eventtitle{color:#FFE0C7!important}
#events>.event.event-done .route{background:#1D2932!important;border-color:#66503E!important}
#eventsTab .note{color:#8999A6!important;font-size:11px;line-height:1.55}
@media(max-width:760px){
  #eventsTab .event-filter-panel .toolbar{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;padding:12px!important}
  #eventsTab .event-filter-panel .radius-location-field,
  #eventsTab .event-filter-panel .radius-search-status{grid-column:1/-1!important}
  #eventsTab .event-filter-panel .radius-action-field{grid-column:1/-1!important}
  #eventsTab .event-filter-panel .toolbar-field{min-width:0!important}
  #events .eventhead{padding:13px!important;min-height:78px!important}
  #events .eventtitle{font-size:15px!important}
  #events .date{min-width:68px;font-size:10px!important}
  #events .routegrid{gap:7px 9px!important}
}
@media(max-width:380px){
  #eventsTab .event-filter-panel>summary{padding:11px 12px!important}
  #eventsTab .filter-summary-meta{font-size:10px}
  #eventsTab .event-filter-panel .toolbar{gap:8px!important;padding:10px!important}
  #eventsTab .event-filter-panel .field{padding:9px!important;font-size:13px!important}
  #events .eventhead{grid-template-columns:minmax(0,1fr)!important}
  #events .eventhead>div:last-child{align-items:flex-start!important}
  #events .date{text-align:left!important}
}
@media(prefers-reduced-motion:reduce){
  #events>.event{transition:none!important}
}


/* NORTHBOUND · Einheitliche Event-Detailseite
   Bestehende Event-/Routenfelder, Aktionen und Datenlogik bleiben unverändert. */
#events .detail{padding:16px!important;background:#0F1821!important}
#events .routes{gap:14px!important}
#events .route{
  display:flex;flex-direction:column;gap:10px;
  padding:15px!important;border:1px solid #354653!important;
  border-radius:15px!important;background:#15212B!important;
  box-shadow:inset 0 1px 0 #FFFFFF08
}
#events .route>strong{
  display:block;margin:0!important;padding:0 0 10px;
  border-bottom:1px solid #354653;color:#F5F7FA!important;
  font-size:16px;line-height:1.35
}
#events .route-description{
  margin:0!important;padding:13px!important;
  border:1px solid #3B5363;border-left:3px solid #7FD8FF;
  border-radius:11px;background:#192A36;color:#DCE6ED
}
#events .route-description h4{
  margin:0 0 7px;color:#BFEAFF;font-size:12px;
  font-weight:850;letter-spacing:.04em;text-transform:uppercase
}
#events .route-description p{
  margin:0 0 8px;color:#E4EBF0;font-size:13px;line-height:1.6
}
#events .route-description a{
  color:#7FD8FF;font-size:11px;font-weight:750;
  text-decoration:underline;text-underline-offset:3px
}
#events .routegrid{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px!important;margin:0!important
}
#events .routegrid>span{
  min-width:0;padding:9px 10px;border:1px solid #2E414F;
  border-radius:9px;background:#101B24;color:#AFC0CC;
  font-size:11px;line-height:1.45;overflow-wrap:anywhere
}
#events .routegrid b{color:#F5F7FA!important;font-size:12px;font-weight:850}
#events .route-info-tools{
  margin:0!important;padding:13px!important;
  border:1px solid #3B5363!important;border-radius:12px!important;
  background:#111D27!important
}
#events .route-info-heading{
  display:flex;align-items:center;gap:8px;margin:0 0 10px!important;
  color:#BFEAFF!important;font-size:12px;font-weight:850;
  letter-spacing:.035em;text-transform:uppercase
}
#events .route-info-panel{
  display:flex!important;flex-direction:column;align-items:flex-start;gap:9px;
  padding:0!important;border:0!important;background:transparent!important
}
#events .route-info-panel .plan-meta{
  margin:0!important;color:#AFC0CC!important;
  font-size:11px;line-height:1.5
}
#events .route-info-panel .link,
#events .route-info-panel>a,
#events .route-info-panel>button{
  max-width:100%;min-height:40px;display:inline-flex;align-items:center;
  padding:9px 12px;border:1px solid #40596A!important;border-radius:9px;
  background:#1B2D3A!important;color:#BFEAFF!important;
  font-size:11px;font-weight:750;text-decoration:none;
  overflow-wrap:anywhere
}
#events .route-info-panel .rating-label{
  display:block;color:#8F9EAA;font-size:11px;line-height:1.5
}
#events .route-info-panel table{
  width:100%;border-collapse:collapse;color:#DCE6ED;
  font-size:12px!important
}
#events .route-info-panel th{
  padding:9px 7px;border-bottom:1px solid #526575;
  color:#AFCFE0;font-size:10px;letter-spacing:.04em;text-transform:uppercase
}
#events .route-info-panel td{
  padding:9px 7px!important;border-top:1px solid #2E414F!important;
  color:#DCE6ED
}
#events .route-info-panel .cutoff-total{
  width:100%;padding:10px 12px;border:1px solid #5B4938;
  border-radius:9px;background:#2A241F;color:#FFE0C7;font-size:12px
}
#events .route-png-tools{
  width:100%;margin:2px 0 0;padding-top:10px;
  border-top:1px solid #2E414F
}
#events .route-png-label{
  min-height:40px;display:inline-flex;align-items:center;
  padding:8px 11px;border:1px solid #40596A;border-radius:9px;
  background:#1B2D3A;color:#BFEAFF;font-size:11px;font-weight:750
}
#events .route-png-status{display:block;margin-top:6px;color:#AFC0CC;font-size:11px}
#events .route-png-preview{
  margin:10px 0 0;padding:9px;border:1px solid #354653;
  border-radius:10px;background:#101820
}
#events .route-png-preview img{max-height:260px;object-fit:contain}
#events .route-png-preview figcaption{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  margin-top:8px;color:#AFC0CC;font-size:10px
}
#events .route-data-status{
  margin:0!important;padding:9px 11px;border:1px solid #4B6170;
  border-radius:9px;background:#1A2B36;color:#C7D9E4;
  font-size:11px;line-height:1.5
}
#events .route-edit:not(.route-info-panel){
  margin:4px 0!important;padding:13px!important;
  border:1px solid #405363!important;border-radius:11px!important;
  background:#101A23!important
}
#events .route-edit .edit-grid{gap:11px!important}
#events .route-edit label{
  color:#B8C7D1!important;font-size:11px!important;font-weight:750
}
#events .route-edit input,
#events .route-edit select,
#events .route-edit textarea{
  width:100%;min-width:0;min-height:42px;
  border:1px solid #3B5060!important;border-radius:8px!important;
  background:#172530!important;color:#F5F7FA!important;
  font-size:14px!important
}
#events .route-edit textarea{min-height:92px;line-height:1.5}
#events .route-edit input:focus,
#events .route-edit select:focus,
#events .route-edit textarea:focus{
  border-color:#7FD8FF!important;outline:2px solid #7FD8FF25
}
#events .routefoot{
  display:flex;flex-wrap:wrap;align-items:center;gap:8px;
  margin-top:2px;padding-top:11px;border-top:1px solid #2E414F
}
#events .routefoot>*{
  min-height:40px;display:inline-flex;align-items:center;justify-content:center;
  padding:8px 12px;border:1px solid #40596A!important;
  border-radius:9px!important;background:#1A2C38!important;
  color:#BFEAFF!important;font-size:11px;font-weight:750;text-decoration:none
}
#events .routefoot>.primary{
  border-color:#FF6A00!important;background:#FF6A00!important;color:#101820!important
}
#events .routefoot>.secondary{
  border-color:#526575!important;background:#202D37!important;color:#E2EAF0!important
}
#events .route-info-panel a:focus-visible,
#events .routefoot>*:focus-visible,
#events .route-png-label:focus-within{
  outline:3px solid #7FD8FF!important;outline-offset:2px
}
@media(max-width:520px){
  #events .detail{padding:10px!important}
  #events .route{padding:12px!important;gap:9px}
  #events .routegrid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  #events .routegrid>span{padding:8px;font-size:10px}
  #events .routegrid b{font-size:11px}
  #events .route-info-tools{padding:11px!important}
  #events .routefoot>*{flex:1 1 auto}
}
@media(max-width:350px){
  #events .routegrid{grid-template-columns:minmax(0,1fr)!important}
}


/* NORTHBOUND · Jahresübersicht & Kalender
   Rein visuelle Überarbeitung; Planungs-, Termin- und Buchungslogik bleibt bestehen. */
#yearTab>.planner{gap:14px}
#yearTab>.planner>h2{
  margin-bottom:3px;color:#F5F7FA;font-size:clamp(23px,3.4vw,31px);
  letter-spacing:-.04em
}
#yearTab>.planner>.planner-intro{max-width:760px;color:#AFC0CC;font-size:13px;line-height:1.55}
#yearTab .year-view-switch{
  display:flex;gap:8px;flex-wrap:wrap;margin:16px 0 14px;
  padding:5px;border:1px solid #344653;border-radius:13px;
  background:#101820
}
#yearTab .year-view-switch button{
  flex:1 1 150px;min-height:44px;border:1px solid transparent!important;
  border-radius:9px!important;background:transparent!important;
  color:#B7C6D0!important;font-size:12px;font-weight:800
}
#yearTab .year-view-switch button.active{
  border-color:#FF6A00!important;background:#FF6A00!important;
  color:#101820!important;box-shadow:0 3px 12px #FF6A0030
}
#yearTab #yearOverview{display:grid;gap:16px}
#yearTab #yearOverview>.year-group{
  position:relative;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:11px;padding:16px;border:1px solid #354653!important;
  border-radius:17px!important;background:#111B24!important;
  box-shadow:0 8px 24px #0003
}
#yearTab #yearOverview .year-heading{
  position:relative;top:auto;grid-column:1/-1;
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  margin:0;padding:2px 2px 13px;border-bottom:1px solid #354653;
  background:transparent!important
}
#yearTab #yearOverview .year-heading h3{
  color:#F5F7FA!important;font-size:clamp(23px,3vw,30px);
  font-weight:900;letter-spacing:-.045em
}
#yearTab #yearOverview .year-summary{
  color:#B8C7D1!important;font-size:11px;font-weight:750
}
#yearTab #yearOverview .year-status-summary{gap:5px;margin-top:6px}
#yearTab #yearOverview .year-status-count{
  border:1px solid #3B5262;border-radius:7px;
  background:#1A2A36!important;color:#C9D8E1!important;
  font-size:10px;font-weight:750
}
#yearTab #yearOverview .year-race{
  min-width:0;margin:0!important;padding:13px!important;
  border:1px solid #344653!important;border-left:3px solid #FF6A00!important;
  border-radius:13px!important;background:#17232D!important;
  box-shadow:0 3px 12px #0002;transition:border-color .18s ease,background .18s ease
}
#yearTab #yearOverview .year-race:focus-within{
  border-color:#7FD8FF!important;box-shadow:0 0 0 2px #7FD8FF22
}
#yearTab #yearOverview .year-race-head>strong{
  color:#F5F7FA!important;font-size:15px;line-height:1.35
}
#yearTab #yearOverview .year-race-meta{
  margin-top:7px;color:#AFC0CC!important;font-size:11px;line-height:1.55
}
#yearTab #yearOverview .year-race-status-controls{gap:8px}
#yearTab #yearOverview .year-race-status{
  color:#AFC0CC!important;font-size:10px;font-weight:750
}
#yearTab #yearOverview .year-race-status select{
  min-height:42px;border:1px solid #405565!important;
  border-radius:9px!important;background:#101B24!important;
  color:#F5F7FA!important;font-size:12px
}
#yearTab #yearOverview .year-race-more{
  border-color:#344653!important
}
#yearTab #yearOverview .year-race-more>summary{
  min-height:43px;color:#7FD8FF!important;font-size:11px;font-weight:800
}
#yearTab #yearOverview .year-totals{
  grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;margin:0;padding:12px;border:1px solid #344653!important;
  border-radius:12px;background:#101820!important;color:#DCE6ED!important
}
#yearTab #yearOverview .year-load-chart{
  grid-column:1/-1;margin:0;padding:14px;border:1px solid #344653;
  border-radius:13px;background:#101820!important;color:#F5F7FA!important
}
#yearTab #yearOverview .year-load-chart>strong{color:#BFEAFF!important}
#yearTab #yearCalendar{display:grid;gap:15px}
#yearTab .year-calendar-legend{
  display:flex;align-items:center;gap:10px 18px;flex-wrap:wrap;
  padding:12px 14px;border:1px solid #354653;border-radius:12px;
  background:#111B24;color:#C5D2DB!important;font-size:11px;font-weight:750
}
#yearTab .year-calendar-legend>span{display:inline-flex;align-items:center;gap:8px}
#yearTab .year-calendar-swatch{
  display:inline-block;width:20px;height:7px;border-radius:4px;
  background:#FF6A00;box-shadow:0 0 0 1px #FF6A0055
}
#yearTab .year-calendar-swatch.hotel{background:#7FD8FF;box-shadow:0 0 0 1px #7FD8FF55}
#yearTab .year-calendar-year{
  padding:16px!important;border:1px solid #354653!important;
  border-radius:17px!important;background:#111B24!important;
  box-shadow:0 8px 24px #0003
}
#yearTab .year-calendar-year>h3{
  margin:0 0 14px;padding:0 0 11px;border-bottom:1px solid #354653;
  color:#F5F7FA!important;font-size:25px;font-weight:900;letter-spacing:-.04em
}
#yearTab .year-calendar-grid{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;align-items:stretch
}
#yearTab .year-calendar-month{
  min-width:0;padding:10px!important;border:1px solid #304351!important;
  border-radius:12px!important;background:#0E1720!important;
  box-shadow:inset 0 1px #FFFFFF08
}
#yearTab .year-calendar-month h4{
  margin:0 0 9px;color:#BFEAFF!important;font-size:12px;
  font-weight:850;letter-spacing:.04em;text-transform:uppercase
}
#yearTab .year-calendar-week,
#yearTab .year-calendar-days{
  display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px
}
#yearTab .year-calendar-week{margin-bottom:4px}
#yearTab .year-calendar-week span{
  color:#8095A4!important;font-size:9px;font-weight:800;text-align:center
}
#yearTab .year-calendar-day{
  position:relative;min-width:0;min-height:42px;padding:4px!important;
  display:flex;flex-direction:column;align-items:stretch;gap:3px;
  overflow:hidden;border:1px solid #2D3E4B!important;
  border-radius:6px!important;background:#17232D!important;
  color:#DCE6ED!important
}
#yearTab .year-calendar-day.empty{border:0!important;background:transparent!important}
#yearTab .year-calendar-day .day-number{
  color:#C7D4DC;font-size:10px;font-weight:750;line-height:1.2
}
#yearTab .year-calendar-day.today{
  outline:2px solid #FF6A00!important;outline-offset:-2px
}
#yearTab .year-calendar-day.has-event{
  border-color:#A85B63!important;background:#512A31!important;color:#FFF!important
}
#yearTab .year-calendar-day.has-hotel{
  border-color:#4C86A8!important;background:#163449!important;color:#F5F7FA!important
}
#yearTab .year-calendar-day.has-event.has-hotel{
  border-color:#8D7890!important;
  background:linear-gradient(135deg,#512A31 0 50%,#163449 50%)!important
}
#yearTab .year-calendar-day .race-duration-bar{
  display:block;width:100%;min-height:5px;height:5px;margin-top:auto;
  border:0;border-radius:0;background:#FF6A00!important;
  box-shadow:0 0 0 1px #381C25;cursor:pointer
}
#yearTab .year-calendar-day .race-duration-bar.start{border-radius:5px 0 0 5px}
#yearTab .year-calendar-day .race-duration-bar.end{border-radius:0 5px 5px 0}
#yearTab .year-calendar-day .race-duration-bar.single{border-radius:5px}
#yearTab .year-calendar-day .hotel-range-bar{background:#7FD8FF!important}
#yearTab .year-calendar-day .day-mark{color:#F5F7FA!important;font-size:8px}
#yearTab .year-calendar-day button:focus-visible{
  outline:2px solid #F5F7FA;outline-offset:2px
}
#yearTab .year-calendar-day[title]{cursor:default}
#yearTab .year-race-popup-card{
  border-color:#405565!important;background:#131E28!important;color:#F5F7FA!important
}
#yearTab .year-race-popup-card h3{color:#F5F7FA!important}
#yearTab .year-race-popup-row{border-color:#344653!important}
#yearTab .year-race-popup-row span{color:#AFC0CC!important}
#yearTab .year-race-popup-row strong{color:#BFEAFF!important}
#yearTab .year-race-popup-close{background:#263744!important;color:#F5F7FA!important}
@media(min-width:1200px){
  #yearTab .year-calendar-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:900px){
  #yearTab .year-calendar-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:600px){
  #yearTab #yearOverview>.year-group{grid-template-columns:minmax(0,1fr);gap:9px;padding:12px}
  #yearTab #yearOverview .year-heading,
  #yearTab #yearOverview .year-totals,
  #yearTab #yearOverview .year-load-chart{grid-column:1}
  #yearTab #yearOverview .year-heading{align-items:flex-start;flex-wrap:wrap}
  #yearTab #yearOverview .year-summary{text-align:left}
  #yearTab #yearOverview .year-race{padding:12px!important}
  #yearTab #yearOverview .year-race-status-controls{grid-template-columns:minmax(0,1fr)}
  #yearTab #yearOverview .year-totals{grid-template-columns:repeat(2,minmax(0,1fr))}
  #yearTab .year-calendar-year{padding:11px!important}
  #yearTab .year-calendar-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  #yearTab .year-calendar-month{padding:6px!important}
  #yearTab .year-calendar-day{min-height:34px;padding:3px!important}
  #yearTab .year-calendar-day .day-number{font-size:9px}
  #yearTab .year-calendar-legend{gap:8px 12px;padding:10px;font-size:10px}
}
@media(max-width:380px){
  #yearTab .year-calendar-grid{grid-template-columns:minmax(0,1fr)}
  #yearTab .year-calendar-month{padding:9px!important}
  #yearTab .year-calendar-day{min-height:40px}
}
@media(prefers-reduced-motion:reduce){
  #yearTab #yearOverview .year-race{transition:none}
}


/* NORTHBOUND · Event-Planer & Regenerationsphasen · 2026-11-24
   Visuelle Hierarchie für Basisrennen, Erholungsfenster und nächste Empfehlung.
   Ausschließlich Darstellung: Berechnungen, Eingaben, IDs und Speicherlogik bleiben unverändert. */
.planner{
  position:relative;isolation:isolate;
  border:1px solid #344653!important;
  background:linear-gradient(145deg,#121E28 0%,#0F1922 100%)!important;
  box-shadow:0 14px 36px #0005!important;
}
.planner>h2{
  margin:0 0 5px;color:#F5F7FA!important;
  font-size:clamp(23px,3.2vw,31px)!important;
  font-weight:900;letter-spacing:-.045em
}
.planner>p,.planner>.note,.planner .planner-intro{
  max-width:820px;color:#AFC0CC!important;font-size:12px;line-height:1.6
}
.planner-grid{
  align-items:stretch!important;gap:12px!important;
  margin-block:14px!important
}
.planner-grid>*,.planner-columns>*{min-width:0}
.planner-grid label,.planner-columns label{
  display:block;margin-bottom:6px;color:#AFC0CC!important;
  font-size:11px!important;font-weight:800;letter-spacing:.035em
}
.planner-grid .field,.planner-grid select,.planner-grid input,
.planner-columns .field,.planner-columns select,.planner-columns input{
  width:100%;min-width:0;min-height:46px!important;
  border:1px solid #405565!important;border-radius:10px!important;
  background:#101B24!important;color:#F5F7FA!important;
  font-size:14px!important
}
.planner-grid :is(select,input,button):focus-visible,
.planner-columns :is(select,input,button):focus-visible{
  outline:3px solid #7FD8FF!important;outline-offset:2px
}
.planner-panel,.planner-review{
  position:relative;min-width:0;overflow:hidden;
  border:1px solid #344B5D!important;border-radius:15px!important;
  background:linear-gradient(150deg,#172633,#111B25)!important;
  box-shadow:inset 0 1px #FFFFFF08,0 7px 22px #0003!important
}
.planner-panel h3,.planner-review h3{
  margin:0 0 11px;color:#BFEAFF!important;
  font-size:14px!important;font-weight:900;letter-spacing:.015em
}
.planner-panel p,.planner-review p{
  color:#AFC0CC!important;font-size:12px;line-height:1.55
}
.planner-panel :is(strong,b),.planner-review :is(strong,b){color:#F5F7FA}
.planner-columns{align-items:stretch!important;gap:13px!important}
.plan-card{
  position:relative;min-width:0;overflow:hidden;
  border:1px solid #405565!important;border-radius:13px!important;
  background:#15232E!important;color:#F5F7FA!important;
  box-shadow:0 5px 16px #0003!important
}
.plan-card :is(h3,h4,strong){color:#F5F7FA!important}
.plan-card :is(p,small,.plan-meta){color:#AFC0CC!important}
.plan-card:focus-within{border-color:#7FD8FF!important;box-shadow:0 0 0 2px #7FD8FF22!important}
.planner .primary{
  border-color:#FF6A00!important;background:#FF6A00!important;color:#101820!important
}
.planner .secondary{
  border:1px solid #405565!important;background:#1B2B37!important;color:#BFEAFF!important
}
/* Base event: cool blue marker; recovery: neutral slate; next race: signal orange. */
.planner :is(.base-event,.planner-base-event,.plan-base,.selected-base){
  border-left:3px solid #7FD8FF!important;
  background:linear-gradient(110deg,#1B3040,#14212B)!important
}
.planner :is(.recovery-window,.regeneration-window,.recovery-phase,.regeneration-phase){
  border-color:#536574!important;
  background:linear-gradient(110deg,#202D37,#17232D)!important
}
.planner :is(.next-event,.suggested-event,.next-race,.planner-suggestion){
  border-left:3px solid #FF6A00!important;
  background:linear-gradient(110deg,#30251F,#17232D)!important
}
.planner :is(.base-event,.planner-base-event,.plan-base,.selected-base,.recovery-window,.regeneration-window,.recovery-phase,.regeneration-phase,.next-event,.suggested-event,.next-race,.planner-suggestion){
  border-radius:12px!important;padding:12px!important;min-width:0
}
.planner :is(.base-event,.planner-base-event,.plan-base,.selected-base) :is(strong,b){color:#BFEAFF!important}
.planner :is(.next-event,.suggested-event,.next-race,.planner-suggestion) :is(strong,b){color:#FFBD91!important}
/* Timeline and phase bars: legible, horizontal on wide screens, scroll-safe on phones. */
.planner :is(.season-timeline,.recovery-timeline,.regeneration-timeline,.planner-timeline){
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;
  margin:13px 0;padding:12px;border:1px solid #344B5D;
  border-radius:13px;background:#0F1922
}
.planner :is(.season-phase,.recovery-step,.regeneration-step,.timeline-phase){
  position:relative;display:flex;min-width:0;min-height:62px;
  flex-direction:column;justify-content:center;gap:5px;
  padding:10px;border:1px solid #3A4D5C;border-radius:9px;
  background:#182631;color:#DCE6ED;font-size:11px;line-height:1.35
}
.planner :is(.season-phase,.recovery-step,.regeneration-step,.timeline-phase) small{
  color:#AFC0CC;font-size:9px;font-weight:750;letter-spacing:.04em;text-transform:uppercase
}
.planner :is(.season-phase,.recovery-step,.regeneration-step,.timeline-phase).active,
.planner :is(.season-phase,.recovery-step,.regeneration-step,.timeline-phase)[aria-current="step"]{
  border-color:#7FD8FF;background:#1B3443;box-shadow:inset 0 0 0 1px #7FD8FF35
}
.planner :is(.season-phase,.recovery-step,.regeneration-step,.timeline-phase).complete{
  border-color:#536574;background:#202D37
}
.planner :is(.season-phase,.recovery-step,.regeneration-step,.timeline-phase).upcoming{
  border-style:dashed;color:#AFC0CC
}
.planner :is(.recovery-bar,.regeneration-bar,.phase-bar,.timeline-bar){
  display:flex;min-height:8px;overflow:hidden;gap:3px;
  margin:9px 0;border-radius:8px;background:#263744
}
.planner :is(.recovery-bar,.regeneration-bar,.phase-bar,.timeline-bar)>*{
  min-width:0;min-height:8px;border-radius:5px;background:#7FD8FF
}
.planner :is(.recovery-bar,.regeneration-bar,.phase-bar,.timeline-bar)>*:nth-child(2){background:#526575}
.planner :is(.recovery-bar,.regeneration-bar,.phase-bar,.timeline-bar)>*:nth-child(3){background:#FF6A00}
.planner .planner-review{border-top:2px solid #FF6A00!important}
.planner .planner-review h3{color:#FFBD91!important}
.planner .planner-review :is(.status,.hint,.note){color:#AFC0CC!important}
.planner .star-btn{color:#FFAD62!important}
.planner .empty{border-color:#405565!important;background:#101B24!important;color:#AFC0CC!important}
@media(max-width:700px){
  .planner{padding:14px!important}
  .planner-grid{grid-template-columns:minmax(0,1fr)!important;gap:10px!important}
  .planner-columns{grid-template-columns:minmax(0,1fr)!important}
  .planner :is(.season-timeline,.recovery-timeline,.regeneration-timeline,.planner-timeline){
    grid-template-columns:minmax(0,1fr);gap:6px;padding:9px
  }
  .planner :is(.season-phase,.recovery-step,.regeneration-step,.timeline-phase){
    min-height:48px;display:grid;grid-template-columns:minmax(0,1fr) auto;
    align-items:center;padding:9px 11px
  }
  .planner :is(.season-phase,.recovery-step,.regeneration-step,.timeline-phase) small{grid-column:1/-1}
  .planner-panel,.planner-review{padding:12px!important}
  .plan-card{padding:12px!important}
}
@media(max-width:380px){
  .planner{padding:12px!important}
  .planner-panel,.planner-review{padding:10px!important}
  .planner :is(.season-phase,.recovery-step,.regeneration-step,.timeline-phase){font-size:10px}
}
@media(prefers-reduced-motion:reduce){
  .planner *{scroll-behavior:auto!important;transition:none!important;animation:none!important}
}


/* NORTHBOUND · Laufhistorie & Leistungsübersicht · 2026-11-24
   Visuelle Aufwertung des persönlichen Rennarchivs und der Trainingsdaten.
   Vorhandene Laufdaten, Bewertungen, Import- und Sortierfunktionen bleiben unverändert. */
#historyTab>.planner{
  gap:14px!important;
  border:1px solid #344653!important;
  background:linear-gradient(145deg,#121E28,#0F1922)!important;
  box-shadow:0 14px 36px #0005!important
}
#historyTab>.planner>h2{
  display:flex;align-items:center;gap:10px;
  margin:0 0 3px!important;color:#F5F7FA!important;
  font-size:clamp(24px,3.4vw,32px)!important;
  font-weight:900;letter-spacing:-.045em
}
#historyTab>.planner>.planner-intro{
  max-width:760px;color:#AFC0CC!important;
  font-size:12px;line-height:1.6
}
#historyTab>.planner>.planner-panel{
  position:relative;margin:12px 0 15px!important;
  padding:16px!important;border:1px solid #344B5D!important;
  border-radius:15px!important;background:linear-gradient(150deg,#172633,#111B25)!important;
  box-shadow:inset 0 1px #FFFFFF08,0 7px 22px #0003!important
}
#historyTab .planner-panel h3{
  margin:0 0 9px!important;color:#BFEAFF!important;
  font-size:14px!important;font-weight:900
}
#historyTab .planner-panel .planner-intro,
#historyTab .planner-panel .note{
  color:#AFC0CC!important;font-size:11px;line-height:1.55
}
#historyTab .planner-panel .note a{color:#7FD8FF!important;text-decoration:underline;text-underline-offset:3px}
#historyTab .planner-grid{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:end;gap:11px!important;margin:13px 0!important
}
#historyTab .planner-grid label{
  display:flex;min-width:0;flex-direction:column;gap:6px;
  color:#AFC0CC!important;font-size:11px!important;font-weight:800
}
#historyTab .planner-grid :is(select,input){
  width:100%;min-width:0;min-height:46px!important;
  padding:10px 12px!important;border:1px solid #405565!important;
  border-radius:10px!important;background:#101B24!important;
  color:#F5F7FA!important;font-size:14px!important
}
#historyTab .planner-grid button{min-height:46px!important}
#historyTab #activityImportStatus{
  padding:10px 12px;border-left:2px solid #7FD8FF;
  border-radius:0 9px 9px 0;background:#14232D;
  color:#B8C8D3!important;font-size:11px;line-height:1.5
}
#historyTab>.planner>.toolbar{
  display:flex!important;max-width:100%!important;
  justify-content:flex-end;gap:10px;margin:15px 0 10px!important
}
#historyTab #historySort{
  width:min(100%,360px);min-height:46px!important;
  padding:10px 13px!important;border:1px solid #405565!important;
  border-radius:10px!important;background:#101B24!important;
  color:#F5F7FA!important;font-size:13px!important
}
#historyTab #historyStats{
  display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px!important;margin:0 0 16px!important
}
#historyTab #historyStats>.stat{
  position:relative;display:flex;min-width:0;min-height:94px!important;
  flex-direction:column;justify-content:center;gap:8px;
  padding:14px!important;overflow:hidden;
  border:1px solid #354B5B!important;border-radius:14px!important;
  background:linear-gradient(145deg,#1A2A37,#121D27)!important;
  box-shadow:inset 0 1px #FFFFFF08,0 7px 20px #0003!important
}
#historyTab #historyStats>.stat:before{
  content:"";position:absolute;left:0;top:13px;bottom:13px;width:3px;
  border-radius:0 3px 3px 0;background:#7FD8FF
}
#historyTab #historyStats>.stat:nth-child(2):before,
#historyTab #historyStats>.stat:nth-child(3):before{background:#FF6A00}
#historyTab #historyStats>.stat b{
  color:#F5F7FA!important;font-size:clamp(22px,2.7vw,31px)!important;
  line-height:1;font-weight:900;letter-spacing:-.04em;
  font-variant-numeric:tabular-nums
}
#historyTab #historyStats>.stat span{
  color:#AFC0CC!important;font-size:10px!important;
  font-weight:800;letter-spacing:.055em;text-transform:uppercase
}
#historyTab #historyStats>.utmb-profile-summary{
  grid-column:1/-1;margin:0!important;padding:15px!important;
  border:1px solid #38566A!important;border-radius:14px!important;
  background:linear-gradient(115deg,#172B39,#12202B)!important;
  color:#DCE6ED!important
}
#historyTab #historyStats>.utmb-profile-summary>strong{
  color:#BFEAFF!important;font-size:13px;font-weight:900
}
#historyTab #historyStats>.utmb-profile-summary .plan-meta{color:#AFC0CC!important}
#historyTab #historyStats>.utmb-profile-summary a{color:#7FD8FF!important}
#historyTab #historyStats>.utmb-profile-summary .routegrid{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));
  gap:8px;margin-top:10px
}
#historyTab #historyStats>.utmb-profile-summary .routegrid>span{
  padding:9px 10px;border:1px solid #344B5D;border-radius:9px;
  background:#101B24;color:#AFC0CC;font-size:10px
}
#historyTab #historyStats>.utmb-profile-summary .routegrid b{
  display:block;margin-top:4px;color:#F5F7FA;font-size:17px
}
#historyTab #historyList{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px!important;align-items:stretch
}
#historyTab #historyList>.plan-card{
  position:relative;display:flex;min-width:0;flex-direction:column;gap:9px;
  margin:0!important;padding:15px!important;overflow:hidden;
  border:1px solid #354653!important;border-left:3px solid #FF6A00!important;
  border-radius:15px!important;background:linear-gradient(150deg,#192833,#121D27)!important;
  color:#E5EDF2!important;box-shadow:0 7px 22px #0003!important;
  transition:border-color .18s ease,transform .18s ease,box-shadow .18s ease
}
#historyTab #historyList>.plan-card:hover{
  border-color:#60798B!important;box-shadow:0 11px 27px #0005!important
}
#historyTab #historyList>.plan-card:focus-within{
  border-color:#7FD8FF!important;box-shadow:0 0 0 2px #7FD8FF22!important
}
#historyTab #historyList .history-card-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:10px
}
#historyTab #historyList .history-card-head>strong{
  min-width:0;color:#F5F7FA!important;font-size:15px;
  font-weight:850;line-height:1.35;letter-spacing:-.015em
}
#historyTab #historyList .history-card-head+.plan-meta,
#historyTab #historyList .plan-meta{
  margin:1px 0 3px!important;color:#AFC0CC!important;
  font-size:11px;line-height:1.55;overflow-wrap:anywhere
}
#historyTab #historyList .plan-meta b{color:#F5F7FA!important}
#historyTab #historyList .plan-actions{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;
  margin-top:auto;padding-top:11px;border-top:1px solid #344653
}
#historyTab #historyList .rating-label{
  color:#AFC0CC!important;font-size:10px;font-weight:800
}
#historyTab #historyList .overview-stars{
  color:#FFBD91!important;font-size:16px;letter-spacing:2px
}
#historyTab #historyList .plan-actions button{
  min-height:40px;margin-left:auto;padding:8px 11px;
  border:1px solid #405565!important;border-radius:9px!important;
  background:#1B2B37!important;color:#BFEAFF!important;
  font-size:11px;font-weight:800
}
#historyTab #historyList .history-delete{
  flex:0 0 38px;width:38px;min-height:38px!important;
  border:1px solid #76504A!important;border-radius:9px!important;
  background:#352522!important;color:#FFB7AD!important
}
#historyTab #historyList .plan-empty{
  grid-column:1/-1;padding:26px 18px!important;
  border:1px dashed #405565!important;border-radius:14px!important;
  background:#101B24!important;color:#AFC0CC!important;
  text-align:center;font-size:12px;line-height:1.6
}
#historyTab .info-tip summary:focus-visible,
#historyTab :is(button,select,input,a):focus-visible{
  outline:3px solid #7FD8FF!important;outline-offset:2px
}
@media(max-width:760px){
  #historyTab>.planner{padding:15px!important}
  #historyTab>.planner>.planner-panel{padding:13px!important}
  #historyTab #historyStats{grid-template-columns:repeat(2,minmax(0,1fr))}
  #historyTab #historyStats>.stat{min-height:80px!important;padding:12px!important}
  #historyTab #historyList{grid-template-columns:minmax(0,1fr);gap:9px!important}
  #historyTab #historyList>.plan-card{padding:13px!important}
  #historyTab>.planner>.toolbar{justify-content:stretch}
  #historyTab #historySort{width:100%}
}
@media(max-width:420px){
  #historyTab>.planner{padding:12px!important}
  #historyTab .planner-grid{grid-template-columns:minmax(0,1fr)!important}
  #historyTab #historyStats>.stat{min-height:72px!important;padding:10px!important}
  #historyTab #historyStats>.stat b{font-size:23px!important}
  #historyTab #historyList .plan-actions{align-items:stretch}
  #historyTab #historyList .plan-actions button{width:100%;margin-left:0}
}
@media(prefers-reduced-motion:reduce){
  #historyTab #historyList>.plan-card{transition:none!important}
}


/* NORTHBOUND · iPhone / iPad Feinschliff
   Touch-Ziele, iOS-Safe-Areas, Safari-Formularzoom und scrollbare Dialoge.
   Keine Änderungen an Navigation, Daten oder Eventlogik. */
:root{
  --nb-safe-top:env(safe-area-inset-top,0px);
  --nb-safe-right:env(safe-area-inset-right,0px);
  --nb-safe-bottom:env(safe-area-inset-bottom,0px);
  --nb-safe-left:env(safe-area-inset-left,0px)
}
html{
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
  scroll-padding-top:calc(var(--nb-safe-top) + 76px);
  scroll-padding-bottom:calc(var(--nb-safe-bottom) + 24px)
}
body{
  min-height:100vh;
  min-height:100dvh;
  overflow-x:clip;
  -webkit-tap-highlight-color:transparent
}
.wrap{
  padding-left:max(14px,var(--nb-safe-left));
  padding-right:max(14px,var(--nb-safe-right));
  padding-bottom:max(22px,var(--nb-safe-bottom))
}
:where(button,a,summary,[role="button"],input[type="checkbox"],input[type="radio"]){
  touch-action:manipulation
}
:where(button,a,summary,[role="button"]):focus-visible{
  outline:3px solid #7FD8FF!important;
  outline-offset:3px!important
}
:where(input,select,textarea){
  max-width:100%;
  color-scheme:dark
}
.event-detail-dialog,
.elevation-profile-modal,
.elevation-chart-modal,
.elevation-popup,
.profile-popup{
  max-height:calc(100dvh - var(--nb-safe-top) - var(--nb-safe-bottom) - 20px);
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch
}
.app-menu-dropdown{
  max-height:calc(100dvh - var(--nb-safe-top) - var(--nb-safe-bottom) - 100px);
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch
}
@media(max-width:700px){
  html{scroll-padding-top:calc(var(--nb-safe-top) + 88px)}
  header{
    padding-top:max(12px,var(--nb-safe-top));
    padding-left:max(12px,var(--nb-safe-left));
    padding-right:max(12px,var(--nb-safe-right))
  }
  .wrap{
    width:100%;
    max-width:100%;
    padding-left:max(12px,var(--nb-safe-left));
    padding-right:max(12px,var(--nb-safe-right));
    padding-bottom:max(24px,var(--nb-safe-bottom))
  }
  :where(button,.primary,.secondary,.tab-button,.more-nav-item,.app-menu-item){
    min-height:44px
  }
  :where(input:not([type="checkbox"]):not([type="radio"]),select,textarea,.field){
    min-height:44px;
    font-size:16px!important
  }
  .toolbar,.planner-grid,.planner-columns,.edit-grid{
    min-width:0
  }
  .toolbar>*,
  .planner-grid>*,
  .planner-columns>*,
  .edit-grid>*{min-width:0;max-width:100%}
  .event-detail-dialog,
  .elevation-profile-modal,
  .elevation-chart-modal,
  .elevation-popup,
  .profile-popup{
    width:min(100% - 16px,760px)!important;
    max-width:calc(100vw - 16px)!important;
    max-height:calc(100dvh - var(--nb-safe-top) - var(--nb-safe-bottom) - 16px)!important;
    margin:8px auto!important;
    padding-bottom:max(14px,var(--nb-safe-bottom))!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch
  }
  .app-menu-dropdown{
    left:max(10px,var(--nb-safe-left))!important;
    right:max(10px,var(--nb-safe-right))!important;
    width:auto!important;
    max-width:none!important;
    max-height:calc(100dvh - var(--nb-safe-top) - var(--nb-safe-bottom) - 96px)!important;
    overflow-y:auto!important
  }
}
@media(max-width:390px){
  .wrap{padding-left:max(10px,var(--nb-safe-left));padding-right:max(10px,var(--nb-safe-right))}
  .planner-grid,.planner-columns{gap:9px!important}
  .toolbar{gap:7px!important}
  .event-detail-dialog{padding:11px!important}
}
@media(min-width:701px) and (max-width:1100px){
  .wrap{padding-left:max(18px,var(--nb-safe-left));padding-right:max(18px,var(--nb-safe-right))}
  .planner-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .planner-columns{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@supports(padding:max(0px)){
  body{padding-bottom:var(--nb-safe-bottom)}
}
@media(hover:none) and (pointer:coarse){
  :where(button,a,summary,[role="button"]){-webkit-user-select:none;user-select:none}
  :where(button,a,summary,[role="button"]):active{filter:brightness(1.08)}
}
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto!important}
}


/* NORTHBOUND · Mobile QA pass 2
   iPhone portrait/landscape, iPad split layouts and horizontally wide data tables. */
:where(#events .route-info-panel,.segment-table,.review-compare-wrap,.review-compare-table-wrap){
  max-width:100%;
  min-width:0;
  overscroll-behavior-x:contain;
  -webkit-overflow-scrolling:touch
}
:where(#events .route-info-panel,.segment-table,.review-compare-wrap,.review-compare-table-wrap){
  overflow-x:auto
}
:where(#events .route-info-panel table,.segment-table table,.review-compare-table){
  max-width:100%;
  border-collapse:separate;
  border-spacing:0
}
#events .route-info-panel table,
.segment-table table,
.review-compare-table{
  display:block;
  width:100%;
  min-width:0;
  max-width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch
}
#events .route-info-panel table :is(thead,tbody),
.segment-table table :is(thead,tbody),
.review-compare-table :is(thead,tbody){
  display:table;
  width:max-content;
  min-width:100%
}
:where(.event,.route,.plan-card,.year-group,.calendar-card,.planner-panel,.planner-review,.nb-insight-panel,.nb-quality-row){
  min-width:0;
  overflow-wrap:anywhere
}
:where(.event,.route,.plan-card,.year-group,.calendar-card,.planner-panel,.planner-review) :where(img,svg,canvas,iframe){
  max-width:100%
}
@media(max-width:700px){
  :where(.toolbar,.planner-grid,.planner-columns,.edit-grid,.routegrid,.year-calendar-grid,.nb-quality-stats,.nb-recovery-suggestions)>*{
    min-width:0
  }
  :where(.app-menu-dropdown,.event-detail-dialog,.elevation-profile-modal,.elevation-chart-modal,.elevation-popup,.profile-popup){
    overscroll-behavior:contain;
    scrollbar-gutter:stable
  }
  :where(.app-menu-dropdown,.event-detail-dialog,.elevation-profile-modal,.elevation-chart-modal,.elevation-popup,.profile-popup) :where(button,a,[role="button"]){
    scroll-margin-block:12px
  }
  #events .route-info-panel table,
  .segment-table table,
  .review-compare-table{
    min-width:0
  }
  #events .route-info-panel table :is(th,td),
  .segment-table table :is(th,td),
  .review-compare-table :is(th,td){
    min-width:76px
  }
  :where(.planner-grid,.planner-columns,.edit-grid)>label,
  :where(.planner-grid,.planner-columns,.edit-grid)>div{
    overflow-wrap:anywhere
  }
}
@media(max-width:390px){
  :where(.nb-quality-stats,.nb-quality-controls,.nb-recovery-suggestions){
    grid-template-columns:minmax(0,1fr)
  }
  .nb-quality-stat:last-child{grid-column:auto}
  :where(#events .route-info-panel,.segment-table,.review-compare-wrap,.review-compare-table-wrap){
    margin-inline:-2px;
    max-width:calc(100% + 4px)
  }
}
@media(min-width:701px) and (max-width:1100px){
  :where(.event,.route,.plan-card,.calendar-card,.planner-panel,.planner-review){
    min-width:0
  }
  #events .route-info-panel table,
  .segment-table table,
  .review-compare-table{
    max-width:100%
  }
}
@media(orientation:landscape) and (max-height:500px){
  :where(.app-menu-dropdown,.event-detail-dialog,.elevation-profile-modal,.elevation-chart-modal,.elevation-popup,.profile-popup){
    max-height:calc(100dvh - var(--nb-safe-top) - var(--nb-safe-bottom) - 12px)!important;
    overflow-y:auto!important;
    overscroll-behavior:contain
  }
}


/* NORTHBOUND · VISUAL-FIRST DESIGN STANDARD · 2026-11-24
   Fixed brand palette. Prefer charts, visual summaries and action cards over text lists.
   Existing IDs, source values, business rules and data flows remain unchanged. */
:root{
  --nb-bg:#0B1117;
  --nb-surface:#131C25;
  --nb-surface-raised:#18232D;
  --nb-surface-soft:#101820;
  --nb-line:#34414D;
  --nb-text:#F5F7FA;
  --nb-muted:#AAB5C0;
  --nb-ice:#7FD8FF;
  --nb-orange:#FF6A00;
  --nb-white:#F5F7FA;
}
html,body{background:var(--nb-bg);color:var(--nb-white)}
:where(#cockpitTab,#yearTab,#eventsTab,#plannerTab,#historyTab){min-width:0}
:where(#cockpitTab,#yearTab,#eventsTab,#plannerTab,#historyTab)>.planner,
:where(#cockpitTab,#yearTab,#eventsTab,#plannerTab,#historyTab)>.nb-insight-panel{
  border-color:var(--nb-line)!important;
  background:linear-gradient(150deg,#151F29,#0F171F)!important;
  box-shadow:0 14px 34px #0005!important;
}
:where(h1,h2,h3,h4,.hero h1){letter-spacing:-.035em}
:where(.plan-meta,.note,.planner-intro,.foot){color:var(--nb-muted)!important}

/* Cockpit: first screen is a dashboard, not a link directory. */
#cockpitTab{display:grid;gap:14px}
#cockpitTab :is(.season-cockpit,.cockpit-hero,.cockpit-overview,.cockpit-dashboard){
  min-width:0;border:1px solid var(--nb-line)!important;border-radius:18px!important;
  background:linear-gradient(145deg,#172633,#101820)!important;overflow:hidden;
}
#cockpitTab :is(.season-cockpit,.cockpit-hero,.cockpit-overview,.cockpit-dashboard) :is(h2,h3,strong){
  color:var(--nb-white)!important
}
#cockpitTab :is(.cockpit-stats,.cockpit-metrics,.season-cockpit-stats,.season-dashboard-stats){
  display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px!important
}
#cockpitTab :is(.cockpit-stat,.cockpit-kpi,.season-kpi,.season-dashboard-stat){
  position:relative;display:grid;align-content:space-between;gap:8px;min-width:0;
  min-height:100px;padding:13px!important;border:1px solid #344B5D!important;
  border-radius:13px!important;background:linear-gradient(150deg,#1A2A37,#121D27)!important;
  overflow:hidden
}
#cockpitTab :is(.cockpit-stat,.cockpit-kpi,.season-kpi,.season-dashboard-stat):before{
  content:"";position:absolute;left:0;top:12px;bottom:12px;width:3px;
  border-radius:0 3px 3px 0;background:var(--nb-ice)
}
#cockpitTab :is(.cockpit-stat,.cockpit-kpi,.season-kpi,.season-dashboard-stat):nth-child(2):before,
#cockpitTab :is(.cockpit-stat,.cockpit-kpi,.season-kpi,.season-dashboard-stat):nth-child(4):before{background:var(--nb-orange)}
#cockpitTab :is(.cockpit-stat,.cockpit-kpi,.season-kpi,.season-dashboard-stat) :is(b,strong){
  color:var(--nb-white)!important;font-size:clamp(22px,3vw,32px)!important;
  line-height:1;font-variant-numeric:tabular-nums
}
#cockpitTab :is(.cockpit-stat,.cockpit-kpi,.season-kpi,.season-dashboard-stat) span{
  color:var(--nb-muted)!important;font-size:10px!important;font-weight:800;
  letter-spacing:.055em;text-transform:uppercase
}
#cockpitTab :is(.utmb-index,.cockpit-utmb-index,.season-utmb-index){
  border-color:#49677A!important;box-shadow:inset 0 0 0 1px #7FD8FF12!important
}
#cockpitTab :is(.cockpit-next-race,.season-next-race){
  position:relative;padding:18px!important;border:1px solid #4B5964!important;
  border-left:4px solid var(--nb-orange)!important;border-radius:16px!important;
  background:linear-gradient(115deg,#202A33,#121B24)!important
}
#cockpitTab :is(.cockpit-next-race,.season-next-race) :is(h2,h3,strong){color:var(--nb-white)!important}
#cockpitTab :is(.cockpit-next-race,.season-next-race) :is(.date,.meta,.plan-meta){color:var(--nb-ice)!important}
#cockpitTab :is(.cockpit-chart,.season-chart,.cockpit-progress,.season-progress){max-width:100%}
#cockpitTab svg :is(text){font-family:inherit}

/* Weekly training: progress rings + a truthful week-to-week bar comparison. */
.season-training-panel{
  margin:14px 0!important;padding:17px!important;border:1px solid #344B5D!important;
  border-radius:17px!important;background:linear-gradient(145deg,#172633,#101820)!important;
  color:var(--nb-white)!important;box-shadow:0 10px 28px #0004!important
}
.season-training-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.season-training-heading h3{margin:4px 0!important;color:var(--nb-white)!important;font-size:18px!important}
.season-training-heading p{max-width:620px;margin:4px 0!important;color:var(--nb-muted)!important;font-size:11px}
.season-training-period{padding:6px 9px;border:1px solid #40586B;border-radius:999px;color:var(--nb-ice);font-size:9px;font-weight:900;letter-spacing:.08em;white-space:nowrap}
.season-training-visual-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:15px 0}
.season-training-visual,.season-training-time{
  display:flex;align-items:center;gap:11px;min-width:0;min-height:112px;padding:11px;
  border:1px solid #344653;border-radius:13px;background:linear-gradient(150deg,#1A2A37,#121D27)
}
.season-training-ring{
  --ring-value:0%;position:relative;display:grid;place-items:center;flex:0 0 68px;width:68px;height:68px;
  border-radius:50%;background:conic-gradient(from -90deg,var(--nb-orange) 0 var(--ring-value),#2B3945 var(--ring-value) 100%)
}
.season-training-ring:before{content:"";position:absolute;inset:6px;border-radius:50%;background:#111B24;border:1px solid #344653}
.season-training-ring>div{position:relative;display:grid;justify-items:center;gap:1px}
.season-training-ring strong{color:var(--nb-white);font-size:15px;line-height:1;font-variant-numeric:tabular-nums}
.season-training-ring span{color:var(--nb-muted);font-size:8px;text-transform:uppercase;letter-spacing:.06em}
.season-training-ring.is-ice{background:conic-gradient(from -90deg,var(--nb-ice) 0 var(--ring-value),#2B3945 var(--ring-value) 100%)}
.season-training-visual-copy{display:grid;gap:3px;min-width:0}
.season-training-visual-copy>strong{color:var(--nb-white);font-size:clamp(15px,1.7vw,20px);line-height:1.1;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.season-training-visual-copy>span{color:var(--nb-muted);font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.season-training-visual-copy>small{color:#8295A4;font-size:9px;line-height:1.35}
.season-training-time{display:grid;align-content:center;gap:7px}
.season-training-time>span{color:var(--nb-muted);font-size:9px;font-weight:900;letter-spacing:.08em}
.season-training-time>strong{color:var(--nb-ice);font-size:26px;line-height:1;font-variant-numeric:tabular-nums}
.season-training-time>small{color:var(--nb-muted);font-size:10px}
.season-training-time-track,.season-training-compare-bars{height:7px;overflow:hidden;border-radius:99px;background:#2B3945}
.season-training-time-track i,.season-training-compare-bars i{display:block;height:100%;width:var(--bar-width,0%);border-radius:99px;background:var(--nb-ice)}
.season-training-trends{padding:13px;border:1px solid #344653;border-radius:13px;background:#101820}
.season-training-trends-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:8px}
.season-training-trends-head>strong{color:var(--nb-white);font-size:12px}
.season-training-trends-head>span{display:flex;align-items:center;gap:5px;color:var(--nb-muted);font-size:9px}
.season-training-trends-head i{width:7px;height:7px;border-radius:50%;background:#8997A5}
.season-training-trends-head i.now{background:var(--nb-orange)}
.season-training-compare-row{display:grid;grid-template-columns:90px minmax(60px,1fr) auto;align-items:center;gap:9px;padding:7px 0;border-top:1px solid #293744}
.season-training-compare-row>span{color:var(--nb-muted);font-size:10px}
.season-training-compare-row>b{color:var(--nb-white);font-size:10px;font-variant-numeric:tabular-nums}
.season-training-compare-bars{display:grid;grid-template-columns:minmax(0,1fr);gap:3px;height:auto;background:transparent}
.season-training-compare-bars .previous{height:4px;background:#71808D}
.season-training-compare-bars .current{height:4px;background:var(--nb-orange)}
.season-training-compare-bars .current.is-ice{height:4px;background:var(--nb-ice)}
.season-training-note{display:block;margin:10px 0!important;color:var(--nb-muted)!important;font-size:10px!important;line-height:1.5}
.season-training-settings{margin-top:10px;border-top:1px solid #344653}
.season-training-settings>summary{padding:11px 0;color:var(--nb-ice)!important;font-size:11px;font-weight:850;cursor:pointer}
.season-training-settings .edit-grid{margin-top:9px}
.season-training-settings :is(input,textarea){background:#0B1117!important;color:var(--nb-white)!important;border-color:#405565!important}
.season-training-settings #saveSeasonTraining{margin-top:9px;background:var(--nb-orange)!important;color:#0B1117!important;border-color:var(--nb-orange)!important}

/* Events: cards communicate route facts with scale, profile and a clear next action. */
#events{align-items:stretch}
#events>.event{display:flex;flex-direction:column;min-width:0;overflow:hidden;border:1px solid #344653!important;border-radius:16px!important;background:#121D27!important;box-shadow:0 8px 24px #0004!important}
#events .eventhead{align-items:center;background:linear-gradient(110deg,#1A2A37,#121D27)!important;border-bottom:1px solid #344653!important}
#events .eventtitle{font-size:16px!important;font-weight:850!important;letter-spacing:-.02em}
#events .meta{display:flex;flex-wrap:wrap;gap:6px}
#events .meta>.tag{border:1px solid #405565!important;background:#18232D!important;color:#DCE6ED!important}
#events .date{border-color:#40586B!important;background:#172B39!important;color:var(--nb-ice)!important;font-weight:850}
#events .detail{flex:1;background:#101820!important}
#events .routes{display:grid;gap:9px}
#events .route{position:relative;min-width:0;border:1px solid #344653!important;border-radius:13px!important;background:linear-gradient(145deg,#18232D,#121B24)!important}
#events .route strong{color:var(--nb-white)!important;font-size:14px}
#events .routegrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#events .routegrid b{color:var(--nb-ice)!important;font-variant-numeric:tabular-nums}
#events .route :is(.elevation-chart-wrap,.route-profile,.route-profile-wrap){margin-top:9px;border:1px solid #344653!important;border-radius:10px;background:#101820!important}
#events .elevation-chart polyline{stroke:var(--nb-ice)!important;stroke-width:3}
#events .elevation-chart polygon{fill:#7FD8FF22!important}
#events .route :is(.primary,.link){margin-top:8px}
#events .route .primary{background:var(--nb-orange)!important;color:#0B1117!important}

/* Event details: metric tiles and elevation profile are the visual anchor. */
.event-detail-overview,.race-detail-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.event-detail-overview .event-detail-metric,.race-detail-metric{
  min-height:94px;border:1px solid #405565!important;border-radius:13px!important;
  background:linear-gradient(145deg,#1A2A37,#121D27)!important
}
.event-detail-overview .event-detail-metric strong,.race-detail-metric strong{color:var(--nb-ice)!important;font-size:clamp(19px,2.4vw,26px)!important}
.elevation-chart-wrap{border:1px solid #344653!important;border-radius:14px!important;background:#101820!important}
.elevation-chart polyline{stroke:var(--nb-orange)!important;stroke-width:3}
.elevation-chart polygon{fill:#FF6A0020!important}

/* Year view: the calendar is the primary graphic; races stay secondary detail. */
#yearOverview .year-season-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
#yearOverview .year-season-summary-item{
  min-height:88px;display:grid;align-content:center;gap:5px;padding:12px!important;
  border:1px solid #344B5D!important;border-radius:13px!important;background:linear-gradient(145deg,#192A36,#121D27)!important
}
#yearOverview .year-season-summary-item strong{color:var(--nb-ice)!important;font-size:clamp(20px,2.5vw,28px)!important}
#yearOverview .year-calendar-year{border:1px solid #344653!important;border-radius:16px!important;background:#121D27!important}
#yearOverview .year-calendar-month{border:1px solid #344653!important;border-radius:12px!important;background:#101820!important}
#yearOverview .year-calendar-day{min-height:38px;border-radius:9px!important;background:#18232D!important;color:#DCE6ED!important}
#yearOverview .year-calendar-day.has-event{background:#FF6A00!important;border-color:#FF6A00!important;color:#0B1117!important}
#yearOverview .year-calendar-day.has-hotel{background:#7FD8FF!important;border-color:#7FD8FF!important;color:#0B1117!important}
#yearOverview .year-calendar-day.today{outline:2px solid var(--nb-ice);outline-offset:1px}
#yearOverview .year-calendar-legend{display:flex;flex-wrap:wrap;gap:10px;color:var(--nb-muted)!important;font-size:10px}
#yearOverview .year-month-group{border:1px solid #344653!important;border-radius:13px!important;background:#121D27!important}
#yearOverview .year-month-group>summary{min-height:48px;color:var(--nb-white)!important}
#yearOverview .year-month-races .year-race{border:1px solid #344653!important;border-left:3px solid var(--nb-orange)!important;background:#151F29!important}
#yearOverview .year-race-meta-item{background:#18232D!important;color:#DCE6ED!important;border-color:#405565!important}

/* Planner: phase timeline and race cards replace dense text blocks as the main scan path. */
#plannerTab .planner{display:grid;gap:13px}
#plannerTab :is(.planner-panel,.planner-review,.plan-card,.nb-insight-panel){
  border:1px solid #344653!important;border-radius:14px!important;background:linear-gradient(145deg,#17232D,#101820)!important
}
#plannerTab :is(.season-timeline,.recovery-timeline,.regeneration-timeline,.planner-timeline,.nb-recovery-timeline){
  display:flex;gap:7px;overflow-x:auto;padding:5px 2px 11px;scroll-snap-type:x proximity
}
#plannerTab :is(.season-phase,.recovery-step,.regeneration-step,.timeline-phase,.nb-recovery-phase){
  flex:1 0 130px;min-height:82px;border:1px solid #405565!important;border-top:3px solid var(--nb-ice)!important;
  border-radius:11px!important;background:#18232D!important;scroll-snap-align:start
}
#plannerTab :is(.season-phase,.recovery-step,.regeneration-step,.timeline-phase):nth-child(3n){border-top-color:var(--nb-orange)!important}
#plannerTab .planner-review{border-left:3px solid var(--nb-orange)!important}
#plannerTab .planner-review h3{color:#FFBD91!important}

/* History: performance stats first, race records as visual cards. */
#historyTab #historyStats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
#historyTab #historyStats>.stat{min-height:96px;border:1px solid #344B5D!important;border-radius:13px!important;background:linear-gradient(145deg,#192A36,#121D27)!important}
#historyTab #historyStats>.stat b{color:var(--nb-white)!important;font-size:clamp(22px,3vw,31px)!important}
#historyTab #historyStats>.stat span{color:var(--nb-muted)!important;font-size:10px!important;text-transform:uppercase;letter-spacing:.05em}
#historyTab #historyList{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
#historyTab #historyList>.plan-card{border-left:3px solid var(--nb-orange)!important;background:linear-gradient(145deg,#18232D,#111B24)!important}

/* Quality and admin: compact visual indicators, expandable detail only when needed. */
.nb-quality-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
.nb-quality-stat{border:1px solid #344653!important;background:#17232D!important}
.nb-quality-stat b{color:var(--nb-ice)!important}
.nb-quality-row{border:1px solid #344653!important;background:#121D27!important}
.nb-quality-score{color:var(--nb-orange)!important}
.nb-quality-badge.fresh{color:var(--nb-ice)!important;border-color:#40586B!important;background:#172B39!important}
.nb-quality-badge.stale,.nb-quality-badge.old{color:#FFBD91!important;border-color:#765039!important;background:#30251F!important}
.nb-quality-badge.unknown{color:#AAB5C0!important;border-color:#53606B!important;background:#242D35!important}

/* Shared mobile behavior: visual summaries stack without turning into tiny text. */
@media(max-width:760px){
  #cockpitTab :is(.cockpit-stats,.cockpit-metrics,.season-cockpit-stats,.season-dashboard-stats){grid-template-columns:repeat(2,minmax(0,1fr))}
  .season-training-visual-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .season-training-visual,.season-training-time{min-height:98px;padding:9px}
  .season-training-ring{flex-basis:60px;width:60px;height:60px}
  #yearOverview .year-season-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  #historyTab #historyStats{grid-template-columns:repeat(2,minmax(0,1fr))}
  #historyTab #historyList{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:420px){
  .season-training-heading{display:grid}
  .season-training-period{justify-self:start}
  .season-training-visual-grid{gap:7px}
  .season-training-visual{display:grid;justify-items:center;text-align:center;gap:7px}
  .season-training-visual-copy{justify-items:center}
  .season-training-ring{width:62px;height:62px}
  .season-training-compare-row{grid-template-columns:68px minmax(48px,1fr) auto;gap:6px}
  .season-training-trends-head{align-items:flex-start;flex-direction:column}
  .event-detail-overview,.race-detail-metrics{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
}
@media(prefers-reduced-motion:reduce){
  .season-training-panel *{transition:none!important;animation:none!important}
}


/* Explicit cockpit mount: keep the independent start area visually distinct. */
#seasonCockpit{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;
  min-width:0;margin:0 0 14px
}
#seasonCockpit>:first-child{grid-column:1/-1}
#seasonCockpit :is(.stat,.kpi,.metric,.cockpit-card,.season-card,.season-kpi,.season-metric){
  min-width:0;border:1px solid #344B5D!important;border-radius:14px!important;
  background:linear-gradient(145deg,#192A36,#121D27)!important;
  color:var(--nb-white)!important
}
#seasonCockpit :is(.stat b,.kpi b,.metric b,.stat strong,.kpi strong,.metric strong){
  color:var(--nb-ice)!important;font-variant-numeric:tabular-nums
}
#seasonCockpit :is(.next-race,.next-event,.season-next-race,.cockpit-next-race){
  border-left:4px solid var(--nb-orange)!important
}
#seasonCockpit :is(.progress-ring,.season-progress-ring,.cockpit-progress-ring){
  border-radius:50%;outline:1px solid #405565;outline-offset:3px
}
#seasonCockpit :is(.season-timeline,.season-lane,.cockpit-timeline){
  display:flex;gap:8px;overflow-x:auto;scroll-snap-type:x proximity
}
#seasonCockpit :is(.season-block,.timeline-block,.cockpit-timeline-item){
  flex:1 0 120px;scroll-snap-align:start;border-top:3px solid var(--nb-ice)!important
}
#events .routegrid>span{
  display:grid;gap:3px;min-width:0;padding:9px 10px;
  border:1px solid #344653;border-radius:10px;background:#101820
}
#events .routegrid>span b{font-size:17px;line-height:1.1;color:var(--nb-ice)!important}
#events .routegrid>span small{color:var(--nb-muted);font-size:9px;text-transform:uppercase;letter-spacing:.05em}
@media(max-width:760px){
  #seasonCockpit{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  #seasonCockpit>:first-child{grid-column:1/-1}
}
@media(max-width:420px){
  #seasonCockpit{grid-template-columns:minmax(0,1fr)}
  #seasonCockpit>:first-child{grid-column:auto}
}


/* NORTHBOUND · concrete mounts verified against the current app modules. */
#seasonTimeline{
  display:grid;gap:12px;align-items:stretch;min-width:0
}
#seasonTimeline>.season-timeline,
#seasonTimeline>.season-lane{
  min-width:0
}
#seasonTimeline #northboundRecoveryPlanner{
  order:2;min-width:0;padding:17px;border:1px solid #344B5D;border-radius:16px;
  background:linear-gradient(145deg,#172633,#101820);box-shadow:0 10px 28px #0004
}
#northboundRecoveryPlanner .nb-insight-head{
  display:flex;justify-content:space-between;align-items:flex-start;gap:14px
}
#northboundRecoveryPlanner .nb-insight-head h3{
  margin:4px 0;color:var(--nb-white);font-size:18px;letter-spacing:-.03em
}
#northboundRecoveryPlanner .nb-insight-head p,
#northboundRecoveryPlanner .nb-insight-status,
#northboundRecoveryPlanner .nb-insight-empty{
  color:var(--nb-muted);font-size:11px;line-height:1.5
}
#northboundRecoveryPlanner .nb-recovery-setting{
  display:flex;align-items:end;gap:8px;flex-wrap:wrap
}
#northboundRecoveryPlanner .nb-recovery-setting label{
  display:grid;gap:5px;color:var(--nb-muted);font-size:10px
}
#northboundRecoveryPlanner .nb-recovery-setting input{
  width:110px;min-height:40px;background:#0B1117;color:var(--nb-white);
  border:1px solid #405565;border-radius:9px;padding:8px
}
#northboundRecoveryPlanner .nb-recovery-setting button{
  min-height:40px;background:var(--nb-orange);color:#0B1117;border:1px solid var(--nb-orange)
}
#northboundRecoveryPlanner .nb-recovery-last{
  display:grid;gap:4px;padding:12px;margin:10px 0;border:1px solid #405565;
  border-left:3px solid var(--nb-orange);border-radius:11px;background:#18232D
}
#northboundRecoveryPlanner .nb-recovery-last strong{color:var(--nb-white);font-size:13px}
#northboundRecoveryPlanner .nb-recovery-last span{color:var(--nb-muted);font-size:10px}
#northboundRecoveryPlanner .nb-recovery-timeline{
  display:flex;gap:8px;min-width:0;overflow-x:auto;padding:4px 1px 10px
}
#northboundRecoveryPlanner .nb-recovery-phase{
  display:grid;align-content:center;gap:5px;flex:1 0 115px;min-height:76px;
  padding:11px;border:1px solid #405565;border-top:3px solid var(--nb-ice);
  border-radius:11px;background:#18232D
}
#northboundRecoveryPlanner .nb-recovery-phase.two{border-top-color:var(--nb-orange)}
#northboundRecoveryPlanner .nb-recovery-phase b{color:var(--nb-white);font-size:11px}
#northboundRecoveryPlanner .nb-recovery-phase small{color:var(--nb-muted);font-size:10px}
#seasonRaceCards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;min-width:0}
#seasonRaceCards>.season-race{
  display:grid;align-content:start;gap:10px;min-width:0;padding:14px;
  border:1px solid #344B5D;border-radius:15px;
  background:linear-gradient(145deg,#182633,#111A23);box-shadow:0 8px 22px #0003
}
#seasonRaceCards .season-race-head{
  display:grid;gap:5px;min-width:0
}
#seasonRaceCards .season-race-head :is(h3,h4,strong){
  color:var(--nb-white);font-size:14px;line-height:1.3;overflow-wrap:anywhere
}
#seasonRaceCards .season-race .season-state-line{
  display:flex;align-items:center;flex-wrap:wrap;gap:7px;color:var(--nb-muted);font-size:10px
}
#seasonRaceCards .season-state-pill{
  display:inline-flex;align-items:center;gap:4px;padding:5px 8px;border-radius:999px;
  border:1px solid #405565;background:#18232D;color:var(--nb-ice);
  font-size:9px;font-weight:850;letter-spacing:.04em
}
#seasonRaceCards .season-state-pill.is-completed{
  border-color:#405565;background:#172B39;color:var(--nb-ice)
}
#seasonRaceCards .season-state-pill.is-planned{
  border-color:#765039;background:#30251F;color:#FFBD91
}
#seasonRaceCards .season-recovery{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px
}
#seasonRaceCards .season-recovery label{
  display:grid;gap:4px;min-width:0;color:var(--nb-muted);font-size:10px
}
#seasonRaceCards .season-recovery input,
#seasonRaceCards .season-recovery select{
  min-width:0;max-width:100%;background:#0B1117;color:var(--nb-white);
  border:1px solid #405565;border-radius:8px;padding:8px
}
#yearCalendar{
  display:grid;gap:12px;min-width:0
}
#yearCalendar .year-calendar-year{
  padding:13px;border:1px solid #344653;border-radius:15px;background:#121D27
}
#yearCalendar .year-calendar-year>h3{
  color:var(--nb-white);font-size:16px;margin:0 0 10px
}
#yearCalendar .year-calendar-month{
  padding:9px;border:1px solid #344653;border-radius:11px;background:#101820
}
#yearCalendar .year-calendar-month h4{
  color:var(--nb-ice);font-size:11px;text-transform:uppercase;letter-spacing:.07em
}
#yearCalendar .year-calendar-days{
  display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px
}
#yearCalendar .year-calendar-day{
  display:grid;align-content:center;justify-items:center;gap:3px;min-width:0;min-height:38px;
  padding:4px;border:1px solid transparent;border-radius:8px;
  background:#18232D;color:#DCE6ED;font-size:10px;font-variant-numeric:tabular-nums
}
#yearCalendar .year-calendar-day.has-event{
  background:#FF6A00!important;border-color:#FF6A00!important;color:#0B1117!important;font-weight:900
}
#yearCalendar .year-calendar-day.has-hotel{
  background:#7FD8FF!important;border-color:#7FD8FF!important;color:#0B1117!important;font-weight:900
}
#yearCalendar .year-calendar-day.has-event.has-hotel{
  background:linear-gradient(135deg,#FF6A00 0 50%,#7FD8FF 50% 100%)!important;
  border-color:#F5F7FA!important;color:#0B1117!important
}
#yearCalendar .year-calendar-day.today{outline:2px solid #F5F7FA;outline-offset:1px}
#yearCalendar .year-calendar-day.empty{background:transparent;border-color:transparent}
#yearCalendar .hotel-range-stack{display:flex;gap:2px;width:100%;height:3px}
#yearCalendar .hotel-range-bar{flex:1;height:3px;border-radius:4px;background:#0B1117}
#northboundEventQuality{
  margin:0 0 14px;padding:16px;border:1px solid #344B5D;border-radius:16px;
  background:linear-gradient(145deg,#172633,#101820);box-shadow:0 10px 28px #0004
}
#northboundEventQuality .nb-insight-head h3{
  color:var(--nb-white);font-size:18px;letter-spacing:-.03em
}
#northboundEventQuality .nb-insight-head p{
  color:var(--nb-muted);font-size:11px;line-height:1.5;max-width:700px
}
#northboundEventQuality .nb-quality-stats{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:12px 0
}
#northboundEventQuality .nb-quality-stat{
  min-width:0;padding:12px;border:1px solid #344B5D;border-radius:12px;
  background:linear-gradient(145deg,#1A2A37,#121D27)
}
#northboundEventQuality .nb-quality-stat b{
  display:block;color:var(--nb-ice);font-size:25px;font-variant-numeric:tabular-nums
}
#northboundEventQuality .nb-quality-stat span{
  color:var(--nb-muted);font-size:10px;line-height:1.4
}
#northboundEventQuality .nb-quality-controls input,
#northboundEventQuality .nb-quality-controls select{
  min-height:40px;background:#0B1117;color:var(--nb-white);border:1px solid #405565;border-radius:9px
}
#northboundEventQuality .nb-quality-list{display:grid;gap:7px}
#northboundEventQuality .nb-quality-row{
  border:1px solid #344653;border-radius:11px;background:#121D27;overflow:hidden
}
#northboundEventQuality .nb-quality-row>summary{
  min-height:50px;padding:10px 12px
}
#northboundEventQuality .nb-quality-row>summary b{color:var(--nb-white)}
#northboundEventQuality .nb-quality-detail{border-top:1px solid #344653}
#northboundEventQuality .nb-quality-value.good{color:var(--nb-ice)}
#northboundEventQuality .nb-quality-value.warn{color:#FFBD91}
#northboundEventQuality .nb-quality-value.bad{color:#F5F7FA!important}
#northboundEventQuality .nb-quality-warnings{color:#FFBD91!important}
@media(max-width:760px){
  #seasonRaceCards{grid-template-columns:minmax(0,1fr)}
  #northboundEventQuality .nb-quality-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  #northboundEventQuality .nb-quality-stat:last-child{grid-column:1/-1}
  #northboundRecoveryPlanner .nb-insight-head{display:grid}
  #northboundRecoveryPlanner .nb-recovery-setting{width:100%}
  #yearCalendar .year-calendar-year{padding:9px}
  #yearCalendar .year-calendar-month{padding:6px}
  #yearCalendar .year-calendar-day{min-height:34px}
}
@media(max-width:420px){
  #seasonRaceCards>.season-race{padding:11px}
  #northboundEventQuality{padding:11px}
  #northboundEventQuality .nb-quality-stats{gap:6px}
  #yearCalendar .year-calendar-days{gap:2px}
  #yearCalendar .year-calendar-day{min-height:31px;padding:2px;font-size:9px}
}

#missingTab #northboundEventQuality{margin:14px 0 18px}
#missingTab #northboundEventQuality .nb-insight-head{margin-bottom:12px}
#missingTab #northboundEventQuality .nb-quality-row[open]{border-color:#49677A}


/* NORTHBOUND live-test refinement: compact mobile entry and readable cockpit intro. */
@media(max-width:700px){
  .hero{margin:12px 14px 0!important;padding:16px!important}
  .hero h1{font-size:clamp(22px,6vw,30px)!important;line-height:1.08!important;margin:0 0 8px!important}
  .hero .eyebrow,.hero .subtitle{font-size:10px!important;letter-spacing:.12em!important}
  .hero .stats{gap:7px!important;margin-top:12px!important}
  .hero .stat{min-height:74px!important;padding:10px 12px!important}
  .hero .stat strong,.hero .stat b{font-size:clamp(22px,6vw,30px)!important}
  #cockpitTab{gap:10px!important}
  #cockpitTab .nb-eyebrow{display:block!important;margin:0 0 7px!important;line-height:1.35!important}
  #cockpitTab .season-cockpit-title,
  #cockpitTab .cockpit-title,
  #cockpitTab .season-dashboard-title{display:block!important;margin:0 0 8px!important;line-height:1.2!important}
  #cockpitTab .season-cockpit-description,
  #cockpitTab .cockpit-description,
  #cockpitTab .season-dashboard-description{display:block!important;margin:0!important;line-height:1.45!important}
}


/* Cockpit: target the actual rendered season-dashboard markup. */
#cockpitTab .season-dashboard{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:12px!important;
  width:100%;
}
#cockpitTab .season-dashboard-heading{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:6px!important;
  min-width:0;
  padding:2px 0 8px!important;
}
#cockpitTab .season-dashboard-heading span{
  display:block!important;
  color:var(--nb-ice)!important;
  font-size:10px!important;
  font-weight:850!important;
  line-height:1.35!important;
  letter-spacing:.14em!important;
}
#cockpitTab .season-dashboard-heading strong{
  display:block!important;
  color:var(--nb-white)!important;
  font-size:clamp(19px,5vw,24px)!important;
  line-height:1.18!important;
  letter-spacing:-.03em!important;
}
#cockpitTab .season-dashboard-heading small{
  display:block!important;
  color:var(--nb-muted)!important;
  font-size:13px!important;
  line-height:1.45!important;
}
#cockpitTab .season-next-race{
  width:100%;
  min-width:0;
}
@media(max-width:700px){
  .hero{
    width:auto!important;
    margin:12px 14px 0!important;
    padding:15px!important;
    border-radius:17px!important;
  }
  .hero h1{
    margin:0 0 8px!important;
    font-size:clamp(25px,7vw,32px)!important;
    line-height:1.08!important;
  }
  .hero .hero-kicker{
    margin:8px 0 12px!important;
    font-size:10px!important;
    letter-spacing:.11em!important;
  }
  .hero .stats{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
    margin-top:10px!important;
  }
  .hero .stat{
    min-width:0!important;
    min-height:70px!important;
    padding:9px 11px!important;
  }
  .hero .stat:last-child{grid-column:1/-1}
  .hero .stat b{font-size:clamp(22px,6vw,29px)!important}
}


/* NORTHBOUND: reduce the oversized mobile challenge hero while retaining all KPIs. */
@media(max-width:700px){
  header>.hero{
    margin:10px 14px 0!important;
    padding:13px 14px!important;
    max-width:none!important;
    border-radius:16px!important;
  }
  header>.hero h1{
    font-size:clamp(24px,6.4vw,29px)!important;
    line-height:1.04!important;
    letter-spacing:-.045em!important;
    margin:0 0 6px!important;
  }
  header>.hero h1 br{display:none!important}
  header>.hero .hero-kicker{
    margin:6px 0 9px!important;
    font-size:9px!important;
    line-height:1.3!important;
    letter-spacing:.10em!important;
  }
  header>.hero .stats{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
    max-width:none!important;
    margin:8px 0 0!important;
  }
  header>.hero .stat{
    min-width:0!important;
    min-height:58px!important;
    padding:7px 9px!important;
    border-radius:11px!important;
  }
  header>.hero .stat:last-child{grid-column:1/-1}
  header>.hero .stat b{font-size:clamp(20px,5.5vw,25px)!important;line-height:1!important}
  header>.hero .stat span{font-size:9px!important;line-height:1.2!important}
  header{padding-bottom:12px!important}
}

/* NORTHBOUND Community – premium trail detail layout */
.community-route-section{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;margin:22px 0 26px}
.community-route-section:empty{display:none}
.community-route-section .community-gpx-map-figure{order:0;margin:0;width:100%;border:1px solid #344b60;border-radius:18px;padding:14px;background:linear-gradient(145deg,#142638,#0d1824);box-shadow:0 12px 30px #0003}
.community-route-section .community-gpx-map{height:clamp(300px,48vw,520px);min-height:300px;border-radius:12px;overflow:hidden}
.community-route-section .community-gpx-map-figure figcaption{font-size:12px;color:#9fb3c4;margin-top:10px}
.community-route-section .community-gpx-figure{margin:0;width:100%;padding:18px;border-radius:18px;background:linear-gradient(145deg,#142638,#0d1824)}
.community-route-section .community-gpx-figure svg{width:100%;max-height:none;height:auto;min-height:220px}
.community-route-section .community-gpx-figure figcaption{font-size:13px;margin-top:12px}
.community-detail>.community-gpx-metrics{grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:22px 0}
.community-detail>.community-gpx-metrics:empty{display:none}
.community-detail>.community-gpx-metrics .community-gpx-metric{padding:14px;border-radius:14px;background:#142638}
.community-detail>.community-gpx-metrics .community-gpx-metric strong{font-size:clamp(16px,2vw,22px)}
.community-gallery{grid-template-columns:repeat(auto-fill,minmax(min(100%,190px),1fr));gap:14px;margin:20px 0}
.community-gallery figure{border-radius:16px}
.community-gallery img{width:100%;aspect-ratio:4/5;max-height:340px;object-fit:cover}
.community-files{padding:14px 0;border-top:1px solid #34485a}
.community-files:empty{display:none}
@media(max-width:760px){.community-detail>.community-gpx-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.community-route-section .community-gpx-map{height:360px}.community-route-section .community-gpx-figure svg{min-height:190px}}

/* Community trail detail and overview previews */
.community-detail>.community-gpx-metrics{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:20px 0 24px;width:100%}
.community-detail>.community-gpx-metrics .community-gpx-metric{min-width:0;padding:14px 16px;border:1px solid #344b60;border-radius:14px;background:linear-gradient(145deg,#172b3d,#122131)}
.community-detail>.community-gpx-metrics .community-gpx-metric strong{font-size:clamp(16px,2vw,22px);white-space:nowrap}
.community-route-section{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;margin:20px 0 26px}
.community-route-section .community-gpx-map-figure,.community-route-section .community-gpx-figure{width:100%;min-width:0;margin:0;padding:14px;border:1px solid #344b60;border-radius:16px;background:#101e2c}
.community-route-section .community-gpx-map{height:clamp(280px,42vw,460px);min-height:280px;border-radius:11px;overflow:hidden}
.community-route-section .community-gpx-figure svg{width:100%;height:auto;min-height:220px;max-height:300px}
.community-card-previews{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0 14px}
.community-card-previews .community-gpx-figure{min-width:0;margin:0;padding:7px;border:1px solid #344b60;border-radius:10px;background:#0e1a27;overflow:hidden}
.community-card-previews .community-gpx-figure svg{display:block;width:100%;height:74px;min-height:0;max-height:74px}
.community-card-previews .community-gpx-figure figcaption{margin-top:5px;font-size:10px;line-height:1.25;color:#aebdca;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.community-card-previews .community-preview-route{order:0}
.community-card-previews .community-preview-elevation{order:1}
.community-card{display:flex;flex-direction:column;align-items:stretch}
.community-card .community-card-previews{margin-top:auto}
.community-card .community-secondary{align-self:flex-start}
@media(max-width:760px){
 .community-detail>.community-gpx-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .community-detail>.community-gpx-metrics .community-gpx-metric{padding:11px}
 .community-route-section .community-gpx-map{height:340px;min-height:280px}
 .community-route-section .community-gpx-figure svg{min-height:190px}
 .community-card-previews .community-gpx-figure svg{height:64px;max-height:64px}
}

/* Accessible Community image lightbox */
.community-gallery img{cursor:zoom-in;transition:transform .18s ease,filter .18s ease}
.community-gallery img:hover{filter:brightness(1.06)}
.community-gallery img:focus-visible{outline:3px solid #78d8ff;outline-offset:3px}
.community-lightbox{position:fixed;inset:0;z-index:10000;display:flex;align-items:center;justify-content:center;padding:clamp(12px,3vw,32px);background:rgba(3,9,16,.94);backdrop-filter:blur(12px)}
.community-lightbox-panel{position:relative;width:min(1100px,100%);max-height:94dvh;display:flex;flex-direction:column;gap:12px;padding:14px;border:1px solid #40566b;border-radius:20px;background:linear-gradient(145deg,#172a3c,#0b1622);box-shadow:0 24px 80px #0009}
.community-lightbox-close{align-self:flex-end;border:1px solid #40566b;border-radius:10px;background:#1b2d40;color:#f4f8fc;padding:10px 14px;font-weight:700}
.community-lightbox-stage{min-height:0;display:grid;grid-template-columns:48px minmax(0,1fr) 48px;align-items:center;gap:10px}
.community-lightbox-image{display:block;max-width:100%;width:auto;height:auto;max-height:calc(88dvh - 120px);object-fit:contain;justify-self:center;border-radius:10px}
.community-lightbox-prev,.community-lightbox-next{width:44px;height:52px;border:1px solid #40566b;border-radius:12px;background:#1b2d40;color:#f5f8fb;font-size:32px;line-height:1}
.community-lightbox-prev:disabled,.community-lightbox-next:disabled{opacity:.35}
.community-lightbox-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;color:#b7c7d4;font-size:13px}
.community-lightbox-caption{margin:0;overflow-wrap:anywhere}
.community-lightbox-count{white-space:nowrap;color:#7ed9ff;font-variant-numeric:tabular-nums}
@media(max-width:620px){.community-lightbox{padding:8px}.community-lightbox-panel{padding:9px;border-radius:14px}.community-lightbox-stage{grid-template-columns:34px minmax(0,1fr) 34px;gap:5px}.community-lightbox-prev,.community-lightbox-next{width:34px;height:42px;font-size:25px}.community-lightbox-image{max-height:calc(88dvh - 130px)}}

/* Community owner file management */
.community-existing-assets{margin-top:8px;padding:14px;border:1px solid #344b60;border-radius:14px;background:#0e1a27}
.community-existing-assets h4{margin:0 0 10px;color:#eef5fb;font-size:14px}
.community-existing-assets-list{display:grid;gap:8px}
.community-existing-asset{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid #34485a;border-radius:10px;background:#142638}
.community-existing-asset-info{display:grid;gap:4px;min-width:0}
.community-existing-asset-info strong{font-size:13px;color:#f3f7fb}
.community-existing-asset-info small{font-size:11px;color:#aebdca;overflow-wrap:anywhere}
.community-existing-asset button{flex:0 0 auto;min-width:100px}
@media(max-width:620px){.community-existing-asset{align-items:stretch;flex-direction:column}.community-existing-asset button{width:100%}}

/* Trail cards: visual cover, compact facts and clear action hierarchy */
.community-card{position:relative;overflow:hidden;gap:9px;padding:0 0 16px;border:1px solid #30475b;border-radius:18px;background:linear-gradient(155deg,#172b3d 0%,#101d2b 72%);box-shadow:0 12px 28px #0003}
.community-card-cover{display:block;width:100%;height:clamp(150px,24vw,220px);object-fit:cover;background:#0c1722}
.community-card>h3,.community-card>.community-region,.community-card>.community-metrics,.community-card>.community-difficulty,.community-card>.community-description,.community-card>.community-secondary,.community-card>.community-state,.community-card>.community-card-previews{margin-left:16px;margin-right:16px}
.community-card>h3{margin-top:8px;margin-bottom:0;font-size:clamp(17px,2vw,21px);line-height:1.2;color:#f4f8fc}
.community-card>.community-region{margin-top:0;margin-bottom:0;color:#9fb3c4;font-size:12px}
.community-card>.community-metrics{display:flex;flex-wrap:wrap;gap:8px;margin-top:3px;margin-bottom:0;color:#f3f7fb;font-size:14px;font-weight:800;font-variant-numeric:tabular-nums}
.community-card>.community-difficulty{align-self:flex-start;margin-top:0;padding:5px 9px;border:1px solid #49647b;border-radius:999px;background:#20384b;color:#c9eaff;font-size:11px;font-weight:750}
.community-card>.community-description{margin-top:0;margin-bottom:0;color:#c0ccd6;font-size:13px;line-height:1.45}
.community-card .community-card-previews{margin-top:4px;margin-bottom:4px}
.community-card>.community-secondary{margin-top:4px}
@media(max-width:620px){.community-card-cover{height:164px}.community-card>h3,.community-card>.community-region,.community-card>.community-metrics,.community-card>.community-difficulty,.community-card>.community-description,.community-card>.community-secondary,.community-card>.community-state,.community-card>.community-card-previews{margin-left:13px;margin-right:13px}}

/* Compact in-page navigation for long trail details */
.community-detail-nav{position:sticky;top:calc(var(--nb-header-height,64px) + 6px);z-index:8;display:flex;gap:7px;overflow-x:auto;overscroll-behavior-inline:contain;padding:9px 10px;margin:12px 0 18px;border:1px solid #344b60;border-radius:14px;background:rgba(12,25,38,.94);backdrop-filter:blur(14px);scrollbar-width:thin}
.community-detail-nav-button{flex:0 0 auto;min-height:38px;padding:8px 13px;border:1px solid #3a5268;border-radius:999px;background:#172b3d;color:#c6d5e1;font-size:12px;font-weight:750;white-space:nowrap}
.community-detail-nav-button.is-active{border-color:#ff9b50;background:#55351f;color:#fff2e7;box-shadow:0 0 0 1px #ff9b5033 inset}
.community-detail [id^="community-detail-section-"]{scroll-margin-top:calc(var(--nb-header-height,64px) + 76px)}
.community-detail-nav-button:focus-visible{outline:2px solid #ff9b50;outline-offset:2px}
@media(max-width:620px){.community-detail-nav{margin:10px -2px 16px;padding:8px}.community-detail-nav-button{min-height:40px;padding:8px 12px}}


/* Trail detail sections: consistent hierarchy and active scroll navigation */
.community-detail-block{min-width:0;margin:22px 0 28px;padding:0}
.community-detail-block>h4{margin:0 0 12px;color:#f1f6fb;font-size:clamp(17px,2.2vw,20px);font-weight:800;letter-spacing:-.02em}
.community-detail-route .community-gpx-metrics{margin-top:0}
.community-detail-photos .community-gallery{margin-top:0}
.community-detail-files .community-files{margin-top:0}
.community-detail-nav-button[aria-current="location"]{border-color:#ff9b50;background:#55351f;color:#fff2e7;box-shadow:0 0 0 1px #ff9b5033 inset}
.community-detail-nav-button.is-active{border-color:#ff9b50;background:#55351f;color:#fff2e7}
.community-detail-block[id^="community-detail-section-"]{scroll-margin-top:calc(var(--nb-header-height,64px) + 82px)}
@media(max-width:620px){.community-detail-block{margin:18px 0 24px}.community-detail-block>h4{margin-bottom:10px}}


/* NORTHBOUND fallback artwork for trails without uploaded photos */
.community-card-cover-fallback{position:relative;display:block;width:100%;height:clamp(150px,24vw,220px);overflow:hidden;background:#102233}
.community-card-cover-fallback svg{display:block;width:100%;height:100%;object-fit:cover}
.community-card-cover-fallback span{position:absolute;right:12px;bottom:10px;padding:5px 9px;border:1px solid #ffffff30;border-radius:999px;background:#0b1724c9;color:#c5d4df;font-size:10px;font-weight:700;letter-spacing:.04em}
.community-card-cover-fallback:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#07152133,transparent 65%);pointer-events:none}
.community-card>.community-description{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.community-card>.community-metrics{align-items:center}
.community-card>.community-state{margin-top:auto;align-self:flex-start}
@media(max-width:620px){.community-card-cover-fallback{height:164px}}


/* Expanded GPX analysis metrics */
.community-detail>.community-gpx-metrics{grid-template-columns:repeat(5,minmax(0,1fr));}
.community-detail>.community-gpx-metrics .community-gpx-metric{display:flex;flex-direction:column;justify-content:center;min-height:82px;gap:5px;}
.community-detail>.community-gpx-metrics .community-gpx-metric span{font-size:11px;line-height:1.3;color:#9fb3c4;}
@media(max-width:760px){.community-detail>.community-gpx-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.community-detail>.community-gpx-metrics .community-gpx-metric{min-height:76px;padding:12px}.community-detail>.community-gpx-metrics .community-gpx-metric strong{font-size:17px;white-space:normal;overflow-wrap:anywhere}}
@media(min-width:761px) and (max-width:1100px){.community-detail>.community-gpx-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* Einheitliches NORTHBOUND-Akkordeon: Plus/Minus wie im Hauptmenü, ohne Kasten. */
.event-filter-panel>summary:after,
#eventsTab .event-filter-panel>summary:after,
#northboundCommunity .community-filter-panel>summary:after{
 content:"＋"!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;
 flex:0 0 auto!important;width:auto!important;height:auto!important;min-width:0!important;min-height:0!important;
 padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;
 color:#FF6A00!important;font-size:27px!important;font-weight:500!important;line-height:1!important;
}
.event-filter-panel[open]>summary:after,
#eventsTab .event-filter-panel[open]>summary:after,
#northboundCommunity .community-filter-panel[open]>summary:after{content:"−"!important;color:#FF6A00!important;}

/* NORTHBOUND-Menü: einheitliche, klare Akkordeon-Flächen */
.app-menu-dropdown{background:#0f1924!important;border:1px solid #344b5d!important;border-radius:22px!important;box-shadow:0 18px 48px #0008!important}
.app-menu-heading{padding:16px 18px!important;border-bottom:1px solid #344b5d!important;color:#eaf2f7!important;font-size:18px!important;font-weight:850!important}
.northbound-primary-links{padding:12px 14px!important;margin:0!important;border:0!important}
.northbound-menu-group{margin:7px 0!important;padding:0!important;border:1px solid #344b5d!important;border-radius:15px!important;background:linear-gradient(145deg,#142330,#101b26)!important;overflow:hidden}
.northbound-menu-group>summary{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;min-height:54px!important;padding:13px 16px!important;color:#edf3f7!important;font-size:15px!important;font-weight:800!important;list-style:none!important;cursor:pointer!important}
.northbound-menu-group>summary::-webkit-details-marker{display:none!important}
.northbound-menu-group>summary:after{content:"＋"!important;color:#ff6a00!important;font-size:25px!important;font-weight:500!important;line-height:1!important}
.northbound-menu-group[open]>summary:after{content:"−"!important}
.northbound-menu-group[open]>summary{border-bottom:1px solid #344b5d!important}
.northbound-primary-links .more-nav-item{min-height:46px!important;padding:11px 16px!important;margin:2px 10px!important;width:calc(100% - 20px)!important;border:1px solid transparent!important;border-radius:11px!important;background:transparent!important;color:#dce7ef!important;font-size:14px!important;font-weight:650!important}
.northbound-primary-links .more-nav-item[aria-pressed="true"],.northbound-primary-links .more-nav-item[aria-current="page"]{background:#30251f!important;border-color:#ff6a00!important;color:#ffbd91!important}
#stravaMenuGroup #stravaIntegrationCard{margin:0!important;padding:12px!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
#stravaMenuGroup #stravaSyncDetails{border:0!important;background:transparent!important}
#stravaMenuGroup #stravaSyncDetails>summary{display:none!important}
#stravaMenuGroup .planner-intro,#stravaMenuGroup .plan-meta{font-size:12px!important}
#stravaMenuGroup .plan-actions{display:grid!important;grid-template-columns:1fr!important}
#stravaMenuGroup .plan-actions button{width:100%!important}
