/* The screen tour (src/ui/tour.js, v0.9.17): one HUD part at a time. The game greys out, the part keeps its own
   light inside a ring, and one card beside it says what it is. The card never covers its ring. */
.tour { position: absolute; inset: 0; z-index: 30; opacity: 0; transition: opacity .25s ease; }
.tour.on { opacity: 1; }
.tour-dim { position: absolute; inset: 0; display: block; }
.tour-dim .shade { fill: rgba(4, 6, 10, 0.74); }
.tour-dim .ring { fill: none; stroke: var(--acc); stroke-width: 2.5; animation: ringpulse 1.4s ease-in-out infinite; }
@keyframes ringpulse { 50% { stroke-opacity: 0.45; } }
.spot-card { position: absolute; width: min(320px, calc(100vw - 20px)); background: var(--panel-2); border: 1px solid var(--acc); border-radius: 14px; padding: 13px 16px 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5); animation: tourin .25s ease-out both; }
.spot-card small { display: block; font-size: 11px; letter-spacing: 0.16em; font-weight: 800; color: var(--acc); }
.spot-card > b { display: block; font-size: 18px; font-weight: 900; margin: 3px 0 4px; line-height: 1.2; }
.spot-card > span { display: block; font-size: 13.5px; font-weight: 600; color: #d4d9e2; line-height: 1.4; }
.spot-card .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.spot-card .dots { display: flex; gap: 5px; }
.spot-card .dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.2); }
.spot-card .dots i.on { width: 16px; background: var(--acc); }
.spot-card .btns { display: flex; gap: 8px; align-items: center; }
.spot-card button { padding: 7px 14px; font-size: 13px; }
.spot-card button.skip { background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; color: var(--txt); font-weight: 700; cursor: pointer; }
.spot-card button.skip:hover { color: var(--txt); }
.spot-card button kbd { background: rgba(0, 0, 0, 0.15); color: #111; margin-left: 4px; }
@keyframes tourin { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
/* the tutorial sessions show a rookie's screen: no car status, weather or radar yet (src/ui/hud.js) */
.hud.no-status .status, .hud.no-radar .radar { display: none; }
/* v0.9.24 a panel not unlocked yet keeps its place: dimmed, with a lock (the weather in the tutorial) */
.hud .hud-wx.locked { opacity: 0.55; filter: grayscale(1); }
.hud .hud-wx.locked .ic.lk { display: grid; place-items: center; color: var(--dim); }
.hud .hud-wx.locked .ic.lk svg { width: 20px; height: 20px; }
.hud .hud-wx.locked small { color: var(--dim); }
/* the main menu tour (src/ui/hubTour.js menuTour): the grey layer lets every click through to the menu */
.mtour { position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: 0; transition: opacity .25s ease; }
.mtour.on { opacity: 1; }
.mtour .spot-card { pointer-events: auto; }
/* a lesson before a race (src/game/lessons.js): Ray's card in the middle of the dimmed screen */
.spot-card.lesson { width: min(460px, calc(100vw - 20px)); display: flex; gap: 14px; align-items: flex-start; padding: 15px 18px 13px; }
.spot-card.lesson > img { width: 58px; height: 58px; border-radius: 12px; flex: none; object-fit: cover; background: rgba(255, 255, 255, 0.06); }
.spot-card.lesson > div { flex: 1; min-width: 0; }
.spot-card.lesson b { display: block; font-size: 19px; font-weight: 900; margin: 3px 0 5px; line-height: 1.2; }
.spot-card.lesson span { display: block; font-size: 14px; font-weight: 600; color: #d4d9e2; line-height: 1.45; }
.spot-card.lesson span kbd { margin: 0 1px; }

/* while a tour step or a lesson is up, Ray's running card steps aside (one voice at a time) */
.hud.touring .mentor { opacity: 0; transition: opacity .15s; }

/* v0.9.18 (CrazyGames QA: no timer on any tutorial): a step stays until Next / Enter, Skip, or W; nothing is frozen,
   the dim is light and lets clicks through */
.tour { pointer-events: none; }
.tour .spot-card { pointer-events: auto; overflow: hidden; }
.tour-dim .shade { fill: rgba(4, 6, 10, 0.5); }

/* v0.9.18 Skip tutorial (CrazyGames QA round 4): a quiet button on the tutorial grids, and a big, bold warning first */
.skiptut { position: absolute; top: 74px; right: var(--g, 16px); z-index: 40; padding: 7px 14px; font-size: 13px; font-weight: 800; color: var(--txt); background: rgba(10, 14, 22, 0.72); border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 999px; cursor: pointer; backdrop-filter: blur(6px); }
.skiptut:hover { border-color: var(--acc); }
.skip-modal { z-index: 80; }
.skip-card { width: min(560px, calc(100vw - 32px)); background: var(--panel-2); border: 2px solid #f59e0b; border-radius: 18px; padding: 24px 26px 20px; box-shadow: 0 18px 48px rgba(0, 0, 0, 0.6); animation: tourin .2s ease-out both; }
.skip-card small { display: block; font-size: 12px; letter-spacing: 0.18em; font-weight: 900; color: #f59e0b; }
.skip-card .skip-warn { display: block; font-size: clamp(24px, 3.4vw, 32px); font-weight: 900; line-height: 1.15; margin: 8px 0 10px; }
.skip-card .skip-big { font-size: 18px; font-weight: 800; line-height: 1.4; margin: 0 0 8px; color: #fde68a; }
.skip-card .skip-sub { font-size: 15px; font-weight: 600; color: var(--dim); margin: 0 0 18px; }
.skip-card .row, .scout-lock .row { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* v0.9.21 (CrazyGames QA round 6: "Skip Tutorial cannot be pressed"): the HUD layer ignores the pointer, so every button
   and card on it must take clicks itself */
.hud button, .hud .skiptut, .hud .qdone, .hud .mentor button, .hud .gpanel, .hud [data-g], .hud [data-q] { pointer-events: auto; }

/* v0.9.22 Ray's card: a line stays until its moment passes or Got it (no timers); a hidden card takes no clicks */
.mentor > div { min-width: 0; }
.mentor .mentor-ok { margin-top: 8px; padding: 5px 14px; font-size: 12px; font-weight: 800; border-radius: 999px; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line); color: var(--txt, #e9ecf1); cursor: pointer; }
.mentor .mentor-ok:hover { background: var(--acc); color: #111; border-color: var(--acc); }
.hud .mentor:not(.show), .hud .mentor:not(.show) button { pointer-events: none; }
/* the tutorial's end: what comes back, and when */
.card.tut-next { display: grid; gap: 4px; border-color: var(--acc-line, rgba(255, 204, 0, 0.4)); }
.card.tut-next small { color: var(--acc); letter-spacing: 0.16em; font-weight: 800; font-size: 11px; }
.card.tut-next b { font-size: 17px; }
.card.tut-next span { color: var(--txt-2); line-height: 1.45; }

/* v0.9.23 the scout result: slower than the field reads red */
.card.laps b.bad { color: var(--bad, #ef4444); }

/* v0.9.24 (CrazyGames QA round 9, Chromebook window: "the tutorial panel covers almost the entire screen"): Ray's
   card keeps its size between the side columns at every window size (the HUD scales as one, src/ui/hud.js fit),
   and stays at the top: the old phone rule (full width, at the bottom) is not used in the race */
.hud .mentor { width: min(600px, calc(100% - 2 * (var(--lcol-w) + 2 * var(--g)))); min-width: 280px; }
@media (max-width: 900px) { .hud .mentor { top: 76px; bottom: auto; } }

/* v0.9.24 Skip tutorial sits in the right column, under the weather and Settings (it used to float over them) */
.hud .rcol > .skiptut { position: static; align-self: flex-end; }
/* v0.9.27 (QA hunt): the pause menu has its own Skip tutorial; the pill never sits on top of it */
body:has(#pause) .hud .skiptut { visibility: hidden; }
