:root {
  
  /* Allgemein */
  --bg:             #1c1c2c;
  --fg:             #f4f4f4;
  --panel-bg:       #2a2a3d;
  --btn-bg:         #4e8cff;
  --btn-hover-bg:   #3a6edc;
  --border:         #666;

  --accent1:        #ffd700;
  --accent2:        #ffa500;
  --accent3:        #8a2be2;
  --accent4:        #6a5acd;
  --accent5:        #9370db;
  --accent6:        #ff4ecb;
  --accent7:        #1e90ff;
  --accent8:        #b2f0e9;
  --success:        #32CD32;
  --danger:         #ff4e4e;
  --celebrationtext:#ffe066;

  --bg-dark:        #333;
  --landing-start:  var(--accent6);
  --landing-end:    var(--accent7);

  --btn-glow-light: 0 0 10px rgba(255, 255, 255, 0.5);
  --btn-glow-dark: 0 0 10px rgba(78, 140, 255, 0.6);

  --start-gradient-from: #0b1d3a;
  --start-gradient-to:   #444b5a;
  --start-gradient-base: #0b1d3a;
}

body.light-mode {
  --bg:           #f4f4f4;
  --fg:           #1c1c2c;
  --panel-bg:     #e0e0e5;
  --btn-bg:       #4e8cff;
  --btn-hover-bg: #73d5fc;
  --border:       #999;
  --celebrationtext:	#301934;

  --start-gradient-from: #add8e6;   
  --start-gradient-to:   #f8c8dc; 
  --start-gradient-base: #ffffff;  
}
body.light-mode #optionsMenu,
  body.light-mode .options-panel,
  body.light-mode #settingsPanel {
  background-color: var(--panel-bg);
  color: var(--fg);
  border: 1px solid var(--border);
}
    body {
      margin: 0;
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      background: var(--bg);
      color: var(--fg);
      background-size: cover;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      min-height: 100vh;
      overflow-x: hidden;
  overflow-y: auto;
      backdrop-filter: blur(4px);
      transition: background-image 0.5s ease-in-out, opacity 0.5s ease-in-out;
    }
    .container {
      text-align: center;
    }
    h1 {
      font-size: 2.5rem;
      margin-bottom: 1rem;
    }
    p {
      font-size: 1.1rem;
      margin-bottom: 2rem;
    }
    button {
      padding: 0.75rem 1.5rem;
      font-size: 1rem;
      background-color: var(--btn-bg);
      color: var(--fg);
      border: none;
      border-radius: 0.5rem;
      cursor: pointer;
      transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
      margin-top: 1rem;
    }

  button:hover {
      background-color: var(--btn-hover-bg);
      transform: scale(1.05);
      box-shadow: 0 0 10px rgba(78, 140, 255, 0.7);
    }
    #landing {
       background: linear-gradient(
    to bottom right,
    var(--start-gradient-from),
    var(--start-gradient-to)
  );
      background-color: var(--start-gradient-base);
      color: var(--fg);
      padding: 2rem;
      border-radius: 1rem;
      box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
      min-width: 300px;
      opacity: 0;
      transform: none;
      position: absolute;
      top: 50%;
      left: 50%;
      pointer-events: auto;
      animation: fadeIn 0.8s ease-in-out forwards;
      transition: background 0.4s ease, color 0.3s ease;
    }
    #landing button#playButton,
#landing button#dailyChallengeButton {
  border: 2px solid var(--accent8); 
   box-shadow: 0 0 8px var(--accent8);  
}

body:not(.light-mode) #landing button#playButton,
body:not(.light-mode) #landing button#dailyChallengeButton {
  border-color: var(--border); 
}
body:not(.light-mode) #progressBarContainer {
  background-color: #555; 
}
body:not(.light-mode) #roundInfo,
body:not(.light-mode) #scoreInfo {
  background: rgba(255, 255, 255, 0.1);
}

.beta-build-note {
  margin: 0 auto 1.25rem;
  width: min(560px, 100%);
  padding: 0.8rem 1rem;
  border-radius: 0.9rem;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.18);
}

.beta-build-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.55rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: linear-gradient(135deg, rgba(255,215,0,0.25), rgba(255,165,0,0.18));
  border: 1px solid rgba(255, 215, 0, 0.32);
  color: var(--fg);
}

.beta-build-text {
  margin: 0;
  font-size: 0.97rem;
  line-height: 1.45;
  opacity: 0.95;
}

    #buttonSection {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.selectors {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.buttons {
  display: flex;
  gap: 1rem;
  align-items: center;
}
    #game {
      background: linear-gradient(
    to bottom right,
    var(--start-gradient-from),
    var(--start-gradient-to)
  );
      background-color: var(--start-gradient-base);
      color: var(--fg);
      display: none;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
      padding: 2rem;
      border-radius: 1rem;
      box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
      width: 90%;
      max-width: 1200px;
      margin: 2.5rem auto;
      animation: zoomIn 0.5s ease forwards;
      transition: background-color 1s ease, opacity 0.5s ease;
      min-height: unset;
      overflow-y: auto;
      backdrop-filter: blur(8px);
    }
    
    #gameHeaderActions {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  z-index: 20;
}
#selectionRow select {
  background-color: var(--panel-bg);
  color:            var(--fg);
  border:           1px solid var(--border);
  border-radius:    0.5rem;
  padding:          0.5rem 0.75rem;
}
body:not(.light-mode) #landing button#playButton,
body:not(.light-mode) #landing button#dailyChallengeButton {
  background-color: var(--btn-hover-bg);   
  border: 2px solid var(--accent7);              
  color: var(--fg);                         
  box-shadow: 0 0 8px var(--btn-bg);        
}

body:not(.light-mode) #landing button#playButton:hover,
body:not(.light-mode) #landing button#dailyChallengeButton:hover {
  background-color: var(--btn-bg);         
}
    #gameFeedback {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 0;
      transition: background-color 1s ease;
      display: none;
    }
    #screenshot.glow-correct {
      box-shadow: 0 0 25px 10px rgba(0, 255, 0, 0.5);
    }
    #screenshot.glow-wrong {
      box-shadow: 0 0 25px 10px rgba(255, 0, 0, 0.5);
    }
   #progressBarContainer {
  width: min(700px, 100%);
  height: 18px;
  background-color: var(--bg);
  border-radius: 6px;
  overflow: hidden;
  margin: 0;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}
    #progressBar {
      height: 100%;
      width: 0%;
      background: linear-gradient(to right, 
                                  var(--accent3), 
                                  var(--accent4), 
                                  var(--accent5), 
                                  var(--accent1) 
                                 );
      background-size: 200% 100%;
      background-position: left center;
      border-radius: 5px;
      transition: width 0.5s ease, background-position 0.5s ease;
    }
    #damageOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  z-index: 2147483647;         
  transition: opacity 0.5s ease;
}
#damageOverlay .failure-text {
  font-size: 5rem;
  font-weight: bold;
  color: #f4f4f4;
  text-shadow: 2px 2px 10px red;
  z-index: 2147483648;
  text-align: center;
  animation: textZoom 2s ease forwards;
}
.failure-crack {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('backgrounds/riss.png') center center no-repeat;
  background-size: cover;
  opacity: 1; 
  filter: brightness(1.8); 
  pointer-events: none;
  z-index: 2147483648; 
}
#failureFog {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(255, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.8) 70%);
  opacity: 0.7;
  animation: fogPulse 3s infinite alternate;
  z-index: 1; 
  pointer-events: none;
}

@keyframes fogPulse {
  from { opacity: 0.5; }
  to { opacity: 0.8; }
}
@keyframes subtleShake {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(2px, -2px); }
  60% { transform: translate(-1px, 1px); }
  80% { transform: translate(1px, -1px); }
  100% { transform: translate(0, 0); }
}
    #soundToggleButtonGame {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
  #soundToggleButtonEnd {
  all: unset;
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 1.75rem;
  cursor: pointer;
  color: inherit;
}
.sound-button-end:hover {
  filter: brightness(1.2);
}
    #screenshot {
  width: 90%; 
  height: auto;
  aspect-ratio: 21 / 9;
  max-width: 1100px;
  border-radius: 0.5rem;
  margin-bottom: 2rem; 
  object-fit: cover;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
}
    #screenshotContainer {
      width: 100%;
      display: flex;
      justify-content: center;
      align-items: center;
      flex-direction: column;
      position: relative;
    }
    
    #mapButtonsContainer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem; 
  gap: 0.3rem;
  max-width: 100%;
}

.map-button {
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
  font-weight: bold;
  background-color: #3a3a3a;
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.map-button:hover {
  transform: scale(1.1);
  background-color: #555;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
  transition: transform 0.2s ease;
}

.map-button.selected {
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  color: #000;
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
}

#feedbackOverlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--panel-bg);
  padding: 1.5rem 2.5rem;
  border-radius: 1rem;
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.8);
  font-size: 2rem;
  font-weight: bold;
  color: var(--fg);
  opacity: 0;
  display: none;
  z-index: 10;
  transition: opacity 0.5s ease;
}

#reportRequestedDiff option {
  background: var(--panel-bg);
  color: var(--fg);
}

#screenshot.blurred {
  filter: blur(4px);
  transition: filter 0.3s ease;
}

#controls button {
  background-color: var(--panel-bg);
  color:             var(--fg);
  border: 1px solid var(--border);
  padding: 1.5rem 7.5rem; 
  font-size: 2rem;
  font-weight: bold;
  border-radius: 1.2rem;
  cursor: pointer;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
  margin-top: 1.5rem;
}
body:not(.light-mode) #controls button {
  background-color: #1a1a2b;
}
body:not(.light-mode) #controls button:hover {
  background-color: var(--btn-hover-bg);
  transform: scale(1.05);
}

#controls button:hover {
  background-color: var(--btn-hover-bg);
  transform: scale(1.05);
}
#controls button.correct-guess {
  background-color: var(--success) !important;
  box-shadow: 0 0 15px rgba(50, 205, 50, 0.7);
}
#controls button.wrong-guess {
  background-color: var(--danger) !important;
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.7);
}

#gameHeader {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  margin-bottom: 0rem;
}

#gameHeaderTop {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  column-gap: 1.25rem;
  position: relative;
}

#stats {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: bold;
  font-size: 1.2rem;
  margin: 0;
  justify-self: start;
}

#timerSlot {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 0.15rem;
}

#progressSlot {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: -2rem;
}

#progressArea {
  width: min(700px, 90%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

#roundInfo,
#scoreInfo {
  background: var(--bg);
  padding: 0.4rem 0.8rem;
  border-radius: 0.6rem;
  white-space: nowrap;
  display: inline-block;
}

#mapSelect,
#result,
#game button {
  display: block;
  margin-top: 1rem;
}

#gameHeaderActions .game-header-icon-btn {
  width: 60px;
  height: 60px;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none !important;
  border: 2px solid transparent;
  border-radius: 0.5rem;
  color: var(--fg);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  position: static;
  transform-origin: center;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.25s ease,
    background-color 0.2s ease;
}

#gameHeaderActions .game-header-icon-btn:hover {
  background: none !important;
  border-color: var(--accent7);
  transform: scale(1.05);
  box-shadow:
    0 0 0 1px rgba(78, 140, 255, 0.28),
    0 0 10px rgba(78, 140, 255, 0.75);
}

body.light-mode #gameHeaderActions .game-header-icon-btn:hover {
  border-color: var(--btn-hover-bg);
  box-shadow:
    0 0 0 1px rgba(115, 213, 252, 0.32),
    0 0 10px rgba(115, 213, 252, 0.75);
}
    #controls {
      display: flex;
      flex-direction: column;
      align-items: center;
      margin-top: 1rem;
    }

    #mapSelect, #controls button {
      margin-bottom: 0.5rem;
      padding: 0.5rem;
      font-size: 1rem;
      border-radius: 0.5rem;
      border: none;
    }
    #mapSelect {
    display: none;
    }
    img {
      max-width: 80vw;
      max-height: 50vh;
      border-radius: 1rem;
      margin-bottom: 1rem;
    }
    select {
      padding: 0.5rem;
      font-size: 1rem;
      border-radius: 0.5rem;
      border: none;
    }

    @media (max-width: 900px) {
  #stats {
    font-size: 1rem;
  }

  #progressArea {
    width: min(420px, 100%);
  }

  #progressBarContainer {
    height: 16px;
  }
}

@media (max-width: 700px) {
  #gameHeaderTop {
    grid-template-columns: auto 1fr auto;
    row-gap: 0.75rem;
  }

  #gameHeaderActions {
  top: 0.35rem;
  right: 0.35rem;
  gap: 0.4rem;
}

#gameHeaderActions .game-header-icon-btn {
  width: 52px;
  height: 52px;
  font-size: 1.35rem;
}

  #timerDisplay {
    grid-column: 1 / -1;
    justify-self: end;
  }

  #stats {
    font-size: 1rem;
  }

  #progressArea {
    width: min(260px, 100%);
    gap: 0.9rem;
  }

  #progressBarContainer {
    height: 14px;
  }

  #controls button {
    padding: 1rem 2.25rem;
    font-size: 1.35rem;
  }

  #screenshot {
    width: 100%;
  }
}

@media (max-width: 560px) {
  #progressSlot {
    display: none;
  }
}

   #endScreen {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;     
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    to bottom right,
    var(--start-gradient-from),
    var(--start-gradient-to)
  );
  background-color: var(--start-gradient-base);
  color: var(--fg);
  padding: 4rem 1.25rem 2rem;
  border-radius: 1rem;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
  z-index: 9999;
  width: auto;              
  max-width: 90vw;
  text-align: center;
  overflow: visible;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}
#endScreen h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--celebrationtext);
  white-space: nowrap; 
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
#settingsToggleButtonEndGear {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

#endScreen p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
}
#endScreenButtons {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap; 
  margin-top: 1.5rem;
}
    
#endScreenButtons button {
  background-color: var(--btn-bg);
  color: var(--fg);
  padding: 0.7rem 1.5rem;
  font-size: 1rem;
  margin: 0.5rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

#endScreenButtons button:hover {
  background-color: var(--btn-hover-bg);
  transform: scale(1.05);
}
  #result {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.8rem 1.2rem;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 0.8rem;
  font-size: 1.5rem;
  font-weight: bold;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

#result.correct {
  background: rgba(0, 128, 0, 0.7); 
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.6);
}

#result.wrong {
  background: rgba(128, 0, 0, 0.7);
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.6);
}

#victoryOverlay {
  transition: opacity 1s ease;
  opacity: 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 99999;
  overflow: hidden;
}

#victoryOverlay.active {
  display: flex;
  opacity: 1;
}
#victoryOverlay.fading-out {
  opacity: 0;
}
    
#lightBeams {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

#victoryText {
  font-size: 3rem;
  font-weight: bold;
  color: #ffe066;
  text-shadow: 0 0 10px #ffe066, 0 0 20px var(--accent1), 0 0 30px #ffea00;
  z-index: 2;
  animation: glowPulse 2s infinite alternate;
  opacity: 0;
}
#settingsOverlay {
  background-color: rgba(34, 34, 34, 0.75);
  color: var(--fg);
  backdrop-filter: blur(8px);
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.light-mode #settingsOverlay {
  background-color: rgba(255, 255, 255, 0.75); 
  color: var(--fg);
}

.settings-button-end {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: inherit;
  margin-left: 0.5rem;
}
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.5em;
  position: absolute;
  top: 1em;
  right: 1em;
  z-index: 1000;
  font-size: 1rem;
  color: var(--fg);
  user-select: none;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
    .slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--btn-bg);
  border-radius: 30px;
  transition: 0.4s;
}
    .theme-switch .slider::before,
    .theme-switch .slider::after {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      font-size: 0.85rem;
      pointer-events: none;
      color: rgba(var(--fg-rgb,255,255,255),0.5);
      transition: color 0.3s;
    }
    .theme-switch .slider::before { content: "Light"; left: 12px; }
    .theme-switch .slider::after  { content: "Dark";  right: 12px; }

    .theme-switch .knob {
      position: absolute;
      top: 2px;
      left: 2px;
      width: 28px;
      height: 28px;
      background: var(--fg);
      border-radius: 50%;
      transition: left 0.3s;
    }

    .theme-switch input:checked + .slider {
      background: var(--panel-bg);
    }
    .theme-switch input:checked + .slider .knob {
      left: calc(100% - 30px);
    }
    .theme-switch input:not(:checked) + .slider::before {
      color: rgba(var(--fg-rgb,255,255,255),1);
    }
    .theme-switch input:checked + .slider::after {
      color: rgba(var(--fg-rgb,255,255,255),1);
    }
    .slider:before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  border-radius: 50%;
  background-color: var(--fg);
  transition: 0.4s;
}

.switch input:checked + .slider {
  background-color: var(--btn-hover-bg);
}

.switch input:checked + .slider:before {
  transform: translateX(24px);
}
.slider:after {
  content: attr(data-theme);
  position: absolute;
  font-size: 0.7rem;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--fg);
  pointer-events: none;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9998;
  display: none;
  justify-content: center;
  align-items: center;
}
.overlay .panel {
  background: linear-gradient(
    to bottom right,
    var(--start-gradient-from),
    var(--start-gradient-to)
  );
  color: var(--fg);
  border-radius: 1rem;
  padding: 2rem;
  max-width: 800px;
  width: 90%;
  position: relative;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.modal { position:fixed; inset:0; background:rgba(0,0,0,0.6); display:none; align-items:center; justify-content:center; z-index:10005; }
.modal-content { background:linear-gradient(
    to bottom right,
    var(--start-gradient-from),
    var(--start-gradient-to)
  ); padding:2rem; border-radius:0.8rem; width:80%; max-width:600px; position:relative; z-index:10000; }
.modal-content .close { position:absolute; top:0.5rem; right:0.5rem; background:none; border:none; font-size:1.2rem; cursor:pointer; }
.modal, .overlay.full-list {
  z-index: 10000 !important;
}
.card { background:var(--panel-bg); padding:1rem; border-radius:0.6rem; margin-bottom:1rem; }
#allAchievementsModal .card {
  padding: 0.75rem;          
  border-radius: 0.5rem;    
  margin-bottom: 0;         
  font-size: 0.9rem;        
}
#allAchievementsModal .card h4 {
  font-size: 1rem;          
  margin-bottom: 0.25rem;
}
#allAchievementsModal .card p {
  font-size: 0.8rem;        
  margin-bottom: 0.5rem;
}

#allAchievementsModal .card .progress-container {
  height: 6px;              
  margin-top: 0.25rem;
}
#allAchievementsModal .card .progress-label {
  font-size: 0.7rem;
  top: -1.2rem;
  right: 0.5rem;
}
.progress-container {position: relative; background:#444; border-radius:4px; height:8px; margin-top:0.5rem; }
.progress-bar { height:100%; background:linear-gradient(90deg,var(--accent1),var(--accent2)); }
.progress-label {
  position: absolute;
  top: -1.2rem;          
  right: 0.2rem;         
  font-size: 0.75rem;
  font-weight: bold;
  color: var(--fg);
  white-space: nowrap;
}

.preview-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 0.75rem;
}


.show-more-btn {
  display: block;
  margin: 0.5rem auto;
  padding: 0.5rem 1rem;
  cursor: pointer;
  background: var(--panel-bg);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}
.show-more-btn:hover {
  background: #444;
}

@keyframes glowPulse {
  from { text-shadow: 0 0 5px #ffe066, 0 0 10px var(--accent1), 0 0 20px #ffea00; }
  to { text-shadow: 0 0 20px #ffe066, 0 0 30px var(--accent1), 0 0 40px #ffea00; }
}

@keyframes fastFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.flying-emoji {
  position: absolute;
  font-size: 3.2rem;
  pointer-events: none;
  opacity: 0; 
  animation: flyRandom 1.5s linear forwards, fadeInEmoji 0.3s ease forwards; 
}

.beam {
  position: absolute;
  top: -30%;
  width: 40px;
  height: 160%;
  background: radial-gradient(circle at center, rgba(255,255,224,0.4) 0%, transparent 70%);
  opacity: 0;
  filter: blur(8px);
  transform-origin: top center;
  animation: beamSweep 4s infinite alternate ease-in-out, fadeInEmoji 0.3s ease forwards;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mappool-option {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  background: var(--panel-bg); color: var(--fg);
  color: var(--fg);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
  opacity: 0.6;
  width: 100%;
  max-width: 180px;
  text-align: center;
}

.mappool-option.selected {
  background: var(--btn-hover-bg); 
  opacity: 1;
}

#customMapPoolRow {
  display: flex;
  align-items: stretch;
  gap: 0.45rem;
  width: 100%;
  max-width: 230px;
}

#customMapPoolRow .mappool-option {
  flex: 1;
  max-width: none;
  height: 42px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#customMapPoolEditButton {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: var(--panel-bg);
  color: var(--fg);
  border: none;
  cursor: pointer;
}

#customMapPoolEditButton:hover {
  background: var(--btn-hover-bg);
}

.toggle-option {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  background: var(--panel-bg);
  color: var(--fg);
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: opacity 0.2s ease, background-color 0.2s ease;
  width: 100%;
  max-width: 180px;
  text-align: center;
}

.toggle-option.selected {
  background: var(--btn-hover-bg);
  opacity: 1;
}

.toggle-option:disabled {
  opacity: 0.7 !important;
  cursor: not-allowed; 
}

@keyframes zoomInText {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.2);
    opacity: 1;
  }
}

@keyframes riseAndDrift {
  0% {
    transform: translate(0, 0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  50% {
    transform: translate(var(--driftX), -75vh); 
  }
  100% {
    transform: translate(calc(var(--driftX) * 2), -150vh); 
    opacity: 0;
  }
}

@keyframes riseAndFade {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform: translateY(-150vh);
    opacity: 0;
  }
}

.respect-light {
  position: absolute;
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, rgba(255,255,224,0.8) 0%, rgba(255,255,255,0.2) 80%);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 5s linear;
  z-index: 5;
}

.respect-light.rise {
  opacity: 1;
  transform: translateY(-150vh);
  animation: riseAndFade 4s linear forwards;
}

  #endScreen .sound-button-end {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  color: inherit;
  font-size: 2rem;
  cursor: pointer;
}  

button.flash-error {
  animation: flashRed 0.4s ease;
  background-color: var(--danger) !important;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.7);
  color: var(--fg);
}

button.no-hover:hover {
  background-color: var(--danger) ;
  transform: none;
  box-shadow: none;
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-4px); }
  100% { transform: translateX(0); }
}

button.shake {
  animation: shake 0.4s ease;
}


@keyframes flashRed {
  0%   { background-color: var(--danger); }
  100% { background-color: var(--bg); }
}

@keyframes fadeInEmoji {
  from { opacity: 0; }
  to { opacity: 1; }
}
    
@keyframes beamSweep {
  0% { transform: rotate(-10deg) translateX(0); }
  100% { transform: rotate(10deg) translateX(10px); }
}
    
@keyframes flyRandom {
  0% { opacity: 0; transform: translateY(100%) rotate(0deg); }
  50% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-150%) rotate(360deg); }
}
    
@keyframes flyCrazy {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(calc(100vw * var(--dx)), calc(100vh * var(--dy))) rotate(720deg);
    opacity: 0;
  }
}
  @keyframes textZoom {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.15);
  }
}  

@keyframes moveBeam {
  0% { transform: rotate(0deg) translateX(0); }
  100% { transform: rotate(20deg) translateX(20px); }
}  
@keyframes fadeIn {
  from { opacity: 0; transform: translate(-50%, -55%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}
@keyframes zoomIn {
  0% {
    transform: scale(0.95);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}    
 @keyframes epicEndScreen {
  0% {
    transform: scale(0.8) rotate(-2deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.05) rotate(2deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}   

.report-btn {
  margin-top: 0.35rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.85rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--fg);
  cursor: pointer;
}
.report-btn:hover {
  filter: brightness(1.15);
}

.map-button.selected {
  background-color: #6ab8ff;
  transform: scale(1.2);
}
 
body:not(.light-mode) #game {
  background: linear-gradient(
    to bottom right,
    var(--start-gradient-from),
    var(--start-gradient-to)
  );
  background-color: var(--start-gradient-base);
}

body.light-mode .map-button {
  background-color: #eee; 
  color: #111;
  border: 1px solid #ccc;
}

body.light-mode .map-button:hover {
  background-color: #ddd;
}

body.light-mode .info-container {
  background-color: #f3f3f3;
  color: #111;
  border: 1px solid #ccc;
}
.difficulty-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: auto;
  min-height: unset;
  padding: 0;
  border-radius: 0;
  margin: 0;
  background: none;
  border: none;
  box-shadow: none;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.difficulty-indicator-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  box-shadow: none;
}

.difficulty-indicator.easy .difficulty-indicator-dot {
  background: var(--success);
}

.difficulty-indicator.normal .difficulty-indicator-dot {
  background: var(--accent2);
}

.difficulty-indicator.hard .difficulty-indicator-dot {
  background: var(--danger);
}

.difficulty-indicator.impossible .difficulty-indicator-dot {
  width: auto;
  height: auto;
  background: none;
  box-shadow: none;
  font-size: 1rem;
  line-height: 1;
}

.difficulty-indicator-label {
  line-height: 1;
}
#matchContainer {
  display: flex;
  height: 90vh;
  width: 90vw;
  max-width: 1000px;
  margin: auto;
  border-radius: 1rem;
  overflow: hidden;
  background: linear-gradient(
    to bottom right,
    var(--start-gradient-from),
    var(--start-gradient-to)
  );
  background-color: var(--start-gradient-base);
  color: var(--fg);
  backdrop-filter: blur(8px);
}

#matchOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  color: var(--fg);
  backdrop-filter: blur(8px);
  z-index: 9998;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-top: 2rem;
  transition: background-color 0.3s ease;
}
#matchDetails .match-round {
  background: linear-gradient(
    to bottom right,
    var(--start-gradient-from),
    var(--start-gradient-to)
  );
  background-color: var(--start-gradient-base);
  color: var(--fg);

  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

#matchList,
#matchDetails {
  background: linear-gradient(
    to bottom right,
    var(--start-gradient-from),
    var(--start-gradient-to)
  );
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  margin: 0.5rem;
  padding: 1rem;
  box-shadow: 0 0 10px rgba(0,0,0,0.4);
}

.match-card {
  margin-bottom: 1rem;
  cursor: pointer;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.18);
  color: var(--fg);
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.match-card.active {
  border: 2px solid var(--accent1);
  background: rgba(0, 0, 0, 0.28);
}


.match-card:hover {
  background-color: var(--btn-hover-bg);
  transform: scale(1.03);
}

.match-history-card-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.match-history-thumb {
  width: 60px;
  height: 38px;
  border-radius: 0.4rem;
  object-fit: cover;
  flex: 0 0 auto;
}

.match-history-card-text {
  min-width: 0;
}

.history-locator-round-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  min-width: 0;
}

.history-locator-round-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1 1 auto;
}

.history-locator-round-info {
  min-width: 0;
  flex: 1 1 auto;
}

.history-difficulty-row {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  width: fit-content;
  max-width: 100%;
}

.history-difficulty-report-btn {
  margin: 0;
  padding: 0.28rem 0.55rem;
  font-size: 0.78rem;
  line-height: 1.1;
  border-radius: 999px;
  white-space: nowrap;
  transform: none;
}

.history-difficulty-report-btn:hover {
  transform: scale(1.04);
}

.history-locator-minimap-column {
  flex: 0 0 88px;
  width: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.32rem;
  min-width: 0;
}

.history-locator-minimap-title {
  display: none;
}

.history-locator-minimap-frame {
  all: unset;
  position: relative;
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  overflow: hidden;
  border-radius: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.22);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
  cursor: zoom-in;
  display: block;
}

.history-locator-minimap-frame:hover {
  transform: scale(1.04);
  box-shadow: 0 0 10px rgba(78, 140, 255, 0.45);
}

.history-locator-minimap-frame .locator-reveal-stage {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
}

.history-locator-minimap-frame .locator-reveal-stage-image,
.history-locator-minimap-frame .locator-reveal-stage-overlay {
  pointer-events: none;
}

.history-locator-inspect-btn {
  margin-top: 0;
  padding: 0.24rem 0.45rem;
  font-size: 0.72rem;
  line-height: 1.1;
  border-radius: 999px;
  min-width: 0;
  white-space: nowrap;
}

@media (max-width: 860px) {
  .history-locator-round-layout {
    align-items: flex-start;
  }

  .history-locator-round-main {
    align-items: flex-start;
  }

  .history-locator-minimap-column {
    flex: 0 0 78px;
    width: 78px;
  }

  .history-locator-minimap-frame {
    width: 64px;
    height: 64px;
    flex-basis: 64px;
  }

  .history-locator-inspect-btn {
    font-size: 0.68rem;
    padding: 0.22rem 0.38rem;
  }
}

#matchList::-webkit-scrollbar,
#matchDetails::-webkit-scrollbar {
  width: 8px;
}

#matchList::-webkit-scrollbar-thumb,
#matchDetails::-webkit-scrollbar-thumb {
   background-color: var(--accent7);
  border-radius: 10px;
}

#matchList::-webkit-scrollbar-track,
#matchDetails::-webkit-scrollbar-track {
  background: var(--panel-bg);
}

#lightboxOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85); 
  justify-content: center;
  align-items: center;
  z-index: 1000000;
  backdrop-filter: blur(2px);
}


#statsOverlay .stats-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.stats-cards .stat-card {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  padding: 0;              
  margin: 0;               
  text-align: center;   
}

.stats-cards .stat-card .stat-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.2em;
}

.stats-cards .stat-card .stat-value {
  font-size: 1.3rem;
  font-weight: bold;
  line-height: 1;
}
.stat-card {
  flex: 1;
  background: var(--panel-bg);
  color: var(--fg);
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.diff-cards {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.time-items {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}
.time-item {
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  background: var(--panel-bg);
  box-shadow: 0 0 4px rgba(0,0,0,0.2);
}

.top-maps {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}
.top-map {
  text-align: center;
}
.top-map .map-cover {
  width: 210px;
  height: 90px;
  border-radius: 0.5rem;
  object-fit: cover;
  box-shadow: 0 0 6px rgba(0,0,0,0.3);
}
.top-map .map-label {
  margin-top: 0.25rem;
  font-size: 0.9rem;
}

.best-worst {
  display: flex;
  justify-content: center;
  gap: 2rem;
}
.best-worst .map-card {
  flex: 1;
  text-align: center;
}
.map-cover {
  width: 210px;  
  height: 90px;
  object-fit: cover;
  border-radius: 0.5rem;
  box-shadow: 0 0 6px rgba(0,0,0,0.3);
  margin-bottom: 0.5rem;
}

#statsOverlay .close-btn {
  position: absolute;
  top: 0.2rem;
  right: 0.2rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--fg);
  z-index: 10002;
}

.stats-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.stat-card {
  background: var(--panel-bg);
  border-radius: 0.75rem;
  padding: 1rem;
  flex: 1 1 120px;
  text-align: center;
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
}

.stat-card h4 {
  margin: 0.5rem 0;
  font-size: 1rem;
}

.stat-card img {
  width: 80px;
  height: auto;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
}

.map-button:focus {
  outline: none;
  box-shadow: none !important;
}

#allAchievementsModal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  z-index: 10005;
}

#allAchievementsModal .modal-content {
  position: relative;
  width: min(1100px, 92vw);
  max-height: 85vh;
  overflow-y: auto;
  padding: 2rem;
}

#allAchievementsModal .floating-close-btn {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10006;
  margin: 0;
  background: none;
  border: none;
  color: var(--fg);
  font-size: 2rem;
  cursor: pointer;
}


.has-tooltip {
  position: relative;
  display: inline-block;
}

body.global-tooltips-ready .has-tooltip > .tooltip {
  display: none !important;
}

#globalTooltip {
  position: fixed;
  left: 0;
  top: 0;
  display: none;
  width: max-content;
  max-width: min(520px, calc(100vw - 1.5rem));
  max-height: calc(100vh - 1.5rem);
  overflow: auto;
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  font-weight: normal !important;
  white-space: normal !important;
  line-height: 1.35;
  background: linear-gradient(to bottom right, var(--start-gradient-from), var(--start-gradient-to));
  color: var(--fg);
  border-radius: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 2147483647;
  transition: opacity 0.14s ease, visibility 0.14s ease;
}

#globalTooltip.long-tooltip {
  max-width: min(720px, calc(100vw - 1.5rem));
}

#globalTooltip.is-visible {
  opacity: 1;
  visibility: visible;
}

body.light-mode #globalTooltip {
  border-color: rgba(0, 0, 0, 0.28);
}

#previewContainer {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;         
  align-items: center;
  justify-content: center;
  z-index: 9998;         
}
#previewContainer .preview-panel {
  background: var(--panel-bg);
  padding: 2rem;
  border-radius: 1rem;
  max-width: 600px;
  width: 90%;
  position: relative;
}
#previewContainer .close-preview {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--fg);
}

.pool-toggle {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  background: var(--panel-bg);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  cursor: pointer;
  opacity: 0.6;
  transition: background-color 0.2s ease, box-shadow 0.3s ease, transform 0.2s ease;
  width: 100%;
  max-width: 180px;
  text-align: center;
}

.pool-toggle:hover {
  opacity: 1;
  background: var(--btn-hover-bg);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.pool-toggle.selected {
  background: var(--btn-hover-bg);
  color: var(--bg);
  opacity: 1;
  box-shadow: 0 0 10px var(--accent7);
  transform: scale(1.1);
}

.loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 4px solid rgba(255,255,255,0.3);
  border-top: 4px solid var(--btn-bg);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  z-index: 10;
}

.history-shot-wrap {
  position: relative;
  width: 120px;
  min-width: 120px;
  height: 68px;
  border-radius: 0.5rem;
  overflow: hidden;
  background: rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stats-shot-wrap {
  position: relative;
  width: 210px;
  min-width: 210px;
  height: 90px;
  border-radius: 0.5rem;
  overflow: hidden;
  background: rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.stats-shot-wrap .stats-cover-img {
  width: 210px;
  height: 90px;
  object-fit: cover;
  border-radius: 0.5rem;
  margin-bottom: 0;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.stats-shot-wrap .stats-cover-img.loaded {
  opacity: 1;
}

.stats-shot-wrap .loader {
  width: 28px;
  height: 28px;
  border-width: 3px;
}

.history-shot-wrap img {
  width: 120px;
  height: 68px;
  object-fit: cover;
  border-radius: 0.5rem;
  margin-bottom: 0;
  opacity: 0;
  transition: opacity 0.2s ease;
  cursor: pointer;
}

.history-shot-wrap img.loaded {
  opacity: 1;
}

.history-shot-wrap .loader {
  width: 28px;
  height: 28px;
  border-width: 3px;
}

#locatorMinimapShell {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 15;
  width: 220px;
  aspect-ratio: 1 / 1;
  display: none;
  border-radius: 1rem;
  overflow: hidden;
  background: rgba(10, 14, 24, 0.82);
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 10px 26px rgba(0,0,0,0.38);
  backdrop-filter: blur(8px);
  transition: width 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

#locatorMinimapShell:hover {
  width: 340px;
  box-shadow: 0 16px 34px rgba(0,0,0,0.48);
}

#locatorMinimapWrap {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  background: rgba(0,0,0,0.22);
  cursor: crosshair;
  user-select: none;
  touch-action: none;
}

#locatorMinimapWrap.is-dragging {
  cursor: grabbing;
}

#locatorMinimapStage {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  will-change: transform;
}

#locatorMinimapImage {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border-radius: 0;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

#locatorOverlayCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#locatorMinimapMarker {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255,255,255,0.95);
  background: rgba(255, 78, 78, 0.75);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.25);
  pointer-events: none;
  z-index: 2;
  display: none;
}

#locatorMinimapToggleBtn {
  position: absolute;
  right: 1.18rem;
  bottom: calc(1rem + 220px - 2.2rem);
  z-index: 18;
  display: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  min-width: 0;
  padding: 0;
  margin: 0;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
  background: rgba(235,235,235,0.82);
  color: rgba(20,24,32,0.82);
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow: 0 6px 14px rgba(0,0,0,0.24);
  backdrop-filter: blur(8px);
}

#locatorMinimapToggleBtn:hover {
  transform: scale(1.06);
  background: rgba(255,255,255,0.94);
  box-shadow: 0 8px 18px rgba(0,0,0,0.28);
}

#locatorMinimapToggleBtn.is-collapsed {
  bottom: 1rem;
  background: rgba(10, 14, 24, 0.76);
  color: var(--fg);
  font-size: 1rem;
}

#locatorRevealOverlay {
  position: fixed;
  inset: 0;
  z-index: 100070;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(5px);
}

#locatorRevealOverlay.show #locatorRevealCard {
  opacity: 1;
  transform: translateY(0) scale(1);
}

#locatorRevealCard {
  width: fit-content;
  max-width: 94vw;
  max-height: 92vh;
  overflow: hidden;
  padding: 1.1rem;
  border-radius: 1.1rem;
  background:
    linear-gradient(
      to bottom right,
      rgba(11, 29, 58, 0.85),
      rgba(68, 75, 90, 0.85)
    );
  color: var(--fg);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 0 28px rgba(0,0,0,0.45);
  opacity: 0;
  transform: translateY(20px) scale(0.985);
  transition: opacity 0.22s ease, transform 0.22s ease;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

#locatorRevealCard.split-card {
  width: min(1080px, 94vw);
}

#locatorRevealCard.merged-card {
  width: min(590px, 94vw);
}

.locator-reveal-compare {
  flex: 1;
  min-height: 0;
  display: grid;
  gap: 1rem;
}

.locator-reveal-compare.split-mode {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.locator-reveal-compare.merged-mode {
  grid-template-columns: minmax(0, 500px);
  justify-content: center;
}

.locator-reveal-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto auto 1fr auto;
  gap: 0.52rem;
  padding: 0.9rem;
  border-radius: 1rem;
  background: rgba(255,255,255,0.065);
  border: 1px solid rgba(255,255,255,0.11);
  overflow: hidden;
}

.locator-reveal-panel.correct,
.locator-reveal-panel.merged {
  opacity: 0;
  transform: translateY(10px);
}

.locator-reveal-panel.player {
  opacity: 0;
  transform: translateX(-22px) scale(0.985);
}

.locator-reveal-compare.is-revealed .locator-reveal-panel.correct,
.locator-reveal-compare.is-revealed .locator-reveal-panel.merged {
  opacity: 1;
  transform: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  transition-delay: 0.16s;
}

.locator-reveal-compare.is-revealed .locator-reveal-panel.player {
  opacity: 1;
  transform: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.locator-reveal-panel-kicker {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0.34rem 0.8rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: center;
}

.locator-reveal-panel.player .locator-reveal-panel-kicker {
  color: #1c1c2c;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.36);
}

.locator-reveal-panel.correct .locator-reveal-panel-kicker,
.locator-reveal-panel.merged .locator-reveal-panel-kicker {
  color: #06220b;
  background: linear-gradient(135deg, rgba(50,205,50,0.95), rgba(118,255,118,0.85));
  box-shadow: 0 0 12px rgba(50,205,50,0.32);
}

.locator-reveal-map-name {
  margin: 0;
  text-align: center;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.2;
}

.locator-reveal-cover-img,
.locator-reveal-cover-fallback {
  justify-self: center;
  width: min(100%, 360px);
  height: 88px;
  border-radius: 0.82rem;
  border: 1px solid rgba(255,255,255,0.14);
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(0,0,0,0.22);
}

.locator-reveal-cover-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  background: rgba(255,255,255,0.08);
}

.locator-reveal-floor-name {
  justify-self: center;
  text-align: center;
  font-size: 0.94rem;
  font-weight: 650;
  opacity: 0.92;
  padding: 0;
  border: none;
  background: transparent;
}

.locator-reveal-stage-frame {
  justify-self: center;
  align-self: start;
  position: relative;
  width: min(100%, 360px);
  height: 250px;
  border-radius: 1rem;
  overflow: hidden;
  background: rgba(0,0,0,0.24);
  border: 1px solid rgba(255,255,255,0.11);
  cursor: zoom-in;
}

.locator-reveal-panel.merged .locator-reveal-stage-frame {
  width: min(100%, 430px);
  height: 315px;
}

.locator-reveal-stage-frame::after {
  content: "🔍";
  position: absolute;
  right: 0.65rem;
  bottom: 0.55rem;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(10, 14, 24, 0.70);
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 6px 14px rgba(0,0,0,0.24);
  backdrop-filter: blur(8px);
}

.locator-reveal-stage {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.locator-reveal-stage-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.locator-reveal-stage-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.locator-reveal-inspect-btn {
  justify-self: center;
  width: fit-content;
  min-width: 128px;
  margin-top: 0;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 800;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.14);
  color: var(--fg);
}

.locator-reveal-inspect-btn:hover {
  background: rgba(255,255,255,0.17);
}

#locatorRevealScoreBreakdown {
  flex: 0 0 auto;
  width: min(520px, 100%);
  margin: 0 auto;
  padding: 0.78rem 1rem;
  border-radius: 0.95rem;
  background: rgba(0,0,0,0.20);
  border: 1px solid rgba(255,255,255,0.11);
  display: grid;
  gap: 0.42rem;
}

#locatorRevealCard.merged-card #locatorRevealScoreBreakdown {
  width: min(430px, 100%);
}

.locator-reveal-score-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  font-size: 0.94rem;
}

.locator-reveal-score-row span:first-child {
  text-align: left;
}

.locator-reveal-score-row strong {
  text-align: right;
  font-size: 1rem;
}

.locator-reveal-score-divider {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255,255,255,0.28),
    transparent
  );
  margin: 0.15rem 0;
}

.locator-reveal-score-row.total {
  font-size: 1.02rem;
  font-weight: 800;
}

.locator-reveal-footer {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
}

#locatorRevealContinueBtn {
  min-width: 180px;
  margin-top: 0;
}

#locatorInspectOverlay {
  position: fixed;
  inset: 0;
  z-index: 100080;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(7px);
}

#locatorInspectCard {
  position: relative;
  width: min(1280px, 96vw);
  height: min(780px, 92vh);
  padding: 1rem;
  border-radius: 1.1rem;
  background:
    linear-gradient(
      to bottom right,
      rgba(11, 29, 58, 0.94),
      rgba(68, 75, 90, 0.94)
    );
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 0 28px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  color: var(--fg);
}

#locatorInspectCloseBtn {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  margin: 0;
  padding: 0.35rem 0.55rem;
  background: rgba(0,0,0,0.22);
  z-index: 2;
}

#locatorInspectTitle {
  text-align: center;
  font-weight: 900;
  font-size: 1.15rem;
  margin: 0;
  padding-right: 2.5rem;
  padding-left: 2.5rem;
}

#locatorInspectGrid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 1rem;
}

.locator-inspect-side {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.locator-inspect-side h3 {
  text-align: center;
  margin: 0;
  font-size: 1rem;
}

#locatorInspectScreenshot {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  border-radius: 1rem;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.11);
}

#locatorInspectMinimapFrame {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: 1rem;
  overflow: hidden;
  background: rgba(0,0,0,0.24);
  border: 1px solid rgba(255,255,255,0.11);
}

#feedbackOverlay.locator-bullseye-flash {
  background: radial-gradient(circle, rgba(50,205,50,0.30), rgba(31,59,99,0.94)) !important;
  box-shadow: 0 0 35px rgba(50,205,50,0.48) !important;
}

.locator-flash-bullseye {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.locator-flash-bullseye-ring {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 3px solid rgba(50,205,50,0.9);
  box-shadow: 0 0 22px rgba(50,205,50,0.6);
  animation: locatorBullseyePulse 0.9s ease-in-out infinite alternate;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.15rem;
  background: rgba(50,205,50,0.08);
}

.locator-flash-bullseye strong {
  font-size: 2rem;
}

.locator-flash-bullseye span {
  font-size: 1rem;
  opacity: 0.9;
}

@keyframes locatorBullseyePulse {
  from {
    transform: scale(0.82);
    opacity: 0.72;
  }

  to {
    transform: scale(1.08);
    opacity: 1;
  }
}

@media (max-width: 900px) {
  #locatorRevealCard {
    max-height: 94vh;
  }

  .locator-reveal-compare.split-mode {
    grid-template-columns: 1fr;
  }

  .locator-reveal-stage-frame,
  .locator-reveal-panel.merged .locator-reveal-stage-frame {
    width: min(100%, 330px);
    height: 220px;
  }

  .locator-reveal-cover-img,
  .locator-reveal-cover-fallback {
    width: min(100%, 330px);
    height: 78px;
  }

  #locatorRevealScoreBreakdown {
    padding: 0.65rem 0.8rem;
  }

  #locatorInspectGrid {
    grid-template-columns: 1fr;
  }

  #locatorInspectCard {
    height: min(860px, 94vh);
  }
}

#locatorRevealOverlay {
  position: fixed;
  inset: 0;
  z-index: 100070;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(5px);
}

#locatorRevealOverlay.show #locatorRevealCard {
  opacity: 1;
  transform: translateY(0) scale(1);
}

#locatorRevealCard {
  width: fit-content;
  max-width: 94vw;
  max-height: 92vh;
  overflow: hidden;
  padding: 1.1rem;
  border-radius: 1.1rem;
  background:
    linear-gradient(
      to bottom right,
      rgba(11, 29, 58, 0.85),
      rgba(68, 75, 90, 0.85)
    );
  color: var(--fg);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 0 28px rgba(0,0,0,0.45);
  opacity: 0;
  transform: translateY(20px) scale(0.985);
  transition: opacity 0.22s ease, transform 0.22s ease;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

#locatorRevealCard.split-card {
  width: min(1080px, 94vw);
}

#locatorRevealCard.merged-card {
  width: min(590px, 94vw);
}

.locator-reveal-compare {
  flex: 1;
  min-height: 0;
  display: grid;
  gap: 1rem;
}

.locator-reveal-compare.split-mode {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.locator-reveal-compare.merged-mode {
  grid-template-columns: minmax(0, 500px);
  justify-content: center;
}

.locator-reveal-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto auto 1fr;
  gap: 0.52rem;
  padding: 0.9rem;
  border-radius: 1rem;
  background: rgba(255,255,255,0.065);
  border: 1px solid rgba(255,255,255,0.11);
  overflow: hidden;
}

.locator-reveal-panel.correct,
.locator-reveal-panel.merged {
  opacity: 0;
  transform: translateY(10px);
}

.locator-reveal-panel.player {
  opacity: 0;
  transform: translateX(-22px) scale(0.985);
}

.locator-reveal-compare.is-revealed .locator-reveal-panel.correct,
.locator-reveal-compare.is-revealed .locator-reveal-panel.merged {
  opacity: 1;
  transform: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  transition-delay: 0.16s;
}

.locator-reveal-compare.is-revealed .locator-reveal-panel.player {
  opacity: 1;
  transform: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.locator-reveal-panel-kicker {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0.34rem 0.8rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: center;
}

.locator-reveal-panel.player .locator-reveal-panel-kicker {
  color: #1c1c2c;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.36);
}

.locator-reveal-panel.correct .locator-reveal-panel-kicker,
.locator-reveal-panel.merged .locator-reveal-panel-kicker {
  color: #06220b;
  background: linear-gradient(135deg, rgba(50,205,50,0.95), rgba(118,255,118,0.85));
  box-shadow: 0 0 12px rgba(50,205,50,0.32);
}

.locator-reveal-map-name {
  margin: 0;
  text-align: center;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.2;
}

.locator-reveal-cover-img,
.locator-reveal-cover-fallback {
  justify-self: center;
  width: min(100%, 360px);
  height: 88px;
  border-radius: 0.82rem;
  border: 1px solid rgba(255,255,255,0.14);
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(0,0,0,0.22);
}

.locator-reveal-cover-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  background: rgba(255,255,255,0.08);
}

.locator-reveal-floor-name {
  justify-self: center;
  text-align: center;
  font-size: 0.94rem;
  font-weight: 650;
  opacity: 0.92;
  padding: 0;
  border: none;
  background: transparent;
}

.locator-reveal-stage-frame {
  justify-self: center;
  align-self: start;
  position: relative;
  width: min(100%, 360px);
  height: 250px;
  border-radius: 1rem;
  overflow: hidden;
  background: rgba(0,0,0,0.24);
  border: 1px solid rgba(255,255,255,0.11);
  cursor: zoom-in;
}

.locator-reveal-panel.merged .locator-reveal-stage-frame {
  width: min(100%, 430px);
  height: 315px;
}

.locator-reveal-stage {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.locator-reveal-stage-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.locator-reveal-stage-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

#locatorRevealScoreBreakdown {
  flex: 0 0 auto;
  width: min(520px, 100%);
  margin: 0 auto;
  padding: 0.78rem 1rem;
  border-radius: 0.95rem;
  background: rgba(0,0,0,0.20);
  border: 1px solid rgba(255,255,255,0.11);
  display: grid;
  gap: 0.42rem;
}

#locatorRevealCard.merged-card #locatorRevealScoreBreakdown {
  width: min(430px, 100%);
}

.locator-reveal-score-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  font-size: 0.94rem;
}

.locator-reveal-score-row span:first-child {
  text-align: left;
}

.locator-reveal-score-row strong {
  text-align: right;
}

.locator-reveal-score-row strong {
  font-size: 1rem;
}

.locator-reveal-score-divider {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255,255,255,0.28),
    transparent
  );
  margin: 0.15rem 0;
}

.locator-reveal-score-row.total {
  font-size: 1.02rem;
  font-weight: 800;
}

.locator-reveal-footer {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
}

#locatorRevealContinueBtn {
  min-width: 180px;
  margin-top: 0;
}

#locatorRevealZoomOverlay {
  position: fixed;
  inset: 0;
  z-index: 100060;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(7px);
}

#locatorRevealZoomCard {
  position: relative;
  width: min(980px, 95vw);
  height: min(860px, 92vh);
  padding: 1rem;
  border-radius: 1.1rem;
  background:
    linear-gradient(
      to bottom right,
      rgba(11, 29, 58, 0.94),
      rgba(68, 75, 90, 0.94)
    );
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 0 28px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#locatorRevealZoomCloseBtn {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  margin: 0;
  padding: 0.35rem 0.55rem;
  background: rgba(0,0,0,0.22);
}

#locatorRevealZoomTitle {
  text-align: center;
  font-weight: 900;
  font-size: 1.15rem;
  padding-right: 2.5rem;
  padding-left: 2.5rem;
}

.locator-reveal-zoom-frame {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: 1rem;
  overflow: hidden;
  background: rgba(0,0,0,0.24);
  border: 1px solid rgba(255,255,255,0.11);
}

#feedbackOverlay.locator-bullseye-flash {
  background: radial-gradient(circle, rgba(50,205,50,0.30), rgba(31,59,99,0.94)) !important;
  box-shadow: 0 0 35px rgba(50,205,50,0.48) !important;
}

.locator-flash-bullseye {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.locator-flash-bullseye-ring {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 3px solid rgba(50,205,50,0.9);
  box-shadow: 0 0 22px rgba(50,205,50,0.6);
  animation: locatorBullseyePulse 0.9s ease-in-out infinite alternate;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.15rem;
  background: rgba(50,205,50,0.08);
}

.locator-flash-bullseye strong {
  font-size: 2rem;
}

.locator-flash-bullseye span {
  font-size: 1rem;
  opacity: 0.9;
}

@keyframes locatorBullseyePulse {
  from {
    transform: scale(0.82);
    opacity: 0.72;
  }

  to {
    transform: scale(1.08);
    opacity: 1;
  }
}

#locatorMinimapToggleBtn {
  position: absolute;
  right: 1.18rem;
  bottom: calc(1rem + 220px - 2.2rem);
  z-index: 18;
  display: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  min-width: 0;
  padding: 0;
  margin: 0;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
  background: rgba(235,235,235,0.82);
  color: rgba(20,24,32,0.82);
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow: 0 6px 14px rgba(0,0,0,0.24);
  backdrop-filter: blur(8px);
}

#locatorMinimapToggleBtn:hover {
  transform: scale(1.06);
  background: rgba(255,255,255,0.94);
  box-shadow: 0 8px 18px rgba(0,0,0,0.28);
}

#locatorMinimapToggleBtn.is-collapsed {
  bottom: 1rem;
  background: rgba(10, 14, 24, 0.76);
  color: var(--fg);
  font-size: 1rem;
}

@media (max-width: 900px) {
  #locatorRevealCard {
    height: min(820px, 94vh);
  }

  .locator-reveal-compare.split-mode {
    grid-template-columns: 1fr;
  }

  .locator-reveal-stage-frame,
  .locator-reveal-panel.merged .locator-reveal-stage-frame {
    width: min(100%, 330px);
    height: 220px;
  }

  .locator-reveal-cover-img,
  .locator-reveal-cover-fallback {
    width: min(100%, 330px);
    height: 78px;
  }

  #locatorRevealScoreBreakdown {
    padding: 0.65rem 0.8rem;
  }
}

@media (max-width: 900px) {
  #locatorMinimapShell {
    width: 190px;
  }

  #locatorMinimapShell:hover {
    width: 280px;
  }
}

@media (max-width: 640px) {
  #locatorMinimapShell {
    right: 0.65rem;
    bottom: 0.65rem;
    width: 150px;
  }

  #locatorMinimapShell:hover {
    width: 220px;
  }
}
/* ───────── Locator Editor Dev Modal ───────── */
#locatorEditorLandingTool {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100002;
  margin: 0;
  padding: 1rem;
  box-sizing: border-box;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(7px);
  color: var(--fg);
}

#locatorEditorLandingTool.is-open {
  display: flex;
}

#locatorEditorPanelCard {
  width: min(1120px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--panel-bg);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
}

.locator-editor-panel-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem 0.85rem;
  background: linear-gradient(to bottom right, var(--start-gradient-from), var(--start-gradient-to));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.locator-editor-panel-title {
  flex: 1;
  text-align: center;
  min-width: 0;
}

.locator-editor-panel-title h2 {
  margin: 0;
  font-size: 1.45rem;
}

.locator-editor-panel-title p {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  line-height: 1.35;
  opacity: 0.85;
}

#locatorEditorCloseBtn {
  flex: 0 0 auto;
  margin: 0;
  padding: 0.45rem 0.65rem;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--fg);
  border-radius: 0.65rem;
  cursor: pointer;
  line-height: 1;
}

.locator-editor-panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem 1.25rem 1.25rem;
}

#locatorEditorLandingTool .editor-topbar,
#locatorEditorLandingTool .editor-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.9rem;
}

#locatorEditorLandingTool .editor-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 140px;
}

#locatorEditorLandingTool .editor-field label {
  font-size: 0.86rem;
  font-weight: 700;
  opacity: 0.9;
}

#locatorEditorLandingTool input,
#locatorEditorLandingTool select,
#locatorEditorLandingTool textarea {
  background: rgba(0, 0, 0, 0.22);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.5rem 0.7rem;
  font: inherit;
  box-sizing: border-box;
}

#locatorEditorLandingTool .editor-actions button {
  margin-top: 0;
}

#locatorEditorOutput {
  display: block;
  width: min(920px, 100%);
  min-height: 210px;
  margin: 0.9rem auto 0;
  resize: vertical;
  font-family: Consolas, Monaco, monospace;
  font-size: 0.9rem;
}

#locatorEditorPreviewWrap {
  position: relative;
  width: min(900px, 100%);
  margin: 0 auto 1rem;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.24);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

#locatorEditorPreviewImage {
  width: 100%;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.25);
  margin: 0;
  max-width: none;
  max-height: none;
  border-radius: 0;
}

#locatorEditorPreviewCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#locatorEditorMeta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0.1rem auto 0.75rem;
  font-size: 0.95rem;
}

#locatorEditorMeta code {
  background: rgba(0, 0, 0, 0.22);
  padding: 0.15rem 0.35rem;
  border-radius: 0.35rem;
}

#locatorEditorHint {
  width: min(920px, 100%);
  margin: 0.65rem auto 0;
  font-size: 0.92rem;
  line-height: 1.45;
  opacity: 0.9;
  text-align: center;
}

.locator-editor-score-legend {
  width: min(920px, 100%);
  margin: 0.85rem auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.65rem;
}

.locator-score-chip,
.locator-score-legend-empty {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 0.75rem;
  padding: 0.65rem 0.8rem;
}

.locator-score-chip {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.locator-score-chip strong {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.locator-score-chip span:last-child,
.locator-score-legend-empty {
  font-size: 0.88rem;
  line-height: 1.4;
  opacity: 0.9;
}

.locator-score-chip-dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.18);
}

@media (max-width: 760px) {
  #locatorEditorLandingTool {
    padding: 0.65rem;
    align-items: stretch;
  }

  #locatorEditorPanelCard {
    width: 100%;
    max-height: 96vh;
  }

  .locator-editor-panel-header {
    padding: 0.85rem 0.9rem;
  }

  .locator-editor-panel-title h2 {
    font-size: 1.2rem;
  }

  .locator-editor-panel-title p {
    display: none;
  }

  .locator-editor-panel-body {
    padding: 0.85rem;
  }

  #locatorEditorLandingTool .editor-field {
    width: 100%;
    min-width: 0;
  }
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.locator-reveal-stage-frame::before,
.locator-reveal-stage-frame::after {
  content: none !important;
  display: none !important;
}

#locatorRevealOverlay {
  padding: 0.65rem !important;
}

#locatorRevealCard {
  max-height: 96vh !important;
  padding: 0.78rem !important;
  gap: 0.5rem !important;
}

#locatorRevealCard.split-card {
  width: min(980px, 96vw) !important;
}

#locatorRevealCard.merged-card {
  width: min(540px, 96vw) !important;
}

.locator-reveal-compare {
  gap: 0.65rem !important;
}

.locator-reveal-panel {
  gap: 0.34rem !important;
  padding: 0.62rem !important;
  border-radius: 0.85rem !important;
}

.locator-reveal-panel-kicker {
  padding: 0.24rem 0.65rem !important;
  font-size: 0.78rem !important;
}

.locator-reveal-map-name {
  font-size: 0.98rem !important;
  line-height: 1.12 !important;
}

.locator-reveal-cover-img,
.locator-reveal-cover-fallback {
  height: 62px !important;
  border-radius: 0.65rem !important;
}

.locator-reveal-floor-name {
  font-size: 0.84rem !important;
}

.locator-reveal-stage-frame {
  width: min(100%, 315px) !important;
  height: 205px !important;
  border-radius: 0.82rem !important;
  cursor: pointer;
}

.locator-reveal-panel.merged .locator-reveal-stage-frame {
  width: min(100%, 390px) !important;
  height: 260px !important;
}

.locator-reveal-inspect-btn {
  min-width: 112px !important;
  padding: 0.38rem 0.72rem !important;
  font-size: 0.82rem !important;
}

#locatorRevealScoreBreakdown {
  padding: 0.52rem 0.78rem !important;
  gap: 0.26rem !important;
  border-radius: 0.78rem !important;
}

.locator-reveal-score-row {
  font-size: 0.84rem !important;
}

.locator-reveal-score-row strong {
  font-size: 0.92rem !important;
}

.locator-reveal-score-row.total {
  font-size: 0.92rem !important;
}

#locatorRevealContinueBtn {
  min-width: 150px !important;
  padding: 0.55rem 1rem !important;
}

#locatorInspectScreenshot.is-clickable {
  cursor: zoom-in;
}

#locatorRevealZoomFrame {
  position: relative;
}

@media (max-height: 780px) {
  .locator-reveal-cover-img,
  .locator-reveal-cover-fallback {
    display: none !important;
  }

  .locator-reveal-stage-frame {
    height: 190px !important;
  }

  .locator-reveal-panel.merged .locator-reveal-stage-frame {
    height: 235px !important;
  }
}

#locatorInspectGrid .locator-inspect-side:first-child {
  display: grid !important;
  grid-template-rows: auto 1fr !important;
  gap: 0.65rem !important;
  min-height: 0 !important;
}

#locatorInspectScreenshot {
  width: 100% !important;
  height: auto !important;
  max-height: 100% !important;
  align-self: center !important;
  justify-self: center !important;
  object-fit: contain !important;
}

#locatorInspectMinimapFrame.is-zoomable {
  cursor: zoom-in;
}

#locatorInspectMinimapFrame.is-zoomable::before,
#locatorInspectMinimapFrame.is-zoomable::after {
  content: none !important;
  display: none !important;
}

#locatorRevealZoomOverlay {
  z-index: 100090 !important;
  background: rgba(0, 0, 0, 0.86) !important;
  backdrop-filter: blur(7px) !important;
}

#locatorRevealZoomCard {
  width: min(1280px, 96vw) !important;
  height: min(900px, 94vh) !important;
  padding: 0.85rem !important;
  background: rgba(8, 10, 18, 0.96) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 0 38px rgba(0, 0, 0, 0.78) !important;
}

#locatorRevealZoomTitle {
  margin: 0 !important;
  min-height: 1.45rem !important;
}

#locatorRevealZoomFrame {
  border-radius: 0.75rem !important;
  background: rgba(0, 0, 0, 0.44) !important;
}

#locatorRevealZoomImage {
  object-fit: contain !important;
}

#locatorInspectOverlay,
#locatorRevealZoomOverlay {
  cursor: zoom-out;
}

#locatorInspectCard,
#locatorRevealZoomCard {
  cursor: default;
}

#locatorInspectCloseBtn,
#locatorRevealZoomCloseBtn {
  cursor: pointer;
}

#locatorRevealZoomCloseBtn {
  top: 1rem !important;
  right: 1rem !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 2rem !important;
  line-height: 1 !important;
  background: none !important;
  border: none !important;
  color: var(--fg) !important;
  box-shadow: none !important;
  z-index: 100091 !important;
}

#locatorRevealZoomCloseBtn:hover {
  background: none !important;
  transform: scale(1.05) !important;
  box-shadow: none !important;
}

#selectionRow {
  display: grid !important;
  grid-template-columns: max-content max-content max-content;
  grid-template-areas:
    "rounds difficulty play"
    ". . help"
    "daily daily daily";
  align-items: end !important;
  justify-content: center !important;
  column-gap: 0.75rem !important;
  row-gap: 0.45rem !important;
  flex-wrap: unset !important;
  margin-bottom: 1.5rem !important;
}

#selectionRow > div:nth-of-type(1) {
  grid-area: rounds;
  justify-self: end !important;
}

#selectionRow > div:nth-of-type(2) {
  grid-area: difficulty;
  justify-self: start !important;
}

#selectionRow > div:nth-of-type(3),
.play-mode-buttons {
  grid-area: play;
  display: grid !important;
  grid-template-columns: 145px 145px;
  align-items: end !important;
  justify-content: center !important;
  column-gap: 0.75rem !important;
  flex-wrap: nowrap !important;
}

.play-mode-buttons button {
  justify-self: center;
  margin-top: 0;
}

#modeHelpRow {
  grid-area: help;
  justify-self: center;
  display: grid;
  grid-template-columns: 145px 145px;
  column-gap: 0.75rem;
  align-items: start;
  justify-content: center;
  margin-top: -0.1rem;
}

.mode-help-pill {
  justify-self: center;
  padding: 0.24rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.18);
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0.9;
  cursor: help;
  line-height: 1.15;
  margin-top: 0;
}

.mode-help-pill:hover {
  opacity: 1;
  transform: translateY(-1px);
}

#dailyChallengeRow {
  grid-area: daily;
  justify-self: center;
  align-self: center;
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas:
    "classicButton locatorButton"
    "classicScore locatorScore";
  align-items: center;
  justify-content: center;
  gap: 0.45rem 1.5rem;
  margin-top: 0.2rem;
}

#dailyClassicHighscore {
  grid-area: classicScore;
}

#dailyLocatorHighscore {
  grid-area: locatorScore;
}

#dailyClassicButton {
  grid-area: classicButton;
}

#dailyLocatorButton {
  grid-area: locatorButton;
}

.daily-score-pill {
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.15;
  padding: 0.38rem 0.65rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255,255,255,0.14);
  white-space: nowrap;
  opacity: 0.95;
}

.daily-challenge-button {
  margin-top: 0 !important;
  padding: 0.65rem 1rem !important;
  font-size: 0.95rem !important;
  cursor: pointer;
}

@media (max-width: 860px) {
  #selectionRow {
    grid-template-columns: max-content max-content;
      grid-template-areas:
      "rounds difficulty"
      "play play"
      "help help"
      "daily daily";
    align-items: center !important;
    column-gap: 0.75rem !important;
    row-gap: 1rem !important;
  }

  #selectionRow > div:nth-of-type(1) {
    justify-self: end !important;
  }

  #selectionRow > div:nth-of-type(2) {
    justify-self: start !important;
  }

  #selectionRow > div:nth-of-type(3),
.play-mode-buttons,
#modeHelpRow,
#dailyChallengeRow {
  justify-self: center !important;
}

#dailyChallengeRow {
  grid-template-columns: auto auto;
  grid-template-areas:
    "classicButton locatorButton"
    "classicScore locatorScore";
}
}

@media (max-width: 560px) {
  #selectionRow {
    grid-template-columns: 1fr;
      grid-template-areas:
      "rounds"
      "difficulty"
      "play"
      "help"
      "daily";
    row-gap: 0.8rem !important;
  }

  #selectionRow > div:nth-of-type(1),
#selectionRow > div:nth-of-type(2),
#selectionRow > div:nth-of-type(3),
.play-mode-buttons,
#modeHelpRow,
#dailyChallengeRow {
  justify-self: center !important;
}

   #selectionRow > div:nth-of-type(3),
  .play-mode-buttons,
  #modeHelpRow {
    grid-template-columns: 145px !important;
    row-gap: 0.45rem !important;
    align-items: center !important;
  }

  #dailyChallengeRow {
  grid-template-columns: 1fr;
  grid-template-areas:
    "classicButton"
    "classicScore"
    "locatorButton"
    "locatorScore";
  width: min(260px, 100%);
  margin-top: 0.4rem;
}

.daily-score-pill,
.daily-challenge-button {
  justify-self: stretch;
  text-align: center;
}
}

#landing button#playButton,
#landing button#playLocatorButton,
#landing button#dailyChallengeButton,
#landing button#dailyClassicButton,
#landing button#dailyLocatorButton {
  border: 2px solid var(--accent8);
  box-shadow: 0 0 8px var(--accent8);
}

body:not(.light-mode) #landing button#playButton,
body:not(.light-mode) #landing button#playLocatorButton,
body:not(.light-mode) #landing button#dailyChallengeButton,
body:not(.light-mode) #landing button#dailyClassicButton,
body:not(.light-mode) #landing button#dailyLocatorButton {
  background-color: var(--btn-hover-bg);
  border: 2px solid var(--accent7);
  color: var(--fg);
  box-shadow: 0 0 8px var(--btn-bg);
}

body:not(.light-mode) #landing button#playButton:hover,
body:not(.light-mode) #landing button#playLocatorButton:hover,
body:not(.light-mode) #landing button#dailyChallengeButton:hover,
body:not(.light-mode) #landing button#dailyClassicButton:hover,
body:not(.light-mode) #landing button#dailyLocatorButton:hover {
  background-color: var(--btn-bg);
}

.locator-location-report-cta {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: center;
}

.locator-location-report-btn {
  margin-top: 0;
  padding: 0.55rem 0.85rem;
  font-size: 0.9rem;
  border-radius: 999px;
}

.locator-location-reason-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}

.locator-location-reason-btn {
  margin-top: 0;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.07);
  font-size: 0.9rem;
}

.locator-location-reason-btn.is-selected {
  background: rgba(78, 140, 255, 0.32);
  border-color: var(--accent7);
  box-shadow: 0 0 10px rgba(78, 140, 255, 0.45);
}

#locatorLocationReportOverlay {
  z-index: 100090 !important;
}

#locatorLocationReportOverlay > div {
  position: relative;
  z-index: 100091;
}

.dev-location-report-card {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 0.75rem;
}

.dev-location-report-card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.65rem;
}

.dev-location-report-status {
  padding: 0.15rem 0.5rem;
  border-radius: 0.6rem;
  font-size: 0.82rem;
  white-space: nowrap;
}

.dev-location-report-status.resolved {
  background: rgba(0, 255, 128, 0.12);
  border: 1px solid rgba(0, 255, 128, 0.25);
}

.dev-location-report-status.open {
  background: rgba(255, 196, 0, 0.12);
  border: 1px solid rgba(255, 196, 0, 0.25);
}

.dev-location-report-media-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 0.5rem;
  align-items: stretch;
  margin-bottom: 0.65rem;
}

.dev-location-report-asset {
  min-width: 0;
}

.dev-location-report-asset-label {
  font-size: 0.78rem;
  font-weight: 700;
  opacity: 0.88;
  margin-bottom: 0.25rem;
  text-align: center;
}

.dev-location-report-asset-img,
.dev-location-report-asset-empty {
  width: 100%;
  height: 92px;
  border-radius: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.22);
}

.dev-location-report-asset-img {
  object-fit: cover;
  cursor: zoom-in;
  display: block;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dev-location-report-asset-img:hover {
  transform: scale(1.025);
  box-shadow: 0 0 10px rgba(78, 140, 255, 0.45);
}

.dev-location-report-asset.minimap .dev-location-report-asset-img,
.dev-location-report-asset.minimap .dev-location-report-asset-empty {
  object-fit: contain;
}

.dev-location-report-asset-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.65;
}

.dev-location-report-info {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  opacity: 0.9;
}

.dev-location-report-date {
  margin-top: 0.25rem;
  opacity: 0.75;
  font-size: 0.85rem;
}

.dev-location-report-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

@media (max-width: 760px) {
  .dev-location-report-media-grid {
    grid-template-columns: 1fr;
  }

  .dev-location-report-asset-img,
  .dev-location-report-asset-empty {
    height: 130px;
  }
}

.locator-location-report-status {
  display: block;
  margin-top: 0.75rem;
  min-height: 1.2em;
  opacity: 0.95;
}

.locator-location-report-status[hidden] {
  display: none !important;
}

.locator-location-report-status.is-error {
  color: var(--danger);
}

.locator-location-report-status.is-success {
  color: var(--success);
}

.dev-location-report-media-grid.same-minimap {
  grid-template-columns: 1.05fr 1fr;
}

.dev-location-report-media-grid.split-minimap {
  grid-template-columns: 1.1fr 1fr 1fr;
}

.dev-location-report-stage-frame {
  all: unset;
  position: relative;
  width: 100%;
  height: 92px;
  display: block;
  overflow: hidden;
  border-radius: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.22);
  cursor: zoom-in;
}

.dev-location-report-stage-frame:hover {
  transform: scale(1.025);
  box-shadow: 0 0 10px rgba(78, 140, 255, 0.45);
}

.dev-location-report-stage-frame .locator-reveal-stage {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
}

.dev-location-report-stage-frame .locator-reveal-stage-image,
.dev-location-report-stage-frame .locator-reveal-stage-overlay {
  pointer-events: none;
}

@media (max-width: 760px) {
  .dev-location-report-media-grid.same-minimap,
  .dev-location-report-media-grid.split-minimap {
    grid-template-columns: 1fr;
  }

  .dev-location-report-stage-frame {
    height: 130px;
  }
}

.stats-mode-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.stats-mode-card {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.stats-mode-card-head h3 {
  margin: 0 0 0.85rem;
  text-align: center;
  font-size: 1.35rem;
}

.stats-mode-card-grid {
  display: grid;
  gap: 0.45rem;
}

.stats-mini-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.42rem 0.55rem;
  border-radius: 0.65rem;
  background: rgba(0, 0, 0, 0.18);
}

.stats-mini-line span {
  opacity: 0.88;
}

.stats-mini-line strong {
  text-align: right;
}

.stats-map-progress-card {
  width: 140px;
  text-align: center;
  font-size: 0.9rem;
}

.stats-map-progress-cover {
  position: relative;
  width: 140px;
  height: 70px;
  display: block;
  overflow: hidden;
  border-radius: 0.4rem;
  margin: 0 0 0.5rem;
  padding: 0;
  border: none;
  cursor: pointer;
  background: transparent;
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
}

.stats-map-progress-cover:hover {
  transform: scale(1.04);
}

.stats-map-progress-cover-gray,
.stats-map-progress-cover-color {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stats-map-progress-cover-gray {
  filter: grayscale(100%);
}

.stats-map-progress-divider {
  position: absolute;
  top: 0;
  width: 1px;
  height: 100%;
  background: rgba(255,255,255,0.8);
  z-index: 3;
}

.stats-map-progress-percent {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  text-shadow: 0 0 4px rgba(0,0,0,0.7);
  pointer-events: none;
}

.stats-map-progress-name {
  font-weight: bold;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.stats-map-progress-info {
  color: var(--fg);
  opacity: 0.84;
  line-height: 1.25;
}

#statsMapCollectionOverlay {
  z-index: 10005;
}

#statsMapCollectionPanel {
  width: min(1180px, 95vw);
  max-height: 92vh;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  margin: auto;
  padding: 1.2rem 1.35rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  color: var(--fg);
  background: linear-gradient(to bottom right, var(--start-gradient-from), var(--start-gradient-to));
  box-shadow: 0 0 22px rgba(0,0,0,0.58);
}

#statsMapCollectionPanel .close-btn {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background: none;
  border: none;
  font-size: 1.45rem;
  color: var(--fg);
  cursor: pointer;
  z-index: 2;
}

.stats-map-collection-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin: 0 2.6rem 1rem 0;
}

.stats-map-collection-header h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
}

.stats-map-collection-header p {
  margin: 0.45rem 0 0;
  max-width: 720px;
  font-size: 0.95rem;
  opacity: 0.86;
  line-height: 1.35;
}

.stats-map-collection-meta {
  flex: 0 0 auto;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.12);
  font-weight: 800;
  white-space: nowrap;
}

.stats-map-collection-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 330px);
  gap: 1rem;
  align-items: start;
}

.stats-map-collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 0.65rem;
  align-items: start;
}

.stats-screenshot-tile {
  min-height: 64px;
  border-radius: 0.65rem;
  border: 1px solid rgba(255,255,255,0.12);
  overflow: hidden;
  padding: 0;
  margin: 0;
  position: relative;
}

.stats-screenshot-tile.is-unlocked {
  cursor: pointer;
  background: rgba(255,255,255,0.06);
}

.stats-screenshot-tile.is-unlocked:hover {
  transform: translateY(-2px) scale(1.02);
}

.stats-screenshot-tile.is-unlocked img {
  width: 100%;
  height: 58px;
  display: block;
  object-fit: cover;
}

.stats-screenshot-tile-meta {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 0.12rem;
  padding: 0.28rem 0.34rem 0.34rem;
  font-size: 0.72rem;
  line-height: 1.08;
  text-align: center;
}

.stats-screenshot-tile-meta span {
  opacity: 0.78;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-screenshot-tile-meta strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: capitalize;
  white-space: nowrap;
}

.stats-screenshot-tile.is-locked {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  align-items: center;
  min-height: 88px;
  background: radial-gradient(circle at center, rgba(255,255,255,0.06), rgba(0,0,0,0.34));
  color: rgba(255,255,255,0.74);
  cursor: default;
  user-select: none;
}

.stats-screenshot-lock-icon {
  font-size: 1.25rem;
  filter: drop-shadow(0 0 5px rgba(0,0,0,0.6));
}

.stats-screenshot-tile.is-locked span {
  font-size: 0.72rem;
  opacity: 0.78;
}

.stats-screenshot-analysis {
  position: sticky;
  top: 0.5rem;
  min-height: 260px;
  padding: 0.85rem;
  border-radius: 0.85rem;
  background: rgba(0,0,0,0.16);
  border: 1px solid rgba(255,255,255,0.12);
}

.stats-screenshot-analysis-empty {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0.78;
  line-height: 1.35;
}

.stats-screenshot-analysis h3 {
  margin: 0 0 0.65rem;
  text-align: center;
  font-size: 1.2rem;
}

.stats-screenshot-analysis-image-btn {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0 0 0.75rem;
  border: none;
  border-radius: 0.7rem;
  overflow: hidden;
  background: transparent;
  cursor: pointer;
}

.stats-screenshot-analysis-image-btn img {
  display: block;
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.stats-screenshot-analysis-lines {
  display: grid;
  gap: 0.18rem;
}

.stats-screenshot-analysis-lines .stats-info-line {
  padding: 0.12rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 0.88rem;
}

.stats-screenshot-analysis-lines .stats-info-line:last-child {
  border-bottom: none;
}

.stats-screenshot-open-large-btn {
  display: block;
  margin: 0.85rem auto 0;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
}

.stats-screenshot-minimap-block {
  margin-top: 0.9rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255,255,255,0.10);
}

.stats-screenshot-minimap-block h4 {
  margin: 0 0 0.55rem;
  text-align: center;
  font-size: 1rem;
  font-weight: 850;
}

.stats-screenshot-minimap-frame {
  position: relative;
  display: block;
  width: 100%;
  height: 210px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.22);
  cursor: zoom-in;
}

.stats-screenshot-minimap-frame:hover {
  transform: scale(1.015);
  box-shadow: 0 0 12px rgba(50,205,50,0.26);
}

.stats-screenshot-minimap-frame .locator-reveal-stage {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
}

.stats-screenshot-minimap-frame .locator-reveal-stage-image,
.stats-screenshot-minimap-frame .locator-reveal-stage-overlay {
  pointer-events: none;
}

.stats-screenshot-minimap-missing {
  margin-top: 0.9rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.15);
  display: grid;
  gap: 0.28rem;
  text-align: center;
}

.stats-screenshot-minimap-missing strong {
  font-size: 0.95rem;
}

.stats-screenshot-minimap-missing span {
  font-size: 0.86rem;
  line-height: 1.35;
  opacity: 0.82;
}

@media (max-width: 900px) {
  .stats-screenshot-minimap-frame {
    height: 260px;
  }
}

@media (max-width: 520px) {
  .stats-screenshot-minimap-frame {
    height: 210px;
  }
}

@media (max-width: 900px) {
  .stats-map-collection-body {
    grid-template-columns: 1fr;
  }

  .stats-screenshot-analysis {
    position: static;
  }

  .stats-map-collection-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .stats-map-collection-grid {
    grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
  }

  .stats-screenshot-tile.is-unlocked img {
    height: 50px;
  }
}

.stats-detail-open-btn {
  display: block;
  margin: 1rem auto 0;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
}

.stats-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stats-detail-stat-card,
.stats-detail-diff-card,
.stats-detail-map-tile,
.stats-detail-top-tile {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.85rem;
  padding: 0.75rem;
  text-align: center;
}

.stats-detail-stat-title {
  font-weight: 700;
  opacity: 0.85;
  margin-bottom: 0.25rem;
}

.stats-detail-stat-value {
  font-size: 1.35rem;
  font-weight: 800;
}

.stats-detail-stat-note {
  margin-top: 0.2rem;
  font-size: 0.85rem;
  opacity: 0.78;
}

.stats-detail-diff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stats-detail-diff-card {
  line-height: 1.45;
}

.stats-detail-map-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.stats-detail-map-tile img,
.stats-detail-top-tile img {
  width: 100%;
  height: 92px;
  object-fit: cover;
  border-radius: 0.65rem;
  margin: 0.45rem 0;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.28);
}

.stats-detail-map-name {
  font-size: 1.1rem;
  font-weight: 800;
}

.stats-detail-map-meta {
  margin-top: 0.25rem;
  font-size: 0.9rem;
  opacity: 0.9;
  line-height: 1.4;
}

.stats-detail-top-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 0.85rem;
}

.stats-detail-top-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stats-detail-top-tile strong {
  font-size: 1rem;
}

.stats-detail-top-tile span {
  margin-top: 0.2rem;
  opacity: 0.86;
  font-size: 0.88rem;
}

.stats-detail-empty {
  grid-column: 1 / -1;
  opacity: 0.85;
  text-align: center;
  padding: 1rem;
}

@media (max-width: 820px) {
  .stats-mode-overview,
  .stats-detail-map-grid,
  .stats-detail-top-grid {
    grid-template-columns: 1fr;
  }

  .stats-mini-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
  }

  .stats-mini-line strong {
    text-align: left;
  }
}

.stats-overview-map-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.stats-overview-map-preview {
  min-width: 0;
  text-align: center;
}

.stats-overview-map-preview span {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.83rem;
  font-weight: 700;
  opacity: 0.84;
}

.stats-overview-map-preview img {
  width: 100%;
  max-width: 145px;
  height: 58px;
  object-fit: cover;
  border-radius: 0.55rem;
  display: block;
  margin: 0 auto 0.3rem;
  box-shadow: 0 0 8px rgba(0,0,0,0.25);
}

.stats-overview-map-preview strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-overview-map-preview small {
  display: block;
  margin-top: 0.15rem;
  opacity: 0.78;
  font-size: 0.78rem;
}

.stats-overview-map-preview.is-empty {
  display: flex;
  min-height: 86px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 0.65rem;
  background: rgba(255,255,255,0.05);
}

#modeOverviewTitle {
  display: none !important;
}

.stats-cards {
  align-items: flex-start;
}

.stats-cards .stat-card .stat-subline {
  margin-top: 0.35rem;
  font-size: 0.86rem;
  line-height: 1.25;
  opacity: 0.78;
  font-weight: 600;
}

/* MAIN MODE OVERVIEW */

.stats-mode-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.stats-mode-card {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.stats-mode-card-head h3 {
  margin: 0 0 0.85rem;
  text-align: center;
  font-size: 1.35rem;
}

.stats-mode-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  flex: 1;
}

.stats-mode-lines {
  display: grid;
  gap: 0.35rem;
}

.stats-info-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  line-height: 1.35;
}

.stats-info-line span {
  opacity: 0.88;
}

.stats-info-line strong {
  text-align: right;
  font-weight: 800;
}

.stats-inline-help,
.stats-inline-label-help {
  cursor: help;
  text-decoration: none !important;
  border-bottom: none !important;
}

.stats-inline-label-help {
  display: inline-block;
}

.stats-tooltip-below > .tooltip {
  top: 100% !important;
  bottom: auto !important;
  transform: translateX(-50%) translateY(0.45em) !important;
}

.stats-overview-map-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: auto;
}

.stats-overview-map-preview {
  min-width: 0;
  text-align: center;
}

.stats-overview-map-preview span {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.83rem;
  font-weight: 700;
  opacity: 0.84;
}

.stats-overview-map-preview img {
  width: 100%;
  max-width: 145px;
  height: 58px;
  object-fit: cover;
  border-radius: 0.55rem;
  display: block;
  margin: 0 auto 0.3rem;
  box-shadow: 0 0 8px rgba(0,0,0,0.25);
}

.stats-overview-map-preview strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-overview-map-preview small {
  display: block;
  margin-top: 0.15rem;
  opacity: 0.78;
  font-size: 0.78rem;
}

.stats-overview-map-preview.is-empty {
  display: flex;
  min-height: 86px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 0.65rem;
  background: rgba(255,255,255,0.05);
}

.stats-detail-open-btn {
  display: block;
  margin: 1rem auto 0;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
}

.stats-detail-summary-list {
  width: min(760px, 100%);
  margin: 0 auto 1.15rem;
  display: grid;
  gap: 0.38rem;
}

.stats-detail-summary-list .stats-info-line {
  padding: 0.18rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.stats-detail-section-title {
  text-align: center;
  margin: 1.15rem 0 0.65rem;
}

.stats-detail-diff-grid {
  width: min(940px, 100%);
  margin: 0 auto 1rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 0.75rem;
}

.stats-detail-diff-card {
  text-align: center;
  line-height: 1.45;
  padding: 0.4rem 0.35rem;
}

.stats-detail-diff-card strong {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 1.05rem;
}

.stats-detail-diff-line {
  display: grid;
  gap: 0.08rem;
  padding: 0.34rem 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.stats-detail-diff-line span {
  opacity: 0.78;
  font-size: 0.84rem;
}

.stats-detail-diff-line b {
  font-size: 0.98rem;
}

.stats-detail-diff-line small {
  opacity: 0.72;
  font-size: 0.78rem;
}

.stats-detail-map-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 0.9rem;
  margin: 0 auto 1rem;
  width: min(760px, 100%);
}

.stats-detail-map-tile,
.stats-detail-top-tile {
  text-align: center;
}

.stats-detail-map-tile img,
.stats-detail-top-tile img {
  width: 100%;
  height: 96px;
  object-fit: cover;
  border-radius: 0.65rem;
  margin: 0.45rem 0;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.28);
}

.stats-detail-map-name {
  font-size: 1.05rem;
  font-weight: 800;
}

.stats-detail-map-meta {
  margin-top: 0.25rem;
  font-size: 0.9rem;
  opacity: 0.9;
  line-height: 1.4;
}

.stats-map-tooltip-line {
  display: inline-block;
  cursor: help;
}

.stats-detail-map-placeholder {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
}

.stats-detail-top-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 0.85rem;
  width: min(920px, 100%);
  margin: 0 auto;
}

.stats-detail-top-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stats-detail-top-tile strong {
  font-size: 1rem;
}

.stats-detail-top-tile span {
  margin-top: 0.2rem;
  opacity: 0.86;
  font-size: 0.88rem;
}

.stats-detail-empty {
  grid-column: 1 / -1;
  opacity: 0.85;
  text-align: center;
  padding: 1rem;
}

@media (max-width: 860px) {
  .stats-mode-overview,
  .stats-detail-map-grid,
  .stats-detail-top-grid {
    grid-template-columns: 1fr;
  }

  .stats-overview-map-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-detail-diff-grid {
    grid-template-columns: repeat(2, minmax(135px, 1fr));
  }

  .stats-info-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.12rem;
  }

  .stats-info-line strong {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .stats-detail-diff-grid {
    grid-template-columns: 1fr;
  }

  .stats-overview-map-grid {
    grid-template-columns: 1fr;
  }
}

#statsOverlay #difficultyStats {
  margin-bottom: 1.8rem !important;
}

#statsOverlay #showAllMapsBtn {
  margin-top: 1.4rem !important;
  margin-bottom: 0.9rem !important;
  align-self: center !important;
}

#statsDetailPanel {
  max-width: 1040px !important;
  max-height: 94vh !important;
  padding: 0.95rem 1.25rem 0.9rem !important;
  gap: 0.5rem !important;
}

#statsDetailPanel > h2 {
  font-size: 1.72rem !important;
  margin: 0 2.5rem 0.3rem !important;
  line-height: 1.1 !important;
}

#statsDetailContent {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

#statsDetailPanel .stats-detail-summary-groups {
  width: min(900px, 100%) !important;
  margin: 0 auto 0.62rem !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0.7rem !important;
  align-items: stretch !important;
}

#statsDetailPanel .stats-detail-summary-group {
  display: grid !important;
  gap: 0.14rem !important;
  padding: 0.48rem 0.68rem !important;
  border-radius: 0.78rem !important;
  background: rgba(0, 0, 0, 0.13) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
}

#statsDetailPanel .stats-detail-summary-group .stats-info-line {
  padding: 0.1rem 0 !important;
  font-size: 0.94rem !important;
  line-height: 1.22 !important;
  border-bottom: 1px solid rgba(255,255,255,0.07) !important;
}

#statsDetailPanel .stats-detail-summary-group .stats-info-line:last-child {
  border-bottom: none !important;
}

#statsDetailPanel .stats-info-line span {
  opacity: 1 !important;
  font-weight: 560 !important;
}

#statsDetailPanel .stats-info-line strong {
  font-size: 0.98rem !important;
  font-weight: 850 !important;
}

#statsDetailPanel .stats-detail-section-title {
  margin: 0.72rem 0 0.42rem !important;
  font-size: 1.12rem !important;
  line-height: 1.15 !important;
}

#statsDetailPanel .stats-detail-diff-grid {
  width: min(940px, 100%) !important;
  margin: 0 auto 0.62rem !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(145px, 1fr)) !important;
  gap: 0.62rem !important;
}

#statsDetailPanel .stats-detail-diff-card {
  padding: 0.52rem 0.65rem !important;
  line-height: 1.32 !important;
  text-align: left !important;
  background: rgba(0, 0, 0, 0.13) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  border-radius: 0.75rem !important;
}

#statsDetailPanel .stats-detail-diff-card > strong {
  display: block !important;
  text-align: center !important;
  margin-bottom: 0.38rem !important;
  font-size: 1.02rem !important;
}

#statsDetailPanel .stats-detail-diff-line {
  display: block !important;
  padding: 0.13rem 0 !important;
  border-top: none !important;
  font-size: 0.86rem !important;
}

#statsDetailPanel .stats-detail-diff-line > span {
  display: inline !important;
  opacity: 1 !important;
  font-size: inherit !important;
  font-weight: 560 !important;
}

#statsDetailPanel .stats-detail-diff-line > span::after {
  content: ":";
}

#statsDetailPanel .stats-detail-diff-line b {
  display: inline !important;
  margin-left: 0.25rem !important;
  font-size: 0.91rem !important;
  font-weight: 850 !important;
}

#statsDetailPanel .stats-detail-diff-line small {
  display: inline !important;
  margin-left: 0.18rem !important;
  opacity: 0.78 !important;
  font-size: 0.78rem !important;
}

#statsDetailPanel .stats-detail-diff-line small::before {
  content: "(";
}

#statsDetailPanel .stats-detail-diff-line small::after {
  content: ")";
}

#statsDetailPanel .has-tooltip .tooltip {
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
}

#statsDetailPanel .has-tooltip:hover .tooltip {
  opacity: 1;
  visibility: visible;
}

#statsDetailPanel .stats-detail-map-grid {
  grid-template-columns: repeat(2, max-content) !important;
  justify-content: center !important;
  gap: 3.2rem !important;
  width: min(780px, 100%) !important;
  margin: 0 auto 0.62rem !important;
}

#statsDetailPanel .stats-detail-map-tile {
  width: 220px !important;
  min-width: 0 !important;
  padding: 0.65rem 0.7rem !important;
}

#statsDetailPanel .stats-detail-top-grid {
  grid-template-columns: repeat(3, minmax(180px, 1fr)) !important;
  gap: 0.85rem !important;
  width: min(830px, 100%) !important;
}

#statsDetailPanel .stats-detail-top-tile {
  min-width: 0 !important;
  padding: 0.65rem 0.7rem !important;
}

#statsDetailPanel .stats-detail-map-tile img,
#statsDetailPanel .stats-detail-top-tile img {
  width: 180px !important;
  max-width: 100% !important;
  height: 76px !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  margin: 0.35rem auto !important;
  border-radius: 0.55rem !important;
}

#statsDetailPanel .stats-detail-map-placeholder {
  width: 180px !important;
  max-width: 100% !important;
  height: 76px !important;
  min-height: 76px !important;
  margin: 0.35rem auto !important;
}

#statsDetailPanel .stats-detail-map-name {
  font-size: 0.98rem !important;
  font-weight: 850 !important;
}

#statsDetailPanel .stats-detail-map-meta {
  margin-top: 0.16rem !important;
  font-size: 0.8rem !important;
  line-height: 1.25 !important;
  opacity: 1 !important;
}

#statsDetailPanel .stats-detail-top-tile strong {
  font-size: 0.93rem !important;
  line-height: 1.15 !important;
}

#statsDetailPanel .stats-detail-top-tile span {
  font-size: 0.8rem !important;
  margin-top: 0.12rem !important;
  line-height: 1.2 !important;
}

@media (max-width: 900px) {
  #statsDetailPanel .stats-detail-diff-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr)) !important;
  }

  #statsDetailPanel .stats-detail-summary-groups {
    grid-template-columns: 1fr !important;
    width: min(760px, 100%) !important;
  }
}

@media (max-width: 760px) {
  #statsDetailPanel .stats-detail-map-grid,
  #statsDetailPanel .stats-detail-top-grid {
    grid-template-columns: 1fr !important;
    gap: 0.7rem !important;
  }

  #statsDetailPanel .stats-detail-map-tile {
    width: min(260px, 100%) !important;
  }

  #statsDetailPanel .stats-detail-map-tile img,
  #statsDetailPanel .stats-detail-top-tile img,
  #statsDetailPanel .stats-detail-map-placeholder {
    width: 220px !important;
    max-width: 100% !important;
    height: 92px !important;
  }
}

@media (max-width: 540px) {
  #statsDetailPanel .stats-detail-diff-grid {
    grid-template-columns: 1fr !important;
  }
}

#customMapPoolPanel {
  position: relative;
  width: min(900px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 2rem;
  border-radius: 1rem;
  background: linear-gradient(to bottom right, var(--start-gradient-from), var(--start-gradient-to));
  color: var(--fg);
  border: 1px solid var(--border);
  box-shadow: 0 0 24px rgba(0,0,0,0.55);
  text-align: center;
}

#customMapPoolPanel h2 {
  margin-top: 0;
}

#customMapPoolGrid {
  width: min(660px, 100%);
  margin: 1rem auto 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  align-items: stretch;
}

.custom-map-pool-map-button {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 0.32rem 0.48rem;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  text-align: center;
  line-height: 1.1;
  font-size: 0.84rem;
  white-space: normal;
  word-break: normal;
  hyphens: auto;
  user-select: none;
  cursor: grab;
  position: relative;
}

.custom-map-pool-map-button.selected {
  transform: none !important;
}

.custom-map-pool-map-button:hover {
  transform: scale(1.035);
}

.custom-map-pool-map-button:active {
  cursor: grabbing;
}

.custom-map-pool-map-button.dragging {
  opacity: 0.42;
  filter: grayscale(0.25);
  transform: none !important;
}

.custom-map-pool-map-button.drop-before::before,
.custom-map-pool-map-button.drop-after::after {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: 4px;
  border-radius: 999px;
  background: var(--accent1);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.85);
  pointer-events: none;
  z-index: 3;
}

.custom-map-pool-map-button.drop-before::before {
  left: -0.42rem;
}

.custom-map-pool-map-button.drop-after::after {
  right: -0.42rem;
}

.custom-map-pool-map-button.drop-swap {
  outline: 2px solid var(--accent1);
  outline-offset: 3px;
  box-shadow:
    0 0 0 2px rgba(255, 215, 0, 0.22),
    0 0 14px rgba(255, 215, 0, 0.7);
}

.custom-map-pool-map-button.drop-swap::before {
  content: "⇄";
  position: absolute;
  top: -0.65rem;
  right: -0.45rem;
  width: 1.35rem;
  height: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent1);
  color: #000;
  font-size: 0.85rem;
  font-weight: 900;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
  pointer-events: none;
  z-index: 4;
}

.custom-map-pool-map-button:not(.selected) {
  opacity: 0.62;
  filter: grayscale(0.5);
}

.custom-map-pool-map-button:not(.selected):hover {
  opacity: 0.9;
  filter: grayscale(0.15);
}

@media (max-width: 760px) {
  #customMapPoolGrid {
    width: min(500px, 100%);
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 430px) {
  #customMapPoolGrid {
    grid-template-columns: 1fr;
  }
}

#customMapPoolCounter {
  margin-top: 0.75rem;
  font-weight: 700;
  opacity: 0.9;
}

#customMapPoolWarning {
  margin-top: 1rem;
  color: var(--danger);
  font-weight: 700;
}

#customMapPoolActions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

#customMapPoolOverlay {
  z-index: 10030 !important;
}

#customMapPoolPanel {
  position: relative;
  width: min(900px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 1.5rem 2rem 2rem;
  border-radius: 1rem;
  background: linear-gradient(to bottom right, var(--start-gradient-from), var(--start-gradient-to));
  color: var(--fg);
  border: 1px solid var(--border);
  box-shadow: 0 0 24px rgba(0,0,0,0.55);
  text-align: center;
}

.custom-map-pool-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 3rem;
  margin-bottom: 0.5rem;
}

.custom-map-pool-header h2 {
  margin: 0;
  padding: 0 3rem;
}

#customMapPoolPanel .close-btn {
  position: absolute;
  top: 0;
  right: 0;
  margin: 0;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--fg);
  cursor: pointer;
}

#abortConfirmOverlay {
  position: fixed;
  inset: 0;
  z-index: 100050 !important;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px);
}

#abortConfirmCard {
  width: min(460px, 94vw);
  padding: 1.35rem 1.5rem 1.5rem;
  border-radius: 1rem;
  background: linear-gradient(
    to bottom right,
    var(--start-gradient-from),
    var(--start-gradient-to)
  );
  color: var(--fg);
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 0 28px rgba(0,0,0,0.55);
  text-align: center;
}

#abortConfirmCard h2 {
  margin: 0 0 0.75rem;
  font-size: 1.45rem;
}

#abortConfirmCard p {
  margin: 0;
  line-height: 1.45;
  opacity: 0.92;
}

#abortConfirmActions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

#abortConfirmActions button {
  margin-top: 0;
}

#abortConfirmConfirmButton {
  background: rgba(255, 78, 78, 0.9);
  border: 1px solid rgba(255,255,255,0.18);
}

#abortConfirmConfirmButton:hover {
  background: var(--danger);
  box-shadow: 0 0 12px rgba(255, 78, 78, 0.75);
}

#customMapPoolOrderHint {
  width: min(720px, 100%);
  margin: 0.75rem auto 0;
  padding: 0.65rem 0.8rem;
  border-radius: 0.75rem;
  background: rgba(0,0,0,0.16);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 0.92rem;
  line-height: 1.35;
  opacity: 0.92;
}

.custom-map-pool-map-button {
  user-select: none;
  cursor: grab;
  position: relative;
}

.custom-map-pool-map-button:active {
  cursor: grabbing;
}

.custom-map-pool-map-button.dragging {
  opacity: 0.45;
  transform: scale(0.96) !important;
}

.custom-map-pool-map-button:not(.selected) {
  opacity: 0.58;
  filter: grayscale(0.55);
}

.custom-map-pool-map-button:not(.selected):hover {
  opacity: 0.85;
  filter: grayscale(0.2);
}

#customMapPoolResetOrderButton {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
}

#customMapPoolUnsavedOverlay {
  position: fixed;
  inset: 0;
  z-index: 100060 !important;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px);
}

#customMapPoolUnsavedCard {
  width: min(460px, 94vw);
  padding: 1.35rem 1.5rem 1.5rem;
  border-radius: 1rem;
  background: linear-gradient(
    to bottom right,
    var(--start-gradient-from),
    var(--start-gradient-to)
  );
  color: var(--fg);
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 0 28px rgba(0,0,0,0.55);
  text-align: center;
}

#customMapPoolUnsavedCard h2 {
  margin: 0 0 0.75rem;
  font-size: 1.45rem;
}

#customMapPoolUnsavedCard p {
  margin: 0;
  line-height: 1.45;
  opacity: 0.92;
}

#customMapPoolUnsavedActions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

#customMapPoolUnsavedActions button {
  margin-top: 0;
}

#customMapPoolDiscardButton {
  background: rgba(255, 78, 78, 0.9);
  border: 1px solid rgba(255,255,255,0.18);
}

#customMapPoolDiscardButton:hover {
  background: var(--danger);
  box-shadow: 0 0 12px rgba(255, 78, 78, 0.75);
}

.patch-notes-overlay {
  position: fixed;
  inset: 0;
  z-index: 100002;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(7px);
  justify-content: center;
  align-items: center;
  padding: 1rem;
  box-sizing: border-box;
}

.patch-notes-panel {
  position: relative;
  width: min(920px, 94vw);
  max-height: 88vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 1.2rem;
  color: var(--fg);
  background: linear-gradient(
    to bottom right,
    var(--start-gradient-from),
    var(--start-gradient-to)
  );
  border: 1px solid var(--border);
  box-shadow: 0 0 28px rgba(0, 0, 0, 0.55);
}

.patch-notes-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 3;
  background: none;
  border: none;
  font-size: 1.35rem;
  margin: 0;
  padding: 0.35rem;
  cursor: pointer;
}

.patch-notes-header {
  padding: 1.35rem 3.25rem 1rem;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.patch-notes-header h2 {
  margin: 0 0 0.35rem;
}

.patch-notes-header p {
  margin: 0;
  opacity: 0.78;
  font-size: 0.95rem;
}

.patch-notes-content {
  padding: 1.25rem;
  overflow-y: auto;
}

.patch-notes-section {
  margin-bottom: 1.25rem;
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255,255,255,0.1);
}

.patch-notes-section h3 {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
}

.patch-notes-section ul {
  margin: 0;
  padding-left: 1.25rem;
}

.patch-notes-section li {
  margin-bottom: 0.55rem;
  line-height: 1.45;
}

.patch-notes-section li:last-child {
  margin-bottom: 0;
}

.language-flag-icon {
  width: 2.05rem;
  height: 1.35rem;
  display: block;
  object-fit: cover;
  border-radius: 0.18rem;
  box-shadow: 0 0 4px rgba(0,0,0,0.35);
   transform: translateY(6.5px);
}

#langEn,
#langDe {
  background: none;
  border: 2px solid transparent;
  border-radius: 0.5rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}