:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --primary-50: #f0f4f8;
  --primary-100: #d9e2ec;
  --primary-200: #bcccdc;
  --primary-300: #9fb3c8;
  --primary-500: #627d98;
  --primary-600: #486581;
  --primary-700: #334e68;
  --primary-800: #243b53;
  --primary-900: #102a43;
  --primary-950: #061626;
  --accent-50: #f0f5ff;
  --accent-100: #e5edff;
  --accent-200: #cddbfe;
  --accent-500: #667eea;
  --accent-700: #4c51bf;
  --ink: var(--primary-900);
  --ink-muted: #4b5563;
  --ink-faint: #6b7280;
  --accent: var(--accent-500);
  --accent-dark: var(--accent-700);
  --accent-glow: rgba(102, 126, 234, 0.14);
  --blue: #3b82f6;
  --green: #22c55e;
  --grey: #94a3b8;
  --red: #ef4444;
  --amber: #f59e0b;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.10), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100dvh;
  overflow-x: hidden;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
  background: var(--bg);
}

@media (min-width: 760px) {
  #app {
    max-width: 100%;
  }
}

/* Screens */
.screen {
  display: none;
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-h) + var(--safe-b) + 8px);
}

.screen.active { display: flex; flex-direction: column; }

#screen-landing.active { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 16px); }

/* Top bar */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--primary-900);
  color: #fff;
  border-bottom: 1px solid var(--primary-800);
}

.top-bar.compact { padding: 12px 16px; }

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

.brand-logo {
  width: 66px;
  height: 38px;
  object-fit: contain;
  display: block;
}

.brand-name {
  display: block;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.2;
}

.brand-sub {
  display: block;
  font-size: 11px;
  opacity: 0.6;
  font-weight: 400;
}

.top-title {
  flex: 1;
  text-align: center;
}

.top-title span:first-child {
  display: block;
  font-weight: 600;
  font-size: 15px;
}

.top-sub {
  font-size: 12px;
  opacity: 0.65;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.10);
  border: none;
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.10);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

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

.account-button {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 132px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.account-button span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--amber);
}

.account-dot.online {
  background: var(--green);
}

.ticket-badge, .nav-badge {
  background: var(--accent-500);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  min-width: 20px;
  text-align: center;
}

/* Home */
.home-hero {
  padding: 24px 20px 12px;
}

.home-hero h1 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 10px;
}

.home-lead {
  font-size: 15px;
  color: var(--ink-muted);
  line-height: 1.5;
}

.concept-card {
  margin: 0 16px 20px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}

.concept-card h2 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.concept-card p {
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.55;
}

.section-head {
  padding: 0 20px 10px;
}

.section-head h2 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.campaign-list {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.campaign-card {
  background: var(--surface);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 18px 20px;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow);
  font-family: var(--font);
  color: var(--ink);
  transition: transform 0.15s, box-shadow 0.15s;
  width: 100%;
}

.campaign-card:active {
  transform: scale(0.98);
}

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

.campaign-status {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-dark);
  background: var(--accent-glow);
  padding: 3px 8px;
  border-radius: 20px;
}

.campaign-end {
  font-size: 12px;
  color: var(--ink-faint);
}

.campaign-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.3;
}

.campaign-card p {
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.campaign-pois {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-faint);
}

.rules-link {
  display: block;
  margin: 20px auto 8px;
  background: none;
  border: none;
  color: var(--accent-dark);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 16px;
}

/* Rules */
.rules-content {
  padding: 20px;
}

.rules-content h2 {
  font-size: 18px;
  margin-bottom: 16px;
}

.rules-list {
  list-style: none;
  counter-reset: rules;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.rules-list li {
  counter-increment: rules;
  padding-left: 36px;
  position: relative;
  font-size: 15px;
  color: var(--ink-muted);
  line-height: 1.5;
}

.rules-list li::before {
  content: counter(rules);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  background: var(--accent-glow);
  color: var(--accent-dark);
  border-radius: 50%;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rules-note {
  background: var(--primary-50);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 13px;
  color: var(--primary-700);
}

/* Campaign page */
.campaign-page {
  padding: 16px 20px 24px;
}

.campaign-page h1 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 6px;
}

.campaign-tagline {
  font-size: 14px;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

.campaign-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

/* Landing legacy / shared */
.landing-hero {
  padding: 24px 20px 16px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-dark);
  margin-bottom: 6px;
}

.landing-hero h1 {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 8px;
}

.campaign-meta {
  font-size: 14px;
  color: var(--ink-muted);
}

.video-card {
  margin: 16px 0 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #111;
  box-shadow: var(--shadow);
  position: relative;
}

.video-card--portrait {
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
  aspect-ratio: 9 / 16;
}

.video-card--landscape {
  aspect-ratio: 1024 / 668;
  max-width: 100%;
}

.video-card video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #000;
}

.video-label {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

.steps-card {
  margin: 0 16px 20px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.steps-card h2 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
}

.steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--ink-muted);
}

.steps li span {
  width: 28px;
  height: 28px;
  background: var(--accent-glow);
  color: var(--accent-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.landing-cta {
  padding: 0 16px;
}

/* Buttons */
.btn-primary {
  background: var(--primary-900);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 24px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  transition: transform 0.15s, background 0.15s;
}

.btn-primary:active { transform: scale(0.98); background: var(--primary-950); }

.btn-lg { padding: 16px 24px; font-size: 16px; border-radius: 14px; }

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid #d1d5db;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 20px;
  cursor: pointer;
  width: 100%;
}

/* Map layout */
#screen-map.active {
  padding-bottom: 0;
  height: 100dvh;
  overflow: hidden;
}

.map-layout {
  position: relative;
  height: 52vh;
  min-height: 240px;
  flex-shrink: 0;
}

.map-container {
  width: 100%;
  height: 100%;
  z-index: 1;
}

.map-legend {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 500;
  background: rgba(255,255,255,0.95);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  display: flex;
  gap: 10px;
  box-shadow: var(--shadow);
}

.map-legend .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 3px;
}

.dot.blue { background: var(--blue); }
.dot.grey { background: var(--grey); }
.dot.green { background: var(--green); }

.poi-panel {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  margin-top: -12px;
  position: relative;
  z-index: 2;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
}

.poi-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 8px;
}

.poi-panel-head h2 {
  font-size: 15px;
  font-weight: 600;
}

.select-sm {
  font-family: var(--font);
  font-size: 13px;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
}

.poi-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 12px 8px;
  -webkit-overflow-scrolling: touch;
}

.poi-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
  border: 1.5px solid transparent;
}

.poi-item:active, .poi-item.selected {
  background: var(--accent-glow);
  border-color: var(--accent-200);
}

.poi-marker-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

.poi-marker-icon.todo { background: #f1f5f9; }
.poi-marker-icon.done { background: #dcfce7; }

.poi-item-body { flex: 1; min-width: 0; }

.poi-item-name {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.poi-item-addr {
  font-size: 12px;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.poi-item-meta {
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: 2px;
}

.poi-item-meta .validated {
  color: var(--green);
  font-weight: 600;
}

.poi-skeleton {
  height: 72px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.privacy-note {
  font-size: 11px;
  color: var(--ink-faint);
  text-align: center;
  padding: 8px 16px 12px;
}

/* Desktop map */
@media (min-width: 760px) {
  #screen-map.active {
    flex-direction: row;
    flex-wrap: wrap;
    height: calc(100dvh - var(--nav-h));
  }

  #screen-map .top-bar { width: 100%; }

  .map-layout {
    width: 60%;
    height: calc(100% - 56px);
  }

  .poi-panel {
    width: 40%;
    height: calc(100% - 56px);
    margin-top: 0;
    border-radius: 0;
  }
}

/* Drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 42, 67, 0.42);
  z-index: 900;
  backdrop-filter: blur(2px);
}

.drawer {
  position: fixed;
  bottom: calc(var(--nav-h) + var(--safe-b));
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  z-index: 950;
  padding: 12px 20px 24px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s ease;
}

@media (min-width: 760px) {
  .drawer {
    bottom: 24px;
    right: 24px;
    left: auto;
    transform: none;
    max-width: 360px;
    border-radius: var(--radius);
  }
}

@keyframes slideUp {
  from { transform: translateX(-50%) translateY(100%); }
  to { transform: translateX(-50%) translateY(0); }
}

@media (min-width: 760px) {
  @keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

.drawer-handle {
  width: 36px;
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  margin: 0 auto 16px;
}

@media (min-width: 760px) {
  .drawer-handle { display: none; }
}

.drawer-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--ink-faint);
  cursor: pointer;
  line-height: 1;
}

.drawer-body h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  padding-right: 32px;
}

.drawer-address {
  font-size: 14px;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.drawer-distance {
  font-size: 13px;
  color: var(--ink-faint);
  margin-bottom: 20px;
}

.upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--primary-900);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  padding: 16px;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.upload-btn:active { background: var(--primary-950); }

.upload-btn--video {
  margin-top: 10px;
  background: var(--primary-700);
  color: #fff;
}

.upload-btn--video:active { background: var(--primary-800); }

.drawer-media-state {
  margin: 14px 0 10px;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.4;
}

.ticket-media {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.ticket-media img,
.ticket-media video {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  background: #f1f5f9;
}

.ticket-placeholder {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border-radius: 8px;
  font-size: 24px;
}

.ticket-missing {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--amber);
  margin-top: 4px;
}

#success-preview-video {
  width: 100%;
  max-height: 200px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  background: #000;
}

.login-photo-preview video {
  width: 100%;
  max-height: 140px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  background: #000;
}

.btn-go {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  margin-bottom: 10px;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  font-family: var(--font);
}

.btn-go:active { background: #f8fafc; }

.search-panel {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.search-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #d1d5db;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 16px;
  margin-bottom: 12px;
  background: var(--surface);
}

#search-results {
  flex: 1;
  overflow-y: auto;
}

.poi-go-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 1px solid #d1d5db;
  border-radius: 50%;
  background: var(--surface);
  font-size: 18px;
  cursor: pointer;
  align-self: center;
  color: var(--primary-900);
  font-weight: 700;
}

.list-error, .list-hint, .list-more {
  padding: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-muted);
}

.login-photo-preview {
  margin-bottom: 16px;
  text-align: center;
}

.login-photo-preview img {
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.login-photo-preview p {
  font-size: 13px;
  color: var(--primary-700);
  font-weight: 600;
}

.modal-desc.highlight {
  color: var(--primary-700);
  font-weight: 500;
}

#screen-home.active { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 16px); }
#screen-campaign.active { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 16px); }
#screen-rules.active { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 16px); }
#screen-poi-search.active {
  padding-bottom: calc(var(--nav-h) + var(--safe-b));
  height: 100dvh;
  overflow: hidden;
}

/* Tickets */
.tickets-content {
  padding: 16px;
  flex: 1;
  overflow-y: auto;
}

.ticket-section h3 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.nok-section h3 { color: var(--amber); }

.ticket-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}

.ticket-card .ticket-media {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  width: 100%;
  flex-shrink: 0;
}

.ticket-card .ticket-media img,
.ticket-card .ticket-media video {
  width: 100%;
  height: auto;
  max-height: 220px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  background: #000;
}

.ticket-card-body { flex: 1; min-width: 0; }

.ticket-card-name {
  font-weight: 600;
  font-size: 14px;
}

.ticket-card-meta {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 2px;
}

.ticket-card.nok {
  border-left: 3px solid var(--amber);
}

.ticket-retry {
  margin-top: 8px;
  font-size: 13px;
  color: var(--primary-700);
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  padding: 0;
}

@media (min-width: 760px) {
  .ticket-card {
    flex-direction: row;
    align-items: flex-start;
  }

  .ticket-card .ticket-media {
    display: flex;
    width: auto;
  }

  .ticket-card .ticket-media img,
  .ticket-card .ticket-media video {
    width: 86px;
    height: 86px;
    aspect-ratio: 1;
  }
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-icon { font-size: 48px; margin-bottom: 12px; }

.empty-state p {
  color: var(--ink-muted);
  margin-bottom: 20px;
}

/* Bottom nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: var(--surface);
  border-top: 1px solid #e5e7eb;
  display: flex;
  z-index: 800;
}

@media (min-width: 760px) {
  .bottom-nav {
    max-width: 100%;
    height: 56px;
    padding-bottom: 0;
    border-top: 1px solid #e5e7eb;
    background: var(--surface);
  }

  .bottom-nav .nav-item { color: var(--ink-muted); }
  .bottom-nav .nav-item.active { color: var(--primary-900); }
  .screen { padding-bottom: calc(56px + var(--safe-b) + 16px); }
  #screen-map.active { height: 100dvh; padding-bottom: 0; }
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-muted);
  cursor: pointer;
  position: relative;
  padding-top: 6px;
}

.nav-item.active {
  color: var(--primary-900);
}

.nav-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 28px);
}

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(16, 42, 67, 0.52);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(4px);
}

@media (min-width: 760px) {
  .modal { align-items: center; }
}

.modal-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 28px 24px;
  width: 100%;
  max-width: 400px;
  animation: slideUp 0.25s ease;
}

.modal-card h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-desc {
  font-size: 14px;
  color: var(--ink-muted);
  margin-bottom: 20px;
}

.modal-icon { font-size: 40px; text-align: center; margin-bottom: 12px; }

.modal-card input[type="email"] {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #d1d5db;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 16px;
  margin-bottom: 12px;
}

.modal-card form .btn-primary { margin-bottom: 8px; }

.modal-cancel { width: 100%; justify-content: center; color: var(--ink-muted); margin-top: 4px; }

.account-full-btn {
  width: 100%;
  justify-content: center;
  margin-bottom: 8px;
}

.dev-link-box {
  background: #fef3c7;
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 16px;
}

.dev-label { font-size: 12px; color: #92400e; margin-bottom: 6px; }

.dev-link {
  font-size: 13px;
  color: #1d4ed8;
  word-break: break-all;
}

/* Success */
.success-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.6);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(6px);
}

.success-card {
  background: var(--surface);
  border-radius: 24px;
  padding: 32px 24px;
  text-align: center;
  max-width: 360px;
  width: 100%;
  animation: popIn 0.3s ease;
}

@keyframes popIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.success-check {
  width: 56px;
  height: 56px;
  background: var(--accent-glow);
  color: var(--accent-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  margin: 0 auto 16px;
}

.success-card h2 { font-size: 22px; margin-bottom: 16px; }

.success-card img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.success-poi { font-size: 14px; color: var(--ink-muted); }

.success-note {
  font-size: 13px;
  color: var(--amber);
  margin-top: 8px;
  padding: 8px 12px;
  background: #fffbeb;
  border-radius: 8px;
}

.success-tickets {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-dark);
  margin: 12px 0 20px;
}

.success-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.success-actions .btn-ghost {
  color: var(--ink-muted);
  background: none;
  width: 100%;
  justify-content: center;
}

/* Toast & upload */
.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + var(--safe-b) + 16px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 30px;
  font-size: 14px;
  z-index: 1200;
  max-width: 90%;
  text-align: center;
  animation: fadeIn 0.2s ease;
}

.upload-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.85);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateX(-50%) translateY(8px); } }

.hidden { display: none !important; }

/* Leaflet overrides */
.leaflet-control-zoom { border: none !important; box-shadow: var(--shadow) !important; border-radius: 10px !important; overflow: hidden; }
.leaflet-control-zoom a { border: none !important; color: var(--ink) !important; }
