/* ==========================================================================
   KDE TO SAKRA JE - DESIGN SYSTEM & STYLES (MOBILE-FIRST & PREMIUM DARK)
   ========================================================================== */

:root {
  /* Color Tokens */
  --bg-dark: #090d16;
  --bg-card: rgba(15, 23, 42, 0.85);
  --bg-card-solid: #0f172a;
  --bg-glass: rgba(15, 23, 42, 0.75);
  
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: #818cf8;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-light: rgba(255, 255, 255, 0.2);

  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.35);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --header-height: 64px;
}

/* Reset & Global Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 16px;
  user-select: none;
  -webkit-user-select: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

/* Layout App Container */
.app-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: scale(0.98);
  z-index: 1;
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  z-index: 10;
}


/* ==========================================================================
   1. WELCOME SCREEN (ÚVODNÍ MENU)
   ========================================================================== */
#screen-welcome {
  background: radial-gradient(circle at 50% 20%, #1e1b4b 0%, #090d16 80%);
  align-items: center;
  padding: 20px;
  overflow-y: auto;
}

.welcome-card {
  width: 100%;
  max-width: 580px;
  margin: auto; /* místo justify-content na rodiči: při přetečení zůstane vršek dosažitelný */
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.logo-container {
  text-align: center;
}

.logo-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-emerald) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: white;
  box-shadow: var(--shadow-glow);
}

.logo-title {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
}

.logo-title .dot {
  color: var(--primary-light);
}

.logo-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}

.menu-section h3 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.category-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 14px;
}

.category-card:hover, .category-card.active {
  background: rgba(99, 102, 241, 0.12);
  border-color: var(--primary-light);
  transform: translateY(-2px);
}

.category-card.active {
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.25);
}

/* Hlavní nabídka — první okruh přes celou šířku mřížky, na střed. */
.category-card.hlavni {
  grid-column: 1 / -1;
  flex-direction: column;
  text-align: center;
  gap: 8px;
  padding: 22px 20px;
  border-color: var(--border-light);
}

.category-card.hlavni .category-icon {
  font-size: 40px;
}

.category-card.hlavni .category-info h4 {
  font-size: 21px;
}

.category-card.hlavni .category-info p {
  font-size: 13px;
  max-width: 46ch;
  margin-inline: auto;
}

.category-icon {
  font-size: 28px;
  line-height: 1;
}

.category-info h4 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.category-info p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.3;
}

.rounds-selector, .timer-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
}

.btn-pill {
  width: 100%;
  min-width: 0;
  padding: 10px 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-pill:hover, .btn-pill.active {
  background: var(--primary);
  border-color: var(--primary-light);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.welcome-actions {
  margin-top: 8px;
}

.btn-primary {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  border-radius: var(--radius-md);
  color: white;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: var(--shadow-glow);
  transition: all 0.2s ease;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.5);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}


/* ==========================================================================
   2. GAME SCREEN (HERNÍ OBRAZOVKA & HUD)
   ========================================================================== */
#screen-game {
  background-color: #000;
}

/* HUD Overlay */
.game-hud {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  pointer-events: none;
}

.game-hud > * {
  pointer-events: auto;
}

.hud-left, .hud-right, .hud-center {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hud-pill {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.hud-pill .label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.hud-pill .value {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.timer-pill {
  color: var(--accent-amber);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 16px;
}

/* .hud-pill je display:flex, samotná třída .hidden nemá vlastní pravidlo */
#timer-badge.hidden {
  display: none;
}

.timer-pill.urgent {
  color: var(--accent-rose);
  animation: pulse-red 1s infinite;
}

@keyframes pulse-red {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.btn-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  color: white;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Street View Viewport */
.streetview-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.pano-canvas {
  width: 100%;
  height: 100%;
}

.pano-fallback {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  background: #000;
  overflow: hidden;
}

/* Ořezání horní lišty Google Embedu s názvem lokace */
.pano-fallback iframe {
  width: 100%;
  height: calc(100% + 80px);
  margin-top: -80px;
  border: none;
}

/* Jemná horní celoobrazovková viněta pro čitelnost HUDu bez rušivých černých bloků */
.pano-address-mask {
  display: none;
}

.pano-controls-overlay {
  position: absolute;
  top: calc(var(--header-height) + 24px);
  left: 16px;
  z-index: 10;
}

.btn-pano-action {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  padding: 10px 16px;
  color: white;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: all 0.2s ease;
}

.btn-pano-action:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Mobile Toggle Map Button */
.btn-mobile-map-toggle {
  display: none; /* Skryto na desktopu, zobrazí se na mobilu přes media query */
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-emerald) 100%);
  border-radius: var(--radius-full);
  color: white;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 15px rgba(16, 185, 129, 0.4);
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}

/* Floating / Collapsible Guess Map Container */
.guess-map-panel {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 340px;
  height: 280px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 95;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
  opacity: 0.95;
}

/* Jen zvýraznění, žádná změna rozměrů: Leaflet si velikost cachuje a bez
   invalidateSize() by dorostlá plocha zůstala šedá — a mapa by se navíc
   hýbala pod kurzorem právě ve chvíli, kdy se do ní trefuješ. */
.guess-map-panel:hover {
  opacity: 1;
}

.guess-map-panel.expanded {
  width: min(680px, 90vw);
  height: min(520px, 75vh);
  opacity: 1;
}

.map-panel-header {
  height: 44px;
  padding: 0 14px;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-glass);
}

.map-panel-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-panel-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-map-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-map-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.map-canvas {
  flex: 1;
  width: 100%;
  background: #191a1a;
}

.map-panel-footer {
  padding: 10px;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid var(--border-glass);
}

.btn-submit-guess {
  padding: 12px;
  font-size: 15px;
  border-radius: var(--radius-md);
}


/* ==========================================================================
   3. MODAL RESULT & SUMMARY (VYHODNOCENÍ)
   ========================================================================== */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 8, 15, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-card {
  width: 100%;
  max-width: 560px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  text-align: center;
}

.modal-header h2 {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
}

.location-name-subtitle {
  color: var(--primary-light);
  font-size: 15px;
  font-weight: 600;
  margin-top: 4px;
}

.result-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-box i {
  font-size: 20px;
  margin-bottom: 4px;
}

.stat-box.distance-box i { color: var(--accent-amber); }
.stat-box.score-box i { color: var(--accent-emerald); }

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  color: #fff;
}

.result-map-canvas {
  width: 100%;
  height: 220px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  overflow: hidden;
}


/* ==========================================================================
   4. SUMMARY SCREEN (CELKOVÉ VÝSLEDKY)
   ========================================================================== */
#screen-summary {
  background: radial-gradient(circle at 50% 10%, #1e1b4b 0%, #090d16 80%);
  align-items: center;
  padding: 24px 16px;
  overflow-y: auto;
}

.summary-card {
  width: 100%;
  max-width: 680px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: auto;
}

.summary-header {
  text-align: center;
}

.trophy-badge {
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--accent-amber) 0%, #f97316 100%);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: white;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.4);
}

.summary-header h1 {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 800;
}

.summary-subtitle {
  color: var(--text-muted);
  font-size: 15px;
}

.summary-score-banner {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.banner-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.banner-score {
  font-family: var(--font-heading);
  font-size: 44px;
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
  margin: 4px 0;
}

.banner-max {
  font-size: 13px;
  color: var(--text-muted);
}

.rank-tag {
  margin-top: 10px;
  display: inline-block;
  padding: 6px 14px;
  background: var(--primary);
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.summary-map-section h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.summary-map-canvas {
  width: 100%;
  height: 280px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  overflow: hidden;
}

.summary-rounds-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.round-summary-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.round-summary-name {
  font-weight: 600;
  font-size: 14px;
}

.round-summary-stats {
  text-align: right;
}

.round-summary-score {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--accent-emerald);
}

.round-summary-dist {
  font-size: 12px;
  color: var(--text-muted);
}

/* --- Žebříček ----------------------------------------------------------- */
.board-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.board-section.hidden {
  display: none;
}

.board-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.board-form.hidden {
  display: none;
}

.board-form input {
  flex: 1 1 180px;
  min-width: 0;
  min-height: 52px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 16px;
}

.board-form .btn-primary {
  flex: 0 1 auto;
  width: auto;
}

.board-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.board-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: baseline;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid transparent;
  font-size: 15px;
}

.board-row:nth-child(odd) {
  background: rgba(255, 255, 255, 0.03);
}

.board-row.me {
  border-color: var(--accent-amber);
}

.board-rank {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-dim);
}

.board-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-score {
  font-family: var(--font-heading);
  font-weight: 700;
}

.board-empty {
  padding: 14px;
  color: var(--text-muted);
  font-size: 14px;
}

.board-note {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.board-note.hidden {
  display: none;
}

.summary-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-secondary {
  width: 100%;
  text-decoration: none;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-share {
  background: linear-gradient(135deg, var(--accent-emerald) 0%, #059669 100%);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-share:hover {
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

/* Toast Notifikace */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--accent-emerald);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 15px rgba(16, 185, 129, 0.3);
  z-index: 999;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.toast.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(20px);
}

.toast i {
  color: var(--accent-emerald);
  font-size: 16px;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* App Footer & Link */
.app-footer {
  text-align: center;
  padding-top: 8px;
  font-size: 13px;
  color: var(--text-dim);
}

.footer-sep {
  margin: 0 8px;
  color: var(--text-dim);
}

.footer-link {
  color: var(--primary-light);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: all 0.2s ease;
}

.footer-link:hover {
  color: #fff;
  text-decoration: underline;
}


/* Backdrop pro mobilní mapu */
.map-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 140;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.map-backdrop.visible {
  display: block;
  opacity: 1;
}

/* ==========================================================================
   5. RESPONSIVE DESIGN (MOBILE ADAPTATION)
   ========================================================================= */
.mobile-only {
  display: none !important;
}

@media (max-width: 768px) {
  .mobile-only {
    display: flex !important;
  }

  .btn-mobile-map-toggle {
    display: flex;
    bottom: max(20px, env(safe-area-inset-bottom));
  }

  /* Plovoucí mapa na mobilu -> Bottom sheet modal */
  .guess-map-panel {
    position: fixed;
    top: auto;
    bottom: -100%; /* Ve výchozím stavu skrytá dole */
    left: 0;
    right: 0;
    width: 100vw !important;
    height: 75vh !important;
    height: 75dvh !important;
    max-height: 85dvh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-bottom: none;
    border-left: none;
    border-right: none;
    z-index: 150;
    opacity: 1 !important;
    transition: bottom 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  }

  .guess-map-panel.mobile-open {
    bottom: 0;
  }

  #btn-expand-map {
    display: none;
  }

  /* Úprava HUD na mobilu */
  .game-hud {
    top: max(8px, env(safe-area-inset-top));
    left: 8px;
    right: 8px;
    height: auto;
  }

  .hud-left, .hud-right, .hud-center {
    gap: 6px;
  }

  .hud-pill {
    padding: 6px 10px;
    font-size: 13px;
    gap: 4px;
  }

  .hud-pill .value {
    font-size: 14px;
  }

  .timer-pill {
    font-size: 14px;
    padding: 6px 10px;
  }

  .btn-icon {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }

  .hud-pill .label {
    display: none; /* Ušetřit místo na mobilním displeji */
  }

  .pano-controls-overlay {
    top: calc(max(8px, env(safe-area-inset-top)) + 48px);
    left: 8px;
  }

  .btn-pano-action {
    padding: 6px 12px;
    font-size: 11px;
  }

  /* Karty a modaly na mobilu */
  .welcome-card, .summary-card {
    padding: 24px 18px;
    margin: auto 0;
  }

  .logo-title {
    font-size: 26px;
  }

  .modal-card {
    padding: 20px 16px;
    max-height: 90vh;
    max-height: 90dvh;
  }

  .result-map-canvas {
    height: 180px;
  }

  .summary-map-canvas {
    height: 220px;
  }

  .stat-value {
    font-size: 20px;
  }

  .btn-pill {
    padding: 9px 4px;
    font-size: 12px;
    gap: 4px;
  }
}
