/* The in-game HUD over the 3D view: clock and money, timer, wanted stars, speedometer, minimap,
   prompts, tooltips, hints, toasts, touch controls, the showroom overlay and scanner banner.
   The phone-and-tablet layout is in touch.css, Career's screens in career.css, the main menu in menu.css.
   The look is the Sticker Street kit's (css/kit/, --gd-* tokens): white stickers with an ink
   outline and a hard shadow over the world, flat brand colors, Fredoka. */
button { touch-action: manipulation; }
button { font-family: inherit; cursor: pointer; }
/* the GRUB DASH logo: mustard and red, an ink outline and a hard shadow, tilted */
.logo { display: flex; flex-direction: column; align-items: flex-start; font: 700 64px/.85 var(--gd-font); text-transform: uppercase; letter-spacing: .02em; color: var(--gd-mustard); -webkit-text-stroke: 3px var(--gd-ink); paint-order: stroke fill; text-shadow: 4px 4px 0 var(--gd-ink); transform: rotate(-4deg); }
.logo span:last-child { color: var(--gd-red); margin-left: .55em; }
/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#hud > * { pointer-events: none; }
.pill { display: inline-flex; align-items: center; gap: 7px; background: #fff; color: var(--gd-ink); border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r-md); padding: 6px 14px; font: 700 19px/1.1 var(--gd-font); font-variant-numeric: tabular-nums; white-space: nowrap; box-shadow: var(--gd-sh) var(--gd-sh) 0 var(--gd-ink); }
#topLeft { position: absolute; left: 14px; top: 14px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.clock { display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.clock .ico { font-size: 18px; }
.clock.night { background: var(--gd-navy); color: #dfe6ff; }
.pill.money { background: var(--gd-green); }
.pill.money.neg { background: #ffd9d2; color: var(--gd-ketchup); }
/* Career's journal (career/journal.js): under the clock and money on a computer, one thing to do at a time, crossed off when it's done */
#journal { background: #fff3c4; color: var(--gd-ink); border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r-md); padding: 10px 12px; max-width: 290px; box-shadow: var(--gd-sh) var(--gd-sh) 0 var(--gd-ink); transform: rotate(-1deg); }
#journal .jHead { display: block; font: 700 12px/1 var(--gd-font); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 8px; }
#journal .jItem { display: flex; gap: 8px; align-items: flex-start; font: 600 13.5px/1.3 var(--gd-font); animation: jIn .35s ease-out; }
#journal .jBox { flex: none; width: 20px; height: 20px; margin-top: 0; background: #fff; border: 2px solid var(--gd-ink); border-radius: 5px; display: grid; place-items: center; }
#journal .jBox .gl { width: 14px; height: 14px; }
#journal .jMore { display: block; font: 600 12px/1.3 var(--gd-font); color: var(--gd-mute); margin-top: 6px; }
#journal .jMore:empty { display: none; }
#journal .jMore b { color: var(--gd-green-dk); }
#journal .jItem.done { animation: none; }
#journal .jItem.done span { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--gd-mute); }
#journal .jItem.done .jBox { background: var(--gd-green); color: var(--gd-ink); box-shadow: 2px 2px 0 var(--gd-ink); animation: jPop .35s ease-out; }
@keyframes jIn { from { opacity: 0; transform: translateX(-8px); } }
@keyframes jPop { 40% { transform: scale(1.35); } }
body.touch #journal, body.showroom #journal { display: none !important; } /* (a computer's, for now) */
/* wanted: an ink bar with five star stickers (hud.js setWanted) */
#wanted { background: var(--gd-ink); color: #fff; border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r); padding: 5px 12px; display: flex; align-items: center; gap: 2px; box-shadow: var(--gd-sh-sm) var(--gd-sh-sm) 0 rgba(0, 0, 0, .35); }
#wanted .lbl { font: 700 11px/1 var(--gd-font); letter-spacing: .14em; margin-right: 6px; color: #fff; }
#wanted .star { display: block; }
#wanted .star path { stroke: #b37a00; }
#wanted .star:not(.on) path { stroke: #fff; fill: transparent; }
#wanted.chase { animation: gd-copring .5s steps(1) infinite; }
/* the order's timer: a big number on a tilted mustard plate */
#timer { position: absolute; top: 12px; left: 50%; transform: translateX(-50%) rotate(-2deg); background: var(--gd-mustard); color: var(--gd-ink); border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r-md); padding: 3px 20px 6px; text-align: center; box-shadow: var(--gd-sh) var(--gd-sh) 0 var(--gd-ink); min-width: 130px; }
#timer small { display: block; font: 700 11px/1.3 var(--gd-font); letter-spacing: .16em; text-transform: uppercase; color: var(--gd-ketchup); }
#timer b { font: 700 38px/1 var(--gd-font); font-variant-numeric: tabular-nums; }
#timer.warn { animation: timerWiggle .5s ease-in-out infinite; }
@keyframes timerWiggle { 0%, 100% { transform: translateX(-50%) rotate(-2deg); } 50% { transform: translateX(-50%) rotate(2deg); } }
#timer.late { background: var(--gd-red); color: #fff; animation: pulse 1s infinite; }
#timer.late small { color: var(--gd-mustard); }
#objective { position: absolute; top: 92px; left: 50%; transform: translateX(-50%); background: #fff; color: var(--gd-ink); border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r); padding: 8px 14px; font: 600 15px/1.3 var(--gd-font); max-width: min(560px, 80vw); text-align: center; box-shadow: var(--gd-sh-sm) var(--gd-sh-sm) 0 var(--gd-ink); }
#objective b { color: var(--gd-ketchup); text-decoration: underline 3px var(--gd-mustard); text-underline-offset: 2px; }
#timer.hidden + #objective { top: 64px; }
@media (min-width: 1100px) {
  #timer.hidden + #objective { top: 14px; }
}
/* notification banners (ui/notes.js): a stack of up to three, the newest first, sliding in from the top */
/* (--notesTop, on a computer: just under whatever's at the top in its way, ui/notes.js placeBanners()) */
#notify { position: absolute; top: var(--notesTop, 12px); left: 50%; transform: translate(-50%, calc(-100% - 40px - var(--notesTop, 12px))); width: min(420px, 92vw); display: flex; flex-direction: column; gap: 10px; transition: transform .35s cubic-bezier(.2,1.4,.4,1), top .25s ease-out; }
#notify.show { transform: translate(-50%, 0); z-index: 3; }
#notify .nItem { background: #fff; color: var(--gd-ink); border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r-lg); padding: 10px 12px; display: flex; gap: 11px; align-items: center; box-shadow: var(--gd-sh) var(--gd-sh) 0 var(--gd-ink); pointer-events: auto; cursor: pointer; animation: nIn .3s ease-out; transition: opacity .3s, transform .3s; font: 500 13px/1.3 var(--gd-font); }
#notify .nItem.out { opacity: 0; transform: scale(.94); pointer-events: none; }
@keyframes nIn { from { opacity: 0; transform: translateY(-10px); } }
#notify .nIc { width: 44px; height: 44px; border-radius: 13px; flex: none; box-shadow: 2px 2px 0 var(--gd-ink); }
#notify .nIc img { width: 86%; height: 86%; }
#notify .nIc img[src^="data:image/svg+xml"] { width: 64%; height: 64%; }
#notify .nIc.logo img { width: 100%; height: 100%; }
#notify .nItem > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#notify .nItem > div > b { font-size: 14px; }
#notify .nItem > div > span { font-size: 13px; color: #4a4f5c; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* BUSTED / CAUGHT: a bar filling from cop blue to cop red */
#bustBar { position: absolute; top: 150px; left: 50%; transform: translateX(-50%); width: 240px; height: 26px; background: #fff; border-radius: 13px; overflow: hidden; border: var(--gd-line) solid var(--gd-ink); box-shadow: var(--gd-sh-sm) var(--gd-sh-sm) 0 var(--gd-ink); }
#bustBar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, var(--gd-cop-blue), var(--gd-cop-red)); border-right: 2px solid var(--gd-ink); }
#bustBar span { position: relative; display: block; text-align: center; font: 700 13px/21px var(--gd-font); letter-spacing: .2em; color: #fff; -webkit-text-stroke: 2.5px var(--gd-ink); paint-order: stroke fill; }
#toast { position: absolute; top: 150px; right: 14px; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; max-width: min(360px, 70vw); }
/* toasts: a white sticker at the side */
.toastItem { background: #fff; color: var(--gd-ink); border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r-md); padding: 9px 12px; font: 600 13.5px/1.3 var(--gd-font); box-shadow: var(--gd-sh) var(--gd-sh) 0 var(--gd-ink); animation: toastIn .3s ease-out; transition: opacity .4s, transform .4s; }
.toastItem.out { opacity: 0; transform: translateX(30px); }
.toastItem.bump { animation: gd-popin .3s; } /* (the same words again: that one stays up, with a nudge) */
#bigmsg { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%) scale(.6); opacity: 0; text-align: center; transition: all .3s cubic-bezier(.2,1.5,.4,1); }
#bigmsg.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
/* the big words: mustard (green, orange, red...) with an ink outline and a hard shadow, tilted */
#bigmsg h1 { position: relative; isolation: isolate; margin: 0; font: 700 clamp(40px, 9vw, 84px)/1 var(--gd-font); text-transform: uppercase; letter-spacing: .03em; color: var(--gd-mustard); transform: rotate(-3deg); }
/* The outline and drop shadow are a copy of the words behind them (hud.js big()). Drawn on the letters
   themselves, each letter's outline cut into the one before, and traced where the font's shapes overlap
   inside a letter (like the leg of an R). */
#bigmsg h1 .ol { position: absolute; left: 0; top: 0; width: 100%; z-index: -1; color: var(--gd-ink); -webkit-text-stroke: 7px var(--gd-ink); text-shadow: 5px 5px 0 var(--gd-ink); }
#bigmsg p { margin: 10px 0 0; font: 600 16px/1.3 var(--gd-font); background: #fff; color: var(--gd-ink); border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r); box-shadow: var(--gd-sh-sm) var(--gd-sh-sm) 0 var(--gd-ink); padding: 6px 14px; display: inline-block; }
#bigmsg.good h1 { color: var(--gd-green); }
/* the delivery's receipt under DELIVERED! (orders/delivery.js): the stars (missed ones
   in outline), a dashed line, each line's words on the left and its money on the
   far right (a tip's bonus or penalty just before it), a dashed line, the total.
   A paper slip with a zigzag bottom edge. */
#bigmsg .receipt { display: inline-grid; grid-template-columns: auto 1fr auto; column-gap: 10px; row-gap: 5px; align-items: baseline; min-width: min(270px, 84vw); margin-top: 12px; background: #fff; color: var(--gd-ink); border: var(--gd-line) solid var(--gd-ink); padding: 10px 16px 20px; text-align: left; font: 600 clamp(14px, 2vw, 17px)/1.3 var(--gd-font); box-shadow: var(--gd-sh) var(--gd-sh) 0 rgba(0, 0, 0, .3);
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 9px) no-repeat, conic-gradient(from -45deg at bottom, transparent, #000 1deg 89deg, transparent 90deg) bottom / 16px 9px repeat-x;
          mask: linear-gradient(#000 0 0) top / 100% calc(100% - 9px) no-repeat, conic-gradient(from -45deg at bottom, transparent, #000 1deg 89deg, transparent 90deg) bottom / 16px 9px repeat-x; }
#bigmsg .rcStars { grid-column: 1 / -1; display: flex; justify-content: center; gap: 4px; }
#bigmsg .rcStar { width: 1.45em; height: 1.45em; fill: #fff; stroke: var(--gd-ink); stroke-width: 1.8; stroke-linejoin: round; }
#bigmsg .rcStar.on { fill: var(--gd-gold); }
#bigmsg .rcLine { grid-column: 1 / -1; border-top: 2px dashed rgba(27, 29, 36, .25); margin: 3px 0; }
#bigmsg .rcRow { display: contents; }
#bigmsg .rcRow span { color: var(--gd-mute); font-size: .85em; font-weight: 600; }
#bigmsg .rcRow em { font-style: normal; font-size: .78em; color: var(--gd-mute); text-align: right; }
#bigmsg .rcRow b { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
#bigmsg .rcRow b.plus { color: var(--gd-green-dk); }
#bigmsg .rcRow b.minus { color: var(--gd-ketchup); }
#bigmsg .rcTotal span { color: var(--gd-ink); font-size: .95em; font-weight: 700; }
#bigmsg .rcTotal b { font-size: 1.15em; }
#bigmsg .rcLine + .rcTotal, #bigmsg .rcTotal { border-top: 0; }
#bigmsg.late h1 { color: #ffb14a; }
#bigmsg.busted h1, #bigmsg.cop h1 { color: var(--gd-red); }
#bigmsg.cop h1 { animation: copText .4s steps(2) infinite; }
#bottomLeft { position: absolute; left: 14px; bottom: 14px; display: flex; align-items: flex-end; gap: 12px; }
#minimap { width: 190px; height: 190px; border-radius: 22px; border: 3px solid var(--gd-ink); box-shadow: var(--gd-sh) var(--gd-sh) 0 var(--gd-ink); background: #6aa84f; }
/* the speedometer: the posted limit (a road sign) beside a round dial (hud.js setSpeed) */
#speedo { display: flex; gap: 10px; align-items: flex-end; }
#speedo .limit { width: 54px; background: #fff; color: var(--gd-ink); border: var(--gd-line) solid var(--gd-ink); border-radius: 8px; text-align: center; padding: 4px 3px 5px; box-shadow: 2px 2px 0 var(--gd-ink); }
#speedo .limit small { display: block; font: 700 7.5px/1.1 var(--gd-font); letter-spacing: .04em; }
#speedo .limit b { font: 700 24px/1 var(--gd-font); }
#speedo .spd { position: relative; width: 132px; height: 132px; border-radius: 50%; background: #fff; color: var(--gd-ink); border: 3px solid var(--gd-ink); box-shadow: var(--gd-sh) var(--gd-sh) 0 var(--gd-ink); text-align: center; }
#speedo .spd #spdGauge svg { position: absolute; inset: 0; width: 100%; height: 100%; }
#speedo .spdRead { position: absolute; left: 0; right: 0; bottom: 9px; }
#speedo .spd b { display: inline-block; position: relative; min-width: 46px; padding: 2px 6px 1px; border-radius: 9px; background: #fff; font: 700 27px/.9 var(--gd-font); font-variant-numeric: tabular-nums; } /* (a plate over the needle: it sweeps past the digits at low and high speeds) */
#speedo .spd small { display: block; position: relative; }
#speedo .spd small { font: 700 9.5px/1 var(--gd-font); letter-spacing: .12em; color: var(--gd-mute); }
#speedo .spd em { display: block; margin: 2px 12px 0; font: 600 10px/1.2 var(--gd-font); font-style: normal; color: var(--gd-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#speedo.over .spd { animation: gd-copring .5s steps(1) infinite; }
/* key prompts: a white chip with the key and what it does */
#prompts { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.prompt { display: flex; align-items: center; gap: 8px; background: #fff; color: var(--gd-ink); border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r); padding: 4px 13px 4px 5px; font: 700 13.5px/1 var(--gd-font); text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; box-shadow: var(--gd-sh-sm) var(--gd-sh-sm) 0 var(--gd-ink); }
.prompt .tl { font-size: 11px; color: var(--gd-mute); margin-right: 4px; }
#hudBtns { position: absolute; right: 14px; top: 14px; display: flex; gap: 8px; }
#hudBtns > * { pointer-events: auto; }
.hudBtn { display: flex; align-items: center; gap: 8px; background: #fff; color: var(--gd-ink); border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r); padding: 4px 13px 4px 5px; font: 700 13.5px/1 var(--gd-font); text-transform: uppercase; letter-spacing: .03em; min-height: 36px; box-shadow: var(--gd-sh-sm) var(--gd-sh-sm) 0 var(--gd-ink); }
.hudBtn:hover { background: var(--gd-cream); }
.hudBtn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--gd-ink); }
.hudBtn.on { background: var(--gd-route); color: #fff; }
.hudBtn .kk:empty { display: none; }
/* ---------- touch controls: white stickers over the world (a flat color for the ones that matter) ---------- */
#touch { position: fixed; inset: 0; z-index: 11; pointer-events: none; display: none; }
body.touch #touch { display: block; }
body.phone-open #touch { display: none; }
#joyZone { position: absolute; left: 0; top: 90px; bottom: 0; width: 55%; pointer-events: auto; }
body.driving:not(.screen-steer):not(.touch) #joyZone, body.driving:not(.screen-steer):not(.touch) #joyBase { display: none; }
body.driving.screen-steer .drive.left, body.driving.screen-steer .tbtn.gas, body.driving.screen-steer .tbtn.brake { display: none; }
#joyBase { position: absolute; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; background: rgba(255,255,255,.45); border: 3px solid var(--gd-ink); display: none; }
#joyBase.on { display: block; }
#joyKnob { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; border-radius: 50%; background: #fff; border: 3px solid var(--gd-ink); box-shadow: 3px 3px 0 var(--gd-ink); transform: translate(-50%,-50%); }
.drive { position: absolute; bottom: 20px; display: none; gap: 14px; align-items: flex-end; }
body.driving .drive { display: flex; }
.drive.left { left: 18px; }
.drive.right { right: 18px; }
.tbtn { --c: #fff; --t: var(--gd-ink); pointer-events: auto; border: 3px solid var(--gd-ink); background: var(--c); color: var(--t); font: 700 12px/1.05 var(--gd-font); text-transform: uppercase; letter-spacing: .03em; border-radius: 22px; display: flex; align-items: center; justify-content: center; text-align: center; touch-action: none; box-shadow: var(--gd-sh) var(--gd-sh) 0 var(--gd-ink); user-select: none; }
.tbtn.down { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--gd-ink); }
.tbtn.steer { width: 88px; height: 88px; }
.tbtn.gas { --c: var(--gd-green); width: 92px; height: 130px; font-size: 18px; }
.tbtn.brake { --c: var(--gd-red); --t: #fff; width: 84px; height: 96px; font-size: 15px; }
.tbtn.hand { --c: var(--gd-mustard); width: 70px; height: 70px; font-size: 11px; line-height: 1.1; }
.tbtn.action { --c: var(--gd-red); position: absolute; right: 22px; bottom: 170px; width: 74px; height: 74px; border-radius: 50%; }
/* Touch layout: map top-right, objective and prompts near the thumbs. */
body.touch #bottomLeft { left: auto; right: 10px; top: 10px; bottom: auto; flex-direction: column; align-items: flex-end; gap: 8px; }
body.touch #minimap { width: 112px; height: 112px; border-radius: 16px; border-width: 3px; }
body.touch #speedo .limit { width: 44px; padding: 3px 2px 4px; }
body.touch #speedo .limit b { font-size: 18px; }
body.touch #speedo .limit small { font-size: 6.5px; }
body.touch #speedo .spd { width: 104px; height: 104px; }
body.touch #speedo .spdRead { bottom: 6px; }
body.touch #speedo .spd b { font-size: 21px; min-width: 36px; padding: 1px 4px 0; }
body.touch #speedo .spd em { display: none; }
body.touch #timer { min-width: 100px; padding: 2px 14px 5px; }
body.touch #timer b { font-size: 26px; }
body.touch #topLeft { left: 10px; top: 10px; }
body.touch #objective, body.touch #timer.hidden + #objective { top: auto; bottom: 150px; font-size: 13px; padding: 6px 12px; max-width: 72vw; }
body.touch.driving #objective { bottom: 190px; }
body.touch #prompts { left: auto; right: 10px; bottom: 240px; transform: none; flex-direction: column; align-items: flex-end; }
body.touch.driving #prompts { bottom: 250px; }
body.touch #hudBtns { top: 110px; right: auto; left: 10px; flex-direction: column; align-items: flex-start; }
body.touch #toast { top: 205px; bottom: auto; right: auto; left: 10px; align-items: flex-start; max-width: 60vw; }
body.touch #bustBar { top: 64px; width: 180px; }
@media (max-width: 480px) {
  .tbtn.steer { width: 68px; height: 78px; }
  .drive { gap: 10px; bottom: 14px; }
  .drive.left { left: 10px; }
  .drive.right { right: 10px; }
  .tbtn.gas { width: 80px; height: 118px; }
  .tbtn.brake { width: 70px; height: 84px; }
  .tbtn.hand { position: absolute; right: 90px; bottom: 96px; width: 60px; height: 52px; }
  .tbtn.action { right: 14px; bottom: 150px; width: 66px; height: 66px; }
  body.driving .tbtn.action { bottom: 150px; right: 14px; }
}
@media (max-width: 700px), (max-height: 520px) {
  .pill { font-size: 17px; padding: 5px 11px; }
  #timer b { font-size: 30px; }
  #objective { top: 78px; font-size: 14px; }
}
/* ---------- round 3 ---------- */
/* Key prompts sit above the phone peeking in the corner (desktop). */
body:not(.touch) #prompts { left: auto; right: 24px; bottom: 80px; transform: none; flex-direction: column; align-items: flex-end; }
body:not(.touch).phone-open #prompts { right: 380px; }
/* waiting (for the food, a ticket...): a white card with a bar filling orange to mustard */
#waitBar { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: min(460px, 82vw); background: #fff; color: var(--gd-ink); border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r-lg); padding: 12px 16px 14px; text-align: center; box-shadow: var(--gd-sh) var(--gd-sh) 0 var(--gd-ink); }
#waitBar p { margin: 0 0 10px; font: 700 16px/1.3 var(--gd-font); }
#waitBar .track { position: relative; height: 16px; border-radius: 8px; background: #fff; border: 2px solid var(--gd-ink); overflow: hidden; }
#waitBar .track i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gd-dash), var(--gd-mustard)); border-right: 2px solid var(--gd-ink); transition: width .15s linear; }
/* ---------- round 7: callout, clickable prompts, controller focus ---------- */
#prompts { pointer-events: none; }
#prompts .prompt { pointer-events: auto; font-family: var(--gd-font); cursor: pointer; }
#prompts .prompt:hover { background: var(--gd-cream); }
#prompts .prompt:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--gd-ink); }
/* the call to action in the middle (a big red sticker button) */
#callout { position: absolute; left: 50%; top: 62%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 8px 22px 8px 10px; border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r); background: var(--gd-red); color: #fff; font: 700 18px/1.1 var(--gd-font); text-transform: uppercase; letter-spacing: .04em; text-shadow: 1px 1px 0 rgba(0, 0, 0, .25); box-shadow: var(--gd-sh) var(--gd-sh) 0 var(--gd-ink); pointer-events: auto; cursor: pointer; animation: calloutPulse 1.4s ease-in-out infinite; }
#callout .ck { display: flex; }
/* a controller's focus: a dashed blue ring round the sticker, the same gap all round (its hard shadow
   goes while it's picked, so the ring never runs into it; the menus' .sel the same) */
.padFocus { outline: 3px dashed var(--gd-blue) !important; outline-offset: 3px; box-shadow: none !important; }
/* ---------- round 8 ---------- */
/* Touch: drag stick for walking and driving; handbrake + action above the phone. */
body.touch #joyZone, body.touch.driving #joyZone { display: block; bottom: 90px; width: 62%; }
body.touch #touchBtns { position: absolute; right: 12px; bottom: 96px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
#touchBtns .tbtn.action { position: static; width: 70px; height: 70px; border-radius: 50%; }
#touchBtns .tbtn.hand { display: none; width: 70px; height: 56px; font-size: 11px; line-height: 1.1; border-radius: 18px; }
body.driving #touchBtns .tbtn.hand { display: flex; }
body.touch #prompts { right: 96px; bottom: 100px; }
body.touch.driving #prompts { bottom: 100px; }
body.touch #objective, body.touch #timer.hidden + #objective, body.touch.driving #objective { bottom: auto; top: 58px; left: 10px; right: auto; transform: none; max-width: calc(100vw - 150px); }
body.touch #timer:not(.hidden) + #objective { top: 100px; }
/* Floating world tooltip: a white bubble with a tail pointing at the thing */
#worldTip { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 8px; padding: 5px 13px 5px 5px; border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r-md); background: #fff; color: var(--gd-ink); font: 700 13.5px/1 var(--gd-font); text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; pointer-events: auto; cursor: pointer; box-shadow: var(--gd-sh-sm) var(--gd-sh-sm) 0 var(--gd-ink); }
#worldTip::after { content: ""; position: absolute; left: 50%; bottom: -9px; width: 14px; height: 14px; margin-left: -7px; background: #fff; border-right: var(--gd-line) solid var(--gd-ink); border-bottom: var(--gd-line) solid var(--gd-ink); transform: rotate(45deg); }
#worldTip.quiet { opacity: .75; font-size: 12px; }
/* First-time hint strip */
#hint { position: fixed; z-index: 12; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: min(620px, 92vw); background: #fff; color: var(--gd-ink); border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r-md); padding: 9px 13px; font: 500 14px/1.35 var(--gd-font); box-shadow: var(--gd-sh) var(--gd-sh) 0 var(--gd-ink); pointer-events: auto; animation: toastIn .3s ease-out; }
#hint span { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: center; }
body.touch #hint { bottom: auto; top: 150px; font-size: 13px; }
body:not(.touch) #hint { left: calc(50% - 60px); }
/* Desktop: the minimap, then the limit and the dial, side by side */
#touchBtns .tbtn.action { position: static !important; right: auto !important; bottom: auto !important; }
#touchBtns .tbtn.hand, #touchBtns .tbtn.rev { position: relative !important; right: auto !important; bottom: auto !important; } /* (relative: their hold rings sit round them) */
body.touch #hint { top: 230px; left: 10px; right: 10px; transform: none; max-width: none; }
.accs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; width: 100%; margin-bottom: 8px; }
.acc { display: flex; flex-direction: column; align-items: center; color: var(--gd-ink); }
.acc img { width: 38px; height: 38px; }
.acc i { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; font-style: normal; color: var(--gd-mute); font-size: 20px; }
.acc small { font: 700 10px/1.2 var(--gd-font); }
body:not(.touch) #hint { bottom: 66px; }
/* hint dismiss */
#hint { cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; }
#hint.hidden { display: none !important; }
#hint .nomore { font: 700 11px/1 var(--gd-font); text-transform: uppercase; letter-spacing: .04em; color: var(--gd-mute); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
#hint .nomore:hover { color: var(--gd-ink); }
/* Police scanner: a flashing light bar over your car, and an arrow round it pointing at the cop */
#scanner { position: absolute; left: 0; top: 0; width: 1px; height: 1px; pointer-events: none; z-index: 5; }
#scanner .bar { position: absolute; left: -37px; top: -9px; width: 74px; height: 18px; display: flex; overflow: hidden; box-sizing: border-box; border: var(--gd-line) solid var(--gd-ink); border-radius: 9px; box-shadow: 2px 2px 0 var(--gd-ink); }
#scanner .bar::after { content: ''; position: absolute; inset: 2px 6px auto; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .55); }
#scanner .bar i { flex: 1; }
#scanner .bar .r { background: var(--gd-cop-red); animation: copR .5s steps(1) infinite; }
#scanner .bar .b { background: var(--gd-cop-blue); animation: copB .5s steps(1) infinite; }
@keyframes copR { 0% { filter: none; } 50% { filter: brightness(.45); } }
@keyframes copB { 0% { filter: brightness(.45); } 50% { filter: none; } }
#scanner .arrow { position: absolute; left: -13px; top: -13px; width: 26px; height: 26px; transform-origin: 13px 13px; }
#scanner .arrow::before { content: ''; position: absolute; inset: 0; transform: rotate(90deg); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 28'%3E%3Cpath d='M14.6 4.6 22.6 24.4 14.6 20.4 6.6 24.4Z' fill='%231b1d24' stroke='%231b1d24' stroke-width='2.4' stroke-linejoin='round'/%3E%3Cpath d='M13 3 21 22.8 13 18.8 5 22.8Z' fill='%23ffd84a' stroke='%231b1d24' stroke-width='2.4' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain; animation: arrowPulse .5s ease-in-out infinite alternate; }
@keyframes arrowPulse { from { opacity: 1; } to { opacity: .55; } }
/* Joe's showroom: its name in big outlined letters, how to spin, and its buttons */
#showroomHud { position: absolute; left: 16px; top: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 12px; pointer-events: none; }
#showroomHud > * { pointer-events: auto; }
.srTitle { align-self: flex-start; }
.srTitle b { display: block; font: 700 30px/1 var(--gd-font); text-transform: uppercase; color: #fff; -webkit-text-stroke: 3px var(--gd-ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--gd-ink); }
.srTitle span { display: inline-block; margin-top: 6px; padding: 2px 9px; border: 2px solid var(--gd-ink); border-radius: var(--gd-r-xs); box-shadow: 2px 2px 0 var(--gd-ink); background: var(--gd-mustard); color: var(--gd-ink); font: 700 11px/1.4 var(--gd-font); letter-spacing: .05em; text-transform: uppercase; transform: rotate(-4deg); }
.srHint { display: flex; align-items: center; gap: 6px; color: #fff; font: 600 13px/1.3 var(--gd-font); text-shadow: 0 1px 3px rgba(0, 0, 0, .6); align-self: flex-start; }
.srBtns { margin-top: auto; display: flex; gap: 10px; }
.srBtn { --c: #fff; --t: var(--gd-ink); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 6px 18px; border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r); background: var(--c); color: var(--t); font: 700 14px/1.1 var(--gd-font); text-transform: uppercase; letter-spacing: .04em; cursor: pointer; box-shadow: var(--gd-sh) var(--gd-sh) 0 var(--gd-ink); transition: transform .06s, box-shadow .06s; }
.srBtn:hover { transform: translate(-1px, -1px); box-shadow: calc(var(--gd-sh) + 1px) calc(var(--gd-sh) + 1px) 0 var(--gd-ink); }
.srBtn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--gd-ink); }
.srBtn.blue { --c: var(--gd-blue); --t: #fff; }
body.showroom #topLeft > #wanted, body.showroom #objective, body.showroom #bottomLeft, body.showroom #prompts, body.showroom #hudBtns #dirBtn, body.showroom #touch, body.showroom #notify, body.showroom #callout, body.showroom #worldTip, body.showroom #waitBar, body.showroom #bustBar, body.showroom #hint { display: none !important; }
body.showroom #topLeft { left: auto; right: 16px; }
body.touch #showroomHud { top: 70px; bottom: 90px; left: 10px; }
body.touch.phone-open #showroomHud .srBtns { display: none; }
@media (max-width: 700px) {
  body.showroom .srHint { display: none; }
}
body.showroom #hudBtns { display: none !important; }

/* multiplayer scoreboard, under the clock and money: a white card, your row in yellow */
#scoreboard { margin-top: 8px; background: #fff; color: var(--gd-ink); border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r-md); padding: 4px 12px; font: 600 13px/1 var(--gd-font); min-width: 260px; box-shadow: var(--gd-sh) var(--gd-sh) 0 var(--gd-ink); pointer-events: none; }
#scoreboard .sbHead, #scoreboard .sbRow { display: grid; grid-template-columns: 1fr 64px 36px 44px; align-items: center; gap: 6px; padding: 5px 0; }
#scoreboard .sbRow + .sbRow { border-top: 2px dashed rgba(27, 29, 36, .15); }
#scoreboard .sbHead { font: 700 10.5px/1 var(--gd-font); color: var(--gd-mute); text-transform: uppercase; letter-spacing: .1em; }
#scoreboard em { font-style: normal; text-align: right; font-variant-numeric: tabular-nums; }
#scoreboard .sbRow span { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#scoreboard .sbRow b { color: var(--gd-mute); width: 12px; }
#scoreboard .sbRow i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--gd-ink); flex: none; }
#scoreboard .sbRow.me { background: #fff3c4; margin: 0 -12px; padding: 5px 12px; }
body.touch #scoreboard { min-width: 0; width: 220px; font-size: 12px; }

/* a banner that opens something: a labeled key, and the objective line steps aside while any are up */
#notify .nk { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: none; }
#notify .nk small { font: 700 9.5px/1 var(--gd-font); color: var(--gd-mute); text-transform: uppercase; letter-spacing: .1em; }
#objective { transition: opacity .2s; }
body:has(#notify.show) #objective { opacity: 0; }
/* hints: an easy-to-tap "Don't show again" */
#hint .nomore { padding: 6px 10px; margin: -4px 0 -6px; }
body.touch #hint .nomore { padding: 10px 16px; font-size: 13px; }

/* The corner: a big orange "?" (Controls) and the first controls card */
#corner { position: absolute; top: 14px; right: 14px; display: flex; align-items: flex-start; gap: 12px; z-index: 4; }
#helpBtn { width: 46px; height: 46px; border-radius: 50%; border: var(--gd-line) solid var(--gd-ink); background: var(--gd-dash); color: #fff; font: 700 22px/1 var(--gd-font); box-shadow: var(--gd-sh-sm) var(--gd-sh-sm) 0 var(--gd-ink); cursor: pointer; pointer-events: auto; display: grid; place-items: center; padding: 0; }
#helpBtn:hover { transform: translate(-1px, -1px); }
#helpBtn:active { transform: translate(3px, 3px); box-shadow: none; }
/* (the controls card: a white sticker of keys and what they do) */
#cornerHint { background: #fff; color: var(--gd-ink); border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r-md); box-shadow: var(--gd-sh-sm) var(--gd-sh-sm) 0 var(--gd-ink); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; pointer-events: auto; cursor: pointer; animation: toastIn .3s ease-out; font: 600 13px/1.3 var(--gd-font); }
#cornerHint.hidden { display: none; }
#cornerHint > b { font: 700 12px/1 var(--gd-font); letter-spacing: .12em; text-transform: uppercase; }
#cornerHint .chRow { display: flex; align-items: center; gap: 8px; font: 600 13px/1.3 var(--gd-font); }
#cornerHint .chRow > span:last-child { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; max-width: 260px; } /* (a tip's own keys sit in its text) */
#cornerHint .chRow .keys:empty { display: none; }
#cornerHint .chRow .keys { display: flex; gap: 2px; }
#cornerHint .nomore { align-self: flex-start; font: 700 11px/1 var(--gd-font); text-transform: uppercase; letter-spacing: .04em; color: var(--gd-mute); background: none; border: 0; padding: 4px 0 2px; cursor: pointer; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
body.touch #corner { top: 14px; right: 138px; }
body.touch #helpBtn { width: 38px; height: 38px; font-size: 20px; }
body.no-tips #cornerHint { display: none !important; }
body.showroom #corner { display: none; }
/* A tip flashed in the middle, just above your car: an ink sticker with an orange ring */
#flashTip { position: absolute; left: 50%; top: 36%; transform: translate(-50%, -50%); background: var(--gd-ink); color: #fff; border: var(--gd-line) solid var(--gd-ink); font: 600 16px/1.35 var(--gd-font); padding: 9px 16px; border-radius: var(--gd-r-md); display: flex; align-items: center; gap: 6px; box-shadow: 0 0 0 3px var(--gd-dash), var(--gd-sh) var(--gd-sh) 0 3px var(--gd-ink); animation: flashTip 1.6s ease-in-out infinite; pointer-events: none; z-index: 6; white-space: nowrap; }
#flashTip.hidden { display: none; }
@keyframes flashTip { 0%, 100% { opacity: 1; } 50% { opacity: .7; } }
body.touch #flashTip { font-size: 14px; top: 32%; }
/* prompts sit above the "open your phone" label (desktop) */
body:not(.touch):not(.phone-open):not(.no-tips) #prompts { bottom: 116px; }
body:not(.touch):not(.phone-open):not(.no-tips):has(#phone.music) #prompts { bottom: 188px; }


/* Icons in place of emoji */
.clock .ico .gl { width: 18px; height: 18px; vertical-align: -0.25em; }
.clock.night .ico { color: var(--gd-mustard); }
.clock:not(.night) .ico { color: var(--gd-tight); }

/* touch: the minimap and speedometer have the right side, so the help button sits on the left under the Phone button */
body.touch #corner { top: 150px; left: 12px; right: auto; }
body.touch #helpBtn { width: 40px; height: 40px; font-size: 22px; }

/* The nitrous bottle (js/nitro.js): standing beside the speedometer, as tall as it
   (its height is set from the dial). Hover shows the key; click or tap fires. */
#speedo { position: relative; }
#nosSlot { position: absolute; bottom: 0; left: calc(100% + 10px); height: 80px; }
#nosSlot.hidden { display: none; }
body.touch #nosSlot { left: auto; right: 4px; top: calc(100% + 8px); bottom: auto; } /* (under the speedometer: the left of the screen is the touch driving area) */
#nosBottle { position: relative; height: 100%; pointer-events: auto; cursor: pointer; will-change: transform; transform-origin: 50% 100%; }
#nosBottle img { display: block; height: 100%; width: auto; transform-origin: 50% 100%; }
#nosBottle img.empty { opacity: .6; }
#nosBottle img.full { position: absolute; left: 0; top: 0; }
#nosBottle.burning img.full { filter: drop-shadow(0 0 8px var(--gd-blue)); }
#nosBottle .nosKey { position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); display: none; line-height: 0; }
#nosBottle:hover .nosKey:not(:empty) { display: block; }
#nosBottle .nosKey .ki { display: inline-block; animation: keyPress 1s ease-in-out infinite; }
#nosBottle.pop img { animation: nosWiggle .6s ease-in-out; }
#nosBottle .sparks { position: absolute; left: 50%; top: 4%; width: 0; height: 0; }
#nosBottle .sparks b { position: absolute; left: -2px; top: -2px; width: 6px; height: 6px; border-radius: 50%; background: var(--gd-mustard); border: 1.5px solid var(--gd-ink); opacity: 0; }
#nosBottle.pop .sparks b { animation: nosSpark .7s ease-out; }
@keyframes nosWiggle { 0%, 100% { rotate: 0deg; } 20% { rotate: -9deg; } 45% { rotate: 7deg; } 70% { rotate: -4deg; } 85% { rotate: 2deg; } }
@keyframes nosSpark { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(1); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-26px) scale(.4); } }

/* The dev world (js/dev-world.js): a badge under the clock */
#devBadge { display: none; width: fit-content; margin-top: 2px; background: var(--gd-dev); color: #fff; font-size: 13px; letter-spacing: .06em; }
body.dev-world #devBadge { display: block; }

/* the orange ? comes and goes with the controls card beside it */
#corner:has(#cornerHint.hidden) #helpBtn, body.no-tips #helpBtn, body.touch #helpBtn { display: none; }

/* The dev world's vehicle tuning panel (js/dev/tune.js), top right; the "?"
   and tips move over to its left while it's open. A white sticker card with a
   purple title bar. */
#tuner { position: absolute; top: 14px; right: 14px; width: 320px; max-height: calc(100vh - 150px); overflow-y: auto; background: #fff; color: var(--gd-ink); border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r-lg); box-shadow: 5px 5px 0 var(--gd-ink); pointer-events: auto; z-index: 5; font: 500 12px/1.3 var(--gd-font); overscroll-behavior: contain; }
#tuner.min { width: auto; }
#tuner.min .tuBody { display: none; }
body.dev-world:has(#tuner:not(.min)) #corner { right: 344px; }
body.dev-world:has(#tuner.min) #corner { right: 124px; }
#tuner .tuHead { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px 8px 14px; background: var(--gd-dev); color: #fff; border-bottom: var(--gd-line) solid var(--gd-ink); }
#tuner.min .tuHead { border-bottom: 0; }
#tuner .tuHead b { font: 700 14px/1 var(--gd-font); text-transform: uppercase; letter-spacing: .04em; }
#tuner button { font: 700 11px/1 var(--gd-font); text-transform: uppercase; letter-spacing: .04em; border: 2px solid var(--gd-ink); border-radius: var(--gd-r-xs); padding: 5px 10px; cursor: pointer; background: #fff; color: var(--gd-ink); box-shadow: 2px 2px 0 var(--gd-ink); }
#tuner button:active { transform: translate(2px, 2px); box-shadow: none; }
#tuner .tuHead button { background: #fff; color: var(--gd-ink); }
#tuner .tuBody { padding: 10px 12px 12px; }
#tuner .tuPics { display: flex; gap: 8px; align-items: stretch; }
#tuner figure { margin: 0; flex: 1; min-width: 0; }
#tuner .tuCar { display: block; width: 100%; height: 120px; background: var(--gd-cream); border: 2px solid var(--gd-ink); border-radius: 8px; }
#tuner figcaption { font: 500 10.5px/1.35 var(--gd-font); color: var(--gd-mute); margin-top: 4px; }
#tuner .tuLive { flex: none; width: 74px; display: flex; flex-direction: column; gap: 4px; }
#tuner .tuLive > div { background: var(--gd-cream); border: 2px solid var(--gd-ink); border-radius: 8px; padding: 3px 6px; display: flex; flex-direction: column; }
#tuner .tuLive b { font: 700 15px/1 var(--gd-font); }
#tuner .tuLive small { font: 600 9.5px/1.2 var(--gd-font); color: var(--gd-mute); }
#tuner .tuSteer { position: relative; height: 30px; }
#tuner .tuSteer::before { content: ''; position: absolute; left: 6px; right: 6px; top: 9px; height: 6px; border-radius: 3px; background: #e8dcbf; }
#tuner .tuSteer i { position: absolute; top: 5px; width: 5px; height: 14px; margin-left: -2.5px; background: var(--gd-ink); border-radius: 2px; }
#tuner .tuSteer small { position: absolute; bottom: 2px; left: 6px; }
#tuner .tuGraphs canvas { display: block; width: 100%; height: auto; margin-top: 8px; border: 2px solid var(--gd-ink); border-radius: 8px; background: var(--gd-cream); }
#tuner .tuSum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
#tuner .tuSum span { border: 2px solid var(--gd-ink); border-radius: 8px; padding: 5px 4px; font: 600 10px/1.2 var(--gd-font); color: var(--gd-mute); text-align: center; }
#tuner .tuSum b { display: block; margin-bottom: 2px; font: 700 14px/1 var(--gd-font); color: var(--gd-ink); }
#tuner h4 { margin: 12px 0 2px; font: 700 11px/1.2 var(--gd-font); text-transform: uppercase; letter-spacing: .12em; color: var(--gd-dev); }
#tuner .tuRow { display: grid; grid-template-columns: 104px 1fr 86px; align-items: center; gap: 6px; padding: 3px 0; }
#tuner .tuRow + .tuRow { border-top: 2px dashed rgba(27, 29, 36, .1); }
#tuner .tuName { display: flex; align-items: center; gap: 2px; font: 700 12px/1.15 var(--gd-font); }
#tuner .tuName button { visibility: hidden; padding: 0 5px; background: #fff; color: var(--gd-dash); font-size: 12px; box-shadow: none; border-radius: 50%; }
#tuner .tuRow.changed .tuName { color: var(--gd-dash); }
#tuner .tuRow.changed .tuName button { visibility: visible; }
#tuner input[type=range] { width: 100%; margin: 0; accent-color: var(--gd-dash); }
#tuner .tuVal { display: flex; align-items: center; gap: 3px; }
#tuner .tuVal input { width: 50px; font: 700 12px/1 var(--gd-font); padding: 3px 4px; border: 2px solid var(--gd-ink); border-radius: 6px; text-align: right; }
#tuner .tuRow.changed .tuVal input { border-color: var(--gd-dash); }
#tuner .tuVal small { font: 600 9.5px/1.1 var(--gd-font); color: var(--gd-mute); }
#tuner .tuBtns { display: flex; gap: 8px; margin-top: 12px; }
#tuner .tuBtns button { flex: 1; padding: 9px; }
#tuner .tuBtns .primary { background: var(--gd-dash); color: var(--gd-ink); }
#tuner .tuOut { width: 100%; margin-top: 8px; min-height: 72px; padding: 8px 10px; border: 2px solid var(--gd-ink); border-radius: var(--gd-r-sm); background: var(--gd-ink); color: #b9f5c9; font: 500 11px/1.4 ui-monospace, Consolas, monospace; box-sizing: border-box; }
#tuner .tuOut.hidden { display: none; }
#tuner .tuNote { margin: 8px 0 0; font: 500 10.5px/1.35 var(--gd-font); color: var(--gd-mute); }

/* The tutorial (js/tutorial.js): the welcome for a new player, the step
   prompt in the middle of the screen, and explanation cards. */
#tutWelcome, #tutCard, #gamePopup { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(12,14,22,.55); padding: 16px; pointer-events: auto; animation: toastIn .3s ease-out; }
#tutCard.hidden { display: none; }
/* (the card: a white sticker with an orange ring round it) */
#tutWelcome .twCard, #tutCard .tcIn, #gamePopup .twCard { width: min(440px, 100%); background: #fff; color: var(--gd-ink); border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r-lg); padding: 20px 20px 18px; text-align: center; box-shadow: 0 0 0 5px var(--gd-dash), 6px 6px 0 5px var(--gd-ink); }
#tutWelcome img, #gamePopup img { width: 92px; height: 92px; margin: -6px auto 0; display: block; }
#tutWelcome h2, #gamePopup h2 { margin: 4px 0 6px; font: 700 24px/1.1 var(--gd-font); text-transform: uppercase; letter-spacing: .02em; }
#tutWelcome p, #tutCard p, #gamePopup p { margin: 0 0 16px; font: 500 15px/1.4 var(--gd-font); color: #4a4f5c; }
#tutWelcome .twBtns, #gamePopup .twBtns { display: flex; flex-direction: column; gap: 10px; }
#tutWelcome .btn, #tutCard .btn, #gamePopup .btn { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; }
#tutCard small { display: block; font: 700 11px/1.2 var(--gd-font); letter-spacing: .12em; text-transform: uppercase; color: var(--gd-dash); }
#tutCard h3 { margin: 4px 0 8px; font: 700 22px/1.1 var(--gd-font); text-transform: uppercase; }
/* the step in the middle of the screen: a white sticker with an orange ring */
#tutBox { position: absolute; left: 50%; top: 13%; transform: translateX(-50%); width: min(520px, 92vw); background: #fff; color: var(--gd-ink); border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r-lg); padding: 10px 16px 12px; text-align: center; box-shadow: 0 0 0 4px var(--gd-dash), var(--gd-sh) var(--gd-sh) 0 4px var(--gd-ink); z-index: 6; animation: toastIn .3s ease-out; }
#tutBox.hidden { display: none; }
#tutBox small { display: block; font: 700 11px/1.2 var(--gd-font); letter-spacing: .12em; text-transform: uppercase; color: var(--gd-dash); }
#tutBox > b { display: block; font: 700 18px/1.2 var(--gd-font); text-transform: uppercase; margin: 3px 0 4px; }
#tutBox p { margin: 0; font: 500 15px/1.45 var(--gd-font); }
#tutBox p .ki { vertical-align: middle; margin: 0 1px; }
body.touch #tutBox { top: 152px; padding: 6px 12px 8px; border-radius: var(--gd-r-md); } /* (below the Phone button and the minimap; compact on a phone, where the screen's small) */
body.touch #tutBox small { font-size: 10px; }
body.touch #tutBox > b { font-size: 14px; margin: 1px 0 2px; }
body.touch #tutBox p { font-size: 12px; line-height: 1.32; }
/* (nothing else talks over it) */
body.tutorial #flashTip, body.tutorial #hint { display: none !important; }
#tutCard .tcRows { list-style: none; margin: -6px 0 16px; padding: 0 12px; display: flex; flex-direction: column; text-align: left; background: #fff; border: var(--gd-line) solid var(--gd-ink); border-radius: var(--gd-r-md); }
#tutCard .tcRows li { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
#tutCard .tcRows li + li { border-top: 2px dashed rgba(27, 29, 36, .18); }
#tutCard .tcRows i { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--gd-dash); color: #fff; font-size: 20px; border: var(--gd-line) solid var(--gd-ink); }
#tutCard .tcRows b { display: block; font: 700 14px/1.2 var(--gd-font); }
#tutCard .tcRows span { display: block; font: 500 12.5px/1.3 var(--gd-font); color: var(--gd-mute); }
