/* Boot loader, landing, career page, and the in-session coach and mentor
   cards. Built from the parts in ui.css. */

/* ---------------------------------------------------------------- boot loader
   plain HTML/CSS so it paints before any script runs (public/index.html) */
/* left: the name, the lights, the bar and a tip; right: the out-lap drive
   (src/ui/lapDrive.js draws into #boot-drive; a faint outline stands in) */
#boot { position: fixed; inset: 0; z-index: 50; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); grid-template-rows: 1fr auto; column-gap: clamp(20px, 4vw, 56px); row-gap: 10px; padding: clamp(14px, 5vh, 44px) clamp(16px, 4vw, 48px) clamp(12px, 5vh, 44px); background: radial-gradient(ellipse at 30% 42%, #152033 0%, #06080c 64%); transition: opacity .6s ease; color: #eef1f6; font-family: Inter, system-ui, sans-serif; overflow: hidden; }
#boot::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: repeating-linear-gradient(90deg, #fff 0 10px, #111 10px 20px); opacity: 0.18; }
#boot.out { opacity: 0; pointer-events: none; }
#boot .bt-main { grid-column: 1; grid-row: 1; align-self: center; justify-self: start; display: grid; justify-items: start; gap: clamp(6px, 1.6vh, 14px); min-width: 0; }
#boot .bm { display: flex; align-items: baseline; gap: 0.14em; font: 800 italic clamp(40px, min(7.4vw, 15vh), 116px)/0.9 'Barlow Condensed', 'Bahnschrift SemiCondensed', 'Arial Narrow', Inter, sans-serif; letter-spacing: 0.02em; color: #fff; white-space: nowrap; }
#boot .bm i { font-style: italic; color: #ffcc00; font-size: 0.42em; letter-spacing: 0.2em; }
#boot .bt-kick { font: 700 14px 'Barlow Condensed', 'Bahnschrift SemiCondensed', 'Arial Narrow', Inter, sans-serif; letter-spacing: 0.4em; color: #8b93a3; text-transform: uppercase; }
#boot .bt-foot { grid-column: 1; grid-row: 2; justify-self: start; width: min(560px, 100%); display: grid; gap: clamp(6px, 1.6vh, 12px); min-width: 0; }
#boot .bt-drive { grid-column: 2; grid-row: 1 / 3; }
#boot .bt-row { display: flex; justify-content: space-between; font: 700 14px 'Barlow Condensed', 'Bahnschrift SemiCondensed', 'Arial Narrow', Inter, sans-serif; letter-spacing: 0.14em; text-transform: uppercase; color: #c3cad6;  align-items: center; gap: 16px; }
#boot .bt-row #boot-what { flex: 1; }
#boot .bt-row span:last-child { min-width: 3.2em; text-align: right;  font-family: 'JetBrains Mono', monospace; letter-spacing: 0; color: #8b93a3; }
#boot .bb { height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; overflow: hidden; }
#boot .bb i { display: block; height: 100%; width: 0; background: #ffcc00; box-shadow: 0 0 10px rgba(255,204,0,0.6); transition: width .35s ease; }
#boot .bt-tip { display: flex; gap: 12px; align-items: center; margin: 4px 0 0; min-height: 40px; color: #c3cad6; font-size: 14.5px; line-height: 1.4; transition: opacity .26s; }
#boot .bt-tip.swap { opacity: 0; }
#boot .bt-tip em { flex: none; font: 800 12px 'Barlow Condensed', 'Bahnschrift SemiCondensed', 'Arial Narrow', Inter, sans-serif; font-style: normal; letter-spacing: 0.16em; color: #111; background: #ffcc00; padding: 2px 8px; border-radius: 4px; }
#boot .bt-tip:empty { visibility: hidden; }
@media (max-width: 700px) {
  #boot { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(110px, 1fr) auto; }
  #boot .bt-main { justify-self: center; justify-items: center; }
  #boot .bt-drive { grid-column: 1; grid-row: 2; }
  #boot .bt-foot { grid-row: 3; justify-self: stretch; }
}
@media (max-height: 560px) { #boot .bt-tip { font-size: 13px; } }
@media (max-height: 460px) { #boot .bt-kick { font-size: 12px; letter-spacing: 0.3em; } #boot .bt-tip { min-height: 0; } }

/* ---------------------------------------------------------------- landing */
.screen.landing { background: linear-gradient(90deg, rgba(4,6,11,0.9) 0%, rgba(4,6,11,0.6) 32%, rgba(4,6,11,0) 62%), linear-gradient(0deg, rgba(4,6,11,0.75), rgba(4,6,11,0) 40%); }
.land-main { position: absolute; left: clamp(28px, 6vw, 96px); bottom: clamp(36px, 10vh, 110px); display: flex; flex-direction: column; gap: 14px; width: min(420px, calc(100vw - 56px)); animation: side-in .5s var(--ease) both; }
.wordmark { display: flex; flex-direction: column; align-items: flex-start; font: 800 italic clamp(72px, 9.5vw, 132px)/0.84 var(--f-display); letter-spacing: 0.01em; margin: 0; text-transform: uppercase; gap: 0; }
.wordmark i { font-style: italic; font-size: 0.3em; letter-spacing: 0.3em; color: var(--acc); margin: 10px 0 8px 6px; line-height: 1; }
.land-cta { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.land-cta .meta { color: var(--txt-2); font-size: 12.5px; margin: -2px 0 6px 2px; }
.land-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.land-cta .ghost { background: rgba(10,13,19,0.62); backdrop-filter: blur(8px); }
.land-cta .ghost:hover { background: rgba(24,29,38,0.8); }
/* Multiplayer + Online events: big, clear, not live yet (a "Coming soon" badge) */
.land-soon { display: grid; gap: 10px; margin-top: 4px; }
.soon-cta { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 12px 16px; text-align: left; color: var(--txt); background: rgba(10,13,19,0.72); backdrop-filter: blur(8px); border: 1.5px dashed rgba(255,204,0,0.55); border-radius: var(--r, 10px); cursor: not-allowed; font: inherit; }
.soon-cta:disabled { opacity: 1; }
.soon-cta .sc-ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; color: var(--acc); }
.soon-cta .sc-ic svg { width: 26px; height: 26px; }
.soon-cta .sc-t { display: grid; gap: 2px; min-width: 0; }
.soon-cta .sc-t b { font: 800 17px/1.1 var(--f-display); letter-spacing: 0.1em; text-transform: uppercase; }
.soon-cta .sc-t small { color: var(--txt-2); font-size: 12.5px; }
.soon-cta em { margin-left: auto; flex: none; font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #111; background: var(--acc); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
@media (max-width: 420px) { .soon-cta .sc-t small { display: none; } .soon-cta { gap: 10px; padding: 12px; } }
/* the two bigger buttons need room: the wordmark gives way on short screens */
@media (max-height: 820px) { .wordmark { font-size: min(clamp(72px, 9.5vw, 132px), 12.5vh); } }
@media (max-height: 640px) { .soon-cta { min-height: 48px; padding: 8px 14px; } .soon-cta .sc-t small { display: none; } }

/* ---------------------------------------------------------------- career page */
.wall .pg-head { gap: 14px; }
.who { display: flex; align-items: center; gap: 12px; }
.who .helm, .who .helm svg { width: 46px; height: 46px; flex: none; }
.who-t { flex: 1; min-width: 0; }
.who-t b { display: block; font: 800 24px/1.05 var(--f-display); text-transform: uppercase; letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-t small { color: var(--dim); font-size: 12.5px; display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.rate { text-align: center; padding: 5px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.rate b { display: block; font: 800 24px/1.1 var(--f-display); color: var(--acc); }
.rate small { font-size: 11px; letter-spacing: 0.16em; color: var(--dim); font-weight: 800; }
.card.next { border-color: var(--acc-line); background: linear-gradient(160deg, rgba(255,204,0,0.09), rgba(255,255,255,0.02) 60%); display: grid; gap: 10px; }
.card.next h2 { font-size: 32px; }
.card.next .primary { margin-top: 4px; width: 100%; }
.champ .bigstat { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 6px; }
.champ .bigstat b { font: 800 38px/1 var(--f-display); }
.champ .bigstat span { color: var(--dim); font-weight: 700; }
.champ .empty { margin-top: 10px; }
ol.mini { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
ol.mini li { display: grid; grid-template-columns: 22px 4px 1fr auto; gap: 10px; align-items: center; font-size: 13px; font-weight: 600; padding: 4px 8px; border-radius: 7px; }
ol.mini li em { font-style: normal; color: var(--dim); font-family: var(--mono); font-size: 12px; text-align: right; }
ol.mini li i { width: 4px; height: 14px; border-radius: 2px; }
ol.mini li b { font-family: var(--mono); }
ol.mini li.me { background: linear-gradient(90deg, rgba(255,204,0,0.2), rgba(255,204,0,0.06)); }
ol.mini li.me em { color: var(--acc); }
ol.mini li.gap { height: 6px; padding: 0; margin: 0 8px; background: radial-gradient(circle, rgba(255,255,255,0.35) 1.2px, transparent 1.6px) left center / 8px 6px repeat-x; }
.card.tabs .tabrow { margin-bottom: 12px; }
.tabbody { min-height: 84px; }
.tabbody .shelf { display: flex; flex-wrap: wrap; gap: 8px; }
.tabbody .tro { width: 52px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tabbody .tro svg { width: 32px; height: 32px; filter: drop-shadow(0 3px 8px rgba(0,0,0,0.5)); }
.tabbody .tro.title svg, .tabbody .tro.teamtitle svg { width: 42px; height: 42px; }
.tabbody .tro small { font-size: 11px; color: var(--dim); font-weight: 700; }
.tabbody .more { align-self: center; color: var(--dim); font-weight: 800; font-size: 13px; }

/* the level-up notice beside the panel */
.levelup { position: absolute; left: calc(var(--side-w) + 24px); top: calc(var(--bar-h) + 20px); z-index: 4; background: rgba(12,15,21,0.94); border: 1px solid var(--acc); border-radius: var(--radius); padding: 14px 18px; display: grid; gap: 4px; max-width: 340px; box-shadow: 0 16px 40px rgba(0,0,0,0.45); animation: side-in .4s var(--ease) both; }
.levelup b { font: 800 26px var(--f-display); text-transform: uppercase; }
.levelup span { color: var(--txt-2); font-size: 13px; }
.levelup button { justify-self: start; margin-top: 6px; }

@media (max-width: 900px) {
  .land-main { left: 16px; right: 16px; width: auto; }
  .levelup { left: 16px; right: 16px; top: auto; bottom: 16px; }
}

/* ---------------------------------------------------------------- in session: test-day coach */
.coach { position: absolute; left: 50%; bottom: 170px; transform: translate(-50%, 10px); opacity: 0; transition: opacity .35s, transform .35s; text-align: center; background: rgba(10,13,19,0.86); border: 1px solid var(--line); border-radius: 14px; padding: 12px 22px 10px; min-width: 320px; backdrop-filter: blur(8px); }
.coach.show { opacity: 1; transform: translate(-50%, 0); }
.coach.warn { border-color: var(--bad); }
.coach b { display: block; font-size: 17px; font-weight: 800; }
.coach b kbd { font-size: 13px; padding: 2px 8px; color: #111; background: var(--acc); margin: 0 2px; }
.coach small { display: block; color: #c3cad6; font-size: 12.5px; margin-top: 4px; }
.coach .dots { display: flex; justify-content: center; gap: 5px; margin-top: 9px; }
.coach .dots em { width: 18px; height: 3px; border-radius: 2px; background: rgba(255,255,255,0.15); }
.coach .dots em.done { background: var(--good); }
.coach .dots em.on { background: var(--acc); }
/* Ray Dunmore */
/* Ray talks from the top centre, under the lap boxes */
.mentor { position: absolute; left: 50%; transform: translate(-50%, -8px); opacity: 0; transition: opacity .3s, transform .3s; display: flex; gap: 14px; align-items: center; background: rgba(10,13,19,0.9); border: 1px solid var(--line); border-radius: 16px; padding: 10px 18px 10px 10px; width: min(600px, calc(100vw - 2 * (var(--lcol-w) + 2 * var(--g)))); min-width: 320px; top: 76px; backdrop-filter: blur(10px); }
.mentor.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 901px) { .hud .lights.on ~ .mentor { top: 142px; } }
.mentor { transition: opacity .3s, transform .3s, top .3s; }
@media (max-width: 900px) { .mentor { width: calc(100vw - 32px); top: auto; bottom: 170px; } }
.mentor.warn { border-color: var(--bad); }
.mentor img { width: 64px; height: 64px; border-radius: 12px; background: radial-gradient(circle at 50% 40%, #2a3342, #0e1118); flex: none; object-fit: cover; }
.mentor small { font-size: 11px; letter-spacing: 0.16em; color: var(--acc); font-weight: 800; }
.mentor b { display: block; font-size: 16px; font-weight: 700; line-height: 1.35; margin-top: 3px; }
.mentor b kbd { font-size: 12px; padding: 2px 7px; color: #111; background: var(--acc); }
.mentor span { display: block; color: #c3cad6; font-size: 12.5px; margin-top: 3px; }
.mentor.warn span { color: #ff8b8b; font-weight: 700; }
.mentor button { margin-top: 8px; padding: 7px 14px; font-size: 13px; }
.mentor button kbd { background: rgba(0,0,0,0.15); color: #111; }
.testrate { display: grid; grid-template-columns: auto auto 1fr; align-items: center; column-gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 7px 12px; backdrop-filter: blur(8px); }
.testrate small { grid-column: 1 / span 2; grid-row: 1; }
.testrate b { grid-column: 1; grid-row: 2; line-height: 1; }
.testrate em { grid-column: 2; grid-row: 2; }
.testrate span { grid-column: 3; grid-row: 1 / span 2; font-size: 11.5px; color: #c3cad6; line-height: 1.35; padding-left: 8px; border-left: 1px solid var(--line); margin-left: 6px; }
.testrate small { display: block; font-size: 11px; letter-spacing: 0.14em; color: var(--dim); font-weight: 800; }
.testrate b { font: 900 26px var(--mono); color: var(--acc); }
.testrate em { font-style: normal; color: var(--bad); font-weight: 900; margin-left: 6px; }
.testrate.hit { animation: hit .6s; }
@keyframes hit { 0% { transform: scale(1.18); border-color: var(--bad); } 100% { transform: scale(1); } }

/* ---------------------------------------------------------------- v0.9 menu still */
/* The landing and the other menus sit on a still of the game (rendered by the
   game itself, work/v09/landing-stills.mjs) whenever nothing 3D is drawing.
   A slow drift keeps it alive; it is one composited layer, no WebGL. */
:root { --landing-still: none; }   /* src/main.js picks one of three per visit and sets it before the boot paints it */
#backdrop { position: fixed; inset: -2%; background: #05070c var(--landing-still) center / cover no-repeat; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility 0s linear .6s; pointer-events: none; will-change: transform; }
body.bg-on #backdrop { opacity: 1; visibility: visible; transition: opacity .6s ease; animation: bg-drift 38s ease-in-out infinite alternate; }
@keyframes bg-drift { from { transform: scale(1.0) translate3d(0, 0, 0); } to { transform: scale(1.05) translate3d(-1.2%, -0.6%, 0); } }
@media (prefers-reduced-motion: reduce) { body.bg-on #backdrop { animation: none; } }
.bt-retry { margin: 10px 0 0; }
.bt-retry button { font: 800 15px/1 Inter, system-ui, sans-serif; padding: 11px 20px; border-radius: 10px; border: 0; background: #ffcc00; color: #0b0d12; cursor: pointer; }
/* round 10: the unlock card is a dialog: centred over a dimmed screen, never over a page's main button */
.unlock-modal { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; padding: 16px; background: rgba(4,6,11,0.62); }
.unlock-modal .levelup { position: static; left: auto; right: auto; top: auto; bottom: auto; max-width: min(380px, 100%); }
/* v0.9.15 career path: Ray's story card at a stage change (src/game/app.js showStory) */
.story-modal .mentor { position: static; transform: none; opacity: 1; width: min(560px, 100%); min-width: 0; }
.story-modal .mentor button { display: block; }
.land-next.high { color: var(--acc); }
.progress-card li.ok b { color: var(--good, #4ade80); }
.progress-card li.no b { color: var(--bad, #f87171); }
/* v0.9.27 a loading screen that runs long says so and offers Try again (src/game/app.js render) */
.loading-screen .ld-slow { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px; max-width: calc(100vw - 32px); padding: 10px 14px; border-radius: 12px; background: rgba(10, 13, 19, 0.92); border: 1px solid rgba(255, 204, 0, 0.45); text-align: center; }
.loading-screen .ld-slow b { font-size: 14px; } .loading-screen .ld-slow span { font-size: 12.5px; color: #c9cfda; }
.loading-screen .ld-slow button { padding: 7px 14px; font-size: 13px; }
/* v0.9.28 the waiting veil over a menu whose 3D is still loading (src/game/app.js showVeil) */
#wait-veil { position: fixed; inset: 0; z-index: 9000; pointer-events: auto; transition: opacity .3s; }
#wait-veil > .loading-screen { position: absolute; inset: 0; }
#wait-veil.out { opacity: 0; pointer-events: none; }
.mentor .mentor-ok kbd { margin-left: 6px; font-size: 11px; padding: 0 5px; background: rgba(0, 0, 0, 0.25); color: inherit; }
/* v0.9.28 the banner slot (src/game/app.js placeBanner): measured free space at the bottom, never over the UI */
.ad-banner { position: fixed; bottom: 8px; z-index: 30; display: flex; align-items: center; justify-content: center; overflow: hidden; pointer-events: auto; }
