.drone-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-bottom: 48px;
}

.hero {
  padding: 52px 20px 12px;
}

.section-subtitle,
.mission-hint {
  margin: 0;
  color: #cfd8ff;
  font-size: 1rem;
  text-align: center;
  padding: 0 16px;
}

.mission-hint {
  color: #ffd166;
  font-size: 0.95rem;
}

.toast {
  margin: 0;
  min-height: 1.3em;
  color: #06d6a0;
  font-weight: bold;
  text-align: center;
}

.viewport {
  position: relative;
  width: min(96vw, 720px);
  height: min(48vh, 440px);
  min-height: 300px;
  overflow: hidden;
  perspective: 900px;
  perspective-origin: 50% 42%;
  background: linear-gradient(180deg, #5e9fd4 0%, #9ecce8 38%, #c5d9a8 78%, #7dae62 100%);
  user-select: none;
}

.sky {
  position: absolute;
  inset: 0 0 36% 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.sun {
  position: absolute;
  top: 18px;
  right: 28px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff6c2, #ffd166 55%, #f7b267);
  box-shadow: 0 0 28px rgba(255, 209, 102, 0.7);
}

.cloud {
  position: absolute;
  height: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  animation: drift 32s linear infinite;
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  background: inherit;
  border-radius: 50%;
}

.cloud::before {
  width: 22px;
  height: 22px;
  top: -12px;
  left: 12px;
}

.cloud::after {
  width: 16px;
  height: 16px;
  top: -8px;
  right: 10px;
}

.cloud-a {
  top: 28px;
  width: 70px;
  left: -80px;
}

.cloud-b {
  top: 58px;
  width: 54px;
  left: -80px;
  animation-duration: 40s;
  animation-delay: -12s;
  opacity: 0.75;
}

.cloud-c {
  top: 40px;
  width: 62px;
  left: -80px;
  animation-duration: 36s;
  animation-delay: -22s;
  opacity: 0.9;
}

@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(820px); }
}

.hud {
  position: absolute;
  inset: 10px 10px auto;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.minimap {
  position: relative;
  width: 108px;
  height: 108px;
  border-radius: 10px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 22px 16px at 32% 30%, #2f8bb8 0 55%, transparent 58%),
    #4d9a48;
  border: 2px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.mm-north {
  position: absolute;
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  z-index: 2;
}

.mm-dot {
  position: absolute;
  width: 7px;
  height: 7px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
}

.mm-dot.tree { background: #1f6b32; }
.mm-dot.house { background: #ef476f; }
.mm-dot.pad { width: 10px; height: 10px; margin: -5px 0 0 -5px; background: #e8edf2; }
.mm-dot.field { width: 12px; height: 8px; margin: -4px 0 0 -6px; border-radius: 1px; background: #cde8c8; }
.mm-dot.ring {
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  background: transparent;
  border: 2px solid #ffd166;
  border-radius: 50%;
}
.mm-dot.ring.passed { border-color: #06d6a0; }

.minimap-drone {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 12px solid #ffd166;
  margin-left: -5px;
  margin-top: -8px;
  z-index: 3;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.4));
}

.alt-meter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #1b1035;
  font-size: 0.7rem;
  font-weight: bold;
}

.alt-track {
  width: 10px;
  height: 88px;
  border-radius: 6px;
  background: rgba(27, 16, 53, 0.2);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.alt-fill {
  width: 100%;
  height: 20%;
  background: linear-gradient(180deg, #ffd166, #06d6a0);
}

.alt-meter.goal .alt-track {
  box-shadow: 0 0 10px rgba(255, 209, 102, 0.9);
}

.mm-target {
  position: absolute;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border: 2px solid #ffd166;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255, 209, 102, 0.9);
  animation: ringPulse 1.2s ease-in-out infinite;
  z-index: 2;
}

.camera,
.world,
.ground,
.drone {
  transform-style: preserve-3d;
}

.camera {
  position: absolute;
  inset: 0;
  z-index: 1;
  transform: translateZ(-70px);
}

.world {
  position: absolute;
  left: 50%;
  top: 70%;
  width: 0;
  height: 0;
  will-change: transform;
}

.ground {
  position: absolute;
  left: 0;
  top: 0;
  width: 1400px;
  height: 1400px;
  background:
    radial-gradient(ellipse 200px 150px at 32% 30%, #2f8bb8 0 48%, #47a8c4 62%, transparent 64%),
    repeating-linear-gradient(32deg, #4d9a48 0 22px, #5aaa54 22px 44px);
  box-shadow: 0 0 0 22px #3d7a3a, 0 18px 40px rgba(0, 0, 0, 0.35);
}

.helipad {
  position: absolute;
  width: 108px;
  height: 108px;
  margin: -54px 0 0 -54px;
  border-radius: 50%;
  background: #5c6673;
  border: 7px solid #eef2f6;
  box-shadow: inset 0 0 0 4px #5c6673;
}

.helipad::after {
  content: "H";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #eef2f6;
  font-size: 42px;
  font-weight: bold;
}

.pond-shine {
  position: absolute;
  width: 170px;
  height: 120px;
  margin: -60px 0 0 -85px;
  border-radius: 50%;
  background: linear-gradient(180deg, transparent 30%, rgba(255, 255, 255, 0.18));
  pointer-events: none;
}

.soccer {
  position: absolute;
  width: 210px;
  height: 140px;
  margin: -70px 0 0 -105px;
  background: #3d8f3a;
  border: 3px solid #f4f7f2;
  box-shadow: inset 0 0 0 40px transparent;
}

.soccer::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border: 2px solid #f4f7f2;
  border-radius: 50%;
}

.soccer::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: #f4f7f2;
}

.path {
  position: absolute;
  height: 18px;
  background: #c4a574;
  border-radius: 10px;
  transform-origin: 0 50%;
}

.flowers {
  position: absolute;
  width: 70px;
  height: 70px;
  margin: -35px 0 0 -35px;
  background:
    radial-gradient(circle at 30% 40%, #ef476f 0 6px, transparent 7px),
    radial-gradient(circle at 62% 32%, #ffd166 0 6px, transparent 7px),
    radial-gradient(circle at 50% 62%, #4d7cff 0 6px, transparent 7px),
    radial-gradient(circle at 72% 58%, #ef476f 0 5px, transparent 6px),
    radial-gradient(circle at 38% 70%, #ffd166 0 5px, transparent 6px);
}

.drone-shadow {
  position: absolute;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  background: rgba(20, 30, 20, 0.32);
  border-radius: 50%;
  filter: blur(4px);
  pointer-events: none;
}

.prop {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 50% 100%;
  transform-style: preserve-3d;
}

.tree {
  width: 38px;
  height: 74px;
}

.tree-trunk {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 8px;
  height: 22px;
  margin-left: -4px;
  background: linear-gradient(90deg, #6b4423, #8b5a2b);
}

.tree-crown {
  position: absolute;
  bottom: 16px;
  left: 50%;
  width: 38px;
  height: 44px;
  margin-left: -19px;
  border-radius: 50% 50% 42% 42%;
  background: radial-gradient(circle at 38% 34%, #8ed56f, #2f8a3a 70%);
}

.house {
  width: 56px;
  height: 60px;
}

.house-wall {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 56px;
  height: 34px;
  background: #f0d7b6;
}

.house-door {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 12px;
  height: 16px;
  margin-left: -6px;
  background: #8b5a2b;
}

.house-roof {
  position: absolute;
  bottom: 30px;
  left: 0;
  width: 0;
  height: 0;
  border-left: 28px solid transparent;
  border-right: 28px solid transparent;
  border-bottom: 26px solid #ef476f;
}

.slide {
  width: 50px;
  height: 56px;
}

.slide-ladder {
  position: absolute;
  bottom: 0;
  left: 6px;
  width: 8px;
  height: 40px;
  background: repeating-linear-gradient(#4d7cff 0 4px, #cfd8ff 4px 8px);
}

.slide-ramp {
  position: absolute;
  bottom: 4px;
  left: 10px;
  width: 36px;
  height: 10px;
  background: #06d6a0;
  transform: rotate(-32deg);
  transform-origin: left center;
  border-radius: 4px;
}

.turbine-mini {
  width: 18px;
  height: 70px;
}

.turbine-pole {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 5px;
  height: 48px;
  margin-left: -2px;
  background: #cbd5e1;
}

.turbine-rotor {
  position: absolute;
  bottom: 42px;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  transform-origin: 50% 50%;
  animation: spin 1.6s linear infinite;
}

.turbine-blade {
  position: absolute;
  left: 3px;
  bottom: 5px;
  width: 4px;
  height: 22px;
  background: #e2e8f0;
  transform-origin: 50% 100%;
}

.turbine-blade.b2 {
  transform: rotate(120deg);
}

.turbine-blade.b3 {
  transform: rotate(240deg);
}

.sky-ring {
  position: absolute;
  width: 70px;
  height: 70px;
  margin: -35px 0 0 -35px;
  border: 7px solid #ffd166;
  border-radius: 50%;
  box-shadow: 0 0 14px rgba(255, 209, 102, 0.75);
  animation: ringPulse 1.6s ease-in-out infinite;
  transform-origin: 50% 50%;
  transform-style: preserve-3d;
}

.sky-ring.passed {
  border-color: #06d6a0;
  box-shadow: 0 0 14px rgba(6, 214, 160, 0.7);
  animation: none;
}

@keyframes ringPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(255, 209, 102, 0.5); }
  50% { box-shadow: 0 0 22px rgba(255, 209, 102, 1); }
}

.drone {
  position: absolute;
  left: 0;
  top: 0;
  width: 48px;
  height: 48px;
  will-change: transform;
}

.drone-body {
  position: absolute;
  left: 14px;
  top: 15px;
  width: 20px;
  height: 18px;
  border-radius: 5px;
  background: linear-gradient(180deg, #e8edf4, #64748b);
  transform: translateZ(3px);
}

.drone-cam {
  position: absolute;
  left: 50%;
  top: -5px;
  width: 8px;
  height: 6px;
  margin-left: -4px;
  border-radius: 2px;
  background: #1b1035;
}

.drone-cam.flash {
  background: #fff;
  box-shadow: 0 0 18px 6px rgba(255, 255, 255, 0.9);
}

.drone-led {
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 5px;
  height: 5px;
  margin-left: -2px;
  border-radius: 50%;
  background: #ef476f;
  box-shadow: 0 0 6px #ef476f;
}

.drone-arm {
  position: absolute;
  left: 8px;
  top: 22px;
  width: 32px;
  height: 4px;
  background: #475569;
  border-radius: 2px;
}

.arm-ne { transform: rotate(45deg); }
.arm-nw { transform: rotate(-45deg); }

.rotor {
  position: absolute;
  width: 18px;
  height: 18px;
  transform: translateZ(6px);
}

.rotor span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0 18%,
    rgba(255, 255, 255, 0.55) 28%,
    transparent 40% 68%,
    rgba(226, 232, 240, 0.5) 78%,
    transparent 90%
  );
  animation: spin 0.28s linear infinite;
}

.drone.flying .rotor span {
  animation-duration: 0.09s;
}

.r-ne { left: 30px; top: -2px; }
.r-nw { left: 0; top: -2px; }
.r-se { left: 30px; top: 32px; }
.r-sw { left: 0; top: 32px; }

.drone-skid {
  position: absolute;
  top: 18px;
  width: 4px;
  height: 22px;
  background: #334155;
  border-radius: 2px;
  transform: translateZ(-4px);
}

.skid-l { left: 10px; }
.skid-r { right: 10px; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

.transmitter {
  width: min(96vw, 420px);
  margin-top: 8px;
  padding: 16px 16px 18px;
  border-radius: 28px;
  background: linear-gradient(180deg, #2c3548, #1a2230);
  border: 1px solid rgba(255, 255, 255, 0.1);
  touch-action: none;
  user-select: none;
}

.tx-lcd {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 8px 14px;
  border-radius: 8px;
  background: #0c1c16;
  color: #6dffb0;
  font-size: 0.9rem;
}

.photo-btn {
  display: block;
  width: 100%;
  margin-bottom: 14px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
}

.photo-btn:hover,
.photo-btn:active {
  background: linear-gradient(90deg, #ffd166, #ef476f);
  color: #1b1035;
  border-color: transparent;
}

.tx-sticks {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.tx-stick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.stick-label {
  margin: 0;
  font-size: 0.8rem;
  color: #cfd8ff;
}

.stick-pad {
  position: relative;
  width: 148px;
  height: 148px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #3d4a5e, #222a38);
  border: 3px solid #4a5568;
}

.stick-btn {
  position: absolute;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  touch-action: none;
}

.stick-btn.active {
  background: linear-gradient(90deg, #ffd166, #ef476f);
  color: #1b1035;
}

.stick-up {
  top: 8px;
  left: 50%;
  margin-left: -22px;
}

.stick-down {
  bottom: 8px;
  left: 50%;
  margin-left: -22px;
}

.stick-left {
  left: 8px;
  top: 50%;
  margin-top: -22px;
}

.stick-right {
  right: 8px;
  top: 50%;
  margin-top: -22px;
}

.stick-nub {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  background: linear-gradient(180deg, #9aa5b5, #4a5568);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.25);
  pointer-events: none;
}

.restart-btn {
  margin-top: 6px;
  padding: 10px 28px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
}

.restart-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.mission-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 720px;
  padding: 0 12px;
}

.mission-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #cfd8ff;
  font-size: 0.82rem;
  cursor: pointer;
}

.mission-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.mission-btn.focus {
  background: linear-gradient(90deg, #ffd166, #ef476f);
  color: #1b1035;
  border-color: transparent;
  font-weight: bold;
}

.mission-btn.done {
  background: linear-gradient(90deg, #06d6a0, #4d7cff);
  color: #1b1035;
  border-color: transparent;
}

.mission-check {
  display: none;
  font-weight: bold;
}

.mission-btn.done .mission-check {
  display: inline;
}

.mission-beacon {
  position: absolute;
  width: 22px;
  height: 78px;
  transform-origin: 50% 100%;
  pointer-events: none;
}

.beacon-pole {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 4px;
  height: 62px;
  margin-left: -2px;
  background: #ffd166;
}

.beacon-glow {
  position: absolute;
  top: 0;
  left: 50%;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  border-radius: 50%;
  background: #ffd166;
  box-shadow: 0 0 16px #ffd166;
  animation: ringPulse 1.2s ease-in-out infinite;
}

.polaroid {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 6;
  width: 110px;
  padding: 8px 8px 12px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transform: scale(0.7) rotate(-8deg);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.polaroid.active {
  transform: scale(1) rotate(-4deg);
  opacity: 1;
}

.polaroid-shot {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(180deg, #6eb6e8, #c5d9a8);
}

.polaroid-shot[data-tone="house"] {
  background: linear-gradient(180deg, #9ecce8 40%, #f0d7b6 41%, #ef476f 70%);
}

.polaroid-shot[data-tone="pond"] {
  background: radial-gradient(circle at 40% 45%, #7ec8e3, #2f8bb8 70%);
}

.polaroid-shot[data-tone="field"] {
  background: linear-gradient(180deg, #7dae62, #3d8f3a);
}

.polaroid-caption {
  margin: 6px 0 0;
  font-size: 0.7rem;
  color: #1b1035;
  text-align: center;
  font-weight: bold;
}

@media (max-width: 420px) {
  .stick-pad {
    width: 132px;
    height: 132px;
  }

  .stick-btn {
    width: 40px;
    height: 40px;
  }

  .stick-up,
  .stick-down {
    margin-left: -20px;
  }

  .stick-left,
  .stick-right {
    margin-top: -20px;
  }
}
