/* Sadafaty · صدفاتي — design system (handoff Phase 1) applied to every screen */
:root {
  --font: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --glow: .8;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px;
  --r-xs: 6px; --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px; --r-pill: 999px;
  --ease-out: cubic-bezier(.2,.8,.2,1); --ease-spring: cubic-bezier(.34,1.56,.64,1);
  --dur-1: 160ms; --dur-2: 280ms; --dur-3: 480ms;
  --tabbar-h: calc(74px + env(safe-area-inset-bottom));
  /* light theme */
  --bg:#EEF4F9; --bar:#FFFFFF; --surface:#FFFFFF; --surface-2:#E3EDF5; --surface-glass: rgba(255,255,255,.82);
  --line: rgba(18,80,127,.12); --line-2: rgba(18,80,127,.22);
  --text:#0A2236; --text-2:#3A5469; --text-3:#526B80;
  --primary:#12507F; --on-primary:#FFFFFF; --accent:#0E8F89; --shark:#2C7DB8; --ring:#0E8F89;
  --coral:#F06A4A; --on-coral:#240A03;
  --gold:#C98A00; --gold-text:#8A5E00; --gold-bg: rgba(201,138,0,.12);
  --success:#1B8A5A; --success-bg: rgba(27,138,90,.12);
  --warning:#9A6418; --warning-bg: rgba(183,121,31,.14);
  --error:#C0392B; --error-bg: rgba(192,57,43,.1);
  --shadow: 0 8px 24px rgba(10,34,54,.12);
  --glow-c: transparent; --glow-soft: transparent; --g: 0;
  --map-filter: saturate(.8) hue-rotate(-4deg); --map-tint: transparent; --mk-ring: #fff;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg:#06121F; --bar:#08182A; --surface:#0B1F33; --surface-2:#10304A; --surface-glass: rgba(8,24,42,.72);
  --line: rgba(130,200,240,.13); --line-2: rgba(130,200,240,.24);
  --text:#E9F4FB; --text-2:#A3BCCF; --text-3:#7591A8;
  --primary:#38E1D9; --on-primary:#03201E; --accent:#38E1D9; --ring:#38E1D9;
  --coral:#FF7E5F; --on-coral:#1C0903;
  --gold:#FFC857; --gold-text:#FFC857; --gold-bg: rgba(255,200,87,.12);
  --success:#45C98E; --success-bg: rgba(27,138,90,.22);
  --warning:#E8AE4F; --warning-bg: rgba(183,121,31,.22);
  --error:#F27466; --error-bg: rgba(192,57,43,.24);
  --shadow: 0 10px 30px rgba(0,0,0,.45);
  --glow-c: rgba(56,225,217,.44); --glow-soft: rgba(56,225,217,.14); --g: 1;
  --map-filter: invert(1) hue-rotate(190deg) brightness(.92) contrast(.88) saturate(.55); --map-tint: rgba(4,30,60,.32); --mk-ring: #06121F;
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --bg:#06121F; --bar:#08182A; --surface:#0B1F33; --surface-2:#10304A; --surface-glass: rgba(8,24,42,.72);
  --line: rgba(130,200,240,.13); --line-2: rgba(130,200,240,.24);
  --text:#E9F4FB; --text-2:#A3BCCF; --text-3:#7591A8;
  --primary:#38E1D9; --on-primary:#03201E; --accent:#38E1D9; --ring:#38E1D9;
  --coral:#FF7E5F; --on-coral:#1C0903;
  --gold:#FFC857; --gold-text:#FFC857; --gold-bg: rgba(255,200,87,.12);
  --success:#45C98E; --success-bg: rgba(27,138,90,.22);
  --warning:#E8AE4F; --warning-bg: rgba(183,121,31,.22);
  --error:#F27466; --error-bg: rgba(192,57,43,.24);
  --shadow: 0 10px 30px rgba(0,0,0,.45);
  --glow-c: rgba(56,225,217,.44); --glow-soft: rgba(56,225,217,.14); --g: 1;
  --map-filter: invert(1) hue-rotate(190deg) brightness(.92) contrast(.88) saturate(.55); --map-tint: rgba(4,30,60,.32); --mk-ring: #06121F;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 400 15px/1.6 var(--font); -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar-h) + 16px); -webkit-tap-highlight-color: transparent; }
:lang(en) body, html[lang="en"] body { line-height: 1.45; }
a { color: var(--accent); text-decoration: none; }
h1 { font-size: 28px; font-weight: 700; line-height: 1.3; margin: 4px 0 12px; }
h2 { font-size: 20px; font-weight: 700; line-height: 1.35; margin: 0 0 10px; }
h3 { font-size: 15px; font-weight: 600; margin: 16px 0 8px; color: var(--text-2); }
i { color: var(--text-3); font-size: 13px; }
img { max-width: 100%; }
.num, .stats b, .kpis b, .pts, .pct { font-variant-numeric: tabular-nums; }
button { font-family: inherit; }
::-webkit-scrollbar { width: 0; height: 0; }

@keyframes sdFadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes sdFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sdSheetUp { from { opacity: 0; transform: translateY(40px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes sdPop { 0% { transform: scale(0); opacity: 0; } 70% { transform: scale(1.18); opacity: 1; } 100% { transform: scale(1); } }
@keyframes sdPulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(2.8); opacity: 0; } }
@keyframes sdShimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }
.sd-in { animation: sdFadeUp var(--dur-3) var(--ease-out) both; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .12s !important; } }

/* ---------- icons & logo ---------- */
.ic { width: 22px; height: 22px; display: block; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic.flip { transform: scaleX(-1); }
:lang(en) .ic.flip, html[lang="en"] .ic.flip { transform: none; }
.mark .ring { stroke: var(--ring); }
.mark .glw { filter: url(#sdGlow); }
:root[data-theme="light"] .mark .glw { filter: none; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .mark .glw { filter: none; } }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 1000; display: flex; align-items: center; gap: 10px; min-height: 60px;
  padding: env(safe-area-inset-top) 14px 0; background: var(--bar); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); min-width: 0; }
.brand .mark { width: 38px; height: 38px; overflow: visible; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text > span { font-weight: 700; font-size: 18px; line-height: 1.35; }
.brand-text small { font-size: 12px; font-weight: 500; color: var(--accent); }
.topbar-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.pill-btn { height: 36px; min-width: 40px; padding: 0 10px; border-radius: var(--r-pill); border: 0; background: var(--surface-2); color: var(--text);
  font: 600 14px var(--font); cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.points-pill { background: var(--gold-bg); color: var(--gold-text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 35%, transparent); font-weight: 700; font-size: 15px; padding-inline: 8px 10px; }
.coin { width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; flex-shrink: 0;
  background: radial-gradient(circle at 35% 30%, #FFE4A3, #FFC857 55%, #C98A00);
  box-shadow: 0 0 0 1.5px rgba(255,200,87,.35), 0 0 calc(10px * var(--g)) rgba(255,200,87,.6); }
.coin::after { content: ''; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid rgba(90,55,0,.55); }
.env-banner { position: fixed; z-index: 1100; top: calc(env(safe-area-inset-top) + 2px); left: 50%; transform: translateX(-50%); pointer-events: none;
  background: #B03A2E; color: #fff; font-size: 11px; font-weight: 600; padding: 1px 10px; border-radius: var(--r-pill); opacity: .9; }
.sd-press:active, .btn:active, .pill-btn:active, .chip:active { transform: scale(.96); }

/* ---------- tab bar ---------- */
.tabbar { position: fixed; bottom: 0; inset-inline: 0; z-index: 1000; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  height: var(--tabbar-h); padding-bottom: calc(10px + env(safe-area-inset-bottom));
  background: var(--surface-glass); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); border-top: 1px solid var(--line); }
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 56px; color: var(--text-3); font-size: 12px; font-weight: 500; }
.tabbar a .ic { width: 24px; height: 24px; }
.tabbar a.active { color: var(--accent); font-weight: 600; }
.tabbar a.active .ic { stroke-width: 2.1; }
.tabbar a.active::before { content: ''; position: absolute; top: -1px; width: 22px; height: 3px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 calc(12px * var(--g)) var(--accent); }
.tabbar .tab-add { transform: translateY(-14px); height: auto; color: var(--text); font-weight: 600; }
.tabbar .tab-add .fab { width: 60px; height: 60px; border-radius: 22px; background: var(--coral); color: var(--on-coral); display: grid; place-items: center;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--coral) 50%, transparent), 0 0 0 5px var(--bg); transition: transform var(--dur-1); }
.tabbar .tab-add .fab .ic { width: 28px; height: 28px; stroke-width: 2.6; }
.tabbar .tab-add.active::before { display: none; }
.tabbar .tab-add:active .fab { transform: scale(.94); }

/* ---------- layout ---------- */
.view { max-width: 880px; margin: 0 auto; padding: 16px; }
.loading { padding: 48px 0; text-align: center; color: var(--text-3); }
.skeleton { height: 96px; border-radius: var(--r-md); background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: sdShimmer 1.4s linear infinite; margin-bottom: 12px; }
.card { background: var(--surface); border-radius: var(--r-md); padding: 16px; margin-bottom: 14px; box-shadow: inset 0 0 0 1px var(--line); animation: sdFadeUp var(--dur-3) var(--ease-out) both; }
.card.glass { background: var(--surface-glass); backdrop-filter: blur(16px); box-shadow: var(--shadow), inset 0 0 0 1px var(--line-2); }
.card.error { color: var(--error); background: var(--error-bg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--error) 40%, transparent); }
.card.note { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
.hint { color: var(--text-2); font-size: 13px; margin: 4px 0; }
.meta { color: var(--text-2); font-size: 14px; margin: 2px 0 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.warn { color: var(--warning); }
.sci { direction: ltr; unicode-bidi: isolate; font-style: italic; color: var(--text-3); font-size: 13px; }
html[dir="rtl"] .sci, html[dir="rtl"] .sp-card i { display: block; text-align: right; }
.section-title { font-size: 16px; font-weight: 700; margin: 0 0 6px; }

/* ---------- form controls ---------- */
input, select, textarea { width: 100%; font: 400 15px var(--font); color: var(--text); background: var(--surface); border: 0; border-radius: var(--r-md);
  padding: 11px 14px; box-shadow: inset 0 0 0 1px var(--line-2); min-height: 46px; transition: box-shadow var(--dur-2); }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent), 0 0 calc(16px * var(--g)) var(--glow-soft); }
input::placeholder, textarea::placeholder { color: var(--text-3); }
textarea { min-height: 80px; resize: vertical; }
.form label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: 14px; color: var(--text-2); }
.form.inline { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.form.inline > * { flex: 1 1 140px; width: auto; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- buttons ---------- */
.btn { height: 48px; padding: 0 20px; border-radius: var(--r-md); border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 16px var(--font); cursor: pointer; white-space: nowrap; color: var(--text); background: transparent;
  transition: transform var(--dur-1) var(--ease-out), box-shadow var(--dur-2), background var(--dur-2); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn.primary { width: 100%; margin-top: 16px; background: var(--coral); color: var(--on-coral); box-shadow: 0 6px 18px color-mix(in srgb, var(--coral) 40%, transparent); }
.btn.accent, .btn.secondary { width: 100%; margin: 10px 0; background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--primary) 40%, transparent); }
.btn.ghost { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn.danger { background: var(--error-bg); color: var(--error); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--error) 45%, transparent); }
.btn.small { height: 36px; padding: 0 14px; font-size: 14px; border-radius: var(--r-pill); width: auto; margin-top: 6px; }
.btn .ic { width: 20px; height: 20px; }
.file-btn { width: 100%; cursor: pointer; }
.link { background: none; border: 0; color: var(--text-3); font-size: 20px; cursor: pointer; float: inline-end; line-height: 1; }

/* ---------- chips, badges, rarity ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px; margin: 0 -16px; scrollbar-width: none; }
.chip { height: 36px; padding: 0 14px; border-radius: var(--r-pill); border: 0; display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; cursor: pointer;
  font: 500 14px var(--font); white-space: nowrap; background: var(--surface); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line); transition: all var(--dur-2) var(--ease-out); }
.chip .cdot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 calc(8px * var(--g)) var(--c); }
.chip.on { font-weight: 600; background: var(--text); color: var(--bg); box-shadow: none; }
.chip.on[style*="--c"] { background: color-mix(in srgb, var(--c) 22%, var(--surface)); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--c), 0 0 calc(14px * var(--g)) color-mix(in srgb, var(--c) 45%, transparent); }
.chip.glass, .pill-btn.glass { background: var(--surface-glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.chip.glass.on { background: var(--text); }
.chip.glass.on[style*="--c"] { background: color-mix(in srgb, var(--c) 22%, var(--surface)); }
.pill-btn.glass.on-accent { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600; white-space: nowrap; }
.badge .ic { width: 14px; height: 14px; stroke-width: 2.4; }
.badge.sm { height: 22px; font-size: 12px; padding: 0 8px; }
.st-verified, .conf-high { background: var(--success-bg); color: var(--success); }
.st-pending, .conf-medium, .conf-low { background: var(--warning-bg); color: var(--warning); }
.st-rejected, .conf-insufficient { background: var(--error-bg); color: var(--error); }
.conf-likely { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.rarity { display: inline-flex; gap: 3px; vertical-align: middle; }
.rarity i { width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.rarity i.on { background: var(--gold); box-shadow: 0 0 calc(6px * var(--g)) var(--gold); }
.rarity-label { font-size: 12px; color: var(--text-2); font-weight: 500; margin-inline-start: 6px; }

/* ---------- stats ---------- */
.stats { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px 12px; padding: 0 16px; scroll-snap-type: x mandatory; }
.stat { flex: 0 0 auto; min-width: 128px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  position: relative; overflow: hidden; scroll-snap-align: start; animation: sdFadeUp var(--dur-3) var(--ease-out) both; }
.stat::before { content: ''; position: absolute; inset-inline-end: -18px; top: -18px; width: 64px; height: 64px; border-radius: 50%; background: var(--c); opacity: .12; filter: blur(6px); }
.stat .ic { width: 16px; height: 16px; stroke-width: 2.2; color: var(--c); }
.stat b { display: block; font-size: 24px; font-weight: 700; margin-top: 6px; line-height: 1.15; }
.stat span { font-size: 13px; color: var(--text-2); }
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat-strip > div { padding: 2px 6px; text-align: center; border-inline-start: 1px solid var(--line); animation: sdFadeUp var(--dur-3) var(--ease-out) both; }
.stat-strip > div:first-child { border-inline-start: 0; }
.stat-strip b { display: block; font-size: 20px; font-weight: 700; line-height: 1.2; }
.stat-strip span { font-size: 12px; color: var(--text-2); line-height: 1.3; display: block; margin-top: 2px; }

/* ---------- maps ---------- */
.map { width: 100%; border-radius: var(--r-lg); overflow: hidden; position: relative; z-index: 0; box-shadow: inset 0 0 0 1px var(--line), 0 0 calc(40px * var(--g)) var(--glow-soft); }
.map.pick { height: 300px; }
.map.small { height: 240px; margin: 12px 0; }
.leaflet-container { background: var(--bg) !important; font-family: var(--font) !important; }
.leaflet-tile-pane { filter: var(--map-filter); }
.map::after, .home-map::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 400; background: var(--map-tint); }
.leaflet-control-attribution { font-size: 9px !important; background: var(--surface-glass) !important; color: var(--text-3) !important; }
.leaflet-control-attribution a { color: var(--text-3) !important; }
.leaflet-bar a { background: var(--surface-glass) !important; color: var(--text) !important; border-color: var(--line) !important; backdrop-filter: blur(12px); }
.sd-mk { background: none !important; border: 0 !important; }
.sd-mk .mk { position: relative; display: block; width: 18px; height: 18px; animation: sdPop .55s var(--ease-spring) both; animation-delay: var(--d, 0ms); cursor: pointer; }
.sd-mk .mk i { position: absolute; inset: 3px; border-radius: 50%; background: var(--c); border: 2px solid var(--mk-ring);
  box-shadow: 0 0 0 1px rgba(0,0,0,.15), 0 0 calc(14px * var(--glow) * var(--g)) var(--c); transition: transform .3s var(--ease-spring); }
.sd-mk .mk b { position: absolute; inset: 3px; border-radius: 50%; background: var(--c); opacity: 0; }
.sd-mk .mk.rare b { animation: sdPulse 2.4s ease-out infinite; animation-delay: calc(var(--d, 0ms) + 600ms); }
.sd-mk .mk:hover i { transform: scale(1.35); }
.sd-mk .mk.sel i { transform: scale(1.6); border-width: 2.5px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 35%, transparent), 0 0 24px var(--c); }
.sd-heat { background: none !important; border: 0 !important; pointer-events: none; }
.sd-heat span { display: block; width: 100%; height: 100%; border-radius: 50%; animation: sdFadeUp .6s both; mix-blend-mode: multiply; }
:root[data-theme="dark"] .sd-heat span { mix-blend-mode: screen; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sd-heat span { mix-blend-mode: screen; } }

/* ---------- Home (layout B: map-first + bottom sheet) ---------- */
body.home { padding-bottom: 0; overflow: hidden; }
body.home .view { max-width: none; padding: 0; }
body.home .topbar { position: fixed; inset-inline: 0; background: transparent; border-bottom: 0; }
.home-map { position: fixed; inset: 0; z-index: 0; }
.home-map .lmap { position: absolute; inset: 0; }
.home-vignette { position: fixed; inset: 0; pointer-events: none; z-index: 1; background: radial-gradient(120% 80% at 50% 50%, transparent 55%, rgba(6,18,31,.55)); display: none; }
:root[data-theme="dark"] .home-vignette { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .home-vignette { display: block; } }
.home-top { position: fixed; top: 0; inset-inline: 0; z-index: 10; padding-top: calc(60px + env(safe-area-inset-top));
  background: linear-gradient(var(--bg) 0%, color-mix(in srgb, var(--bg) 70%, transparent) 55%, transparent); pointer-events: none; }
.home-top > * { pointer-events: auto; }
.home-controls { display: flex; flex-direction: column; gap: 8px; padding-bottom: 18px; max-width: 880px; margin: 0 auto; }
.searchbox { margin: 0 16px; height: 48px; border-radius: var(--r-md); display: flex; align-items: center; gap: 10px; padding: 0 14px;
  background: var(--surface-glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: var(--shadow), inset 0 0 0 1px var(--line-2); color: var(--text-3); }
.searchbox input { background: none; box-shadow: none; padding: 0; min-height: 0; height: 100%; font-size: 15px; }
.searchbox input:focus { box-shadow: none; }
.home-controls .chips { margin: 0; }
.home-controls .row { display: flex; gap: 8px; padding: 0 16px; position: relative; }
.toggle-sw { width: 36px; height: 22px; border-radius: 11px; background: var(--surface-2); position: relative; transition: background var(--dur-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.toggle-sw::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 8px; background: var(--text-3); transition: inset-inline-start var(--dur-2) var(--ease-spring), background var(--dur-2); }
.on .toggle-sw { background: var(--accent); box-shadow: 0 0 calc(12px * var(--g)) var(--accent); }
.on .toggle-sw::after { inset-inline-start: 17px; background: var(--on-primary); }
.month-pop { position: absolute; top: 44px; inset-inline-start: 16px; z-index: 50; width: 260px; padding: 10px; border-radius: var(--r-md); background: var(--surface);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line-2); animation: sdSheetUp var(--dur-2) var(--ease-out) both; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.month-pop button { height: 40px; border-radius: 10px; border: 0; cursor: pointer; font: 600 13px var(--font); background: var(--surface-2); color: var(--text); }
.month-pop button.all { grid-column: 1 / -1; height: 36px; font-size: 14px; }
.month-pop button.on { background: var(--accent); color: var(--on-primary); }
.month-pop button.all.on { background: var(--text); color: var(--bg); }
.pill-btn.on-accent { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); color: var(--accent); }
.map-fabs { position: fixed; inset-inline-end: 16px; z-index: 25; display: flex; flex-direction: column; gap: 8px; transition: bottom var(--dur-3) var(--ease-out); }
.map-fab { width: 44px; height: 44px; border-radius: 14px; border: 0; display: grid; place-items: center; cursor: pointer;
  background: var(--surface-glass); color: var(--text); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow), inset 0 0 0 1px var(--line-2); }
.map-fab.desk, .map-legend, .panel-label, .sheet-head .cnt, .topnav, .btn-report { display: none; }
.home-panel { display: contents; }
.sheet { position: fixed; inset-inline: 0; bottom: var(--tabbar-h); z-index: 30; height: 144px; transition: height var(--dur-3) var(--ease-out);
  background: var(--surface); border-radius: 24px 24px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,.25), inset 0 1px 0 var(--line-2); display: flex; flex-direction: column; overflow: hidden; max-width: 880px; margin: 0 auto; }
.sheet.open { height: min(430px, 62vh); }
.sheet .handle { border: 0; background: none; padding: 10px 0 6px; cursor: pointer; display: grid; place-items: center; }
.sheet .handle span { width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); }
.sheet-head { padding: 12px 16px 0; display: flex; align-items: center; justify-content: space-between; }
.sheet-head button { border: 0; background: none; color: var(--accent); cursor: pointer; height: 36px; }
.sheet-head .ic { transition: transform var(--dur-2); transform: rotate(180deg); }
.sheet.open .sheet-head .ic { transform: none; }
.sheet-list { flex: 1; overflow-y: auto; padding: 0 16px 12px; }
.sheet:not(.open) .sheet-list { visibility: hidden; }
.empty-map { position: fixed; inset-inline: 16px; top: 42%; z-index: 20; padding: 16px; border-radius: var(--r-md); background: var(--surface-glass); backdrop-filter: blur(14px);
  text-align: center; box-shadow: var(--shadow), inset 0 0 0 1px var(--line-2); animation: sdSheetUp var(--dur-3) var(--ease-out) both; max-width: 420px; margin: 0 auto; }
.empty-map b { display: block; font-size: 16px; }
.empty-map p { margin: 4px 0 0; font-size: 14px; color: var(--text-2); }

/* marker popup */
.mpop { position: absolute; z-index: 900; width: 248px; background: var(--surface-glass); backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-radius: var(--r-md); box-shadow: var(--shadow), inset 0 0 0 1px var(--line-2), 0 0 calc(30px * var(--g)) var(--glow-soft); overflow: hidden;
  animation: sdSheetUp var(--dur-3) var(--ease-spring) both; color: var(--text); }
.mpop .ph { height: 116px; background-size: cover; background-position: center; position: relative; }
.mpop .ph .badge { position: absolute; inset-inline-start: 8px; top: 8px; }
.mpop .x { position: absolute; inset-inline-end: 6px; top: 6px; width: 28px; height: 28px; border-radius: 14px; border: 0; background: rgba(6,18,31,.55); color: #fff; display: grid; place-items: center; cursor: pointer; }
.mpop .x .ic { width: 14px; height: 14px; stroke-width: 2.4; }
.mpop .bd { padding: 10px 12px 12px; display: block; color: var(--text); }
.mpop .cat { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); font-weight: 500; }
.mpop .cat .cdot { width: 8px; height: 8px; border-radius: 4px; background: var(--c); box-shadow: 0 0 8px var(--c); }
.mpop .cat .rarity { margin-inline-start: auto; }
.mpop .cat .rarity i { width: 6px; height: 6px; }
.mpop .nm { font-size: 17px; font-weight: 700; margin-top: 4px; line-height: 1.3; }
.mpop .sci { font-size: 12px; display: block; }
.mpop .facts-row { display: flex; gap: 12px; margin-top: 8px; font-size: 13px; color: var(--text-2); flex-wrap: wrap; }
.mpop .facts-row span { display: inline-flex; align-items: center; gap: 4px; }
.mpop .facts-row .ic { width: 15px; height: 15px; }

/* striped placeholder for missing photos */
.ph-empty { background: repeating-linear-gradient(135deg, var(--surface-2) 0 6px, transparent 6px 12px), var(--surface); box-shadow: inset 0 0 0 1px var(--line); }

/* ---------- sighting rows / lists ---------- */
.s-list { list-style: none; margin: 0; padding: 0; }
.s-list li { border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; animation: sdFadeUp var(--dur-3) var(--ease-out) both; }
.s-list li:last-child { border-bottom: 0; }
.s-list a { display: flex; align-items: center; gap: 12px; padding: 10px 0; color: var(--text); flex: 1; min-width: 0; }
.s-list a > div { flex: 1; min-width: 0; }
.s-list b { font-weight: 600; font-size: 15px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-list small { display: block; color: var(--text-2); font-size: 13px; margin-top: 2px; }
.s-list .thumb-wrap { position: relative; flex: none; }
.s-list img, .s-list .ph { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; display: block; }
.s-list .ph { background: repeating-linear-gradient(135deg, var(--surface-2) 0 6px, transparent 6px 12px), var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.s-list .cbadge { position: absolute; bottom: -3px; inset-inline-end: -3px; width: 14px; height: 14px; border-radius: 7px; background: var(--c, var(--text-3)); border: 2.5px solid var(--surface); }
.s-list .ic.chev { color: var(--text-3); width: 18px; height: 18px; }

/* ---------- add sighting ---------- */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-bottom: 8px; }
.photos figure { position: relative; margin: 0; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-2); animation: sdPop .4s var(--ease-spring) both; }
.photos img { width: 100%; height: 100%; object-fit: cover; }
.photos button { position: absolute; top: 4px; inset-inline-end: 4px; border: 0; border-radius: 50%; width: 26px; height: 26px; background: rgba(6,18,31,.6); color: #fff; cursor: pointer; }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 120px; border-radius: var(--r-md); cursor: pointer;
  border: 1.5px dashed var(--line-2); color: var(--text-2); background: color-mix(in srgb, var(--accent) 4%, var(--surface)); font-weight: 600; }
.dropzone .ic { width: 30px; height: 30px; color: var(--accent); }
.form label.dropzone { display: flex; margin: 0 0 8px; font-size: 15px; color: var(--text); text-align: center; padding: 16px; }
.dropzone small { display: block; font-weight: 400; margin: 0; }
.sp-results button { display: flex; align-items: baseline; gap: 8px; width: 100%; text-align: start; background: var(--surface-2); border: 0; border-radius: var(--r-sm); padding: 10px 12px; margin-top: 6px; font: 500 15px var(--font); color: var(--text); cursor: pointer; }
.sp-results small { color: var(--text-3); font-style: italic; direction: ltr; }
.sp-chosen { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border-radius: var(--r-md); padding: 12px 14px; margin-top: 8px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.card.ai { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, var(--line)), 0 0 calc(24px * var(--g)) var(--glow-soft); background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.ai-head { display: flex; justify-content: space-between; align-items: center; color: var(--accent); font-weight: 600; font-size: 13px; margin-bottom: 6px; gap: 8px; }
.card.ai h3 { color: var(--text); font-size: 18px; margin: 4px 0 0; font-weight: 700; }
.gps-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: var(--r-md); background: var(--surface-2); font-size: 13px; color: var(--text-2); margin-top: 14px; }
.gps-note .ic { color: var(--accent); width: 20px; height: 20px; }

/* ---------- submission result ---------- */
.result { text-align: center; padding: 28px 18px; }
.result-icon { width: 76px; height: 76px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; animation: sdPop .6s var(--ease-spring) both;
  background: var(--success-bg); color: var(--success); box-shadow: 0 0 0 8px color-mix(in srgb, var(--success) 10%, transparent), 0 0 calc(30px * var(--g)) color-mix(in srgb, var(--success) 50%, transparent); }
.result.wait .result-icon { background: var(--warning-bg); color: var(--warning); box-shadow: 0 0 0 8px color-mix(in srgb, var(--warning) 10%, transparent); }
.result-icon .ic { width: 36px; height: 36px; stroke-width: 2.6; }
.result h1 { margin-bottom: 4px; }
.result-points { display: inline-flex; align-items: center; gap: 10px; margin: 10px auto 4px; padding: 10px 18px; border-radius: var(--r-pill); background: var(--gold-bg); color: var(--gold-text);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 35%, transparent), 0 0 calc(24px * var(--g)) rgba(255,200,87,.25); }
.result-points .coin { width: 28px; height: 28px; }
.result-points b { font-size: 44px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.result-points span:last-child { font-weight: 600; }
.result-parts { max-width: 320px; margin: 12px auto 0; text-align: start; }

/* ---------- sighting details ---------- */
.gallery { display: flex; gap: 8px; overflow-x: auto; margin: -16px -16px 14px; padding: 0; scroll-snap-type: x mandatory; border-radius: var(--r-md) var(--r-md) 0 0; }
.gallery a { flex: 0 0 100%; scroll-snap-align: start; }
.gallery img { width: 100%; height: 260px; object-fit: cover; display: block; }
.sighting-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.sighting-head h1 { font-size: 24px; margin: 0; }
.sighting-head h1 a { color: var(--text); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 14px 0; }
.facts dt { color: var(--text-2); font-size: 14px; display: flex; align-items: center; gap: 6px; }
.facts dd { margin: 0; font-weight: 500; }
.notes { background: var(--surface-2); padding: 12px; border-radius: var(--r-sm); white-space: pre-wrap; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }

/* ---------- species ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; align-items: center; }
.filters > input, .filters > select { flex: 1 1 160px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 12px; }
.sp-card { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border-radius: var(--r-md); padding: 8px 8px 10px; color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line); transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2); animation: sdFadeUp var(--dur-3) var(--ease-out) both; }
.sp-card:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow); }
.sp-card .thumb { aspect-ratio: 4/3; border-radius: var(--r-sm); overflow: hidden; display: grid; place-items: center; margin-bottom: 6px; position: relative;
  background: repeating-linear-gradient(135deg, var(--surface-2) 0 6px, transparent 6px 12px), var(--surface); color: var(--text-3); font-size: 12px; }
.sp-card .thumb::after { content: ''; position: absolute; bottom: 6px; inset-inline-end: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--c); border: 2px solid var(--surface); }
.sp-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.sp-card b { font-size: 15px; font-weight: 600; line-height: 1.35; }
.sp-card i { font-size: 12px; direction: ltr; text-align: start; unicode-bidi: isolate; }
.sp-card .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--text-2); }
.hero-sp { margin: -16px -16px 0; height: 220px; background-size: cover; background-position: center; border-radius: 0 0 var(--r-lg) var(--r-lg); position: relative; }
.hero-sp::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(transparent 45%, var(--surface)); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.kpis div { background: var(--surface-2); border-radius: var(--r-sm); padding: 10px; }
.kpis span { display: block; font-size: 12px; color: var(--text-2); }
.kpis b { font-size: 16px; font-weight: 700; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 120px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.bar span { display: block; width: 100%; max-width: 18px; background: color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 4px 4px 2px 2px; transform-origin: bottom; animation: sdPop .5s var(--ease-spring) both; }
.bar.hi span { background: var(--gold); box-shadow: 0 0 calc(10px * var(--g)) var(--gold); }
.bar small { font-size: 11px; color: var(--text-3); margin-top: 4px; white-space: nowrap; overflow: hidden; max-width: 100%; }
.hotspots { padding-inline-start: 20px; margin: 0; font-size: 14px; }
.hotspots li { padding: 3px 0; }
.conf-line { display: flex; gap: 8px; align-items: center; color: var(--text-2); font-size: 13px; flex-wrap: wrap; }

/* ---------- forecast ---------- */
.chance-list { list-style: none; padding: 0; margin: 0; }
.chance-list a { display: grid; grid-template-columns: minmax(0, 1.3fr) 1fr 48px; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 8px;
  background: var(--surface); border-radius: var(--r-md); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); animation: sdFadeUp var(--dur-3) var(--ease-out) both; }
.cl-name b { font-weight: 600; }
.cl-name small { display: flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 12px; margin-top: 2px; }
.meter { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--accent); border-radius: 999px; box-shadow: 0 0 calc(8px * var(--g)) var(--accent); transform-origin: left; }
.meter.big { height: 10px; margin-top: 10px; }
.meter.gold span { background: var(--gold); box-shadow: 0 0 calc(8px * var(--g)) var(--gold); }
.pct { text-align: end; font-weight: 700; }

/* ---------- segmented / leaderboard / profile ---------- */
.seg { display: flex; background: var(--surface-2); border-radius: var(--r-md); padding: 4px; margin-bottom: 14px; }
.seg button { flex: 1; border: 0; background: transparent; height: 40px; border-radius: 10px; font: 600 14px var(--font); color: var(--text-2); cursor: pointer; transition: all var(--dur-2); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.leaders { list-style: none; padding: 0; margin: 0; }
.leaders li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border-radius: var(--r-md); margin-bottom: 8px; box-shadow: inset 0 0 0 1px var(--line); animation: sdFadeUp var(--dur-3) var(--ease-out) both; }
.leaders li.me { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 calc(18px * var(--g)) var(--glow-soft); }
.leaders li > div { flex: 1; min-width: 0; }
.leaders b { font-weight: 600; }
.leaders small { display: block; color: var(--text-2); font-size: 12px; }
.leaders .pos { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--surface-2); color: var(--text-2); flex: none; }
.leaders .pos.p1 { background: linear-gradient(135deg, #FFE4A3, #FFC857 55%, #C98A00); color: #3A2600; box-shadow: 0 0 calc(14px * var(--g)) rgba(255,200,87,.6); }
.leaders .pos.p2 { background: linear-gradient(135deg, #F1F5F9, #B9C6D3); color: #22313F; }
.leaders .pos.p3 { background: linear-gradient(135deg, #F6C9A8, #C9824F); color: #3A1D08; }
.leaders .pts { color: var(--gold-text); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.profile-head { display: flex; align-items: center; gap: 14px; }
.avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; font-weight: 700; flex: none;
  background: color-mix(in srgb, var(--accent) 18%, var(--surface)); color: var(--accent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 45%, transparent), 0 0 calc(18px * var(--g)) var(--glow-soft); }
.level-badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r-pill); background: var(--gold-bg); color: var(--gold-text); font-size: 13px; font-weight: 600; }
.plog { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.plog li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.plog li:last-child { border-bottom: 0; }
.plog b { min-width: 44px; color: var(--success); }
.plog b.neg { color: var(--error); }
.plog small { color: var(--text-3); margin-inline-start: auto; font-size: 12px; }

/* ---------- import (admin) ---------- */
.dive-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.dive .loc { color: var(--text); font-weight: 600; }
.imp-list { margin-top: 12px; }
.imp { border-top: 1px solid var(--line); padding: 12px 0; }
.imp.done { color: var(--text-2); padding: 8px 0; }
.imp-top { display: flex; align-items: center; gap: 8px; }
.imp-top input[type=checkbox] { width: 22px; height: 22px; min-height: 0; flex: none; accent-color: var(--accent); box-shadow: none; }
.imp-top select { flex: 1; min-width: 0; }
.imp:has(.inc:not(:checked)) > :not(.imp-top) { opacity: .4; }
.imp-photos { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 2px; }
.ph-pick { flex: none; width: 96px; height: 72px; padding: 0; border: 3px solid transparent; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-2); cursor: pointer; opacity: .55; transition: all var(--dur-2); }
.ph-pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-pick.on { border-color: var(--coral); opacity: 1; }
.imp-fields { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; margin: 6px 0; }
.imp-fields label { font-size: 12px; color: var(--text-2); }
#submitBtn, .save-dive { background: var(--coral); color: var(--on-coral); }

/* ---------- species contributions ---------- */
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.sec-head h2 { margin: 0; }
.contribs { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.contrib { padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); animation: sdFadeUp var(--dur-3) var(--ease-out) both; }
.contrib.k-name { border-inline-start: 3px solid var(--gold); }
.contrib.k-info { border-inline-start: 3px solid var(--accent); }
.ct-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ct-kind { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.ct-kind .ic { width: 14px; height: 14px; }
.ct-sp { display: inline-block; font-size: 13px; color: var(--accent); font-weight: 600; margin-top: 4px; }
.ct-title { display: block; font-size: 17px; margin-top: 4px; }
.ct-body { margin: 6px 0 0; white-space: pre-wrap; line-height: 1.75; }
.ct-note { margin: 8px 0 0; font-size: 13px; padding: 8px 10px; border-radius: 10px; background: var(--warning-bg); color: var(--warning); }
.ct-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.ct-foot small { color: var(--text-3); font-size: 12px; }
.ct-acts { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.link-btn { border: 0; background: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 8px; border-radius: var(--r-pill);
  font: 600 13px var(--font); color: var(--accent); }
.link-btn:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.link-btn .ic { width: 16px; height: 16px; }
.link-btn.danger { color: var(--error); }
.link-btn.danger:hover { background: var(--error-bg); }
.badge.cs-private { background: var(--surface); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.badge.cs-pending { background: var(--warning-bg); color: var(--warning); }
.badge.cs-public { background: var(--success-bg); color: var(--success); }
.badge.cs-rejected { background: var(--error-bg); color: var(--error); }
.contrib-form { margin: 10px 0 6px; padding: 14px; border-radius: var(--r-md); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.contrib-form .seg { background: var(--surface); }
.contrib-form .seg button.on { background: var(--surface-2); }
.form label.check { display: flex; align-items: flex-start; gap: 10px; color: var(--text); font-weight: 500; cursor: pointer; }
.form label.check input { width: 20px; height: 20px; min-height: 0; flex-shrink: 0; margin: 1px 0 0; accent-color: var(--accent); box-shadow: none; padding: 0; }
.row-btns { display: flex; gap: 8px; margin-top: 12px; }
.row-btns .btn { flex: 1; margin: 0; }
.forgot-link { display: block; text-align: center; margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--accent); }

/* ---------- Android app download card ---------- */
.app-dl { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 12px; }
.app-dl-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, #3DDC84 16%, var(--surface-2)); color: #3DDC84; }
.app-dl-ic .ic { width: 28px; height: 28px; }
.app-dl-tx b { display: block; font-size: 16px; }
.app-dl-tx small { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; }
.app-dl-btn { margin: 0 !important; background: var(--coral); color: var(--on-coral); }
.app-dl-note { grid-column: 1 / -1; margin: 8px 0 0; }

/* ---------- general creature profile (AI info v2) ---------- */
.gi .gi-group { margin: 6px 0 2px; font-weight: 700; color: var(--accent); }
.gi .gi-desc { margin: 6px 0 4px; line-height: 1.8; }
.gi-sec { margin-top: 14px; }
.gi-sec h4, .gi-h { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--text); }
.gi-sec h4 .ic, .gi-h .ic { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }
.taxo { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.taxo li { position: relative; display: grid; grid-template-columns: 78px 1fr; align-items: baseline; gap: 2px 10px; padding: 6px 0 6px; padding-inline-start: 18px; }
.taxo li::before { content: ''; position: absolute; inset-inline-start: 3px; top: 13px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); opacity: .5; }
.taxo li::after { content: ''; position: absolute; inset-inline-start: 6px; top: 22px; bottom: -6px; width: 2px; background: var(--line-2); }
.taxo li:last-child::after { display: none; }
.taxo li.rk-genus::before, .taxo li.rk-species::before { opacity: 1; box-shadow: 0 0 calc(8px * var(--g)) var(--accent); }
.taxo .rk { font-size: 12px; color: var(--text-3); }
.taxo .lat { font-style: italic; font-weight: 600; font-size: 14px; text-align: start; }
html[dir=rtl] .taxo .lat { text-align: right; }
.taxo small { grid-column: 2; font-size: 12px; color: var(--text-2); }
.gi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-top: 14px; }
.gi-tile { padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.gi-tile .gi-h { flex-wrap: wrap; }
.gi-tile p { margin: 6px 0 0; font-size: 14px; line-height: 1.75; color: var(--text-2); }
.gi-badge { margin-inline-start: auto; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: var(--r-pill); white-space: nowrap; }
.gi-badge.ok { background: var(--success-bg); color: var(--success); }
.gi-badge.warn { background: var(--warning-bg); color: var(--warning); }
.gi-badge.bad { background: var(--error-bg); color: var(--error); }
.gi-badge.gold { background: var(--gold-bg); color: var(--gold-text); }
.gi-badge.neutral { background: var(--surface); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.tox-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; margin-top: 6px; }
.tox-meter i { height: 6px; border-radius: 3px; background: var(--line-2); }
.tox-meter i.on.t1, .tox-meter i.on.t2 { background: var(--warning); }
.tox-meter i.on.t3, .tox-meter i.on.t4 { background: var(--error); }
.gi-rar { margin-top: 6px; }
.gi-mini { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 8px 0 0; font-size: 13px; }
.gi-mini dt { color: var(--text-3); }
.gi-mini dd { margin: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gi-details { margin: 10px 0; border-radius: var(--r-md); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.gi-details summary { cursor: pointer; padding: 10px 12px; font-weight: 600; display: flex; align-items: center; gap: 6px; color: var(--accent); }
.gi-details summary .ic { width: 16px; height: 16px; }
.gi-details > .gi { padding: 0 12px 12px; }
.gi-details .gi-tile { background: var(--surface); }

/* ---------- admin reports ---------- */
.reports .rnav { margin: 12px -16px 14px; position: sticky; top: 60px; z-index: 5; padding-block: 8px; background: var(--bg); }
.rsec h2 { margin-bottom: 12px; }
.rtiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.rtile { padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.rtile b { display: block; font-size: 24px; line-height: 1.2; font-weight: 700; overflow-wrap: anywhere; }
.rtile span { display: block; font-size: 13px; color: var(--text-2); margin-top: 2px; }
.rtile small { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; }
.rtile.ok { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--success) 40%, transparent); }
.rtile.ok b { color: var(--success); }
.rtile.warn { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warning) 45%, transparent); }
.rtile.warn b { color: var(--warning); }
.rtile.gold b { color: var(--gold-text); }
.rgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 24px; }
.rsub { margin-top: 18px; min-width: 0; }
.rsub h3 { font-size: 14px; font-weight: 600; color: var(--text-2); margin: 0 0 10px; }
.hbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hbars li { display: grid; grid-template-columns: minmax(84px, 38%) 1fr auto; align-items: center; gap: 10px; font-size: 13px; }
.hbars .hl { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.hbars .hl a { color: inherit; overflow: hidden; text-overflow: ellipsis; }
.hbars .hl i { width: 8px; height: 8px; border-radius: 4px; background: var(--c); flex-shrink: 0; }
.hbars .ht { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.hbars .ht span { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--accent); transition: width var(--dur-3) var(--ease-out); }
html[dir=rtl] .hbars .ht span { border-radius: 4px 0 0 4px; margin-inline-start: 0; }
.hbars b { font-weight: 700; min-width: 2.5ch; text-align: end; }
.hbars b small { font-weight: 500; color: var(--text-3); }
.hbars li:hover .ht span { filter: brightness(1.15); }
.rcols { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 3px; align-items: end; height: 150px; padding-top: 16px; }
.rcols .rc { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; position: relative; }
.rcols .b { width: 100%; max-width: 28px; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--accent); }
.rcols .b.zero { background: var(--line-2); }
.rcols .v { font-size: 10px; color: var(--text-2); line-height: 1.4; }
.rcols small { font-size: 9.5px; color: var(--text-3); margin-top: 4px; white-space: nowrap; overflow: hidden; max-width: 100%; text-overflow: clip; }
.rcols .rc:hover .b { filter: brightness(1.2); }
.split { display: flex; gap: 2px; height: 14px; border-radius: 7px; overflow: hidden; background: var(--surface-2); }
.split span { min-width: 4px; }
.split-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13px; color: var(--text-2); }
.split-legend span { display: inline-flex; align-items: center; gap: 5px; }
.split-legend i { width: 9px; height: 9px; border-radius: 3px; }
.split-legend .ic { width: 14px; height: 14px; }
.split-legend b { color: var(--text); }
.ract { list-style: none; margin: 0; padding: 0; }
.ract li { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ract li:last-child { border-bottom: 0; }
.ract a { color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.ract small { grid-column: 2; color: var(--text-3); font-size: 12px; }
.features { list-style: none; margin: 0; padding: 0; position: relative; }
.features li { position: relative; padding: 0 0 18px; padding-inline-start: 22px; }
.features li::before { content: ''; position: absolute; inset-inline-start: 4px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px var(--surface); }
.features li.f-setup::before { background: var(--warning); }
.features li::after { content: ''; position: absolute; inset-inline-start: 8px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.features li:last-child::after { display: none; }
.f-top { display: flex; align-items: center; gap: 8px; }
.f-date { font-size: 12px; color: var(--text-3); }
.features b { display: block; font-size: 16px; margin-top: 4px; }
.features p { margin: 2px 0 0; color: var(--text-2); font-size: 14px; line-height: 1.7; }
.f-metrics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.f-metrics span { font-size: 12px; padding: 3px 9px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line); }
.f-metrics b { display: inline; font-size: 12px; color: var(--text); margin: 0; }
@media (min-width: 1024px) { .reports .rnav { top: var(--top-h); margin-inline: 0; } }

/* share sheet */
.share-dlg { position: fixed; inset: 0; z-index: 3000; background: rgba(4,12,22,.55); backdrop-filter: blur(4px); display: grid; place-items: end center; padding: 12px;
  animation: sdFade var(--dur-2) var(--ease-out) both; }
.share-card { width: 100%; max-width: 460px; background: var(--surface); border-radius: 22px; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); box-shadow: var(--shadow), inset 0 0 0 1px var(--line-2);
  animation: sdSheetUp var(--dur-3) var(--ease-out) both; }
@media (min-width: 640px) { .share-dlg { place-items: center; } }
.share-head { display: flex; align-items: center; justify-content: space-between; }
.share-head .x { border: 0; background: var(--surface-2); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--text); cursor: pointer; }
.share-text { margin: 6px 0 14px; color: var(--text-2); font-size: 14px; }
.share-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.share-grid a, .share-grid button { display: flex; flex-direction: column; align-items: center; gap: 6px; font: 600 12px var(--font); color: var(--text); text-align: center;
  border: 0; background: none; cursor: pointer; padding: 4px 0; }
.share-grid span { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; background: var(--c); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--c) 35%, transparent); }
.share-grid .native span { color: var(--on-primary); }
.share-grid .ic { width: 24px; height: 24px; }
.share-link { display: flex; gap: 8px; margin-top: 16px; align-items: center; }
.share-link input { flex: 1; height: 38px; min-height: 0; font-size: 13px; direction: ltr; }
.share-link .btn { margin: 0; flex-shrink: 0; }

/* ---------- toast ---------- */
.toast { position: fixed; bottom: calc(var(--tabbar-h) + 16px); left: 50%; transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none; z-index: 2000;
  background: var(--surface-glass); color: var(--text); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); padding: 12px 18px; border-radius: var(--r-md);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line-2); max-width: calc(100% - 32px); transition: all var(--dur-2) var(--ease-out); font-size: 14px; font-weight: 500; }
.toast.show { opacity: 1; transform: translateX(-50%); }

@media (max-width: 520px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .imp-fields { grid-template-columns: 1fr 1fr; }
  .imp-fields label:first-child { grid-column: 1 / -1; }
  .sighting-head h1 { font-size: 21px; }
}
@media (min-width: 900px) {
  .brand-text > span { font-size: 20px; }
}

/* ---------- desktop (handoff 08 · Desktop — Map) ---------- */
@media (min-width: 1024px) {
  :root { --tabbar-h: 0px; --top-h: 72px; --panel-w: 380px; }
  body { padding-bottom: 32px; }
  .tabbar { display: none; }
  .topbar, body.home .topbar { position: sticky; height: var(--top-h); padding: 0 28px; gap: 16px; background: var(--bar); border-bottom: 1px solid var(--line); }
  body.home .topbar { position: fixed; }
  .brand .mark { width: 44px; height: 44px; }
  .topnav { display: flex; gap: 4px; margin-inline-start: 40px; }
  .topnav a { height: 40px; padding: 0 16px; border-radius: var(--r-pill); display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--text-2); transition: background var(--dur-2), color var(--dur-2); }
  .topnav a .ic { width: 19px; height: 19px; }
  .topnav a:hover { color: var(--text); background: var(--surface-2); }
  .topnav a.active { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
  .topbar-actions { gap: 10px; }
  .topbar-actions .pill-btn { height: 40px; min-width: 44px; padding-inline: 12px; }
  .btn-report { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: var(--r-pill); background: var(--coral); color: var(--on-coral);
    font-weight: 700; font-size: 15px; box-shadow: 0 6px 18px color-mix(in srgb, var(--coral) 35%, transparent); }
  .btn-report .ic { width: 18px; height: 18px; stroke-width: 2.6; }
  #topSearch .searchbox { margin: 0; width: 300px; height: 40px; border-radius: var(--r-pill); background: var(--surface-2); backdrop-filter: none; box-shadow: inset 0 0 0 1px var(--line); }
  #topSearch .searchbox input { font-size: 14px; }
  .toast { bottom: 24px; }
  .view { max-width: 1040px; padding: 24px 28px; }

  /* home: side panel + map */
  .home-map, .home-vignette { top: var(--top-h); inset-inline-start: var(--panel-w); }
  .home-panel { display: flex; flex-direction: column; position: fixed; top: var(--top-h); bottom: 0; inset-inline-start: 0; width: var(--panel-w); z-index: 20;
    background: var(--bar); border-inline-end: 1px solid var(--line); overflow: hidden; }
  .home-panel .home-top, .home-panel .home-controls, .home-panel .sheet { display: contents; }
  .home-panel .stat-strip { order: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 20px 20px 16px; }
  .home-panel .stat-strip > div { text-align: start; padding: 12px 14px; border: 0; border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
  .home-panel .stat-strip b { font-size: 26px; line-height: 1.15; }
  .home-panel .stat-strip span { font-size: 13px; display: flex; align-items: center; gap: 6px; }
  .home-panel .stat-strip span::before { content: ''; width: 7px; height: 7px; border-radius: 4px; background: var(--c, var(--accent)); flex-shrink: 0; }
  .home-panel .stat-strip > div:nth-child(1) { --c: var(--success); }
  .home-panel .stat-strip > div:nth-child(3) { --c: #8B7CF6; }
  .home-panel .stat-strip > div:nth-child(4) { --c: var(--gold); }
  .home-panel .panel-label { order: 2; display: block; padding: 0 20px 8px; font-size: 13px; font-weight: 600; color: var(--text-2); }
  .home-panel .chips { order: 3; flex-wrap: wrap; overflow: visible; gap: 6px; padding: 0 20px; margin: 0; }
  .home-panel .chip.glass { background: var(--surface-2); backdrop-filter: none; }
  .home-panel .chip.glass.on { background: var(--text); color: var(--bg); }
  .home-panel .row { order: 4; padding: 10px 20px 0; z-index: 30; }
  .home-panel .pill-btn.glass { background: var(--surface-2); backdrop-filter: none; }
  .home-panel .month-pop { inset-inline-start: 20px; }
  .home-panel .handle, .home-panel #hToggle { display: none; }
  .home-panel .sheet-head { order: 5; padding: 18px 20px 6px; align-items: baseline; }
  .home-panel .sheet-head .cnt { display: inline; font-size: 13px; color: var(--text-3); }
  .home-panel .sheet-list { order: 6; visibility: visible !important; padding: 0 20px 20px; min-height: 0; }
  .map-fabs { top: calc(var(--top-h) + 20px); bottom: auto !important; inset-inline-end: 20px; }
  .map-fab.desk { display: grid; }
  .map-legend { display: grid; grid-template-columns: repeat(3, auto); gap: 6px 16px; position: fixed; bottom: 24px; inset-inline-start: calc(var(--panel-w) + 20px); z-index: 25;
    padding: 10px 14px; border-radius: var(--r-md); font-size: 12px; color: var(--text-2); background: var(--surface-glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow), inset 0 0 0 1px var(--line-2); }
  .map-legend span { display: inline-flex; align-items: center; gap: 6px; }
  .map-legend i { width: 9px; height: 9px; border-radius: 5px; background: var(--c); box-shadow: 0 0 calc(6px * var(--g)) var(--c); }
  .empty-map { inset-inline: calc(var(--panel-w) + 40px) 40px; }
}

/* ---------- media: videos, gallery grid, lightbox, hero carousel ---------- */
.vbadge { position: absolute; bottom: 6px; inset-inline-start: 6px; display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 7px; border-radius: var(--r-pill);
  background: rgba(6,18,31,.66); color: #fff; font-size: 11px; font-weight: 600; pointer-events: none; }
.vbadge .ic { width: 12px; height: 12px; }
.vbadge.sm { bottom: 3px; inset-inline-start: 3px; height: 18px; padding: 0 5px; }
.thumb-wrap { position: relative; }
.proc { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); margin: 4px 0 8px; }
.proc[hidden] { display: none; }
.wm-note { display: flex; gap: 6px; align-items: flex-start; margin: 0 0 8px; }
.wm-note .ic { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--accent); }
.sp-unk { margin-top: 6px; }
.dropzone.big { min-height: 200px; margin-top: 8px; }
.dropzone[hidden] { display: none; }

.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
.sighting > .mgrid { margin: -16px -16px 14px; border-radius: var(--r-md) var(--r-md) 0 0; overflow: hidden; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 3px; }
.sighting > .mgrid.one { grid-template-columns: 1fr; }
.sighting > .mgrid.one .mg-item { aspect-ratio: 16/10; border-radius: 0; }
.mg-item { position: relative; aspect-ratio: 1; border: 0; padding: 0; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-2); cursor: zoom-in; }
.mg-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--dur-3) var(--ease-out); }
.mg-item:hover img { transform: scale(1.04); }
.mg-item .ph { display: grid; place-items: center; width: 100%; height: 100%; color: var(--text-3); }

body.lb-open { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 4000; background: rgba(2,8,15,.97); display: flex; flex-direction: column; animation: sdFade .2s ease both; }
.lb-track { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.lb-track::-webkit-scrollbar { display: none; }
.lb-item { flex: 0 0 100%; scroll-snap-align: center; margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 12px 16px; min-width: 0; }
.lb-item img, .lb-item video { max-width: 100%; max-height: calc(100dvh - 140px); object-fit: contain; border-radius: 8px; background: #000; }
.lb-item figcaption { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; color: #DCE7F0; font-size: 13px; margin-top: 10px; text-align: center; }
.lb-item figcaption b { width: 100%; font-size: 15px; color: #fff; }
.lb-item figcaption a { color: #9FE8E3; display: inline-flex; align-items: center; gap: 5px; text-decoration: none; }
.lb-item figcaption .ic { width: 15px; height: 15px; }
.lb-x { position: absolute; top: calc(10px + env(safe-area-inset-top)); inset-inline-end: 10px; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; display: grid; place-items: center; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; display: grid; place-items: center; }
.lb-nav.prev { inset-inline-start: 10px; }
.lb-nav.next { inset-inline-end: 10px; }
[dir="ltr"] .lb-nav.prev .ic, [dir="rtl"] .lb-nav.next .ic { transform: scaleX(-1); }
.lb-count { position: absolute; top: calc(20px + env(safe-area-inset-top)); inset-inline-start: 16px; color: #DCE7F0; font-size: 13px; }
@media (hover: none) { .lb-nav { display: none; } }

.hero-car { position: relative; }
.hc-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hc-track::-webkit-scrollbar { display: none; }
.hc-slide { flex: 0 0 100%; height: 260px; scroll-snap-align: center; border: 0; padding: 0; background-size: cover; background-position: center; position: relative; cursor: zoom-in; }
.hc-by { position: absolute; top: 10px; inset-inline-end: 10px; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: var(--r-pill);
  background: rgba(6,18,31,.55); color: #fff; font-size: 11px; font-weight: 600; }
.hc-by .ic { width: 13px; height: 13px; }
.hc-dots { position: absolute; bottom: 10px; inset-inline: 0; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.hc-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.55); transition: all var(--dur-2); }
.hc-dots i.on { width: 18px; background: #fff; }
@media (min-width: 1024px) { .hc-slide { height: 340px; } }

.clip-card video { width: 100%; max-height: 46vh; border-radius: var(--r-sm); background: #000; display: block; cursor: pointer; }
.clip-card input[type=range] { width: 100%; margin: 12px 0 2px; accent-color: var(--accent); }
.clip-l { text-align: center; margin: 0; color: var(--text-2); font-size: 14px; }

/* ---------- batch upload ---------- */
.bgroup { animation: sdFadeUp var(--dur-3) var(--ease-out) both; }
.bgroup.has-err { box-shadow: inset 0 0 0 1.5px var(--error); }
.bgroup.done { opacity: .92; }
.bg-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.bg-acts { display: inline-flex; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
.bg-sp .btn.accent { margin-top: 8px; }
.bg-sp .sp-chosen { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 0; }
.bg-sp .sp-chosen .ic { width: 16px; height: 16px; vertical-align: -3px; }
.bg-sp .sp-chosen small { display: block; }
.bg-sp .card.ai, .bg-sp .card.note { margin: 10px 0 0; }
.bg-err { color: var(--error); font-size: 13px; margin: 6px 0 0; }
.bg-done { display: flex; gap: 12px; align-items: center; }
.bg-done img { width: 64px; height: 64px; border-radius: var(--r-sm); object-fit: cover; }
.bg-done small { display: block; color: var(--text-2); font-size: 12px; }
.bgroup textarea { width: 100%; }
.gold-text { color: var(--gold-text); font-weight: 600; }
@media (max-width: 520px) { .imp-fields { grid-template-columns: 1fr 1fr; } .imp-fields label:first-child { grid-column: 1 / -1; } }

/* ---------- species tabs, unidentified ---------- */
.sp-tabs a { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; border-radius: 10px; font: 600 14px var(--font); color: var(--text-2); text-decoration: none; transition: all var(--dur-2); }
.sp-tabs a .ic { width: 17px; height: 17px; }
.sp-tabs a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.sp-card.unk .thumb .ic { width: 34px; height: 34px; color: var(--text-3); }
.sp-card.unk .thumb::after { display: none; }
.sighting-head a.hint { display: inline-flex; align-items: center; gap: 4px; }
.sighting-head a.hint .ic { width: 15px; height: 15px; }

/* ---------- avatars, diver profile ---------- */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.lg { width: 76px; height: 76px; font-size: 28px; }
.avatar.sm { width: 36px; height: 36px; font-size: 15px; }
.avatar.xs { width: 24px; height: 24px; font-size: 11px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }
.avatar-edit { position: relative; cursor: pointer; flex: none; }
.ae-btn { position: absolute; bottom: -2px; inset-inline-end: -2px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent, #fff); box-shadow: 0 0 0 3px var(--surface); }
.ae-btn .ic { width: 15px; height: 15px; }
.user-link { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; font-weight: 600; }
.user-link:hover span { text-decoration: underline; }
.lead-av { flex: none; text-decoration: none; }
.lead-nm { color: inherit; text-decoration: none; }
details.diver > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
details.diver > summary::-webkit-details-marker { display: none; }
details.diver > summary::after { content: '▾'; color: var(--text-3); transition: transform var(--dur-2); }
details.diver[open] > summary::after { transform: rotate(180deg); }
details.diver h2 .ic { width: 20px; height: 20px; vertical-align: -3px; color: var(--accent); }
.bio { margin: 12px 0 0; white-space: pre-wrap; }
.lic { display: flex; gap: 12px; align-items: center; margin-top: 12px; padding: 12px 14px; border-radius: var(--r-md);
  background: color-mix(in srgb, var(--accent) 9%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
.lic > .ic { width: 30px; height: 30px; color: var(--accent); flex: none; }
.lic small { display: block; color: var(--text-2); font-size: 13px; }
.lic small .ic { width: 13px; height: 13px; vertical-align: -2px; }
.profile p.hint > .ic { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; }
.card h2 > .ic, .card h2 > .ic:first-child { display: inline-block; width: 20px; height: 20px; vertical-align: -3px; color: var(--accent); margin-inline-end: 2px; }
