/* Header stays in the existing viewport shell, outside the scrolling main. */
#appViewport>header{display:flex;align-items:center;gap:12px;padding-left:max(14px,env(safe-area-inset-left));padding-right:max(14px,env(safe-area-inset-right));position:relative;z-index:5}
.navigation-controls{display:flex;align-items:center;gap:4px;flex:1}.nav-home,.nav-back,.nav-settings{min-height:44px;min-width:44px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line);background:transparent;border-radius:7px;color:var(--lime);font-size:12px;padding:8px}.nav-home svg{width:21px;height:21px}.navigation-brand{font-size:24px;white-space:nowrap}.nav-settings{margin-left:auto}.navigation-controls+.navigation-brand{position:absolute;left:50%;transform:translateX(-50%)}.race-return{display:block;min-height:44px;margin-bottom:16px;padding:10px 13px;border:1px solid var(--lime);border-radius:7px;background:#263523;color:var(--lime);font-size:12px}.destination-link{display:block;min-height:44px;margin-top:20px}.championship-next{border-color:#687a49}.championship-next .btn{min-height:44px}.championship-next .conditions{margin:12px 0 0}.championship-next h2{font-size:24px;margin:0 0 12px}.championship-next .row{flex-wrap:wrap;gap:12px}@media(max-width:520px){.navigation-brand{font-size:22px}.nav-back{font-size:11px;padding:8px}.navigation-controls{gap:4px}.race-return{width:100%}}

/* Supporting copy needs its own rhythm after actions, including wrapped buttons. */
.owned-actions + .conditions,.owned-actions + .compact-note,.panel > .btn + .conditions,.panel > .btn + .compact-note{margin-top:14px;line-height:1.6}
.series-car > b{display:block;line-height:1.4}
.series-car .instance-id{margin-top:6px;margin-bottom:16px;line-height:1.6}
.series-car > .badge{display:inline-block;max-width:100%;line-height:1.5;white-space:normal}
.series-car > .conditions:last-child,.championship-next > .conditions:last-child{margin-bottom:0}
.compact-details[open] > summary,.repair-estimate[open] > summary{margin-bottom:12px}
.panel,.cardbody,.modal{overflow-wrap:break-word}
.panel > .row > :first-child,.modal > .row > :first-child,.timing-row > :nth-child(2){min-width:0}
.series-standings table{table-layout:fixed}
.series-standings th:first-child{width:38px}.series-standings th:nth-child(3){width:48px}.series-standings th:last-child{width:38px}
.series-standings td,.series-standings th{overflow-wrap:anywhere;line-height:1.5}
.round-preview li{align-items:flex-start;line-height:1.6}.round-preview li > b{flex-shrink:0}
.pool-car{gap:16px;line-height:1.6}.pool-car > span{flex-shrink:0}
@media(max-width:520px){
 .topline{flex-wrap:wrap;align-items:flex-start;row-gap:12px}.topline > h1{min-width:0;flex:1 1 190px}
 .series-car .owned-actions .btn{flex:1 1 140px;line-height:1.5;padding:12px}
 .series-car .owned-actions .text-button{flex-basis:100%}
 .history-grid,.purchase-summary{grid-template-columns:minmax(0,1fr) minmax(0,1fr);line-height:1.6}
 .history-grid b{max-width:100%;overflow-wrap:anywhere}
 .certified-report .row,.value-rows .row,.settings-row{flex-wrap:wrap;gap:10px;line-height:1.6}
 .workshop-car > div{min-width:0}.workshop-car span{display:block;line-height:1.6;margin-top:4px}
 .timing-row{grid-template-columns:22px minmax(0,1fr) 54px 48px;gap:6px;line-height:1.5}
 .pagination{gap:12px}.pagination .btn{padding:11px 14px}
}
.series-car > .badge + .conditions{margin-top:12px}
.event > .badge{display:inline-block;max-width:100%;line-height:1.5;white-space:normal}

/* Long action labels and supporting copy must remain readable at narrow widths. */
.panel .btn,.modal .btn,.cardbody .btn{max-width:100%;white-space:normal;line-height:1.5}
.cardbody > .btn + .conditions,.modal > .btn + .muted{margin-top:14px;line-height:1.6}
@media(max-width:520px){.series-banner{flex-wrap:wrap;row-gap:10px}.series-banner > span{flex:1 1 180px}.round-preview li{flex-wrap:wrap;gap:4px 16px}.round-preview span{text-align:left;max-width:100%}}
