/* Interaction design refresh: clear actions, readable states, compact mobile paths. */
html:not([data-bike-theme]){--bike-muted:#626963;--bike-line:#d9dcd6;--bike-soft:#e9ece6}
body{line-height:1.45}
main{padding-top:18px;padding-bottom:120px}
.app-shell{max-width:900px}
.compact-heading{min-height:44px;margin-bottom:16px}
.compact-heading h1{font-size:28px;letter-spacing:-.75px;font-weight:750}
.button{min-width:0;max-width:100%;height:auto;white-space:normal;overflow-wrap:anywhere;min-height:46px;font-size:14px;line-height:1.35;font-weight:650}
.button.secondary{border:1px solid var(--bike-line,#d9dcd6)}
button:disabled{cursor:default;opacity:.55}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid var(--bike-accent-ink,#454b48);outline-offset:3px}
.icon-button{flex:0 0 44px;width:44px;min-width:44px;max-width:44px;height:44px}
.text-button{min-width:0;max-width:100%;height:auto;white-space:normal;overflow-wrap:anywhere;min-height:44px;display:inline-flex;align-items:center;justify-content:center;gap:7px;font-size:13px}
.text-button svg{width:16px;height:16px;flex-shrink:0}
.button.danger,.settings-button.danger{background:#fff0ed!important;color:#a73225!important;border:1px solid #f1cfc7}
.muted,.field-hint{line-height:1.55}
.empty-state,.catalog-empty{padding:24px 18px;border-radius:16px}
.empty-state strong,.catalog-empty strong{font-size:18px;line-height:1.35}
.empty-state p,.catalog-empty p{font-size:14px;line-height:1.55}
.empty-state .button,.catalog-empty .button{margin-top:16px}
/* Persistent destinations: icon plus label, same target size on every screen. */
.bottom-nav{width:min(calc(100% - 24px),420px);padding:5px;border-radius:20px;bottom:max(10px,env(safe-area-inset-bottom));gap:4px;box-shadow:0 6px 24px #20282016!important}
.bottom-nav button{flex:1;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;min-height:58px;padding:7px 4px;font-size:12px;line-height:1.2;font-weight:600;border-radius:14px}
.bottom-nav button svg{width:21px;height:21px}
/* Entry routes have distinct contexts and intentional separation. */
.entry-card{padding:28px 24px;border-radius:24px}
.entry-card h1{font-weight:750}
.entry-card #marshal-entry-info{padding:12px 16px;border-radius:12px;background:var(--bike-soft,#f4f5f2);overflow-wrap:anywhere}
#marshal-entry-info strong,#marshal-entry-info span{display:block}
.entry-card p.entry-route-hint{margin:14px 0 7px;font-size:12px;font-weight:600;line-height:1.4;text-align:left;color:var(--bike-muted,#626963)}
.entry-button{font-size:14px;min-height:48px}
.entry-card .entry-label{font-size:11px;letter-spacing:.09em}
/* The bike remains the first task, with history and adding a bike within reach. */
.garage-quick-actions{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:0 0 16px;padding:0 2px}
.garage-quick-actions .text-button{padding:0 7px;color:var(--bike-accent-ink,#454b48);background:transparent;font-weight:650}
.slide-scene .slide-head h2{font-size:23px;line-height:1.25;letter-spacing:-.5px}
.card-label{font-size:10px;letter-spacing:.07em}
.bike-slide .button{font-size:14px}
.service-heading{align-items:center;flex-wrap:wrap;gap:6px 12px}
.service-heading h2{flex:1 1 150px;min-width:0;overflow-wrap:anywhere}
.service-heading .text-button{flex:0 1 auto;max-width:100%}
.service-heading h2{font-size:19px;font-weight:700}
.service-heading .text-button{font-size:13px;padding:5px 0 5px 8px}
.service-panel{padding:17px}
.schedule-header{flex-wrap:wrap;gap:5px 10px}
.schedule-header strong{font-size:15px;min-width:0;overflow-wrap:anywhere}
.schedule-header>.service-engine-type{white-space:normal;text-align:left;overflow-wrap:anywhere}
.schedule-task{min-width:0;flex:1;overflow-wrap:anywhere}
.schedule-task strong{font-size:14px;line-height:1.4}
.schedule-task small{font-size:12px;line-height:1.5}
.schedule-item{gap:12px;padding:14px 0;min-height:72px}
.schedule-status{font-size:12px;max-width:102px}
.maintenance-summary{display:flex;align-items:center;gap:7px;color:var(--bike-accent-ink,#454b48);font-size:12px;font-weight:600;line-height:1.5;padding:10px 12px;background:var(--bike-soft,#e9ece6);border-radius:10px;margin:12px 0 10px}
.maintenance-summary svg{width:16px;height:16px;flex-shrink:0}
.maintenance-summary.needs-attention{background:#fff1e5;color:#8a4a16}
.service-guidance{font-size:12px;margin:9px 0;color:var(--bike-muted,#626963)}
.service-expander{min-height:44px;font-size:13px;font-weight:600}
.service-card strong{font-size:14px;line-height:1.45}
.service-card .muted{font-size:12px}
.service-card .icon-button{flex:0 0 44px;width:44px;min-width:44px;max-width:44px;height:44px}
/* One-line view tabs scroll horizontally when their labels need more room. */
.personal-race-tabs,.catalog-category-tabs{display:flex;flex-wrap:nowrap;gap:4px;overflow-x:auto;overflow-y:hidden;max-width:100%;min-width:0;overscroll-behavior-x:contain;scrollbar-width:thin;border:1px solid var(--bike-line,#d9dcd6);border-radius:13px;padding:4px;background:var(--bike-soft,#e9ece6);margin-bottom:16px}
.personal-race-tabs button,.catalog-category-tabs button{flex:1 0 auto;min-width:max-content;min-height:44px;padding:9px 5px;border:0;border-radius:9px;font-size:13px;font-weight:600;line-height:1.3;white-space:nowrap;background:transparent;color:var(--bike-muted,#626963)}
.personal-race-tabs button.active,.catalog-category-tabs button.active{background:#fff;color:var(--bike-accent-ink,#454b48);box-shadow:0 1px 5px #20282012;font-weight:700;border:0}
.catalog-category-tabs button{flex:1 0 auto}
.rider-history-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.rider-history-heading>div{min-width:0}
.rider-history-heading h2{margin-bottom:0}
.rider-organizer-button{flex:0 0 auto;padding:9px 12px;font-size:12px;white-space:nowrap}
.race-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;margin-bottom:8px}
.race-filter-buttons .race-filter-button{flex:1 1 0;min-width:0;white-space:normal;line-height:1.3}
.race-filter-button>span:first-child{min-width:0;overflow-wrap:anywhere}
.race-toolbar-actions{margin-left:0;gap:6px}
.race-filter-button{min-height:44px;font-size:13px;padding:0 12px;border-radius:10px}
.sort-trigger,.location-button.location-icon{width:44px;min-width:44px;min-height:44px;flex-basis:44px}
.race-main{padding:16px 58px 16px 16px}
.race-top h2{font-size:18px;font-weight:700;line-height:1.3;letter-spacing:-.3px}
.race-top time{font-size:13px;font-weight:650;color:var(--bike-accent-ink,#454b48);margin-top:7px}
.race-main p{font-size:13px;line-height:1.5}
.race-type{font-size:11px}
.favorite-star{width:44px;height:44px;font-size:28px;right:7px;top:7px}
.race-data-notice{font-size:12px;margin:10px 0}
.race-list-heading{font-size:12px;margin:12px 0}
.race-detail-actions{display:grid;grid-template-columns:1fr;gap:10px}
.catalog-card .race-main{padding-right:16px}
/* Bottom sheets: predictable focus, scroll position, and large native controls. */
dialog{border-radius:22px;padding:24px;box-shadow:0 20px 80px #20282026}
dialog::backdrop{background:#17201b66;backdrop-filter:blur(3px)}
.sheet-header>div{min-width:0;flex:1;overflow-wrap:anywhere}
.sheet-header{margin-bottom:20px;align-items:flex-start}
.sheet-header h2{font-size:25px;line-height:1.2;font-weight:700;letter-spacing:-.6px;margin-top:5px}
.sheet-header h2:focus{outline:none}
.sheet-header .icon-button{flex:0 0 44px;width:44px;min-width:44px;max-width:44px;height:44px}
.sheet-header .eyebrow:empty{display:none}
.field{gap:7px;margin-bottom:18px}
.field label{font-size:13px;line-height:1.4;font-weight:600;color:var(--bike-ink,#292c2a)}
.field input,.field select,.field textarea{font-size:16px;min-height:48px;border-color:var(--bike-line,#d9dcd6);line-height:1.4}
.field-hint{font-size:12px}
.field [aria-invalid=true]{border-color:#a73225;box-shadow:0 0 0 1px #a73225}
.form-error,.comp-form-error,.comp-error{background:#fff0ed;color:#9b3024;border:1px solid #efc9c0;font-size:14px;line-height:1.5}
.form-note{font-size:14px;line-height:1.6;margin-bottom:20px}
.big-input input{font-size:42px;min-height:88px}
.delta-preview{font-size:13px;margin-top:5px}
.sort-option{min-height:65px;padding:13px 14px}
.sort-option strong{font-size:15px}
.sort-option small{font-size:12px}
.region-option{min-height:48px;font-size:14px}
.region-apply{position:sticky;bottom:0;box-shadow:0 0 0 5px #fff}
/* Save feedback is separate from a locally added record and persists on failure. */
.cloud-sync-state{position:fixed;z-index:12;bottom:calc(max(10px,env(safe-area-inset-bottom)) + 80px);left:50%;transform:translateX(-50%);padding:8px 13px;border-radius:20px;background:#fff;color:var(--bike-ink,#292c2a);border:1px solid var(--bike-line,#d9dcd6);box-shadow:0 3px 12px #20282012;font-size:12px;font-weight:600;white-space:nowrap;pointer-events:none}
.cloud-sync-state:before{content:'';display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:7px;background:#42754c}
.cloud-sync-state[data-state=saving]:before{background:#9b7025}
.cloud-sync-state[data-state=error]{color:#9b3024;background:#fff0ed;border-color:#efc9c0}
.cloud-sync-state[data-state=error]:before{background:#a73225}
.storage-warning{font-size:13px;line-height:1.55;border:1px solid #e9d4ad;background:#fff4df!important;color:#704b13!important;margin-bottom:12px}
#toast{bottom:calc(max(10px,env(safe-area-inset-bottom)) + 121px);max-width:calc(100% - 32px);font-size:13px}
/* Competition hierarchy: role-aware next action, readable tabs and mobile results. */
.comp-next-step{display:flex;justify-content:space-between;align-items:center;gap:18px;border:1px solid var(--comp-line);background:var(--bike-soft,#e9ece6);padding:17px;border-radius:16px;margin:0 0 16px}
.comp-next-step .eyebrow{font-size:10px;letter-spacing:.07em}
.comp-next-step h3{font-size:18px;line-height:1.3;margin:6px 0}
.comp-next-step p{font-size:13px;line-height:1.5;color:var(--comp-muted);margin:0;max-width:410px}
.comp-next-step .button{flex-shrink:0;max-width:230px;font-size:13px}
.comp-event-card{padding:17px;border-radius:16px}
.comp-event-card h3{font-size:22px;margin:16px 0 8px}
.comp-event-card p{margin-bottom:16px}
.comp-card-top time,.comp-card-bottom{font-size:12px}
.comp-segments{gap:6px;margin-bottom:16px}
.comp-segments button{min-height:44px;font-size:12px;padding:9px 12px}
.comp-section-tabs{gap:6px;overflow-x:auto;overflow-y:hidden;display:flex;flex-wrap:nowrap;max-width:100%;min-width:0;overscroll-behavior-x:contain;scrollbar-width:thin;padding:4px;background:var(--bike-soft,#e9ece6);border:1px solid var(--comp-line);border-radius:12px;margin:0 0 18px}
.comp-section-tabs button{flex:1 0 auto;min-width:max-content;min-height:44px;border:0;border-radius:8px;font-size:13px;padding:8px 5px;line-height:1.35;white-space:nowrap;overflow-wrap:normal}
.comp-section-tabs button.active{background:#fff;box-shadow:0 1px 4px #20282012;border:0}
.comp-main-tabs button{min-width:104px;padding-inline:20px;font-size:14px}
.comp-backrow{margin-bottom:16px}
.comp-backrow .button{min-height:44px;font-size:13px}
.comp-title h2{font-size:28px;line-height:1.2;margin:10px 0}
.comp-title p{margin-bottom:16px}
.comp-panel{padding:17px}
.comp-summary{margin-bottom:16px;padding:16px 7px}
.comp-entry .button,.comp-mark .button,.comp-post-close .button,.comp-detail-row .button{min-height:44px;font-size:12px}
.comp-table td,.comp-table th{font-size:13px}
.rider-empty{padding:24px 20px}
.rider-empty h2{font-size:24px}
.rider-empty-symbol{margin-bottom:16px}
.rider-empty p{font-size:14px;margin-bottom:20px}
.rider-source-card{padding:18px}
.rider-stats strong{font-size:26px}
@media(max-width:600px){
 .personal-race-tabs button{font-size:13px;min-height:44px;padding-inline:12px}
 .comp-next-step{align-items:stretch;flex-direction:column;gap:13px}
 .comp-next-step .button{max-width:none;width:100%;justify-content:space-between}
 .comp-table-wrap{border:0;background:transparent;overflow:visible;margin:16px 0}
 .comp-table,.comp-table tbody{display:block;white-space:normal;width:100%}
 .comp-table thead{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%)}
 .comp-table tbody{display:grid;gap:12px}
 .comp-table tbody tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid var(--comp-line);border-radius:15px;background:#fff;padding:14px;gap:12px}
 .comp-table tbody td{display:block;border:0;padding:0;min-width:0;overflow-wrap:anywhere;font-size:14px;line-height:1.4}
 .comp-table tbody .result-position{grid-column:1;grid-row:1;font-size:24px}
 .comp-table tbody .result-person{grid-column:2/4;grid-row:1;min-width:0}
 .comp-table tbody .result-person>strong{font-size:15px}
 .comp-table tbody td[data-label]:before{content:attr(data-label);display:block;font-size:11px;font-weight:500;color:var(--comp-muted);margin-bottom:5px}
 .comp-table tbody .result-total{color:var(--comp-accent)}
 .comp-table tbody .result-detail{grid-column:1/-1;border-top:1px solid var(--comp-line);padding-top:3px}
 .comp-table .text-button{width:100%;justify-content:flex-start;font-size:13px}
}
@media(max-width:700px){
 .app-shell{padding:0 16px}
 main{padding-top:14px}
 dialog{padding:18px 18px calc(22px + env(safe-area-inset-bottom));border-radius:22px 22px 0 0;max-height:92dvh}
 .sheet-header{position:sticky;top:-18px;background:white;z-index:3;padding:9px 0 12px;margin-bottom:14px;border-bottom:1px solid var(--bike-line,#d9dcd6)}
 .sheet-grip{margin:-7px auto 9px}
 .comp-heading h2{font-size:25px}
}
@media(max-width:370px){
 .app-shell{padding:0 12px}
 .compact-heading h1{font-size:26px}
 .garage-quick-actions .text-button{font-size:12px;padding:0 2px}
 .race-filter-button{font-size:12px;padding:0 7px}
 .race-toolbar,.race-filter-buttons,.race-toolbar-actions{gap:5px}
 .sort-trigger,.location-button.location-icon{width:44px;min-width:44px;flex-basis:44px}
 .service-heading h2{font-size:17px}
 .service-heading .text-button{font-size:12px}
 .service-panel,.comp-panel{padding:14px}
 .comp-card-top{align-items:flex-start}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Flexible content rows reserve space for actions; long labels can grow vertically. */
.button svg,.text-button svg,.settings-button svg{flex-shrink:0}
.settings-button{min-width:0;white-space:normal;overflow-wrap:anywhere}
.service-card>div,.comp-entry>div,.comp-next-step>div{min-width:0;flex:1;overflow-wrap:anywhere}
.service-card .icon-button{flex:0 0 44px}
.comp-entry{flex-wrap:wrap;gap:10px}
.comp-entry>div{flex-basis:160px}
.comp-entry .button{flex:0 1 auto}
.comp-heading>div{min-width:0;flex:1 1 180px;overflow-wrap:anywhere}
.comp-heading h2,.comp-heading h3,.comp-heading h4,.comp-title h2{min-width:0;overflow-wrap:anywhere}
.comp-heading>.button{flex:0 1 auto;max-width:100%}
.comp-title-actions{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px}
.comp-title-actions .button{font-size:13px}
.comp-actions .button{flex:1 1 160px;min-width:0}
.comp-post-close{flex-wrap:wrap;gap:8px}
.comp-post-close>span{min-width:0;flex:1 1 90px;overflow-wrap:anywhere}
.comp-post-close .button{flex:0 1 auto;max-width:100%}
.comp-detail-row>span{min-width:0;overflow-wrap:anywhere}
.form-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
.garage-quick-actions{flex-wrap:wrap;gap:4px 8px}
.garage-quick-actions .text-button{flex:0 1 auto}
.catalog-category-tabs button{white-space:nowrap}
.race-top h2,.race-main p,.comp-card-top,.comp-card-bottom{overflow-wrap:anywhere}
.comp-card-top{flex-wrap:wrap}
.cloud-sync-state{max-width:calc(100% - 24px);white-space:normal;text-align:center}
.comp-form-grid .field{min-width:0}
.comp-form-grid input,.comp-form-grid select{min-width:0;max-width:100%}
.bottom-nav button{overflow-wrap:normal;white-space:nowrap;flex:1 1 0;min-width:0}
.bottom-nav button svg{flex-shrink:0}
@media(max-width:370px){.comp-title-actions .button{width:100%}.schedule-status{max-width:86px}.comp-next-step .button{padding-inline:12px}.sheet-header h2{font-size:23px}}

.comp-race-header{display:flex;align-items:flex-start;gap:8px;margin:0 0 12px;min-width:0}
.comp-race-header h1{min-width:0;margin:7px 0 0;font-size:22px;line-height:1.3;letter-spacing:-.45px;font-weight:750;overflow-wrap:anywhere}
.comp-overview-meta{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;margin:0 0 14px;color:var(--comp-muted);font-size:13px;line-height:1.45}

.comp-kp-row{display:flex;align-items:center;flex-wrap:nowrap;gap:6px;max-width:100%;min-width:0;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scrollbar-width:thin;padding:2px 0 6px}
.comp-kp-button,.comp-kp-chip{display:inline-flex;align-items:center;justify-content:center;gap:5px;flex:0 0 auto;min-height:44px;padding:9px 12px;border:1px solid var(--comp-line,#d9dcd6);border-radius:10px;background:#fff;color:var(--bike-ink,#292c2a);font-size:13px;line-height:1.3;font-weight:600;white-space:nowrap}
.comp-kp-chip{background:var(--bike-soft,#e9ece6)}
.comp-kp-control{width:44px;padding:0;font-size:24px;line-height:1;position:sticky;left:0;z-index:1}
.comp-kp-plus{position:sticky;left:auto;right:0;background:var(--bike-accent-ink,#454b48);border-color:var(--bike-accent-ink,#454b48);color:#fff}
.comp-kp-button.selected{background:var(--bike-accent-ink,#454b48);border-color:var(--bike-accent-ink,#454b48);color:#fff}
.comp-route-label{display:block;font-size:13px;font-weight:550;margin:0 0 7px}
.comp-route-preview{margin:8px 0 18px;padding:10px 12px;border-radius:10px;background:var(--bike-soft,#e9ece6);font-size:13px;line-height:1.65;overflow-wrap:anywhere}
.comp-kp-note{margin:8px 0 0;color:#8b3d28}

.comp-race-header>.button{flex:0 0 auto;white-space:nowrap}
.comp-loop-boundaries{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:10px 0 0}
.comp-loop-boundaries .field{min-width:0;margin-bottom:0}
.comp-loop-boundaries select{min-width:0;max-width:100%}

.comp-entry-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:8px;margin:0 0 16px}
.comp-entry-filters .field{min-width:0;margin-bottom:0}
.comp-entry-filters select,.comp-entry-filters input{width:100%;min-width:0;min-height:44px;height:44px;margin:0;padding:9px 10px;font-size:13px;line-height:1.35}
.comp-detail-row+[data-comp-action="add-staff"]{margin-top:16px}

.comp-wide-action{margin-top:12px}.comp-wide-action>.button{display:flex;justify-content:center;width:100%}
.comp-overview-link{position:relative}.comp-overview-link:hover{border-color:var(--comp-accent)}
.comp-overview-link>.comp-edit-hit{position:absolute;inset:0;z-index:1;width:100%;height:100%;min-height:0;padding:0;border:0;border-radius:inherit;background:transparent;cursor:pointer}
.comp-overview-link a{position:relative;z-index:2}
#comp-event-information,.comp-class-editor,.comp-locked-class{scroll-margin-top:16px}
.comp-locked-class{margin-top:16px;padding-top:16px;border-top:1px solid var(--comp-line)}
#c-markBib.comp-bib-valid{border-color:#55945d;background:#f0f8ef;box-shadow:0 0 0 2px #55945d22}
#c-markBib.comp-bib-invalid{border-color:#bd5548;background:#fff3f0;box-shadow:0 0 0 2px #bd554822}
.comp-mark-preview.is-valid{color:#356a3c}.comp-mark-preview.is-invalid{color:#a13d32}

.comp-duration-input{display:grid;grid-template-columns:minmax(0,1fr) minmax(90px,.85fr);gap:8px}
.comp-duration-input input,.comp-duration-input select{min-width:0;max-width:100%;margin:0}
.comp-form-grid>.comp-duration-field{grid-column:1/-1}
.comp-checkpoint-copy{display:grid;gap:4px;min-width:0;flex:1}.comp-checkpoint-copy span{font-size:13px;color:var(--comp-muted)}.comp-checkpoint-copy strong{font-size:14px;line-height:1.4}.comp-checkpoint-copy small{color:#8b4b32}
.comp-checkpoint-detail>.button{flex:0 0 auto}

.comp-queue-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.comp-queue-summary>div{display:flex;flex-direction:column;gap:4px;min-width:0}.comp-queue-summary strong{font-size:21px;line-height:1.2}.comp-queue-summary span{font-size:11px;line-height:1.4;overflow-wrap:anywhere}
.comp-queue-help{font-size:12px;margin:8px 0 12px}

.profile-telegram-id{margin-top:24px;padding:18px}.profile-telegram-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.profile-telegram-row>div{min-width:0}.profile-telegram-row span{display:block;font-size:12px;color:var(--bike-muted,#697269)}.profile-telegram-row strong{display:block;margin-top:6px;font-size:20px;line-height:1.3;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;user-select:all}.profile-telegram-row>.button{flex:0 0 auto}.profile-telegram-id p{margin:12px 0 0;font-size:12px;line-height:1.5;color:var(--bike-muted,#697269)}

/* Keep the focused form inside the area left above the mobile keyboard. */
html[data-input-focus] .app-shell{padding-bottom:var(--input-scroll-space,96px)}
html[data-input-focus] #sheet{top:var(--input-viewport-top,0px);bottom:var(--input-viewport-inset,0px);max-height:calc(var(--input-viewport-height,100dvh) - 24px);scroll-padding-block:100px 20px}
input,textarea,select,[contenteditable="true"]{scroll-margin-block:24px}
@media(max-width:700px){html[data-input-focus] #sheet{top:auto}}

.race-card .race-main{padding:16px}.race-card-header{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding-right:42px;min-height:32px}.race-date-type{display:flex;align-items:flex-start;flex-direction:column;gap:6px;min-width:0;flex:1}.race-date-type time{font-size:13px;line-height:1.35;font-weight:650;color:var(--bike-accent-ink,#454b48)}.race-date-type .race-type{margin:0;white-space:normal;overflow-wrap:anywhere;text-align:left;line-height:1.4}.race-status{flex:0 1 auto;max-width:49%;padding:5px 8px;border-radius:7px;background:var(--bike-soft,#e8ede6);color:var(--bike-accent-ink,#454b48);font-size:11px;line-height:1.4;font-weight:650;white-space:normal;overflow-wrap:anywhere;text-align:right}.race-status.running{background:#fff0d1;color:#80531b}.race-status.final{background:#e2efdf;color:#3e633d}.race-card-name{font-size:18px;font-weight:700;line-height:1.3;letter-spacing:-.3px;margin:12px 0 0;overflow-wrap:anywhere}.race-card>.favorite-star{top:7px;right:7px;bottom:auto}
@media(max-width:700px),(pointer:coarse){html{touch-action:pan-x pan-y}input,textarea,select{font-size:16px!important}.big-input input{font-size:42px!important}}

.race-status.cancelled{background:#f8e5df;color:#8f4834}

/* Calendar details share one layout for imported and locally organized races. */
.race-detail{--comp-accent:var(--bike-accent-ink,#49644e);--comp-line:var(--bike-line,#dde1d9);--comp-muted:var(--bike-muted,#697269)}
.race-description{white-space:pre-line}
.race-class,.race-results{border-top:1px solid var(--comp-line,#d9dcd6);padding:14px 0}
.race-class summary,.race-results summary{cursor:pointer;min-height:44px;display:flex;align-items:center;gap:8px;font-weight:650;font-size:15px;list-style:none}
.race-class summary::-webkit-details-marker,.race-results summary::-webkit-details-marker{display:none}
.race-class summary:before,.race-results summary:before{content:'›';font-size:24px;line-height:1;transition:transform .15s}
.race-class[open]>summary:before,.race-results[open]>summary:before{transform:rotate(90deg)}
.race-class summary small,.race-results summary small{font-size:12px;font-weight:500;color:var(--comp-muted,#697269)}
.race-results{margin:18px 0}.race-results>summary{flex-wrap:wrap}.race-results>summary small{margin-left:auto}
.race-registration{margin:20px 0}.race-registration>.button,.race-results>.button{width:100%;justify-content:center}
