/* The showroom and course boards use the original miniature scenes as their surrounds. */
body[data-screen='drivers'] #backdrop {
  background: #405968 url('../assets/ui/driver-paddock.webp') center 48% / cover;
}
body[data-screen='courses'] #backdrop {
  background: #294660;
}
.course-scenery {
  position:absolute; inset:0;
  width:100%; height:100%; object-fit:cover; object-position:center 45%;
  opacity:0; transition:opacity .23s ease-out;
}
.course-scenery.on-air {
  opacity:1;
}
body:is([data-screen='drivers'], [data-screen='courses']) #backdrop:after {
  background:
    linear-gradient(90deg, #102337b8, #1931484a 60%, #17293a42),
    linear-gradient(0deg, #0a1e30dd, #12233542 39%, transparent 72%, #142d4555);
}
body:is([data-screen='drivers'], [data-screen='courses']) #top {
  color: white;
  text-shadow: 0 2px 3px #092440;
}
body:is([data-screen='drivers'], [data-screen='courses']) .icon-button {
  color: white;
  background: #132d46be;
  border-color: #ffffef9c;
}
body:is([data-screen='drivers'], [data-screen='courses']) .wordmark {
  filter: drop-shadow(0 2px 0 #122936);
}
.selection {
  padding: 0 max(var(--rail), env(safe-area-inset-right)) max(18px, 5.8vh, env(safe-area-inset-bottom)) max(var(--rail), env(safe-area-inset-left));
}
.selection .select-wrap { width: min(100%, 1380px); }
.selection .select-head {
  display: grid;
  justify-content: start;
  justify-items: start;
  gap: 8px;
  margin-bottom: clamp(14px, 3vh, 32px);
}
.selection .select-head h2 {
  color: #fff9e6;
  font-size: clamp(39px, 5.45vw, 96px);
  line-height: 1;
  text-shadow: 0 3px 0 #15304b, 0 6px 0 #10203c, 0 8px 10px #0c254fa6;
}
.selection .select-head em { color: #ffda43; font: inherit; }
.selection .player-tag {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  margin: 0;
  padding: 4px 12px 5px;
  color: #fff9e6;
  background: #122a3be8;
  border-left: 4px solid #6ce7dd;
  border-radius: 2px 9px 2px 2px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font: 700 clamp(12px,1.15vw,17px)/1 Barlow,sans-serif;
}
.selection .player-tag svg { width: 16px; height: 16px; }
.selection .back {
  background: #132a40dc;
  color: #fff9e7;
  border: 1px solid #eaf9f0a8;
  border-radius: 8px;
  box-shadow: 0 3px #112337a6;
}
.selection .back:hover { background: #23566a; }
.selection .grid {
  position: relative;
  gap: clamp(8px,1.3vw,22px);
  isolation: isolate;
}
.selection .choice {
  --edge: #16354d;
  border: 3px solid var(--edge);
  border-radius: 15px;
  box-shadow: inset 0 0 0 1px #ffffff75, 0 5px 0 #101e32, 0 10px 16px #08182754;
  color: #fff9e9;
  background: var(--plate);
  overflow: hidden;
  min-width: 0;
  transition: transform .17s;
}
.selection .choice:hover { border-color: #f9f2d8; transform: translateY(-2px); }
.selection .choice.selected,
.selection .choice.selected:hover {
  border-color: #ffe04e;
  outline: 2px solid #263040;
  outline-offset: 0;
  box-shadow: inset 0 0 0 1px #ffffe8, 0 5px 0 #a96718, 0 9px 0 -2px #16243a, 0 12px 20px #0f182c6e;
}
.selection .choice:focus-visible {
  outline: 3px solid white;
  outline-offset: 3px;
}
.selection .choice.selected:focus-visible {
  outline: 2px solid #fff9dc;
  outline-offset: 3px;
}
.selection .choice.selected:after { display: none; }
.selection .choice:disabled { opacity: .66; }
.choice[data-driver='axolotl'] { --stage-top:#e6ffed; --stage:#58dbbf; --stage-bottom:#138492; --plate:#075d65; --deep:#073646; --trim:#8ff9d0; }
.choice[data-driver='pigeon'] { --stage-top:#fff2af; --stage:#ffc85d; --stage-bottom:#db762a; --plate:#9b4819; --deep:#5e291a; --trim:#ffe380; }
.choice[data-driver='robot'] { --stage-top:#e8e5ff; --stage:#ac97ef; --stage-bottom:#725bb8; --plate:#514498; --deep:#303060; --trim:#c7b9ff; }
.choice[data-driver='cactus'] { --stage-top:#f4ffbc; --stage:#abd461; --stage-bottom:#589b46; --plate:#416b37; --deep:#20473c; --trim:#dcff78; }
.choice[data-course='ribbon'] { --plate:#aa374c; --deep:#602239; --trim:#ffa78c; }
.choice[data-course='bubble'] { --plate:#087b88; --deep:#084756; --trim:#8df5ee; }
.choice[data-course='clock'] { --plate:#97511f; --deep:#5e3425; --trim:#ffdb7e; }
.selection .portrait {
  position: relative;
  width: 100%;
  height: clamp(128px, 18.9vw, 306px);
  max-height: 32vh;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 49% 91%, var(--stage-top) 0%, transparent 52%),
    linear-gradient(138deg, var(--stage-top), var(--stage) 53%, var(--stage-bottom));
}
.selection .portrait::before {
  position:absolute; inset:0; content:'';
  background: radial-gradient(circle, #fff 1.3px, transparent 1.65px) 0 0 / 9px 9px;
  opacity:.35;
  mask-image: linear-gradient(155deg, #000, transparent 49%, transparent 80%, #000);
}
.selection .portrait::after {
  content: '';
  position:absolute; inset:0; pointer-events:none;
  background:
    linear-gradient(119deg, transparent 65%, #fff2 65.2% 69%, transparent 69.2% 71%, #fff2 71.2% 72.5%, transparent 72.7%);
  box-shadow: inset 0 2px 1px #ffffff77;
}
.selection .portrait img { position: relative; z-index:1; width:95%; height:97%; }
.selection .choice-tab {
  position:absolute; left:0; top:0; z-index:2;
  display:none;
  align-items:center; gap:4px;
  padding:5px 15px 6px 8px;
  color:#132e3d; background:#ffe04e;
  clip-path:polygon(0 0,100% 0,calc(100% - 10px) 100%,0 100%);
  font:700 clamp(12px,1.15vw,18px)/1 Barlow,sans-serif;
}
.selection .choice.selected .choice-tab, .selection .choice:disabled .choice-tab { display:inline-flex; }
.selection .choice:disabled .choice-tab { color:#fff; background:#273847; }
.selection .choice-info {
  width:100%; min-width:0; flex:1; position:relative;
  display:flex; flex-direction:column; justify-content:center;
  padding:clamp(10px,1.4vw,21px) clamp(12px,1.5vw,24px);
  background: linear-gradient(120deg, var(--plate) 45%, var(--deep));
  border-top: 3px solid var(--trim);
  box-shadow: inset 0 1px 0 #fff6;
}
.selection .choice-info:before {
  content:''; position:absolute; width:32%; top:0; right:0; bottom:0; pointer-events:none;
  background: repeating-conic-gradient(#fff 0 25%,transparent 0 50%) 0 0 / 17px 17px;
  opacity:.09;
  mask-image:linear-gradient(90deg,transparent,#000);
}
.selection .choice-info b {
  position:relative; color:#fffbe9; line-height:1;
  font-size:clamp(27px,3.6vw,60px);
  text-shadow: 0 2px 0 var(--deep);
}
.selection .choice-info small {
  color:#fff8e5; margin-top:5px; font:700 clamp(13px,1.25vw,20px)/1.1 Barlow,sans-serif;
}
.selection .course-window {
  width:100%; position:relative; display:block; overflow:hidden;
  aspect-ratio:16 / 9; background:#294758;
}
.course-window video {
  display:block; width:100%; height:100%; object-fit:cover;
}
.selection .circuits .choice-info {
  padding-right:clamp(48px,6vw,99px); min-height:clamp(74px,6.8vw,114px);
}
.selection .circuits .choice-info b { font-size:clamp(23px,2.65vw,47px); }
.course-map {
  position:absolute; right:2.5%; top:15%; height:70%; width:19%;
  object-fit:contain;
}
.selection .selection-foot {
  margin-top:clamp(17px,3.5vh,38px);
  min-height:57px;
  gap:18px;
}
.selection-detail {
  display:flex; align-items:center; gap:12px;
  min-width:0; padding:9px 18px 10px 12px;
  color:#fff9e6; border-left:4px solid #65e1d1;
  background:linear-gradient(105deg, #112d41ee 68%, #183a4ee0);
  box-shadow:0 3px 0 #0a203554; border-radius:2px 9px 9px 2px;
}
.selection-detail > svg { width:29px; height:29px; flex-shrink:0; color:#93ece0; }
.selection .selection-note { max-width:none; font:500 clamp(12px,1vw,16px)/1.3 DM,sans-serif; color:#f5fbff; }
.selection-note strong { display:block; font:700 clamp(16px,1.4vw,22px)/1.1 Barlow,sans-serif; margin-bottom:3px; }
.selection-note strong span { color:#bcdedc; }
.selection .cta {
  flex-shrink:0; border:2px solid #473513; border-radius:8px;
  background:linear-gradient(#ffe45b,#ffc735);
  box-shadow:inset 0 2px 0 #fff29b,0 4px 0 #a4651d,0 6px 0 #17243a;
  min-height:50px; padding:10px clamp(18px,2vw,32px);
  text-transform:uppercase; letter-spacing:.012em;
  font:italic 900 clamp(16px,1.55vw,25px)/1 Race,sans-serif;
}
.selection .cta svg { width:20px; height:20px; stroke-width:2.8; }
@media (max-height:550px) and (orientation:landscape) {
  .selection { padding-bottom:max(8px, env(safe-area-inset-bottom)); }
  .selection .select-head { margin-bottom:9px; align-items:center; gap:4px 14px; }
  .selection .select-head .player-tag { grid-column:1; }
  .selection .select-head h2 { grid-column:2; grid-row:1 / 3; }
  .selection .select-head h2 { font-size:clamp(27px,7.5vh,41px); text-shadow:0 2px #10203c,0 3px 4px #10203c; }
  .selection .player-tag { margin:0; font-size:11px; }
  .selection .player-tag svg { width:12px; height:12px; }
  .selection .back { padding:4px 9px; font-size:15px; }
  .selection .portrait { height:clamp(65px,31vh,160px); max-height:none; }
  .selection .choice { border-width:2px; border-radius:10px; }
  .selection .choice-info { padding:6px 10px 7px; border-top-width:2px; }
  .selection .choice-info b { font-size:clamp(20px,6.5vh,30px); }
  .selection .choice-info small { font-size:13px; margin-top:2px; }
  .selection .choice-tab { padding:3px 10px 3px 4px; font-size:11px; }
  .selection .course-window { height:clamp(65px,31vh,150px); aspect-ratio:auto; }
  .course-window video { object-position:50% 85%; }
  .selection .circuits .choice-info { min-height:clamp(35px,12vh,56px); padding-right:18%; }
  .selection .circuits .choice-info b { font-size:clamp(17px,4.9vh,25px); }
  .selection .selection-foot { margin-top:10px; min-height:0; }
  .selection-detail { gap:7px; padding:5px 10px; }
  .selection-detail > svg { width:19px; height:19px; }
  .selection .selection-note { font-size:11px; }
  .selection-note strong { font-size:14px; margin-bottom:1px; }
  .selection .cta { min-height:34px; font-size:14px; padding:6px 13px; }
}
@media (max-width:650px) and (orientation:portrait) {
  .selection { padding-bottom:16px; }
  .selection .select-head { margin:6px 0 13px; align-items:center; }
  .selection .select-head h2 { font-size:clamp(30px,8vw,49px); }
  .selection .player-tag { font-size:11px; }
  .selection .back { font-size:14px; padding:6px; }
  .selection .choice { border-radius:10px; border-width:2px; }
  .selection .portrait { height:clamp(96px,17vh,155px); }
  .selection .choice-info { padding:7px 10px; }
  .selection .choice-info b { font-size:26px; }
  .selection .choice-info small { margin-top:3px; font-size:13px; }
  .selection .grid.circuits { gap:9px; }
  .selection .circuits .choice { align-items:stretch; }
  .selection .course-window { width:47%; flex-shrink:0; aspect-ratio:1.65; }
  .selection .circuits .choice-info { border-top:0; border-left:3px solid var(--trim); min-height:0; padding:8px 10px; }
  .selection .circuits .choice-info b { font-size:clamp(18px,5.5vw,28px); }
  .selection .course-map { position:static; width:42px; height:28px; margin-top:3px; }
  .selection .selection-foot { align-items:stretch; flex-direction:column; gap:10px; }
  .selection .cta { align-self:stretch; min-height:40px; }
}
@media (prefers-reduced-motion: reduce) {
  .selection .select-wrap { animation:none; }
  .selection .choice, .selection .cta, .course-scenery { transition:none; }
}
