/* Race Center mobile app shell — 2026-09-24 */
:root{--rc-mobile-nav-h:68px}
.rc-mobile-nav,.rc-install-banner{display:none}

@media(max-width:820px){
  html{scroll-padding-bottom:calc(var(--rc-mobile-nav-h) + env(safe-area-inset-bottom) + 12px)}
  body{padding-bottom:calc(var(--rc-mobile-nav-h) + env(safe-area-inset-bottom));overflow-x:hidden}
  .site-header{position:sticky!important;top:0!important;z-index:1000!important;height:auto!important;background:rgba(9,11,14,.95)!important;backdrop-filter:blur(16px)}
  .header-inner{
    width:calc(100% - 20px)!important;
    min-height:58px!important;height:58px!important;
    margin:0 auto!important;padding:6px 0!important;
    display:flex!important;grid-template-columns:none!important;
    align-items:center!important;justify-content:space-between!important;gap:10px!important
  }
  .brand{
    flex:0 1 auto!important;min-width:0!important;
    display:flex!important;align-items:center!important;justify-content:flex-start!important;
    overflow:hidden!important
  }
  .brand img{
    display:block!important;width:112px!important;max-width:112px!important;
    height:38px!important;max-height:38px!important;object-fit:contain!important;
    object-position:left center!important;flex:0 0 auto!important
  }
  .brand-product{display:none!important}
  .site-header nav{display:none!important}
  .account-zone{
    position:static!important;inset:auto!important;
    width:auto!important;min-width:0!important;max-width:130px!important;
    margin:0!important;margin-left:auto!important;
    display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:6px!important;
    flex:0 0 auto!important
  }
  .header-health{display:none!important}
  .account-button{
    width:auto!important;max-width:126px!important;min-height:38px!important;
    padding:0 10px!important;font-size:12px!important;white-space:nowrap!important;
    overflow:hidden!important;text-overflow:ellipsis!important
  }

  main{width:100%!important;overflow:hidden}
  .hero,.race-pulse,.content-section,.consumer-home,.v7-race-day{
    width:calc(100% - 20px)!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }
  .hero{grid-template-columns:1fr!important;padding-top:24px!important;gap:18px!important}
  .hero-copy h1{font-size:clamp(42px,13vw,64px)!important;line-height:.92!important}
  .hero-copy>p{font-size:14px!important;line-height:1.55!important}
  .hero-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}
  .hero-actions .button{width:100%!important;min-height:46px!important;padding:0 10px!important;font-size:10px!important}
  .hero-board{grid-template-columns:1fr 1fr!important}
  .hero-board>div{min-width:0!important;padding:14px!important}
  .race-search-box{min-height:48px!important}
  .race-search-box kbd{display:none!important}

  .pulse-head,.consumer-home-head,.section-head,.drivers-head,.series-directory-head,.v7-page-head,.v7-directory-head{
    align-items:flex-start!important;flex-direction:column!important;gap:12px!important
  }
  .pulse-actions{width:100%!important;overflow-x:auto!important;justify-content:flex-start!important}
  .pulse-grid{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}
  .pulse-card{min-height:112px!important;padding:13px!important}
  .pulse-card strong{font-size:22px!important}
  .my-series-strip,.consumer-rail{display:flex!important;overflow-x:auto!important;scroll-snap-type:x proximity!important;scrollbar-width:none!important;padding-bottom:6px!important}
  .my-series-strip::-webkit-scrollbar,.consumer-rail::-webkit-scrollbar{display:none}
  .my-series-strip>*{flex:0 0 82%!important;scroll-snap-align:start!important}
  .consumer-rail>*{flex:0 0 86%!important;scroll-snap-align:start!important}
  .consumer-home-split{grid-template-columns:1fr!important}
  .consumer-home-head .consumer-customize{width:100%!important;min-height:44px!important}
  .consumer-block-head{align-items:flex-start!important;gap:8px!important}
  .consumer-block-head>a,.consumer-link-button{white-space:nowrap!important}

  body[data-view="hub"] #hubNavigation{grid-template-columns:1fr!important;width:calc(100% - 20px)!important;margin-inline:auto!important}
  .hub-nav-card{min-height:104px!important;padding:16px!important}
  .hub-nav-card p{font-size:11px!important}

  .drivers-directory,.series-directory,.driver-profile-page,.series-profile-page,
  .v7-entity-directory,.v7-entity-profile,.v7-my-racing,.v7-health,.v7-compare,
  .v8-community-page,.v8-story-page{
    width:calc(100% - 20px)!important;margin-left:auto!important;margin-right:auto!important
  }
  .drivers-grid,.series-directory-grid,.v7-entity-grid,.v7-race-day-grid,.v7-brief-row,
  .v7-profile-layout,.v7-health-lists,.v7-archive-grid,.v8-grassroots-columns{
    grid-template-columns:1fr!important
  }
  .driver-search{width:100%!important}
  .driver-search input{min-height:46px!important;font-size:16px!important}
  .v7-profile-hero{grid-template-columns:1fr!important;padding:18px!important}
  .v7-profile-hero h2{font-size:clamp(38px,12vw,58px)!important}
  .v7-profile-stats{grid-template-columns:1fr 1fr!important}
  .v7-follow-summary,.v7-health-stats{grid-template-columns:1fr 1fr!important}

  .race-social{display:block!important;width:calc(100% - 20px)!important;margin:0 auto 24px!important}
  .social-left,.social-right{position:static!important;display:none!important}
  .social-center{width:100%!important;min-width:0!important}
  .social-composer-card,.social-feed-card,.unified-race-feed{border-radius:14px!important}
  .social-composer-tools{flex-wrap:wrap!important}
  .social-composer-tools select{max-width:100%!important}
  .wall-actions{overflow-x:auto!important;justify-content:flex-start!important}
  .wall-action{flex:0 0 auto!important;min-height:40px!important;padding-inline:12px!important}

  .standings-table-wrap,.schedule-table-wrap,.table-wrap{overflow-x:auto!important;-webkit-overflow-scrolling:touch!important}
  table{min-width:700px}
  img{max-width:100%}

  .rc-mobile-nav{
    position:fixed;left:0;right:0;bottom:0;z-index:1400;
    display:grid;grid-template-columns:repeat(5,1fr);
    min-height:var(--rc-mobile-nav-h);
    padding:6px 6px calc(6px + env(safe-area-inset-bottom));
    border-top:1px solid #2a323b;background:rgba(8,11,14,.97);
    backdrop-filter:blur(18px);box-shadow:0 -10px 32px rgba(0,0,0,.35)
  }
  .rc-mobile-nav a{
    min-width:0;min-height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;
    gap:3px;border-radius:10px;color:#8e9baa;text-decoration:none;font-size:11px;font-weight:800;letter-spacing:0
  }
  .rc-mobile-nav a span:first-child{font-size:18px;line-height:1}
  .rc-mobile-nav a[aria-current="page"]{color:#fff;background:rgba(255,85,0,.11)}
  .rc-mobile-nav a[aria-current="page"] span:first-child{color:#ff6d27}

  .rc-install-banner{
    position:fixed;left:10px;right:10px;bottom:calc(var(--rc-mobile-nav-h) + env(safe-area-inset-bottom) + 10px);
    z-index:1390;align-items:center;gap:10px;padding:12px;border:1px solid rgba(255,85,0,.45);
    border-radius:14px;background:#11161b;box-shadow:0 18px 50px rgba(0,0,0,.45)
  }
  .rc-install-banner.is-visible{display:flex}
  .rc-install-banner>div{min-width:0;flex:1}
  .rc-install-banner strong{display:block;color:#fff;font-size:12px}
  .rc-install-banner span{display:block;margin-top:2px;color:#8f9aa6;font-size:9px}
  .rc-install-banner button{border:0;border-radius:9px;background:#ff5500;color:#111;font-weight:1000;min-height:38px;padding:0 12px}
  .rc-install-banner .rc-install-close{background:transparent;color:#8f9aa6;padding:0 5px;font-size:18px}

  @media(max-width:480px){
    .header-inner{width:calc(100% - 16px)!important;gap:6px!important}
    .brand img{width:98px!important;max-width:98px!important;height:34px!important;max-height:34px!important}
    .account-button{max-width:112px!important;padding:0 8px!important;font-size:11px!important}
    .pulse-grid{grid-template-columns:1fr!important}
    .hero-actions{grid-template-columns:1fr!important}
    .hero-board{grid-template-columns:1fr 1fr!important}
    .v7-profile-stats,.v7-follow-summary,.v7-health-stats{grid-template-columns:1fr!important}
  }
}

@media(display-mode:standalone){
  .rc-install-banner{display:none!important}
  body{overscroll-behavior-y:none}
}

/* Accessible interactive affordances and reduced-motion support. */
.rc-mobile-nav a:focus-visible,.rc-install-banner button:focus-visible{outline:3px solid #ff8a48;outline-offset:2px}
@media (prefers-reduced-motion:reduce){.rc-mobile-nav *,.rc-install-banner *{transition:none!important;animation:none!important}}

/* Preserve readable dedicated Race Center lockup on compact headers. */
@media(max-width:820px){.site-header .brand img{width:150px!important;max-width:150px!important;height:53px!important;max-height:53px!important}}
@media(max-width:480px){.site-header .brand img{width:136px!important;max-width:136px!important;height:48px!important;max-height:48px!important}}
