/* =========================================================
   LE PARADIS DE L'OBSO — Design system "Sable & Soleil"
   Thème clair, warm cream, accents coucher de soleil
   ========================================================= */

:root {
  /* --- Palette claire: sable + coucher de soleil --- */
  --bg-0: #fbf5e9;     /* sable chaud */
  --bg-1: #fdf9ef;     /* crème légère */
  --bg-2: #fff8e8;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-solid: #ffffff;
  --surface-raised: #ffffff;
  --surface-tint: #fff1e2;
  --border: rgba(22, 18, 10, 0.09);
  --border-strong: rgba(22, 18, 10, 0.16);

  /* Sunset / palm (accents, restent chauds) */
  --coral: #f56565;
  --sunset: #ff7f57;
  --mango: #e99000;       /* plus foncé pour lisibilité sur fond clair */
  --palm: #14b8a6;
  --lagoon: #0284c7;
  --orchid: #a855f7;
  --berry: #e11d48;

  --primary: var(--coral);
  --primary-2: var(--sunset);
  --primary-grad: linear-gradient(135deg, #ff6b6b 0%, #ff8c5a 55%, #f59e0b 100%);
  --palm-grad: linear-gradient(135deg, #14b8a6 0%, #0ea5e9 100%);
  --sunset-grad: linear-gradient(180deg, #ffedd5 0%, #fdba74 40%, #fb923c 70%, #ef4444 100%);

  /* Text */
  --text: #1c1917;          /* presque noir, très lisible */
  --text-2: #44403c;        /* stone */
  --text-muted: #78716c;
  --text-dim: #a8a29e;

  /* States */
  --danger: #dc2626;
  --success: #059669;
  --warning: #d97706;

  /* Radii / shadows */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(22, 18, 10, 0.05), 0 2px 8px rgba(22, 18, 10, 0.04);
  --shadow-md: 0 4px 12px rgba(22, 18, 10, 0.06), 0 10px 24px rgba(22, 18, 10, 0.08);
  --shadow-lg: 0 12px 30px rgba(22, 18, 10, 0.10), 0 24px 60px rgba(22, 18, 10, 0.12);
  --shadow-colored: 0 10px 30px rgba(245, 101, 101, 0.25);

  /* Spacing */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;

  /* Type */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Fraunces', 'Playfair Display', Georgia, serif;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 140ms;
  --t: 240ms;
  --t-slow: 420ms;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg-0);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

/* Ambient warm glow */
body::before {
  content: '';
  position: fixed;
  inset: -10vh -10vw;
  background:
    radial-gradient(55vh 55vh at 85% -5%, rgba(255, 154, 86, 0.28), transparent 60%),
    radial-gradient(50vh 50vh at 10% 5%, rgba(255, 206, 107, 0.22), transparent 60%),
    radial-gradient(60vh 60vh at 0% 100%, rgba(20, 184, 166, 0.10), transparent 55%),
    radial-gradient(70vh 70vh at 100% 90%, rgba(244, 114, 182, 0.10), transparent 60%);
  z-index: -1;
  pointer-events: none;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.015em; line-height: 1.15; color: var(--text); }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); }
h3 { font-size: 1.15rem; }
.eyebrow { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--primary); }
.muted { color: var(--text-muted); }

/* ---------- Buttons ---------- */
.btn {
  --_bg: var(--surface-solid);
  --_color: var(--text);
  --_border: var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  border: 1px solid var(--_border);
  background: var(--_bg);
  color: var(--_color);
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }

.btn-primary {
  --_bg: var(--primary-grad);
  --_color: #fff;
  --_border: transparent;
  font-weight: 600;
  box-shadow: var(--shadow-colored), inset 0 1px 0 rgba(255,255,255,0.35);
}
.btn-primary:hover { box-shadow: 0 14px 40px rgba(245, 101, 101, 0.35), inset 0 1px 0 rgba(255,255,255,0.35); }

.btn-secondary { --_bg: var(--bg-2); --_border: var(--border); }
.btn-secondary:hover { --_bg: var(--surface-tint); }
.btn-outline   { --_bg: transparent; }
.btn-danger    { --_bg: #fef2f2; --_color: #b91c1c; --_border: #fecaca; }
.btn-danger:hover { --_bg: #fee2e2; }
.btn-ghost     { --_bg: transparent; --_border: transparent; padding: 8px 12px; box-shadow: none; }
.btn-ghost:hover { --_bg: rgba(22,18,10,0.05); box-shadow: none; }

.btn-icon {
  width: 40px; height: 40px; padding: 0;
  border-radius: var(--radius-full);
  --_bg: var(--surface-solid);
}
.btn-icon:hover { --_bg: var(--bg-2); }

.btn-sm { padding: 6px 12px; font-size: 0.82rem; }

.btn-link {
  background: none; border: 0; padding: 0;
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: text-decoration-color var(--t-fast);
  box-shadow: none;
}
.btn-link:hover { text-decoration-color: currentColor; }

/* ---------- Navbar ---------- */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-4) var(--s-8);
  background: rgba(253, 249, 239, 0.8);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.navbar-brand a {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  background: var(--primary-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.01em;
}
.navbar-left { display: flex; align-items: center; gap: var(--s-4); min-width: 0; }
.navbar-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
  white-space: nowrap;
}
.navbar-back:hover {
  background: var(--bg-1);
  border-color: var(--border-strong);
  color: var(--text);
  transform: translateX(-2px);
}
.navbar-user { display: flex; align-items: center; gap: var(--s-4); }
.user-greeting { color: var(--text-2); font-size: 0.9rem; }
.user-greeting strong { color: var(--text); font-weight: 600; }
.user-greeting-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  cursor: pointer;
  font: inherit;
  color: var(--text-2);
  transition: background var(--t-fast), border-color var(--t-fast);
}
.user-greeting-btn:hover {
  background: var(--bg-2);
  border-color: var(--border);
}
.user-edit-icon {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--t-fast);
}
.user-greeting-btn:hover .user-edit-icon { color: var(--primary); }
.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: var(--s-4); }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-4);
}
@media (max-width: 540px) {
  .form-row { grid-template-columns: 1fr; }
}
label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 6px;
}
input[type='text'], input[type='password'], input[type='email'],
input[type='tel'], input[type='url'], input[type='number'],
input[type='search'], select, textarea {
  width: 100%;
  padding: 11px 14px;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}
input::placeholder, textarea::placeholder { color: var(--text-dim); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(245, 101, 101, 0.15);
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%2378716c' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 34px;
}
textarea { resize: vertical; min-height: 90px; }
.form-actions { display: flex; justify-content: flex-end; gap: var(--s-3); margin-top: var(--s-5); }
.form-actions .btn-ghost {
  padding: 6px 10px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}
.form-actions .btn-ghost:hover { color: var(--text); background: var(--bg-2); }
.form-error { color: var(--danger); font-size: 0.85rem; min-height: 1.2em; margin-top: 4px; }

/* ---------- Cards / surfaces ---------- */
.card {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* ---------- Modals ---------- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(22, 18, 10, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: flex-start;
  justify-content: center;
  padding: var(--s-8) var(--s-4);
  overflow-y: auto;
  animation: fade-in var(--t) var(--ease);
}
.modal.active { display: flex; }
.modal-content {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: min(520px, 100%);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: slide-up var(--t-slow) var(--ease);
}
.modal-large { width: min(780px, 100%); }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-5) var(--s-6);
  border-bottom: 1px solid var(--border);
  background: var(--bg-1);
}
.modal-header h2 { font-size: 1.35rem; }
.modal-close {
  width: 34px; height: 34px;
  border-radius: var(--radius-full);
  font-size: 1.4rem;
  color: var(--text-muted);
  display: grid;
  place-items: center;
  transition: background var(--t-fast), color var(--t-fast);
}
.modal-close:hover { background: rgba(22,18,10,0.06); color: var(--text); }
.modal-body { padding: var(--s-6); }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-up { from { opacity: 0; transform: translateY(18px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ---------- Utility ---------- */
.loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: var(--s-4);
}
.loading::before {
  content: '';
  width: 12px; height: 12px;
  border: 2px solid rgba(22,18,10,0.15);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: var(--s-8) var(--s-4);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--bg-2);
  color: var(--text-2);
  border: 1px solid var(--border);
}
.badge-owner   { background: linear-gradient(135deg, #fef3c7, #fed7aa); color: #92400e; border-color: #fde68a; }
.badge-wish    { background: #faf5ff; color: #7e22ce; border-color: #e9d5ff; }
.badge-visited { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.badge-cuisine { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.badge-price   { background: #fff7ed; color: #b45309; border-color: #fed7aa; }

/* ---------- AUTH / LOGIN ---------- */
.auth-page {
  display: grid;
  place-items: center;
  padding: var(--s-6);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}
.auth-page::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(255,154,86,0.35), transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(20,184,166,0.18), transparent 50%);
  pointer-events: none;
  z-index: 0;
}
.auth-container {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--s-8);
  box-shadow: var(--shadow-lg);
}
.auth-header { text-align: center; margin-bottom: var(--s-6); }
.auth-header h1 {
  font-size: 2.3rem;
  background: var(--primary-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 6px;
}
.auth-header p { color: var(--text-muted); font-size: 0.95rem; }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  margin-bottom: var(--s-6);
}
.auth-tab {
  padding: 9px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-full);
  transition: all var(--t-fast) var(--ease);
}
.auth-tab.active {
  background: var(--primary-grad);
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow-colored);
}
.auth-form { display: none; }
.auth-form.active { display: block; animation: fade-in var(--t) var(--ease); }
.auth-form .btn-primary { width: 100%; padding: 12px; margin-top: 6px; }

/* ---------- DASHBOARD ---------- */
.dashboard-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--s-10) var(--s-6);
}
.dashboard-header { margin-bottom: var(--s-10); text-align: center; }
.dashboard-header h1 {
  margin-bottom: var(--s-2);
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
}
.dashboard-header h1 em {
  font-style: italic;
  background: var(--primary-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.dashboard-header p { color: var(--text-muted); font-size: 1.05rem; }

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s-5);
}
.app-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding: var(--s-6);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: transform var(--t) var(--ease), border-color var(--t), box-shadow var(--t);
  min-height: 220px;
  box-shadow: var(--shadow-sm);
  color: var(--text);
}
.app-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 100% 0%, var(--app-color, var(--primary)), transparent 55%);
  opacity: 0.10;
  transition: opacity var(--t);
  pointer-events: none;
}
.app-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.app-card:hover::before { opacity: 0.22; }
.app-card.disabled { opacity: 0.55; pointer-events: none; }
.app-icon {
  font-size: 2.4rem;
  width: 64px; height: 64px;
  display: grid; place-items: center;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.app-info h3 { font-size: 1.3rem; margin-bottom: 4px; }
.app-info p { color: var(--text-muted); font-size: 0.92rem; }
.app-arrow {
  position: absolute;
  top: var(--s-6);
  right: var(--s-6);
  color: var(--text-muted);
  font-size: 1.4rem;
  transition: transform var(--t), color var(--t);
}
.app-card:hover .app-arrow { transform: translateX(4px); color: var(--primary); }

/* ---------- CHANSON DU JOUR ---------- */
.chanson-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--s-8) var(--s-6);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: var(--s-3);
  transition: color var(--t-fast);
}
.back-link:hover { color: var(--primary); }
.chanson-header { margin-bottom: var(--s-8); text-align: center; }
.chanson-header h1 { margin-bottom: 6px; }
.chanson-header p { color: var(--text-muted); }

.week-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-4);
  margin-bottom: var(--s-8);
}
.week-navigation span {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.days-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s-5);
}
.day-column {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  min-height: 320px;
  box-shadow: var(--shadow-sm);
}
.day-title {
  font-size: 1.15rem;
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--border);
  background: var(--primary-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-align: center;
}
.songs-list { display: flex; flex-direction: column; gap: var(--s-3); flex: 1; }

.song-card {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: var(--s-3);
  padding: var(--s-3);
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  align-items: center;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.song-card:hover { background: var(--bg-2); border-color: var(--border-strong); }
.song-cover { width: 60px; height: 60px; object-fit: cover; border-radius: var(--radius-sm); }
.song-info { min-width: 0; }
.song-title { font-weight: 600; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-artist { font-size: 0.82rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-user { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
.song-links { display: flex; gap: 8px; margin-top: 4px; }
.song-link {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--surface-solid);
  color: var(--text-2);
  border: 1px solid var(--border);
}
.song-link.spotify { color: #1DB954; border-color: #1DB95440; }
.song-link.youtube { color: #dc2626; border-color: #dc262640; }
.song-actions { display: flex; flex-direction: column; gap: 4px; }
.song-action-btn {
  width: 30px; height: 30px;
  border-radius: var(--radius-full);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  font-size: 0.85rem;
  transition: background var(--t-fast);
}
.song-action-btn:hover { background: var(--bg-2); }
.song-action-btn.delete-btn:hover { background: #fee2e2; color: var(--danger); border-color: #fca5a5; }

.btn-add-song {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px dashed var(--border-strong);
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all var(--t-fast);
}
.btn-add-song:hover { background: var(--bg-2); border-color: var(--primary); color: var(--primary); }

/* Spotify search */
.search-container { position: relative; margin-bottom: var(--s-4); }
.search-results {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  max-height: 280px;
  overflow-y: auto;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 10;
}
.search-results.active { display: block; }
.search-result {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: var(--s-3);
  padding: var(--s-3);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast);
}
.search-result:last-child { border-bottom: 0; }
.search-result:hover { background: var(--bg-2); }
.search-result img { width: 48px; height: 48px; object-fit: cover; border-radius: var(--radius-xs); }
.search-result-title { font-weight: 500; font-size: 0.92rem; }
.search-result-artist { font-size: 0.8rem; color: var(--text-muted); }
.selected-song {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3);
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-md);
  margin-bottom: var(--s-4);
}
.selected-song img { width: 48px; height: 48px; border-radius: var(--radius-xs); object-fit: cover; }
.selected-info { flex: 1; }
.selected-info strong { display: block; }
.selected-info span { font-size: 0.82rem; color: var(--text-muted); }
.btn-clear-selection {
  width: 28px; height: 28px;
  border-radius: var(--radius-full);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  font-size: 1.1rem;
  display: grid; place-items: center;
}

/* ---------- BONNES ADRESSES ---------- */
.bonnes-adresses-page { overflow: hidden; height: 100vh; display: flex; flex-direction: column; background: var(--bg-1); }
.ba-main {
  display: grid;
  grid-template-columns: 420px 1fr;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
@media (max-width: 960px) {
  .ba-main { grid-template-columns: 1fr; }
  .ba-map-container { display: none; }
  .bonnes-adresses-page { height: auto; overflow: auto; }
}

.ba-sidebar {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--surface-solid);
  overflow: hidden;
}
.ba-sidebar-header {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-4) var(--s-3);
  border-bottom: 1px solid var(--border);
  background: var(--surface-solid);
}
.ba-add-btn {
  width: 100%;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  font-weight: 600;
}
.ba-add-plus {
  display: inline-grid;
  place-items: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  font-size: 0.95rem;
  line-height: 1;
  font-weight: 700;
}

.ba-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  padding: var(--s-3) var(--s-5);
  border-bottom: 1px solid var(--border);
  background: var(--surface-solid);
  flex-wrap: wrap;
}
.ba-toolbar-left {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  min-width: 0;
}
.ba-toolbar-left .back-link {
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: background var(--t-fast), color var(--t-fast);
}
.ba-toolbar-left .back-link:hover { color: var(--text); background: var(--bg-2); }
.ba-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ba-title h1 {
  font-size: 1.25rem;
  margin: 0;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.ba-count-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-2);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.ba-stats {
  display: flex;
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}
.stat {
  padding: 6px 14px;
  background: var(--surface-solid);
  text-align: center;
  cursor: pointer;
  transition: background var(--t-fast);
  min-width: 60px;
}
.stat:hover { background: var(--bg-2); }
.stat.active { background: linear-gradient(180deg, #fef3c7, #fed7aa); }
.stat.active .stat-value { color: #92400e; }
.stat-value { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; color: var(--text); line-height: 1; }
.stat-label { font-size: 0.62rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 3px; font-weight: 600; }

.search-wrap { position: relative; }
.search-wrap::before {
  content: '⌕';
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.15rem;
  pointer-events: none;
}
.search-wrap input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-1);
  color: var(--text);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.search-wrap input:hover { border-color: var(--border-strong); }
.search-wrap input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface-solid);
  box-shadow: 0 0 0 3px rgba(245,101,101,0.12);
}

.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; }
.chip {
  padding: 5px 12px;
  font-size: 0.8rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  background: var(--surface-solid);
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--t-fast);
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active {
  background: var(--primary-grad);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}

/* Top filter bar */
.ba-topbar {
  display: flex;
  flex-direction: column;
  background: var(--surface-solid);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 20;
}
.ba-topbar .ba-toolbar { border-bottom: 1px solid var(--border); background: transparent; }

.ba-filterbar {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-2) var(--s-5);
  background: var(--bg-1);
  min-width: 0;
}
.ba-filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.ba-filter-group-flex { flex: 1; min-width: 0; }
.ba-filter-label {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.ba-filterbar-divider {
  width: 1px;
  height: 22px;
  background: var(--border);
  flex-shrink: 0;
}
.ba-filterbar-spacer { flex: 1; }
.ba-filter-clear-all {
  background: none;
  border: 1px solid transparent;
  padding: 4px 10px;
  font-size: 0.75rem;
  color: var(--primary);
  cursor: pointer;
  font-weight: 500;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.ba-filter-clear-all:hover { background: var(--bg-2); border-color: var(--border); }

/* Tag picker (popover) */
.ba-tag-picker { position: relative; }
.ba-tag-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 12px;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  color: var(--text-2);
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
  max-width: 220px;
}
.ba-tag-trigger:hover { border-color: var(--primary); color: var(--text); }
.ba-tag-trigger[aria-expanded="true"] {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(245,101,101,0.12);
}
.ba-tag-trigger.has-value {
  background: var(--tag-color, var(--primary));
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}
.ba-tag-trigger-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--tag-color, var(--text-muted));
  flex-shrink: 0;
}
.ba-tag-trigger.has-value .ba-tag-trigger-dot { background: rgba(255,255,255,0.9); }
.ba-tag-trigger-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ba-tag-trigger-caret {
  font-size: 0.7rem;
  opacity: 0.6;
  transition: transform var(--t-fast);
}
.ba-tag-trigger[aria-expanded="true"] .ba-tag-trigger-caret { transform: rotate(180deg); }

.ba-tag-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 240px;
  max-width: 300px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg, 0 12px 28px rgba(0,0,0,0.12));
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: ba-pop 0.12s ease-out;
}
.ba-tag-panel[hidden] { display: none; }
@keyframes ba-pop {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ba-tag-panel-search { padding: 10px; border-bottom: 1px solid var(--border); }
.ba-tag-panel-search input {
  width: 100%;
  padding: 8px 10px;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-1);
  color: var(--text);
}
.ba-tag-panel-search input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface-solid);
}
.ba-tag-panel-list {
  max-height: 280px;
  overflow-y: auto;
  padding: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.ba-tag-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text);
  text-align: left;
  transition: background var(--t-fast);
}
.ba-tag-option:hover { background: var(--bg-2); }
.ba-tag-option.selected {
  background: var(--bg-2);
  font-weight: 600;
}
.ba-tag-option.selected::after {
  content: '✓';
  margin-left: auto;
  color: var(--primary);
  font-weight: 700;
}
.ba-tag-option-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--tag-color, var(--text-muted));
  flex-shrink: 0;
}
.ba-tag-option-all {
  color: var(--text-muted);
  font-style: italic;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  margin-bottom: 4px;
}
.ba-tag-option.is-hidden { display: none; }
.ba-tag-panel-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.ba-chip-row { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.ba-chip-row-scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 24px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 24px), transparent 100%);
  padding: 2px 24px 2px 12px;
  margin: -2px -12px -2px -12px;
}
.ba-chip-row-scroll::-webkit-scrollbar { height: 6px; }
.ba-chip-row-scroll::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

@media (max-width: 960px) {
  .ba-filterbar { flex-wrap: wrap; }
  .ba-filterbar-divider { display: none; }
  .ba-filter-group-flex { flex-basis: 100%; }
}

.chip-price {
  font-family: var(--font-display);
  font-weight: 600;
  min-width: 44px;
  justify-content: center;
  letter-spacing: 0.04em;
}
.chip-price.active {
  background: linear-gradient(180deg, #fef3c7, #fed7aa);
  color: #92400e;
  border-color: #f59e0b;
}

.chip-tag { padding-left: 10px; }
.chip-tag .chip-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--tag-color, var(--text-muted));
  flex-shrink: 0;
}
.chip-tag:hover {
  border-color: var(--tag-color, var(--primary));
  color: var(--text);
}
.chip-tag.active {
  background: var(--tag-color, var(--primary));
  border-color: var(--tag-color, var(--primary));
  color: #fff;
}
.chip-tag.active .chip-dot { background: rgba(255,255,255,0.9); }

.ba-list-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
}
.ba-list-wrap::before,
.ba-list-wrap::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 16px;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity var(--t-fast);
}
.ba-list-wrap::before { top: 0; background: linear-gradient(180deg, var(--bg-1), transparent); }
.ba-list-wrap::after  { bottom: 0; background: linear-gradient(0deg, var(--bg-1), transparent); }
.ba-list-wrap.can-scroll-up::before { opacity: 1; }
.ba-list-wrap.can-scroll-down::after { opacity: 1; }

.ba-list {
  height: 100%;
  overflow-y: auto;
  padding: var(--s-3);
  display: flex; flex-direction: column; gap: var(--s-2);
  scrollbar-width: auto;
  scrollbar-color: var(--border-strong) var(--bg-1);
  background: var(--bg-1);
}
.ba-list::-webkit-scrollbar { width: 10px; }
.ba-list::-webkit-scrollbar-track { background: var(--bg-1); }
.ba-list::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 5px;
  border: 2px solid var(--bg-1);
}
.ba-list::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

.resto-card {
  position: relative;
  padding: var(--s-4);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  box-shadow: var(--shadow-sm);
}
.resto-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.resto-card.highlighted {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(245,101,101,0.15);
}
.resto-card.is-mine::before {
  content: '';
  position: absolute;
  left: 0; top: 14px;
  width: 3px; height: calc(100% - 28px);
  border-radius: 2px;
  background: var(--primary-grad);
}
.resto-card-top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); margin-bottom: 4px; padding-right: 36px; }
.resto-card h3 { font-size: 1.05rem; font-family: var(--font-display); font-weight: 600; }
.resto-rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--mango);
  white-space: nowrap;
}
.resto-rating::before { content: '★'; font-size: 1rem; }
.resto-rating.no-rating { color: var(--text-dim); }
.resto-rating.no-rating::before { color: var(--text-dim); }
.resto-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s-2); }
.resto-address {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 4px;
}
.resto-address::before { content: '◉'; color: var(--text-dim); font-size: 0.7rem; }
.resto-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: var(--s-2); }
.resto-stats {
  display: flex;
  gap: var(--s-4);
  margin-top: var(--s-2);
  padding-top: var(--s-2);
  border-top: 1px solid var(--border);
  font-size: 0.74rem;
  color: var(--text-muted);
}
.resto-stats span { display: inline-flex; align-items: center; gap: 3px; }

.resto-quick-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 4px;
}
.quick-btn {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: var(--radius-full);
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: all var(--t-fast);
  box-shadow: var(--shadow-sm);
}
.quick-btn:hover { color: var(--primary); border-color: var(--primary); transform: scale(1.08); }
.quick-btn.active.wish { color: #fff; background: linear-gradient(135deg, #a855f7, #ec4899); border-color: transparent; }

.ba-map-container { position: relative; background: #e6ecd8; isolation: isolate; z-index: 0; }
#map { width: 100%; height: 100%; background: #e6ecd8; }
.leaflet-container { background: #e6ecd8 !important; font-family: var(--font-sans) !important; }
.leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.85) !important;
  color: var(--text-muted) !important;
  border-radius: var(--radius-xs) !important;
  padding: 2px 8px !important;
  font-size: 0.68rem !important;
}
.leaflet-control-attribution a { color: var(--primary) !important; }
.leaflet-control-zoom a {
  background: var(--surface-solid) !important;
  color: var(--text) !important;
  border: 1px solid var(--border-strong) !important;
}
.leaflet-control-zoom a:hover { background: var(--bg-2) !important; }

.map-popup { min-width: 180px; font-family: var(--font-sans); }
.map-popup strong { font-family: var(--font-display); font-size: 1rem; color: var(--text); }
.popup-rating { color: var(--mango); font-weight: 700; }
.popup-btn {
  margin-top: 8px;
  padding: 6px 14px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ff8c5a 55%, #f59e0b 100%);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 0.82rem;
  width: 100%;
  border: 0;
  box-shadow: 0 4px 12px rgba(245,101,101,0.25);
}
.leaflet-popup-content-wrapper {
  background: var(--surface-solid) !important;
  color: var(--text) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-lg) !important;
}
.leaflet-popup-tip { background: var(--surface-solid) !important; }

.resto-marker-wrap {
  display: grid; place-items: center;
}
.resto-marker {
  background: var(--primary-grad);
  width: 30px; height: 30px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: grid; place-items: center;
  border: 3px solid #fff;
  box-shadow: 0 4px 10px rgba(22,18,10,0.25);
}
.resto-marker::after {
  content: '';
  width: 8px; height: 8px;
  background: #fff;
  border-radius: 50%;
}
.resto-marker.wish { background: linear-gradient(135deg, #c084fc, #ec4899); }
.resto-marker.mine { background: linear-gradient(135deg, #fbbf24, #f97316); }
.resto-marker.visited { background: linear-gradient(135deg, #14b8a6, #0ea5e9); }

/* ---------- Restaurant Details modal ---------- */
.details-hero {
  position: relative;
  margin: calc(-1 * var(--s-6)) calc(-1 * var(--s-6)) var(--s-5);
  height: 220px;
  background: var(--sunset-grad);
  overflow: hidden;
}
.details-hero-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.details-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(22,18,10,0.75) 100%);
}
.details-hero-content {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: var(--s-5);
  display: flex; flex-direction: column; gap: var(--s-2);
  color: #fff;
}
.details-hero h2 { font-size: 1.9rem; margin-bottom: 0; color: #fff; }
.details-hero-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.details-hero-meta .badge {
  background: rgba(255,255,255,0.95);
  color: var(--text);
  border-color: rgba(255,255,255,0.4);
}
.details-hero-meta .badge-owner { background: linear-gradient(135deg, #fef3c7, #fed7aa); color: #92400e; }
.details-hero-meta .badge-wish { background: #faf5ff; color: #7e22ce; }

.details-section { margin-top: var(--s-6); }
.details-section h3 {
  font-size: 1rem;
  color: var(--text-2);
  margin-bottom: var(--s-3);
  display: flex; align-items: center; gap: 8px;
}
.details-section h3::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.details-info { display: flex; flex-direction: column; gap: 6px; }
.details-info p { font-size: 0.9rem; color: var(--text-2); display: flex; gap: 8px; align-items: baseline; }
.details-info p strong { color: var(--text-muted); font-weight: 600; min-width: 84px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }
.details-info a { color: var(--lagoon); word-break: break-all; text-decoration: underline; text-underline-offset: 3px; }
.details-info a:hover { color: var(--primary); }
.details-info .copy-btn {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  font-size: 0.7rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--t-fast);
}
.details-info .copy-btn:hover { color: var(--primary); border-color: var(--primary); }

.details-actions {
  display: flex; flex-wrap: wrap; gap: var(--s-2);
  padding: var(--s-4) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: var(--s-4) 0;
}
.details-actions .btn { padding: 8px 14px; font-size: 0.85rem; }

.details-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s-3); }
.tag-pill {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--bg-2);
}

.rating-block { display: flex; align-items: baseline; gap: 8px; }
.big-rating {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  color: var(--mango);
}
.big-rating-sub { color: var(--text-muted); font-size: 0.85rem; }

.reviews-list { display: flex; flex-direction: column; gap: var(--s-3); }
.review-item {
  padding: var(--s-3) var(--s-4);
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  position: relative;
}
.review-item.is-mine {
  background: linear-gradient(135deg, #fff7ed, #fef3c7);
  border-color: #fed7aa;
}
.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: 6px;
}
.review-header strong { font-weight: 700; color: var(--text); }
.review-rating { color: var(--mango); letter-spacing: 2px; font-size: 0.95rem; }
.review-dish {
  font-size: 0.85rem;
  color: var(--palm);
  margin-top: 4px;
  font-weight: 500;
}
.review-dish::before { content: '◇ '; }
.review-comment { font-size: 0.9rem; color: var(--text-2); margin-top: 6px; line-height: 1.55; }
.review-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.review-date { font-size: 0.72rem; color: var(--text-muted); }

.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--s-2);
}
.photo-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--border);
}
.photo-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform var(--t);
}
.photo-item:hover img { transform: scale(1.05); }
.photo-delete {
  position: absolute;
  top: 6px; right: 6px;
  width: 26px; height: 26px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.95);
  color: var(--danger);
  font-size: 1rem;
  display: grid; place-items: center;
  opacity: 0;
  transition: opacity var(--t-fast);
  box-shadow: var(--shadow-sm);
}
.photo-item:hover .photo-delete { opacity: 1; }
.photo-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 6px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
  color: #fff;
  font-size: 0.72rem;
}

.address-search { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.geocode-results {
  margin-top: 8px;
  display: flex; flex-direction: column; gap: 4px;
  max-height: 180px;
  overflow-y: auto;
}
.geocode-result {
  padding: 8px 12px;
  font-size: 0.85rem;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--t-fast);
}
.geocode-result:hover { background: var(--bg-2); border-color: var(--primary); }
.address-preview { margin-top: 6px; font-size: 0.82rem; color: var(--text-muted); }
.address-preview .success { color: var(--success); }

.tags-selector { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-checkbox {
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  background: var(--surface-solid);
  font-size: 0.82rem;
  transition: all var(--t-fast);
}
.tag-checkbox input { display: none; }
.tag-checkbox:has(input:checked) {
  background: color-mix(in srgb, var(--tag-color, var(--primary)) 18%, white);
  border-color: var(--tag-color, var(--primary));
  color: var(--text);
  font-weight: 600;
}

.star-rating { display: flex; gap: 4px; }
.star-rating .star {
  font-size: 1.8rem;
  color: #e5e7eb;
  cursor: pointer;
  transition: color var(--t-fast), transform var(--t-fast);
}
.star-rating .star:hover { transform: scale(1.1); }
.star-rating .star.active { color: var(--mango); text-shadow: 0 2px 8px rgba(233, 144, 0, 0.3); }

.photo-preview { margin-top: 8px; }
.photo-preview img { max-width: 200px; max-height: 200px; border-radius: var(--radius-sm); border: 1px solid var(--border); }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 100px);
  padding: 12px 22px;
  background: var(--text);
  color: var(--bg-0);
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 500;
  z-index: 1200;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: transform var(--t) var(--ease), opacity var(--t);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.success { background: var(--success); color: #fff; }
.toast.error { background: var(--danger); color: #fff; }

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(22, 18, 10, 0.92);
  align-items: center;
  justify-content: center;
  padding: var(--s-6);
  cursor: zoom-out;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); }

*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(22,18,10,0.15); border-radius: 4px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(22,18,10,0.25); }

.hidden { display: none !important; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

/* ---------- CLIC-CLAC ---------- */
.clicclac-page { background: var(--bg-1); min-height: 100vh; }
.clicclac-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--s-6) var(--s-5) var(--s-8);
}
.clicclac-header {
  margin-bottom: var(--s-6);
  text-align: center;
}
.clicclac-header .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 6px;
}
.clicclac-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin-bottom: 6px;
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 50%, #a855f7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.02em;
}
.clicclac-header p { color: var(--text-2); max-width: 560px; margin: 0 auto; }
.clicclac-header strong { color: var(--text); font-weight: 600; }

.clicclac-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--s-5);
  align-items: start;
}
@media (max-width: 900px) {
  .clicclac-layout { grid-template-columns: 1fr; }
}

.clicclac-stage {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-4);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.cc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-2);
}
.cc-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 8px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.cc-stat-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.cc-stat-value {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.cc-stat-time { color: var(--primary); }
.cc-stat-misses { color: var(--text-muted); }

.cc-arena {
  position: relative;
  width: 100%;
  max-width: 640px;
  aspect-ratio: 16 / 10;
  max-height: 400px;
  margin: 0 auto;
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 30% 20%, rgba(245,158,11,0.08), transparent 40%),
    radial-gradient(circle at 70% 80%, rgba(168,85,247,0.08), transparent 40%),
    linear-gradient(135deg, #1e1b2e 0%, #0f0d1a 100%);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  cursor: crosshair;
  user-select: none;
}
.cc-arena.is-finished { cursor: default; }

.cc-arena-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(15,13,26,0.82);
  backdrop-filter: blur(6px);
  z-index: 2;
  padding: var(--s-5);
}
.cc-arena-overlay[hidden] { display: none; }
.cc-overlay-content { text-align: center; color: #fff; max-width: 360px; }
.cc-overlay-content h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin-bottom: 8px;
  color: #fff;
}
.cc-overlay-content p {
  color: rgba(255,255,255,0.75);
  margin-bottom: var(--s-4);
  font-size: 0.95rem;
}

.cc-countdown {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 4px 20px rgba(245,158,11,0.5);
  z-index: 3;
  pointer-events: none;
}
.cc-countdown[hidden] { display: none; }
.cc-countdown-pop { animation: cc-pop 0.7s ease-out; }
@keyframes cc-pop {
  0% { transform: scale(0.4); opacity: 0; }
  40% { transform: scale(1.15); opacity: 1; }
  70% { transform: scale(1); }
  100% { transform: scale(1.2); opacity: 0; }
}

.cc-target {
  position: absolute;
  border: none;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, #fff 0%, #fde68a 20%, #f59e0b 50%, #dc2626 100%);
  box-shadow:
    0 0 0 3px rgba(255,255,255,0.15),
    0 0 24px rgba(245,158,11,0.6),
    0 4px 12px rgba(0,0,0,0.4);
  cursor: pointer;
  padding: 0;
  animation: cc-target-in 0.18s ease-out;
  transition: transform 0.08s;
}
.cc-target:hover { transform: scale(1.06); }
.cc-target:active { transform: scale(0.94); }
@keyframes cc-target-in {
  from { transform: scale(0.2); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.cc-target-pop { animation: cc-target-out 0.15s ease-in forwards !important; pointer-events: none; }
@keyframes cc-target-out {
  to { transform: scale(1.8); opacity: 0; }
}

.cc-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(239,68,68,0.35), transparent 60%);
  pointer-events: none;
  opacity: 0;
  z-index: 1;
}
.cc-flash-on { animation: cc-flash 0.24s ease-out; }
@keyframes cc-flash {
  0% { opacity: 0; }
  40% { opacity: 1; }
  100% { opacity: 0; }
}

.cc-foot {
  display: flex;
  justify-content: center;
  padding: 4px 0 0;
}
.cc-personal {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  color: var(--text-2);
}
.cc-personal-label { color: var(--text-muted); }
.cc-personal-value {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.cc-personal-rank {
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-2);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-2);
}

/* Leaderboard */
.clicclac-leaderboard {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-4);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: var(--s-5);
}
.cc-lb-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: var(--s-3);
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
}
.cc-lb-tab {
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.cc-lb-tab:hover { color: var(--text); }
.cc-lb-tab.active {
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.cc-lb-list[hidden] { display: none; }
.cc-lb-list-worst .cc-lb-time { color: #b45309; }
.cc-lb-worst-1 .cc-lb-rank { background: linear-gradient(135deg, #94a3b8, #475569); color: #fff; }
.cc-lb-worst-2 .cc-lb-rank,
.cc-lb-worst-3 .cc-lb-rank { background: var(--bg-2); color: var(--text-muted); }
.cc-lb-misses {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  background: var(--bg-2);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 500;
}
.cc-lb-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cc-lb-empty {
  padding: var(--s-4);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  background: var(--bg-1);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
}
.cc-lb-item {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  transition: background var(--t-fast);
}
.cc-lb-item:hover { background: var(--bg-2); }
.cc-lb-item.is-me {
  background: linear-gradient(90deg, rgba(245,101,101,0.08), transparent);
  font-weight: 600;
}
.cc-lb-item.is-me em {
  font-style: normal;
  font-size: 0.72rem;
  color: var(--primary);
  font-weight: 500;
}
.cc-lb-rank {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.cc-lb-rank-1 .cc-lb-rank { background: linear-gradient(135deg, #fde047, #f59e0b); color: #78350f; }
.cc-lb-rank-2 .cc-lb-rank { background: linear-gradient(135deg, #e5e7eb, #9ca3af); color: #1f2937; }
.cc-lb-rank-3 .cc-lb-rank { background: linear-gradient(135deg, #fdba74, #b45309); color: #fff; }
.cc-lb-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}
.cc-lb-time {
  font-family: var(--font-display);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--primary);
  font-size: 0.92rem;
}

/* Result modal */
.cc-result-content { width: min(460px, 100%); text-align: center; }
.cc-result-content .modal-body { padding: var(--s-6); }
.cc-result-crown {
  font-size: 3rem;
  animation: cc-crown 0.8s ease-out;
  margin-bottom: 8px;
}
@keyframes cc-crown {
  0% { transform: scale(0) rotate(-40deg); opacity: 0; }
  60% { transform: scale(1.15) rotate(8deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}
.cc-result-content h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin-bottom: var(--s-4);
}
.cc-result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-2);
  margin-bottom: var(--s-4);
}
.cc-result-card {
  padding: 12px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cc-result-main {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(245,158,11,0.08), rgba(239,68,68,0.06));
  border-color: rgba(245,158,11,0.3);
}
.cc-result-label {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
}
.cc-result-value {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.cc-result-main .cc-result-value {
  font-size: 2rem;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cc-result-flavor {
  color: var(--text-2);
  font-size: 0.92rem;
  margin-bottom: var(--s-4);
  min-height: 1.4em;
}

/* ---------- GLOUTONS (multiplayer) ---------- */
.gloutons-page {
  background: var(--bg-1);
  min-height: 100vh;
  overflow: hidden;
}

.gloutons-main {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0;
  height: calc(100vh - 64px);
  overflow: hidden;
}
@media (max-width: 900px) {
  .gloutons-main { grid-template-columns: 1fr; }
  .gl-side { display: none; }
}

.gl-arena-wrap {
  position: relative;
  overflow: hidden;
  background: #fdf6e3;
}
.gl-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

/* HUD top */
.gl-hud {
  position: absolute;
  top: var(--s-4);
  left: var(--s-4);
  display: flex;
  gap: 8px;
  z-index: 3;
}
.gl-hud-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-width: 64px;
  box-shadow: var(--shadow-sm);
}
.gl-hud-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
}
.gl-hud-value {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* Live top-5 */
.gl-live-lb {
  position: absolute;
  top: var(--s-4);
  right: var(--s-4);
  padding: 10px 12px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-width: 160px;
  z-index: 3;
  box-shadow: var(--shadow-sm);
}
.gl-live-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.gl-live-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gl-live-item {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-2);
}
.gl-live-item.is-me { color: var(--text); font-weight: 700; }
.gl-live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
}
.gl-live-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-live-mass { font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--primary); }

.gl-minimap {
  position: absolute;
  bottom: var(--s-4);
  right: var(--s-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  z-index: 3;
}

/* Powers */
.gl-powers {
  position: absolute;
  bottom: var(--s-4);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 3;
}
.gl-power-btn {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 16px 10px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.78rem;
  transition: border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
  min-width: 86px;
  overflow: hidden;
}
.gl-power-btn:hover { transform: translateY(-1px); }
.gl-power-btn.is-ready {
  color: var(--text);
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(245,101,101,0.15), var(--shadow-sm);
}
.gl-power-btn.is-active {
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
  color: #92400e;
  border-color: #f59e0b;
}
.gl-power-ico {
  font-size: 1.2rem;
  line-height: 1;
}
.gl-power-name {
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 0.86rem;
  color: inherit;
}
.gl-power-key {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 1px;
}
.gl-power-btn.is-ready .gl-power-key { color: var(--primary); }
.gl-power-btn.is-active .gl-power-key { color: #92400e; }
.gl-power-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--bg-2);
  overflow: hidden;
}
.gl-power-bar-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #ec4899);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.1s linear;
}

.gl-conn {
  position: absolute;
  bottom: var(--s-4);
  left: var(--s-4);
  padding: 6px 12px;
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-2);
  font-size: 0.82rem;
  z-index: 3;
  box-shadow: var(--shadow-sm);
}
.gl-conn.is-error { border-color: rgba(239,68,68,0.4); color: #991b1b; background: #fef2f2; }
.gl-conn[hidden] { display: none; }

/* Start / death overlay */
.gl-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  background: rgba(253, 246, 227, 0.78);
  backdrop-filter: blur(10px);
  padding: var(--s-4);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.gl-overlay[hidden] { display: none; }
.gl-overlay-card {
  width: 100%;
  max-width: 440px;
  max-height: 100%;
  overflow-y: auto;
  padding: var(--s-5);
  text-align: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(22,18,10,0.15);
  scrollbar-width: thin;
}
.gl-overlay-card h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.gl-overlay-card p {
  color: var(--text-2);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: var(--s-3);
  text-align: left;
}
.gl-overlay-card p strong { color: var(--text); font-weight: 600; }
.gl-overlay-card p em { color: var(--primary); font-style: normal; font-weight: 600; }

.gl-rules {
  list-style: none;
  margin: 0 0 var(--s-3);
  padding: 10px 12px;
  background: var(--bg-1);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}
.gl-rules[hidden] { display: none; }
.gl-rules li {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--text-2);
}
.gl-rule-key {
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 0.82rem;
  flex-shrink: 0;
}

.gl-overlay-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: var(--s-3);
}
.gl-overlay-stats[hidden] { display: none; }
.gl-overlay-stats > div {
  padding: 8px 10px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gl-overlay-stats span {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
}
.gl-overlay-stats strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

/* Side panel */
.gl-side {
  background: var(--surface-solid);
  border-left: 1px solid var(--border);
  padding: var(--s-5);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}
.gl-side-head .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 4px;
}
.gl-side-head h1 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}
.gl-side-sub { color: var(--text-muted); font-size: 0.9rem; }

.gl-mystats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.gl-mystat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.gl-mystat span {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
}
.gl-mystat strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.gl-lb h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: var(--s-3);
  color: var(--text);
  display: flex; align-items: center; gap: 6px;
}
.gl-lb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.gl-lb-empty {
  padding: var(--s-4);
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-1);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
  font-size: 0.88rem;
}
.gl-lb-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  color: var(--text-2);
  transition: background var(--t-fast);
}
.gl-lb-item:hover { background: var(--bg-2); }
.gl-lb-item.is-me {
  background: linear-gradient(90deg, rgba(245,158,11,0.12), transparent);
  font-weight: 600;
  color: var(--text);
}
.gl-lb-item.is-me em { font-style: normal; color: var(--primary); font-size: 0.72rem; font-weight: 500; }
.gl-lb-rank {
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--bg-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.gl-lb-rank-1 .gl-lb-rank { background: linear-gradient(135deg, #fde047, #f59e0b); color: #78350f; }
.gl-lb-rank-2 .gl-lb-rank { background: linear-gradient(135deg, #e5e7eb, #9ca3af); color: #1f2937; }
.gl-lb-rank-3 .gl-lb-rank { background: linear-gradient(135deg, #fdba74, #b45309); color: #fff; }
.gl-lb-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gl-lb-mass {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
