* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  background: #0a0a12;
  font-family: 'Trebuchet MS', 'Arial Rounded MT Bold', sans-serif;
  color: #fff;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}

#debug-overlay { display: none; }

#game-root {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#game {
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100vh;
  display: block;
  image-rendering: pixelated;
  background: #1a1030;
}

.hidden { display: none !important; }

/* HUD */
#hud {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 18px;
  pointer-events: none;
  z-index: 10;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}
.hud-left, .hud-right { display: flex; gap: 12px; align-items: center; pointer-events: auto; }
.hud-right { flex-direction: column; align-items: flex-end; }

#lives { display: flex; gap: 6px; font-size: 28px; }
.heart { color: #ff3b6b; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.6)); }
.heart.lost { color: #333; filter: none; opacity: 0.4; }

#score {
  background: rgba(0,0,0,0.55);
  border: 2px solid #7cffcb;
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 18px;
  font-weight: bold;
  color: #7cffcb;
  letter-spacing: 1px;
}

#sprint-bar, #vacuum-bar {
  position: relative;
  width: 130px;
  height: 16px;
  background: rgba(0,0,0,0.55);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #555;
}
#sprint-bar span, #vacuum-bar span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1px;
  z-index: 2;
  color: #fff;
}
#sprint-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #ffb300, #ff6b00); transition: width 0.1s linear; }
#vacuum-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #7cffcb, #00c6ff); transition: width 0.1s linear; }

#pause-btn {
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 10px;
  width: 44px;
  height: 44px;
  font-size: 14px;
  cursor: pointer;
  pointer-events: auto;
}
#pause-btn:active { transform: scale(0.95); }

/* Touch — only shown on coarse pointer devices (mobile/tablet). */
#touch-controls {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 9;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 20px;
}
@media (hover: hover) and (pointer: fine) {
  /* Hide on actual desktop/laptop (mouse-driven). */
  #touch-controls { display: none !important; }
}
.touch-left, .touch-right {
  display: flex;
  gap: 14px;
  pointer-events: auto;
}
.touch-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.7);
  background: rgba(0,0,0,0.35);
  color: #fff;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
}
.touch-btn:active, .touch-btn.active {
  background: rgba(124, 255, 203, 0.5);
  transform: scale(0.92);
}
.touch-btn.touch-jump { width: 96px; height: 96px; font-size: 40px; }

/* Overlays (Menüs) */
.overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(30,0,50,0.85), rgba(0,0,0,0.95));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  padding: 20px;
}
.panel {
  background: linear-gradient(180deg, #2b1645, #170825);
  border: 3px solid #7cffcb;
  border-radius: 20px;
  padding: 28px 36px;
  min-width: 320px;
  max-width: 92vw;
  text-align: center;
  box-shadow: 0 0 40px rgba(124,255,203,0.25), inset 0 0 30px rgba(124,255,203,0.05);
}
.panel h1 {
  font-size: 56px;
  color: #a4f08a;
  text-shadow:
    0 0 10px #a4f08a,
    0 0 20px #7cff3a,
    0 0 40px #3a8a1a,
    3px 6px 0 #1a3a0a;
  line-height: 1;
  letter-spacing: 2px;
  margin-bottom: 18px;
  font-family: 'Frijole', 'Trebuchet MS', sans-serif;
}
.panel h1 .subtitle {
  display: block;
  font-size: 40px;
  color: #d8ff5a;
  margin-top: 10px;
  letter-spacing: 6px;
  font-family: 'Frijole', sans-serif;
  text-shadow: 0 0 8px #d8ff5a, 0 0 20px #7cff3a, 2px 4px 0 #1a3a0a;
}
.panel h2 {
  font-size: 32px;
  color: #a4f08a;
  margin-bottom: 16px;
  letter-spacing: 3px;
  font-family: 'Frijole', sans-serif;
  text-shadow: 0 0 10px #7cff3a, 0 0 20px #3a8a1a, 2px 3px 0 #1a3a0a;
}

.zombie-title {
  font-family: 'Frijole', 'Trebuchet MS', sans-serif !important;
  color: #a4f08a !important;
  text-shadow:
    0 0 10px #a4f08a,
    0 0 20px #7cff3a,
    0 0 40px #3a8a1a,
    2px 4px 0 #1a3a0a !important;
  position: relative;
}
/* Slime drops hanging off the title */
.zombie-title::after {
  content: '';
  position: absolute;
  left: 10%; right: 10%;
  bottom: -14px;
  height: 22px;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 6px 12px at 10% 0, #a4f08a 95%, transparent 100%),
    radial-gradient(ellipse 8px 20px at 35% 0, #8fc04a 95%, transparent 100%),
    radial-gradient(ellipse 5px 14px at 60% 0, #7cff3a 95%, transparent 100%),
    radial-gradient(ellipse 7px 18px at 85% 0, #a4f08a 95%, transparent 100%);
  filter: drop-shadow(0 0 4px #7cff3a) drop-shadow(0 2px 0 #1a3a0a);
  animation: slime-drip 3.5s ease-in-out infinite;
  transform-origin: top center;
}
.panel p {
  color: #e4d8ff;
  margin-bottom: 16px;
  font-size: 15px;
  line-height: 1.4;
}
.panel p.hint {
  font-size: 12px;
  color: #b8a8d8;
  margin-top: 18px;
  line-height: 1.6;
}
@keyframes radioactive-pulse {
  0%, 100% {
    box-shadow:
      0 0 12px #a4f08a,
      0 0 28px #7cff3a,
      0 0 55px rgba(124,255,80,0.6),
      inset 0 0 14px rgba(255,255,255,0.25),
      inset 0 -6px 18px rgba(30,70,10,0.6);
  }
  50% {
    box-shadow:
      0 0 22px #d4ff9a,
      0 0 40px #a4f08a,
      0 0 75px rgba(124,255,80,0.9),
      inset 0 0 18px rgba(255,255,255,0.4),
      inset 0 -6px 18px rgba(30,70,10,0.6);
  }
}

/* Irregular radioactive button — used via .zbtn or .panel button */
.panel button,
.zbtn,
#pause-btn,
#map-btn {
  display: block;
  width: 100%;
  margin: 10px 0;
  padding: 14px 22px;
  border: 3px solid #1a3a0a;
  background: radial-gradient(ellipse at 30% 30%, #d4ff9a 0%, #a4f08a 30%, #6fa03a 80%, #3a6a1a 100%);
  color: #0a1a04;
  font-family: 'Frijole', 'Trebuchet MS', sans-serif;
  font-size: 17px;
  letter-spacing: 2px;
  text-shadow: 1px 1px 0 rgba(255,255,255,0.4), 0 0 4px rgba(255,255,255,0.6);
  cursor: pointer;
  transition: transform 0.1s ease, filter 0.12s ease;
  /* Misshapen blob shape — asymmetric rounding */
  border-radius: 42% 58% 46% 54% / 50% 46% 54% 50%;
  animation: radioactive-pulse 3s ease-in-out infinite;
  position: relative;
}
/* Give each button slightly different irregularity for variety */
.panel button:nth-of-type(2n),
.zbtn:nth-of-type(2n) { border-radius: 55% 45% 58% 42% / 42% 58% 44% 56%; }
.panel button:nth-of-type(3n),
.zbtn:nth-of-type(3n) { border-radius: 48% 52% 40% 60% / 56% 44% 60% 40%; }

.panel button::before,
.zbtn::before {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  background:
    radial-gradient(ellipse at 60% 25%, rgba(255,255,255,0.4) 0%, transparent 55%),
    radial-gradient(ellipse at 25% 75%, rgba(30,80,10,0.35) 0%, transparent 55%);
  pointer-events: none;
}

.panel button:hover,
.zbtn:hover,
#pause-btn:hover,
#map-btn:hover { filter: brightness(1.15) saturate(1.2); }

.panel button:active,
.zbtn:active,
#pause-btn:active,
#map-btn:active { transform: scale(0.94) rotate(-1deg); }

.panel button.primary,
.zbtn.primary {
  background: radial-gradient(ellipse at 30% 30%, #f4ffbf 0%, #d8ff5a 20%, #a4f08a 60%, #6fa03a 100%);
  border-color: #1a3a0a;
  font-size: 19px;
  padding: 16px 24px;
}

/* Small round glyph buttons (map, pause) keep blob shape but smaller */
#pause-btn,
#map-btn {
  width: 52px;
  height: 52px;
  padding: 0;
  font-size: 16px;
  margin: 0 0 0 8px;
}

.form-row {
  margin: 14px 0;
  text-align: left;
}
.form-row label {
  display: block;
  font-size: 13px;
  color: #b8a8d8;
  margin-bottom: 6px;
  letter-spacing: 1px;
}
.form-row input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 2px solid #4a3570;
  background: rgba(0,0,0,0.4);
  color: #fff;
  font-size: 16px;
  font-family: inherit;
}
.form-row input:focus {
  outline: none;
  border-color: #7cffcb;
}

#highscore-list {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #4a3570;
}
#highscore-list h3 {
  color: #ff3b6b;
  font-size: 14px;
  letter-spacing: 2px;
  margin-bottom: 10px;
}
#highscore-entries {
  list-style: none;
  padding: 0;
  counter-reset: rank;
}
#highscore-entries li {
  display: flex;
  justify-content: space-between;
  padding: 4px 10px;
  font-size: 14px;
  color: #e4d8ff;
  counter-increment: rank;
}
#highscore-entries li::before {
  content: counter(rank) ".";
  color: #7cffcb;
  margin-right: 8px;
  min-width: 24px;
}
#highscore-entries li .hs-name { flex: 1; text-align: left; }
#highscore-entries li .hs-score { color: #ffb300; font-weight: bold; }

/* ---------------- Zombie slime ---------------- */
@keyframes slime-drip {
  0%   { transform: scaleY(0.2) translateY(0);   opacity: 0.6; }
  50%  { transform: scaleY(1)   translateY(0);   opacity: 1; }
  100% { transform: scaleY(0.4) translateY(6px); opacity: 0.5; }
}

/* Slime edge for panels */
.panel.slimy { position: relative; overflow: visible; }
.panel.slimy::before,
.panel.slimy::after {
  content: '';
  position: absolute;
  left: -3px; right: -3px;
  height: 28px;
  pointer-events: none;
  background-repeat: repeat-x;
  background-size: 40px 28px;
}
.panel.slimy::before {
  top: -2px;
  background-image:
    radial-gradient(circle at 5px 0,  #6fa03a 6px, transparent 7px),
    radial-gradient(circle at 18px 0, #8fc04a 8px, transparent 9px),
    radial-gradient(circle at 30px 0, #5a8a2a 5px, transparent 6px);
  filter: drop-shadow(0 2px 0 #2a4010) drop-shadow(0 0 6px rgba(124,255,80,0.4));
}
.panel.slimy::after {
  bottom: -22px;
  height: 34px;
  background-image:
    radial-gradient(ellipse 7px 12px at 6px 0, #6fa03a 95%, transparent 100%),
    radial-gradient(ellipse 9px 18px at 20px 0, #8fc04a 95%, transparent 100%),
    radial-gradient(ellipse 6px 14px at 34px 0, #5a8a2a 95%, transparent 100%);
  filter: drop-shadow(0 2px 4px rgba(50,80,10,0.6)) drop-shadow(0 0 4px rgba(124,255,80,0.3));
  animation: slime-drip 3.5s ease-in-out infinite;
  transform-origin: top center;
}

/* HUD slime band along the top */
#hud::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 22px;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 8px 14px at 30px 0,  #6fa03a 95%, transparent 100%),
    radial-gradient(ellipse 10px 22px at 120px 0, #8fc04a 95%, transparent 100%),
    radial-gradient(ellipse 6px 10px at 240px 0, #5a8a2a 95%, transparent 100%),
    radial-gradient(ellipse 9px 18px at 360px 0, #6fa03a 95%, transparent 100%),
    radial-gradient(ellipse 7px 14px at 500px 0, #8fc04a 95%, transparent 100%),
    radial-gradient(ellipse 11px 20px at 680px 0, #5a8a2a 95%, transparent 100%),
    radial-gradient(ellipse 8px 16px at 820px 0, #6fa03a 95%, transparent 100%),
    linear-gradient(180deg, #3a5a1a 0%, transparent 60%);
  filter: drop-shadow(0 2px 4px rgba(50,80,10,0.7)) drop-shadow(0 0 6px rgba(124,255,80,0.35));
  z-index: -1;
}

/* Splatter on title */
.panel h1 {
  position: relative;
}
.panel h1::after {
  content: '';
  position: absolute;
  top: -10px; right: -20px;
  width: 40px; height: 30px;
  background: radial-gradient(circle at 10px 10px, #8a0000 8px, transparent 10px),
              radial-gradient(circle at 30px 20px, #6a0000 4px, transparent 6px),
              radial-gradient(circle at 20px 5px, #aa0000 3px, transparent 5px);
  transform: rotate(15deg);
  pointer-events: none;
}

/* Map button */
#map-btn {
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: 2px solid #7cffcb;
  border-radius: 10px;
  width: 44px;
  height: 44px;
  font-size: 18px;
  cursor: pointer;
  pointer-events: auto;
}
#map-btn:active { transform: scale(0.95); }

/* ---------------- Overview screen ---------------- */
#overview-screen {
  background: #0a0612;
  display: flex;
  padding: 0;
  align-items: stretch;
  justify-content: stretch;
}
#overview-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}
#overview-hud {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  z-index: 25;
  pointer-events: none;
}
.ov-title {
  font-size: 32px;
  letter-spacing: 4px;
  color: #a4f08a;
  text-shadow: 0 0 10px #a4f08a, 0 0 20px #7cff3a, 2px 4px 0 #1a3a0a;
  font-family: 'Frijole', 'Trebuchet MS', sans-serif;
}
.ov-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  pointer-events: auto;
  justify-content: flex-end;
}
.ov-actions button {
  margin: 0;
  padding: 8px 14px;
  font-size: 13px;
  width: auto;
  min-width: 90px;
}

.map-node {
  position: absolute;
  z-index: 26;
  background: radial-gradient(circle at 30% 30%, #ff3b6b 0%, #8a0030 80%);
  color: #fff;
  border: 3px solid #fff;
  border-radius: 50%;
  width: 86px;
  height: 86px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(255,60,100,0.7), inset 0 0 20px rgba(0,0,0,0.4);
  transform: translate(-50%, -50%);
  font-family: inherit;
  animation: node-pulse 2.2s ease-in-out infinite;
}
.map-node .node-num { font-size: 26px; font-weight: bold; line-height: 1; }
.map-node .node-label {
  font-size: 10px;
  letter-spacing: 2px;
  margin-top: 4px;
  text-shadow: 0 1px 2px #000;
}
.map-node:hover { filter: brightness(1.2); }
.map-node:active { transform: translate(-50%, -50%) scale(0.94); }

@keyframes node-pulse {
  0%,100% { box-shadow: 0 0 20px rgba(255,60,100,0.7), inset 0 0 20px rgba(0,0,0,0.4); }
  50%     { box-shadow: 0 0 36px rgba(255,60,100,1.0), inset 0 0 20px rgba(0,0,0,0.4); }
}

/* Placement of level nodes (percentage of overview canvas) */
#node-level-1 { left: 18%; top: 72%; }
#node-level-2 { left: 35%; top: 48%; }
#node-level-3 { left: 54%; top: 66%; }
#node-level-4 { left: 72%; top: 36%; }
#node-level-5 { left: 86%; top: 62%; }

.map-node.locked {
  background: radial-gradient(circle at 30% 30%, #555 0%, #1a1a1a 80%);
  color: #888;
  border-color: #666;
  box-shadow: 0 0 10px rgba(0,0,0,0.5), inset 0 0 10px rgba(0,0,0,0.6);
  animation: none;
  cursor: not-allowed;
}
.map-node.locked::after {
  content: '🔒';
  position: absolute;
  right: -6px;
  top: -6px;
  background: #1a1a1a;
  border: 2px solid #666;
  border-radius: 50%;
  width: 22px; height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}
.map-node.locked:hover { filter: none; }
.map-node.locked:active { transform: translate(-50%, -50%); }

/* Highscore list — scrollable up to 100 entries */
.hs-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 20px;
  counter-reset: rank;
  max-height: 50vh;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: #a4f08a rgba(0,0,0,0.4);
}
.hs-list::-webkit-scrollbar { width: 8px; }
.hs-list::-webkit-scrollbar-track { background: rgba(0,0,0,0.4); border-radius: 4px; }
.hs-list::-webkit-scrollbar-thumb { background: #a4f08a; border-radius: 4px; }

.hs-list li {
  display: grid;
  grid-template-columns: 32px 1fr auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 6px 12px;
  margin: 3px 0;
  font-size: 13px;
  color: #e4d8ff;
  counter-increment: rank;
  background: rgba(30,50,10,0.4);
  border: 1px solid #3a6a1a;
  border-radius: 6px;
}
.hs-list li::before {
  content: counter(rank) ".";
  color: #a4f08a;
  font-weight: bold;
  font-family: 'Frijole', sans-serif;
}
.hs-list li .hs-name { text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-list li .hs-coins { color: #ffe06a; font-weight: bold; }
.hs-list li .hs-score { color: #ffb300; font-weight: bold; }
.hs-list li .hs-date { color: #b8a8d8; font-size: 11px; }

/* Sound modal */
#sound-modal input[type=range] {
  width: 100%;
  margin-top: 6px;
  accent-color: #a4f08a;
}
#sound-modal label { display: block; margin: 14px 0; color: #d8ff9a; letter-spacing: 2px; font-size: 13px; }
#sound-status {
  font: 11px/1.4 monospace;
  color: #a4f08a;
  background: rgba(0,0,0,0.55);
  border: 1px solid #3a6a1a;
  padding: 8px 10px;
  margin: 10px 0;
  border-radius: 6px;
  word-break: break-all;
  text-align: left;
}

/* End sequence screen */
#end-screen { padding: 0; background: #000; }
#end-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.end-caption {
  position: relative;
  text-align: center;
  z-index: 2;
  color: #fff;
  margin: auto;
  padding: 30px;
  background: rgba(0,0,0,0.55);
  border: 3px solid #a4f08a;
  border-radius: 20px;
  box-shadow: 0 0 30px #7cff3a;
  max-width: 560px;
}
.end-caption h1 { font-size: 48px; margin-bottom: 14px; }
.end-caption p { font-size: 18px; margin-bottom: 16px; color: #d8ff9a; }

/* Coin total in overview */
#coin-total {
  position: absolute;
  top: 72px;
  right: 22px;
  background: rgba(20,40,10,0.8);
  border: 2px solid #a4f08a;
  border-radius: 30px 10px 30px 10px;
  padding: 6px 16px;
  font-family: 'Frijole', sans-serif;
  font-size: 20px;
  color: #ffe06a;
  text-shadow: 0 0 8px #ffe06a, 0 2px 0 #000;
  box-shadow: 0 0 14px rgba(164,240,138,0.5);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}
#coin-total .coin-icon { font-size: 22px; }

/* HUD coin counter */
#coin-hud {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(20,40,10,0.75);
  border: 2px solid #a4f08a;
  border-radius: 10px;
  padding: 4px 10px;
  color: #ffe06a;
  font-family: 'Frijole', sans-serif;
  font-size: 16px;
}

/* ---------------- Controls modal ---------------- */
.controls-grid {
  display: flex;
  gap: 24px;
  text-align: left;
  margin: 12px 0 20px;
}
.ctrl-col { flex: 1; }
.ctrl-col h3 {
  color: #ff3b6b;
  font-size: 14px;
  letter-spacing: 2px;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.kbd-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0;
  font-size: 13px;
  color: #e4d8ff;
}
.kbd-row span { margin-left: auto; color: #fff; }
.kbd-row kbd {
  display: inline-block;
  background: #1a0a2a;
  border: 1px solid #7cffcb;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  font-family: 'Courier New', monospace;
  color: #7cffcb;
}
.touch-icon {
  display: inline-block;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid #7cffcb;
  text-align: center;
  line-height: 24px;
  color: #7cffcb;
  background: rgba(0,0,0,0.4);
  font-size: 14px !important;
  margin-left: 0 !important;
}

@media (max-width: 640px) {
  .controls-grid { flex-direction: column; gap: 10px; }
}

@media (max-width: 640px) {
  .panel { padding: 20px; min-width: 280px; }
  .panel h1 { font-size: 32px; }
  .panel h1 .subtitle { font-size: 22px; }
  .panel p.hint { display: none; }
  .touch-btn { width: 64px; height: 64px; }
  .touch-btn.touch-jump { width: 84px; height: 84px; }

  /* Overview: stack buttons, shrink title, smaller nodes, place below the HUD row */
  .ov-title { font-size: 22px; letter-spacing: 2px; }
  .ov-actions button { font-size: 11px; padding: 6px 10px; min-width: 70px; }
  #overview-hud { padding: 8px 10px; }
  .map-node { width: 62px; height: 62px; }
  .map-node .node-num { font-size: 20px; }
  .map-node .node-label { font-size: 8px; }
  #coin-total { top: 110px; right: 10px; font-size: 16px; padding: 4px 10px; }
}

/* Portrait mobile — reorganize node positions to use vertical space better */
@media (max-width: 640px) and (orientation: portrait) {
  #node-level-1 { left: 22%; top: 74%; }
  #node-level-2 { left: 55%; top: 64%; }
  #node-level-3 { left: 28%; top: 52%; }
  #node-level-4 { left: 66%; top: 40%; }
  #node-level-5 { left: 36%; top: 28%; }
}

/* Landscape message on mobile portrait */
#landscape-hint {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  color: #a4f08a;
  font-family: 'Frijole', sans-serif;
}
#landscape-hint .rot-icon {
  font-size: 80px;
  animation: rotate-hint 2.5s ease-in-out infinite;
  margin-bottom: 20px;
}
@keyframes rotate-hint {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(90deg); }
}
#landscape-hint p { font-size: 18px; max-width: 320px; color: #d8ff9a; font-family: 'Trebuchet MS', sans-serif; }
@media (min-width: 901px), (orientation: landscape) {
  #landscape-hint { display: none; }
}
