/* V2 page system: the same live controls and data, a different composition. */
html.ui-v2 main>.view:not(#overview){max-width:1680px;margin:0 auto;padding-bottom:45px}
html.ui-v2 main>.view:not(#overview)>.section-intro,
html.ui-v2 main>.view:not(#overview)>.overview-hero.profile-page-title{position:relative;isolation:isolate;width:100%!important;max-width:none!important;min-height:177px;display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin:0 0 18px!important;padding:22px 28px 24px!important;border:0!important;background:linear-gradient(103deg,#14303b,#0a1c25 72%)!important;overflow:hidden}
html.ui-v2 main>.view:not(#overview)>.section-intro:not(.results-page-intro){display:block!important;padding-top:46px!important}
html.ui-v2 main>.view:not(#overview)>.section-intro::before,
html.ui-v2 main>.view:not(#overview)>.overview-hero.profile-page-title::before{content:var(--v2-page-no,'//');position:absolute;z-index:-1;right:26px;top:-52px;color:#254651;font:800 230px/.85 'Barlow Condensed',Impact,sans-serif;letter-spacing:-.09em;pointer-events:none}
html.ui-v2 main>.view:not(#overview)>.section-intro>div,
html.ui-v2 main>.view:not(#overview)>.overview-hero.profile-page-title>div{position:relative;z-index:1}
html.ui-v2 main>.view:not(#overview)>.section-intro>.eyebrow{position:absolute;left:28px;top:24px}
html.ui-v2 main>.view:not(#overview)>.section-intro h2,
html.ui-v2 main>.view:not(#overview)>.overview-hero.profile-page-title h1{position:relative;z-index:1;max-width:85%;margin:0 0 10px!important;color:#f0f7f8!important;font:800 clamp(3.4rem,5.5vw,6rem)/.96 'Barlow Condensed',Impact,sans-serif!important;font-style:italic!important;letter-spacing:0!important;text-shadow:none!important;text-transform:uppercase}
html.ui-v2 main>.view:not(#overview)>.overview-hero.profile-page-title>div:first-child{width:auto!important;max-width:80%!important}
html.ui-v2 main>.view:not(#overview)>.overview-hero.profile-page-title h1{max-width:none;white-space:nowrap}
html.ui-v2 main>.view:not(#overview)>.section-intro>p:last-child,
html.ui-v2 main>.view:not(#overview)>.section-intro>div>p:last-child{position:relative;z-index:1;max-width:560px;margin:0;color:#b6cbd0!important;font-size:.79rem;line-height:1.5}
html.ui-v2 main>.view:not(#overview)>.section-intro .eyebrow,
html.ui-v2 main>.view:not(#overview)>.overview-hero.profile-page-title .eyebrow{color:#8dd9e9!important;font-size:.66rem!important}
html.ui-v2 main>.view:not(#overview)>.section-intro .result-lock-button,
html.ui-v2 main>.view:not(#overview)>.overview-hero.profile-page-title>button{position:relative;z-index:1;align-self:flex-end;margin:0}
html.ui-v2 #my-profile{--v2-page-no:'00'}
html.ui-v2 #live-racers{--v2-page-no:'02'}
html.ui-v2 #racers{--v2-page-no:'03'}
html.ui-v2 #racer-profile{--v2-page-no:'03'}
html.ui-v2 #crews{--v2-page-no:'04'}
html.ui-v2 #tracks{--v2-page-no:'05'}
html.ui-v2 #cars{--v2-page-no:'06'}
html.ui-v2 #race{--v2-page-no:'07'}
html.ui-v2 #gauntlet{--v2-page-no:'08'}
html.ui-v2 #battles{--v2-page-no:'09'}
html.ui-v2 #events{--v2-page-no:'10'}
html.ui-v2 #points{--v2-page-no:'11'}
html.ui-v2 #accounts{--v2-page-no:'12'}

/* The library screens become an index + editor desk, not repeated card grids. */
html.ui-v2 :is(#racers,#tracks,#cars,#crews,#points,#events) .split{display:grid!important;grid-template-columns:minmax(245px,300px) minmax(0,1fr)!important;gap:0!important;align-items:start}
html.ui-v2 :is(#racers,#tracks,#cars,#points,#events) .split>form{min-width:0;margin:0!important;padding:22px!important;border:0!important;border-top:4px solid #8bd8e9!important;background:#172f39!important}
html.ui-v2 :is(#racers,#tracks,#cars,#points,#events) .split>form h3{margin:0 0 17px;color:#f0f7f8;font:800 1.35rem/1.2 Inter,sans-serif!important;font-style:normal!important;letter-spacing:.01em;text-shadow:none!important;text-transform:uppercase}
html.ui-v2 :is(#racers,#tracks,#cars,#points,#events) .split>form label{font-size:.65rem}
html.ui-v2 :is(#racers,#tracks,#cars,#points,#events) .split>.entity-grid,
html.ui-v2 #events .event-list{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:0!important;min-width:0;background:#0e222d}
html.ui-v2 :is(#racers,#tracks,#cars,#crews,#points) .entity-card{position:relative;display:flex;flex-direction:column;justify-content:space-between;min-height:100px!important;margin:0!important;padding:15px 22px!important;border:0!important;border-left:1px solid #355462!important;border-bottom:1px solid #355462!important;background:#0e222d!important}
html.ui-v2 :is(#racers,#tracks,#cars,#crews,#points) .entity-card:hover{background:#183440!important}
html.ui-v2 :is(#racers,#tracks,#cars,#crews,#points) .entity-card .card-top{align-items:start;gap:12px}
html.ui-v2 :is(#racers,#tracks,#cars,#crews,#points) .entity-card .card-top strong{color:#f1f7f7;font:800 1rem/1.25 Inter,sans-serif!important;letter-spacing:.01em!important;text-shadow:none!important;text-transform:uppercase}
html.ui-v2 :is(#racers,#tracks,#cars,#crews,#points) .entity-card .card-top small{color:#90aeb8;font-size:.65rem}
html.ui-v2 :is(#racers,#tracks,#cars,#crews,#points) .entity-card .entity-stats{display:flex;flex-wrap:wrap;gap:20px;margin-top:9px}
html.ui-v2 :is(#racers,#tracks,#cars,#crews,#points) .entity-card .entity-stats span{min-width:80px;color:#eaf3f3;font:800 .95rem Inter,sans-serif}
html.ui-v2 :is(#racers,#tracks,#cars,#crews,#points) .entity-card .entity-stats small{color:#77949e;font:700 .55rem Inter,sans-serif;text-transform:uppercase;letter-spacing:.07em}
html.ui-v2 :is(#racers,#tracks,#cars,#crews,#points) .entity-card .card-actions button{box-shadow:none!important}
html.ui-v2 :is(.racer-search-bar,.crew-search-bar,.garage-search-bar){margin:0 0 12px!important;padding:16px 20px!important;border:0!important;border-left:4px solid #7bcde1!important;background:#17323e!important;box-shadow:none!important}
html.ui-v2 #crews .crew-library-layout{display:block!important}
html.ui-v2 #crews .crew-library-layout>form{display:none!important}
html.ui-v2 #crews #crew-list{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:0!important;border-top:1px solid #355462}
html.ui-v2 #crews #crew-list>.crew-card{min-height:150px!important;border-left:1px solid #355462!important}
html.ui-v2 #crews #crew-list>.crew-card .crew-card-bio{max-width:520px;color:#a6bdc5}
html.ui-v2 #crews .crew-setup-dialog{background:#102630!important;border:1px solid #5c8b99!important;box-shadow:none!important}

/* Race entry screens put the working form beside the running record. */
html.ui-v2 #race.active{display:grid!important;grid-template-columns:minmax(310px,.82fr) minmax(0,1.18fr);grid-template-areas:'intro intro' 'form history';gap:0;align-items:start}
html.ui-v2 #race>.section-intro{grid-area:intro}
html.ui-v2 #race>#race-form{grid-area:form;min-width:0;margin:0;padding:24px!important;border:0!important;border-top:4px solid #82d3e6!important;background:#17323e!important}
html.ui-v2 #race #race-form h3{margin:0 0 18px;font:800 1.4rem Inter,sans-serif;font-style:normal;letter-spacing:.01em;text-shadow:none;text-transform:uppercase}
html.ui-v2 #race #race-form .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
html.ui-v2 #race .time-trial-history{grid-area:history;display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:0!important;margin:0!important;border-left:1px solid #3a5a64}
html.ui-v2 #race .time-trial-history>.panel{margin:0;padding:20px 22px!important;border:0!important;border-bottom:1px solid #3a5a64!important;background:#0e222d!important}
html.ui-v2 #race .time-trial-history .panel-head h2{font:800 1.8rem 'Barlow Condensed',Impact,sans-serif!important;font-style:italic;text-transform:uppercase}
html.ui-v2 #race .time-trial-row{margin:0!important;border:0!important;border-bottom:1px solid #355462!important;background:transparent!important;box-shadow:none!important}
html.ui-v2 #race .time-trial-row:hover{background:#193541!important}

/* Competition screens use one configuration band, then a running ledger. */
html.ui-v2 :is(#gauntlet,#battles) .battle-layout{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:0!important}
html.ui-v2 :is(#gauntlet,#battles) .battle-form{margin:0;padding:22px 24px!important;border:0!important;border-top:4px solid #82d3e6!important;background:#17323e!important}
html.ui-v2 :is(#gauntlet,#battles) .battle-form .form-title-row{padding-bottom:15px;border-bottom:1px solid #42636e}
html.ui-v2 :is(#gauntlet,#battles) .battle-form h3{font:800 1.4rem Inter,sans-serif!important;font-style:normal!important;letter-spacing:.01em;text-shadow:none!important;text-transform:uppercase}
html.ui-v2 :is(#gauntlet,#battles) .battle-list{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:0!important;margin:0!important;border-top:1px solid #42636e}
html.ui-v2 :is(#gauntlet,#battles) .battle-card{margin:0 0 10px!important;border:0!important;border-left:4px solid #527a87!important;border-bottom:1px solid #3a5a64!important;background:#0e222d!important}
html.ui-v2 :is(#gauntlet,#battles) .battle-card:hover{border-left-color:#8dd9e9!important}
html.ui-v2 #battles .battle-crew-filter{margin:0 0 12px;padding:14px 20px!important;border:0!important;border-left:4px solid #82d3e6!important;background:#17323e!important}
html.ui-v2 #battles .battle-crew-filter label{max-width:460px}
html.ui-v2 #battles .battle-bans-editor,html.ui-v2 #battles .round-history{background:#0b1d27!important}

/* Profiles keep personal artwork but become editorial identity pages. */
html.ui-v2 :is(#my-profile,#racer-profile)>.profile-page-title{margin-bottom:0!important}
html.ui-v2 .my-profile-hero,html.ui-v2 .crew-profile-hero,html.ui-v2 .racer-profile-hero{margin:0!important;border:0!important;background:#0c202a!important;box-shadow:none!important;backdrop-filter:none!important}
html.ui-v2 .my-profile-banner,html.ui-v2 .crew-profile-cover{height:180px!important;border:0!important}
html.ui-v2 .my-profile-main,html.ui-v2 .crew-profile-main{background:#0d222d!important;border-bottom:1px solid #3f6773!important}
html.ui-v2 .my-profile-main>img,html.ui-v2 .crew-profile-main>img{border:4px solid #0d222d!important;box-shadow:none!important}
html.ui-v2 .my-profile-identity h2,html.ui-v2 .crew-profile-identity h2{font-style:italic!important;text-shadow:none!important}
html.ui-v2 .my-profile-stats,html.ui-v2 .crew-profile-stats{background:#d6e6e9!important;border:0!important}
html.ui-v2 .my-profile-stats span,html.ui-v2 .crew-profile-stats span{border-color:#a8c1c8!important}
html.ui-v2 .my-profile-stats strong,html.ui-v2 .crew-profile-stats strong{color:#0b2833!important;font:800 2.15rem 'Barlow Condensed',Impact,sans-serif!important}
html.ui-v2 .my-profile-stats small,html.ui-v2 .crew-profile-stats small{color:#496972!important}
html.ui-v2 .my-profile-grid,html.ui-v2 .crew-profile-grid{gap:0!important;margin-top:14px!important}
html.ui-v2 .my-profile-side,html.ui-v2 .my-profile-primary,html.ui-v2 .crew-profile-grid>*{gap:0!important}
html.ui-v2 :is(.my-profile-grid,.crew-profile-grid) .panel,html.ui-v2 .crew-social-card{margin:0 0 10px!important;border:0!important;border-top:3px solid #79cfe5!important;background:#112934!important;box-shadow:none!important}
html.ui-v2 .profile-favorite-cars article,html.ui-v2 .profile-history-event{border-color:#3e6470!important;background:#0a202b!important;box-shadow:none!important}
html.ui-v2 .profile-history-event-head{background:#15333e!important}
html.ui-v2 .profile-history-event-head:hover{background:#1f4553!important}
html.ui-v2 .profile-street-art{box-shadow:none!important}

/* Streams, calendar and administration join the same V2 index language. */
html.ui-v2 #live-racers .live-racer-grid{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:0!important}
html.ui-v2 #live-racers .live-racer-card{display:grid!important;grid-template-columns:minmax(200px,34%) minmax(0,1fr) auto;grid-template-rows:auto!important;align-items:center;min-height:160px;margin:0 0 9px;border:0!important;border-bottom:1px solid #41636d!important;background:#102a35!important;box-shadow:none!important}
html.ui-v2 #live-racers .live-racer-thumb{height:100%;min-height:160px;aspect-ratio:auto!important}
html.ui-v2 #live-racers .live-racer-card>button{margin:15px!important;white-space:nowrap}
html.ui-v2 #events .event-card,html.ui-v2 #points .entity-card{margin:0!important;border:0!important;border-left:1px solid #355462!important;border-bottom:1px solid #355462!important;background:#0e222d!important;box-shadow:none!important}
html.ui-v2 #accounts .account-access-layout{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:0!important}
html.ui-v2 #accounts .account-access-layout>.panel{margin:0!important;border:0!important;border-top:4px solid #82d3e6!important;border-right:1px solid #3d626e!important;background:#102a35!important}
html.ui-v2 #accounts .account-row{border:0!important;border-bottom:1px solid #355462!important;background:#0b222e!important;box-shadow:none!important}
html.ui-v2 #accounts .admin-rosters-panel,html.ui-v2 #accounts .audit-panel{margin-top:14px!important;border:0!important;border-top:4px solid #82d3e6!important;background:#102a35!important}
html.ui-v2 #accounts .admin-roster-member{border-bottom:1px solid #355462!important}

/* Chat is anchored to the new full-width shell. */
html.ui-v2 .chat-dock{left:18px!important}
html.ui-v2 .chat-launchers button{border-color:#406c78!important;background:#0b2530!important;box-shadow:none!important}
html.ui-v2 .chat-launchers button.active{background:#174657!important}
html.ui-v2 .chat-popover{border-color:#507d8a!important;background:#0b202a!important;box-shadow:0 12px 28px rgba(0,0,0,.24)!important}
html.ui-v2 .social-head,html.ui-v2 .social-compose{background:#12303c!important}
html.ui-v2 .social-messages{background:#0c222d!important}
html.ui-v2 .social-message{border-color:#385f6c!important;box-shadow:none!important}
html.ui-v2 .social-row.own .social-message{background:#1a4a5a!important}

@media(max-width:1100px){
  html.ui-v2 #race.active{grid-template-columns:minmax(0,1fr);grid-template-areas:'intro' 'form' 'history'}
  html.ui-v2 #race .time-trial-history{border-left:0}
  html.ui-v2 #accounts .account-access-layout{grid-template-columns:minmax(0,1fr)!important}
  html.ui-v2 #live-racers .live-racer-card{grid-template-columns:minmax(170px,34%) minmax(0,1fr)}
  html.ui-v2 #live-racers .live-racer-card>button{grid-column:2;margin:0 15px 15px!important;justify-self:start}
}
@media(max-width:750px){
  html.ui-v2 main>.view:not(#overview)>.section-intro,html.ui-v2 main>.view:not(#overview)>.overview-hero.profile-page-title{min-height:150px;padding:23px 18px!important}
  html.ui-v2 main>.view:not(#overview)>.section-intro::before,html.ui-v2 main>.view:not(#overview)>.overview-hero.profile-page-title::before{right:12px;top:-14px;font-size:170px}
  html.ui-v2 main>.view:not(#overview)>.section-intro>.eyebrow{left:18px;top:19px}
  html.ui-v2 main>.view:not(#overview)>.section-intro h2,html.ui-v2 main>.view:not(#overview)>.overview-hero.profile-page-title h1{max-width:100%;font-size:clamp(2.75rem,12vw,4.5rem)!important}
  html.ui-v2 main>.view:not(#overview)>.overview-hero.profile-page-title h1{white-space:normal}
  html.ui-v2 :is(#racers,#tracks,#cars,#crews,#points,#events) .split{grid-template-columns:minmax(0,1fr)!important}
  html.ui-v2 #crews #crew-list{grid-template-columns:minmax(0,1fr)!important}
  html.ui-v2 :is(#racers,#tracks,#cars,#crews,#points) .entity-card{padding:16px!important;border-left:0!important}
  html.ui-v2 #race #race-form .form-grid{grid-template-columns:minmax(0,1fr)}
  html.ui-v2 #live-racers .live-racer-card{grid-template-columns:minmax(0,1fr);grid-template-rows:auto!important}
  html.ui-v2 #live-racers .live-racer-thumb{height:auto;min-height:0;aspect-ratio:16/9!important}
  html.ui-v2 #live-racers .live-racer-card>button{grid-column:1;margin:0 12px 12px!important}
  html.ui-v2 .chat-dock{left:0!important}
}
