: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;

  --chip-bg:        rgba(255, 255, 255, 0.08);
  --pill-bg:        rgba(0, 0, 0, 0.28);
}

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;

  --chip-bg:      rgba(0, 0, 0, 0.06);
  --pill-bg:      rgba(0, 0, 0, 0.08);
}
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;
    }

body:not(.light-mode) #roundInfo,
body:not(.light-mode) #scoreInfo {
  background: rgba(255, 255, 255, 0.1);
}

.beta-build-note {
  box-sizing: border-box;
  margin: 0 auto 1rem;
  display: flex;
  justify-content: center;
}

.beta-build-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  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);
  cursor: help;
}

    

.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;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 0.55rem;
      z-index: 20;
    }
#matchSettingsOverlay select,
#settingsOverlay select {
  background-color: var(--panel-bg);
  color:            var(--fg);
  border:           1px solid var(--border);
  border-radius:    0.5rem;
  padding:          0.5rem 0.75rem;
}
    
    
   
    
    #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;
}

    #screenshot {
      width: 90%;
      height: auto;
      aspect-ratio: 21 / 9;
      max-width: 1100px;
      object-fit: cover;
    }
    #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;
      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;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
}

#feedbackOverlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  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;
  margin: 0;
  justify-self: start;
}

#progressSlot {
  width: 100%;
  display: flex;
  justify-content: center;
}

#progressArea {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#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;
    }

    #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) {
  

  

  
}

@media (max-width: 700px) {
  #gameHeaderTop {
    grid-template-columns: auto 1fr auto;
    row-gap: 0.75rem;
  }

  #gameHeaderActions {
    gap: 0.4rem;
  }

#gameHeaderActions .game-header-icon-btn {
  width: 52px;
  height: 52px;
  font-size: 1.35rem;
}

  #timerDisplay {
    grid-column: 1 / -1;
    justify-self: end;
  }

  

  

  

  #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);
     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 {
  margin-bottom: 0.5rem;
  color: var(--celebrationtext);
  text-overflow: ellipsis;
  max-width: 100%;
}
#settingsToggleButtonEndGear {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

#endScreen p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
}
#endScreenButtons {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
    
#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(0, 0, 0, 0.85);
}

.settings-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 26px 30px;
  border-radius: 16px;
  width: 92%;
  max-width: 760px;
  max-height: 90%;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  background-color: rgba(34, 34, 34, 0.78);
  color: var(--fg);
  backdrop-filter: blur(10px);
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.light-mode .settings-panel {
  background-color: rgba(255, 255, 255, 0.78);
  color: var(--fg);
}

#statsContainer,
#statsDetailPanel {
  background: rgba(34, 34, 34, 0.78);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
}

body.light-mode #statsContainer,
body.light-mode #statsDetailPanel {
  background: rgba(255, 255, 255, 0.78);
}

#matchSettingsOverlay {
  background-color: rgba(34, 34, 34, 0.78);
  color: var(--fg);
  backdrop-filter: blur(10px);
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.light-mode #matchSettingsOverlay {
  background-color: rgba(255, 255, 255, 0.78);
  color: var(--fg);
}

#achievementsOverlay .panel {
  background: rgba(34, 34, 34, 0.78);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
}

body.light-mode #achievementsOverlay .panel {
  background: rgba(255, 255, 255, 0.78);
}

.all-achievements-panel {
  width: 92%;
  max-width: 900px;
  max-height: 85vh;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 1.75rem 2rem;
  border-radius: 1rem;
  background: rgba(34, 34, 34, 0.78);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  color: var(--fg);
}

body.light-mode .all-achievements-panel {
  background: rgba(255, 255, 255, 0.78);
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.stats-map-progress-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

#statsMapCollectionOverlay {
  z-index: 10001 !important;
}

.settings-button-end {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: inherit;
  margin-left: 0.5rem;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
    
    
    
    

    

    
    
    
    
    

.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, .overlay.full-list {
  z-index: 10000 !important;
}
.card {
  background: var(--chip-bg);
  border: 1px solid var(--border);
  padding: 1rem 1.1rem;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
}

.card h4 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  font-weight: 800;
}

.card p {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  line-height: 1.4;
  opacity: 0.85;
}

.progress-container {
  position: relative;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 999px;
  height: 8px;
  margin-top: auto;
}

.progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  transition: width 0.3s ease;
}

.daily-card .progress-bar {
  background: linear-gradient(90deg, var(--btn-bg), var(--accent7));
}
.progress-label {
  position: absolute;
  top: -1.3rem;
  right: 0.1rem;
  font-size: 0.75rem;
  font-weight: bold;
  color: var(--fg);
  white-space: nowrap;
}

.preview-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 0.6rem;
  margin-bottom: 0.75rem;
}

@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;
}

@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;
}

    

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;
}

.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;
}
#matchPanel {
  display: flex;
  flex-direction: column;
  width: 92vw;
  max-width: 1000px;
  height: 88vh;
  box-sizing: border-box;
  padding: 1.5rem 1.75rem;
  border-radius: 1rem;
  background: rgba(34, 34, 34, 0.78);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  color: var(--fg);
}

body.light-mode #matchPanel {
  background: rgba(255, 255, 255, 0.78);
}

#matchContainer {
  display: flex;
  flex: 1;
  min-height: 0;
  gap: 1.25rem;
}

#matchList,
#matchDetails {
  min-width: 0;
  overflow-y: auto;
  color: var(--fg);
}

#matchList {
  flex: 1 1 0;
  padding-right: 1.25rem;
  border-right: 1px solid rgba(128, 128, 128, 0.3);
}

#matchDetails {
  flex: 2 1 0;
  padding-right: 0.25rem;
}

#matchDetails .match-round {
  color: var(--fg);
  padding: 1.1rem 0;
  border-bottom: 1px solid rgba(128, 128, 128, 0.3);
}

#matchDetails .match-round:first-child {
  padding-top: 0.25rem;
}

#matchDetails .match-round:last-child {
  border-bottom: none;
}

.match-history-aborted {
  margin: 0 0 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: rgba(229, 57, 53, 0.2);
  border: 1px solid rgba(229, 57, 53, 0.65);
  color: #ff8a8a;
  font-weight: 700;
  text-align: center;
}

body.light-mode .match-history-aborted {
  background: rgba(211, 47, 47, 0.14);
  border-color: rgba(198, 40, 40, 0.7);
  color: #b3261e;
}

.match-card {
  cursor: pointer;
  padding: 0.75rem 0.7rem 0.75rem 0.85rem;
  border-bottom: 1px solid rgba(128, 128, 128, 0.3);
  border-left: 3px solid transparent;
  background: transparent;
  color: var(--fg);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.match-card:hover {
  background-color: var(--chip-bg);
}

.match-card.active {
  border-left-color: var(--accent7);
  background: rgba(30, 144, 255, 0.12);
}

.match-card.active:hover {
  background: rgba(30, 144, 255, 0.18);
}

.match-history-card-inner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.match-history-thumb {
  width: 64px;
  height: 40px;
  border-radius: 0.4rem;
  object-fit: cover;
  flex: 0 0 auto;
}

.match-history-card-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  line-height: 1.3;
}

.history-result-correct {
  color: limegreen;
}

.history-result-wrong {
  color: crimson;
}

body.light-mode .history-result-correct {
  color: #15803d;
  font-weight: 600;
}

body.light-mode .history-result-wrong {
  color: #c62828;
  font-weight: 600;
}

.match-history-card-meta {
  font-size: 0.85rem;
  opacity: 0.8;
}

.match-history-card-time {
  font-size: 0.72rem;
  opacity: 0.55;
}

#loadMoreMatchesBtn {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
}

.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: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
  border: none;
  border-radius: 8px;
  background: var(--chip-bg);
  color: var(--fg);
  white-space: nowrap;
  transform: none;
}

.history-difficulty-report-btn:hover {
  transform: none;
  filter: none;
  background: var(--btn-bg);
  color: #fff;
}

.history-locator-minimap-column {
  flex: 0 0 100px;
  width: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.32rem;
  min-width: 0;
}

.history-locator-minimap-frame {
  all: unset;
  position: relative;
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
  cursor: zoom-in;
  display: block;
  transition: border-color 0.2s ease;
}

.history-locator-minimap-frame:hover {
  border-color: var(--accent7);
}

.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;
}

@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 88px;
    width: 88px;
  }

  .history-locator-minimap-frame {
    width: 64px;
    height: 64px;
    flex-basis: 64px;
  }

  
}

#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: transparent;
}

#lightboxOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000000;
  backdrop-filter: blur(2px);
}

.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: 0.95rem;
  font-weight: 600;
  opacity: 0.75;
  margin-bottom: 0.35em;
}

.stats-cards .stat-card .stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
}
.stat-card {
  color: var(--fg);
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.top-maps {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}
.top-map {
  text-align: center;
}

.stats-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.stat-card {
  background: var(--chip-bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
  flex: 1 1 120px;
  text-align: center;
}

.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;
}

.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);
}

.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;
}

.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;
  overflow: hidden;
  transition: width 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

#locatorMinimapShell:hover {
  width: 340px;
}

#locatorMinimapWrap {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  background: rgba(0,0,0,0.22);
  user-select: none;
  touch-action: none;
}

#locatorMinimapWrap.is-dragging {
  cursor: grabbing;
}

#locatorRoomHoverLabel,
.reveal-room-hover-label {
  position: absolute;
  top: 8px;
  left: 50%;
  z-index: 5;
  max-width: calc(100% - 80px);
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(78, 140, 255, 0.92);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%) translateY(-4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

#locatorRoomHoverLabel.is-visible,
.reveal-room-hover-label.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#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%;
  pointer-events: none;
  z-index: 2;
  display: none;
}

.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);
}

#locatorInspectOverlay {
  position: fixed;
  inset: 0;
  z-index: 100080;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

#locatorInspectCard {
  position: relative;
  display: flex;
  flex-direction: column;
  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 {
  min-height: 0;
}

.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 {
  min-height: 0;
}

#locatorInspectMinimapFrame {
  position: relative;
  overflow: hidden;
}

@keyframes locatorBullseyePulse {
  from {
    transform: scale(0.82);
    opacity: 0.72;
  }

  to {
    transform: scale(1.08);
    opacity: 1;
  }
}

@media (max-width: 900px) {
  

  

  

  

  

  

  
}

#locatorRevealOverlay {
  position: fixed;
  inset: 0;
  z-index: 100070;
  display: none;
  align-items: center;
  justify-content: center;
  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;
  overflow: hidden;
  color: var(--fg);
  opacity: 0;
  transform: translateY(20px) scale(0.985);
  transition: opacity 0.22s ease, transform 0.22s ease;
  display: flex;
  flex-direction: column;
}

.locator-reveal-compare {
  flex: 1;
  min-height: 0;
  display: grid;
}

.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;
  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;
  border-radius: 999px;
  text-align: center;
}

.locator-reveal-panel.player .locator-reveal-panel-kicker {
  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 {
  box-shadow: 0 0 12px rgba(50,205,50,0.32);
}

.locator-reveal-map-name {
  margin: 0;
  text-align: center;
}

.locator-reveal-cover-img,
.locator-reveal-cover-fallback {
  justify-self: center;
  width: min(100%, 360px);
  object-fit: cover;
}

.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;
  padding: 0;
  border: none;
  background: transparent;
}

.locator-reveal-stage-frame {
  justify-self: center;
  align-self: start;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.11);
}

.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;
  display: grid;
}

#locatorRevealCard.merged-card #locatorRevealScoreBreakdown {
  width: min(430px, 100%);
}

.locator-reveal-score-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
}

.locator-reveal-score-row span:first-child {
  text-align: left;
}

.locator-reveal-score-row strong {
  text-align: right;
}

.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-footer {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
}

#locatorRevealContinueBtn {
  margin-top: 0;
}

#locatorRevealZoomOverlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

#locatorRevealZoomCard {
  border-radius: 1.1rem;
  display: flex;
  flex-direction: column;
}

#locatorRevealZoomCloseBtn {
  position: absolute;
}

#locatorRevealZoomTitle {
  text-align: center;
  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);
}

.locator-flash-bullseye {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.locator-flash-bullseye-ring {
  border-radius: 50%;
  animation: locatorBullseyePulse 0.9s ease-in-out infinite alternate;
  display: flex;
  align-items: center;
  justify-content: center;
}

.locator-flash-bullseye span {
  opacity: 0.9;
}

@keyframes locatorBullseyePulse {
  from {
    transform: scale(0.82);
    opacity: 0.72;
  }

  to {
    transform: scale(1.08);
    opacity: 1;
  }
}

#locatorMinimapToggleBtn {
  position: absolute;
  z-index: 18;
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
}

#locatorMinimapToggleBtn.is-collapsed {
  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);
  }

  
}

@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;
  }
}
@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;
  cursor: pointer;
}

.locator-reveal-panel.merged .locator-reveal-stage-frame {
  width: min(100%, 390px) !important;
  height: 260px !important;
}

.locator-reveal-score-row strong {
  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 {
  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: 100095 !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;
}

#locatorRevealZoomTitle {
  margin: 0 !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;
}

.locator-location-report-cta {
  display: flex;
  justify-content: center;
}

.locator-location-reason-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}

.locator-location-reason-btn {
  margin-top: 0;
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  background: var(--chip-bg);
  color: var(--fg);
  font-size: 12.5px;
  font-weight: 700;
  opacity: 0.7;
  cursor: pointer;
}

.locator-location-reason-btn:hover {
  opacity: 1;
}

.locator-location-reason-btn.is-selected {
  background: var(--btn-bg);
  color: #fff;
  opacity: 1;
  box-shadow: none;
}

#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-card {
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.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: rgba(34, 34, 34, 0.78);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 22px rgba(0,0,0,0.58);
}

body.light-mode #statsMapCollectionPanel {
  background: rgba(255, 255, 255, 0.78);
}

#statsMapCollectionPanel .ms-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  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;
  max-height: 68vh;
  overflow-y: auto;
  padding-right: 0.4rem;
}

.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;
  max-height: 68vh;
  overflow-y: auto;
  scrollbar-gutter: stable;
  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-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: 10px 16px;
  border-radius: 8px;
  border: none;
  background: var(--chip-bg);
  color: var(--fg);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.stats-detail-open-btn:hover {
  background: var(--btn-bg);
  color: #fff;
}

#modeOverviewTitle {
  display: none !important;
}

.stats-cards {
  align-items: flex-start;
}

.stats-cards .stat-card .stat-subline {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  line-height: 1.25;
  opacity: 0.6;
  font-weight: 400;
  font-style: italic;
}

.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;
}

.stats-mode-card-head h3 {
  margin: 0 0 0.85rem;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
}

.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.65;
  font-weight: 400;
}

.stats-info-line strong {
  text-align: right;
  font-weight: 800;
}

.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;
}

.has-tooltip .tooltip {
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease, visibility 0.12s ease;
}

.has-tooltip:hover .tooltip {
  opacity: 1;
  visibility: visible;
}

.stats-map-tile {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-align: center;
}

.stats-map-tile-kicker {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0.6;
  margin-bottom: 0.4rem;
}

.stats-map-tile-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 500;
  opacity: 0.85;
  margin-bottom: 0.45rem;
}

.stats-map-tile-rank-medal {
  font-size: 1.15rem;
  line-height: 1;
}

.stats-map-tile-cover {
  position: relative;
  border-radius: 0.65rem;
  overflow: hidden;
  height: 100px;
  background: var(--chip-bg);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
}

.stats-map-tile-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.stats-map-tile-cover.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
}

.stats-map-tile-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.5rem 0.6rem 0.35rem;
  background: linear-gradient(to top, rgba(0,0,0,0.82), transparent);
  color: #fff;
  font-size: 1rem;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-map-tile-meta {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  opacity: 0.85;
  line-height: 1.45;
}

.stats-map-tile.compact .stats-map-tile-cover {
  height: 64px;
}

.stats-map-tile.compact .stats-map-tile-name {
  font-size: 0.85rem;
  padding: 0.35rem 0.45rem 0.25rem;
}

.stats-map-tile.compact .stats-map-tile-meta {
  font-size: 0.78rem;
  margin-top: 0.3rem;
}

.stats-map-tile.compact .stats-map-tile-kicker {
  font-size: 0.68rem;
  margin-bottom: 0.3rem;
}

.stats-map-tooltip-line {
  display: inline-block;
  cursor: help;
}

.stats-overview-map-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: auto;
}

.stats-detail-empty {
  grid-column: 1 / -1;
  opacity: 0.85;
  text-align: center;
  padding: 1rem;
}

.stats-detail-map-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(200px, 1fr));
  gap: 1.1rem;
  width: min(680px, 100%);
  margin: 0 auto;
}

.stats-detail-top-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 1rem;
  width: min(860px, 100%);
  margin: 0 auto;
}

#statsDetailPanel {
  max-width: 1040px;
  max-height: 94vh;
  padding: 1.1rem 1.5rem 1.3rem;
  gap: 0.5rem;
}

#statsDetailContent {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.stats-detail-summary-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 2.5rem;
  width: min(760px, 100%);
  margin: 0 auto;
}

.stats-detail-summary-group {
  display: grid;
  gap: 0.2rem;
}

.stats-detail-summary-group .stats-info-line {
  padding: 0.22rem 0;
  border-bottom: 1px solid var(--border);
}

.stats-detail-summary-group .stats-info-line:last-child {
  border-bottom: none;
}

.stats-detail-diff-grid {
  width: min(940px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.stats-detail-diff-card {
  padding: 0 0.9rem;
  border-right: 1px solid var(--border);
}

.stats-detail-diff-card:last-child {
  border-right: none;
}

.stats-detail-diff-card > strong {
  display: block;
  text-align: center;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.stats-detail-diff-line {
  padding: 0.28rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.86rem;
}

.stats-detail-diff-line:first-of-type {
  border-top: none;
}

.stats-detail-diff-line > span {
  opacity: 0.65;
  font-weight: 400;
}

.stats-detail-diff-line > span::after {
  content: ":";
}

.stats-detail-diff-line b {
  margin-left: 0.3rem;
  font-weight: 800;
  font-size: 0.92rem;
}

.stats-detail-diff-line small {
  margin-left: 0.2rem;
  opacity: 0.6;
  font-size: 0.76rem;
}

.stats-detail-diff-line small::before {
  content: "(";
}

.stats-detail-diff-line small::after {
  content: ")";
}

@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-summary-groups {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .stats-detail-diff-grid {
    grid-template-columns: repeat(2, minmax(135px, 1fr));
  }

  .stats-detail-diff-card:nth-child(2n) {
    border-right: none;
  }

  .stats-detail-diff-card:nth-child(n+3) {
    border-top: 1px solid var(--border);
    padding-top: 0.6rem;
    margin-top: 0.6rem;
  }

  .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-detail-diff-card {
    border-right: none !important;
    border-top: 1px solid var(--border);
    padding-top: 0.6rem;
    margin-top: 0.6rem;
  }

  .stats-detail-diff-card:first-child {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
  }

  .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;
  padding: 10px 16px !important;
  border-radius: 8px !important;
  background: var(--chip-bg) !important;
  color: var(--fg) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  border: none !important;
}

#statsOverlay #showAllMapsBtn:hover {
  background: var(--btn-bg) !important;
  color: #fff !important;
}

#customMapPoolPanel {
  position: relative;
  width: min(760px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 1.5rem 1.75rem;
  border-radius: 1rem;
  background: rgba(34, 34, 34, 0.78);
  backdrop-filter: blur(10px);
  color: var(--fg);
  border: 1px solid var(--border);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  text-align: left;
}

body.light-mode #customMapPoolPanel {
  background: rgba(255, 255, 255, 0.78);
}

#customMapPoolPanel .ms-divider {
  margin: 1rem 0;
}

#customMapPoolInfo p {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

#customMapPoolGrid {
  width: 100%;
  margin: 0.75rem 0 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;
  border-radius: 8px;
}

.custom-map-pool-map-button.selected {
  transform: none !important;
}

.custom-map-pool-map-button:hover {
  transform: none;
}

.custom-map-pool-map-button:active {
  cursor: grabbing;
}

.custom-map-pool-map-button.dragging {
  opacity: 0.45;
  filter: grayscale(0.25);
  transform: scale(0.96) !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;
}

#customMapPoolGrid .custom-map-pool-map-button {
  padding: 8px 10px;
  font-size: 12.5px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  background: var(--chip-bg);
  color: var(--fg);
  opacity: 0.7;
  filter: none;
}

#customMapPoolGrid .custom-map-pool-map-button:not(.drop-swap) {
  box-shadow: none;
}

#customMapPoolGrid .custom-map-pool-map-button:hover {
  background: var(--chip-bg);
  opacity: 1;
}

#customMapPoolGrid .custom-map-pool-map-button.selected {
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  color: #000;
  opacity: 1;
}

#customMapPoolGrid .custom-map-pool-map-button.dragging {
  opacity: 0.45;
}

@media (max-width: 760px) {
  #customMapPoolGrid {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 430px) {
  #customMapPoolGrid {
    grid-template-columns: 1fr;
  }
}

#customMapPoolCounter {
  font-weight: 800;
  font-size: 0.95rem;
}

#customMapPoolWarning {
  margin-top: 1rem;
  padding: 0.6rem 1rem;
  border-radius: 0.75rem;
  background: rgba(229, 57, 53, 0.2);
  border: 1px solid rgba(229, 57, 53, 0.65);
  color: #ff8a8a;
  font-weight: 700;
  text-align: center;
}

body.light-mode #customMapPoolWarning {
  background: rgba(211, 47, 47, 0.14);
  border-color: rgba(198, 40, 40, 0.7);
  color: #b3261e;
}

#customMapPoolActions {
  margin-top: 0;
  align-items: center;
}

#customMapPoolOverlay {
  z-index: 10030 !important;
}

#supportConfirmOverlay,
#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);
}

.ms-dialog {
  width: min(460px, 94vw);
  box-sizing: border-box;
  padding: 1.5rem 1.75rem;
  border-radius: 1rem;
  background: rgba(34, 34, 34, 0.78);
  backdrop-filter: blur(10px);
  color: var(--fg);
  border: 1px solid var(--border);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  text-align: left;
}

body.light-mode .ms-dialog {
  background: rgba(255, 255, 255, 0.78);
}

.ms-dialog h2 {
  margin: 0 0 0.75rem;
}

.ms-dialog p {
  margin: 0;
  line-height: 1.45;
  opacity: 0.85;
}

.ms-dialog-actions {
  justify-content: center;
  margin-top: 1.25rem;
}

.ms-dialog-actions .ms-action-button {
  flex: 1 1 0;
  padding: 13px 18px;
  font-size: 14px;
}

.ms-dialog button,
.ms-dialog button:hover {
  margin: 0;
  font-family: inherit;
  transform: none;
  box-shadow: none;
}

.ms-dialog .ms-confirm-button {
  background: var(--accent7);
  color: #fff;
}

.ms-dialog .ms-confirm-button:hover {
  background: #3aa0ff;
}

.ms-dialog .ms-danger-button {
  background: rgba(229, 57, 53, 0.2);
  color: #ff8a8a;
}

.ms-dialog .ms-danger-button:hover {
  background: #d32f2f;
  color: #fff;
}

body.light-mode .ms-dialog .ms-danger-button {
  background: rgba(211, 47, 47, 0.14);
  color: #b3261e;
}

body.light-mode .ms-dialog .ms-danger-button:hover {
  background: #d32f2f;
  color: #fff;
}

#customMapPoolOrderHint {
  font-size: 0.85rem;
  line-height: 1.4;
  opacity: 0.65;
}

#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);
}

.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(820px, 94vw);
  max-height: 88vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: 1.5rem 1.75rem;
  border-radius: 1rem;
  color: var(--fg);
  background: rgba(34, 34, 34, 0.78);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

body.light-mode .patch-notes-panel {
  background: rgba(255, 255, 255, 0.78);
}

.patch-notes-header {
  align-items: flex-start;
}

.patch-notes-header h2 {
  margin: 0;
}

.patch-notes-header p {
  margin: 0.2rem 0 0;
  opacity: 0.65;
  font-size: 0.85rem;
}

.patch-notes-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.patch-notes-section {
  padding: 1.1rem 0;
  border-bottom: 1px solid rgba(128, 128, 128, 0.3);
}

.patch-notes-section:first-child {
  padding-top: 0.25rem;
}

.patch-notes-section:last-child {
  border-bottom: none;
}

.patch-notes-soon-label {
  margin-bottom: 0.6rem;
}

.patch-notes-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.patch-notes-section h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.patch-notes-date {
  font-size: 0.85rem;
  opacity: 0.6;
}

.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;
}
#selectionRow {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.1rem;
  width: 100%;
  max-width: 560px;
  margin: 0 auto 0.5rem;
}

#playArea button,
#dailyChallengeRow button,
#matchSettingsOverlay button,
#settingsOverlay button,
#achievementsOverlay button,
#allAchievementsModal button,
#statsOverlay button,
#statsDetailOverlay button,
#statsMapCollectionOverlay button,
#statsAllMapsModal button,
#matchOverlay .ms-close,
#patchNotesOverlay .ms-close,
#customMapPoolPanel .ms-close,
#customMapPoolPanel .ms-action-button,
#customMapPoolPanel .ms-done-button,
#playerFeedbackPanel .ms-close,
#playerFeedbackPanel .ms-done-button,
#loadMoreMatchesBtn,
.history-difficulty-report-btn,
#themeToggleRow button {
  margin: 0;
  font-family: inherit;
  transform: none;
  box-shadow: none;
}

#playArea button:hover,
#dailyChallengeRow button:hover,
#matchSettingsOverlay button:hover,
#settingsOverlay button:hover,
#achievementsOverlay button:hover,
#allAchievementsModal button:hover,
#statsOverlay button:hover,
#statsDetailOverlay button:hover,
#statsMapCollectionOverlay button:hover,
#statsAllMapsModal button:hover,
#matchOverlay .ms-close:hover,
#patchNotesOverlay .ms-close:hover,
#customMapPoolPanel .ms-close:hover,
#customMapPoolPanel .ms-action-button:hover,
#customMapPoolPanel .ms-done-button:hover,
#playerFeedbackPanel .ms-close:hover,
#playerFeedbackPanel .ms-done-button:hover,
#loadMoreMatchesBtn:hover,
.history-difficulty-report-btn:hover,
#themeToggleRow button:hover {
  transform: none;
  box-shadow: none;
}

.play-hero-card {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 24px;
  border-radius: 16px;
  background: var(--panel-bg);
  border: 2px solid var(--accent8);
}

.play-hero-row {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

#playArea .play-hero-button {
  white-space: nowrap;
  padding: 15px 44px;
  border-radius: 12px;
  background: var(--btn-bg);
  color: #fff;
  border: 2px solid var(--accent8);
  font-size: 19px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0 8px var(--accent8);
}

#playArea .play-hero-button:hover {
  background: var(--btn-hover-bg);
  box-shadow: 0 0 14px var(--accent8);
}

#playArea .match-settings-toggle-button {
  width: 52px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--bg);
  color: var(--fg);
  border: none;
  font-size: 22px;
  cursor: pointer;
}

#playArea .match-settings-toggle-button:hover {
  background: var(--btn-hover-bg);
  color: #fff;
}

.segmented-track {
  display: inline-flex;
  flex-wrap: wrap;
  background: var(--chip-bg);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
}

#playArea .mode-toggle-option,
#themeToggleRow .mode-toggle-option {
  display: inline-block;
  padding: 8px 22px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--fg);
  font-size: 13px;
  font-weight: 700;
  opacity: 0.7;
  cursor: pointer;
}

#matchSettingsOverlay .rounds-option,
#settingsOverlay .rounds-option,
#reportDifficultyPills .rounds-option {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--fg);
  font-size: 13px;
  font-weight: 700;
  opacity: 0.7;
  cursor: pointer;
}

#playArea .mode-toggle-option:hover,
#themeToggleRow .mode-toggle-option:hover,
#matchSettingsOverlay .rounds-option:hover,
#settingsOverlay .rounds-option:hover,
#reportDifficultyPills .rounds-option:hover {
  background: transparent;
  opacity: 1;
}

#playArea .mode-toggle-option.selected,
#themeToggleRow .mode-toggle-option.selected,
#matchSettingsOverlay .rounds-option.selected,
#settingsOverlay .rounds-option.selected,
#reportDifficultyPills .rounds-option.selected {
  background: var(--btn-bg);
  color: #fff;
  opacity: 1;
}

.play-summary-line {
  margin: 0;
  font-size: 12.5px;
  opacity: 0.65;
}

.daily-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.daily-section-label {
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  opacity: 0.85;
}

#dailyChallengeRow {
  display: flex;
  gap: 14px;
}

#dailyChallengeRow .daily-challenge-button {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  color: var(--fg);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

#dailyChallengeRow .daily-challenge-button:hover {
  background: var(--panel-bg);
  border-color: var(--accent8);
}

.daily-score-pill {
  background: var(--pill-bg);
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.feature-teaser {
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px dashed var(--border);
  background: var(--pill-bg);
  font-size: 12.5px;
  text-align: left;
  opacity: 0.8;
}

.feature-teaser-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(138, 43, 226, 0.2);
  color: #b48af0;
  white-space: nowrap;
  text-transform: uppercase;
}

body.light-mode .feature-teaser-badge {
  color: #6a2fb0;
  background: rgba(138, 43, 226, 0.14);
}

.ms-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.ms-title {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  text-align: left;
}

#matchSettingsOverlay .ms-close,
#settingsOverlay .ms-close,
#achievementsOverlay .ms-close,
#allAchievementsModal .ms-close,
#statsOverlay .ms-close,
#statsDetailOverlay .ms-close,
#statsMapCollectionOverlay .ms-close,
#statsAllMapsModal .ms-close,
#matchOverlay .ms-close,
#patchNotesOverlay .ms-close,
#customMapPoolPanel .ms-close,
#playerFeedbackPanel .ms-close,
.ms-form-panel .ms-close {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--fg);
  font-size: 21px;
  cursor: pointer;
}

#matchSettingsOverlay .ms-close:hover,
#settingsOverlay .ms-close:hover,
#achievementsOverlay .ms-close:hover,
#allAchievementsModal .ms-close:hover,
#statsOverlay .ms-close:hover,
#statsDetailOverlay .ms-close:hover,
#statsMapCollectionOverlay .ms-close:hover,
#statsAllMapsModal .ms-close:hover,
#matchOverlay .ms-close:hover,
#patchNotesOverlay .ms-close:hover,
#customMapPoolPanel .ms-close:hover,
#playerFeedbackPanel .ms-close:hover,
.ms-form-panel .ms-close:hover {
  background: var(--chip-bg);
}

.ms-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.ms-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--chip-bg);
  color: var(--fg);
  font: inherit;
  font-size: 14px;
}

.ms-input:focus {
  outline: none;
  border-color: var(--accent7);
}

textarea.ms-input {
  resize: vertical;
  min-height: 110px;
}

#playerFeedbackOverlay {
  z-index: 99999;
  background: rgba(0, 0, 0, 0.65);
}

#playerFeedbackPanel {
  width: min(620px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 1.5rem 1.75rem;
  border-radius: 1rem;
  background: rgba(34, 34, 34, 0.78);
  backdrop-filter: blur(10px);
  color: var(--fg);
  border: 1px solid var(--border);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  text-align: left;
}

body.light-mode #playerFeedbackPanel {
  background: rgba(255, 255, 255, 0.78);
}

#playerFeedbackPanel .ms-header {
  align-items: flex-start;
}

.ms-form-panel {
  width: min(640px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 1.5rem 1.75rem;
  border-radius: 1rem;
  background: rgba(34, 34, 34, 0.78);
  backdrop-filter: blur(10px);
  color: var(--fg);
  border: 1px solid var(--border);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  text-align: left;
}

body.light-mode .ms-form-panel {
  background: rgba(255, 255, 255, 0.78);
}

.ms-form-panel .ms-header {
  align-items: flex-start;
}

.ms-form-panel button,
.ms-form-panel button:hover {
  margin: 0;
  font-family: inherit;
  transform: none;
  box-shadow: none;
}

.ms-subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  opacity: 0.65;
}

.ms-form-panel-wide {
  width: min(760px, 94vw);
}

.ms-form-panel-narrow {
  width: min(460px, 94vw);
}

#devLoginOverlay {
  z-index: 100000;
  background: rgba(0, 0, 0, 0.65);
}

.ms-form-banner {
  margin-top: 1rem;
  padding: 0.7rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
}

.ms-form-banner[hidden] {
  display: none !important;
}

.ms-form-banner.is-error {
  background: rgba(229, 57, 53, 0.2);
  border: 1px solid rgba(229, 57, 53, 0.65);
  color: #ff8a8a;
}

body.light-mode .ms-form-banner.is-error {
  background: rgba(211, 47, 47, 0.14);
  border-color: rgba(198, 40, 40, 0.7);
  color: #b3261e;
}

.report-shot {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 2.6 / 1;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--chip-bg);
  cursor: zoom-in;
}

.report-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.report-shot-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.6rem 0.85rem 0.6rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), transparent);
  color: #fff;
  font-size: 1rem;
  text-align: left;
  pointer-events: none;
}

.report-locator-compare {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.report-locator-compare .report-shot {
  flex: 1 1 0;
  min-width: 0;
  aspect-ratio: 16 / 9;
}

.report-minimap-column {
  flex: 0 0 240px;
  min-width: 0;
}

.report-minimap-column[hidden] {
  display: none;
}

.report-minimap-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  cursor: zoom-in;
  transition: border-color 0.2s ease;
}

.report-minimap-frame:hover {
  border-color: var(--accent7);
}

.report-minimap-caption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  opacity: 0.85;
}

@media (max-width: 700px) {
  .report-locator-compare {
    flex-direction: column;
  }

  .report-minimap-column {
    flex: none;
    width: 100%;
  }
}

.app-toast {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  z-index: 2147483000;
  max-width: min(520px, 92vw);
  padding: 0.85rem 1.5rem;
  border-radius: 0.75rem;
  color: #fff;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -18px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.app-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.app-toast.is-success {
  background: rgba(30, 140, 62, 0.96);
  border: 1px solid rgba(120, 255, 160, 0.55);
}

.app-toast.is-error {
  background: rgba(198, 40, 40, 0.96);
  border: 1px solid rgba(255, 140, 140, 0.55);
}

.report-diff-pills {
  display: flex;
  width: 100%;
  box-sizing: border-box;
}

.report-diff-pills .rounds-option {
  flex: 1 1 0;
  text-align: center;
}

#reportDifficultyPills .rounds-option.is-current {
  background: rgba(255, 215, 0, 0.14);
  color: var(--fg);
  opacity: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.55);
  cursor: not-allowed;
}

.report-current-tag {
  display: block;
  margin-top: 1px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  opacity: 0.8;
}

body.light-mode #reportDifficultyPills .rounds-option.is-current {
  background: rgba(230, 160, 0, 0.18);
  box-shadow: inset 0 0 0 1px rgba(200, 130, 0, 0.6);
}

#playerFeedbackHint {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  opacity: 0.65;
}

.match-settings-label,
.match-settings-label.has-tooltip {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-align: left;
  opacity: 0.7;
  margin-bottom: 6px;
}

.ms-pill-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

#matchSettingsOverlay .mappool-option,
#settingsOverlay .mappool-option {
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  background: var(--chip-bg);
  color: var(--fg);
  font-size: 12.5px;
  font-weight: 700;
  opacity: 0.7;
  cursor: pointer;
}

#matchSettingsOverlay .mappool-option:hover,
#settingsOverlay .mappool-option:hover {
  background: var(--chip-bg);
  opacity: 1;
}

#matchSettingsOverlay .mappool-option.selected,
#settingsOverlay .mappool-option.selected {
  background: var(--btn-bg);
  color: #fff;
  opacity: 1;
}

#customMapPoolRow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#matchSettingsOverlay #customMapPoolEditButton,
#settingsOverlay #customMapPoolEditButton {
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: none;
  background: var(--chip-bg);
  color: var(--fg);
  font-size: 13px;
  cursor: pointer;
}

#matchSettingsOverlay #customMapPoolEditButton:hover,
#settingsOverlay #customMapPoolEditButton:hover {
  background: var(--btn-hover-bg);
}

.ms-divider {
  width: 100%;
  border: none;
  border-top: 1px solid var(--border);
  opacity: 0.35;
  margin: 2px 0;
}

.ms-toggle-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#matchSettingsOverlay .toggle-option,
#settingsOverlay .toggle-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--fg);
  text-align: left;
  cursor: pointer;
}

#matchSettingsOverlay .toggle-option:hover,
#settingsOverlay .toggle-option:hover {
  background: transparent;
}

.toggle-option-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

#matchSettingsOverlay .toggle-option .btn-label,
#settingsOverlay .toggle-option .btn-label {
  font-size: 13.5px;
  font-weight: 700;
}

.toggle-option-caption {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.55;
}

#matchSettingsOverlay .toggle-option .btn-state,
#settingsOverlay .toggle-option .btn-state {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: 8px;
  background: var(--chip-bg);
  font-size: 12.5px;
  font-weight: 700;
  opacity: 0.7;
}

#matchSettingsOverlay .toggle-option.selected .btn-state,
#settingsOverlay .toggle-option.selected .btn-state {
  background: var(--btn-bg);
  color: #fff;
  opacity: 1;
}

#roundTimerRow .btn-label {
  font-size: 13.5px;
  font-weight: 700;
}

#matchSettingsOverlay .btn-label,
#settingsOverlay .btn-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.label-icon {
  width: 15px;
  height: 15px;
  flex: none;
  opacity: 0.85;
}

.history-meta-icon {
  white-space: nowrap;
}

.history-meta-icon svg {
  width: 1em;
  height: 1em;
  margin-right: 2px;
  vertical-align: -0.14em;
}

#roundTimerRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
}

#matchSettingsOverlay .round-timer-option,
#settingsOverlay .round-timer-option {
  padding: 7px 11px;
  border-radius: 8px;
  border: none;
  background: var(--chip-bg);
  color: var(--fg);
  font-size: 12.5px;
  font-weight: 700;
  opacity: 0.7;
  cursor: pointer;
}

#matchSettingsOverlay .round-timer-option:hover:not(:disabled):not(.selected),
#settingsOverlay .round-timer-option:hover:not(:disabled):not(.selected) {
  background: var(--chip-bg);
  opacity: 1;
}

#matchSettingsOverlay .round-timer-option.selected,
#settingsOverlay .round-timer-option.selected {
  background: var(--btn-bg);
  color: #fff;
  opacity: 1;
}

#roundTimerRow.is-locked .round-timer-option {
  opacity: 0.35;
  cursor: not-allowed;
}

#roundTimerRow.is-locked .round-timer-option.selected {
  opacity: 0.6;
}

.toggle-option.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ms-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

#matchSettingsOverlay .ms-done-button,
#settingsOverlay .ms-done-button,
#customMapPoolPanel .ms-done-button,
#playerFeedbackPanel .ms-done-button,
.ms-form-panel .ms-done-button {
  padding: 10px 26px;
  border-radius: 10px;
  border: none;
  background: var(--btn-bg);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}

#matchSettingsOverlay .ms-done-button:hover,
#settingsOverlay .ms-done-button:hover,
#customMapPoolPanel .ms-done-button:hover,
#playerFeedbackPanel .ms-done-button:hover,
.ms-form-panel .ms-done-button:hover {
  background: var(--btn-hover-bg);
}

#customMapPoolPanel .ms-done-button:disabled,
#playerFeedbackPanel .ms-done-button:disabled,
.ms-form-panel .ms-done-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: var(--btn-bg);
}

.ms-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ms-action-button {
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  background: var(--chip-bg);
  color: var(--fg);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.ms-action-button:hover {
  background: var(--btn-bg);
  color: #fff;
}

.ms-sound-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}

.ms-sound-grid input[type="range"] {
  width: 100%;
  accent-color: var(--btn-bg);
}

.ms-slider-test-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ms-slider-test-row input[type="range"] {
  flex: 1 1 auto;
  min-width: 0;
}

.ms-test-play-button {
  flex: none;
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: var(--chip-bg);
  color: var(--fg);
  cursor: pointer;
}

.ms-test-play-button:hover {
  filter: brightness(1.2);
}

.ms-test-play-button .icon-stop,
.ms-test-play-button.is-playing .icon-play {
  display: none;
}

.ms-test-play-button.is-playing .icon-stop {
  display: block;
}

.ms-test-play-button .btn-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.ms-sound-grid select {
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 520px) {
  .ms-sound-grid {
    grid-template-columns: 1fr;
  }

  #dailyChallengeRow {
    flex-direction: column;
  }

  #playArea .play-hero-button {
    padding: 14px 22px;
    font-size: 17px;
  }
}

#stats {
  font-size: 1rem;
  font-weight: 700;
}

#stats #roundInfo,
#stats #scoreInfo {
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: none;
  font-size: 1rem;
  opacity: 0.9;
}

#stats #scoreInfo::before {
  margin-right: 0.6rem;
  opacity: 0.5;
}

#progressArea {
  width: min(700px, 92%);
  gap: 0;
  padding-bottom: 1.4rem;
}

#progressSegments {
  display: flex;
  gap: 4px;
  width: 100%;
}

.progress-seg {
  --seg-color: #7a8397;
  position: relative;
  flex: 1 1 0;
  height: 10px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--seg-color) 32%, transparent);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.progress-seg.easy { --seg-color: #3ecf6b; }
.progress-seg.normal { --seg-color: #f5b301; }
.progress-seg.hard { --seg-color: #ef5350; }
.progress-seg.impossible { --seg-color: #d5dae4; }

.progress-seg.done {
  background: var(--seg-color);
}

.progress-seg.done.res-lose {
  background: #4a505e;
}

body.light-mode .progress-seg.done.res-lose {
  background: #b4bac6;
}

.progress-seg.current {
  background: var(--seg-color);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8);
}

body.light-mode .progress-seg.current {
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.55);
}

.progress-seg-label {
  position: absolute;
  top: 16px;
  left: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--seg-color);
}

.progress-seg.upcoming .progress-seg-label {
  opacity: 0.65;
}

body.light-mode .progress-seg-label {
  color: var(--fg);
  opacity: 0.8;
}

.ui-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#gameHeaderActions .game-header-icon-btn,
#settingsToggleButtonEndGear {
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: none !important;
  color: var(--fg);
  opacity: 0.8;
  transform: none;
  box-shadow: none;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

#gameHeaderActions .game-header-icon-btn:hover,
#settingsToggleButtonEndGear:hover {
  background: var(--chip-bg) !important;
  opacity: 1;
  border: none;
  transform: none;
  box-shadow: none;
}

#mapButtonsContainer {
  gap: 6px;
  margin-top: 0.9rem;
  margin-bottom: 1.25rem;
}

#mapButtonsContainer .map-button {
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  background: var(--chip-bg);
  color: var(--fg);
  opacity: 0.85;
  transform: none;
  box-shadow: none;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

#mapButtonsContainer .map-button:hover {
  background: rgba(255, 255, 255, 0.16);
  opacity: 1;
  transform: none;
  box-shadow: none;
}

body.light-mode #mapButtonsContainer .map-button:hover {
  background: rgba(0, 0, 0, 0.1);
}

#mapButtonsContainer .map-button.selected {
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  color: #000;
  opacity: 1;
  transform: none;
  box-shadow: none;
}

#mapButtonsContainer .map-button.result-correct {
  background: #2e9e4f;
  color: #fff;
  opacity: 1;
  outline: 2px solid rgba(120, 255, 160, 0.6);
}

#mapButtonsContainer .map-button.result-wrong {
  background: #c62828;
  color: #fff;
  opacity: 1;
  outline: 2px solid rgba(255, 140, 140, 0.6);
}

#screenshot {
  margin-bottom: 1.25rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.game-result-bar {
  position: absolute;
  left: 50%;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: 90%;
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  backdrop-filter: blur(8px);
}

.game-result-bar.is-visible {
  opacity: 1;
}

.game-result-bar.is-correct {
  border: 1px solid rgba(120, 255, 160, 0.5);
}

.game-result-bar.is-wrong {
  border: 1px solid rgba(255, 140, 140, 0.5);
}

#controls {
  margin-top: 0.25rem;
}

#controls button,
body:not(.light-mode) #controls button {
  margin-top: 0.5rem;
  padding: 12px 44px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  background-color: var(--btn-bg);
  color: #fff;
  transform: none;
  box-shadow: none;
}

#controls button:hover,
body:not(.light-mode) #controls button:hover {
  background-color: var(--btn-hover-bg);
  transform: none;
  box-shadow: none;
}

#controls button:disabled {
  opacity: 0.6;
  cursor: default;
}

#controls button.correct-guess,
#controls button.wrong-guess {
  box-shadow: none;
}

#endScreen {
  min-width: min(460px, 90vw);
  padding: 2.75rem 2.5rem 2rem;
}

#settingsToggleButtonEndGear {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
}

#endScoreBig {
  align-items: baseline;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}

.end-score-value {
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1;
}

.end-score-max {
  font-size: 1.6rem;
  font-weight: 700;
  opacity: 0.6;
}

#endScreen h2 {
  white-space: normal;
  overflow: visible;
}

#endScreen #finalScore {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  opacity: 0.7;
}

#endScreen #dailyPracticeNote {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  opacity: 0.7;
}

#endScreenButtons {
  margin-top: 1.25rem;
  gap: 10px;
}

#endScreenButtons button.end-primary-btn,
#endScreenButtons button.end-secondary-btn {
  margin: 0;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 10px;
  transform: none;
  box-shadow: none;
}

#endScreenButtons button.end-primary-btn {
  background-color: var(--btn-bg);
  color: #fff;
}

#endScreenButtons button.end-primary-btn:hover {
  background-color: var(--btn-hover-bg);
}

#endScreenButtons button.end-secondary-btn {
  background-color: var(--chip-bg);
  color: var(--fg);
}

#endScreenButtons button.end-secondary-btn:hover {
  background-color: var(--btn-bg);
  color: #fff;
}

#gameHeaderActions {
  top: -0.5rem;
  right: 0;
}

#stats {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
}

#stats #scoreInfo::before {
  content: none;
  margin: 0;
}

#progressSlot {
  margin-top: -2.4rem;
}

.progress-seg-skull {
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  letter-spacing: 0;
}

.ms-dialog-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.ms-dialog-title h2 {
  margin: 0;
}

.ms-dialog-title .ui-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

#screenshot {
  transition: filter 0.25s ease;
}

#screenshot.feedback-dim {
  filter: brightness(0.42) blur(4px);
}

.game-result-bar {
  top: 50%;
  bottom: auto;
  padding: 1rem 1.9rem;
  border-radius: 14px;
  font-size: 1.4rem;
  transform: translate(-50%, -46%) scale(0.96);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
}

.game-result-bar.is-visible {
  transform: translate(-50%, -50%) scale(1);
}

.game-result-bar.is-correct {
  background: rgba(22, 110, 52, 0.9);
}

.game-result-bar.is-wrong {
  background: rgba(170, 32, 32, 0.9);
}

.game-result-icon {
  font-size: 1.5rem;
}

#screenshotFrame {
  position: relative;
  width: 90%;
  max-width: 1100px;
  margin-bottom: 1.25rem;
}

#screenshotFrame #screenshot {
  display: block;
  width: 100%;
  max-width: none;
  margin-bottom: 0;
}

@media (max-width: 700px) {
  #screenshotFrame {
    width: 100%;
  }
}

.round-timer {
  position: absolute;
  z-index: 4;
  pointer-events: none;
}

.round-timer-track {
  top: 0;
  left: 0;
  right: 0;
}

.round-timer-bar {
  width: 100%;
  height: 100%;
  background: var(--btn-bg);
  transition: width 1s linear, background-color 0.3s ease;
}

.round-timer.is-warning .round-timer-bar {
  background: #f5a524;
}

.round-timer.is-critical .round-timer-bar {
  background: #ef5350;
}

.round-timer-pill {
  top: 0.9rem;
  right: 0.75rem;
  padding: 0.3rem 0.8rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s ease, background-color 0.3s ease;
}

.round-timer.is-warning .round-timer-pill {
  color: #ffcc66;
}

.round-timer.is-critical .round-timer-pill {
  color: #fff;
  background: rgba(198, 40, 40, 0.85);
  animation: timerPulse 1s ease-in-out infinite;
}

@keyframes timerPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

#endScoreBig {
  --ring-color: #4e8cff;
  position: relative;
  display: block;
}

#endScoreBig.tier-gold { --ring-color: var(--accent1); }
#endScoreBig.tier-blue { --ring-color: #4e8cff; }
#endScoreBig.tier-red { --ring-color: #ef5350; }

#endScreen h2 {
  margin: 0.25rem 0 0.75rem;
  font-size: 1.5rem;
}

#endScreen #finalScore {
  display: none;
}

.round-timer {
  inset: auto 0 calc(100% + 10px) 0;
  overflow: visible;
  border-radius: 0;
}

.round-timer-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.round-timer-track {
  position: static;
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

body.light-mode .round-timer-track {
  background: rgba(0, 0, 0, 0.14);
}

.round-timer-bar {
  border-radius: 999px;
}

.round-timer-pill {
  position: static;
}

#screenshotFrame.has-timer {
  margin-top: 2.1rem;
}

.zone-loss {
  stroke: #ef5350;
}

.zone-respect {
  stroke: #4e8cff;
}

.zone-victory {
  stroke: var(--accent1);
}

#endMetaLine {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  opacity: 0.8;
}

#endScoreBig {
  width: min(380px, 100%);
  height: auto;
  margin: 0 auto 1.1rem;
}

.end-score-number {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.45rem;
}

.end-score-number .end-score-value {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
}

.end-score-number .end-score-max {
  font-size: 1.4rem;
  font-weight: 700;
  opacity: 0.6;
}

.end-score-number.size-m .end-score-value {
  font-size: 3.2rem;
}

.end-score-number.size-s .end-score-value {
  font-size: 2.6rem;
}

.end-bar-zone.zone-loss,
.end-tick.zone-loss { --zone: #ef5350; }
.end-bar-zone.zone-respect,
.end-tick.zone-respect { --zone: #4e8cff; }
.end-bar-zone.zone-victory,
.end-tick.zone-victory { --zone: var(--accent1); }

.end-bar-zone {
  overflow: hidden;
  background: color-mix(in srgb, var(--zone) 26%, transparent);
}

.end-bar-fill {
  width: 0;
  height: 100%;
  background: var(--zone);
  transition: width 0.7s ease-out;
}

.end-bar-marker {
  position: absolute;
  width: 3px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--fg);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
}

.end-tick {
  position: absolute;
  color: var(--zone);
}

.end-tick::before {
  content: "";
  width: 1px;
  height: 5px;
  margin: 0 auto 2px;
  background: var(--zone);
}

.end-score-number {
  margin-bottom: 1.7rem;
}

.end-bar-wrap {
  position: relative;
}

.end-bar {
  position: relative;
  display: flex;
  height: 16px;
  border-radius: 999px;
  overflow: hidden;
}

.end-bar-zone {
  position: relative;
  flex: none;
  top: auto;
  height: 100%;
  border-radius: 0;
}

.end-bar-notch {
  position: absolute;
}

.end-tick {
  top: auto;
  bottom: calc(100% + 5px);
}

.end-tick::before {
  display: none;
}

.end-bar-notch {
  top: 0;
  bottom: 0;
  width: 3px;
  margin-left: -1.5px;
  border-radius: 0;
  background: rgba(8, 12, 24, 0.6);
}

.end-bar-marker {
  top: -2px;
  height: 20px;
}

.end-bar.edge-left {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.end-bar.edge-right {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.end-bar-wrap.has-tooltip {
  display: block;
}

.end-bar-wrap.has-tooltip {
  cursor: default;
}

.end-tick {
  transform: none;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: default;
}

body.light-mode .end-tick.zone-victory {
  color: #a87400;
}

#locatorControls {
  margin-top: 0.9rem !important;
  margin-bottom: 1.25rem !important;
}

.locator-picker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: flex-start;
  justify-content: center;
}

.locator-picker-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  text-align: left;
}

.locator-picker-group .match-settings-label {
  margin: 0;
}

.locator-native-select {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.locator-map-picker {
  position: relative;
  min-width: 220px;
}

.locator-picker-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--chip-bg);
  color: var(--fg);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transform: none;
  box-shadow: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.locator-picker-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: none;
  box-shadow: none;
}

body.light-mode .locator-picker-btn:hover {
  background: rgba(0, 0, 0, 0.1);
}

.locator-picker-btn[aria-expanded="true"] {
  border-color: var(--accent7);
}

.locator-picker-btn .is-placeholder {
  opacity: 0.65;
  font-weight: 600;
}

.locator-picker-chevron {
  width: 14px;
  height: 14px;
  flex: none;
  transition: transform 0.2s ease;
}

.locator-picker-btn[aria-expanded="true"] .locator-picker-chevron {
  transform: rotate(180deg);
}

.locator-picker-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 6px;
  width: max-content;
  max-width: min(92vw, 560px);
  max-height: 60vh;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(34, 34, 34, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

.locator-picker-list[hidden] {
  display: none;
}

body.light-mode .locator-picker-list {
  background: rgba(246, 246, 246, 0.95);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.2);
}

.locator-picker-option,
.locator-floor-pill {
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: var(--chip-bg);
  color: var(--fg);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  opacity: 0.85;
  transform: none;
  box-shadow: none;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.locator-picker-option:hover:not(.selected),
.locator-floor-pill:hover:not(:disabled):not(.selected) {
  background: rgba(255, 255, 255, 0.16);
  opacity: 1;
  transform: none;
  box-shadow: none;
}

body.light-mode .locator-picker-option:hover:not(.selected),
body.light-mode .locator-floor-pill:hover:not(:disabled):not(.selected) {
  background: rgba(0, 0, 0, 0.1);
}

.locator-picker-option.selected,
.locator-floor-pill.selected {
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  color: #000;
  opacity: 1;
}

.locator-floor-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.locator-floor-pill:disabled {
  opacity: 0.4;
  cursor: default;
}

@media (max-width: 560px) {
  .locator-picker-list {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
  }
}

.locator-picker-btn,
.locator-picker-option,
.locator-floor-pill {
  margin: 0;
}

.locator-picker-btn {
  gap: 14px;
  line-height: 1.2;
}

.locator-picker-btn > span {
  flex: 1;
  text-align: center;
}

.locator-picker-chevron {
  display: block;
  margin: 0;
}

#game .locator-picker-btn {
  display: flex;
  margin: 0;
}

#game .locator-picker-option,
#game .locator-floor-pill {
  margin: 0;
}

#locatorMinimapShell {
  border-radius: 12px;
  background: rgba(34, 34, 34, 0.78);
  border: 1px solid var(--border);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

#locatorMinimapShell:hover {
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
}

#locatorMinimapToggleBtn {
  right: 1.3rem;
  bottom: calc(1rem + 220px - 2.4rem);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(34, 34, 34, 0.78);
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: none;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background-color 0.2s ease;
}

#locatorMinimapToggleBtn:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: none;
}

#locatorMinimapToggleBtn.is-collapsed {
  right: 1rem;
  bottom: 1rem;
  width: 34px;
  height: 34px;
  background: rgba(34, 34, 34, 0.78);
}

#locatorMinimapToggleBtn .ui-icon {
  width: 16px;
  height: 16px;
}

#locatorMinimapToggleBtn.is-collapsed .ui-icon {
  width: 18px;
  height: 18px;
}

#locatorMinimapToggleBtn.is-empty {
  opacity: 0.6;
}

#locatorMinimapToggleBtn.is-empty:hover {
  opacity: 1;
}

#locatorPickMapHint {
  position: absolute;
  right: 1rem;
  bottom: calc(1rem + 44px);
  z-index: 19;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(34, 34, 34, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

#locatorPickMapHint.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.light-mode #locatorPickMapHint {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(0, 0, 0, 0.14);
  color: #1d1d1f;
}

#locatorMapPickerBtn.locator-pick-pulse {
  animation: locatorPickPulse 0.7s ease-in-out 3;
}

@keyframes locatorPickPulse {
  50% { box-shadow: 0 0 0 3px var(--accent7), 0 0 16px rgba(30, 144, 255, 0.6); }
}

#feedbackOverlay {
  padding: 1rem 1.9rem;
  border-radius: 14px;
  background: rgba(34, 34, 34, 0.86);
  border: 1px solid var(--border);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 1.4rem;
  text-align: center;
}

#feedbackOverlay.locator-bullseye-flash {
  background: rgba(22, 110, 52, 0.9) !important;
  border-color: rgba(120, 255, 160, 0.45);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45) !important;
}

.locator-flash-bullseye {
  gap: 0.4rem;
}

.locator-flash-bullseye-ring {
  width: 60px;
  height: 60px;
  border: none;
  box-shadow: none;
  background: none;
  font-size: 1rem;
}

.locator-flash-bullseye-ring .ui-icon {
  width: 52px;
  height: 52px;
  stroke-width: 1.8;
}

.locator-flash-bullseye strong {
  font-size: 1.6rem;
}

.locator-flash-bullseye span {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#feedbackOverlay,
body.light-mode #feedbackOverlay {
  color: #fff;
}

#feedbackOverlay.flash-tier-lose {
  background: rgba(170, 32, 32, 0.9);
  border-color: rgba(255, 140, 140, 0.4);
}

#feedbackOverlay.flash-tier-mid {
  background: rgba(38, 84, 176, 0.92);
  border-color: rgba(140, 180, 255, 0.4);
}

#feedbackOverlay.flash-tier-win {
  background: rgba(22, 110, 52, 0.9);
  border-color: rgba(120, 255, 160, 0.45);
}

#locatorMinimapMarker {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
  transform: translate(-50%, -100%) scale(var(--loc-inv-scale, 1));
  transform-origin: 50% 100%;
}

#locatorMinimapMarker svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

#locatorMinimapMarker .pin-shadow {
  fill: rgba(0, 0, 0, 0.3);
}

#locatorMinimapMarker .pin-body {
  fill: #ff4e4e;
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 1.5;
  stroke-linejoin: round;
}

#locatorMinimapMarker .pin-dot {
  fill: rgba(255, 255, 255, 0.96);
}

#locatorMinimapWrap {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 24 24'%3E%3Cellipse cx='12' cy='22' rx='4.2' ry='1.3' fill='rgba(0,0,0,0.3)'/%3E%3Cpath d='M12 22s7-6.2 7-12a7 7 0 0 0-14 0c0 5.8 7 12 7 12z' fill='%23ff4e4e' stroke='white' stroke-width='1.5' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='10' r='2.6' fill='white'/%3E%3C/svg%3E") 13 24, crosshair;
}

#locatorMinimapWrap.has-guess:not(.is-dragging) {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 24 24'%3E%3Cellipse cx='12' cy='22' rx='4.2' ry='1.3' fill='rgba(0,0,0,0.3)'/%3E%3Cpath d='M12 22s7-6.2 7-12a7 7 0 0 0-14 0c0 5.8 7 12 7 12z' fill='white' stroke='rgba(20,20,20,0.85)' stroke-width='1.5' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='10' r='2.6' fill='rgba(20,20,20,0.85)'/%3E%3C/svg%3E") 13 24, crosshair;
}

.fs-viewer,
#locatorRevealZoomOverlay {
  background: rgba(0, 0, 0, 0.88) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  backdrop-filter: blur(10px) !important;
}

#lightboxOverlay {
  justify-content: center;
  align-items: center;
}

.fs-close,
#locatorRevealZoomCloseBtn.fs-close {
  position: absolute !important;
  top: 16px !important;
  right: 16px !important;
  z-index: 1000001 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 10px;
  border: 1px solid var(--border) !important;
  background: rgba(34, 34, 34, 0.78) !important;
  color: #fff !important;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
  box-shadow: none !important;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background-color 0.2s ease;
}

.fs-close:hover,
#locatorRevealZoomCloseBtn.fs-close:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  transform: none !important;
  box-shadow: none !important;
}

.fs-close .ui-icon {
  width: 20px;
  height: 20px;
}

.fs-lightbox-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 96vw;
  max-height: 96vh;
}

.fs-image {
  display: block;
  max-width: 90vw;
  max-height: 88vh;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}

.fs-nav {
  position: absolute;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(34, 34, 34, 0.78);
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
  box-shadow: none;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background-color 0.2s ease;
}

.fs-nav:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%);
  box-shadow: none;
}

.fs-nav-prev { left: 1rem; }
.fs-nav-next { right: 1rem; }

.fs-nav .ui-icon {
  width: 22px;
  height: 22px;
}

#locatorRevealZoomCard {
  position: static !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  gap: 14px !important;
}

#locatorRevealZoomTitle {
  align-self: center;
  padding: 8px 16px !important;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(34, 34, 34, 0.78);
  color: #fff;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
  min-height: 0 !important;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

#locatorRevealZoomTitle:empty {
  display: none;
}

#locatorRevealZoomFrame {
  background: transparent !important;
  border: none !important;
  border-radius: 12px !important;
}

#locatorRevealZoomImage {
  border-radius: 3%;
}

#locatorInspectOverlay {
  background: rgba(0, 0, 0, 0.85) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

#locatorInspectCard {
  width: min(1180px, 96vw) !important;
  height: auto !important;
  max-height: 94vh;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 18px 20px 20px !important;
  gap: 0 !important;
  border-radius: 14px !important;
  background: rgba(34, 34, 34, 0.78) !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5) !important;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

body.light-mode #locatorInspectCard {
  background: rgba(246, 246, 246, 0.9) !important;
}

#locatorInspectCard .ms-header {
  margin-bottom: 12px;
}

#locatorInspectTitle.ms-title {
  padding: 0 !important;
  text-align: left;
  font-size: 19px;
  font-weight: 800;
}

#locatorInspectCard .ms-close {
  position: static;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transform: none;
  box-shadow: none;
}

#locatorInspectCard .ms-close:hover {
  background: var(--chip-bg);
  transform: none;
  box-shadow: none;
}

#locatorInspectCard .ms-close .ui-icon {
  width: 20px;
  height: 20px;
}

#locatorInspectCard .ms-divider {
  margin: 0 0 16px;
}

#locatorInspectGrid {
  flex: none !important;
  display: grid;
  gap: 20px !important;
}

#locatorInspectGrid .locator-inspect-side,
#locatorInspectGrid .locator-inspect-side:first-child {
  flex-direction: column;
  gap: 8px !important;
  min-width: 0;
  min-height: 0 !important;
}

#locatorInspectGrid .match-settings-label {
  margin: 0;
  text-align: left;
}

.locator-inspect-shot-wrap {
  position: relative;
}

#locatorInspectScreenshot {
  display: block;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  border-radius: 12px !important;
  border: 1px solid var(--border) !important;
  background: rgba(0, 0, 0, 0.3) !important;
  transition: border-color 0.2s ease;
}

#locatorInspectMinimapFrame {
  border-radius: 12px !important;
  border: 1px solid var(--border) !important;
  background: rgba(0, 0, 0, 0.35) !important;
  transition: border-color 0.2s ease;
}

.locator-inspect-shot-wrap:hover #locatorInspectScreenshot.is-clickable,
#locatorInspectMinimapFrame.is-zoomable:hover {
  border-color: var(--accent7) !important;
}

.locator-inspect-zoom-chip {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(34, 34, 34, 0.78);
  color: #fff;
  pointer-events: none;
  opacity: 0.8;
  transition: opacity 0.2s ease, background-color 0.2s ease;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.locator-inspect-zoom-chip svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.locator-inspect-shot-wrap:hover .locator-inspect-zoom-chip,
#locatorInspectMinimapFrame:hover .locator-inspect-zoom-chip {
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
}

#locatorInspectScreenshot[style*="display: none"] ~ .locator-inspect-zoom-chip {
  display: none;
}

@media (max-width: 900px) {
  

  
}

#locatorInspectGrid {
  align-items: stretch;
}

#locatorInspectMinimapFrame {
  flex: 1 1 auto !important;
  height: auto;
  min-height: 300px;
}

@media (max-width: 900px) {
  

  #locatorInspectMinimapFrame {
    flex: none !important;
    height: 340px;
  }
}

body.light-mode #locatorInspectMinimapFrame {
  background: #141414 !important;
}

#locatorInspectGrid {
  column-gap: 20px;
  row-gap: 8px !important;
}

#locatorInspectGrid .locator-inspect-side,
#locatorInspectGrid .locator-inspect-side:first-child {
  display: contents !important;
}

#locatorInspectGrid .locator-inspect-side:first-child .match-settings-label { grid-column: 1; grid-row: 1; }
#locatorInspectGrid .locator-inspect-side:first-child .locator-inspect-shot-wrap { grid-column: 1; grid-row: 2; }
#locatorInspectGrid .locator-inspect-side:last-child .match-settings-label { grid-column: 2; grid-row: 1; }
#locatorInspectGrid .locator-inspect-side:last-child #locatorInspectMinimapFrame {
  grid-column: 2;
  grid-row: 2;
  align-self: stretch;
  height: auto;
}

@media (max-width: 900px) {
  

  #locatorInspectGrid .locator-inspect-side:first-child .match-settings-label,
  #locatorInspectGrid .locator-inspect-side:first-child .locator-inspect-shot-wrap,
  #locatorInspectGrid .locator-inspect-side:last-child .match-settings-label,
  #locatorInspectGrid .locator-inspect-side:last-child #locatorInspectMinimapFrame {
    grid-column: 1;
    grid-row: auto;
  }

  #locatorInspectGrid .locator-inspect-side:last-child #locatorInspectMinimapFrame {
    height: 340px;
  }
}

#locatorInspectGrid {
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
}

#locatorInspectGrid .locator-inspect-side:last-child #locatorInspectMinimapFrame {
  min-height: 0;
}

@media (max-width: 900px) {
  #locatorInspectGrid {
    grid-template-columns: 1fr;
  }
}

#locatorInspectGrid {
  grid-template-rows: auto auto;
}

#locatorInspectGrid .locator-inspect-side:last-child #locatorInspectMinimapFrame {
  contain: size;
}

@media (max-width: 900px) {
  #locatorInspectGrid {
    grid-template-rows: none;
  }

  #locatorInspectGrid .locator-inspect-side:last-child #locatorInspectMinimapFrame {
    contain: none;
  }
}

#locatorInspectScreenshot {
  margin: 0 !important;
}

.locator-reveal-stage-frame.is-inspectable,
.stats-screenshot-analysis-image-btn,
.stats-screenshot-minimap-frame {
  position: relative;
  cursor: zoom-in;
}

.locator-reveal-stage-frame.is-inspectable,
.stats-screenshot-analysis-image-btn,
.stats-screenshot-minimap-frame,
.history-locator-minimap-frame {
  border: 1px solid var(--border);
  transition: border-color 0.2s ease;
}

.locator-reveal-stage-frame.is-inspectable:hover,
.stats-screenshot-analysis-image-btn:hover,
.stats-screenshot-minimap-frame:hover,
.history-locator-minimap-frame:hover {
  border-color: var(--accent7);
  transform: none;
  box-shadow: none;
}

.locator-reveal-stage-frame.is-inspectable:focus-visible,
.stats-screenshot-analysis-image-btn:focus-visible,
.stats-screenshot-minimap-frame:focus-visible,
.history-locator-minimap-frame:focus-visible {
  outline: 2px solid var(--accent7);
  outline-offset: 2px;
}

.locator-reveal-stage-frame.is-inspectable:hover .locator-inspect-zoom-chip,
.stats-screenshot-analysis-image-btn:hover .locator-inspect-zoom-chip,
.stats-screenshot-minimap-frame:hover .locator-inspect-zoom-chip,
.history-locator-minimap-frame:hover .locator-inspect-zoom-chip {
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
}

.history-locator-minimap-frame .locator-inspect-zoom-chip {
  right: 4px;
  bottom: 4px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.history-locator-minimap-frame .locator-inspect-zoom-chip svg {
  width: 13px;
  height: 13px;
}

#locatorRevealCard {
  background: rgba(34, 34, 34, 0.8);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

body.light-mode #locatorRevealCard {
  background: rgba(246, 246, 246, 0.9);
}

.locator-reveal-panel {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0.5rem 1rem;
}

.locator-reveal-compare.split-mode .locator-reveal-panel.correct {
  border-left: 1px solid var(--border);
}

.locator-reveal-panel-kicker {
  padding: 0.3rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: none !important;
}

.locator-reveal-panel.player .locator-reveal-panel-kicker {
  color: #ff8f8f;
  background: rgba(255, 90, 90, 0.16);
  border: 1px solid rgba(255, 90, 90, 0.42);
}

.locator-reveal-panel.correct .locator-reveal-panel-kicker,
.locator-reveal-panel.merged .locator-reveal-panel-kicker {
  color: #5fe88a;
  background: rgba(50, 205, 90, 0.16);
  border: 1px solid rgba(50, 205, 90, 0.42);
}

body.light-mode .locator-reveal-panel.player .locator-reveal-panel-kicker {
  color: #b3261e;
}

body.light-mode .locator-reveal-panel.correct .locator-reveal-panel-kicker,
body.light-mode .locator-reveal-panel.merged .locator-reveal-panel-kicker {
  color: #1b7a3a;
}

.locator-reveal-map-name {
  font-size: 1.15rem;
  font-weight: 800;
}

.locator-reveal-cover-img,
.locator-reveal-cover-fallback {
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: none;
}

.locator-reveal-floor-name {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.7;
}

.locator-reveal-stage-frame {
  border-radius: 12px !important;
  background: rgba(0, 0, 0, 0.35) !important;
}

body.light-mode .locator-reveal-stage-frame {
  background: #141414 !important;
}

#locatorRevealScoreBreakdown {
  background: transparent !important;
  border: none !important;
  border-top: 1px solid var(--border) !important;
  border-radius: 0 !important;
  padding: 0.6rem 1rem 0.2rem !important;
  gap: 0 !important;
  box-shadow: none !important;
}

.locator-reveal-score-row {
  align-items: center;
  padding: 0.38rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.9rem !important;
}

body.light-mode .locator-reveal-score-row {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.locator-reveal-score-row .score-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.locator-reveal-score-row .score-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.locator-reveal-score-row .score-icon .ui-icon {
  width: 12px;
  height: 12px;
  stroke-width: 3;
}

.locator-reveal-score-row .score-icon.ok {
  background: rgba(50, 205, 90, 0.18);
}

.locator-reveal-score-row .score-icon.bad {
  background: rgba(255, 90, 90, 0.18);
}

.locator-reveal-score-divider {
  display: none;
}

.locator-reveal-score-row.total {
  border-bottom: none;
  padding-top: 0.6rem;
  font-size: 1rem !important;
  font-weight: 800;
}

.locator-reveal-score-row.total strong {
  font-size: 1.35rem !important;
  font-weight: 900;
}

#locatorRevealCard.tier-lose .locator-reveal-score-row.total strong { color: #ff7b7b; }
#locatorRevealCard.tier-mid .locator-reveal-score-row.total strong { color: #79a8ff; }
#locatorRevealCard.tier-win .locator-reveal-score-row.total strong { color: #5fe88a; }

body.light-mode #locatorRevealCard.tier-lose .locator-reveal-score-row.total strong { color: #c62828; }
body.light-mode #locatorRevealCard.tier-mid .locator-reveal-score-row.total strong { color: #2a5bd7; }
body.light-mode #locatorRevealCard.tier-win .locator-reveal-score-row.total strong { color: #1b7a3a; }

#locatorRevealContinueBtn.ms-done-button {
  min-width: 0 !important;
  padding: 11px 44px !important;
  border: none !important;
  border-radius: 10px !important;
  background: var(--btn-bg) !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 700;
  box-shadow: none !important;
  transform: none !important;
  cursor: pointer;
}

#locatorRevealContinueBtn.ms-done-button:hover {
  background: var(--btn-hover-bg) !important;
  transform: none !important;
  box-shadow: none !important;
}

.locator-location-report-cta {
  margin-top: 0.6rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.locator-reveal-panel,
.locator-reveal-panel.correct,
.locator-reveal-panel.player,
.locator-reveal-panel.merged {
  border-radius: 0 !important;
}

.stats-screenshot-analysis-image-btn img {
  margin: 0 !important;
}

.map-outline {
  position: absolute;
  z-index: 3;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 8px;
  pointer-events: none;
  transition: border-color 0.2s ease;
}

.has-map-outline:hover .map-outline,
.has-map-outline:focus-visible .map-outline {
  border-color: var(--accent7);
}

.has-map-outline:hover .locator-inspect-zoom-chip {
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
}

.has-map-outline.has-map-outline,
.has-map-outline.has-map-outline:hover,
.has-map-outline.has-map-outline:focus-visible {
  background: transparent !important;
  border-color: transparent !important;
  outline: none;
}

body.light-mode .has-map-outline.has-map-outline {
  background: transparent !important;
}

#locatorInspectMinimapFrame.has-map-outline,
#locatorInspectMinimapFrame.has-map-outline:hover,
body.light-mode #locatorInspectMinimapFrame.has-map-outline {
  background: transparent !important;
  border-color: transparent !important;
}

#statsScreenshotMinimapFrame.has-map-outline,
#statsScreenshotMinimapFrame.has-map-outline:hover {
  transform: none;
  box-shadow: none;
}

.map-outline .locator-inspect-zoom-chip {
  right: 8px;
  bottom: 8px;
}

.history-locator-minimap-frame .map-outline .locator-inspect-zoom-chip {
  right: 3px;
  bottom: 3px;
}

.report-shot {
  border: 1px solid var(--border);
  transition: border-color 0.2s ease;
}

.report-shot:hover {
  border-color: var(--accent7);
}

.report-shot .locator-inspect-zoom-chip {
  right: 8px;
  bottom: 8px;
}

.report-shot:hover .locator-inspect-zoom-chip {
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
}

.locator-reveal-score-row .score-icon {
  width: 18px;
  height: 18px;
  background: none !important;
  border-radius: 0;
}

.locator-reveal-score-row .score-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.locator-reveal-score-row .score-icon .icon-bg {
  stroke: none;
}

.locator-reveal-score-row .score-icon.ok { color: #5fe88a; }
.locator-reveal-score-row .score-icon.ok .icon-bg { fill: rgba(50, 205, 90, 0.2); }
.locator-reveal-score-row .score-icon.bad { color: #ff8f8f; }
.locator-reveal-score-row .score-icon.bad .icon-bg { fill: rgba(255, 90, 90, 0.2); }

body.light-mode .locator-reveal-score-row .score-icon.ok { color: #1b7a3a; }
body.light-mode .locator-reveal-score-row .score-icon.bad { color: #b3261e; }

#globalTooltip.tooltip-flat {
  background: rgba(30, 30, 30, 0.97);
  color: #f2f2f2;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}

body.light-mode #globalTooltip.tooltip-flat {
  background: rgba(252, 252, 252, 0.98);
  color: #1a1a1a;
  border-color: rgba(0, 0, 0, 0.18);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}

.ms-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ms-title .ms-title-icon {
  width: 22px;
  height: 22px;
  flex: none;
}

.top-icon {
  width: 26px;
  height: 26px;
  color: var(--fg);
}

.daily-score-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.daily-score-pill .pill-icon {
  width: 14px;
  height: 14px;
  flex: none;
}

.ms-action-button .btn-icon {
  width: 16px;
  height: 16px;
  flex: none;
}

.ms-action-row .ms-action-button,
#toggleMasterSound,
#resetDefaultsButton,
#resetSoundDefaultsButton,
#customMapPoolEditButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-icon-slot {
  display: inline-flex;
  align-items: center;
}

.score-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: none;
  vertical-align: -4px;
  margin-right: 6px;
}

.score-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.score-icon .icon-bg { stroke: none; }
.score-icon.ok { color: #5fe88a; }
.score-icon.ok .icon-bg { fill: rgba(50, 205, 90, 0.2); }
.score-icon.bad { color: #ff8f8f; }
.score-icon.bad .icon-bg { fill: rgba(255, 90, 90, 0.2); }

body.light-mode .score-icon.ok { color: #1b7a3a; }
body.light-mode .score-icon.bad { color: #b3261e; }

.locator-reveal-score-row .score-icon {
  margin-right: 0;
  vertical-align: baseline;
}

.stats-screenshot-lock-icon .ui-icon {
  width: 24px;
  height: 24px;
}

.game-notice {
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  width: fit-content;
  max-width: min(760px, 92%);
  margin: 0.6rem auto 0.9rem;
  padding: 9px 8px 9px 14px;
  border: 1px solid rgba(255, 190, 60, 0.5);
  border-radius: 12px;
  background: rgba(255, 190, 60, 0.12);
  color: var(--fg);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.game-notice-icon {
  display: inline-flex;
  flex: none;
  color: #ffbe3c;
}

.game-notice-icon .ui-icon {
  width: 18px;
  height: 18px;
}

.game-notice-text {
  flex: 1;
  min-width: 0;
}

.game-notice-close {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  opacity: 0.7;
  transform: none;
  box-shadow: none;
}

.game-notice-close:hover {
  background: rgba(255, 255, 255, 0.14);
  opacity: 1;
  transform: none;
  box-shadow: none;
}

.game-notice-close .ui-icon {
  width: 14px;
  height: 14px;
}

body.light-mode .game-notice {
  border-color: rgba(178, 122, 0, 0.55);
  background: rgba(255, 190, 60, 0.2);
}

body.light-mode .game-notice-icon {
  color: #a86f00;
}

#gameHeaderActions .game-notice-trigger {
  color: #ffbe3c;
}

#gameHeaderActions .game-notice-trigger .ui-icon {
  width: 22px;
  height: 22px;
}

body.light-mode #gameHeaderActions .game-notice-trigger {
  color: #a86f00;
}

.game-notice-action {
  display: inline-flex;
  flex: none;
  align-items: center;
  margin: 0;
  padding: 6px 12px;
  border: 1px solid rgba(255, 190, 60, 0.55);
  border-radius: 8px;
  background: rgba(255, 190, 60, 0.2);
  color: var(--fg);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transform: none;
  box-shadow: none;
  transition: background-color 0.2s ease;
}

.game-notice-action:hover {
  background: rgba(255, 190, 60, 0.36);
  transform: none;
  box-shadow: none;
}

.game-notice {
  flex-wrap: wrap;
}

.zoom-viewport {
  position: relative;
  display: flex;
  overflow: hidden;
  border-radius: 12px;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.zoom-viewport > img {
  will-change: transform;
}

.zoom-viewport.is-zoomed {
  cursor: grab;
}

.zoom-viewport.is-zoomed:active {
  cursor: grabbing;
}

#screenshotFrame > .zoom-viewport {
  width: 100%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

#screenshotFrame > .zoom-viewport > #screenshot {
  box-shadow: none;
}

.zoom-reset-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  display: none !important;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-width: 0;
  margin: 0 !important;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(34, 34, 34, 0.78);
  color: #fff;
  cursor: pointer;
  box-shadow: none;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.zoom-reset-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.zoom-reset-btn .ui-icon {
  width: 20px;
  height: 20px;
}

#game .zoom-viewport.is-zoomed > .zoom-reset-btn,
.zoom-viewport.is-zoomed > .zoom-reset-btn {
  display: flex !important;
}

#playArea .play-hero-button,
#playArea .mode-toggle-option {
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, opacity 0.2s ease;
}

#playArea.is-locator-mode {
  --mode-color: #ee6a1f;
  --mode-color-hover: #d45a14;
  --mode-glow: #ffc49a;
}

#playArea.is-locator-mode .play-hero-button {
  background: var(--mode-color);
  border-color: var(--mode-glow);
  box-shadow: 0 0 8px var(--mode-glow);
}

#playArea.is-locator-mode .play-hero-button:hover {
  background: var(--mode-color-hover);
  box-shadow: 0 0 14px var(--mode-glow);
}

#playArea.is-locator-mode #modeToggleLocatorButton.selected {
  background: var(--mode-color);
}

.play-hero-card {
  transition: border-color 0.25s ease;
}

.play-hero-card.is-locator-mode {
  border-color: var(--mode-glow);
}

#customMapPoolPresets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-bottom: 0.9rem;
}

.custom-map-pool-preset-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.custom-map-pool-preset-label {
  margin-right: 2px;
  font-size: 12.5px;
  font-weight: 700;
  opacity: 0.65;
}

#customMapPoolPresets .ms-action-button {
  padding: 6px 12px;
  font-size: 13px;
}

.card > p {
  margin-bottom: 1.7rem;
}

.card.is-hidden-locked {
  border-style: dashed;
  opacity: 0.8;
}

.card.is-hidden-locked h4 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.card.is-hidden-locked h4 .ui-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.card.is-hidden-locked > p {
  margin-bottom: 0;
  font-style: italic;
}

.card.is-hidden-unlocked {
  box-shadow: 0 0 0 1px rgba(245, 185, 66, 0.55), 0 0 18px rgba(245, 185, 66, 0.18);
}

.ach-hidden-kicker {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: -2px 0 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #f5b942;
}

.ach-hidden-kicker .ui-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

body.light-mode .ach-hidden-kicker {
  color: #b07800;
}

#repliesOverlay {
  z-index: 99999;
  background: rgba(0, 0, 0, 0.65);
}

#repliesPanel {
  width: min(660px, 94vw);
}

#repliesButton .replies-dot {
  display: none;
  position: absolute;
  top: 11px;
  right: 11px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #ef5350;
  box-shadow: 0 0 0 2px var(--bg);
}

#repliesButton.has-unread .replies-dot {
  display: block;
}

.replies-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.replies-item {
  padding: 14px;
  border-radius: 14px;
  background: var(--chip-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.replies-item.is-new {
  border-color: rgba(50, 205, 50, 0.45);
}

.replies-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
}

.replies-kind {
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.8;
}

.replies-new-tag {
  padding: 1px 7px;
  border-radius: 999px;
  background: #ef5350;
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.replies-date {
  margin-left: auto;
  opacity: 0.6;
}

.replies-mine {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
  border-left: 3px solid rgba(255, 255, 255, 0.25);
}

body.light-mode .replies-mine {
  background: rgba(0, 0, 0, 0.05);
}

.replies-mine-label {
  margin-bottom: 2px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.55;
}

.replies-mine-text {
  font-size: 13px;
  line-height: 1.4;
  opacity: 0.85;
  white-space: pre-wrap;
  word-break: break-word;
}

.replies-thumb {
  display: block;
  width: 100%;
  max-height: 110px;
  margin-top: 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  object-fit: cover;
  cursor: zoom-in;
}

.replies-thumb:hover {
  border-color: var(--accent7);
}

.replies-answer {
  margin-top: 10px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(50, 205, 50, 0.1);
  border: 1px solid rgba(50, 205, 50, 0.3);
}

.replies-answer-from {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5be05b;
}

body.light-mode .replies-answer-from {
  color: #1d8a1d;
}

.replies-answer-text {
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
}


.history-classic-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: var(--fg);
  opacity: 0.6;
  cursor: help;
}

.history-classic-hint:hover,
.history-classic-hint:focus-visible {
  opacity: 1;
}

.history-classic-hint .ui-icon {
  width: 16px;
  height: 16px;
}

.history-locator-minimap-frame.history-classic-cover {
  cursor: default;
}

.history-locator-minimap-frame.history-classic-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#privacyOverlay {
  z-index: 99999;
  background: rgba(0, 0, 0, 0.65);
}

#privacyPanel {
  width: min(680px, 94vw);
}

.privacy-link,
.privacy-link:hover {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  transform: none !important;
  color: var(--fg);
  font-size: 12px;
  font-weight: 500;
  padding: 0.3rem 0.5rem;
  margin: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  opacity: 0.45;
}

.privacy-link:hover {
  opacity: 0.9;
}

.privacy-body {
  text-align: left;
  font-size: 13.5px;
  line-height: 1.5;
}

.privacy-body h3 {
  margin: 1.1rem 0 0.3rem;
  font-size: 14px;
  text-align: left;
}

.privacy-body p {
  margin: 0.3rem 0;
  opacity: 0.9;
}

.privacy-body a {
  color: var(--accent7);
}

.privacy-body .privacy-date {
  margin-top: 1.1rem;
  font-size: 12px;
  opacity: 0.55;
}

.tut-layer {
  position: fixed;
  inset: 0;
  z-index: 200000;
  pointer-events: none;
}

.tut-layer[hidden] {
  display: none;
}

.tut-shade {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.tut-shade path {
  fill: rgba(0, 0, 0, 0.72);
}

.tut-spot {
  position: fixed;
  border-radius: 12px;
  pointer-events: none;
  box-shadow: 0 0 0 3px var(--accent7), 0 0 24px 6px rgba(30, 144, 255, 0.55);
}

.tut-layer.tut-no-dim .tut-shade,
.tut-layer.tut-no-dim .tut-spots {
  display: none;
}

.tut-layer.tut-no-ring .tut-spot {
  box-shadow: none;
}

.tut-flash {
  position: fixed;
  max-width: min(520px, calc(100vw - 32px));
  box-sizing: border-box;
  padding: 1rem 1.9rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 140, 140, 0.4);
  background: rgba(170, 32, 32, 0.92);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.tut-flash.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.tut-flash.tut-flash-close {
  background: rgba(196, 104, 16, 0.94);
  border-color: rgba(255, 200, 130, 0.45);
}

.tut-flash.tut-flash-info {
  background: rgba(38, 84, 176, 0.94);
  border-color: rgba(140, 180, 255, 0.4);
}

.tut-layer.tut-paused > * {
  visibility: hidden !important;
}

.tut-layer.tut-pending .tut-bubble,
.tut-layer.tut-pending .tut-mark,
.tut-bubble.tut-placing {
  visibility: hidden;
}

.tut-mark {
  position: fixed;
  display: none;
  border-radius: 9px;
  pointer-events: none;
  box-shadow: 0 0 0 3px #32cd32, 0 0 18px 4px rgba(50, 205, 50, 0.7);
  animation: tutPulseGreen 1.4s ease-in-out infinite;
}

.tut-mark span {
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 9px;
  border-radius: 999px;
  background: #32cd32;
  color: #062006;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

@keyframes tutPulseGreen {
  50% { box-shadow: 0 0 0 4px #32cd32, 0 0 28px 10px rgba(50, 205, 50, 0.9); }
}

.tut-bubble {
  position: fixed;
  width: min(340px, calc(100vw - 16px));
  box-sizing: border-box;
  padding: 16px 18px 14px;
  border-radius: 14px;
  background: rgba(28, 30, 38, 0.97);
  border: 1px solid rgba(30, 144, 255, 0.55);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  color: #f4f4f4;
  pointer-events: auto;
  text-align: left;
}

.tut-bubble::before {
  content: '';
  position: absolute;
  left: var(--tut-arrow-x, 40px);
  width: 14px;
  height: 14px;
  background: rgba(28, 30, 38, 0.97);
  border-left: 1px solid rgba(30, 144, 255, 0.55);
  border-top: 1px solid rgba(30, 144, 255, 0.55);
  display: none;
}

.tut-bubble[data-arrow="up"]::before {
  display: block;
  top: -8px;
  transform: rotate(45deg);
}

.tut-bubble[data-arrow="down"]::before {
  display: block;
  bottom: -8px;
  transform: rotate(225deg);
}

.tut-bubble-head {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent7);
  margin-bottom: 4px;
}

.tut-bubble-title {
  margin: 0 0 6px;
  font-size: 17px;
}

.tut-bubble-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  opacity: 0.9;
}

.tut-bubble.tut-compact .tut-bubble-title,
.tut-bubble.tut-compact .tut-bubble-text {
  display: none;
}

.tut-bubble-btns {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.tut-end-btn {
  background: none;
  border: 0;
  padding: 0;
  color: #f4f4f4;
  opacity: 0.6;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

#tutLayer .tut-bubble .tut-end-btn {
  flex-shrink: 0 !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  color: #f4f4f4 !important;
  white-space: nowrap !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  transform: none !important;
}

#tutLayer .tut-bubble .tut-next-btn {
  white-space: nowrap !important;
  margin: 0 !important;
  width: auto !important;
}

.tut-end-btn:hover {
  opacity: 0.9;
}

.tut-wait {
  font-size: 12.5px;
  font-style: italic;
  opacity: 0.7;
  text-align: right;
}

.tut-next-btn,
.tut-primary {
  background: var(--accent7);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 8px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.tut-welcome {
  position: fixed;
  inset: 0;
  z-index: 200001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
}

.tut-card {
  position: relative;
  width: min(560px, 100%);
  box-sizing: border-box;
  padding: 28px 30px 22px;
  border-radius: 18px;
  background: rgba(30, 32, 42, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  color: #f4f4f4;
  text-align: left;
}

.tut-card h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.tut-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  opacity: 0.9;
}

.tut-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(30, 144, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.tut-card-icon svg {
  width: 30px;
  height: 30px;
  stroke: var(--accent7);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tut-dots {
  display: flex;
  gap: 7px;
  justify-content: center;
  margin: 20px 0 14px;
}

.tut-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}

.tut-dots i.on {
  width: 22px;
  border-radius: 4px;
  background: var(--accent7);
}

.tut-card-btns {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.tut-ghost {
  background: none;
  border: 0;
  color: #f4f4f4;
  opacity: 0.6;
  font: inherit;
  cursor: pointer;
}

.tut-ghost:hover {
  opacity: 0.9;
}

.tut-lang {
  position: absolute;
  top: 18px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.07);
}

.tut-lang button {
  margin: 0;
  border: 2px solid transparent;
  background: transparent;
  padding: 3px;
  border-radius: 7px;
  opacity: 0.55;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.tut-lang button img {
  margin: 0;
  max-width: none;
  max-height: none;
  width: 30px;
  height: 20px;
  object-fit: cover;
  border-radius: 3px;
  display: block;
}

.tut-lang button.on {
  border-color: var(--accent7);
  opacity: 1;
}

body.tut-match #exitGameButton,
body.tut-match #settingsToggleButtonGame {
  visibility: hidden;
}

body.tut-pin #locatorMinimapShell,
body.tut-pin #locatorMinimapShell:hover {
  width: min(420px, calc(100vw - 2rem), var(--tut-mm-max, 420px));
}

body.tut-pin #locatorMinimapToggleBtn {
  display: none;
}

#tutorialReplayButton[hidden] {
  display: none;
}

.ms-close.is-floating,
#closeSettingsButton.is-floating {
  position: relative;
  z-index: 5;
  background: rgba(34, 34, 34, 0.94) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

#statsMapCollectionPanel .ms-close.is-floating {
  position: absolute;
}

body.light-mode .ms-close.is-floating,
body.light-mode #closeSettingsButton.is-floating {
  background: rgba(255, 255, 255, 0.94) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.ms-close.is-floating:hover,
#closeSettingsButton.is-floating:hover {
  background: linear-gradient(var(--chip-bg), var(--chip-bg)), rgba(34, 34, 34, 0.94) !important;
}

body.light-mode .ms-close.is-floating:hover,
body.light-mode #closeSettingsButton.is-floating:hover {
  background: linear-gradient(var(--chip-bg), var(--chip-bg)), rgba(255, 255, 255, 0.94) !important;
}
