:root {
  --coral: #FF5A36;
  --coral-dark: #E8441F;
  --coral-light: #FFF5F2;
  --amber: #FCC438;
  --blue: #2F74DA;
  --blue-light: #E8F0FD;
  --ink: #1A1A1A;
  --ink-soft: #3D3D3D;
  --ink-muted: #6B6B6B;
  --ink-subtle: #9C9C9C;
  --bg: #FBF7F0;
  --bg-alt: #F5F0E6;
  --surface: #FFFFFF;
  --border: #E8E3D9;
  --border-strong: #D4CCBB;
  --success: #2F9E44;
  --danger: #E74C3C;

  --shadow-sm: 0 1px 2px rgba(26,26,26,0.06);
  --shadow-md: 0 4px 16px rgba(26,26,26,0.08), 0 1px 3px rgba(26,26,26,0.06);
  --shadow-lg: 0 12px 32px rgba(26,26,26,0.14), 0 2px 6px rgba(26,26,26,0.08);
  --shadow-xl: 0 24px 48px rgba(26,26,26,0.18);

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 999px;

  --t-fast: 150ms;
  --t-normal: 250ms;

  --panel-w: 380px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
p { margin: 0; }
button { font-family: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- map ---------- */
#map { position: absolute; inset: 0; z-index: 1; background: #e5e0d6; }

.leaflet-container { font: inherit; }
.leaflet-popup-content-wrapper { border-radius: var(--r-lg); padding: 0; overflow: hidden; box-shadow: var(--shadow-lg); }
.leaflet-popup-content { margin: 0; width: 240px !important; }
.leaflet-popup-tip { box-shadow: var(--shadow-md); }

/* ---------- topbar ---------- */
#topbar {
  position: absolute;
  top: 16px;
  left: 16px;
  right: calc(var(--panel-w) + 32px);
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 16px;
  pointer-events: none;
}
#topbar > * { pointer-events: auto; }

.brand {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  padding: 8px 14px;
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-md);
  color: var(--coral);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.brand-name { color: var(--ink); font-size: 1rem; }

.ticker {
  background: var(--surface);
  padding: 8px 14px;
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-md);
  font-size: 0.82rem;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 34px;
  transition: opacity var(--t-normal);
}
.ticker:empty { opacity: 0; }
.ticker .tick-item { display: inline-flex; gap: 4px; align-items: center; }
.ticker .tick-item strong { color: var(--ink); font-weight: 700; }
.ticker .tick-sep { color: var(--ink-subtle); }

#user-box {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  padding: 5px 6px 5px 6px;
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-md);
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-weight: 600;
}
#user-box:empty { display: none; }
#user-box .logout-btn {
  background: var(--bg);
  color: var(--ink-muted);
  border: 0;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  cursor: pointer;
  transition: background var(--t-fast);
}
#user-box .logout-btn:hover { background: var(--border); color: var(--ink); }

/* ---------- floating action button ---------- */
.fab {
  position: absolute;
  left: 16px;
  bottom: 24px;
  z-index: 500;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-soft);
  border: 0;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--t-fast), color var(--t-fast);
}
.fab:hover { transform: scale(1.05); color: var(--blue); }
.fab:active { transform: scale(0.95); }

/* ---------- panel ---------- */
.panel {
  position: absolute;
  top: 16px;
  right: 16px;
  bottom: 16px;
  width: var(--panel-w);
  z-index: 400;
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.panel-grip { display: none; }

.panel-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px 24px 12px;
}

.panel-view.app-view:not([hidden]) { animation: view-in 200ms ease; }
@keyframes view-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-meta {
  font-size: 0.75rem;
  color: var(--ink-subtle);
  margin: 12px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* ---------- bottom nav ---------- */
.panel-nav {
  display: flex;
  gap: 4px;
  padding: 8px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}
.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  background: transparent;
  border: 0;
  border-radius: var(--r-md);
  color: var(--ink-muted);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
  position: relative;
}
.nav-btn:hover { background: var(--bg); }
.nav-btn.active {
  color: var(--coral);
  background: var(--coral-light);
}
.nav-btn.active::after {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--coral);
  border-radius: 0 0 3px 3px;
}
.nav-icon { font-size: 1.25rem; line-height: 1; }
.nav-label { letter-spacing: 0.02em; }

/* ---------- auth hero ---------- */
.auth-hero { margin-bottom: 20px; }
.auth-hero h2 {
  font-size: 1.75rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin-bottom: 8px;
}
.auth-hero .accent { color: var(--coral); }
.hero-sub { color: var(--ink-muted); font-size: 0.95rem; }

/* ---------- tabs (auth) ---------- */
.tab-switcher {
  display: flex;
  background: var(--bg);
  border-radius: var(--r-md);
  padding: 4px;
  margin-bottom: 16px;
}
.tab {
  flex: 1;
  padding: 8px 12px;
  background: transparent;
  border: 0;
  border-radius: var(--r-sm);
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all var(--t-fast);
}
.tab.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 12px; }

.field { display: flex; flex-direction: column; gap: 4px; }
.field > span:first-child { font-size: 0.8rem; font-weight: 600; color: var(--ink-soft); }

input[type=email], input[type=password], input[type=text], input[type=search], textarea {
  padding: 10px 12px;
  font-size: 0.95rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-family: inherit;
  background: var(--surface);
  color: var(--ink);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  width: 100%;
}
input:focus, textarea:focus {
  outline: 0;
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(255,90,54,0.15);
}
textarea { resize: vertical; min-height: 44px; }

.hint { font-size: 0.75rem; color: var(--ink-subtle); }
.char-count { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- buttons ---------- */
.btn {
  padding: 10px 16px;
  border: 0;
  border-radius: var(--r-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary {
  background: var(--coral);
  color: white;
  box-shadow: 0 4px 12px rgba(255,90,54,0.35);
}
.btn-primary:hover:not(:disabled) { background: var(--coral-dark); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(255,90,54,0.4); }
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary.success { background: var(--success); box-shadow: 0 4px 12px rgba(47,158,68,0.35); }
.btn-lg { padding: 12px 20px; font-size: 1rem; }

/* ---------- file drop ---------- */
.file-drop {
  display: block;
  position: relative;
  border: 2px dashed var(--border-strong);
  border-radius: var(--r-lg);
  padding: 18px;
  background: var(--bg);
  cursor: pointer;
  transition: all var(--t-fast);
  text-align: center;
}
.file-drop:hover { border-color: var(--coral); background: var(--coral-light); }
.file-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-drop-inner { display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; }
.file-drop-icon { font-size: 1.75rem; }
.file-drop-text { font-weight: 600; color: var(--ink-soft); }
.file-drop-hint { font-size: 0.75rem; color: var(--ink-subtle); }

.preview {
  max-width: 100%;
  max-height: 180px;
  border-radius: var(--r-md);
  display: block;
  margin: 0 auto;
  box-shadow: var(--shadow-sm);
  animation: pop 200ms cubic-bezier(.34,1.56,.64,1);
}
@keyframes pop { 0% { transform: scale(0.92); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* ---------- location hint ---------- */
.location-hint {
  font-size: 0.85rem;
  color: var(--ink-muted);
  background: var(--bg);
  padding: 8px 12px;
  border-radius: var(--r-md);
  line-height: 1.4;
}
.location-hint.ready { color: var(--success); background: #E8F5EC; font-weight: 500; }

.warning {
  font-size: 0.82rem;
  color: #974747;
  background: #FDEEEB;
  border: 1px solid #F5C9C0;
  padding: 10px 12px;
  border-radius: var(--r-md);
  line-height: 1.4;
}

/* ---------- snapshot feed list ---------- */
.snap-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.snap-item {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--t-fast);
  align-items: center;
}
.snap-item:hover { background: var(--bg); }
.snap-thumb {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  background: var(--border);
  object-fit: cover;
  flex-shrink: 0;
}
.snap-body { flex: 1; min-width: 0; }
.snap-head { display: flex; align-items: baseline; gap: 6px; }
.snap-user { font-weight: 700; color: var(--ink); font-size: 0.88rem; }
.snap-time { color: var(--ink-subtle); font-size: 0.72rem; }
.snap-caption {
  color: var(--ink-soft);
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.snap-likes { font-size: 0.78rem; color: var(--ink-muted); display: flex; align-items: center; gap: 3px; }
.snap-item.empty {
  padding: 24px 12px;
  border: 1px dashed var(--border-strong);
  justify-content: center;
  color: var(--ink-muted);
  font-size: 0.9rem;
  cursor: default;
  flex-direction: column;
  text-align: center;
  gap: 6px;
}
.snap-item.empty:hover { background: transparent; }
.snap-item.empty .empty-emoji { font-size: 1.6rem; }

.badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-live { background: #FDE8E3; color: var(--coral); }
.pulse-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--coral);
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.5); }
}

/* ---------- avatars (generative, hash-based) ---------- */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  border-radius: 50%;
  flex-shrink: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.18);
  letter-spacing: -0.02em;
  box-shadow:
    inset 0 -3px 6px rgba(0,0,0,0.12),
    inset 0 2px 4px rgba(255,255,255,0.18),
    0 2px 6px rgba(0,0,0,0.14);
  user-select: none;
  position: relative;
  overflow: hidden;
}
.avatar::after {
  content: '';
  position: absolute;
  top: 6%;
  left: 12%;
  width: 36%;
  height: 22%;
  border-radius: 50%;
  background: rgba(255,255,255,0.32);
  filter: blur(1px);
  pointer-events: none;
}
.avatar-xs { width: 22px; height: 22px; font-size: 0.7rem; }
.avatar-sm { width: 28px; height: 28px; font-size: 0.8rem; }
.avatar-md { width: 40px; height: 40px; font-size: 1rem; }
.avatar-lg { width: 52px; height: 52px; font-size: 1.2rem; }

/* ---------- search + people list ---------- */
.search-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: var(--r-md);
  border: 1.5px solid transparent;
  transition: all var(--t-fast);
  color: var(--ink-muted);
}
.search-input:focus-within {
  border-color: var(--coral);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 0 0 3px rgba(255,90,54,0.12);
}
.search-input input {
  flex: 1;
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  outline: 0;
  font-size: 0.95rem;
  box-shadow: none !important;
}

.people-list { display: flex; flex-direction: column; gap: 4px; }
.user-item {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: var(--r-md);
  align-items: center;
  transition: background var(--t-fast);
}
.user-item:hover { background: var(--bg); }
.user-body { flex: 1; min-width: 0; }
.user-name { font-weight: 700; font-size: 0.92rem; color: var(--ink); }
.user-meta { font-size: 0.76rem; color: var(--ink-muted); }
.follow-btn {
  padding: 6px 14px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--coral);
  background: var(--coral);
  color: white;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all var(--t-fast);
  min-width: 86px;
}
.follow-btn:hover:not(:disabled) { background: var(--coral-dark); border-color: var(--coral-dark); transform: translateY(-1px); }
.follow-btn.following {
  background: transparent;
  color: var(--ink-muted);
  border-color: var(--border-strong);
}
.follow-btn.following:hover:not(:disabled) {
  background: #FDEEEB;
  color: var(--danger);
  border-color: var(--danger);
  transform: none;
}
.follow-btn:disabled { opacity: 0.5; cursor: wait; }

.people-empty {
  text-align: center;
  padding: 32px 12px;
  color: var(--ink-muted);
  font-size: 0.88rem;
}
.people-empty .empty-emoji { font-size: 2rem; display: block; margin-bottom: 8px; }

/* ---------- popup ---------- */
.popup-card { font-size: 0.85rem; overflow: hidden; border-radius: inherit; }
.popup-card img { display: block; width: 100%; max-height: 180px; object-fit: cover; }
.popup-body { padding: 10px 12px; }
.popup-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.popup-user { font-weight: 700; color: var(--ink); font-size: 0.88rem; }
.popup-time { color: var(--ink-subtle); font-size: 0.72rem; margin-left: auto; }
.popup-caption { color: var(--ink-soft); margin-top: 2px; line-height: 1.3; }
.popup-actions { display: flex; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.like-btn {
  display: inline-flex; align-items: center; gap: 4px;
  background: transparent; border: 0; cursor: pointer;
  padding: 4px 8px; border-radius: var(--r-pill);
  font-size: 0.85rem; color: var(--ink-muted);
  transition: all var(--t-fast);
}
.like-btn:hover { background: var(--bg); color: var(--coral); }
.like-btn.liked { color: var(--coral); font-weight: 600; }
.like-btn.just-liked .heart { animation: heart-pop 400ms ease; }
@keyframes heart-pop {
  0% { transform: scale(1); }
  30% { transform: scale(1.4); }
  60% { transform: scale(0.9); }
  100% { transform: scale(1.1); }
}

/* ---------- onboarding ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(26,26,26,0.55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fade-in var(--t-normal) ease;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.onboarding-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 36px 28px 24px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-xl);
  position: relative;
  animation: slide-up 350ms cubic-bezier(.16,1,.3,1);
}
@keyframes slide-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.onboarding-skip {
  position: absolute;
  top: 10px; right: 14px;
  background: transparent;
  border: 0;
  font-size: 1.5rem;
  color: var(--ink-subtle);
  cursor: pointer;
  width: 32px; height: 32px;
  line-height: 1;
  border-radius: 50%;
  transition: all var(--t-fast);
}
.onboarding-skip:hover { background: var(--bg); color: var(--ink); }

.onboarding-slides { min-height: 220px; position: relative; }
.slide { display: none; animation: slide-in var(--t-normal) ease; }
.slide.active { display: block; }
@keyframes slide-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: translateX(0); } }

.slide-art { font-size: 3.5rem; margin-bottom: 16px; animation: bounce-in 600ms cubic-bezier(.34,1.56,.64,1); }
@keyframes bounce-in {
  0% { opacity: 0; transform: scale(0.3); }
  60% { transform: scale(1.1); }
  100% { opacity: 1; transform: scale(1); }
}
.slide h2 { font-size: 1.5rem; letter-spacing: -0.02em; margin-bottom: 10px; }
.slide p { color: var(--ink-muted); margin-bottom: 20px; }

.onboarding-dots { display: flex; justify-content: center; gap: 8px; margin-bottom: 20px; }
.onboarding-dots .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border-strong);
  transition: all var(--t-normal);
}
.onboarding-dots .dot.active { background: var(--coral); width: 24px; border-radius: var(--r-pill); }

#onboarding-next { width: 100%; }

/* ---------- toasts ---------- */
.toasts {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  background: var(--ink);
  color: white;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  font-size: 0.88rem;
  box-shadow: var(--shadow-lg);
  animation: toast-in 250ms cubic-bezier(.16,1,.3,1);
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 90vw;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.leaving { animation: toast-out 200ms ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-12px); } }

/* ---------- map markers ---------- */

/* Snapshot markers (other users' pins) */
.geo-marker {
  width: 36px; height: 36px;
  background: var(--coral);
  border: 3px solid white;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: var(--shadow-md);
  position: relative;
}
.geo-marker.recent::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  border: 2px solid var(--coral);
  opacity: 0.5;
  animation: ring-pulse 2s ease-out infinite;
}
@keyframes ring-pulse {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.8); opacity: 0; }
}
.geo-marker .marker-initial {
  transform: rotate(45deg);
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* "You are here" — Snapchat-style little person with face */
.me-person {
  width: 48px;
  height: 64px;
  position: relative;
  animation: drop-in 400ms cubic-bezier(.34,1.56,.64,1);
}
@keyframes drop-in {
  0% { transform: translateY(-16px); opacity: 0; }
  60% { transform: translateY(2px); opacity: 1; }
  100% { transform: translateY(0); }
}
.me-head {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid white;
  box-shadow: 0 3px 8px rgba(0,0,0,0.22), inset 0 -3px 6px rgba(0,0,0,0.1);
  z-index: 3;
  overflow: hidden;
}
.me-head svg { width: 100%; height: 100%; display: block; }
.me-head::after {
  content: '';
  position: absolute;
  top: 8%;
  left: 18%;
  width: 30%;
  height: 20%;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  filter: blur(1px);
}
.me-body {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 38px;
  height: 30px;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  border: 3px solid white;
  border-top: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  z-index: 2;
}
.me-shadow {
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 6px;
  background: rgba(0,0,0,0.22);
  border-radius: 50%;
  filter: blur(3px);
  z-index: 1;
  animation: shadow-bob 2.5s ease-in-out infinite;
}
@keyframes shadow-bob {
  0%,100% { transform: translateX(-50%) scale(1); opacity: 0.22; }
  50% { transform: translateX(-50%) scale(1.18); opacity: 0.14; }
}

/* ---------- mobile (bottom sheet) ---------- */
@media (max-width: 768px) {
  :root { --panel-w: auto; }
  #topbar {
    top: 12px; left: 12px; right: 12px;
    gap: 8px;
  }
  .ticker { display: none; }
  .panel {
    top: auto;
    left: 12px; right: 12px; bottom: 12px;
    width: auto;
    max-height: 70vh;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
  }
  .panel-grip {
    display: block;
    width: 40px; height: 4px;
    background: var(--border-strong);
    border-radius: var(--r-pill);
    margin: 10px auto 4px;
  }
  .panel-content { padding: 12px 20px; }
  .panel-nav { border-radius: 0 0 var(--r-xl) var(--r-xl); }
  .fab {
    bottom: auto;
    top: calc(50% - 24px);
    right: 16px;
    left: auto;
  }
  .auth-hero h2 { font-size: 1.4rem; }
}

@media (max-height: 600px) {
  .panel-content { padding: 16px 20px 8px; }
  .auth-hero { margin-bottom: 12px; }
  .auth-hero h2 { font-size: 1.3rem; }
}
