/* TheWhereWhat - Dark neon aesthetic */
:root {
  --bg-dark: #0a0a0f;
  --bg-card: #12121a;
  --bg-elevated: #1a1a25;
  --border: rgba(255, 255, 255, 0.08);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-muted: rgba(255, 255, 255, 0.35);
  --accent: #00f5d4;
  --accent-glow: rgba(0, 245, 212, 0.3);
  --hot: #ff006e;
  --hot-glow: rgba(255, 0, 110, 0.3);
  --warning: #ffbe0b;
  --upvote: #00f5d4;
  --downvote: #ff006e;
  --bot: #a855f7;
  --bot-glow: rgba(168, 85, 247, 0.3);
  --student: #3b82f6;
  --student-glow: rgba(59, 130, 246, 0.3);
  --community: #10b981;
  --community-glow: rgba(16, 185, 129, 0.3);
  --radius: 16px;
  --radius-sm: 10px;
}

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

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Map */
#map {
  position: fixed;
  inset: 0;
  z-index: 1;
}

.leaflet-container {
  background: var(--bg-dark);
  font-family: inherit;
}

/* Custom dark map tiles styling */
.leaflet-tile-pane {
  filter: saturate(0.3) brightness(0.65) contrast(1.1);
}

.leaflet-control-zoom {
  border: none !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4) !important;
}

.leaflet-control-zoom a {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border) !important;
  width: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
  font-size: 18px !important;
  transition: all 0.2s;
}

.leaflet-control-zoom a:hover {
  background: var(--bg-elevated) !important;
  color: var(--accent) !important;
}

.leaflet-control-zoom-in {
  border-radius: var(--radius-sm) var(--radius-sm) 0 0 !important;
}

.leaflet-control-zoom-out {
  border-radius: 0 0 var(--radius-sm) var(--radius-sm) !important;
}

/* Simple single dot */
.bubble-dot {
  cursor: pointer;
}

.dot {
  font-family: 'Courier New', Courier, monospace;
  font-weight: bold;
  line-height: 1;
  color: var(--accent);
  text-shadow:
    0 0 4px currentColor,
    0 0 8px currentColor,
    0 0 12px rgba(0, 245, 212, 0.4),
    0 4px 8px rgba(0, 0, 0, 0.5);
}

.dot.hot {
  color: var(--hot);
  text-shadow:
    0 0 4px currentColor,
    0 0 8px currentColor,
    0 0 12px rgba(255, 0, 110, 0.4),
    0 4px 8px rgba(0, 0, 0, 0.5);
}

.dot.cold {
  color: #666;
  opacity: 0.5;
  text-shadow:
    0 0 4px rgba(100, 100, 100, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.4);
}

.dot.bot {
  color: #888;
  opacity: 0.8;
  text-shadow:
    0 0 4px rgba(136, 136, 136, 0.4),
    0 0 8px rgba(136, 136, 136, 0.3),
    0 4px 8px rgba(0, 0, 0, 0.5);
}


/* Header - Mobile first */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top));
  background: linear-gradient(to bottom, rgba(10,10,15,0.9) 0%, transparent 100%);
  pointer-events: none;
}

.header > * {
  pointer-events: auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  font-size: 24px;
  color: var(--accent);
  text-shadow: 0 0 15px var(--accent-glow);
}

.logo-text {
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.3px;
  color: var(--text-secondary);
}

.logo-text strong {
  color: var(--text-primary);
  font-weight: 700;
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-feedback,
.btn-locate {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  -webkit-tap-highlight-color: transparent;
  font-size: 20px;
}

.btn-feedback:active,
.btn-locate:active {
  transform: scale(0.92);
  background: var(--bg-elevated);
}

.btn-locate svg {
  width: 22px;
  height: 22px;
}

/* Hint bar - Mobile optimized */
.hint-bar {
  position: fixed;
  bottom: 24px;
  bottom: max(24px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  padding: 14px 20px;
  background: rgba(18,18,26,0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 24px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  pointer-events: none;
  white-space: nowrap;
}

.hint-bar span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hint-bar span::before {
  content: '👆';
  font-size: 16px;
}

/* Stats bar - Mobile */
.stats-bar {
  position: fixed;
  bottom: 80px;
  bottom: calc(80px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  gap: 16px;
  padding: 8px 16px;
  background: rgba(18,18,26,0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 2px 15px rgba(0,0,0,0.3);
}

.stat {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}

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

/* Modal - Mobile first bottom sheet */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  width: 100%;
  max-height: 85vh;
  max-height: calc(85vh - env(safe-area-inset-bottom));
  background: var(--bg-card);
  border-radius: 20px 20px 0 0;
  padding: 20px;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal.active .modal-content {
  transform: translateY(0);
}

/* Drag handle for mobile */
.modal-content::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
}

@media (min-width: 600px) {
  .modal {
    align-items: center;
  }
  
  .modal-content {
    max-width: 420px;
    border-radius: var(--radius);
    max-height: 85vh;
    padding-bottom: 24px;
  }
  
  .modal-content::before {
    display: none;
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  margin-top: 8px;
}

.modal-header h2 {
  font-size: 20px;
  font-weight: 700;
}

.modal-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.modal-close:active {
  background: var(--hot);
  border-color: var(--hot);
  color: white;
  transform: scale(0.95);
}

/* Form - Mobile optimized */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 16px; /* Prevents iOS zoom */
  transition: border-color 0.15s;
  resize: none;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

/* Media upload */
.media-upload {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 20px;
  background: var(--bg-elevated);
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.upload-placeholder:hover {
  border-color: var(--accent);
  background: rgba(0, 245, 212, 0.05);
}

.upload-placeholder svg {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
}

.upload-placeholder span {
  font-size: 14px;
  color: var(--text-secondary);
}

.upload-preview {
  position: relative;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-preview img,
.upload-preview video {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  display: none;
}

.upload-preview audio {
  width: 100%;
  display: none;
}

.upload-preview img.active,
.upload-preview video.active,
.upload-preview audio.active {
  display: block;
}

.remove-media {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--hot);
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Location info */
.location-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.location-info svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.location-info span {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Submit button - Mobile */
.btn-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 20px;
  background: var(--accent);
  border: none;
  border-radius: 14px;
  color: var(--bg-dark);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.btn-submit:active {
  transform: scale(0.98);
  opacity: 0.9;
}

.btn-submit:disabled {
  background: var(--bg-elevated);
  color: var(--text-muted);
  cursor: not-allowed;
}

.btn-submit svg {
  width: 18px;
  height: 18px;
}

/* Bubble view modal */
.bubble-view {
  padding: 0;
  overflow: hidden;
}

.bubble-view .modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
}

.bubble-media {
  position: relative;
  background: var(--bg-elevated);
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bubble-media:empty {
  display: none;
}

.bubble-media img,
.bubble-media video {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  background: var(--bg-dark);
}

.bubble-media audio {
  width: 100%;
  padding: 20px;
}

.bubble-info {
  padding: 24px;
}

.bubble-info h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}

.bubble-info p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.bubble-info p:empty {
  display: none;
}

.bubble-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

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

/* Vote section - Mobile touch friendly */
.vote-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 16px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
}

.vote-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.vote-btn:active {
  transform: scale(0.9);
}

.vote-btn.upvote.active {
  background: var(--upvote);
  border-color: var(--upvote);
  color: var(--bg-dark);
  box-shadow: 0 0 20px var(--accent-glow);
}

.vote-btn.downvote.active {
  background: var(--downvote);
  border-color: var(--downvote);
  color: white;
  box-shadow: 0 0 20px var(--hot-glow);
}

.vote-btn svg {
  width: 26px;
  height: 26px;
}

.score {
  font-size: 28px;
  font-weight: 800;
  min-width: 50px;
  text-align: center;
  color: var(--text-primary);
}

.score.positive {
  color: var(--upvote);
}

.score.negative {
  color: var(--downvote);
}

/* Toast notifications */
.toast-container {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 14px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  animation: toast-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast.success {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(0,245,212,0.15) 0%, var(--bg-card) 100%);
}

.toast.error {
  border-color: var(--hot);
  background: linear-gradient(135deg, rgba(255,0,110,0.15) 0%, var(--bg-card) 100%);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--bg-dark);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Phone optimizations */
@media (max-width: 768px) {
  /* Bigger header */
  .logo-icon {
    font-size: 28px;
  }
  
  .logo-text {
    font-size: 22px;
  }
  
  .hint-bar {
    font-size: 18px;
    padding: 18px 24px;
    bottom: calc(80px + env(safe-area-inset-bottom));
    font-weight: 500;
  }
  
  .stats-bar {
    padding: 12px 18px;
    font-size: 16px;
  }
  
  .stat-value {
    font-size: 24px;
    font-weight: 600;
  }
  
  .stat-label {
    font-size: 15px;
  }
  
  .btn-locate {
    width: 50px;
    height: 50px;
  }
  
  .btn-locate svg {
    width: 24px;
    height: 24px;
  }
  
  /* Bigger modal content - takes up full screen on mobile */
  .modal-content {
    max-width: 100%;
    width: 100%;
    max-height: 95vh;
    padding: 32px 24px;
    border-radius: 24px 24px 0 0;
  }
  
  .modal-header {
    margin-bottom: 24px;
  }
  
  .modal-header h2 {
    font-size: 28px;
  }
  
  .modal-close {
    font-size: 36px;
    width: 44px;
    height: 44px;
  }
  
  .form-group label {
    font-size: 17px;
    font-weight: 500;
  }
  
  .form-group input,
  .form-group textarea {
    font-size: 18px;
    padding: 16px 18px;
  }
  
  .btn-primary {
    padding: 18px;
    font-size: 19px;
    font-weight: 600;
  }
  
  /* Bigger vote buttons on mobile */
  .vote-btn {
    width: 70px;
    height: 70px;
    border-width: 3px;
  }
  
  .vote-btn svg {
    width: 32px;
    height: 32px;
    stroke-width: 3;
  }
  
  .vote-count {
    font-size: 38px;
    font-weight: 700;
    min-width: 60px;
  }
  
  /* Bubble detail text - MUCH BIGGER on mobile */
  .bubble-info {
    padding: 28px 24px;
  }
  
  .bubble-info h2 {
    font-size: 26px;
    margin-bottom: 16px;
    font-weight: 700;
  }
  
  .bubble-info p {
    font-size: 18px;
    line-height: 1.7;
    margin-bottom: 20px;
  }
  
  .bubble-meta {
    gap: 20px;
  }
  
  .bubble-time {
    font-size: 16px;
  }
  
  .bubble-detail h3 {
    font-size: 26px;
  }
  
  .bubble-detail p {
    font-size: 18px;
    line-height: 1.7;
  }
  
  /* Better media preview on mobile */
  .upload-preview img,
  .upload-preview video {
    max-height: 350px;
  }
  
  .bubble-media {
    min-height: 200px;
  }
  
  .bubble-media img,
  .bubble-media video {
    max-height: 450px;
  }
  
  .remove-media {
    width: 44px;
    height: 44px;
    font-size: 26px;
  }
}

/* Small phones */
@media (max-width: 380px) {
  .hint-bar {
    font-size: 15px;
    padding: 14px 18px;
  }
  
  .stats-bar {
    padding: 8px 14px;
  }
  
  .stat-value {
    font-size: 18px;
  }
  
  .stat-label {
    font-size: 12px;
  }
}

/* ===========================================
   SUGGESTIONS / FEEDBACK
   =========================================== */

.suggestions-intro {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  text-align: center;
  font-weight: 500;
}

.suggestion-form {
  margin-bottom: 28px;
}

.suggestions-divider {
  text-align: center;
  margin: 32px 0 24px;
  position: relative;
}

.suggestions-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}

.suggestions-divider span {
  position: relative;
  background: var(--bg-card);
  padding: 0 16px;
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.suggestions-list {
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.suggestion-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}

.suggestion-item:hover {
  border-color: rgba(0, 245, 212, 0.3);
}

.suggestion-vote {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  min-width: 50px;
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.suggestion-vote:active {
  transform: scale(0.95);
}

.suggestion-vote.voted {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg-dark);
  box-shadow: 0 0 15px var(--accent-glow);
}

.vote-icon {
  font-size: 20px;
  font-weight: 700;
}

.vote-number {
  font-size: 16px;
  font-weight: 700;
}

.suggestion-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.suggestion-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.suggestion-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.suggestion-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.suggestions-loading,
.suggestions-error,
.no-suggestions {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 15px;
}

/* Mobile suggestions styling */
@media (max-width: 768px) {
  .btn-feedback {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
  
  .suggestions-intro {
    font-size: 18px;
    margin-bottom: 28px;
  }
  
  .suggestion-item {
    padding: 18px;
    gap: 18px;
  }
  
  .suggestion-vote {
    min-width: 60px;
    padding: 12px 14px;
  }
  
  .vote-icon {
    font-size: 24px;
  }
  
  .vote-number {
    font-size: 18px;
  }
  
  .suggestion-title {
    font-size: 18px;
    font-weight: 600;
  }
  
  .suggestion-description {
    font-size: 16px;
  }
  
  .suggestion-time {
    font-size: 14px;
  }
}

/* Location pin marker */
.location-pin {
  background: transparent !important;
  border: none !important;
}

.location-pin-inner {
  color: var(--hot);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
  animation: bounce 0.5s ease;
}

.location-pin-inner svg {
  width: 40px;
  height: 40px;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Prevent map click through modals */
.modal.active ~ #map {
  pointer-events: none;
}

/* Welcome Tutorial */
.welcome-tutorial {
  max-width: 500px;
  text-align: center;
  padding: 50px 40px 40px;
}

.welcome-icon {
  font-size: 70px;
  color: var(--accent);
  margin-bottom: 24px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

.welcome-tutorial h1 {
  font-size: 32px;
  font-weight: 300;
  margin-bottom: 12px;
  line-height: 1.2;
}

.welcome-tutorial h1 strong {
  font-weight: 600;
  color: var(--accent);
}

.welcome-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 35px;
}

.tutorial-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
  text-align: left;
}

.tutorial-step {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.step-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.step-text {
  font-size: 16px;
  color: var(--text-primary);
  line-height: 1.5;
  font-weight: 400;
}

.welcome-footer {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 28px;
  font-style: italic;
  font-weight: 500;
}

.welcome-btn {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), var(--hot));
  color: var(--bg-dark);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(0, 245, 212, 0.3);
}

.welcome-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 245, 212, 0.4);
}

.welcome-btn:active {
  transform: translateY(0);
}

/* Mobile adjustments for welcome */
@media (max-width: 480px) {
  .welcome-tutorial {
    padding: 40px 24px 30px;
  }
  
  .welcome-icon {
    font-size: 70px;
  }
  
  .welcome-tutorial h1 {
    font-size: 30px;
  }
  
  .welcome-subtitle {
    font-size: 18px;
  }
  
  .tutorial-step {
    padding: 18px;
  }
  
  .step-icon {
    font-size: 34px;
  }
  
  .step-text {
    font-size: 17px;
    font-weight: 500;
  }
  
  .welcome-footer {
    font-size: 16px;
    font-weight: 600;
  }
  
  .welcome-btn {
    padding: 20px;
    font-size: 19px;
    font-weight: 700;
  }
}


/* ═══════════ APP FEEL — PWA physics & touch polish ═══════════ */

/* No web-page physics: no rubber-band bounce, no gray tap flash,
   no accidental text selection or long-press callouts on UI chrome. */
html, body {
  overscroll-behavior: none;
  height: 100%;
}
* { -webkit-tap-highlight-color: transparent; }
a, button, input, select, textarea, .leaflet-container {
  touch-action: manipulation;   /* no double-tap-zoom delay on controls */
}
.header, .hint-bar, .stats-bar, .vote-section, .welcome-tutorial,
.modal-header, .toast-container, .ios-install-hint {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Dynamic viewport: 100vh lies on iOS (URL bar / keyboard); dvh doesn't. */
@supports (height: 100dvh) {
  body, #map { height: 100dvh; }
}

/* Respect the notch / home indicator in standalone mode. */
.header { padding-top: max(12px, env(safe-area-inset-top)); }
.stats-bar { margin-bottom: env(safe-area-inset-bottom); }
.modal-content { padding-bottom: max(20px, env(safe-area-inset-bottom)); }

/* Instant touch feedback on everything tappable. */
button:active,
.vote-btn:active,
.btn-submit:active,
.btn-primary:active,
.btn-locate:active,
.btn-feedback:active {
  transform: scale(0.94);
  transition: transform 0.06s ease;
}

/* iOS install hint */
.ios-install-hint {
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 3000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 24px var(--accent-glow);
  animation: hintUp 0.35s ease;
}
@keyframes hintUp {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.ios-hint-icon { color: var(--accent); font-size: 26px; }
.ios-hint-text { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.ios-hint-text strong { font-size: 14px; }
.ios-hint-text span { color: var(--text-secondary); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ios-hint-text svg { width: 16px; height: 16px; color: var(--accent); }
.ios-hint-close {
  background: none; border: none;
  color: var(--text-muted);
  font-size: 24px; line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
}

/* The hidden attribute must beat the display:flex above — without this the
   hint ignores JS show/hide entirely. */
.ios-install-hint[hidden] { display: none !important; }
