:root {
  --yellow: #f2c200;
  --yellow-2: #ffdf4a;
  --ink: #111214;
  --panel: rgba(16, 17, 20, 0.92);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f1efe8;
  --muted: #a9a79f;
  --red: #e0413a;
  --green: #52d273;
  --blue: #4aa8ff;
  --title: 'Bungee', 'Arial Black', Impact, sans-serif;
  --body: 'Rubik', 'Trebuchet MS', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1a1c16; color: var(--text); font-family: var(--body); }
button, input, select { font: inherit; }
.hidden { display: none !important; }

#game { position: fixed; inset: 0; }
#game canvas { display: block; cursor: crosshair; }

/* ---------------- Menu ---------------- */
.screen { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 20; }
.menu-bg {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(135deg, rgba(0,0,0,0.25) 0 18px, transparent 18px 36px),
    radial-gradient(ellipse at 30% 20%, #3b4f2c 0%, #1b2217 60%, #0f120d 100%);
}
.menu-inner { position: relative; width: min(560px, calc(100vw - 32px)); max-height: 100vh; overflow-y: auto; overflow-x: hidden; padding: 24px 8px; }
.logo { display: grid; justify-items: center; margin: 8px 0 0; font-family: 'Rubik Wet Paint', var(--title); font-weight: 400; font-size: clamp(40px, 12.5vw, 84px); line-height: 1.05; letter-spacing: 1px; transform: rotate(-4deg); }
/* Graffiti: to lag oven på hinanden – bagerst sort kontur og 3D-skygge, forrest farveforløb (gul-orange, et pink 4-tal) */
.logo > span { grid-area: 1 / 1; white-space: nowrap; }
.logo b { font-weight: 400; }
.g-back { color: #000; -webkit-text-stroke: 12px #000; text-shadow: 5px 6px 0 #c2185b, 9px 11px 0 #000; }
.g-front { background: linear-gradient(180deg, #fff27a 0%, #ffd21f 45%, #ff8a1c 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.g-front b { background: linear-gradient(180deg, #ff9ad5 0%, #ff2e8a 60%, #c2185b 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* Skiftende underoverskrift i tusch-skrift */
/* Underoverskriften: fri af logoets malingsdryp (der følger logoets størrelse) og altid oven på logoet */
.tagline { position: relative; z-index: 1; text-align: center; color: #eceae4; margin: calc(10px + 0.36 * clamp(40px, 12.5vw, 84px)) 0 22px; min-height: 1.4em; font-family: 'Permanent Marker', var(--body); font-size: clamp(16px, 4.2vw, 21px); text-shadow: 2px 2px 0 #000; transform: rotate(-2deg); }
.panel { background: var(--panel); border: 2px solid #000; box-shadow: 6px 6px 0 rgba(0,0,0,0.6); padding: 20px; border-top: 4px solid var(--yellow); }
.panel h2 { font-family: var(--title); font-weight: 400; margin: 0 0 14px; color: var(--yellow); letter-spacing: 1px; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.field input:not([type=range]), .field select, .join-code input {
  width: 100%; padding: 10px 12px; background: #0b0c0e; border: 2px solid #34363b; color: var(--text); border-radius: 0; outline: none;
}
.field input:focus, .join-code input:focus { border-color: var(--yellow); }
.field input[type=range] { width: 100%; accent-color: var(--yellow); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 480px) { .grid2 { grid-template-columns: 1fr; } }
.colors { display: flex; flex-wrap: wrap; gap: 6px; }
.colors button { width: 28px; height: 28px; border: 2px solid #000; cursor: pointer; padding: 0; }
.colors button.sel { outline: 3px solid #fff; outline-offset: 1px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.btn {
  flex: 1; min-width: 120px; padding: 12px 16px; background: var(--yellow); color: #000; border: 2px solid #000; cursor: pointer;
  font-family: var(--title); font-size: 16px; letter-spacing: 1px; box-shadow: 3px 3px 0 #000; transition: transform 0.06s;
}
.btn:hover { background: var(--yellow-2); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #000; }
.btn.alt { background: #2b2d31; color: var(--text); }
.btn.alt:hover { background: #3a3d42; }
.btn.big { font-size: 20px; padding: 16px; }
.btn.small { font-family: var(--body); font-weight: 800; font-size: 13px; letter-spacing: 0; padding: 8px 10px; min-width: 0; }
.btn.link { background: none; border: none; box-shadow: none; color: var(--muted); font-family: var(--body); font-size: 14px; text-decoration: underline; flex: none; min-width: 0; padding: 8px 0 0; }
.btn.link:hover { color: var(--text); background: none; }
.join-code { display: flex; gap: 10px; margin-bottom: 16px; }
.join-code input { text-transform: uppercase; font-family: var(--title); font-size: 22px; letter-spacing: 6px; text-align: center; }
.join-code .btn { flex: none; }
.rooms-head { display: flex; justify-content: space-between; align-items: baseline; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.rooms { list-style: none; padding: 0; margin: 8px 0 14px; max-height: 260px; overflow-y: auto; }
.rooms li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: #0b0c0e; border: 1px solid #2a2c30; margin-bottom: 6px; cursor: pointer; }
.rooms li:hover { border-color: var(--yellow); }
.rooms li .rn { font-weight: 600; }
.rooms li .rm { color: var(--muted); font-size: 13px; }
.rooms li.empty { cursor: default; color: var(--muted); justify-content: center; }
.rooms-note { font-size: 11px; font-weight: 400; text-transform: none; letter-spacing: 0; }
.rooms li.room { flex-wrap: wrap; cursor: default; padding: 0; }
.rooms li.room.open, .rooms li.room:hover { border-color: var(--yellow); }
.rooms li.room.full { opacity: 0.6; }
.rooms li.room.full:hover { border-color: #2a2c30; }
.room-main { flex: 1; min-width: 0; display: block; text-align: left; background: none; border: 0; color: inherit; font: inherit; padding: 10px 0 10px 12px; cursor: pointer; }
.room-main:disabled { cursor: default; }
.room-main:focus-visible { outline: 2px solid var(--yellow); outline-offset: -2px; }
.room-main .rn { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-main .rm { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.room-players { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 600; padding: 6px 8px; cursor: default; outline: none; border-radius: 3px; }
.room-players svg { width: 16px; height: 16px; fill: currentColor; }
.room-players:hover, .room-players:focus-visible { color: var(--yellow); background: rgba(255, 255, 255, 0.06); }
.room-go { flex: none; background: none; border: 0; color: var(--yellow); font-family: var(--title); font-size: 13px; letter-spacing: 1px; padding: 10px 12px 10px 6px; cursor: pointer; }
.room-go:disabled { color: var(--muted); cursor: default; }
.room-pass { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; padding: 0 12px 12px; }
.room-pass input { flex: 1; min-width: 0; padding: 8px 10px; background: #16171a; border: 2px solid #34363b; color: var(--text); outline: none; }
.room-pass input:focus { border-color: var(--yellow); }
.room-pass .btn { flex: none; min-width: 0; padding: 8px 14px; font-size: 13px; }
.room-pass .err { flex-basis: 100%; color: #ff8a80; font-size: 13px; }
#ptip { position: fixed; z-index: 100; min-width: 150px; max-width: 260px; padding: 8px 10px; background: #0b0c0e; border: 2px solid #000; border-top: 3px solid var(--yellow); box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.6); font-size: 13px; pointer-events: none; }
#ptip .pt-h { color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
#ptip ul { list-style: none; margin: 0; padding: 0; }
#ptip li { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
#ptip .dot { width: 10px; height: 10px; flex: none; border: 1px solid #000; }
#ptip .host { margin-left: auto; color: var(--muted); font-size: 11px; }
.join-code #in-code-pass { text-transform: none; font-family: var(--body); font-size: 16px; letter-spacing: 0; text-align: left; }
.keys { width: 100%; border-collapse: collapse; font-size: 14px; }
.keys td { padding: 5px 4px; border-bottom: 1px solid var(--line); }
.keys td:first-child { font-family: var(--title); color: var(--yellow); white-space: nowrap; width: 1%; padding-right: 14px; font-size: 13px; }
.small { font-size: 13px; color: var(--muted); line-height: 1.5; }
/* Besked til telefoner og tablets uden tastatur */
#panel-touch p { line-height: 1.5; margin: 0 0 12px; }
#panel-touch b { color: var(--yellow); word-break: break-all; }
#panel-touch .btn-row { margin: 16px 0 8px; }
#panel-touch .btn { font-size: clamp(13px, 3.8vw, 16px); letter-spacing: 0.5px; padding-left: 8px; padding-right: 8px; min-width: 0; }
#btn-touch-copy { overflow-wrap: anywhere; } /* (lange adresser må brydes, men ikke ord der kan være der) */
.error { margin-top: 12px; padding: 10px 14px; background: #5a1512; border: 2px solid #000; color: #fff; }
.credits { text-align: center; color: #6f6d66; font-size: 12px; margin-top: 16px; }

.loader { text-align: center; }
.spin { width: 54px; height: 54px; margin: 0 auto 14px; border: 6px solid #333; border-top-color: var(--yellow); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#loading { background: #111; }
#loading p { font-family: var(--title); color: var(--yellow); }

/* ---------------- HUD ---------------- */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; font-family: var(--body); }
#names { position: absolute; inset: 0; }
#damage-flash { position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 40%, rgba(200,0,0,0.85) 100%); opacity: 0; transition: opacity 0.35s; }
.hud-tl { position: absolute; left: 16px; top: 16px; width: 240px; }
.bar { position: relative; height: 18px; background: rgba(0,0,0,0.65); border: 2px solid #000; margin-bottom: 5px; }
.bar > div { height: 100%; transition: width 0.15s; }
.bar.hp > div { background: linear-gradient(#6ee07a, #2e9c43); }
.bar.hp > div.low { background: linear-gradient(#ff6a5a, #b3261c); animation: pulse 0.6s infinite alternate; }
.bar.armor { height: 10px; }
.bar.armor > div { background: linear-gradient(#8fc7ff, #2d6fd0); }
.bar.energy { height: 7px; }
.bar.energy > div { background: linear-gradient(#ffe36a, #d9a21a); transition: width 0.1s; }
.bar.energy > div.tired { background: linear-gradient(#b8b8b8, #7a7a7a); }
.bar span { position: absolute; right: 6px; top: -1px; font-family: var(--title); font-size: 13px; text-shadow: 1px 1px 0 #000; }
@keyframes pulse { to { filter: brightness(1.4); } }
.weapon { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; font-family: var(--title); text-shadow: 2px 2px 0 #000; }
#weapon-name { font-size: 18px; color: var(--yellow); }
#weapon-ammo { font-size: 22px; }
#weapon-slots { display: flex; gap: 3px; margin-top: 4px; }
#weapon-slots .slot { width: 22px; height: 22px; font-family: var(--title); font-size: 12px; display: grid; place-items: center; background: rgba(0,0,0,0.5); color: #555; border: 1px solid #000; }
#weapon-slots .slot.has { color: #ddd; }
#weapon-slots .slot.active { background: var(--yellow); color: #000; }
#powerups { margin-top: 8px; display: flex; flex-direction: column; gap: 3px; }
.pw { font-size: 13px; font-weight: 800; padding: 2px 8px; border: 2px solid #000; width: fit-content; text-shadow: 1px 1px 0 #000; }
.pw-speed { background: #b99400; } .pw-damage { background: #b0142c; } .pw-invis { background: #6a2fb0; }
.hud-tc { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); text-align: center; }
#timer { font-family: var(--title); font-size: 30px; text-shadow: 3px 3px 0 #000; }
#timer.urgent { color: var(--red); animation: pulse 0.5s infinite alternate; }
#score { font-weight: 800; font-size: 14px; text-shadow: 1px 1px 0 #000, 0 0 6px #000; }
.hud-tr { position: absolute; right: 16px; top: 16px; display: flex; flex-direction: column; align-items: flex-end; }
#minimap { width: 190px; height: 190px; border-radius: 50%; border: 3px solid #000; box-shadow: 0 0 0 2px rgba(242,194,0,0.8), 4px 4px 0 rgba(0,0,0,0.5); }
#killfeed { margin-top: 12px; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.kf { background: rgba(0,0,0,0.6); padding: 3px 8px; font-size: 14px; font-weight: 800; text-shadow: 1px 1px 0 #000; animation: slidein 0.2s; }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } }
/* Vejnavnet som et vejskilt i Allerød Kommune: hvid plade med runde hjørner, sort skrift og en tynd grå kant */
#street {
  position: absolute; right: 16px; bottom: 18px; opacity: 0; max-width: 320px;
  font-family: 'Source Sans 3', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif; font-weight: 600; font-size: 22px; line-height: 1.15;
  color: #141414; background: #fbfbf8; border: 2px solid #c6c9cb; border-radius: 9px; padding: 3px 14px 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#street:empty { display: none; }
#street.show { animation: street 4s forwards; }
@keyframes street { 0% { opacity: 0; transform: translateX(20px); } 8% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0.6; } }
#bigtext { position: absolute; left: 0; right: 0; top: 30%; text-align: center; font-family: var(--title); font-size: clamp(40px, 8vw, 84px); opacity: 0; transform: scale(0.6); transition: opacity 0.2s, transform 0.25s cubic-bezier(.2,1.6,.4,1); text-shadow: 5px 5px 0 #000; color: var(--yellow); }
#bigtext.show { opacity: 1; transform: scale(1) rotate(-2deg); }
#bigtext.bad { color: var(--red); } #bigtext.good { color: var(--yellow); }
#smalltext { position: absolute; left: 0; right: 0; top: calc(30% + clamp(56px, 10vw, 110px)); text-align: center; font-weight: 800; font-size: 20px; text-shadow: 2px 2px 0 #000; opacity: 0; transition: opacity 0.2s; }
#smalltext.show { opacity: 1; }
#toasts { position: absolute; left: 50%; top: 88px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.toast { background: rgba(0,0,0,0.75); border-left: 4px solid var(--yellow); padding: 5px 14px; font-weight: 800; animation: toast 2.6s forwards; }
.toast.weapon { border-color: var(--yellow); } .toast.power { border-color: #7fe0ff; } .toast.bad { border-color: var(--red); } .toast.ped { border-color: #b01010; }
@keyframes toast { 0% { opacity: 0; transform: translateY(-8px); } 10% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; } }
#hint { position: absolute; left: 50%; bottom: 90px; transform: translateX(-50%); background: rgba(0,0,0,0.7); padding: 6px 14px; font-weight: 600; font-size: 14px; border: 1px solid #000; white-space: nowrap; }
#vehicle-info { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; background: rgba(0,0,0,0.7); border: 2px solid #000; padding: 6px 14px; }
.vname { font-family: var(--title); color: var(--yellow); }
.vspeed { font-family: var(--title); font-size: 20px; min-width: 110px; text-align: right; }
.vhp { width: 90px; height: 8px; background: #300; border: 1px solid #000; }
.vhp-fill { height: 100%; background: #e0a030; }
#chat { position: absolute; left: 16px; bottom: 16px; width: min(420px, 60vw); }
#chat-log { max-height: 200px; overflow: hidden; display: flex; flex-direction: column; gap: 2px; opacity: 0.35; transition: opacity 0.4s; }
#chat-log.recent { opacity: 1; }
#chat-log .line { font-size: 14px; text-shadow: 1px 1px 0 #000, 0 0 4px #000; }
#chat-log .line .n { font-weight: 800; }
#chat-log .sys { color: #cfcac0; font-style: italic; }
#chat-input { pointer-events: auto; width: 100%; margin-top: 6px; padding: 8px 10px; background: rgba(0,0,0,0.8); border: 2px solid var(--yellow); color: #fff; outline: none; }
#scoreboard { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--panel); border: 2px solid #000; border-top: 4px solid var(--yellow); padding: 16px 20px; min-width: min(560px, 92vw); box-shadow: 6px 6px 0 rgba(0,0,0,0.5); }
.sb-title { font-family: var(--title); color: var(--yellow); font-size: 20px; margin-bottom: 8px; }
#scoreboard table { width: 100%; border-collapse: collapse; }
#scoreboard th { text-align: left; font-size: 12px; color: var(--muted); text-transform: uppercase; padding: 4px 6px; border-bottom: 1px solid var(--line); }
#scoreboard td { padding: 5px 6px; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,0.05); }
#scoreboard tr.me td { background: rgba(242,194,0,0.12); }
#scoreboard .dot { display: inline-block; width: 10px; height: 10px; margin-right: 8px; border: 1px solid #000; }
#scoreboard .ping { color: var(--muted); font-weight: 400; font-size: 13px; }
#bigmap { position: absolute; inset: 0; width: 100%; height: 100%; }
#roundend { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--panel); border: 2px solid #000; border-top: 4px solid var(--yellow); padding: 20px 28px; min-width: min(480px, 92vw); text-align: center; box-shadow: 6px 6px 0 rgba(0,0,0,0.5); }
#roundend h2 { font-family: var(--title); color: var(--yellow); font-size: 32px; margin: 0 0 12px; font-weight: 400; }
#roundend ol { text-align: left; padding-left: 24px; margin: 0 0 12px; }
#roundend li { padding: 4px 0; display: flex; justify-content: space-between; gap: 16px; }
#roundend li .n { font-weight: 800; }
#roundend li .s { color: var(--muted); font-size: 14px; }
#roundend li.me { background: rgba(242,194,0,0.12); }
#roundend .next { color: var(--muted); }
#pause { position: absolute; inset: 0; background: rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center; pointer-events: auto; }
.pause-box { background: var(--panel); border: 2px solid #000; border-top: 4px solid var(--yellow); padding: 20px; width: min(560px, calc(100vw - 32px)); max-height: 92vh; overflow-y: auto; box-shadow: 6px 6px 0 rgba(0,0,0,0.5); }
.pause-box h2 { font-family: var(--title); font-weight: 400; color: var(--yellow); margin: 0 0 14px; }
.pause-box h3 { font-family: var(--title); font-weight: 400; font-size: 15px; color: var(--yellow); margin: 18px 0 10px; }
.invite { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.invite span { color: var(--muted); font-size: 13px; text-transform: uppercase; }
.invite b { font-family: var(--title); font-size: 26px; letter-spacing: 4px; color: #fff; }
.invite .btn { flex: none; }
.hplayers { list-style: none; padding: 0; margin: 12px 0 0; }
.hplayers li { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; background: #0b0c0e; margin-bottom: 4px; }
.hplayers li .btn { flex: none; min-width: 0; padding: 4px 10px; font-size: 12px; background: var(--red); color: #fff; }

@media (max-width: 700px) {
  .hud-tl { width: 170px; }
  #minimap { width: 130px; height: 130px; }
  #street { font-size: 16px; padding: 2px 10px 3px; border-radius: 7px; }
  #hint { white-space: normal; text-align: center; width: 90vw; }
}

/* ---------------- Profil i menuen ---------------- */
.profile { background: #0b0c0e; border: 1px solid #2a2c30; padding: 10px 12px 2px; margin-bottom: 14px; }
.rankline { display: flex; justify-content: space-between; font-weight: 800; margin-bottom: 6px; }
#pr-rank { font-family: var(--title); color: var(--yellow); font-weight: 400; letter-spacing: 1px; }
#pr-xp { color: var(--muted); font-size: 13px; }
.xpbar { height: 8px; background: #222; border: 1px solid #000; margin-bottom: 12px; }
.xpbar > div { height: 100%; background: linear-gradient(90deg, #f2c200, #ff8a00); width: 0; }
.field.check { display: flex; align-items: center; gap: 10px; }
.field.check > span { margin: 0; }
.field.check input { width: 20px; height: 20px; accent-color: var(--yellow); }

/* ---------------- Penge, efterlysning, ur ---------------- */
#money { margin-top: 8px; position: relative; font-family: var(--title); font-size: 20px; color: #6fe06a; text-shadow: 2px 2px 0 #000; }
#money .gain { position: absolute; left: 0; top: 26px; white-space: nowrap; font-family: var(--body); font-weight: 800; font-size: 14px; animation: gain 2.4s forwards; text-shadow: 1px 1px 0 #000, 0 0 6px #000; }
#money .gain.pos { color: #8dff86; } #money .gain.neg { color: #ff8a80; }
#money .gain + .gain { top: 44px; } #money .gain + .gain + .gain { top: 62px; }
@keyframes gain { 0% { opacity: 0; transform: translateY(6px); } 10% { opacity: 1; transform: none; } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10px); } }
#wanted { font-size: 26px; letter-spacing: 2px; margin-top: 2px; text-shadow: 2px 2px 0 #000; }
#wanted .on { color: #ffd23a; } #wanted .off { color: rgba(255,255,255,0.18); }
#wanted.flash .on { animation: wflash 0.35s 6 alternate; }
@keyframes wflash { to { color: #3070ff; } }
#clock { margin-top: 6px; font-weight: 800; font-size: 14px; background: rgba(0,0,0,0.55); padding: 2px 10px; border: 1px solid #000; text-shadow: 1px 1px 0 #000; }

/* ---------------- Opgave, racerløb, rekorder ---------------- */
#mission { margin-top: 12px; background: rgba(0,0,0,0.72); border: 2px solid #000; border-left: 4px solid var(--yellow); padding: 8px 10px; width: 250px; }
#mission .mt { font-family: var(--title); color: var(--yellow); font-size: 15px; }
#mission .mx { font-weight: 800; font-size: 14px; margin-top: 3px; }
#mission .ml { font-family: var(--title); font-size: 22px; margin-top: 4px; }
#mission .ml.urgent { color: var(--red); animation: pulse 0.5s infinite alternate; }
#mission .mk { color: var(--muted); font-size: 11px; margin-top: 2px; }
#race { margin-top: 6px; background: rgba(0,0,0,0.72); border: 2px solid #000; border-top: 4px solid #7fe0ff; padding: 6px 16px; }
#race .rn { font-family: var(--title); color: #7fe0ff; font-size: 14px; }
#race .rt { font-family: var(--title); font-size: 30px; text-shadow: 2px 2px 0 #000; }
#race .rc { font-weight: 800; font-size: 13px; }
#race .rb { color: var(--muted); font-size: 12px; }
#records { margin-top: 10px; background: rgba(0,0,0,0.75); border: 2px solid #000; border-top: 4px solid #ffd23a; padding: 8px 10px; width: 260px; }
#records .rh { font-family: var(--title); color: var(--yellow); font-size: 13px; margin-bottom: 4px; }
#records .ri { display: flex; gap: 6px; font-size: 13px; font-weight: 600; padding: 2px 0; }
#records .rp { width: 18px; color: var(--muted); } #records .rnm { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#records .rtm { font-family: var(--title); font-size: 12px; } #records .rv { color: var(--muted); font-size: 11px; width: 70px; text-align: right; }

/* ---------------- Butik ---------------- */
#shop { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); width: min(460px, 94vw); background: var(--panel); border: 2px solid #000; border-top: 4px solid var(--yellow); box-shadow: 6px 6px 0 rgba(0,0,0,0.5); padding: 12px 14px; }
#shop .sh { font-family: var(--title); color: var(--yellow); font-size: 20px; margin-bottom: 8px; }
#shop .si { display: flex; align-items: center; gap: 10px; padding: 6px 8px; font-weight: 700; border: 1px solid transparent; }
#shop .si.sel { background: rgba(242,194,0,0.18); border-color: var(--yellow); }
#shop .si.poor .sp { color: var(--red); }
#shop .sn { flex: 1; }
#shop .sp { font-family: var(--title); font-size: 14px; }
#shop .note { font-size: 11px; color: var(--muted); text-transform: uppercase; }
#shop .paint { font-size: 12px; padding: 1px 8px; border: 2px solid #000; background: var(--c); color: #fff; text-shadow: 1px 1px 0 #000; }
#shop .sf { margin-top: 8px; color: var(--muted); font-size: 12px; }
.toast.cash { border-color: #6fe06a; }
#scoreboard .rank { color: var(--yellow); font-size: 13px; }
#scoreboard .money { color: #6fe06a; font-size: 13px; }
#scoreboard .wstars { color: #ffd23a; }
@media (max-width: 700px) { #mission, #records { width: 170px; } }
