:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #d2ecff;
}

#c {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  outline: none;
  cursor: grab;
}

#c:active {
  cursor: grabbing;
}

/* On-screen drive + camera hints (does not block clicks on the canvas) */
.drive-hint {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: min(94vw, 440px);
  pointer-events: none;
  user-select: none;
}

.drive-hint__panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 14px;
  border-radius: 12px;
  border: 2px solid #14532d;
  background: rgba(248, 250, 252, 0.94);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.28);
  color: #0f172a;
  font: 600 13px/1.45 Tahoma, "MS Sans Serif", system-ui, sans-serif;
}

.drive-hint--hidden {
  display: none;
}

.drive-hint__arrows {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  filter: drop-shadow(0 2px 2px rgba(15, 23, 42, 0.2));
}

.drive-hint__mid {
  display: flex;
  gap: 22px;
  align-items: center;
}

.drive-hint__chev {
  display: inline-block;
  font-size: 18px;
  line-height: 1;
  color: #14532d;
  opacity: 0.92;
}

.drive-hint__chev--up {
  margin-bottom: -2px;
}

.drive-hint__chev--down {
  margin-top: -2px;
}

.drive-hint__caption {
  margin: 0;
  text-align: center;
  letter-spacing: 0.02em;
}

.drive-hint__kbd {
  display: inline-block;
  padding: 1px 6px 2px;
  font: 700 12px/1.2 "Courier New", Courier, monospace;
  color: #0f172a;
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  border: 2px solid #334155;
  border-radius: 4px;
  box-shadow: 0 1px 0 #fff inset;
}

/* Help / settings: reopen drive + camera instructions (patron only) */
.help-settings {
  position: fixed;
  z-index: 72;
  top: max(10px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  width: 44px;
  height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #14532d;
  border-radius: 50%;
  background: rgba(248, 250, 252, 0.94);
  color: #14532d;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.22);
  cursor: pointer;
  pointer-events: auto;
}

.help-settings:hover {
  filter: brightness(0.97);
}

.help-settings:focus-visible {
  outline: 2px solid #14532d;
  outline-offset: 3px;
}

.help-settings--hidden {
  display: none;
}

.help-settings__icon {
  display: block;
}

/* CRT / TV pop-out (same aspect as kiosk texture) */
.kiosk-popout {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 50;
  pointer-events: auto;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.45));
}

.kiosk-popout--hidden {
  display: none;
}

.kiosk-popout__frame {
  position: relative;
  width: min(44vw, 520px);
}

.kiosk-popout__screen {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(70vh, 540px);
  border-radius: 4px;
  border: 4px solid #2d6a4f;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  cursor: default;
  touch-action: manipulation;
}

/* One-time “parked” celebration */
.park-celebration {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 14, 22, 0.45);
  backdrop-filter: blur(3px);
  pointer-events: auto;
}

.park-celebration--hidden {
  display: none;
}

.park-celebration__panel {
  max-width: 420px;
  padding: 28px 26px 22px;
  text-align: center;
  background: linear-gradient(165deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 14px;
  border: 3px solid #2d6a4f;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  animation: park-celebration-pop 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes park-celebration-pop {
  from {
    transform: scale(0.88);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.park-celebration__check {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  line-height: 56px;
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  background: #2d6a4f;
  border-radius: 50%;
}

.park-celebration__title {
  margin: 0 0 10px;
  font: 700 17px/1.25 Tahoma, "MS Sans Serif", system-ui, sans-serif;
  color: #0f172a;
}

.park-celebration__lead {
  margin: 0 0 12px;
  font: 15px/1.4 Tahoma, "MS Sans Serif", system-ui, sans-serif;
  color: #1e293b;
}

.park-celebration__hint {
  margin: 0 0 20px;
  font: 15px/1.45 Tahoma, "MS Sans Serif", system-ui, sans-serif;
  color: #334155;
}

.park-celebration__ok {
  padding: 10px 28px;
  font: 700 15px Tahoma, "MS Sans Serif", system-ui, sans-serif;
  color: #fff;
  background: #2d6a4f;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.park-celebration__ok:hover {
  filter: brightness(1.08);
}
