/* ==========================================================================
   ShellingShelling - Coastal Marine Theme & Design System
   Modern Oceanic Aesthetic with Glassmorphism, Micro-Animations & Typography
   ========================================================================== */

:root {
  /* Coastal Palette */
  --bg-dark: #050d18;
  --bg-deep-ocean: #091726;
  --bg-surface: rgba(14, 30, 48, 0.72);
  --bg-surface-hover: rgba(22, 45, 71, 0.85);
  --bg-card: rgba(16, 35, 56, 0.6);
  --border-glass: rgba(125, 211, 252, 0.16);
  --border-glass-hover: rgba(125, 211, 252, 0.35);

  /* Primary Accent: Tropical Seafoam & Azure Glow */
  --accent-cyan: #14b8a6;
  --accent-cyan-light: #2dd4bf;
  --accent-teal: #14b8a6;
  --accent-teal-light: #2dd4bf;
  --accent-azure: #38bdf8;
  --accent-coral: #d96b52;
  --accent-coral-hover: #c45840;
  --accent-sand: #fef3c7;
  --accent-gold: #fbbf24;

  /* Redesign Foundations: Warm off-white reading surfaces, deep ocean teal, sand */
  --surface-warm: #fbf9f5;
  --surface-warm-elevated: #f5f2ea;
  --surface-warm-card: #ffffff;
  --teal-action: #0c5a6f;
  --teal-action-hover: #094757;
  --teal-text: #072e39;
  --sand-accent: #e5dac9;
  --sand-border: #ded3c1;

  /* Text & Contrast */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dark: #0f172a;

  /* Typography */
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;

  /* Shadows & Elevations */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 45px rgba(0, 0, 0, 0.6);
  --shadow-cyan-glow: 0 0 24px rgba(20, 184, 166, 0.28);
  --shadow-azure-glow: 0 0 30px rgba(56, 189, 248, 0.22);

  /* Transitions */
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Base & Resets
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

img, svg {
  max-width: 100%;
}

table {
  max-width: 100%;
}

/* Offset for sticky header on anchors and ID targets */
:target,
section[id],
article[id],
div[id],
h1[id],
h2[id],
h3[id],
main [id] {
  scroll-margin-top: 5.5rem;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* ==========================================================================
   Accessible Links & Global States (WCAG AAA Contrast on Navy Background)
   ========================================================================== */
a {
  color: var(--accent-azure);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(56, 189, 248, 0.45);
  transition: color 0.2s var(--ease-smooth), text-decoration-color 0.2s var(--ease-smooth);
}

a:visited {
  color: #7dd3fc;
  text-decoration-color: rgba(125, 211, 252, 0.45);
}

a:hover,
a:focus {
  color: #ffffff;
  text-decoration-color: #ffffff;
}

a:focus-visible {
  outline: 2px solid var(--accent-azure);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Interactive navigation/buttons where underline is not wanted by default */
.brand-logo,
.nav-link,
.btn,
.btn-link,
.sample-btn,
.breadcrumb a,
.footer-links a,
.card-guide-link,
.shell-directory-card,
.beach-card-link,
.compare-card-link {
  text-decoration: none;
}

.breadcrumb a:hover,
.footer-links a:hover,
.card-guide-link:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--accent-azure);
  outline-offset: 3px;
}

.btn:focus-visible,
.nav-link:focus-visible,
.brand-logo:focus-visible,
.nav-toggle:focus-visible {
  outline: 2px solid var(--accent-azure);
  outline-offset: 2px;
}

/* Ambient Background Lights */
.ocean-ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.28;
  animation: floatOrb 22s ease-in-out infinite alternate;
}

.orb-1 {
  top: -10%;
  left: 15%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, #0284c7, transparent 70%);
}

.orb-2 {
  top: 45%;
  right: -5%;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, #0d9488, transparent 70%);
  animation-duration: 28s;
  animation-delay: -7s;
}

.orb-3 {
  bottom: 5%;
  left: 5%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #fb7185, transparent 70%);
  opacity: 0.15;
  animation-duration: 25s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.08); }
  100% { transform: translate(-40px, 70px) scale(0.95); }
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Header & Nav
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(5, 13, 24, 0.82);
  border-bottom: 1px solid var(--border-glass);
  transition: all 0.3s var(--ease-smooth);
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: nowrap;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--text-primary);
  flex-shrink: 0;
}

.logo-icon {
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.5));
  transition: transform 0.4s var(--ease-smooth);
}

.brand-logo:hover .logo-icon {
  transform: rotate(15deg) scale(1.1);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 40%, var(--accent-azure) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

.brand-tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-cyan-light);
  font-weight: 600;
  white-space: nowrap;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.85rem;
  border-radius: 9999px;
  border: 1px solid transparent;
  transition: all 0.25s var(--ease-smooth);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-link.active,
.nav-link[aria-current="page"],
.nav-link[aria-current="location"],
.nav-link[aria-current] {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
}

.nav-link.nav-link-identify {
  border-color: rgba(217, 107, 82, 0.35);
  color: #fca5a5;
}

.nav-link.nav-link-identify:hover {
  background: rgba(217, 107, 82, 0.15);
  color: #ffffff;
}

.nav-link.nav-link-identify.active,
.nav-link.nav-link-identify[aria-current="page"],
.nav-link.nav-link-identify[aria-current="location"],
.nav-link.nav-link-identify[aria-current] {
  color: #ffffff;
  background: rgba(217, 107, 82, 0.24);
  border-color: #d96b52;
}

/* Base nav-menu flex-wrap nowrap preserved for testing and accessibility */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

.has-dropdown > .nav-link::after {
  content: '▾';
  font-size: 0.75rem;
  color: var(--accent-azure);
  transition: transform 0.25s var(--ease-smooth);
}

.has-dropdown:hover > .nav-link::after,
.has-dropdown:focus-within > .nav-link::after {
  transform: rotate(180deg);
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 235px;
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: rgba(6, 17, 30, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 20px rgba(56, 189, 248, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s var(--ease-smooth), transform 0.2s var(--ease-smooth), visibility 0.2s;
  pointer-events: none;
  z-index: 110;
}

.has-dropdown:hover .nav-dropdown,
.has-dropdown:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-link {
  display: flex;
  align-items: center;
  padding: 0.55rem 0.85rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
  white-space: nowrap;
  transition: all 0.2s var(--ease-smooth);
}

.dropdown-link:hover,
.dropdown-link:focus {
  color: #ffffff;
  background: rgba(56, 189, 248, 0.12);
  transform: translateX(3px);
}

.dropdown-link:focus-visible {
  outline: 2px solid var(--accent-azure);
  outline-offset: -2px;
}

/* Secondary Menu Drawer & Backdrop (Full viewport height, safe area, independent scroll) */
.menu-backdrop {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(4, 10, 18, 0.68);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s var(--ease-smooth), visibility 0.25s;
}

.menu-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Drawer Dialog Presentation */
.nav-menu[role="dialog"] {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(340px, 86vw);
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  background: #091726;
  border-left: 1px solid var(--border-glass);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.65);
  z-index: 1060;
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 1.25rem 1.25rem calc(2rem + env(safe-area-inset-bottom, 0px));
}

.nav-menu[role="dialog"].open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}


.nav-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.85rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(125, 211, 252, 0.15);
}

.nav-drawer-brand {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
}

.nav-drawer-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  line-height: 1;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s;
}

.nav-drawer-close:hover,
.nav-drawer-close:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  outline: 2px solid var(--accent-azure);
}

.nav-drawer-content {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.nav-drawer-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.drawer-group-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--accent-cyan-light);
  margin-bottom: 0.35rem;
  padding-left: 0.4rem;
}

.drawer-link {
  display: block;
  padding: 0.55rem 0.75rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s var(--ease-smooth);
}

.drawer-link:hover,
.drawer-link:focus-visible {
  color: #ffffff;
  background: rgba(56, 189, 248, 0.1);
  transform: translateX(3px);
  outline: 2px solid var(--accent-azure);
  outline-offset: -2px;
}

.nav-drawer-sound {
  padding-top: 0.75rem;
  border-top: 1px solid rgba(125, 211, 252, 0.12);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  width: auto;
  min-width: 44px;
  height: 44px;
  padding: 0 0.85rem;
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.25s var(--ease-smooth);
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-glass-hover);
  outline: 2px solid var(--accent-azure);
  outline-offset: 2px;
}

.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 22px;
  height: 16px;
  flex-shrink: 0;
}

.nav-toggle .nav-bar,
.nav-toggle-bars span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transform-origin: center;
  transition: transform 0.25s var(--ease-smooth), opacity 0.25s var(--ease-smooth);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1),
.nav-toggle.open .nav-toggle-bars span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2),
.nav-toggle.open .nav-toggle-bars span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3),
.nav-toggle.open .nav-toggle-bars span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-toggle-text {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  line-height: 1;
  white-space: nowrap;
}

/* Mobile Fixed Bottom Navigation Bar */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .nav-desktop {
    display: none !important;
  }

  .mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: calc(3.85rem + env(safe-area-inset-bottom, 0px));
    padding: 0 0.25rem env(safe-area-inset-bottom, 0px);
    background: #081422;
    border-top: 1px solid rgba(125, 211, 252, 0.2);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.45);
    align-items: center;
    justify-content: space-around;
    box-sizing: border-box;
  }

  body {
    padding-bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
  }

  /* 4 Equal usable hit areas with >= 44x44px touch targets */
  .bottom-nav-item {
    flex: 1 1 0;
    max-width: 25%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.18rem;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.28rem 0.2rem;
    margin: 0.25rem 0.15rem;
    min-width: 0;
    min-height: 44px;
    height: calc(100% - 0.5rem);
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    position: relative;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
  }

  @media (max-width: 360px) {
    .bottom-nav-item {
      padding: 0.24rem 0.08rem;
      margin: 0.2rem 0.06rem;
      font-size: 0.67rem;
    }
  }

  /* Inactive Identify uses the exact same neutral visual language */
  .bottom-nav-identify {
    color: #94a3b8;
    background: transparent;
    border-color: transparent;
  }

  .bottom-nav-identify .bottom-nav-icon {
    background: transparent;
    border-radius: 0;
    border: none;
    padding: 0;
  }

  /* Hover state: only on hover-capable pointer devices */
  @media (hover: hover) {
    .bottom-nav-item:hover:not(.active):not([aria-current]) {
      color: #f1f5f9;
      background: rgba(255, 255, 255, 0.05);
    }
  }

  /* Touch / Click press feedback */
  .bottom-nav-item:active {
    transform: scale(0.95);
    transition: transform 0.08s ease;
  }

  /* Keyboard focus ring separate from selection state */
  .bottom-nav-item:focus-visible {
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
  }

  .bottom-nav-item:focus:not(:focus-visible) {
    outline: none;
  }

  /* Unified Selected Treatment across Home, Explore, Identify, Collection */
  .bottom-nav-item.active,
  .bottom-nav-item[aria-current="page"],
  .bottom-nav-item[aria-current="location"],
  .bottom-nav-item[aria-current] {
    color: #ffffff;
    font-weight: 650;
    background: rgba(56, 189, 248, 0.16);
    border: 1px solid rgba(56, 189, 248, 0.38);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }

  /* Persistent short top indicator bar (non-color cue) */
  .bottom-nav-item.active::before,
  .bottom-nav-item[aria-current="page"]::before,
  .bottom-nav-item[aria-current="location"]::before,
  .bottom-nav-item[aria-current]::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: #38bdf8;
    box-shadow: 0 1px 6px rgba(56, 189, 248, 0.7);
  }

  /* Active Identify shares the exact unified selected treatment */
  .bottom-nav-identify.active,
  .bottom-nav-identify[aria-current="page"],
  .bottom-nav-identify[aria-current="location"],
  .bottom-nav-identify[aria-current] {
    color: #ffffff;
    font-weight: 650;
    background: rgba(56, 189, 248, 0.16);
    border-color: rgba(56, 189, 248, 0.38);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }

  .bottom-nav-identify.active .bottom-nav-icon,
  .bottom-nav-identify[aria-current="page"] .bottom-nav-icon,
  .bottom-nav-identify[aria-current="location"] .bottom-nav-icon,
  .bottom-nav-identify[aria-current] .bottom-nav-icon {
    background: transparent;
    border: none;
    padding: 0;
  }

  .bottom-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
  }

  .bottom-nav-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.2;
  }

  .bottom-nav-item.active .bottom-nav-icon svg,
  .bottom-nav-item[aria-current] .bottom-nav-icon svg {
    stroke: #38bdf8;
  }

  .bottom-nav-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.15;
    max-width: 100%;
    letter-spacing: -0.01em;
  }

  @media (prefers-reduced-motion: reduce) {
    .bottom-nav-item {
      transition: none !important;
    }
    .bottom-nav-item:active {
      transform: none !important;
    }
  }
}

@media (min-width: 769px) {
  .mobile-bottom-nav {
    display: none !important;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  white-space: nowrap;
}

/* ==========================================================================
   Buttons & Pills
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  border-radius: 9999px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.3s var(--ease-smooth);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), #0284c7);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(20, 184, 166, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(20, 184, 166, 0.5);
  background: linear-gradient(135deg, var(--accent-cyan-light), #0ea5e9);
}

.btn-accent {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #031525;
  font-weight: 700;
  box-shadow: var(--shadow-azure-glow);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(56, 189, 248, 0.5);
  background: linear-gradient(135deg, #38bdf8, #7dd3fc);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 0.85rem 1.85rem;
  font-size: 1.05rem;
}

.btn-sm {
  padding: 0.35rem 0.8rem;
  font-size: 0.82rem;
}

.btn-block {
  width: 100%;
}

.btn-outline-danger {
  background: transparent;
  border: 1px solid rgba(251, 113, 133, 0.35);
  color: var(--accent-coral);
}

.btn-outline-danger:hover {
  background: rgba(251, 113, 133, 0.15);
  border-color: var(--accent-coral);
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(20, 184, 166, 0.14);
  border: 1px solid rgba(20, 184, 166, 0.35);
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-cyan-light);
  margin-bottom: 1.25rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-cyan-light);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-cyan-light);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(45, 212, 191, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(45, 212, 191, 0); }
}

/* Glass Panel Utility */
.glass-panel {
  background: var(--bg-surface);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  transition: border-color 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  position: relative;
  padding: 5rem 0 4rem;
  z-index: 1;
}

.hero-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3.5rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 3.25rem;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #ffffff 40%, #e0f2fe 70%, var(--accent-azure) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 580px;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  border-top: 1px solid var(--border-glass);
  padding-top: 1.75rem;
}

.hero-stat-card {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  font-family: var(--font-sans);
  background: linear-gradient(135deg, #ffffff, var(--accent-cyan-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 0.15rem;
}

.hero-visual {
  position: relative;
}

.hero-image-wrapper {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 50px rgba(56, 189, 248, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.18);
  aspect-ratio: 16 / 10;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-smooth);
}

.hero-image-wrapper:hover .hero-img {
  transform: scale(1.04);
}

.hero-overlay-card {
  position: absolute;
  bottom: 1.25rem;
  left: 1.25rem;
  right: 1.25rem;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(5, 13, 24, 0.8);
}

.card-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.card-title-sm {
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
}

.card-subtitle-sm {
  font-size: 0.8rem;
  color: var(--accent-cyan-light);
}

/* ==========================================================================
   Homepage Redesign Components (Session 2)
   ========================================================================== */

/* Hero Secondary Link */
.hero-secondary-link {
  color: var(--accent-azure);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: underline;
  text-underline-offset: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.6rem 0.5rem;
  transition: color 0.2s ease;
}
.hero-secondary-link:hover,
.hero-secondary-link:focus-visible {
  color: #ffffff;
}

/* Home Search */
.home-search-section {
  padding: 1rem 0 2rem;
}
.home-search-panel {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.5rem;
  border-radius: 20px;
  background: rgba(10, 24, 40, 0.75);
}
.home-search-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.home-search-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cyan-light);
}
.home-search-input-wrapper,
.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(5, 13, 24, 0.9);
  border: 1px solid var(--border-glass);
  border-radius: 9999px;
  padding: 0.35rem 0.5rem 0.35rem 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.home-search-input-wrapper:focus-within,
.search-input-wrapper:focus-within {
  border-color: var(--accent-azure);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
}
.home-search-input-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1;
  min-width: 0;
}
.home-search-panel .search-icon,
.home-search-icon,
.home-search-input-group .search-icon {
  position: static !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  font-size: 1.1rem;
  color: var(--text-muted);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.home-search-field {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font-sans);
  outline: none;
  min-width: 0;
  padding: 0.5rem 0;
}
.home-search-field::placeholder {
  color: var(--text-muted);
}
.search-submit-btn {
  padding: 0.6rem 1.4rem;
  flex-shrink: 0;
}

/* Explore by Shape */
.shape-browse-section {
  padding: 2.5rem 0;
}
.shape-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.shape-card {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text-primary);
  transition: transform 0.25s var(--ease-smooth), border-color 0.25s var(--ease-smooth);
}
.shape-card:hover,
.shape-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--accent-azure);
}
.shape-img-box {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
}
.shape-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.shape-card:hover .shape-img {
  transform: scale(1.05);
}
.shape-card-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}
.shape-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
}
.shape-taxa {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.shape-link-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-azure);
  margin-top: auto;
  padding-top: 0.5rem;
}

/* Featured Species */
.featured-species-section {
  padding: 2.5rem 0;
}
.featured-species-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.featured-shell-card {
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.25s var(--ease-smooth), border-color 0.25s var(--ease-smooth);
}
.featured-shell-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-azure);
}
.card-full-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}
.featured-img-box {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
}
.featured-shell-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.featured-shell-card:hover .featured-shell-img {
  transform: scale(1.06);
}
.featured-shell-body {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}
.featured-common-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
}
.featured-sci-name {
  font-style: italic;
  font-size: 0.85rem;
  color: var(--accent-cyan-light);
}
.featured-trait {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-top: 0.35rem;
  flex: 1;
}
.featured-guide-action {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-azure);
  margin-top: 0.75rem;
}

/* Home Collection Preview */
.home-collection-section {
  padding: 2rem 0;
}
.home-collection-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding: 2rem;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(14, 30, 48, 0.85), rgba(10, 20, 32, 0.95));
  border: 1px solid var(--border-glass);
}
.home-collection-info {
  max-width: 600px;
}
.home-collection-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Supporting Hubs Grid */
.home-supporting-section {
  padding: 2rem 0;
}
.supporting-hubs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.supporting-hub-card {
  padding: 1.75rem;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.hub-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.hub-icon {
  font-size: 2rem;
}
.hub-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}
.hub-subtitle {
  font-size: 0.8rem;
  color: var(--accent-cyan-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.hub-desc {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
  flex: 1;
}
.hub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* Ethics Callout */
.home-ethics-section {
  padding: 2rem 0 3rem;
}
.ethics-callout {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.75rem 2rem;
  border-radius: 20px;
  background: rgba(13, 33, 54, 0.75);
  border-left: 4px solid var(--accent-cyan);
}
.ethics-icon {
  font-size: 2.2rem;
  flex-shrink: 0;
}
.ethics-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.4rem;
}
.ethics-desc {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Legacy Anchor targets */
.legacy-anchor {
  position: relative;
  top: -4rem;
  visibility: hidden;
}

@media (max-width: 900px) {
  .shape-grid,
  .featured-species-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .supporting-hubs-grid {
    grid-template-columns: 1fr;
  }
  .home-collection-panel {
    flex-direction: column;
    align-items: flex-start;
  }
  .home-collection-actions {
    flex-direction: row;
    width: 100%;
  }
}

@media (max-width: 600px) {
  .hero-section {
    padding: 2rem 0 1.5rem;
  }
  .hero-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .hero-title {
    font-size: 2.15rem;
  }
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.25rem;
  }
  .hero-cta-group {
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }
  .home-search-input-wrapper,
  .search-input-wrapper {
    flex-direction: column;
    border-radius: 18px;
    padding: 0.75rem;
    align-items: stretch;
    gap: 0.75rem;
  }
  .home-search-input-group {
    width: 100%;
    min-width: 0;
  }
  .search-submit-btn {
    width: 100%;
  }
  .home-collection-actions {
    flex-direction: column;
  }
  .ethics-callout {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem;
  }
}

@media (max-width: 360px) {
  .shape-grid,
  .featured-species-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Section Common
   ========================================================================== */
.section {
  padding: 5rem 0;
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-cyan-light);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2.35rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.85rem;
  letter-spacing: -0.015em;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Tides & Radar Section
   ========================================================================== */
.tides-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 2rem;
}

.tide-card {
  padding: 2.25rem;
}

.tide-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.custom-select {
  background: rgba(10, 22, 36, 0.85);
  color: #ffffff;
  border: 1px solid var(--border-glass);
  padding: 0.65rem 1.15rem;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  min-width: 280px;
  transition: all 0.25s var(--ease-smooth);
}

.custom-select:focus {
  border-color: var(--accent-azure);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

.condition-badge {
  text-align: right;
  padding: 0.5rem 1rem;
  background: rgba(20, 184, 166, 0.15);
  border: 1px solid rgba(20, 184, 166, 0.35);
  border-radius: 14px;
}

.score-stars {
  display: block;
  color: var(--accent-gold);
  font-size: 1rem;
  letter-spacing: 0.1em;
}

.score-text {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-cyan-light);
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.metric-box {
  background: rgba(9, 23, 38, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
}

.metric-icon {
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}

.metric-name {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.metric-val {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0.2rem 0;
}

.metric-val.highlight {
  color: var(--accent-cyan-light);
  text-shadow: 0 0 12px rgba(45, 212, 191, 0.4);
}

.metric-sub {
  font-size: 0.74rem;
  color: var(--accent-azure);
  font-weight: 500;
}

.chart-wrapper {
  background: rgba(6, 15, 26, 0.75);
  border-radius: 16px;
  border: 1px solid var(--border-glass);
  padding: 1.25rem;
  position: relative;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.chart-labels .active-time {
  color: var(--accent-azure);
  font-weight: 700;
}

#tideChartCanvas {
  width: 100%;
  height: 160px;
  display: block;
}

.chart-legend {
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.low-tide-dot {
  background-color: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}

.current-tide-dot {
  background-color: var(--accent-coral);
  box-shadow: 0 0 8px var(--accent-coral);
}

.advisory-card {
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-heading {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1.25rem;
}

.tips-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tips-list li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.tips-list li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--accent-azure);
  font-size: 0.9rem;
}

.alert-box {
  margin-top: 1.5rem;
  background: rgba(251, 113, 133, 0.12);
  border: 1px solid rgba(251, 113, 133, 0.3);
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.alert-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.alert-text {
  font-size: 0.82rem;
  color: #fecdd3;
  line-height: 1.5;
}

/* ==========================================================================
   Shell Field Guide & Identification
   ========================================================================== */
.guide-controls {
  padding: 1.5rem 2rem;
  margin-bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-box .search-icon {
  position: absolute;
  left: 1.25rem;
  font-size: 1.1rem;
  color: var(--text-muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  background: rgba(7, 18, 30, 0.85);
  border: 1px solid var(--border-glass);
  border-radius: 9999px;
  padding: 0.85rem 3rem 0.85rem 3.25rem;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 1rem;
  outline: none;
  transition: all 0.25s var(--ease-smooth);
}

.search-box input:focus {
  border-color: var(--accent-azure);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.28);
}

.clear-btn {
  position: absolute;
  right: 1.25rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  display: none;
  transition: color 0.2s;
}

.clear-btn:hover {
  color: #ffffff;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.5rem 1.15rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.25s var(--ease-smooth);
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.filter-btn.active {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.25), rgba(56, 189, 248, 0.25));
  border-color: var(--accent-azure);
  color: #ffffff;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.25);
}

/* Shell Cards Grid */
.shells-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75rem;
}

.shell-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  border: 1px solid var(--border-glass);
  transition: transform 0.35s var(--ease-smooth), box-shadow 0.35s var(--ease-smooth), border-color 0.35s var(--ease-smooth);
}

.shell-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glass-hover);
  box-shadow: var(--shadow-lg), var(--shadow-cyan-glow);
}

.shell-img-box {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: #091726;
  overflow: hidden;
}

.shell-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-smooth);
}

.shell-card:hover .shell-img {
  transform: scale(1.08);
}

.rarity-tag {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.rarity-tag.grail {
  background: rgba(251, 191, 36, 0.25);
  border: 1px solid rgba(251, 191, 36, 0.6);
  color: #fef08a;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}

.rarity-tag.rare {
  background: rgba(251, 113, 133, 0.25);
  border: 1px solid rgba(251, 113, 133, 0.6);
  color: #fecdd3;
}

.rarity-tag.uncommon {
  background: rgba(56, 189, 248, 0.25);
  border: 1px solid rgba(56, 189, 248, 0.6);
  color: #bae6fd;
}

.rarity-tag.common {
  background: rgba(45, 212, 191, 0.25);
  border: 1px solid rgba(45, 212, 191, 0.6);
  color: #99f6e4;
}

.shell-info {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.shell-name {
  font-family: var(--font-serif);
  font-size: 1.22rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.2rem;
}

.shell-sci-name {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--accent-azure);
  margin-bottom: 0.85rem;
}

.shell-meta-row {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-glass);
  padding-top: 0.75rem;
  margin-top: auto;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.shell-meta-val {
  color: var(--text-secondary);
  font-weight: 600;
}

/* ==========================================================================
   Shelling Spots Section
   ========================================================================== */
.spots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.spot-card {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--border-glass);
  transition: all 0.3s var(--ease-smooth);
}

.spot-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: var(--shadow-lg), var(--shadow-azure-glow);
}

.spot-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-azure);
  margin-bottom: 0.75rem;
}

.spot-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.4rem;
}

.spot-location {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.spot-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.spot-highlights {
  background: rgba(6, 15, 26, 0.6);
  border-radius: 12px;
  padding: 0.9rem;
  margin-bottom: 1.25rem;
}

.spot-highlight-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  padding: 0.25rem 0;
}

.spot-highlight-label {
  color: var(--text-muted);
}

.spot-highlight-val {
  color: var(--accent-cyan-light);
  font-weight: 600;
}

/* ==========================================================================
   Collection Tracker Section
   ========================================================================== */
.tracker-layout {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 2rem;
}

.tracker-form-card {
  padding: 2.25rem;
}

.card-heading-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.badge-sub {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  background: rgba(20, 184, 166, 0.15);
  color: var(--accent-cyan-light);
  border-radius: 9999px;
  font-weight: 600;
}

.log-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.form-row > .form-group {
  min-width: 0;
}

.form-row input,
.form-row textarea,
.form-row select,
.form-row .custom-select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.form-group label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.form-group input,
.form-group textarea {
  background: rgba(6, 15, 26, 0.85);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 0.65rem 1rem;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.25s var(--ease-smooth);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-azure);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.25);
}

.tracker-list-card {
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
}

.tracker-stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-glass);
}

.tracker-stat {
  display: flex;
  flex-direction: column;
}

.tracker-stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  font-family: var(--font-sans);
  background: linear-gradient(135deg, #ffffff, var(--accent-azure));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tracker-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.log-entries-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 0.4rem;
}

/* Custom Scrollbar */
.log-entries-container::-webkit-scrollbar {
  width: 6px;
}
.log-entries-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 9999px;
}
.log-entries-container::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.3);
  border-radius: 9999px;
}

.log-entry-item {
  background: rgba(9, 23, 38, 0.75);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 1.15rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  transition: all 0.25s var(--ease-smooth);
}

.log-entry-item:hover {
  background: rgba(14, 33, 54, 0.9);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateX(4px);
}

.entry-main {
  flex-grow: 1;
}

.entry-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.entry-species {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.entry-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-azure);
  font-weight: 600;
}

.entry-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  gap: 1rem;
  margin-bottom: 0.4rem;
}

.entry-notes {
  font-size: 0.84rem;
  color: var(--text-secondary);
  font-style: italic;
}

.delete-entry-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 6px;
  transition: all 0.2s;
}

.delete-entry-btn:hover {
  color: var(--accent-coral);
  background: rgba(251, 113, 133, 0.15);
}

.empty-log-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
}

/* ==========================================================================
   Ethics & Pledge Section
   ========================================================================== */
.ethics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.ethics-card {
  padding: 2.5rem;
}

.ethics-card-icon {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.ethics-card h3 {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  color: #ffffff;
  margin-bottom: 0.85rem;
}

.ethics-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.checklist li {
  position: relative;
  padding-left: 1.75rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-cyan-light);
  font-weight: 800;
}

/* ==========================================================================
   Modal Dialog
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 8, 16, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-smooth);
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.5rem;
  position: relative;
  transform: translateY(30px) scale(0.96);
  transition: transform 0.35s var(--ease-smooth);
  border: 1px solid rgba(125, 211, 252, 0.35);
  box-shadow: var(--shadow-lg), 0 0 60px rgba(56, 189, 248, 0.25);
}

.modal-backdrop.open .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: #ffffff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: rgba(251, 113, 133, 0.25);
  color: var(--accent-coral);
  transform: rotate(90deg);
}

.modal-hero {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.modal-img-wrap {
  width: 240px;
  height: 240px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.modal-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.25rem;
}

.modal-sci-name {
  font-size: 1rem;
  font-style: italic;
  color: var(--accent-azure);
  margin-bottom: 1.25rem;
}

.modal-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  background: rgba(6, 15, 26, 0.6);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.modal-detail-item {
  display: flex;
  flex-direction: column;
}

.modal-detail-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.modal-detail-val {
  font-size: 0.95rem;
  color: #ffffff;
  font-weight: 600;
  margin-top: 0.2rem;
}

.modal-section-h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-cyan-light);
  margin-bottom: 0.5rem;
}

.modal-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

/* ==========================================================================
   Cloud Sync Banner & Authentication Dialog
   ========================================================================== */
.sync-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 1.75rem;
  margin-bottom: 2rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(14, 30, 48, 0.8), rgba(9, 23, 38, 0.9));
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s var(--ease-smooth);
}

.sync-banner.synced {
  border-color: rgba(20, 184, 166, 0.4);
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.12), rgba(14, 30, 48, 0.8));
}

.sync-banner-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.sync-icon-badge {
  font-size: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sync-heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.sync-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  max-width: 620px;
}

.sync-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.auth-dialog {
  max-width: 480px;
  padding: 2.25rem;
  text-align: center;
}

.auth-header {
  margin-bottom: 1.75rem;
}

.auth-icon {
  font-size: 2.75rem;
  display: inline-block;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 16px rgba(56, 189, 248, 0.4));
}

.auth-header h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: #ffffff;
  margin-bottom: 0.35rem;
}

.auth-header p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  text-align: left;
}

.auth-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.25rem;
}

.code-input {
  font-size: 1.8rem !important;
  letter-spacing: 0.35em !important;
  text-align: center !important;
  font-family: monospace !important;
  font-weight: 700 !important;
  padding: 0.75rem 0.5rem !important;
}

.auth-resend-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}

.btn-link {
  background: none;
  border: none;
  color: var(--accent-azure);
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.btn-link:hover {
  color: var(--accent-cyan-light);
}

.auth-feedback {
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.4;
  text-align: center;
}

.auth-feedback.success {
  background: rgba(20, 184, 166, 0.15);
  border: 1px solid rgba(20, 184, 166, 0.4);
  color: #5eead4;
}

.auth-feedback.error {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fda4af;
}

@media (max-width: 768px) {
  .sync-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem;
  }
  .sync-banner-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .sync-banner-actions .btn {
    width: 100%;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-glass);
  background: rgba(3, 8, 16, 0.95);
  padding: 4rem 0 2rem;
  position: relative;
  z-index: 1;
}

.footer-content {
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) minmax(0, 1.9fr);
  gap: 3.5rem;
  margin-bottom: 3rem;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-text {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 440px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  justify-content: flex-end;
  gap: 3rem;
  flex-wrap: wrap;
}

.link-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 140px;
}

.link-group h2,
.link-group h4,
.footer-heading {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #ffffff;
  margin-bottom: 0.25rem;
}

.link-group a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.link-group a:hover {
  color: var(--accent-azure);
}

.deploy-status {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  background: rgba(20, 184, 166, 0.2);
  color: var(--accent-cyan-light);
  border: 1px solid rgba(20, 184, 166, 0.4);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Shell Identification Suite: Mode Selector & Photo Scanner
   ========================================================================== */
.id-mode-selector-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.id-mode-selector {
  display: inline-flex;
  padding: 0.4rem;
  background: rgba(10, 24, 40, 0.85);
  border: 1px solid var(--border-glass);
  border-radius: 9999px;
  gap: 0.5rem;
}

.id-mode-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.65rem 1.6rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.25s var(--ease-smooth);
}

.id-mode-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.id-mode-btn.active {
  background: linear-gradient(135deg, var(--accent-cyan), #0284c7);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(20, 184, 166, 0.4);
}

.mode-anchor {
  display: block;
  position: relative;
  top: -5.5rem;
  height: 0;
  width: 0;
  visibility: hidden;
  scroll-margin-top: 5.5rem;
}

#viewPhotoScanner,
#viewWizard {
  scroll-margin-top: 5.5rem;
}

/* Photo Actions Toolbar */
.photo-actions-toolbar {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: rgba(8, 20, 36, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 16px;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.photo-actions-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.photo-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.85rem;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s var(--ease-smooth);
}

.photo-action-btn:hover {
  transform: translateY(-2px);
}

.photo-btn-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.photo-actions-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.75rem 0 0 0;
}

.id-view-panel {
  padding: 2.5rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: var(--shadow-lg), var(--shadow-azure-glow);
}

/* Scanner Layout */
.scanner-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.scanner-dropzone {
  border: 2px dashed rgba(56, 189, 248, 0.35);
  border-radius: 20px;
  background: rgba(6, 16, 28, 0.7);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--ease-smooth);
}

.scanner-dropzone:hover,
.scanner-dropzone.dragover {
  border-color: var(--accent-cyan-light);
  background: rgba(14, 33, 54, 0.85);
  box-shadow: 0 0 25px rgba(45, 212, 191, 0.25);
  transform: translateY(-2px);
}

.scanner-dropzone:focus-visible {
  outline: 3px solid var(--accent-cyan-light);
  outline-offset: 4px;
  border-color: var(--accent-cyan-light);
  background: rgba(14, 33, 54, 0.85);
  box-shadow: 0 0 25px rgba(45, 212, 191, 0.35);
}

.dropzone-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  display: block;
}

.dropzone-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.25rem;
}

.dropzone-content p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.dropzone-badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-azure);
  font-weight: 600;
}

/* Screen-reader-only text (live regions such as #scanLiveAnnouncement, #radarStatusLive) */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Opt-in AI identification panel (identify result card) */
.ai-identify-panel {
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid var(--border-glass-hover);
  background: var(--bg-card);
}

.ai-identify-panel h4 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.ai-identify-panel p {
  margin: 0 0 0.6rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.ai-identify-panel .ai-identify-privacy {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.ai-identify-status:not(:empty) {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.ai-identify-result .ai-identify-title {
  font-size: 1.2rem;
}

.ai-identify-result .ai-identify-sci {
  font-style: italic;
  margin-bottom: 0.4rem;
}

.ai-confidence {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  border: 1px solid currentColor;
}

.ai-confidence-high { color: var(--accent-teal-light); }
.ai-confidence-medium { color: var(--accent-gold); }
.ai-confidence-low { color: var(--text-muted); }
html[data-theme="daylight"] .ai-confidence-medium { color: #92400e; }

.ai-identify-result .ai-identify-label {
  margin: 0.6rem 0 0.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.ai-identify-traits {
  margin: 0 0 0.4rem 1.1rem;
  padding: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.ai-identify-actions,
.ai-identify-alts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  margin-top: 0.5rem;
}

/* Photo crop step (identify) */
.photo-crop-panel {
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  background: var(--bg-surface);
  padding: 1rem;
  scroll-margin-top: 5.5rem; /* clear the sticky header */
}

.photo-crop-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.25rem;
}

.photo-crop-header p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 0 0 0.75rem;
  line-height: 1.45;
}

.crop-ratio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.crop-ratio-btn {
  min-height: 40px;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  border: 1px solid var(--border-glass-hover);
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.crop-ratio-btn.active {
  background: var(--accent-teal);
  border-color: var(--accent-teal);
  color: #04201c;
}

.crop-ratio-btn:focus-visible,
.photo-crop-box:focus-visible {
  outline: 3px solid var(--accent-azure);
  outline-offset: 2px;
}

.photo-crop-stage {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 12px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  line-height: 0;
}

.photo-crop-stage img {
  display: block;
  max-width: 100%;
  max-height: min(60vh, 520px);
  width: auto;
  height: auto;
  pointer-events: none;
}

.photo-crop-box {
  position: absolute;
  box-sizing: border-box;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
  cursor: move;
  touch-action: none;
}

.crop-handle {
  position: absolute;
  width: 28px;
  height: 28px;
  margin: -14px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--accent-teal);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  touch-action: none;
}

.crop-handle[data-handle="nw"] { left: 0; top: 0; cursor: nwse-resize; }
.crop-handle[data-handle="ne"] { left: 100%; top: 0; cursor: nesw-resize; }
.crop-handle[data-handle="sw"] { left: 0; top: 100%; cursor: nesw-resize; }
.crop-handle[data-handle="se"] { left: 100%; top: 100%; cursor: nwse-resize; }

.photo-crop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.photo-crop-actions .btn-primary {
  flex: 1 1 auto;
}

.scanner-photo-row-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Scanner Preview with Laser Animation */
.scanner-preview-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scanner-preview-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scanner-laser {
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, #2dd4bf, #38bdf8, transparent);
  box-shadow: 0 0 16px #38bdf8, 0 0 25px #2dd4bf;
  top: 0;
  animation: scanLaser 2s linear infinite alternate;
}

@keyframes scanLaser {
  0% { top: 5%; }
  100% { top: 92%; }
}

.scanner-status-overlay {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  background: rgba(5, 13, 24, 0.88);
  backdrop-filter: blur(12px);
  padding: 0.6rem 1rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.84rem;
  color: #ffffff;
  border: 1px solid var(--border-glass);
}

.spinner-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-cyan-light);
  box-shadow: 0 0 10px var(--accent-cyan-light);
  animation: pulseDot 1.2s infinite;
}

/* Sample Shells Row */
.sample-shells-row {
  margin-top: 1.25rem;
}

.sample-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}

.sample-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sample-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s var(--ease-smooth);
}

.sample-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-azure);
  color: #ffffff;
  transform: translateY(-2px);
}

/* Scanner Results Column */
.scan-welcome-state {
  text-align: center;
  padding: 3.5rem 2rem;
  background: rgba(6, 15, 26, 0.5);
  border-radius: 20px;
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
}

.scan-welcome-state h3 {
  color: #ffffff;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.scan-result-card {
  background: linear-gradient(135deg, rgba(14, 35, 60, 0.95), rgba(7, 18, 30, 0.95));
  border: 1px solid rgba(45, 212, 191, 0.45);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5), var(--shadow-cyan-glow);
}

.scan-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.scan-title-box {
  margin-bottom: 1.25rem;
}

.scan-species-title {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.15rem;
}

.scan-sci-title {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--accent-azure);
  margin-bottom: 0.6rem;
}

/* Palette Swatches */
.palette-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(6, 15, 26, 0.6);
  padding: 0.65rem 1rem;
  border-radius: 12px;
  margin-bottom: 1.25rem;
}

.palette-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.palette-swatches {
  display: flex;
  gap: 0.5rem;
}

.palette-chip {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.scan-diagnostic-box {
  margin-bottom: 1.25rem;
}

.scan-diagnostic-box h4 {
  font-size: 0.88rem;
  color: var(--accent-cyan-light);
  margin-bottom: 0.5rem;
}

/* Candidate Close Matches */
.candidate-box {
  border-top: 1px solid var(--border-glass);
  padding-top: 1rem;
  margin-bottom: 1.5rem;
}

.candidate-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.candidate-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.candidate-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.candidate-score {
  font-weight: 700;
  color: var(--accent-azure);
}

/* Coverage note */
.coverage-note {
  margin-top: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.coverage-note a {
  color: var(--accent-cyan-light);
  text-decoration: underline;
}

/* Photo scan notice */
.scan-notice {
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: rgba(45, 212, 191, 0.08);
  border-left: 3px solid var(--accent-cyan);
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  line-height: 1.45;
}

/* Candidate item detailed */
.candidate-item-detailed {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}
.candidate-trait {
  font-size: 0.76rem;
  color: var(--text-muted);
}
.candidate-link {
  font-size: 0.76rem;
  color: var(--accent-cyan-light);
  text-decoration: none;
  font-weight: 600;
  align-self: flex-end;
}
.candidate-link:hover {
  text-decoration: underline;
}

/* No-match box */
.no-match-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-top: 1.25rem;
  margin-bottom: 1rem;
}
.no-match-box strong {
  display: block;
  font-size: 0.92rem;
  color: #ffffff;
  margin-bottom: 0.35rem;
}
.no-match-box p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.45;
}
.no-match-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Wizard Candidate Multi-Results & Unsure Option */
.wizard-prompt {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.5;
}
.wizard-candidate {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-glass);
}
.wizard-candidate:last-of-type {
  border-bottom: none;
  margin-bottom: 0.5rem;
  padding-bottom: 0;
}
.trait-summary {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 0.5rem;
}
.wizard-option-card.wizard-unsure {
  border-style: dashed;
  opacity: 0.85;
}
.wizard-option-card.wizard-unsure:hover {
  opacity: 1;
}

/* Collection Tracker Photos */
.entry-photo-preview {
  margin-top: 0.75rem;
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-glass);
}

.entry-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn-remove-photo {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  border: none;
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
}

.entry-thumb-box {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
}

.entry-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   Shell Identification Wizard & Diagnostic Key
   ========================================================================== */
.wizard-container {
  padding: 2.5rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: var(--shadow-lg), var(--shadow-azure-glow);
}

.wizard-steps-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.wizard-step-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1.15rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: 9999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.3s var(--ease-smooth);
}

.wizard-step-pill.active {
  background: rgba(56, 189, 248, 0.16);
  border-color: var(--accent-azure);
  color: #ffffff;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #ffffff;
}

.wizard-step-pill.active .step-num {
  background: var(--accent-azure);
  color: #031525;
  font-weight: 800;
}

.wizard-step-line {
  flex-grow: 0.15;
  height: 2px;
  background: var(--border-glass);
}

.wizard-step-panel {
  margin-bottom: 2.25rem;
}

.wizard-question-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.35rem;
}

.wizard-question-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.wizard-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.wizard-option-card {
  background: rgba(8, 20, 34, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 1.25rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all 0.25s var(--ease-smooth);
  position: relative;
}

.wizard-option-card:hover {
  background: rgba(14, 33, 54, 0.85);
  border-color: rgba(56, 189, 248, 0.5);
  transform: translateY(-3px);
}

.wizard-option-card:focus-visible {
  outline: 3px solid var(--accent-cyan-light);
  outline-offset: 3px;
  border-color: var(--accent-cyan-light);
}

.wizard-option-card.active {
  background: rgba(14, 38, 64, 0.9);
  border-color: var(--accent-cyan-light);
  box-shadow: 0 0 20px rgba(45, 212, 191, 0.3);
}

.wizard-option-card.active::after {
  content: '✓';
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-cyan-light);
  color: #031525;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.option-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.wizard-option-card h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: #ffffff;
}

.wizard-option-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Wizard Match Result Box */
.wizard-result-box {
  background: linear-gradient(135deg, rgba(14, 35, 60, 0.95), rgba(7, 18, 30, 0.95));
  border: 1px solid rgba(45, 212, 191, 0.4);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5), var(--shadow-cyan-glow);
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.result-tag {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-cyan-light);
  background: rgba(20, 184, 166, 0.18);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  border: 1px solid rgba(20, 184, 166, 0.4);
}

.confidence-meter {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.confidence-label {
  font-size: 0.84rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.confidence-bar-bg {
  width: 140px;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  overflow: hidden;
}

.confidence-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-azure), var(--accent-cyan-light));
  border-radius: 9999px;
  box-shadow: 0 0 10px var(--accent-cyan-light);
  transition: width 0.5s var(--ease-smooth);
}

.confidence-val {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-cyan-light);
}

.match-card-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  align-items: center;
}

.match-img-wrap {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-md);
}

.match-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.match-title-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.3rem;
  flex-wrap: wrap;
}

.match-name {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 700;
  color: #ffffff;
}

.match-sci-name {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--accent-azure);
  margin-bottom: 0.75rem;
}

.match-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1rem 0 1.5rem;
}

.match-checklist li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.match-checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-cyan-light);
  font-weight: 800;
}

.match-actions-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   Confusing Lookalikes Comparison Lab
   ========================================================================== */
.lookalike-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.lookalike-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.6rem 1.35rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.25s var(--ease-smooth);
}

.lookalike-tab-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.lookalike-tab-btn.active {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.25), rgba(56, 189, 248, 0.25));
  border-color: var(--accent-azure);
  color: #ffffff;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

.lookalike-display {
  padding: 2.5rem;
}

.lookalike-split-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 2rem;
  min-width: 0;
}

.lookalike-card {
  background: rgba(6, 16, 28, 0.75);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.lookalike-img-box {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.lookalike-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vs-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-coral), #e11d48);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: #ffffff;
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.5);
  margin: 0 auto;
}

.comparison-table-wrapper,
.beach-matrix-wrapper {
  background: rgba(6, 15, 26, 0.65);
  border-radius: 16px;
  border: 1px solid var(--border-glass);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
}

.beach-matrix-table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.beach-matrix-table th,
.beach-matrix-table td {
  padding: 0.85rem 1.25rem;
  text-align: left;
}

.beach-matrix-table th {
  background: rgba(14, 30, 48, 0.9);
  color: var(--accent-cyan-light);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border-glass);
}

.beach-matrix-table tr:not(:last-child) td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.comp-table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.comp-table th,
.comp-table td {
  padding: 0.85rem 1.25rem;
  text-align: left;
}

.comp-table th {
  background: rgba(14, 30, 48, 0.9);
  color: var(--accent-cyan-light);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border-glass);
}

.comp-table tr:not(:last-child) td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.comp-table td:first-child {
  font-weight: 600;
  color: var(--text-muted);
}

.comp-table td:nth-child(2) {
  color: #ffffff;
  font-weight: 500;
}

.comp-table td:nth-child(3) {
  color: var(--text-secondary);
}

/* ==========================================================================
   Shell Anatomy Diagnostic Guide
   ========================================================================== */
.anatomy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.anatomy-card {
  padding: 2.25rem;
}

.anatomy-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.anatomy-icon {
  font-size: 2rem;
}

.anatomy-header h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: #ffffff;
}

.anatomy-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.anatomy-list li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.5rem;
}

.anatomy-list li strong {
  color: var(--accent-cyan-light);
}



.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--accent-cyan);
  color: #ffffff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 0;
}

.skip-link:focus { left: 0; }

/* ==========================================================================
   Species Pages (/shells/...)
   ========================================================================== */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--accent-azure);
  text-decoration: none;
}

.breadcrumb a:hover { text-decoration: underline; }

.species-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 2.5rem;
  padding: 2.25rem;
  align-items: start;
}

.species-hero img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.species-title {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  line-height: 1.15;
  color: #ffffff;
  margin: 0.5rem 0 0.25rem;
}

.species-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem 1rem;
  margin: 1.25rem 0 1rem;
}

@media (max-width: 520px) {
  .species-facts {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

.species-fact {
  background: rgba(6, 15, 26, 0.65);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.species-fact dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.species-fact dd {
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.4;
  margin: 0;
}

.species-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
  margin-top: 2rem;
  min-width: 0;
}

.species-body > * {
  min-width: 0;
  max-width: 100%;
}

.species-body .glass-panel { padding: 2rem; }

.species-body h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: #ffffff;
  margin-bottom: 0.85rem;
}

.species-body p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.species-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.species-link-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem;
  background: rgba(8, 20, 34, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  transition: border-color 0.25s, transform 0.25s var(--ease-smooth);
}

.species-link-card:hover {
  border-color: var(--accent-azure);
  transform: translateY(-2px);
}

.species-link-card img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.species-link-card small {
  display: block;
  font-weight: 400;
  font-style: italic;
  color: var(--accent-azure);
}

.shell-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding-top: 0.5rem;
}

.card-quickview-btn {
  background: rgba(20, 184, 166, 0.15);
  border: 1px solid rgba(45, 212, 191, 0.35);
  color: var(--accent-cyan-light);
  border-radius: 8px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease-smooth);
}

.card-quickview-btn:hover {
  background: rgba(20, 184, 166, 0.3);
  border-color: var(--accent-cyan-light);
  color: #ffffff;
}

.card-quickview-btn:focus-visible {
  outline: 2px solid var(--accent-azure);
  outline-offset: 2px;
}

.card-guide-link {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-cyan-light);
  text-decoration: none;
}

.card-guide-link:hover { text-decoration: underline; }

.photo-credit {
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--text-muted);
  margin-top: 0.5rem;
  max-width: 320px;
}

.photo-credit a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.25);
}

.photo-credit a:hover { color: var(--accent-cyan-light); }

.credits-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.credits-table th,
.credits-table td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border-glass);
  color: var(--text-secondary);
  vertical-align: top;
}

.credits-table th { color: #ffffff; font-weight: 600; }
.credits-table a { color: var(--accent-azure); }

.footer-heading {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #ffffff;
  margin-bottom: 0.25rem;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1200px) {
  #startIdBtn {
    display: none;
  }
}

@media (max-width: 1024px) {
  .nav-toggle {
    display: inline-flex;
  }
  .header-container {
    position: relative;
    padding: 0.75rem 1.25rem;
  }
  #startIdBtn {
    display: none;
  }
}

@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-cta-group {
    justify-content: center;
  }
  .hero-stats-row {
    max-width: 600px;
    margin: 0 auto;
  }
  .tides-grid,
  .tracker-layout,
  .footer-content,
  .scanner-layout,
  .species-body {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 3.5rem 0;
  }
  .hero-section {
    padding: 2.5rem 0 2rem;
  }
  .hero-title {
    font-size: 2.1rem;
  }
  .section-title {
    font-size: 1.8rem;
  }
  .section-header {
    margin-bottom: 2rem;
  }
  .metrics-row,
  .hero-stats-row {
    grid-template-columns: 1fr 1fr;
  }
  .ethics-grid,
  .anatomy-grid,
  .match-card-grid,
  .modal-hero,
  .species-hero {
    grid-template-columns: 1fr;
  }
  .match-img-wrap,
  .modal-img-wrap {
    width: 100%;
    max-width: 320px;
    height: auto;
    aspect-ratio: 1;
    margin: 0 auto;
  }
  .lookalike-split-grid {
    grid-template-columns: 1fr;
  }
  .vs-badge {
    margin: -0.5rem auto;
  }
  .comparison-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .comp-table {
    min-width: 520px;
  }
  .spots-grid {
    grid-template-columns: 1fr;
  }
  .tide-card-header {
    flex-direction: column;
  }
  .condition-badge {
    text-align: left;
  }
  .custom-select {
    min-width: 0;
    width: 100%;
  }
  .wizard-steps-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .wizard-step-line {
    display: none;
  }
  .tide-card,
  .advisory-card,
  .wizard-container,
  .id-view-panel,
  .lookalike-display,
  .tracker-form-card,
  .tracker-list-card,
  .ethics-card,
  .anatomy-card,
  .species-hero,
  .species-body .glass-panel,
  .modal-dialog {
    padding: 1.35rem;
  }
  .scanner-dropzone {
    min-height: 240px;
  }
  .tracker-stats-bar {
    flex-wrap: wrap;
    gap: 1rem;
  }
  .id-mode-selector {
    flex-direction: column;
    border-radius: 20px;
    width: 100%;
  }
  .id-mode-btn {
    border-radius: 14px;
  }
  .photo-actions-buttons {
    flex-direction: column;
    width: 100%;
  }
  .photo-action-btn {
    width: 100%;
  }
  .species-title {
    font-size: 2rem;
  }
  .footer-links {
    flex-direction: column;
    gap: 2rem;
  }
  /* Prevent iOS from zooming in when a form field is focused */
  input,
  select,
  textarea,
  .search-box input {
    font-size: 16px;
  }
}

@media (max-width: 560px) {
  .container,
  .hero-container,
  .header-container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .brand-tag,
  .sound-text,
  #startIdBtn {
    display: none;
  }
  .btn-icon-text {
    padding: 0.55rem 0.75rem;
  }
  .hero-title {
    font-size: 1.85rem;
  }
  .hero-cta-group .btn {
    width: 100%;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .metrics-row {
    grid-template-columns: 1fr;
  }
  .result-header,
  .scan-result-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .confidence-bar-bg {
    width: 100px;
  }
  .log-entry-item {
    flex-wrap: wrap;
  }
  .entry-meta {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}

@media (max-width: 640px) {
  .spots-grid,
  .radar-feed-grid,
  .passport-badges-grid,
  .portal-gallery-grid,
  .lookalike-grid,
  .directory-cards-grid,
  .beach-guide-grid,
  .compare-hub-grid,
  .guides-hub-grid,
  .checklist-grid {
    grid-template-columns: 1fr !important;
  }
  .portal-toolbar {
    padding: 0.75rem 1rem;
    gap: 1rem;
  }
  .toolbar-left,
  .toolbar-right {
    width: 100%;
    justify-content: space-between;
  }
  .portal-search-wrapper {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    gap: 0.5rem;
  }
  .brand-logo {
    gap: 0.4rem;
    min-width: 0;
  }
  .brand-name {
    font-size: 1.15rem;
  }
  .portal-storage-panel,
  .storage-panel {
    padding: 1rem 0.85rem;
  }
  .portal-toolbar {
    padding: 0.75rem 0.85rem;
  }
  .storage-panel-title-wrap {
    min-width: 0;
  }
  .storage-actions-wrap {
    width: 100%;
  }
  .storage-actions-wrap .btn {
    flex: 1;
    text-align: center;
    justify-content: center;
  }
}

@media (max-width: 380px) {
  .header-container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    gap: 0.35rem;
  }
  .brand-tag {
    display: none !important;
  }
  .brand-name {
    font-size: 1.05rem;
  }
  .nav-toggle {
    padding: 0 0.55rem;
    gap: 0.35rem;
  }
  .nav-toggle-text {
    font-size: 0.82rem;
  }
}

/* ==========================================================================
   Collector Portal & Collection Management Styles
   ========================================================================== */
.portal-main {
  padding-top: 5.5rem;
  padding-bottom: 5rem;
}

.portal-container {
  max-width: 1320px;
  margin: 0 auto;
}

/* Portal Hero Card */
.portal-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2.25rem 2.5rem;
  border-radius: 24px;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, rgba(14, 30, 48, 0.88), rgba(9, 23, 38, 0.96));
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-md);
}

.portal-profile-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.portal-avatar {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.2), rgba(56, 189, 248, 0.15));
  border: 1.5px solid rgba(45, 212, 191, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  box-shadow: 0 0 24px rgba(20, 184, 166, 0.2);
  flex-shrink: 0;
}

.portal-title-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.portal-title {
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.portal-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.portal-status-pill.synced {
  background: rgba(20, 184, 166, 0.15);
  border-color: rgba(45, 212, 191, 0.35);
  color: #2dd4bf;
}

.portal-status-pill.local {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.35);
  color: #fbbf24;
}

.portal-status-pill.pending {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #f59e0b;
}

.portal-status-pill.expired {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.4);
  color: #fb7185;
}

.portal-status-pill.error {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.portal-user-email {
  font-size: 1rem;
  font-weight: 600;
  color: #38bdf8;
  margin-top: 0.2rem;
}

.portal-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.portal-hero-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* Metrics Grid */
.portal-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.portal-metric-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
  border-radius: 20px;
  background: rgba(14, 30, 48, 0.65);
  border: 1px solid var(--border-glass);
  transition: transform 0.3s var(--ease-smooth), border-color 0.3s var(--ease-smooth);
}

.portal-metric-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-glass-hover);
}

.metric-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}

.metric-num {
  font-size: 1.9rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  background: linear-gradient(135deg, #ffffff, #e2e8f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.metric-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Quest Card */
.portal-quest-card {
  padding: 1.5rem 2rem;
  border-radius: 20px;
  margin-bottom: 2.25rem;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.08), rgba(14, 30, 48, 0.8));
  border: 1px solid rgba(20, 184, 166, 0.25);
}

.quest-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.quest-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}

.quest-sub {
  font-size: 0.88rem;
  color: #2dd4bf;
  margin-top: 0.2rem;
}

.quest-progress-track {
  height: 12px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.quest-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #14b8a6, #38bdf8);
  box-shadow: 0 0 16px rgba(45, 212, 191, 0.5);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Portal Tabs */
.portal-nav-tabs {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.75rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.portal-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.05rem;
  font-weight: 600;
  font-family: inherit;
  padding: 0.65rem 1.4rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s var(--ease-smooth);
  white-space: nowrap;
  flex-shrink: 0;
}

.portal-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.portal-tab-btn.active {
  color: #ffffff;
  background: rgba(20, 184, 166, 0.15);
  border: 1px solid rgba(20, 184, 166, 0.35);
  box-shadow: 0 0 20px rgba(20, 184, 166, 0.15);
}

/* Portal Storage & Privacy Panel (Findings 16, 18) */
.portal-storage-panel {
  padding: 1.25rem 1.5rem;
  border-radius: 18px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(56, 189, 248, 0.22);
  background: rgba(14, 30, 48, 0.65);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.storage-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.storage-panel-title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  flex: 1;
  min-width: 0;
}

.storage-panel-icon {
  font-size: 1.4rem;
  line-height: 1;
  padding: 0.45rem 0.55rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.storage-panel-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.2rem 0;
  letter-spacing: -0.2px;
}

.storage-panel-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.45;
}

.storage-panel-actions {
  flex-shrink: 0;
}

.storage-details-content {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  animation: fadeIn 0.25s ease-out;
}

.storage-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .storage-details-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.storage-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.86rem;
  line-height: 1.45;
  color: #cbd5e1;
}

.storage-detail-item strong {
  display: block;
  color: #ffffff;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.storage-detail-item p {
  margin: 0;
}

.storage-detail-item .detail-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.storage-detail-item code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  color: #38bdf8;
  font-size: 0.82rem;
}

/* Toolbar */
.portal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 1.5rem;
  border-radius: 18px;
  margin-bottom: 2rem;
  background: rgba(14, 30, 48, 0.7);
  border: 1px solid var(--border-glass);
  flex-wrap: wrap;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}

.portal-search-wrapper,
.portal-toolbar .search-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 240px;
}

.portal-search-wrapper .search-icon,
.portal-toolbar .search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.portal-search-input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  border-radius: 12px;
  background: rgba(6, 16, 28, 0.85);
  border: 1px solid var(--border-glass);
  color: #ffffff;
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.25s;
}

.portal-search-input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.filter-select-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.portal-select {
  padding: 0.65rem 1rem;
  border-radius: 12px;
  background: rgba(6, 16, 28, 0.85);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.view-toggle-group {
  display: inline-flex;
  background: rgba(6, 16, 28, 0.85);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--border-glass);
}

.btn-toggle {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-toggle.active {
  background: rgba(20, 184, 166, 0.25);
  color: #2dd4bf;
}

.export-actions-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Gallery Grid */
.portal-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
  margin-bottom: 3rem;
}

.portal-card {
  border-radius: 20px;
  overflow: hidden;
  background: rgba(14, 30, 48, 0.65);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth), border-color 0.3s var(--ease-smooth);
}

.portal-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-glass-hover);
  box-shadow: var(--shadow-md);
}

.portal-card-media {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: #040911;
}

.portal-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-smooth);
}

.portal-card:hover .portal-card-img {
  transform: scale(1.06);
}

.grail-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.85);
  color: #0f172a;
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.btn-card-brag {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.4rem 0.8rem;
  border-radius: 10px;
  background: rgba(6, 16, 28, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.2s, transform 0.2s;
}

.btn-card-brag:hover {
  background: rgba(20, 184, 166, 0.9);
  color: #0f172a;
  transform: scale(1.05);
}

.portal-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.portal-card-species {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.portal-card-species a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.2s;
}

.portal-card-species a:hover {
  color: #38bdf8;
}

.portal-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.portal-tag {
  font-size: 0.8rem;
  padding: 0.25rem 0.65rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.portal-tag.tag-beach {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.25);
}

.portal-tag.tag-condition {
  color: #2dd4bf;
  border-color: rgba(45, 212, 191, 0.25);
}

.portal-card-notes {
  font-size: 0.86rem;
  color: #cbd5e1;
  font-style: italic;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex: 1;
}

.portal-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1rem;
  margin-top: auto;
}

/* Table View */
.portal-table-container {
  overflow-x: auto;
  border-radius: 20px;
  margin-bottom: 3rem;
  background: rgba(14, 30, 48, 0.7);
  border: 1px solid var(--border-glass);
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.portal-table th,
.portal-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.portal-table th {
  background: rgba(6, 16, 28, 0.9);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.portal-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.table-thumb {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border-glass);
}

.table-notes-cell {
  max-width: 260px;
  color: var(--text-muted);
}

.table-actions-cell {
  white-space: nowrap;
}

/* Checklist Grid */
.checklist-header {
  padding: 1.5rem 2rem;
  border-radius: 20px;
  margin-bottom: 1.75rem;
}

.checklist-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
}

.checklist-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.portal-checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: 16px;
  background: rgba(14, 30, 48, 0.6);
  border: 1px solid var(--border-glass);
  transition: all 0.3s var(--ease-smooth);
}

.checklist-item.collected {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.12), rgba(14, 30, 48, 0.8));
  border-color: rgba(45, 212, 191, 0.4);
  box-shadow: 0 0 16px rgba(20, 184, 166, 0.1);
}

.checklist-item.wishlist {
  opacity: 0.78;
}

.checklist-item:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.checklist-thumb-box {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border-glass);
}

.checklist-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.checklist-status-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2px 0;
  font-size: 0.62rem;
  font-weight: 700;
  text-align: center;
  background: rgba(0,0,0,0.75);
}

.checklist-item.collected .checklist-status-badge {
  background: #0d9488;
  color: #ffffff;
}

.checklist-name {
  font-size: 1rem;
  font-weight: 700;
}

.checklist-name a {
  color: #ffffff;
  text-decoration: none;
}

.checklist-name a:hover {
  color: #38bdf8;
}

.checklist-rarity {
  font-size: 0.75rem;
  color: #2dd4bf;
  font-weight: 600;
}

.checklist-found-meta {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 0.2rem;
}

.checklist-guide-link {
  display: inline-block;
  font-size: 0.78rem;
  color: #38bdf8;
  margin-top: 0.2rem;
  text-decoration: none;
}

/* Empty State */
.portal-empty-card {
  padding: 4rem 2rem;
  text-align: center;
  border-radius: 24px;
  margin-bottom: 3rem;
}

.empty-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.empty-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.empty-desc {
  color: var(--text-muted);
  max-width: 460px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}

/* Modals */
.portal-dialog {
  max-width: 600px;
  padding: 2.25rem;
}

.portal-form .form-group {
  margin-bottom: 1.25rem;
  text-align: left;
}

.portal-form .form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.portal-form input[type="text"],
.portal-form input[type="date"],
.portal-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: rgba(6, 16, 28, 0.85);
  border: 1px solid var(--border-glass);
  color: #ffffff;
  font-size: 0.95rem;
  font-family: inherit;
}

.portal-form input:focus,
.portal-form textarea:focus {
  outline: none;
  border-color: #38bdf8;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Brag Card Modal */
.brag-dialog {
  max-width: 580px;
  padding: 2rem;
  text-align: center;
}

.canvas-wrapper {
  margin: 1.5rem 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

#bragCanvas {
  width: 100%;
  height: auto;
  display: block;
}

.brag-privacy-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin: 0.85rem 0 1.25rem;
  padding: 0.65rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.privacy-options-title {
  font-weight: 600;
  color: #ffffff;
}

.privacy-option-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  user-select: none;
  color: #e2e8f0;
}

.privacy-option-label input[type="checkbox"] {
  accent-color: var(--accent-cyan);
  cursor: pointer;
  width: 16px;
  height: 16px;
}

.btn-xs {
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .portal-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .portal-hero {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .portal-profile-left {
    flex-direction: column;
    align-items: flex-start;
  }
  .portal-metrics-grid {
    grid-template-columns: 1fr;
  }
  .portal-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .toolbar-left,
  .toolbar-right {
    width: 100%;
    min-width: 0;
    justify-content: space-between;
  }
  .portal-gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* Print Optimization */
@media print {
  .site-header,
  .site-footer,
  .portal-toolbar,
  .portal-hero-actions,
  .btn,
  .btn-card-brag,
  .portal-nav-tabs,
  .ocean-ambient-bg {
    display: none !important;
  }
  body, .portal-main {
    background: #ffffff !important;
    color: #000000 !important;
    padding: 0 !important;
  }
  .portal-hero,
  .portal-metric-card,
  .portal-quest-card,
  .portal-card,
  .portal-table-container {
    background: #ffffff !important;
    border: 1px solid #ccc !important;
    color: #000000 !important;
    box-shadow: none !important;
  }
  .portal-title,
  .metric-num,
  .portal-card-species a {
    color: #000000 !important;
    -webkit-text-fill-color: initial !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Live Community Shell Radar ("What's Washing Up Now")
   ========================================================================== */
.community-radar-panel {
  margin-top: 2.5rem;
  padding: 2.25rem;
  border-radius: 24px;
  border: 1px solid rgba(45, 212, 191, 0.25);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5), 0 0 35px rgba(45, 212, 191, 0.08);
  background: linear-gradient(180deg, rgba(12, 28, 46, 0.85) 0%, rgba(8, 19, 31, 0.95) 100%);
  position: relative;
  overflow: hidden;
}

.community-radar-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #2dd4bf, #38bdf8, transparent);
}

.radar-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.radar-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.35);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #2dd4bf;
  position: relative;
  margin-bottom: 0.6rem;
}

.radar-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2dd4bf;
  box-shadow: 0 0 10px #2dd4bf;
}

.radar-pulse-ring {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(45, 212, 191, 0.5);
  animation: radar-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes radar-ping {
  0% { transform: translateY(-50%) scale(1); opacity: 0.9; }
  75%, 100% { transform: translateY(-50%) scale(3); opacity: 0; }
}

.radar-heading {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.35rem;
  letter-spacing: -0.01em;
}

.radar-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 680px;
  line-height: 1.5;
  margin: 0;
}

.radar-header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-shrink: 0;
}

/* Radar Filter Bar */
.radar-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: rgba(10, 24, 40, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  margin-bottom: 1.75rem;
  overflow-x: auto;
}

.radar-filter-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  white-space: nowrap;
}

.radar-pills-wrap {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}

.radar-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s var(--ease-smooth);
}

.radar-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.radar-pill.active {
  background: #0d9488;
  border-color: #2dd4bf;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(45, 212, 191, 0.35);
}

/* Radar Feed Grid */
.radar-feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.radar-card {
  background: rgba(13, 30, 49, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: transform 0.25s var(--ease-smooth), border-color 0.25s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}

.radar-card:hover {
  transform: translateY(-3px);
  border-color: rgba(45, 212, 191, 0.4);
  box-shadow: 0 12px 25px -10px rgba(0, 0, 0, 0.6), 0 0 20px rgba(45, 212, 191, 0.15);
}

.radar-card.is-holy-grail {
  border-color: rgba(245, 158, 11, 0.45);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.08) 0%, rgba(13, 30, 49, 0.8) 100%);
}

.radar-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.radar-card-species {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
}

.radar-time-pill {
  font-size: 0.72rem;
  font-weight: 700;
  color: #2dd4bf;
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid rgba(45, 212, 191, 0.25);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.radar-card-beach {
  font-size: 0.85rem;
  font-weight: 600;
  color: #93c5fd;
  display: flex;
  align-items: center;
  gap: 5px;
}

.radar-card-photo-wrap {
  width: 100%;
  height: 160px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: #08131f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.radar-card-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.radar-card-photo-wrap:hover img {
  transform: scale(1.05);
}

.radar-photo-zoom-hint {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  color: #ffffff;
}

.radar-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.radar-meta-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.74rem;
  color: #cbd5e1;
}

.radar-meta-pill.grail {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  font-weight: 700;
}

.radar-card-notes {
  font-size: 0.82rem;
  line-height: 1.5;
  color: #94a3b8;
  font-style: italic;
  background: rgba(255, 255, 255, 0.03);
  border-left: 2px solid #2dd4bf;
  padding: 0.4rem 0.65rem;
  border-radius: 0 6px 6px 0;
  margin: 0;
}

.radar-loading-state,
.radar-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}

.radar-spin-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: inline-block;
  animation: radar-rock 2s ease-in-out infinite alternate;
}

@keyframes radar-rock {
  0% { transform: rotate(-10deg) scale(1); }
  100% { transform: rotate(10deg) scale(1.1); }
}

/* Radar Opt-in Checkbox */
.radar-optin-group {
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  background: rgba(13, 148, 136, 0.08);
  border: 1px solid rgba(45, 212, 191, 0.25);
  border-radius: 12px;
}

.radar-optin-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  margin: 0;
}

.radar-optin-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #0d9488;
  margin-top: 2px;
  flex-shrink: 0;
  cursor: pointer;
}

.radar-optin-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.radar-optin-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
}

.radar-optin-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.badge-radar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.3);
  color: #2dd4bf;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.badge-radar.pending {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: #f59e0b;
}

.badge-radar.error {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.toggle-radar-btn {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 999px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-radar-active {
  background: rgba(45, 212, 191, 0.15) !important;
  border: 1px solid rgba(45, 212, 191, 0.4) !important;
  color: #2dd4bf !important;
  font-weight: 700;
}

.btn-radar-active:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: rgba(248, 113, 113, 0.5) !important;
  color: #fca5a5 !important;
}

.entry-actions-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .community-radar-panel {
    padding: 1.5rem;
  }
  .radar-header {
    flex-direction: column;
    align-items: stretch;
  }
  .radar-header-actions {
    justify-content: flex-start;
  }
  .radar-feed-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Pillars #1 & #3: Brag Cards Web Share & Beachcomber Passport Badges
   ========================================================================== */

/* Brag Card Actions & Sharing */
.brag-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.brag-share-hint {
  font-size: 0.82rem;
  color: #94a3b8;
  text-align: center;
  margin-top: 0.65rem;
  line-height: 1.4;
}

/* Floating Toast Notifications */
.shelling-toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.shelling-toast {
  background: rgba(11, 32, 56, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(45, 212, 191, 0.4);
  color: #ffffff;
  padding: 0.85rem 1.4rem;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 15px rgba(20, 184, 166, 0.25);
  font-size: 0.92rem;
  font-weight: 500;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
  max-width: 400px;
}

.shelling-toast.visible {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Beachcomber Passport Banner */
.passport-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding: 2rem;
  border-radius: 20px;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, rgba(15, 30, 52, 0.85) 0%, rgba(8, 20, 36, 0.92) 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  position: relative;
  overflow: hidden;
}

.passport-banner::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.18), transparent 70%);
  pointer-events: none;
}

.passport-banner-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.passport-badge-emblem {
  font-size: 3.2rem;
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(245, 158, 11, 0.4);
  border-radius: 20px;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.25);
  flex-shrink: 0;
}

.passport-rank-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  margin-bottom: 0.4rem;
}

.passport-title {
  font-size: 1.55rem;
  font-family: var(--font-serif);
  color: #ffffff;
  margin-bottom: 0.25rem;
}

.passport-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.5;
}

.passport-banner-right {
  min-width: 250px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: right;
}

.passport-progress-summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.passport-progress-num {
  font-size: 1.35rem;
  font-weight: 700;
  color: #38bdf8;
}

.passport-progress-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.passport-bar-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.passport-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #10b981, #38bdf8);
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}

/* Passport Badges Grid */
.passport-badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.badge-card {
  border-radius: 20px;
  padding: 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.badge-card:hover {
  transform: translateY(-4px);
}

.badge-card.unlocked {
  background: linear-gradient(145deg, rgba(20, 35, 60, 0.75) 0%, rgba(10, 24, 45, 0.85) 100%);
  border: 1px solid rgba(45, 212, 191, 0.45);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(45, 212, 191, 0.15);
}

.badge-card.unlocked.tier-gold {
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 22px rgba(245, 158, 11, 0.22);
}

.badge-card.unlocked.tier-silver {
  border-color: rgba(148, 163, 184, 0.5);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 18px rgba(148, 163, 184, 0.18);
}

.badge-card.unlocked.tier-bronze {
  border-color: rgba(217, 119, 6, 0.45);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 18px rgba(217, 119, 6, 0.18);
}

.badge-card.locked {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0.85;
}

.badge-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.badge-coin {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.badge-card.unlocked .badge-coin {
  transform: scale(1.05);
}

.badge-card.unlocked.tier-gold .badge-coin {
  border-color: #f59e0b;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.25), rgba(245, 158, 11, 0.05));
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.4);
}

.badge-card.unlocked.tier-silver .badge-coin {
  border-color: #cbd5e1;
  background: radial-gradient(circle, rgba(203, 213, 225, 0.25), rgba(203, 213, 225, 0.05));
  box-shadow: 0 0 18px rgba(203, 213, 225, 0.35);
}

.badge-card.unlocked.tier-bronze .badge-coin {
  border-color: #d97706;
  background: radial-gradient(circle, rgba(217, 119, 6, 0.25), rgba(217, 119, 6, 0.05));
  box-shadow: 0 0 18px rgba(217, 119, 6, 0.35);
}

.badge-card.locked .badge-coin {
  filter: grayscale(1) opacity(0.5);
}

.badge-tier-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: 999px;
}

.tier-tag-gold {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.tier-tag-silver {
  background: rgba(203, 213, 225, 0.15);
  border: 1px solid rgba(203, 213, 225, 0.4);
  color: #e2e8f0;
}

.tier-tag-bronze {
  background: rgba(217, 119, 6, 0.15);
  border: 1px solid rgba(217, 119, 6, 0.4);
  color: #f59e0b;
}

.badge-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.25rem;
}

.badge-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.badge-details {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 0.3rem;
  font-style: italic;
  line-height: 1.35;
}

.badge-status-box {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.badge-unlocked-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
  color: #34d399;
}

.badge-locked-status {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.badge-locked-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.badge-progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.badge-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: #38bdf8;
  transition: width 0.4s ease;
}

/* Homepage Tracker Ribbon */
.tracker-badge-ribbon {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.ribbon-badges-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ribbon-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  transition: all 0.2s ease;
  cursor: default;
}

.ribbon-badge-pill.unlocked {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.ribbon-badge-pill.unlocked:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.ribbon-badge-pill.locked {
  opacity: 0.55;
}

.ribbon-passport-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #38bdf8;
  text-decoration: none;
  transition: color 0.2s ease;
}

.ribbon-passport-link:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

@media (max-width: 860px) {
  .passport-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
    padding: 1.5rem;
  }
  .passport-banner-right {
    min-width: 100%;
    text-align: left;
  }
  .passport-badges-grid {
    grid-template-columns: 1fr;
  }
  .shelling-toast-container {
    left: 1rem;
    right: 1rem;
    bottom: 1.5rem;
    align-items: center;
  }
  .shelling-toast {
    max-width: 100%;
    width: 100%;
    text-align: center;
  }
}

/* ==========================================================================
   Instagram Account Linking & Live Community Retrofeed
   ========================================================================== */

/* Instagram Brand Gradient Buttons & Badges */
.btn-instagram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: #ffffff !important;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 12px;
  padding: 0.65rem 1.35rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s var(--ease-smooth);
  box-shadow: 0 4px 18px rgba(225, 48, 108, 0.35);
}

.btn-instagram:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(225, 48, 108, 0.55);
  filter: brightness(1.08);
}

.btn-instagram-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(225, 48, 108, 0.12);
  border: 1px solid rgba(225, 48, 108, 0.35);
  color: #fb7185;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-instagram-nav:hover {
  background: rgba(225, 48, 108, 0.22);
  border-color: rgba(225, 48, 108, 0.6);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(225, 48, 108, 0.35);
}

.footer-instagram-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  background: rgba(225, 48, 108, 0.12);
  border: 1px solid rgba(225, 48, 108, 0.35);
  color: #fb7185;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
}

.footer-instagram-badge:hover {
  background: rgba(225, 48, 108, 0.25);
  border-color: rgba(225, 48, 108, 0.6);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(225, 48, 108, 0.4);
}

.ig-glow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f43f5e;
  box-shadow: 0 0 8px #f43f5e;
  animation: pulse-dot 2s infinite;
}

/* Instagram Retrofeed Section */
.instagram-section {
  background: linear-gradient(180deg, rgba(6, 19, 34, 0.95) 0%, rgba(10, 24, 45, 0.98) 100%);
  position: relative;
  overflow: hidden;
}

.instagram-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 250px;
  background: radial-gradient(ellipse at top, rgba(225, 48, 108, 0.15), transparent 70%);
  pointer-events: none;
}

.instagram-tag {
  background: rgba(225, 48, 108, 0.12) !important;
  border: 1px solid rgba(225, 48, 108, 0.4) !important;
  color: #fb7185 !important;
  font-weight: 700;
}

.instagram-header-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

/* Retrofeed Filter Bar */
.retrofeed-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 2.25rem 0 1.5rem;
  flex-wrap: wrap;
}

.retrofeed-filter-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.retrofeed-pills-wrap {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.retrofeed-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.retrofeed-pill:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.retrofeed-pill.active {
  background: rgba(225, 48, 108, 0.18);
  border-color: rgba(225, 48, 108, 0.5);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(225, 48, 108, 0.28);
}

/* Retrofeed Grid */
.retrofeed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.retrofeed-card {
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #081524;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.retrofeed-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(225, 48, 108, 0.2);
}

.retrofeed-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}

.retrofeed-card:hover .retrofeed-img {
  transform: scale(1.08);
}

.retrofeed-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(6, 19, 34, 0.94) 85%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
}

.retrofeed-card:hover .retrofeed-overlay {
  opacity: 1;
}

.retrofeed-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.retrofeed-user-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.45);
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.retrofeed-verified-dot {
  color: #38bdf8;
  font-size: 0.72rem;
}

.retrofeed-badge-grail {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fbbf24;
}

.retrofeed-content {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.retrofeed-species-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  line-height: 1.3;
}

.retrofeed-loc {
  font-size: 0.76rem;
  color: #38bdf8;
  margin: 0;
}

.retrofeed-caption-snip {
  font-size: 0.78rem;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.retrofeed-stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.76rem;
}

.retrofeed-counts {
  display: flex;
  gap: 0.75rem;
  color: #fca5a5;
  font-weight: 600;
}

.retrofeed-time {
  color: var(--text-muted);
}

/* Retrofeed Tag Banner */
.retrofeed-banner {
  margin-top: 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding: 1.75rem 2.25rem;
  border-radius: 20px;
  border: 1px solid rgba(225, 48, 108, 0.35);
  background: linear-gradient(135deg, rgba(225, 48, 108, 0.08) 0%, rgba(15, 23, 42, 0.7) 100%);
}

.retrofeed-banner-content {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.retrofeed-banner-icon {
  font-size: 2.8rem;
  flex-shrink: 0;
}

.retrofeed-banner-title {
  font-size: 1.25rem;
  font-family: var(--font-serif);
  color: #ffffff;
  margin-bottom: 0.3rem;
}

.retrofeed-banner-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 620px;
}

.retrofeed-banner-sub a {
  color: #38bdf8;
  text-decoration: underline;
}

/* Instagram Post Detail Modal */
.ig-post-dialog {
  max-width: 720px;
  padding: 0;
  overflow: hidden;
  border-radius: 24px;
}

.ig-modal-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}

.ig-modal-image-col {
  background: #040d18;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.ig-modal-image-col img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ig-modal-info-col {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.ig-modal-author-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ig-modal-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(45deg, #f09433, #dc2743, #bc1888);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.ig-modal-caption {
  font-size: 0.88rem;
  color: #e2e8f0;
  line-height: 1.55;
  max-height: 240px;
  overflow-y: auto;
}

.ig-hashtag {
  color: #38bdf8;
  font-weight: 600;
}

.ig-modal-stats-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #fca5a5;
  font-weight: 600;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
  .retrofeed-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
  }
  .retrofeed-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .ig-modal-layout {
    grid-template-columns: 1fr;
  }
  .ig-modal-image-col {
    max-height: 300px;
    min-height: auto;
  }
}

@media (max-width: 480px) {
  .retrofeed-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Session 5: Enriched Species Identification Guide Styles
   ========================================================================== */

.species-family {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 1rem;
}

.species-body .full-width {
  grid-column: 1 / -1;
}

/* Quick Identification Verdict Box */
.quick-id-box {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.16) 0%, rgba(14, 30, 48, 0.85) 100%);
  border: 1px solid rgba(45, 212, 191, 0.38);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 24px rgba(20, 184, 166, 0.14);
  padding: 1.75rem 2rem;
  border-radius: 18px;
}

.quick-id-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2dd4bf;
  margin-bottom: 0.75rem;
}

.quick-id-summary {
  font-size: 1.15rem;
  line-height: 1.65;
  color: #f8fafc;
  margin: 0;
}

/* Key Diagnostic Anatomy List */
.anatomy-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.anatomy-list li {
  padding: 0.85rem 1.15rem;
  background: rgba(6, 15, 26, 0.55);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.anatomy-list li strong {
  color: #ffffff;
}

/* Worn Specimen Box */
.worn-specimen-box {
  padding: 1.25rem 1.5rem;
  background: rgba(6, 15, 26, 0.6);
  border-left: 4px solid var(--accent-gold);
  border-radius: 0 12px 12px 0;
  margin-top: 0.75rem;
}

.worn-specimen-box p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Lookalikes Lab Grid */
.lookalike-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.lookalike-card {
  background: rgba(6, 15, 26, 0.65);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s var(--ease-smooth), border-color 0.25s;
}

.lookalike-card:hover {
  border-color: var(--accent-azure);
  transform: translateY(-2px);
}

.lookalike-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: #ffffff;
  margin-bottom: 0.25rem;
}

.lookalike-sci {
  font-size: 0.92rem;
  color: var(--accent-azure);
  margin-bottom: 0.85rem;
}

.lookalike-desc {
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.55;
  margin-bottom: 1rem;
}

.lookalike-diff {
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.3);
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  color: #e2e8f0;
  line-height: 1.5;
}

/* Living Animal & Legal Rules Callout */
.live-rules-panel {
  border: 1px solid rgba(251, 113, 133, 0.3);
}

.live-check-callout {
  background: rgba(6, 15, 26, 0.6);
  padding: 1.25rem 1.5rem;
  border-radius: 14px;
  border: 1px solid var(--border-glass);
}

.live-check-callout h3 {
  font-size: 1.1rem;
  color: #38bdf8;
  margin-bottom: 0.5rem;
}

.live-check-callout p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.legal-rules-callout {
  background: rgba(69, 10, 10, 0.25);
  padding: 1.25rem 1.5rem;
  border-radius: 14px;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.legal-rules-callout h3 {
  font-size: 1.1rem;
  color: #fca5a5;
  margin-bottom: 0.5rem;
}

.legal-rules-callout p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.85rem;
}

.legal-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.legal-links-list li a {
  color: #fca5a5;
  font-size: 0.9rem;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s;
}

.legal-links-list li a:hover {
  color: #fee2e2;
  text-decoration: underline;
}

/* Fact-Check & Authoritative Sources Box */
.fact-check-box {
  background: rgba(10, 22, 38, 0.85);
  border: 1px solid var(--border-glass);
  border-radius: 18px;
}

.review-meta {
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.review-meta p {
  margin-bottom: 0.35rem;
}

.review-statement {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.5;
  margin-top: 0.5rem;
}

.sources-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.sources-list li {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.sources-list li a {
  color: var(--accent-azure);
  text-decoration: none;
  transition: color 0.2s;
}

.sources-list li a:hover {
  color: var(--accent-cyan-light);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .quick-id-box {
    padding: 1.25rem 1.5rem;
  }
  .quick-id-summary {
    font-size: 1.05rem;
  }
  .lookalike-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Beach Guides & Regional Comparison Design System (Session 6)
   ========================================================================== */
.pass-danger-callout {
  background: rgba(127, 29, 29, 0.35);
  border: 2px solid #ef4444;
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 30px rgba(239, 68, 68, 0.2);
}

.pass-danger-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.pass-danger-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.pass-danger-title {
  color: #fee2e2;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pass-danger-text {
  color: #fecaca;
  font-size: 0.98rem;
  line-height: 1.65;
  margin: 0;
}

.parking-info-panel {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 1.5rem;
  margin-top: 1.25rem;
}

.parking-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.parking-card {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.25rem;
}

.parking-card h3 {
  font-size: 1.05rem;
  color: #38bdf8;
  margin-bottom: 0.5rem;
}

.parking-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.parking-warning-box {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-top: 1rem;
}

.parking-warning-box p {
  color: #fde68a;
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0;
}

/* Multi-Beach Comparison Matrix Table */
.beach-matrix-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(10, 20, 34, 0.8);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.beach-matrix-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
  min-width: 720px;
}

.beach-matrix-table th,
.beach-matrix-table td {
  padding: 1rem 1.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: top;
}

.beach-matrix-table th {
  background: rgba(15, 30, 50, 0.95);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.beach-matrix-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.beach-matrix-table .beach-name-cell strong {
  color: var(--accent-azure);
  font-size: 1rem;
  display: block;
}

.beach-matrix-table .beach-name-cell a {
  color: var(--accent-azure);
  text-decoration: none;
}

.beach-matrix-table .beach-name-cell a:hover {
  text-decoration: underline;
}

/* Beach Chooser Cards */
.chooser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.chooser-card {
  background: rgba(15, 28, 46, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, border-color 0.2s;
}

.chooser-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.4);
}

.chooser-target {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-cyan-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.chooser-beach-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.6rem;
}

.chooser-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1rem;
  flex-grow: 1;
}

/* Beach Guides Hub Cards */
.beach-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.beach-guide-card {
  background: rgba(10, 22, 38, 0.85);
  border: 1px solid var(--border-glass);
  border-radius: 18px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.beach-guide-card:hover {
  transform: translateY(-4px);
  border-color: rgba(45, 212, 191, 0.5);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(45, 212, 191, 0.15);
}

.beach-card-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-cyan-light);
  background: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.3);
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 0.85rem;
}

.beach-card-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.6rem;
  line-height: 1.25;
}

.beach-card-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.beach-card-facts {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.beach-card-facts span strong {
  color: #ffffff;
}

/* Progressive Tide Widget */
.beach-tide-widget {
  background: rgba(8, 20, 36, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 16px;
  padding: 1.5rem;
  margin: 1.25rem 0;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.tide-widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tide-station-label {
  font-size: 0.85rem;
  color: var(--accent-azure);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tide-live-status {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.tide-live-status.connected {
  color: #34d399;
  font-weight: 600;
}

.tide-widget-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.tide-metric-item {
  background: rgba(255, 255, 255, 0.04);
  padding: 0.85rem 1rem;
  border-radius: 10px;
}

.tide-metric-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}

.tide-metric-value {
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff;
}

.tide-widget-footer {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.75rem;
  margin-top: 0.5rem;
}

.tide-widget-footer a {
  color: var(--accent-azure);
  text-decoration: underline;
}

/* Research Backlog & Expansion Callout */
.research-queue-box {
  background: rgba(30, 27, 75, 0.35);
  border: 1px solid rgba(129, 140, 248, 0.3);
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  margin-top: 2rem;
}

.research-queue-box h2 {
  font-size: 1.25rem;
  color: #c7d2fe;
  margin-bottom: 0.6rem;
}

.research-queue-box p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* ==========================================================================
   Session 7: Lookalike Comparisons & Practical Guides Design System
   ========================================================================== */
.definitive-test-panel {
  background: linear-gradient(135deg, rgba(8, 28, 48, 0.95), rgba(4, 16, 28, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), var(--shadow-azure-glow);
}

.instruction-step {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.instruction-step:last-child {
  margin-bottom: 0;
}

.step-badge {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-azure);
  color: #031525;
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

.step-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.step-text strong {
  color: #ffffff;
}

.share-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  margin-top: 1.5rem;
}

.share-toolbar-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.diagnostic-check-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

.diagnostic-check-card h3 {
  font-size: 1.15rem;
  color: #ffffff;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.check-comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.check-box-alive {
  background: rgba(20, 184, 166, 0.1);
  border-left: 3px solid #2dd4bf;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.check-box-dead {
  background: rgba(148, 163, 184, 0.08);
  border-left: 3px solid #94a3b8;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.check-uncertainty-tip {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #fef08a;
  background: rgba(234, 179, 8, 0.1);
  padding: 0.6rem 0.85rem;
  border-radius: 6px;
  border: 1px solid rgba(234, 179, 8, 0.25);
}

.compare-hub-grid,
.guides-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
  margin-top: 1.5rem;
}

.compare-hub-card,
.guides-hub-card {
  background: rgba(8, 20, 36, 0.85);
  border: 1px solid var(--border-glass);
  border-radius: 18px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
  transition: transform 0.25s var(--ease-smooth), border-color 0.25s var(--ease-smooth);
}

.compare-hub-card:hover,
.guides-hub-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-azure);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), var(--shadow-azure-glow);
}

@media (max-width: 768px) {
  .lookalike-split-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .vs-badge {
    margin: 0.5rem auto;
  }
  .check-comparison-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .qr-panel-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .qr-code-box {
    margin: 0 auto;
  }
}

/* ==========================================================================
   Session 10: Printable Checklist & Promotion Styles
   ========================================================================== */
.checklist-page-section {
  padding-bottom: 5rem;
}

.checklist-hero-header {
  margin-bottom: 2.5rem;
}

.checklist-actions-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(14, 34, 56, 0.9), rgba(8, 20, 36, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), var(--shadow-azure-glow);
}

.checklist-actions-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.checklist-progress-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.25rem;
  background: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.35);
  border-radius: 12px;
  min-width: 105px;
}

.checklist-progress-count {
  font-size: 1.35rem;
  font-weight: 800;
  color: #2dd4bf;
  line-height: 1.1;
}

.checklist-progress-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.checklist-actions-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.checklist-actions-right {
  max-width: 320px;
}

.checklist-free-badge {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}

.checklist-group-section {
  margin-top: 2rem;
}

.checklist-group-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.checklist-group-title .group-count {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--accent-azure);
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.25rem;
}

.checklist-card {
  background: rgba(10, 24, 42, 0.85);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s var(--ease-smooth), border-color 0.2s;
}

.checklist-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4);
}

.checklist-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  gap: 0.5rem;
}

.checklist-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  user-select: none;
  flex-grow: 1;
}

.checklist-checkbox {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.checklist-custom-box {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid var(--accent-azure);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.checklist-checkbox:checked + .checklist-custom-box {
  background: #2dd4bf;
  border-color: #2dd4bf;
}

.checklist-checkbox:checked + .checklist-custom-box::after {
  content: "✓";
  font-size: 13px;
  font-weight: 800;
  color: #031525;
}

.checklist-species-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.checklist-checkbox:checked ~ .checklist-species-name {
  color: #5eead4;
}

.checklist-card-body {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.checklist-img-wrap {
  width: 76px;
  height: 76px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  background: #061322;
}

.checklist-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.checklist-info {
  flex-grow: 1;
}

.checklist-sci-name {
  font-size: 0.82rem;
  color: var(--accent-cyan-light);
  margin-bottom: 0.35rem;
}

.checklist-hint {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 0.4rem;
}

.checklist-size {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.checklist-field-log {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.74rem;
  color: var(--text-muted);
  padding-top: 0.4rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  margin-bottom: 0.4rem;
}

.checklist-guide-link a {
  font-size: 0.78rem;
  color: var(--accent-azure);
  text-decoration: none;
  font-weight: 600;
}

.checklist-guide-link a:hover {
  text-decoration: underline;
}

.checklist-qr-panel {
  border: 1px solid rgba(45, 212, 191, 0.35);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.4);
}

.qr-panel-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: center;
}

@media (max-width: 640px) {
  .qr-panel-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.25rem;
  }
}

.qr-code-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #ffffff;
  padding: 1rem;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.qr-code-box img {
  display: block;
}

.qr-hint {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #061322;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Print Stylesheet */
@media print {
  @page {
    size: letter portrait;
    margin: 0.35in;
  }
  body {
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 9pt;
  }
  .nav-header,
  .site-footer,
  .breadcrumb,
  .checklist-actions-buttons,
  .checklist-free-badge,
  .checklist-guide-link,
  .btn,
  #shellingToastContainer {
    display: none !important;
  }
  .glass-panel {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    color: #0f172a !important;
  }
  .checklist-actions-card {
    padding: 0.5rem 1rem !important;
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    margin-bottom: 0.75rem !important;
  }
  .section-title {
    font-size: 16pt !important;
    color: #061322 !important;
    margin-bottom: 0.2rem !important;
  }
  .section-desc {
    font-size: 8pt !important;
    color: #475569 !important;
    margin-bottom: 0.5rem !important;
  }
  .checklist-group-title {
    font-size: 11pt !important;
    color: #061322 !important;
    border-bottom: 1px solid #cbd5e1 !important;
    margin-top: 0.75rem !important;
    margin-bottom: 0.5rem !important;
    page-break-after: avoid;
    break-after: avoid;
  }
  .checklist-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.4rem !important;
  }
  .checklist-card {
    padding: 0.4rem 0.6rem !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .checklist-species-name {
    font-size: 9pt !important;
    color: #061322 !important;
  }
  .checklist-custom-box {
    border: 1px solid #061322 !important;
    width: 14px !important;
    height: 14px !important;
  }
  .checklist-img-wrap {
    width: 52px !important;
    height: 52px !important;
    border: 1px solid #cbd5e1 !important;
  }
  .checklist-hint {
    font-size: 7pt !important;
    color: #334155 !important;
    line-height: 1.3 !important;
  }
  .checklist-sci-name {
    font-size: 7.5pt !important;
    color: #0d9488 !important;
  }
  .checklist-size {
    font-size: 6.8pt !important;
    color: #64748b !important;
  }
  .checklist-field-log {
    font-size: 6.8pt !important;
    color: #475569 !important;
  }
  .rarity-tag {
    font-size: 6.5pt !important;
    padding: 0.15rem 0.4rem !important;
    border: 1px solid #cbd5e1 !important;
  }
  .checklist-qr-panel {
    margin-top: 1rem !important;
    padding: 0.75rem !important;
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* ==========================================================================
   Session 4: Homepage Restructuring & Focused User Journeys
   Task Choices, Curated Grids, Collection Hub & Checklist Preview
   ========================================================================== */

.task-choices-section {
  padding: 2.5rem 0 3.5rem;
  position: relative;
  z-index: 2;
}

.task-choices-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.task-choice-card {
  padding: 2rem 1.75rem;
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform 0.3s var(--ease-smooth), border-color 0.3s ease, box-shadow 0.3s ease;
}

.task-choice-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glass-hover);
  box-shadow: var(--shadow-azure-glow);
}

.task-choice-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.task-choice-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.65rem;
}

.task-choice-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.task-choice-btn {
  width: 100%;
  text-align: center;
  justify-content: center;
}

/* Collection Hub Feature Cards Grid */
.collection-features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

.collection-feature-card {
  padding: 1.5rem 1.25rem;
  border-radius: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  text-align: left;
}

.collection-feature-card .feature-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.collection-feature-card .feature-heading {
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.45rem;
}

.collection-feature-card .feature-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Checklist Preview Section */
.checklist-preview-section {
  padding: 3rem 0;
}

.checklist-preview-card {
  padding: 2.5rem 2.25rem;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(14, 30, 48, 0.85) 0%, rgba(9, 23, 38, 0.9) 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: var(--shadow-azure-glow);
}

.checklist-perks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.perk-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-azure);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 20px;
  padding: 0.35rem 0.85rem;
}

/* Spot Guide CTA button */
.spot-guide-btn {
  margin-top: 0.75rem;
}

/* Responsive Breakpoints for Session 4 */
@media (max-width: 1024px) {
  .task-choices-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .collection-features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  .collection-features-grid {
    grid-template-columns: 1fr;
  }
  .task-choice-card {
    padding: 1.5rem;
  }
}

/* ==========================================================================
   Session 5: Shell Directory Hub Browsing & Search (Finding 14)
   ========================================================================== */
.directory-toolbar {
  margin-bottom: 2rem;
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.directory-search-box {
  position: relative;
  width: 100%;
}

.directory-search-box .search-icon {
  position: absolute;
  left: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: var(--text-muted);
  pointer-events: none;
}

.directory-search-input {
  width: 100%;
  padding: 0.95rem 2.85rem 0.95rem 3rem;
  background: rgba(8, 20, 34, 0.85);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  color: #ffffff;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.25s var(--ease-smooth);
}

.directory-search-input:focus {
  outline: none;
  border-color: var(--accent-azure);
  background: rgba(12, 28, 48, 0.95);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.25);
}

.directory-search-input::placeholder {
  color: var(--text-muted);
}

.directory-search-clear {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.directory-search-clear:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.directory-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.directory-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.15rem;
  border-radius: 24px;
  background: rgba(10, 24, 40, 0.7);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s var(--ease-smooth);
}

.directory-filter-pill:hover {
  background: rgba(16, 36, 60, 0.85);
  border-color: rgba(56, 189, 248, 0.4);
  color: #ffffff;
}

.directory-filter-pill.active {
  background: rgba(56, 189, 248, 0.16);
  border-color: var(--accent-azure);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.3);
}

.directory-filter-pill .pill-count {
  font-size: 0.78rem;
  color: var(--accent-azure);
  font-weight: 500;
}

.directory-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.85rem;
  margin-top: 0.25rem;
}

.directory-results-count strong {
  color: var(--accent-azure);
}

/* Directory Cards Grid */
.directory-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.directory-species-card {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.3s var(--ease-smooth), border-color 0.3s, box-shadow 0.3s;
  padding: 0;
  background: rgba(8, 20, 36, 0.75);
}

.directory-species-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(56, 189, 248, 0.2);
}

.directory-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(4, 12, 22, 0.8);
}

.directory-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease-smooth);
}

.directory-species-card:hover .directory-card-media img {
  transform: scale(1.04);
}

.directory-card-badges {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  right: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  z-index: 2;
  pointer-events: none;
}

.directory-card-badges .category-pill {
  position: static;
  order: 1;
}

.directory-card-badges .rarity-tag {
  position: static;
  order: 2;
  margin: 0;
  display: inline-block;
}

.category-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.65rem;
  border-radius: 12px;
  background: rgba(10, 24, 40, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--accent-azure);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.directory-card-body {
  padding: 1.35rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.directory-card-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  line-height: 1.25;
  color: #ffffff;
  margin: 0 0 0.3rem 0;
}

.directory-card-title a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.2s;
}

.directory-card-title a:hover {
  color: var(--accent-azure);
}

.directory-card-sci {
  font-size: 0.85rem;
  color: var(--accent-cyan-light);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.directory-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

.directory-card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex: 1;
}

.directory-card-btn {
  align-self: flex-start;
  margin-top: auto;
}

/* Directory No Results Empty State */
.directory-no-results {
  text-align: center;
  padding: 3.5rem 2rem;
  margin: 2rem 0;
}

.directory-no-results .no-results-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.directory-no-results h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.directory-no-results p {
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 1.5rem;
}

/* Global Table Scroll Wrappers (Finding 12) */
.comparison-table-wrapper,
.beach-matrix-wrapper,
.credits-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Explore Secondary Links (Session 3) */
.explore-secondary-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
  padding: 1.25rem;
}

.explore-secondary-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  color: inherit;
  transition: all 0.25s var(--ease-smooth);
}

.explore-secondary-card:hover {
  background: rgba(45, 212, 191, 0.08);
  border-color: rgba(45, 212, 191, 0.35);
  transform: translateY(-2px);
}

.secondary-card-icon {
  font-size: 1.4rem;
  line-height: 1;
  margin-top: 0.15rem;
}

.secondary-card-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.2rem;
}

.secondary-card-desc {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Directory Toolbar Controls Row */
.directory-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.directory-filter-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 20px;
  min-height: 44px;
}

.directory-filter-trigger .filter-badge {
  background: var(--accent-teal);
  color: #050d18;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  line-height: 1;
}

/* Active Filter Chips & Clear All */
.directory-active-filters-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.active-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.active-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  background: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.35);
  border-radius: 16px;
  font-size: 0.82rem;
  color: var(--accent-teal-light);
  font-weight: 500;
}

.chip-remove-btn {
  background: transparent;
  border: none;
  color: var(--accent-teal-light);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
}

.chip-remove-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.directory-clear-all-btn {
  background: transparent;
  border: none;
  color: var(--accent-coral);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.directory-clear-all-btn:hover {
  color: #ffffff;
}

/* Mobile Filter Sheet Modal */
.filter-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 8, 16, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.filter-sheet-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.filter-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 85vh;
  background: #081424;
  border-top: 1px solid rgba(45, 212, 191, 0.3);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
  z-index: 999;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
  padding-bottom: env(safe-area-inset-bottom, 1rem);
}

.filter-sheet.open {
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}

.filter-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.filter-sheet-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: #ffffff;
  margin: 0;
}

.filter-sheet-close {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.4rem;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.filter-sheet-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.filter-sheet-content {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  -webkit-overflow-scrolling: touch;
}

.filter-sheet-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.filter-sheet-heading {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-teal);
}

.filter-sheet-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sheet-option-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 44px;
}

.sheet-option-pill:hover {
  background: rgba(45, 212, 191, 0.08);
  color: #ffffff;
}

.sheet-option-pill.active {
  background: rgba(45, 212, 191, 0.2);
  border-color: var(--accent-teal);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(45, 212, 191, 0.25);
}

.filter-sheet-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(4, 12, 22, 0.6);
  gap: 1rem;
}

.filter-sheet-footer .btn {
  flex: 1;
  text-align: center;
  justify-content: center;
  min-height: 44px;
}

/* Species Guide Accessible Disclosures */
.guide-disclosure-panel {
  padding: 0;
  overflow: hidden;
}

.guide-disclosure-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.75rem;
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.guide-disclosure-summary::-webkit-details-marker {
  display: none;
}

.guide-disclosure-summary h2 {
  margin: 0;
  font-size: 1.45rem;
}

.disclosure-badge {
  font-size: 0.8rem;
  color: var(--accent-teal);
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid rgba(45, 212, 191, 0.25);
  padding: 0.25rem 0.65rem;
  border-radius: 12px;
}

.guide-disclosure[open] .guide-disclosure-summary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.guide-disclosure > :not(summary) {
  padding-left: 1.75rem;
  padding-right: 1.75rem;
  padding-bottom: 1.5rem;
}

/* Responsive Directory Grid (320px 1-col, 480px-768px 2-col, 769px+ 3-4 col) */
@media (max-width: 479px) {
  .directory-toolbar {
    padding: 1rem;
  }
  .directory-cards-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .directory-card-body {
    padding: 1.15rem 1.25rem 1.25rem;
  }
  .explore-secondary-links {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
  .guide-disclosure-summary {
    padding: 1.25rem;
  }
  .guide-disclosure > :not(summary) {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    padding-bottom: 1.25rem;
  }
}

@media (min-width: 480px) and (max-width: 768px) {
  .directory-toolbar {
    padding: 1.25rem;
  }
  .directory-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .directory-card-body {
    padding: 1rem 1.15rem 1.15rem;
  }
  .directory-card-title {
    font-size: 1.2rem;
  }
  .explore-secondary-links {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .directory-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

/* ==========================================================================
   Conflict Recovery Banner & Modal (R3-05)
   ========================================================================== */
.portal-conflict-banner {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.75rem;
  border-radius: 16px;
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(15, 23, 42, 0.85) 100%);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.conflict-banner-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 260px;
}

.conflict-banner-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}

.conflict-banner-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fbbf24;
  margin: 0 0 0.2rem;
}

.conflict-banner-desc {
  font-size: 0.88rem;
  color: #e2e8f0;
  margin: 0;
  line-height: 1.4;
}

.conflict-count-badge {
  display: inline-block;
  background: rgba(245, 158, 11, 0.3);
  color: #fef08a;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.5);
}

.conflict-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-warning {
  background: #f59e0b;
  color: #0f172a;
  font-weight: 700;
  border: 1px solid #fbbf24;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.btn-warning:hover {
  background: #fbbf24;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45);
}

/* Conflict Recovery Modal */
.conflict-dialog {
  max-width: 820px;
  width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.25rem;
  text-align: left;
}

.conflict-modal-header {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.conflict-modal-icon {
  font-size: 2.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.conflict-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.conflict-cards-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.conflict-card {
  padding: 1.5rem;
  border-radius: 16px;
  background: rgba(10, 24, 40, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.conflict-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.conflict-card-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.conflict-specimen-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.conflict-location-badge {
  font-size: 0.82rem;
  color: #93c5fd;
  font-weight: 500;
}

.conflict-version-pill {
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.conflict-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 680px) {
  .conflict-compare-grid {
    grid-template-columns: 1fr;
  }
}

.conflict-compare-col {
  padding: 1.25rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.conflict-compare-col.local-col {
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.04);
}

.conflict-compare-col.server-col {
  border-color: rgba(45, 212, 191, 0.3);
  background: rgba(45, 212, 191, 0.04);
}

.compare-col-header {
  margin-bottom: 0.25rem;
}

.col-pill {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  display: inline-block;
}

.local-pill {
  background: rgba(56, 189, 248, 0.18);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.server-pill {
  background: rgba(45, 212, 191, 0.18);
  color: #5eead4;
  border: 1px solid rgba(45, 212, 191, 0.35);
}

.conflict-thumb-wrap {
  width: 100%;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  background: #040911;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.conflict-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.conflict-thumb-placeholder {
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.compare-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.82rem;
}

.compare-meta-item.diff-highlight {
  padding: 0.4rem 0.6rem;
  background: rgba(245, 158, 11, 0.12);
  border-left: 3px solid #f59e0b;
  border-radius: 0 6px 6px 0;
}

.meta-label {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.meta-val {
  color: #ffffff;
}

.compare-notes-box {
  color: #e2e8f0;
  font-size: 0.84rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.conflict-actions-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-keep-cloud {
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-fork-find {
  border-color: rgba(56, 189, 248, 0.4);
  color: #7dd3fc;
}

.btn-fork-find:hover {
  background: rgba(56, 189, 248, 0.15);
}

.btn-overwrite-cloud {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-color: #fbbf24;
  color: #0f172a;
  font-weight: 700;
}

.btn-overwrite-cloud:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.conflict-empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
}

/* ==========================================================================
   Step-by-Step Wizard Stepper & Nav (Session 4)
   ========================================================================== */
.wizard-stepper-container {
  margin-bottom: 2rem;
  padding: 1.25rem 1.5rem;
  background: rgba(8, 20, 36, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: 18px;
}

.wizard-steps-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.wizard-step-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s var(--ease-smooth);
  min-height: 44px;
}

.wizard-step-tab:hover {
  background: rgba(45, 212, 191, 0.08);
  color: #ffffff;
}

.wizard-step-tab.active {
  background: rgba(45, 212, 191, 0.2);
  border-color: var(--accent-teal);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(45, 212, 191, 0.3);
}

.wizard-step-tab.completed {
  border-color: rgba(45, 212, 191, 0.4);
  color: var(--accent-teal-light);
}

.wizard-step-tab .step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #ffffff;
}

.wizard-step-tab.active .step-num {
  background: var(--accent-teal);
  color: #050d18;
  font-weight: 800;
}

.wizard-step-line {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  min-width: 12px;
}

.wizard-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.wizard-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-teal), var(--accent-coral));
  transition: width 0.35s ease;
  border-radius: 3px;
}

/* Wizard Option Cards with Media */
.wizard-option-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.15rem;
  padding: 1.25rem;
}

.wizard-option-media {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(3, 8, 16, 0.8);
  flex-shrink: 0;
}

.wizard-option-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.wizard-option-card:hover .wizard-option-media img {
  transform: scale(1.06);
}

.unsure-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
}

.wizard-option-badge {
  font-size: 1.4rem;
  line-height: 1;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Coastal Pattern Swatches for Step 2 */
.wizard-option-badge.swatch-square-spots {
  background-color: #fdf6e2;
  background-image: radial-gradient(circle, #4a2810 32%, transparent 34%);
  background-size: 13px 13px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.wizard-option-badge.swatch-amber-lip {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 45%, #9a3412 100%);
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.3), inset 0 0 0 1px rgba(234, 88, 12, 0.5);
}
.wizard-option-badge.swatch-streaks {
  background: repeating-linear-gradient(115deg, #451a03 0px, #451a03 5px, #fef3c7 5px, #fef3c7 12px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}
.wizard-option-badge.swatch-crimson {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 55%, #450a0a 100%);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(220, 38, 38, 0.5);
}
.wizard-option-badge.swatch-white {
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 60%, #cbd5e1 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}
.wizard-option-badge.swatch-calico {
  background: radial-gradient(circle at 35% 35%, #f472b6 0%, #fb7185 30%, #fde047 70%, #d97706 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.wizard-option-badge.swatch-spiral-lines {
  background: repeating-linear-gradient(0deg, #1e293b 0px, #1e293b 2px, #fef08a 2px, #fef08a 8px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}
.wizard-option-badge.swatch-rays {
  background: conic-gradient(from 180deg at 50% 0%, #ec4899, #f59e0b, #ec4899, #38bdf8, #ec4899);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.wizard-option-badge.swatch-solid {
  background: linear-gradient(135deg, #e7e5e4 0%, #a8a29e 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* Anatomical Trait Badges for Step 3 */
.wizard-option-badge.trait-badge {
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--accent-azure);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.05em;
}
.wizard-option-badge.unsure-icon-wrap {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  color: var(--text-muted);
  font-size: 1.3rem;
  font-weight: 700;
}

.wizard-option-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

/* Wizard Navigation Toolbar */
.wizard-nav-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: rgba(8, 20, 36, 0.85);
  border-top: 1px solid var(--border-glass);
  border-radius: 0 0 18px 18px;
  margin-top: 2rem;
}

.wizard-nav-center {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.wizard-step-counter {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
}

.wizard-btn-reset {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0.3rem 0.5rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.wizard-btn-reset:hover {
  color: var(--accent-coral);
}

.wizard-btn-next[disabled],
.wizard-btn-next.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.photo-aid-advisory {
  padding: 1rem 1.25rem;
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.25);
  border-radius: 14px;
}

@media (max-width: 640px) {
  .wizard-step-tab .step-label {
    display: none;
  }
  .wizard-option-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .wizard-option-media {
    width: 100%;
    height: 120px;
  }
  .wizard-nav-toolbar {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
  }
  .wizard-nav-center {
    order: -1;
    width: 100%;
    justify-content: space-between;
  }
  .wizard-btn-back,
  .wizard-btn-next {
    flex: 1;
    text-align: center;
    justify-content: center;
  }
}

/* ==========================================================================
   F12: High-Contrast Daylight Outdoor Reading Mode & 320px Viewport Safeguards
   ========================================================================== */
html[data-theme="daylight"] {
  --bg-dark: #fbf9f5;
  --bg-deep-ocean: #f5f2ea;
  --bg-surface: rgba(255, 255, 255, 0.96);
  --bg-surface-hover: #f1ece1;
  --bg-card: #ffffff;
  --border-glass: rgba(12, 90, 111, 0.28);
  --border-glass-hover: rgba(12, 90, 111, 0.55);
  --accent-cyan: #0b6477;
  --accent-cyan-light: #094d5c;
  --accent-teal: #0b6477;
  --accent-teal-light: #094d5c;
  --accent-azure: #0369a1;
  --accent-coral: #b93822;
  --accent-coral-hover: #992b18;
  --text-primary: #072e39;
  --text-secondary: #1e293b;
  --text-muted: #334155;
  --text-dark: #072e39;
  --shadow-sm: 0 2px 8px rgba(7, 46, 57, 0.12);
  --shadow-md: 0 6px 20px rgba(7, 46, 57, 0.16);
  --shadow-lg: 0 12px 32px rgba(7, 46, 57, 0.22);
}

html[data-theme="daylight"] body {
  background: #fbf9f5;
  color: #072e39;
}

html[data-theme="daylight"] .ocean-ambient-bg {
  display: none !important;
}

html[data-theme="daylight"] .glass-panel,
html[data-theme="daylight"] .hero-overlay-card,
html[data-theme="daylight"] .home-search-panel,
html[data-theme="daylight"] .ethics-callout,
html[data-theme="daylight"] .metric-box,
html[data-theme="daylight"] .chart-wrapper,
html[data-theme="daylight"] .spot-highlights,
html[data-theme="daylight"] .log-entry-item,
html[data-theme="daylight"] .modal-details-grid,
html[data-theme="daylight"] .modal-dialog,
html[data-theme="daylight"] .id-mode-selector,
html[data-theme="daylight"] .photo-actions-toolbar,
html[data-theme="daylight"] .scanner-dropzone,
html[data-theme="daylight"] .scan-welcome-state,
html[data-theme="daylight"] .palette-box,
html[data-theme="daylight"] .wizard-option-card,
html[data-theme="daylight"] .lookalike-card,
html[data-theme="daylight"] .comparison-table-wrapper,
html[data-theme="daylight"] .beach-matrix-wrapper,
html[data-theme="daylight"] .species-fact,
html[data-theme="daylight"] .species-link-card,
html[data-theme="daylight"] .portal-metric-card,
html[data-theme="daylight"] .portal-storage-panel,
html[data-theme="daylight"] .storage-panel,
html[data-theme="daylight"] .portal-toolbar,
html[data-theme="daylight"] .portal-card,
html[data-theme="daylight"] .portal-table-container,
html[data-theme="daylight"] .checklist-item,
html[data-theme="daylight"] .radar-filter-bar,
html[data-theme="daylight"] .radar-card,
html[data-theme="daylight"] .retrofeed-card,
html[data-theme="daylight"] .anatomy-list li,
html[data-theme="daylight"] .worn-specimen-box,
html[data-theme="daylight"] .live-check-callout,
html[data-theme="daylight"] .fact-check-box,
html[data-theme="daylight"] .parking-info-panel,
html[data-theme="daylight"] .parking-card,
html[data-theme="daylight"] .chooser-card,
html[data-theme="daylight"] .beach-guide-card,
html[data-theme="daylight"] .beach-tide-widget,
html[data-theme="daylight"] .research-queue-box,
html[data-theme="daylight"] .compare-hub-card,
html[data-theme="daylight"] .guides-hub-card,
html[data-theme="daylight"] .checklist-card,
html[data-theme="daylight"] .directory-species-card,
html[data-theme="daylight"] .filter-sheet,
html[data-theme="daylight"] .filter-sheet-footer,
html[data-theme="daylight"] .conflict-card,
html[data-theme="daylight"] .wizard-stepper-container,
html[data-theme="daylight"] .wizard-nav-toolbar,
html[data-theme="daylight"] .no-match-box,
html[data-theme="daylight"] .diagnostic-check-card,
html[data-theme="daylight"] .check-box-dead {
  background: #ffffff !important;
  color: #072e39 !important;
  border-color: rgba(12, 90, 111, 0.3) !important;
  box-shadow: 0 3px 12px rgba(7, 46, 57, 0.08);
}

html[data-theme="daylight"] .log-entry-item:hover,
html[data-theme="daylight"] .scanner-dropzone:hover,
html[data-theme="daylight"] .scanner-dropzone.dragover,
html[data-theme="daylight"] .scanner-dropzone:focus-visible,
html[data-theme="daylight"] .wizard-option-card:hover {
  background: #f1ece1 !important;
  border-color: rgba(11, 100, 119, 0.55) !important;
}

html[data-theme="daylight"] .wizard-option-card.active {
  background: rgba(11, 100, 119, 0.12) !important;
  border-color: #0b6477 !important;
}

html[data-theme="daylight"] .badge-card.locked {
  background: #f5f2ea !important;
  color: #334155 !important;
  border-color: rgba(12, 90, 111, 0.25) !important;
}

html[data-theme="daylight"] .home-search-input-wrapper,
html[data-theme="daylight"] .search-input-wrapper,
html[data-theme="daylight"] .custom-select,
html[data-theme="daylight"] .search-box input,
html[data-theme="daylight"] .form-group input,
html[data-theme="daylight"] .form-group textarea,
html[data-theme="daylight"] .form-group select,
html[data-theme="daylight"] .portal-search-input,
html[data-theme="daylight"] .portal-select,
html[data-theme="daylight"] .view-toggle-group,
html[data-theme="daylight"] .portal-form input[type="text"],
html[data-theme="daylight"] .portal-form input[type="date"],
html[data-theme="daylight"] .portal-form input[type="email"],
html[data-theme="daylight"] .portal-form textarea,
html[data-theme="daylight"] .portal-form select,
html[data-theme="daylight"] .directory-search-input,
html[data-theme="daylight"] .directory-search-input:focus {
  background: #ffffff !important;
  color: #072e39 !important;
  border-color: rgba(12, 90, 111, 0.38) !important;
}

html[data-theme="daylight"] .beach-matrix-table th,
html[data-theme="daylight"] .comp-table th,
html[data-theme="daylight"] .portal-table th,
html[data-theme="daylight"] .credits-table th {
  background: #f1ece1 !important;
  color: #072e39 !important;
}

html[data-theme="daylight"] .shape-img-box,
html[data-theme="daylight"] .featured-img-box,
html[data-theme="daylight"] .shell-img-box,
html[data-theme="daylight"] .portal-card-media,
html[data-theme="daylight"] .radar-card-photo-wrap,
html[data-theme="daylight"] .ig-modal-image-col,
html[data-theme="daylight"] .checklist-img-wrap,
html[data-theme="daylight"] .directory-card-media,
html[data-theme="daylight"] .conflict-thumb-wrap,
html[data-theme="daylight"] .wizard-option-media {
  background: #f1ece1 !important;
}

html[data-theme="daylight"] .quest-progress-track {
  background: rgba(12, 90, 111, 0.16) !important;
}

html[data-theme="daylight"] #tideChartCanvas {
  background: #071a2c !important;
}

html[data-theme="daylight"] .nav-dropdown {
  background: #fbf9f5 !important;
  border-color: rgba(12, 90, 111, 0.28) !important;
}

html[data-theme="daylight"] .directory-filter-pill,
html[data-theme="daylight"] .radar-pill,
html[data-theme="daylight"] .radar-meta-pill {
  background: #f1ece1 !important;
  color: #1e293b !important;
  border-color: rgba(12, 90, 111, 0.28) !important;
}

html[data-theme="daylight"] .directory-filter-pill:hover,
html[data-theme="daylight"] .radar-pill:hover {
  background: #e5dec9 !important;
  color: #072e39 !important;
}

html[data-theme="daylight"] .directory-filter-pill.active,
html[data-theme="daylight"] .filter-btn.active,
html[data-theme="daylight"] .lookalike-tab-btn.active,
html[data-theme="daylight"] .portal-tab-btn.active,
html[data-theme="daylight"] .sheet-option-pill.active,
html[data-theme="daylight"] .wizard-step-tab.active,
html[data-theme="daylight"] .wizard-step-pill.active,
html[data-theme="daylight"] .retrofeed-pill.active {
  background: rgba(11, 100, 119, 0.16) !important;
  color: #072e39 !important;
  border-color: #0b6477 !important;
  box-shadow: none !important;
}

html[data-theme="daylight"] .category-pill {
  background: rgba(251, 249, 245, 0.94) !important;
  color: #0369a1 !important;
  border: 1px solid rgba(3, 105, 161, 0.35) !important;
}

html[data-theme="daylight"] .btn-card-brag {
  background: rgba(251, 249, 245, 0.94) !important;
  color: #072e39 !important;
  border: 1px solid rgba(12, 90, 111, 0.35) !important;
}

html[data-theme="daylight"] .shelling-toast {
  background: #072e39 !important;
  color: #ffffff !important;
}

html[data-theme="daylight"] h1,
html[data-theme="daylight"] h2,
html[data-theme="daylight"] h3,
html[data-theme="daylight"] h4,
html[data-theme="daylight"] .section-title,
html[data-theme="daylight"] .page-title,
html[data-theme="daylight"] .species-title,
html[data-theme="daylight"] .directory-card-title,
html[data-theme="daylight"] .directory-card-title a,
html[data-theme="daylight"] .card-title-sm,
html[data-theme="daylight"] .hero-secondary-link:hover,
html[data-theme="daylight"] .hero-secondary-link:focus-visible,
html[data-theme="daylight"] .shape-title,
html[data-theme="daylight"] .featured-common-name,
html[data-theme="daylight"] .hub-title,
html[data-theme="daylight"] .ethics-title,
html[data-theme="daylight"] .metric-val,
html[data-theme="daylight"] .card-heading,
html[data-theme="daylight"] .clear-btn:hover,
html[data-theme="daylight"] .filter-btn:hover,
html[data-theme="daylight"] .shell-name,
html[data-theme="daylight"] .spot-title,
html[data-theme="daylight"] .entry-species,
html[data-theme="daylight"] .ethics-card h3,
html[data-theme="daylight"] .modal-close-btn,
html[data-theme="daylight"] .modal-title,
html[data-theme="daylight"] .modal-detail-val,
html[data-theme="daylight"] .sync-heading,
html[data-theme="daylight"] .auth-header h3,
html[data-theme="daylight"] .link-group h2,
html[data-theme="daylight"] .link-group h4,
html[data-theme="daylight"] .footer-heading,
html[data-theme="daylight"] .id-mode-btn:hover,
html[data-theme="daylight"] .dropzone-content h3,
html[data-theme="daylight"] .sample-btn:hover,
html[data-theme="daylight"] .scan-welcome-state h3,
html[data-theme="daylight"] .scan-species-title,
html[data-theme="daylight"] .no-match-box strong,
html[data-theme="daylight"] .step-num,
html[data-theme="daylight"] .wizard-step-tab .step-num,
html[data-theme="daylight"] .wizard-step-counter,
html[data-theme="daylight"] .wizard-question-title,
html[data-theme="daylight"] .wizard-option-card h4,
html[data-theme="daylight"] .match-name,
html[data-theme="daylight"] .lookalike-tab-btn:hover,
html[data-theme="daylight"] .comp-table td:nth-child(2),
html[data-theme="daylight"] .anatomy-header h3,
html[data-theme="daylight"] .species-fact dd,
html[data-theme="daylight"] .species-body h2,
html[data-theme="daylight"] .card-quickview-btn:hover,
html[data-theme="daylight"] .portal-title,
html[data-theme="daylight"] .quest-title,
html[data-theme="daylight"] .portal-tab-btn:hover,
html[data-theme="daylight"] .storage-panel-title,
html[data-theme="daylight"] .storage-detail-item strong,
html[data-theme="daylight"] .portal-card-species,
html[data-theme="daylight"] .portal-card-species a,
html[data-theme="daylight"] .checklist-title,
html[data-theme="daylight"] .checklist-name a,
html[data-theme="daylight"] .empty-title,
html[data-theme="daylight"] .privacy-options-title,
html[data-theme="daylight"] .radar-heading,
html[data-theme="daylight"] .radar-card-species,
html[data-theme="daylight"] .radar-optin-title,
html[data-theme="daylight"] .passport-title,
html[data-theme="daylight"] .badge-title,
html[data-theme="daylight"] .btn-instagram-nav:hover,
html[data-theme="daylight"] .footer-instagram-badge:hover,
html[data-theme="daylight"] .retrofeed-pill:hover,
html[data-theme="daylight"] .retrofeed-species-title,
html[data-theme="daylight"] .retrofeed-banner-title,
html[data-theme="daylight"] .quick-id-summary,
html[data-theme="daylight"] .anatomy-list li strong,
html[data-theme="daylight"] .lookalike-title,
html[data-theme="daylight"] .chooser-beach-name,
html[data-theme="daylight"] .beach-card-title,
html[data-theme="daylight"] .beach-card-facts span strong,
html[data-theme="daylight"] .tide-metric-value,
html[data-theme="daylight"] .step-text strong,
html[data-theme="daylight"] .diagnostic-check-card h3,
html[data-theme="daylight"] .checklist-group-title,
html[data-theme="daylight"] .checklist-species-name,
html[data-theme="daylight"] .task-choice-title,
html[data-theme="daylight"] .collection-feature-card .feature-heading,
html[data-theme="daylight"] .directory-search-clear:hover,
html[data-theme="daylight"] .directory-no-results h3,
html[data-theme="daylight"] .secondary-card-title,
html[data-theme="daylight"] .chip-remove-btn:hover,
html[data-theme="daylight"] .directory-clear-all-btn:hover,
html[data-theme="daylight"] .filter-sheet-title,
html[data-theme="daylight"] .filter-sheet-close:hover,
html[data-theme="daylight"] .sheet-option-pill:hover,
html[data-theme="daylight"] .conflict-specimen-title,
html[data-theme="daylight"] .meta-val,
html[data-theme="daylight"] .wizard-step-tab:hover,
html[data-theme="daylight"] .dropdown-link:hover,
html[data-theme="daylight"] .dropdown-link:focus,
html[data-theme="daylight"] .bottom-nav-item:hover:not(.active):not([aria-current]) {
  color: #072e39 !important;
}

html[data-theme="daylight"] .storage-detail-item,
html[data-theme="daylight"] .portal-card-notes,
html[data-theme="daylight"] .privacy-option-label,
html[data-theme="daylight"] .tier-tag-silver,
html[data-theme="daylight"] .retrofeed-caption-snip,
html[data-theme="daylight"] .ig-modal-caption,
html[data-theme="daylight"] .lookalike-diff,
html[data-theme="daylight"] .conflict-banner-desc,
html[data-theme="daylight"] .compare-notes-box {
  color: #1e293b !important;
}

html[data-theme="daylight"] a:visited,
html[data-theme="daylight"] .rarity-tag.uncommon,
html[data-theme="daylight"] .portal-user-email,
html[data-theme="daylight"] .storage-detail-item code,
html[data-theme="daylight"] .portal-card-species a:hover,
html[data-theme="daylight"] .portal-tag.tag-beach,
html[data-theme="daylight"] .checklist-name a:hover,
html[data-theme="daylight"] .checklist-guide-link,
html[data-theme="daylight"] .passport-progress-num,
html[data-theme="daylight"] .ribbon-passport-link,
html[data-theme="daylight"] .ribbon-passport-link:hover,
html[data-theme="daylight"] .retrofeed-verified-dot,
html[data-theme="daylight"] .retrofeed-loc,
html[data-theme="daylight"] .retrofeed-banner-sub a,
html[data-theme="daylight"] .ig-hashtag,
html[data-theme="daylight"] .live-check-callout h3,
html[data-theme="daylight"] .parking-card h3,
html[data-theme="daylight"] .local-pill,
html[data-theme="daylight"] .btn-fork-find {
  color: #0369a1 !important;
}

html[data-theme="daylight"] .auth-feedback.success,
html[data-theme="daylight"] .portal-status-pill.synced,
html[data-theme="daylight"] .quest-sub,
html[data-theme="daylight"] .btn-toggle.active,
html[data-theme="daylight"] .portal-tag.tag-condition,
html[data-theme="daylight"] .checklist-rarity,
html[data-theme="daylight"] .radar-live-badge,
html[data-theme="daylight"] .radar-time-pill,
html[data-theme="daylight"] .badge-radar,
html[data-theme="daylight"] .btn-radar-active,
html[data-theme="daylight"] .quick-id-badge,
html[data-theme="daylight"] .checklist-progress-count,
html[data-theme="daylight"] .checklist-checkbox:checked ~ .checklist-species-name,
html[data-theme="daylight"] .server-pill {
  color: #0b6477 !important;
}

html[data-theme="daylight"] .rarity-tag.grail,
html[data-theme="daylight"] .portal-status-pill.local,
html[data-theme="daylight"] .radar-meta-pill.grail,
html[data-theme="daylight"] .passport-rank-tag,
html[data-theme="daylight"] .tier-tag-gold,
html[data-theme="daylight"] .ribbon-badge-pill.unlocked,
html[data-theme="daylight"] .retrofeed-badge-grail,
html[data-theme="daylight"] .check-uncertainty-tip,
html[data-theme="daylight"] .conflict-banner-title,
html[data-theme="daylight"] .conflict-count-badge,
html[data-theme="daylight"] .conflict-version-pill {
  color: #92400e !important;
}

html[data-theme="daylight"] .auth-feedback.error,
html[data-theme="daylight"] .btn-radar-active:hover,
html[data-theme="daylight"] .retrofeed-counts,
html[data-theme="daylight"] .ig-modal-stats-bar,
html[data-theme="daylight"] .legal-rules-callout h3,
html[data-theme="daylight"] .legal-links-list li a,
html[data-theme="daylight"] .pass-danger-title {
  color: #992b18 !important;
}

html[data-theme="daylight"] .bottom-nav-item,
html[data-theme="daylight"] .bottom-nav-identify,
html[data-theme="daylight"] .checklist-found-meta,
html[data-theme="daylight"] .radar-card-notes,
html[data-theme="daylight"] .brag-share-hint,
html[data-theme="daylight"] .badge-details,
html[data-theme="daylight"] .checklist-size {
  color: #334155 !important;
}

html[data-theme="daylight"] .brand-name,
html[data-theme="daylight"] .nav-drawer-brand,
html[data-theme="daylight"] .hero-title,
html[data-theme="daylight"] .stat-number,
html[data-theme="daylight"] .stat-num,
html[data-theme="daylight"] .tracker-stat-num,
html[data-theme="daylight"] .metric-num {
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: #072e39 !important;
  color: #072e39 !important;
}

html[data-theme="daylight"] .brand-logo,
html[data-theme="daylight"] .brand-logo:hover,
html[data-theme="daylight"] .brand-logo:focus-visible {
  color: #072e39 !important;
}

html[data-theme="daylight"] .brand-tag {
  color: #0b6477 !important;
}

html[data-theme="daylight"] .logo-icon {
  filter: drop-shadow(0 2px 6px rgba(7, 46, 57, 0.18));
}

html[data-theme="daylight"] a:hover,
html[data-theme="daylight"] a:focus {
  color: #0369a1;
  text-decoration-color: #0369a1;
}

html[data-theme="daylight"] .site-header,
html[data-theme="daylight"] .mobile-bottom-nav,
html[data-theme="daylight"] .nav-menu {
  background: rgba(251, 249, 245, 0.98) !important;
  border-color: rgba(12, 90, 111, 0.25) !important;
}

html[data-theme="daylight"] .site-footer {
  background: #f5f2ea !important;
  border-top-color: rgba(12, 90, 111, 0.25) !important;
}

html[data-theme="daylight"] .footer-bottom {
  border-top-color: rgba(12, 90, 111, 0.18) !important;
}

html[data-theme="daylight"] .nav-link {
  color: #1e293b;
}

html[data-theme="daylight"] .nav-link:hover,
html[data-theme="daylight"] .drawer-link:hover,
html[data-theme="daylight"] .drawer-link:focus-visible,
html[data-theme="daylight"] .nav-drawer-close:hover,
html[data-theme="daylight"] .nav-drawer-close:focus-visible {
  color: #072e39 !important;
  background: rgba(11, 100, 119, 0.1) !important;
}

html[data-theme="daylight"] .nav-link.active,
html[data-theme="daylight"] .nav-link[aria-current="page"],
html[data-theme="daylight"] .nav-link[aria-current="location"],
html[data-theme="daylight"] .nav-link[aria-current] {
  color: #072e39 !important;
  background: rgba(11, 100, 119, 0.14) !important;
  border-color: rgba(11, 100, 119, 0.4) !important;
}

html[data-theme="daylight"] .nav-link.nav-link-identify {
  color: #992b18 !important;
  border-color: rgba(185, 56, 34, 0.4) !important;
}

html[data-theme="daylight"] .nav-link.nav-link-identify:hover,
html[data-theme="daylight"] .nav-link.nav-link-identify.active,
html[data-theme="daylight"] .nav-link.nav-link-identify[aria-current] {
  color: #7f1d1d !important;
  background: rgba(185, 56, 34, 0.14) !important;
  border-color: #b93822 !important;
}

html[data-theme="daylight"] .nav-toggle {
  background: rgba(11, 100, 119, 0.08);
  border-color: rgba(12, 90, 111, 0.3);
  color: #072e39;
}

html[data-theme="daylight"] .bottom-nav-item.active,
html[data-theme="daylight"] .bottom-nav-item[aria-current="page"],
html[data-theme="daylight"] .bottom-nav-item[aria-current="location"],
html[data-theme="daylight"] .bottom-nav-item[aria-current],
html[data-theme="daylight"] .bottom-nav-identify.active,
html[data-theme="daylight"] .bottom-nav-identify[aria-current] {
  color: #072e39 !important;
  background: rgba(11, 100, 119, 0.14) !important;
  border-color: rgba(11, 100, 119, 0.4) !important;
  box-shadow: none !important;
}

html[data-theme="daylight"] .bottom-nav-item.active .bottom-nav-icon svg,
html[data-theme="daylight"] .bottom-nav-item[aria-current] .bottom-nav-icon svg {
  stroke: #0b6477 !important;
}

html[data-theme="daylight"] .bottom-nav-item.active::before,
html[data-theme="daylight"] .bottom-nav-item[aria-current]::before {
  background: #0b6477 !important;
  box-shadow: none !important;
}

html[data-theme="daylight"] .btn-glass {
  background: #f1ece1;
  color: #072e39;
  border-color: rgba(12, 90, 111, 0.38);
}

@media (max-width: 360px) {
  .container {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }
}


   Species pages: answer-first blocks (byline, on-this-page nav, key facts, FAQ)
   ========================================================================== */
.species-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  margin: 0.6rem 0 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.species-byline a {
  color: #2dd4bf;
  font-weight: 600;
}

.page-toc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 1.5rem 0 0;
}

.page-toc-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-right: 0.25rem;
}

.page-toc a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid var(--border-glass);
  background: rgba(6, 15, 26, 0.55);
  color: var(--text-secondary);
  font-size: 0.92rem;
  text-decoration: none;
}

.page-toc a:hover,
.page-toc a:focus-visible {
  border-color: var(--border-glass-hover);
  color: #ffffff;
}

.species-body [id] {
  scroll-margin-top: 96px;
}

.species-body h2.quick-id-badge {
  font-family: inherit;
  font-size: 0.82rem;
  line-height: 1.3;
  color: #2dd4bf;
  margin: 0 0 0.75rem;
}

.key-facts-table-wrapper {
  overflow-x: auto;
  margin-top: 1rem;
  border-radius: 14px;
  border: 1px solid var(--border-glass);
}

.key-facts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}

.key-facts-table th,
.key-facts-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border-glass);
  line-height: 1.5;
}

.key-facts-table tr:last-child th,
.key-facts-table tr:last-child td {
  border-bottom: 0;
}

.key-facts-table th {
  width: 32%;
  min-width: 140px;
  font-weight: 700;
  color: #ffffff;
  background: rgba(6, 15, 26, 0.65);
}

.key-facts-table td {
  color: var(--text-secondary);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.faq-item {
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  background: rgba(6, 15, 26, 0.55);
  padding: 0 1.15rem;
}

.faq-question {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0.85rem 0;
}

.faq-question h3 {
  display: inline;
  margin: 0;
  font-size: 1.05rem;
  color: #ffffff;
}

.faq-answer {
  margin: 0 0 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

@media (max-width: 520px) {
  .key-facts-table th,
  .key-facts-table td {
    display: block;
    width: auto;
  }
  .key-facts-table th {
    border-bottom: 0;
    padding-bottom: 0.25rem;
  }
}

.faq-question { list-style: none; gap: 1rem; }
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
  content: '+';
  margin-left: auto;
  font-size: 1.4rem;
  line-height: 1;
  color: #2dd4bf;
}
.faq-item[open] .faq-question::after { content: '\2212'; }

/* ==========================================================================
   Homepage: search in the hero, trust strip, quick answers
   ========================================================================== */
.hero-section .hero-cta-group {
  margin-bottom: 1.5rem;
}

.hero-search-panel {
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
  padding: 1.15rem 1.25rem;
}

.hero-search-panel .home-search-label {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.95rem;
}

.hero-shape-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.hero-shape-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-right: 0.15rem;
}

.hero-shape-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s var(--ease-smooth), background 0.2s var(--ease-smooth);
}

.hero-shape-chip:hover,
.hero-shape-chip:focus-visible {
  border-color: var(--border-glass-hover);
  background: rgba(255, 255, 255, 0.1);
}

.home-trust-strip {
  border-top: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.03);
}

.home-trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.home-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.home-trust-item::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-cyan-light);
  flex-shrink: 0;
}

.home-trust-item strong {
  color: #ffffff;
}

.home-answers-section {
  padding: 4rem 0 1rem;
}

.home-answers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1.25rem;
}

.home-answer-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.5rem;
}

.home-answer-q {
  font-size: 1.12rem;
  line-height: 1.35;
  color: #ffffff;
  margin: 0;
}

.home-answer-a {
  font-size: 0.97rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

.home-answer-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  color: #38bdf8;
  text-decoration: none;
}

.home-answer-link:hover,
.home-answer-link:focus-visible {
  text-decoration: underline;
}

@media (max-width: 560px) {
  .hero-search-panel {
    padding: 1rem;
  }
  .home-trust-list {
    flex-direction: column;
    gap: 0.5rem;
  }
  .home-answers-section {
    padding-top: 2.5rem;
  }
}

/* Desktop header: secondary shortcuts after the four primary destinations */
.nav-desktop-divider {
  width: 1px;
  height: 20px;
  margin: 0 0.35rem;
  background: var(--border-glass-hover);
}

.nav-link.nav-link-secondary {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.nav-link.nav-link-secondary:hover,
.nav-link.nav-link-secondary:focus-visible {
  color: #ffffff;
}

@media (max-width: 1080px) {
  .nav-desktop-divider,
  .nav-link.nav-link-secondary {
    display: none;
  }
}

/* ==========================================================================
   Daylight Mode for the answer-first blocks (species pages, homepage, header)
   ========================================================================== */
html[data-theme="daylight"] .species-byline,
html[data-theme="daylight"] .hero-shape-label,
html[data-theme="daylight"] .home-trust-list,
html[data-theme="daylight"] .home-answer-a,
html[data-theme="daylight"] .faq-answer,
html[data-theme="daylight"] .key-facts-table td {
  color: #1e293b;
}

html[data-theme="daylight"] .species-byline a,
html[data-theme="daylight"] .faq-question::after,
html[data-theme="daylight"] .species-body h2.quick-id-badge,
html[data-theme="daylight"] .home-answer-link {
  color: #0b6477;
}

html[data-theme="daylight"] .faq-question h3,
html[data-theme="daylight"] .key-facts-table th,
html[data-theme="daylight"] .home-answer-q,
html[data-theme="daylight"] .home-trust-item strong,
html[data-theme="daylight"] .page-toc a:hover,
html[data-theme="daylight"] .page-toc a:focus-visible,
html[data-theme="daylight"] .nav-link.nav-link-secondary:hover,
html[data-theme="daylight"] .nav-link.nav-link-secondary:focus-visible {
  color: #072e39;
}

html[data-theme="daylight"] .page-toc a,
html[data-theme="daylight"] .faq-item,
html[data-theme="daylight"] .hero-shape-chip,
html[data-theme="daylight"] .home-answer-card {
  background: #ffffff;
  color: #072e39;
  border-color: rgba(12, 90, 111, 0.3);
}

html[data-theme="daylight"] .key-facts-table th {
  background: #f5f2ea;
}

html[data-theme="daylight"] .key-facts-table-wrapper,
html[data-theme="daylight"] .key-facts-table th,
html[data-theme="daylight"] .key-facts-table td {
  border-color: rgba(12, 90, 111, 0.22);
}

html[data-theme="daylight"] .home-trust-strip {
  background: #f5f2ea;
  border-color: rgba(12, 90, 111, 0.22);
}

html[data-theme="daylight"] .hero-shape-chip:hover,
html[data-theme="daylight"] .hero-shape-chip:focus-visible {
  background: #f1ece1;
  border-color: rgba(11, 100, 119, 0.55);
}
