*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: #0b0b0f;
  color: #fff;
  font-family: Tahoma, Verdana, system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

/* ---------- könsfilter: hela sidan färgas om ---------- */

body[data-gender]::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: color;
  opacity: 0.62;
  z-index: 50;
  transition: background 2s;
}
body[data-gender]::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.45;
  z-index: 49;
}
body[data-gender='blue']::before {
  background: #4d8dff;
}
body[data-gender='pink']::before {
  background: #ff6ec0;
}
body[data-gender='kombi']::before {
  background: #c9a877;
}
body[data-gender='blue']::after {
  background: #0057ff;
}
body[data-gender='pink']::after {
  background: #ff2da0;
}
body[data-gender='kombi']::after {
  background: #a9824a;
}

/* ---------- fasta småsaker ---------- */

#radio {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  right: 10px;
  z-index: 60;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #999;
  background: radial-gradient(circle at 35% 30%, #666, #111);
  font-size: 20px;
}

#toasts {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 70;
  display: grid;
  gap: 8px;
  width: min(92vw, 460px);
  pointer-events: none;
}
.toast {
  padding: 12px 16px;
  background: #fffbe0;
  color: #111;
  border: 3px solid #111;
  box-shadow: 5px 5px 0 #111;
  font-weight: bold;
  animation: toast-in 0.25s ease-out;
}
.toast.good {
  background: #b9ffb0;
}
.toast.bad {
  background: #ff5a4d;
  color: #fff;
}
.toast.warn {
  background: #ffd24d;
}
@keyframes toast-in {
  from {
    transform: translateY(20px) rotate(-2deg);
    opacity: 0;
  }
}

#overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.86);
  padding: 20px;
}
.calibrate {
  width: min(520px, 100%);
  text-align: center;
  font-family: 'Courier New', monospace;
}
.calibrate h2 {
  font-size: clamp(24px, 6vw, 40px);
  animation: blink 0.5s steps(2) infinite;
}
.calibrate .bar {
  height: 28px;
  border: 3px solid #fff;
  padding: 3px;
}
.calibrate .bar i {
  display: block;
  height: 100%;
  width: 0;
  background: repeating-linear-gradient(90deg, #fff 0 12px, transparent 12px 16px);
  animation: fill 3.6s cubic-bezier(0.2, 0.9, 0.9, 0.2) forwards;
}
@keyframes fill {
  40% {
    width: 71%;
  }
  75% {
    width: 73%;
  }
  to {
    width: 100%;
  }
}
@keyframes blink {
  50% {
    opacity: 0.25;
  }
}

/* ---------- garaget: tändning + inloggning ---------- */

.garage {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 70px 16px 40px;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 110%, #ff2a00 0, transparent 55%),
    repeating-conic-gradient(#16161c 0 25%, #0b0b0f 0 50%) 0 0 / 48px 48px;
}
.marquee {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #ffe600;
  color: #000;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  padding: 6px 0;
  font-family: 'Comic Sans MS', 'Chalkboard SE', cursive;
}
.marquee span {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 22s linear infinite;
}
@keyframes marquee {
  to {
    transform: translateX(-100%);
  }
}
.chrome {
  margin: 0;
  font: italic 900 clamp(44px, 13vw, 120px) / 0.92 Impact, 'Arial Black', sans-serif;
  letter-spacing: 2px;
  background: linear-gradient(#fff 0%, #9fb4d0 38%, #1c2a44 50%, #d9a441 52%, #fff3c4 80%, #7a5a1c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 0 #000) drop-shadow(0 0 22px rgba(255, 90, 0, 0.7));
  transform: skewY(-3deg);
}
.chrome span {
  display: block;
  font-size: clamp(30px, 9.5vw, 104px);
}
.chrome.small {
  font-size: clamp(32px, 8vw, 64px);
}
.tagline {
  margin: 0;
  font: 20px 'Comic Sans MS', 'Chalkboard SE', cursive;
  color: #ffe600;
}
.fine {
  margin: 0;
  font-size: 12px;
  color: #aaa;
}
.ignite {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 210px;
  height: 210px;
  margin: 10px 0;
  border-radius: 50%;
  border: 10px solid #c9c9c9;
  outline: 4px solid #555;
  background: radial-gradient(circle at 35% 30%, #ff7b6b, #c20000 60%, #5a0000);
  color: #fff;
  font: 900 20px Impact, 'Arial Black', sans-serif;
  letter-spacing: 1px;
  box-shadow: 0 0 60px rgba(255, 40, 0, 0.8), inset 0 -10px 20px rgba(0, 0, 0, 0.5);
  animation: throb 1.1s ease-in-out infinite;
}
.ignite .key {
  font-size: 54px;
  transition: transform 0.6s;
}
.ignite.turning .key {
  transform: rotate(120deg);
}
@keyframes throb {
  50% {
    transform: scale(1.06);
  }
}

.login {
  display: grid;
  gap: 12px;
  width: min(380px, 100%);
  padding: 18px;
  text-align: left;
  color: #000;
  background: #c0c0c0;
  border: 3px solid;
  border-color: #fff #404040 #404040 #fff;
  box-shadow: 8px 8px 0 #000;
}
.login label {
  display: grid;
  gap: 4px;
  font-weight: bold;
}
.login small {
  font-weight: normal;
}
.login input {
  padding: 10px;
  font-size: 16px;
  border: 2px solid;
  border-color: #404040 #fff #fff #404040;
  background: #fff;
}
.login button {
  padding: 12px;
  font-weight: bold;
  background: #c0c0c0;
  border: 3px solid;
  border-color: #fff #404040 #404040 #fff;
}
.login button:active {
  border-color: #404040 #fff #fff #404040;
}
.login .fine {
  color: #333;
}

/* ---------- parkeringen: släpet ---------- */

.captcha {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 12px 24px;
  background: #1c1d21;
}
.captcha-head {
  text-align: center;
}
.captcha-badge {
  display: inline-block;
  padding: 3px 10px;
  background: #ffe600;
  color: #000;
  font-weight: bold;
  font-size: 12px;
  letter-spacing: 1px;
}
.captcha-head h2 {
  margin: 6px 0 2px;
  font-size: 22px;
}
.captcha-head p {
  margin: 0;
  color: #cfcfcf;
}
.captcha-stage {
  position: relative;
  border: 3px solid #0a0a0c;
  outline: 2px solid #55585e;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  line-height: 0;
}
.captcha canvas {
  display: block;
  height: min(64dvh, 760px);
  width: auto;
  max-width: calc(100vw - 32px);
  aspect-ratio: 2 / 3;
  touch-action: none;
}
.captcha-msg {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 30%;
  padding: 14px;
  line-height: 1.3;
  text-align: center;
  font-weight: bold;
  font-size: 18px;
  border: 3px solid #000;
  box-shadow: 6px 6px 0 #000;
  transform: rotate(-3deg);
}
.captcha-msg.bad {
  background: #ff3b2f;
}
.captcha-msg.good {
  background: #3ce66e;
  color: #000;
}
.captcha-msg small {
  display: block;
  font-weight: normal;
  font-size: 13px;
  margin-top: 4px;
}
.captcha-hud {
  display: flex;
  gap: 16px;
  font: 13px 'Courier New', monospace;
  color: #9fe6a8;
}
.pad {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: min(420px, 100%);
}
.pad-group {
  display: flex;
  gap: 8px;
}
.pad button {
  min-width: 68px;
  height: 64px;
  padding: 0 12px;
  border: 3px solid #000;
  border-radius: 10px;
  background: #e9e9e9;
  color: #000;
  font-weight: 900;
  font-size: 18px;
  box-shadow: 0 5px 0 #000;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.pad button.held {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #000;
  background: #ffe600;
}
.pad .pedal-r {
  background: #ffb3ad;
}
.pad .pedal-f {
  background: #b9ffb0;
}
.captcha-hint {
  margin: 0;
  font-size: 12px;
  color: #888;
}
.adult {
  padding: 10px 16px;
  background: none;
  color: #ffe600;
  border: 2px dashed #ffe600;
  font-family: 'Comic Sans MS', 'Chalkboard SE', cursive;
}

/* ---------- blanketten: elevprofil ---------- */

.wizard {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 70px 18px 40px;
  text-align: center;
  color: #111;
  font-family: 'Times New Roman', Times, serif;
  background:
    repeating-linear-gradient(0deg, transparent 0 31px, #b9c8e6 31px 32px),
    #fbf8ee;
}
.wizard .stamp {
  padding: 4px 10px;
  border: 3px double #b00;
  color: #b00;
  font: bold 12px 'Courier New', monospace;
  transform: rotate(-2deg);
}
.wizard h1 {
  margin: 0;
  font-size: clamp(30px, 8vw, 56px);
}
.wizard p {
  margin: 0;
  font-size: 18px;
  font-style: italic;
}
.choices {
  display: grid;
  gap: 12px;
  width: min(460px, 100%);
}
.wizard button {
  padding: 18px;
  font: bold 20px Tahoma, sans-serif;
  background: #fff;
  color: #111;
  border: 4px solid #111;
  box-shadow: 6px 6px 0 #111;
}
.wizard button:hover {
  transform: translate(-2px, -2px) rotate(-1deg);
  box-shadow: 9px 9px 0 #111;
}
.wizard form {
  display: grid;
  gap: 14px;
  width: min(460px, 100%);
}
.wizard input[type='text'] {
  padding: 14px;
  font-size: 22px;
  text-align: center;
  border: 4px solid #111;
}
.wizard input[type='range'] {
  width: 100%;
  height: 40px;
}
.wizard output {
  font: bold 36px Impact, sans-serif;
}

/* ---------- kupén ---------- */

.cockpit {
  --scr-bg: #050403;
  --scr-fg: #ffb000;
  --scr-dim: #a87400;
  --scr-accent: #ffb000;
  --scr-font: 'Courier New', ui-monospace, monospace;
  --dash: #4a4d52;
  --head: #141416;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: clamp(200px, 40vh, 430px) 1fr;
  background: #000;
}
.cockpit.car-cayenne {
  --scr-bg: #0a1830;
  --scr-fg: #f1f4fa;
  --scr-dim: #9db0d0;
  --scr-accent: #ffcf5c;
  --scr-font: Tahoma, Verdana, sans-serif;
  --dash: #cdb88c;
  --head: #c9b68e;
}
.defs {
  position: absolute;
}

.windshield {
  position: relative;
  overflow: hidden;
  background: #000;
  box-shadow: inset 0 -30px 40px -10px rgba(0, 0, 0, 0.8);
}
.view {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(112deg, transparent 38%, rgba(255, 255, 255, 0.08) 47%, rgba(255, 255, 255, 0.02) 52%, transparent 60%),
    radial-gradient(ellipse at 50% 120%, rgba(0, 0, 0, 0.55), transparent 55%);
}
.pillar {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 11%;
  background: linear-gradient(90deg, #020203, #1d1e21 70%, #08080a);
}
.pillar.left {
  left: 0;
  clip-path: polygon(0 0, 100% 0, 30% 100%, 0 100%);
}
.pillar.right {
  right: 0;
  transform: scaleX(-1);
  clip-path: polygon(0 0, 100% 0, 30% 100%, 0 100%);
}
.car-cayenne .pillar {
  background: linear-gradient(90deg, #5d5038, #cbb88f 70%, #8a7955);
}
.headliner {
  position: absolute;
  left: -5%;
  right: -5%;
  top: 0;
  height: 11%;
  background: linear-gradient(var(--head), color-mix(in srgb, var(--head) 70%, #000));
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
}
.mirror {
  position: absolute;
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(150px, 22vw, 290px);
  height: clamp(38px, 7.5vh, 66px);
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 5px solid #09090a;
  background: linear-gradient(170deg, #dfe8f2 0%, #8996a6 45%, #48525f 46%, #20262e 100%);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.6), inset 0 0 12px rgba(0, 0, 0, 0.5);
  color: rgba(255, 255, 255, 0.75);
  font-size: clamp(6px, 0.75vw, 9px);
  letter-spacing: 1px;
  text-align: center;
}
.mirror::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: 16px;
  height: 40px;
  margin-left: -8px;
  background: #09090a;
}
.mirror span {
  align-self: end;
  padding-bottom: 3px;
}
.dangler {
  position: absolute;
  top: calc(5% + clamp(38px, 7.5vh, 66px));
  left: 50%;
  width: clamp(30px, 4.5vw, 58px);
  transform-origin: top center;
  animation: swing 1.9s ease-in-out infinite alternate;
  filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.5));
}
.dangler svg {
  display: block;
  width: 100%;
}
@keyframes swing {
  from {
    transform: translateX(-50%) rotate(-14deg);
  }
  to {
    transform: translateX(-50%) rotate(14deg);
  }
}

.dash {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: 440px minmax(0, 1fr) 190px;
  gap: 22px;
  align-items: start;
  padding: 58px 22px 28px;
  background: var(--dash);
}
.tex {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.dash::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(0, 0, 0, 0.6), transparent 70px),
    linear-gradient(transparent 55%, rgba(0, 0, 0, 0.55)),
    radial-gradient(ellipse at 50% 0, rgba(255, 255, 255, 0.12), transparent 60%);
}
.car-cayenne .dash::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 44px;
  border-top: 2px dashed rgba(110, 80, 35, 0.75);
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.35));
  pointer-events: none;
}
.trim {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 34px;
  z-index: 0;
  border-bottom: 2px solid #d9dce2;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.55);
  background: linear-gradient(#aeb3ba, #6f747c 55%, #9a9fa7);
}
.trim svg {
  display: none;
}
.car-cayenne .trim svg {
  display: block;
}
.trim::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(255, 255, 255, 0.4), transparent 40%, rgba(0, 0, 0, 0.3));
}

/* GPS på sugkopp */
.gps {
  position: absolute;
  left: 13%;
  bottom: 6%;
  width: clamp(190px, 26vw, 300px);
  transform: rotate(-3deg);
  transform-origin: bottom left;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.6));
}
.gps.ping {
  animation: gps-ping 0.5s ease-out;
}
@keyframes gps-ping {
  30% {
    transform: rotate(-3deg) scale(1.08);
  }
}
.gps-cup {
  width: 34px;
  height: 14px;
  margin: 0 auto -2px;
  border-radius: 50% 50% 4px 4px;
  background: linear-gradient(#3a3c41, #0b0b0d);
}
.gps-body {
  padding: 8px 10px;
  border: 5px solid #0b0b0d;
  border-radius: 10px;
  background: linear-gradient(#0e2a1c, #06140d);
  color: #b9ffcf;
  font-family: Tahoma, Verdana, sans-serif;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.15);
}
.gps-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(185, 255, 207, 0.3);
}
.gps-arrow {
  font-size: 26px;
  line-height: 1;
  color: #fff;
}
.gps-dist {
  font: bold 18px 'Courier New', monospace;
  color: #ffe600;
}
.gps-top i {
  margin-left: auto;
  font-size: 8px;
  letter-spacing: 1px;
  opacity: 0.6;
}
.gps-text {
  margin: 6px 0 0;
  font-size: clamp(11px, 1.15vw, 14px);
  line-height: 1.3;
}

/* rattstång, mätare och ratt */
.pod {
  position: relative;
  height: 400px;
  width: 100%;
  max-width: 440px;
  justify-self: center;
}
.cluster::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 62px;
  width: 290px;
  height: 180px;
  margin-left: -145px;
  border-radius: 150px 150px 36px 36px / 120px 120px 36px 36px;
  background: radial-gradient(ellipse at 50% 0, #1c1d20, #040405 70%);
  box-shadow: 0 -3px 0 rgba(255, 255, 255, 0.08), 0 14px 24px rgba(0, 0, 0, 0.7), inset 0 0 26px #000;
}
.car-cayenne .cluster::before {
  background: radial-gradient(ellipse at 50% 0, #6b4a26, #24160a 75%);
  box-shadow: 0 -2px 0 rgba(255, 230, 180, 0.3), 0 14px 24px rgba(0, 0, 0, 0.6), inset 0 0 26px #000;
}
.gauge {
  position: absolute;
  top: 86px;
  width: 108px;
  left: calc(50% - 114px);
}
.gauge + .gauge {
  left: calc(50% + 6px);
}
.g-num {
  font: bold 15px Arial, sans-serif;
  text-anchor: middle;
}
.g-label {
  font: 11px Arial, sans-serif;
  text-anchor: middle;
  opacity: 0.7;
}
.g-needle {
  fill: #ff3b1f;
  transform-origin: 100px 100px;
  transform: rotate(-120deg);
  transition: transform 0.35s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.lamps {
  position: absolute;
  top: 328px;
  left: calc(50% - 128px);
  width: 84px;
  display: flex;
  flex-wrap: wrap;
  gap: 3px 6px;
  font: bold 8px Arial, sans-serif;
}
.lamp {
  color: #37373a;
}
.lamp.engine {
  color: #ffae00;
  text-shadow: 0 0 8px #ffae00;
  animation: blink 1.3s steps(2) infinite;
}
.lamp.oil,
.lamp.belt {
  color: #e3261b;
  text-shadow: 0 0 6px #e3261b;
}
.lamp.on-green {
  color: #4ee06a;
  text-shadow: 0 0 6px #4ee06a;
}
.lamp.fuel.on {
  color: #ffae00;
  text-shadow: 0 0 8px #ffae00;
}
.odo {
  position: absolute;
  top: 316px;
  left: calc(50% + 48px);
  width: 86px;
  padding: 3px 4px;
  text-align: center;
  background: linear-gradient(#18261a, #0e170f);
  color: #9fe6a8;
  font: 9px 'Courier New', monospace;
  border: 1px solid #000;
  box-shadow: inset 0 0 6px #000;
}
.wheel {
  position: absolute;
  top: 40px;
  left: 50%;
  width: 420px;
  margin-left: -210px;
  pointer-events: none;
  filter: drop-shadow(0 14px 14px rgba(0, 0, 0, 0.65));
}
.wheel-turn {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.18s ease-out;
}
.w-btn {
  font: bold 9px Arial, sans-serif;
  fill: #bbb;
  text-anchor: middle;
}
.w-emblem {
  font: bold 15px Georgia, serif;
  fill: #3a2a10;
  text-anchor: middle;
}
.w-emblem.light {
  font: italic bold 17px Arial, sans-serif;
  fill: #c9ccd2;
  letter-spacing: 2px;
}
.w-airbag {
  font: 7px Arial, sans-serif;
  fill: rgba(255, 255, 255, 0.35);
  text-anchor: middle;
  letter-spacing: 2px;
}

/* mittkonsol */
.console {
  position: relative;
  min-width: 0;
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(160deg, #3a3c41, #141517 60%);
  border: 1px solid #000;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.07), 0 18px 34px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.car-cayenne .console {
  background: linear-gradient(160deg, #fafbfc, #a4a9b1 45%, #6f747c);
  border-color: #4c4f55;
}
.plate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px 9px;
  font-size: 10px;
  letter-spacing: 2px;
  color: #a5a7ab;
}
.car-cayenne .plate {
  color: #24262a;
}
.plate i {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #eee, #555);
  box-shadow: inset 0 0 0 1px #000;
}
.screen {
  position: relative;
  min-height: 430px;
  padding: 16px;
  background: radial-gradient(ellipse at 50% 0, color-mix(in srgb, var(--scr-bg) 80%, #fff 6%), var(--scr-bg) 70%);
  color: var(--scr-fg);
  font-family: var(--scr-font);
  border: 6px solid #020202;
  border-radius: 8px;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.15);
  transition: box-shadow 0.12s;
}
.cockpit.thump .screen {
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.15), 0 0 26px color-mix(in srgb, var(--scr-accent) 70%, transparent);
}
.cockpit.blink .screen {
  border-color: #ff8a00;
}
.screen::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.09) 0, rgba(255, 255, 255, 0.02) 22%, transparent 23%);
}
.car-clio .screen::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(transparent 0 2px, rgba(0, 0, 0, 0.25) 2px 3px);
}
.car-clio .screen {
  text-shadow: 0 0 6px rgba(255, 176, 0, 0.45);
}
.screen h2 {
  margin: 0 0 10px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--scr-accent);
  border-bottom: 1px solid var(--scr-dim);
  padding-bottom: 6px;
}
.screen-body > h2:not(:first-child) {
  margin-top: 22px;
}
.dim {
  color: var(--scr-dim);
}

.hardkeys {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
}
.hardkeys button {
  flex: 1 1 84px;
  min-height: 46px;
  border: 1px solid #000;
  border-radius: 7px;
  background: linear-gradient(#5d6066, #2a2c30 55%, #1a1b1e);
  color: #d8d8d8;
  font-weight: bold;
  font-size: 12px;
  letter-spacing: 1px;
  box-shadow: 0 4px 0 #000, inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.car-cayenne .hardkeys button {
  background: linear-gradient(#fff, #c3c7cd 50%, #8d9199);
  color: #1b1b1b;
  border-color: #4c4f55;
  box-shadow: 0 4px 0 #4c4f55, inset 0 1px 0 #fff;
}
.hardkeys button.active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #000, inset 0 0 12px rgba(0, 0, 0, 0.6);
  color: #ffb000;
  text-shadow: 0 0 8px #ffb000;
}
.car-cayenne .hardkeys button.active {
  color: #b00000;
  text-shadow: none;
}
.climate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 6px 2px;
}
.knob {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background:
    linear-gradient(#fff, #fff) 50% 4px / 3px 12px no-repeat,
    conic-gradient(#3b3d42, #0d0d0f, #5a5d63, #0d0d0f, #3b3d42);
  border: 2px solid #000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6), inset 0 0 0 5px rgba(0, 0, 0, 0.35);
  transition: transform 0.4s;
}
.knob:hover {
  transform: rotate(120deg);
}
.slot {
  flex: 1;
  height: 12px;
  border-radius: 3px;
  background: #020202;
  box-shadow: inset 0 2px 4px #000, 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* passagerarsidan */
.side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding-top: 8px;
}
.vent {
  width: 150px;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.5));
}
.chrono {
  width: 120px;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.55));
}
.lcd-clock {
  display: grid;
  gap: 2px;
  padding: 8px 12px;
  text-align: center;
  background: linear-gradient(#1b2a1d, #0d150e);
  color: #9fe6a8;
  border: 3px solid #050505;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  box-shadow: inset 0 0 10px #000;
}
.lcd-clock b {
  font-size: 30px;
  letter-spacing: 3px;
  white-space: pre;
}
.lcd-clock span {
  font-size: 9px;
}
.hazard {
  width: 58px;
  height: 46px;
  border-radius: 8px;
  border: 2px solid #000;
  background: linear-gradient(#3a0a08, #1c0403);
  color: #7a1a14;
  font-size: 22px;
  box-shadow: 0 4px 0 #000, inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.hazard.on {
  color: #ff5a3c;
}
.cockpit.blink .hazard.on {
  background: linear-gradient(#ff3b1f, #a51206);
  color: #fff;
  box-shadow: 0 4px 0 #000, 0 0 24px #ff3b1f;
}
.emboss {
  font: bold 10px Arial, sans-serif;
  letter-spacing: 3px;
  color: rgba(0, 0, 0, 0.35);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}
.sticker {
  padding: 6px 10px;
  transform: rotate(-5deg);
  background: #fff;
  color: #111;
  border: 2px solid #d6002a;
  font: bold 10px/1.3 Arial, sans-serif;
  text-align: center;
  box-shadow: 2px 3px 6px rgba(0, 0, 0, 0.5);
}

/* kalender */
.cal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.cal-head h2 {
  flex: 1;
  margin: 0;
  border: 0;
  padding: 0;
  text-align: center;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}
.cal-dow {
  padding: 2px 0;
  text-align: center;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--scr-dim);
}
.screen .cal-cell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  min-height: 62px;
  padding: 3px;
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  color: var(--scr-fg);
  border: 1px solid color-mix(in srgb, var(--scr-dim) 45%, transparent);
  font-weight: normal;
  letter-spacing: 0;
  overflow: hidden;
}
.screen .cal-cell.empty {
  background: none;
  border-color: transparent;
}
.screen .cal-cell.today b {
  color: var(--scr-bg);
  background: var(--scr-accent);
  padding: 0 4px;
  align-self: flex-start;
}
.screen .cal-cell.picked {
  outline: 2px solid var(--scr-accent);
  outline-offset: -2px;
}
.cal-cell b {
  font-size: 12px;
}
.pill {
  display: block;
  padding: 1px 3px;
  font: 10px/1.3 Tahoma, sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 2px;
  text-shadow: none;
  border: 1px solid #5aa0ff;
  color: #9cc6ff;
}
.pill.clio.booked {
  background: #2f6fe0;
  color: #fff;
}
.pill.cayenne {
  border-color: #d9dce2;
  color: #e9ecf2;
}
.pill.cayenne.booked {
  background: #d9dce2;
  color: #111;
}
.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
}

/* innehåll på skärmen */

.grid-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.grid-form .wide {
  grid-column: 1 / -1;
}
.field {
  display: grid;
  gap: 4px;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--scr-dim);
}
.screen input,
.screen select {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  font-size: 16px;
  font-family: var(--scr-font);
  color: var(--scr-fg);
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid var(--scr-dim);
  border-radius: 0;
  color-scheme: dark;
}
.screen input:focus,
.screen select:focus,
.screen button:focus-visible {
  outline: 2px solid var(--scr-accent);
  outline-offset: 2px;
}
.screen button {
  min-height: 44px;
  padding: 8px 12px;
  font-family: var(--scr-font);
  font-weight: bold;
  letter-spacing: 1px;
  color: var(--scr-bg);
  background: var(--scr-accent);
  border: 0;
}
.screen button:active {
  transform: translateY(2px);
}
.screen a.mini {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  font-weight: bold;
  letter-spacing: 1px;
  text-decoration: none;
}
.screen a.mini,
.screen button.mini {
  min-height: 36px;
  font-size: 11px;
  background: none;
  color: var(--scr-fg);
  border: 1px solid var(--scr-dim);
}
.screen button.armed {
  background: #ff3b2f;
  color: #fff;
  border-color: #fff;
  animation: blink 0.5s steps(2) infinite;
}
.screen button.danger {
  color: #ff6b5e;
  border-color: #ff6b5e;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.list > li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--scr-dim);
}
.list > li.dim {
  border-style: dashed;
}
.list > li.booked {
  border-color: var(--scr-accent);
}
.line {
  flex: 1 1 200px;
  min-width: 0;
  display: grid;
  gap: 2px;
  font-size: 13px;
  text-align: left;
}
.line b {
  font-size: 16px;
  text-transform: uppercase;
}
.line .who {
  color: var(--scr-dim);
}
.status {
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 1px;
  color: var(--scr-accent);
}

.presets > li {
  padding: 0;
  border: 0;
}
.screen button.preset {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 10px;
  background: none;
  color: var(--scr-fg);
  border: 1px solid var(--scr-dim);
}
.screen button.preset i {
  flex: none;
  width: 44px;
  font: bold 20px var(--scr-font);
  color: var(--scr-accent);
}
.screen button.preset.on {
  background: var(--scr-accent);
  color: var(--scr-bg);
}
.screen button.preset.on i,
.screen button.preset.on .who {
  color: var(--scr-bg);
}

.gear {
  margin-top: 14px;
  padding: 12px;
  border: 2px solid var(--scr-accent);
  text-align: center;
}
.gear p {
  margin: 0 0 10px;
}
.prnd {
  display: flex;
  justify-content: space-between;
  padding: 0 12px;
  font: bold 22px var(--scr-font);
}
.gear input[type='range'] {
  padding: 0;
  height: 48px;
  border: 0;
  background: none;
  accent-color: var(--scr-accent);
}
.hgate {
  display: grid;
  grid-template-columns: repeat(3, 58px);
  gap: 10px 22px;
  justify-content: center;
  margin-bottom: 14px;
}
.screen .hgate button {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  font-size: 20px;
  background: none;
  color: var(--scr-fg);
  border: 2px solid var(--scr-fg);
}
.screen button.clutch {
  width: 100%;
  min-height: 60px;
  font-size: 18px;
  border-radius: 6px 6px 22px 22px;
  box-shadow: 0 6px 0 var(--scr-dim);
}
.screen button.clutch.down {
  transform: translateY(5px);
  box-shadow: 0 1px 0 var(--scr-dim);
  filter: brightness(0.6);
}

.screen input[type='range'] {
  padding: 0;
  border: 0;
  background: none;
  accent-color: var(--scr-accent);
}
.scale {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0;
}
.scale i {
  font-style: normal;
}
.mix-readout {
  margin: 8px 0 14px;
  padding: 8px 10px;
  border: 1px solid var(--scr-dim);
  font-weight: bold;
  color: var(--scr-accent);
}
.radio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

@media (max-width: 1180px) {
  .dash {
    grid-template-columns: 400px minmax(0, 1fr);
  }
  .side {
    display: none;
  }
}

@media (max-width: 860px) {
  .cockpit {
    grid-template-rows: clamp(170px, 30vh, 300px) 1fr;
  }
  .dash {
    grid-template-columns: minmax(0, 1fr);
    padding: 48px 10px 0;
  }
  .console {
    order: -1;
  }
  .pod {
    height: 330px;
  }
  .gps {
    left: 4%;
    bottom: 4%;
    width: 46%;
  }
  .screen {
    padding: 12px;
  }
  .screen .cal-cell {
    min-height: 54px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* --- Mini Cooper: racinggrön, krom och vippströmbrytare --- */
.cockpit.car-mini {
  --scr-bg: #1a0f08;
  --scr-fg: #ffd9a0;
  --scr-dim: #b98f5a;
  --scr-accent: #ff7a1a;
  --scr-font: 'Trebuchet MS', Verdana, sans-serif;
  --dash: #1c3a2b;
  --head: #e9e4d4;
}
.car-mini .pillar {
  background: linear-gradient(90deg, #0d2419, #1f7a4d 70%, #123823);
}
.car-mini .cluster::before {
  background: radial-gradient(ellipse at 50% 0, #2c3f35, #0a120e 75%);
  box-shadow: 0 -2px 0 rgba(255, 255, 255, 0.25), 0 14px 24px rgba(0, 0, 0, 0.6), inset 0 0 26px #000;
}
.car-mini .console {
  background: linear-gradient(160deg, #f5f1e4, #b9b4a4 45%, #7d7969);
  border-color: #3d3b33;
  border-radius: 26px;
}
.car-mini .plate {
  color: #1c3a2b;
}
.car-mini .hardkeys button {
  background: linear-gradient(#fdfdfd, #cfd2d6 50%, #8f9399);
  color: #12241c;
  border-color: #3d3b33;
  border-radius: 999px;
  box-shadow: 0 4px 0 #3d3b33, inset 0 1px 0 #fff;
}
.car-mini .hardkeys button.active {
  color: #c8102e;
  text-shadow: none;
}
.toggles {
  display: flex;
  gap: 6px;
  justify-content: center;
}
.toggles span {
  display: grid;
  justify-items: center;
  gap: 4px;
  font-size: 7px;
  letter-spacing: 1px;
  color: #cfd6cf;
}
.toggles i {
  width: 10px;
  height: 26px;
  border-radius: 5px;
  background: linear-gradient(90deg, #8d9199, #fff 45%, #6f747c);
  box-shadow: 0 3px 4px rgba(0, 0, 0, 0.6);
  transform-origin: 50% 0;
  transform: perspective(40px) rotateX(-18deg);
}
.toggles span:nth-child(even) i {
  transform: perspective(40px) rotateX(18deg);
}
.pill.mini {
  border-color: #3fbf7f;
  color: #9ff0c4;
}
.pill.mini.booked {
  background: #1f7a4d;
  color: #fff;
}
.pill.free {
  border-color: #8a8f98;
  color: #c9ced6;
  border-style: dashed;
}
.car-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}
.car-pick button {
  flex: 1 1 120px;
  padding: 10px 8px;
  border: 1px solid var(--scr-dim);
  background: transparent;
  color: var(--scr-fg);
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.car-pick button b {
  display: block;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.car-pick button small {
  color: var(--scr-dim);
}
.car-pick button.on {
  border-color: var(--scr-accent);
  box-shadow: inset 0 0 0 2px var(--scr-accent);
}

/* --- påskägget: Majed kikar fram, och spelet MAJED CRUISING 3D --- */
.peek {
  position: absolute;
  right: 17%;
  bottom: 0;
  width: 54px;
  height: 46px;
  padding: 0;
  border: 0;
  background: none;
  overflow: hidden;
  cursor: pointer;
  z-index: 3;
}
.peek span {
  display: block;
  font-size: 40px;
  line-height: 46px;
  transform: translateY(100%);
  animation: peek 23s ease-in-out 6s infinite;
}
.peek:hover span,
.peek:focus-visible span {
  animation: none;
  transform: translateY(18%);
}
@keyframes peek {
  0%, 78%, 100% { transform: translateY(100%); }
  82%, 94% { transform: translateY(22%); }
  88% { transform: translateY(34%) rotate(-8deg); }
}
.cruise {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: #000;
  font-family: 'Trebuchet MS', Verdana, sans-serif;
  color: #fff;
  touch-action: none;
  user-select: none;
}
.cruise canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.cruise-hud {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 60px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  font-size: 14px;
  font-weight: bold;
  text-shadow: 0 2px 0 #000;
}
.cruise-hud > span {
  padding: 4px 9px;
  background: rgba(10, 6, 30, 0.7);
  border: 1px solid #ff4fa3;
  border-radius: 999px;
}
.cruise-hud .cruise-rust {
  position: relative;
  width: 130px;
  height: 24px;
  padding: 0;
  overflow: hidden;
  border-color: #a0521b;
}
.cruise-rust i {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, #7a3b12, #e8762c);
}
.cruise-rust b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  letter-spacing: 2px;
}
.cruise-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  z-index: 3;
}
.cruise-float {
  position: absolute;
  left: 0;
  right: 0;
  top: 30%;
  display: grid;
  justify-items: center;
  pointer-events: none;
}
.cruise-float b {
  grid-area: 1 / 1;
  font-size: clamp(22px, 5vw, 44px);
  letter-spacing: 2px;
  text-shadow: 0 3px 0 #000, 0 0 18px #000;
  animation: cruise-float 1.5s ease-out forwards;
}
.cruise-float .good { color: #7dffb0; }
.cruise-float .bad { color: #ff6a5c; }
@keyframes cruise-float {
  from { opacity: 1; transform: translateY(20px) scale(0.8); }
  to { opacity: 0; transform: translateY(-70px) scale(1.15); }
}
.cruise-pad {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 10px;
}
.cruise-pad button {
  min-width: 54px;
  height: 54px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 14px;
  background: rgba(10, 6, 30, 0.55);
  color: #fff;
  font: bold 18px 'Trebuchet MS', sans-serif;
  cursor: pointer;
}
.cruise-pad .honk {
  padding: 0 18px;
  border-color: #ffe14d;
  color: #ffe14d;
}
.cruise-pad button:active {
  background: rgba(255, 79, 163, 0.6);
}
.cruise-panel {
  position: absolute;
  inset: 0;
  display: none;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 24px;
  background: rgba(8, 4, 24, 0.86);
  text-align: center;
  overflow: auto;
}
.cruise-panel.open {
  display: grid;
}
.cruise-panel h1 {
  margin: 0;
  font-size: clamp(30px, 7vw, 64px);
  font-style: italic;
  letter-spacing: 2px;
  background: linear-gradient(#ffe14d, #ff4fa3);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 0 #2a0b4a);
}
.cruise-panel .sub {
  margin: 0;
  letter-spacing: 3px;
  font-size: 12px;
  color: #ffb3d9;
}
.cruise-panel p {
  margin: 0;
}
.cruise-panel ul {
  margin: 6px 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  max-width: 520px;
  text-align: left;
  font-size: 14px;
}
.cruise-panel .score {
  font-size: 26px;
  font-weight: bold;
  color: #ffe14d;
}
.cruise-panel button {
  padding: 12px 26px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(#ffe14d, #ff9a1f);
  color: #1a0b2e;
  font: bold 16px 'Trebuchet MS', sans-serif;
  letter-spacing: 2px;
  cursor: pointer;
}
.cruise-panel button:disabled {
  background: #4a4560;
  color: #9a96ad;
  cursor: default;
}
.cruise-shop li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid #5b3a8a;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}
.cruise-shop small {
  display: block;
  color: #c9b8e8;
}
.cruise-shop button {
  flex: none;
  padding: 8px 14px;
  font-size: 13px;
  letter-spacing: 0;
}

/* --- släpbackningen är låst: ingen markering, kopiering, zoom eller scroll, bara spelet --- */
body[data-scene='lot'] {
  position: fixed;
  inset: 0;
  overflow: hidden;
  overscroll-behavior: none;
}
.captcha,
.captcha * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
.captcha {
  height: 100dvh;
  overflow: hidden;
  touch-action: none;
}
.captcha .adult {
  touch-action: manipulation;
}
@media (pointer: coarse), (max-height: 760px) {
  .captcha {
    gap: 6px;
    padding: 8px 8px 12px;
  }
  .captcha-head h2 {
    font-size: 17px;
    margin: 3px 0 0;
  }
  .captcha-head p {
    font-size: 13px;
  }
  .captcha-hint {
    display: none;
  }
  /* banan krymper så att rubrik, mätare och pedaler alltid får plats utan scroll */
  .captcha canvas {
    height: min(calc(100dvh - 285px), 760px);
    min-height: 200px;
  }
  .captcha .adult {
    padding: 6px 12px;
    font-size: 13px;
  }
}

.audio-debug {
  position: fixed;
  left: 4px;
  top: 4px;
  z-index: 200;
  margin: 0;
  padding: 6px 8px;
  max-width: calc(100vw - 8px);
  background: rgba(0, 0, 0, 0.85);
  color: #7dffb0;
  font: 10px/1.35 ui-monospace, Menlo, monospace;
  white-space: pre-wrap;
  pointer-events: none;
}
