
/* =================================================================
   VARIABLES & BASE
   ================================================================= */
:root {
  --ff-font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ff-font-serif: 'Newsreader', Georgia, serif;
  --ff-cream: #fdf7e7;
  --ff-gold: #e29d38;
  --ff-terracotta: #b75938;
  --ff-moss: #657342;
  --ff-pine: #1f2a1d;
  --ff-lavender: #8b83a4;
  --ff-sandstone: #e8d8b5;
  --ff-bg-primary: var(--ff-cream);
  --ff-bg-surface: var(--ff-sandstone);
  --ff-text-main: var(--ff-pine);
  --ff-text-muted: rgba(31, 42, 29, 0.65);
  --ff-discord-muted: #3b5242;
  --ff-text-xs: 0.75rem;
  --ff-text-base: 0.875rem;
  --ff-text-md: 0.95rem;
  --ff-text-lg: 1.05rem;
  --ff-text-xl: 1.35rem;
  --ff-text-hero: 2rem;
  --ff-radius: 8px;
  --ff-container-max: 1320px;
}

/* Tighter, elegant tracking for all serif headings */
.site-title,
.directory-main-title,
.map-main-title,
.community-main-title,
.species-title,
.nest-card-title,
.stage-notice-title,
.feature-title {
  letter-spacing: -0.03em !important;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--ff-font-main);
  background-color: var(--ff-bg-primary);
  color: var(--ff-text-main);
  font-size: var(--ff-text-base);
  line-height: 1.5;
  padding-top: 92px;
}

@media screen and (min-width: 1440px) {
  html, body {
    font-size: 17px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }
}

/* Centered page container replacing Carrd's outer page wrapper */
.page-container {
  width: 100%;
  margin: 0 auto;
  padding: 0 2.5%;
  scroll-margin-top: 84px;
}


.ff-directory-section,
.ff-community-section {
  scroll-margin-top: 64px;
}

.ff-container {
  width: 100%;
  margin: 0 auto;
  padding: 0 2.5%;
}

.ff-logo {
  border-radius: 9px;
  object-fit: cover;
}

/* =================================================================
   HEADER & NAVIGATION
   ================================================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  width: 100%;
  padding: 0.8rem 2.5%;
  background-color: rgba(253, 247, 231, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-align: left;
}

.header-inner {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: none;
  margin: 0;
  gap: 0.75rem;
}

.brand-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  flex: 0 1 auto;
}

.brand-icon {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(31, 42, 29, 0.12);
}

@media screen and (min-width: 768px) {
  .brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }
}

.brand-text-wrapper {
  min-width: 0;
  display: flex;
  align-items: center;
}

.site-title {
  font-family: var(--ff-font-serif);
  font-size: clamp(1.25rem, 4.5vw, var(--ff-text-hero));
  font-weight: 500;
  color: var(--ff-pine);
  margin: 0;
  line-height: 1;
  white-space: nowrap;
  transform: translateY(0.07em);
}

.brand-birdcam {
  color: var(--ff-pine);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-left: auto;
  flex-shrink: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-link {
  color: rgba(31, 42, 29, 0.72);
  text-decoration: none;
  font-size: var(--ff-text-base);
  font-weight: 500;
  transition: color 0.15s ease;
  display: inline-flex;
  align-items: center;
}

.nav-link:hover {
  color: var(--ff-terracotta);
  text-decoration: underline;
}

.nav-link.nav-cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background-color: var(--ff-terracotta);
  color: #ffffff;
  padding: 0.36rem 0.85rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.8rem;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(31, 42, 29, 0.1);
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.nav-link.nav-cta-button:hover {
  background-color: #a85a2b;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(31, 42, 29, 0.15);
  text-decoration: none;
  opacity: 1;
}

.nav-link.nav-cta-button svg {
  display: block;
  flex-shrink: 0;
}

.nav-link.nav-cta-button .cta-text-short {
  display: none;
}

.nav-toggle {
  flex: 0 0 auto;
  display: none;
}

/* Mobile Responsive Drawer (< 768px) */
@media screen and (max-width: 767px) {
  .header-right {
    gap: 0;
  }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    z-index: 100000;
    margin-left: 0;
  }

  .nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--ff-pine);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .header-nav {
    position: fixed;
    top: 100%;
    left: 0;
    right: 0;
    background-color: rgba(253, 247, 231, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
    gap: 1.25rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out, visibility 0.2s ease-in-out;
    visibility: hidden;
    pointer-events: none;
  }

  .header-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
  }

  .nav-toggle.is-open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  body {
    padding-top: 64px;
  }

  .page-container {
    scroll-margin-top: 64px;
  }
}

/* Desktop Screen Layout (>= 768px) */
@media screen and (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .header-nav {
    display: flex;
    position: static;
    background: transparent;
    box-shadow: none;
    padding: 0;
  }
}

/* True Mathematical Centering for Status Pill on >= 900px */
@media screen and (min-width: 900px) {
  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }

  .brand-group {
    grid-column: 1;
    justify-self: start;
  }

  .header-status-pill {
    grid-column: 2;
    justify-self: center;
  }

  .header-right {
    grid-column: 3;
    justify-self: end;
    margin-left: 0;
  }
}

@media screen and (min-width: 900px) and (max-width: 1024px) {
  .header-right {
    gap: 0.9rem;
  }
  .header-nav {
    gap: 0.85rem;
  }
}

@media screen and (max-width: 380px) {
  .site-title {
    font-size: 1.2rem;
    letter-spacing: -0.02em;
  }
  .nav-link.nav-cta-button .cta-text-full {
    display: none;
  }
  .nav-link.nav-cta-button .cta-text-short {
    display: inline;
  }
}

/* =================================================================
   TRENDING HERO STAGE & FIELD NOTES SIDEBAR
   ================================================================= */
.hero-stage-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  text-align: left;
}

.stage-header {
  margin-bottom: 0.45rem;
}

.player-caption {
  font-size: var(--ff-text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  line-height: 1.25;
  color: var(--ff-pine);
  display: flex;
  align-items: center;
  gap: .45rem;
  margin: 0;
}

.player-caption-prefix {
  color: var(--ff-terracotta);
}

.stage-main-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
}

.stage-player-section {
  flex: 1 1 560px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--ff-cream);
  border-radius: 6px;
  border: 1px solid var(--ff-sandstone);
  margin-bottom: 0.45rem;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.stage-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem .75rem;
  padding: 0 .1rem;
  font-size: var(--ff-text-xs);
  color: var(--ff-text-muted);
  min-height: 0;
}

.stage-meta-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
  flex-shrink: 0;
}

.stage-metrics {
  display: flex;
  align-items: center;
  gap: .4rem;
}

.stage-metric-item {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: rgba(31, 42, 29, .05);
  padding: .2rem .6rem;
  border-radius: 9999px;
  font-size: var(--ff-text-xs);
  line-height: 1.25;
}

.metric-surge {
  color: var(--ff-terracotta);
  font-weight: 700;
}

.metric-viewers {
  color: var(--ff-pine);
  font-weight: 500;
}

.metric-sep {
  color: var(--ff-text-muted);
  opacity: .4;
}

.stage-yt-link {
  color: var(--ff-text-muted);
  text-decoration: none;
  font-size: var(--ff-text-xs);
  font-weight: 500;
  white-space: nowrap;
  transition: color .15s ease;
}

.stage-yt-link:hover {
  color: var(--ff-terracotta);
  text-decoration: underline;
}

.stage-yt-link .yt-text-short {
  display: none;
}

@media screen and (max-width: 420px) {
  .stage-yt-link .yt-text-full { display: none; }
  .stage-yt-link .yt-text-short { display: inline; }
}

/* Field Notes Sidebar (Unboxed) */
.stage-sidebar-section {
  flex: 0 0 380px;
  width: 380px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  margin-bottom: 0.15rem;
}

.sidebar-top-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.sidebar-title {
  font-family: var(--ff-font-serif);
  font-size: var(--ff-text-xl);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--ff-pine);
  margin: 0;
  line-height: 1.15;
}

/* Underlined editorial text tabs on a single sandstone baseline */
.tab-switcher {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  border-bottom: 1px solid var(--ff-sandstone);
  margin-bottom: 0.5rem;
}

.tab-btn {
  position: relative;
  bottom: -1px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  font-family: inherit;
  font-size: var(--ff-text-base);
  font-weight: 500;
  color: var(--ff-text-muted);
  padding: 0.25rem 0 0.4rem;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.tab-btn:not(.active):hover {
  color: var(--ff-terracotta);
}

.tab-btn.active {
  color: var(--ff-pine);
  font-weight: 600;
  border-bottom-color: var(--ff-terracotta);
}

.sidebar-subtitle {
  font-size: var(--ff-text-xs);
  color: var(--ff-text-muted);
  margin: 0 0 0.35rem 0;
  line-height: 1.4;
}

/* Original Sandstone List Rows */
.trending-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  font-variant-numeric: tabular-nums;
}

.trending-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.5rem;
  border-bottom: 1px solid var(--ff-sandstone);
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  gap: 0.5rem;
  line-height: 1.35;
  width: 100%;
  overflow: hidden;
}

.trending-item:hover,
.trending-item.active {
  background-color: var(--ff-sandstone);
}

@keyframes trendingRefreshWave {
  0% {
    opacity: 0.35;
    background-color: rgba(101, 115, 66, 0.14);
    transform: translateX(-3px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.trending-item.just-updated {
  animation: trendingRefreshWave 0.75s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--i, 0) * 35ms);
}

.item-left {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.item-rank {
  font-size: var(--ff-text-xs);
  color: var(--ff-text-muted);
  min-width: 1.15rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.35;
  padding: 1px 0;
}

.item-name {
  font-size: var(--ff-text-base);
  font-weight: 500;
  color: var(--ff-pine);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 0;
  min-width: 0;
  line-height: 1.4;
  padding: 1px 0.3em 1px 0;
}

.item-badge {
  font-size: var(--ff-text-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ff-moss);
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.35;
  padding: 1px 0;
}

.item-badge.high-momentum {
  color: var(--ff-terracotta);
  font-weight: 700;
}

.trending-placeholder {
  padding: 1.25rem 0.2rem;
  font-size: var(--ff-text-xs);
  color: var(--ff-text-muted);
  line-height: 1.5;
  border-bottom: 1px solid var(--ff-sandstone);
}

/* =================================================================
   FAVORITES TOGGLE, SCROLLABLE LIST & EMPTY STATE
   ================================================================= */
.fav-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  background: transparent;
  border: none;
  padding: 0.2rem;
  margin: 0;
  color: var(--ff-text-muted);
  font-family: inherit;
  font-size: var(--ff-text-xs);
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.fav-toggle-btn:hover {
  color: var(--ff-terracotta);
}

.fav-toggle-btn:active {
  transform: scale(0.92);
}

.fav-star-icon {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  transition: fill 0.15s ease, stroke 0.15s ease;
}

.fav-toggle-btn.is-favorited {
  color: #b77214;
}

.fav-toggle-btn.is-favorited .fav-star-icon {
  fill: var(--ff-gold);
  stroke: #b77214;
}

.fav-toggle-btn.is-favorited:hover {
  color: var(--ff-terracotta);
}

/* Compact pill under player */
.stage-fav-btn {
  padding: 0.2rem 0.55rem;
  border: 1px solid rgba(31, 42, 29, 0.14);
  border-radius: 9999px;
  background: rgba(31, 42, 29, 0.03);
}

.stage-fav-btn:hover {
  border-color: rgba(183, 89, 56, 0.4);
  background: rgba(183, 89, 56, 0.06);
}

.stage-fav-btn.is-favorited {
  border-color: rgba(226, 157, 56, 0.6);
  background: rgba(226, 157, 56, 0.14);
  color: var(--ff-pine);
}

@media screen and (max-width: 520px) {
  .stage-fav-btn {
    padding: 0.24rem;
  }
  .stage-fav-label {
    display: none;
  }
}

/* Scrollable Favorites list matching ~10-row footprint */
.trending-list.is-favorites-tab {
  max-height: 390px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(31, 42, 29, 0.22) transparent;
}

.trending-list.is-favorites-tab::-webkit-scrollbar {
  width: 6px;
}

.trending-list.is-favorites-tab::-webkit-scrollbar-thumb {
  background-color: rgba(31, 42, 29, 0.2);
  border-radius: 9999px;
}

.fav-row-right {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.fav-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: var(--ff-text-xs);
  font-weight: 500;
  color: var(--ff-text-muted);
  white-space: nowrap;
}

.fav-status-badge.is-active {
  color: var(--ff-moss);
  font-weight: 600;
}

/* Empty state */
.favorites-empty-state {
  padding: 1.35rem 0.25rem;
  border-bottom: 1px solid var(--ff-sandstone);
  line-height: 1.5;
}

.favorites-empty-msg {
  margin: 0 0 0.35rem;
  font-size: var(--ff-text-base);
  color: var(--ff-pine);
}

.favorites-empty-note {
  margin: 0;
  font-size: var(--ff-text-xs);
  color: var(--ff-text-muted);
}

/* Offline favorites: visibly inactive & non-playable, star remains clickable */
.trending-item.is-offline {
  cursor: default;
  opacity: 0.65;
}

.trending-item.is-offline:hover {
  background-color: transparent;
}

.trending-item.is-offline .item-name {
  color: var(--ff-text-muted);
}

.fav-status-badge.is-upcoming {
  color: var(--ff-pine);
}

.fav-status-badge.is-offline {
  color: var(--ff-text-muted);
}

/* Directory card bottom row */
.nest-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

/* One Quiet Footer Line (matches site link styling) */
.sidebar-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.1rem 1rem;
  width: 100%;
}

.sidebar-footer {
  font-size: var(--ff-text-xs);
  color: var(--ff-text-muted);
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.sidebar-surprise-link {
  margin-left: auto;
  background: transparent;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: var(--ff-text-base);
  font-weight: 500;
  color: var(--ff-moss);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.sidebar-surprise-link:hover {
  color: var(--ff-terracotta);
  text-decoration: underline;
}

.sidebar-surprise-link.is-active {
  color: var(--ff-terracotta);
  font-weight: 600;
}

@media screen and (max-width: 899px) {
  .stage-player-section,
  .stage-sidebar-section {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
  }
}

.timestamp-pill {
  color: var(--ff-pine);
  font-weight: 500;
}

.stage-notice-container {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  overflow: hidden;
}

.stage-notice-box {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--ff-cream);
  overflow: hidden;
}

.stage-notice-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.stage-notice-glass {
  position: relative;
  z-index: 1;
  background: rgba(253, 247, 231, .95);
  padding: 1.5rem;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(232, 216, 181, .8);
}

.stage-notice-icon {
  width: 40px;
  height: 40px;
  margin-bottom: .15rem;
  display: block;
}

.stage-notice-title {
  font-family: var(--ff-font-serif);
  font-size: clamp(1.1rem, 4vw, var(--ff-text-xl));
  font-weight: 500;
  color: var(--ff-pine);
  margin: 0;
  line-height: 1.2;
}

.stage-notice-desc {
  font-size: clamp(.75rem, 3vw, var(--ff-text-base));
  color: var(--ff-text-muted);
  margin: 0 0 .35rem 0;
  line-height: 1.4;
}

.stage-notice-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem 1rem;
  background-color: var(--ff-moss);
  color: #fff !important;
  font-weight: 600;
  font-size: clamp(.75rem, 3vw, var(--ff-text-base));
  border-radius: 9999px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(31, 42, 29, .15);
  transition: background-color .15s ease, transform .15s ease;
}

.stage-notice-btn:hover {
  background-color: var(--ff-pine);
  transform: translateY(-1px);
  text-decoration: none;
}

@media (max-width: 480px) {
  .stage-notice-glass {
    padding: 1rem;
    gap: .35rem;
  }
  .stage-notice-icon {
    width: 32px;
    height: 32px;
  }
}

/* =================================================================
   DIRECTORY SECTION & WAVES
   ================================================================= */
.ff-directory-section {
  position: relative;
  width: 100%;
  margin-top: 1rem;
  background: linear-gradient(
    to bottom,
    var(--ff-cream) 0px,
    var(--ff-cream) 35px,
    var(--ff-sandstone) 35px,
    var(--ff-sandstone) calc(100% - 35px),
    var(--ff-cream) calc(100% - 35px)
  );
  overflow-x: hidden;
}

.ff-curve-wrap {
  width: 100%;
  height: 48px;
  line-height: 0;
  overflow: hidden;
  background-color: var(--ff-cream);
  position: relative;
  z-index: 1;
}

.ff-curve-wrap.top {
  margin-top: 0;
  margin-bottom: -2px;
}

.ff-curve-wrap.bottom {
  margin-top: -2px;
  margin-bottom: 0;
}

.ff-curve-svg {
  width: 100%;
  height: 100%;
  display: block;
  transform: scaleY(1.05);
  transform-origin: center;
  shape-rendering: geometricPrecision;
}

.directory-wrapper {
  width: 100%;
  margin: 0 auto;
  background-color: var(--ff-sandstone);
  padding: 1.25rem 2.5% 2.25rem;
  text-align: left;
  color: var(--ff-pine);
}

.directory-header {
  margin-bottom: 0.75rem;
}

.directory-main-title {
  font-family: var(--ff-font-serif);
  font-size: var(--ff-text-hero);
  font-weight: 500;
  color: var(--ff-pine);
  margin: 0 0 .25rem 0;
  line-height: 1.15;
  letter-spacing: -.01em;
}

.directory-subtitle {
  font-size: var(--ff-text-base);
  color: var(--ff-text-muted);
  margin: 0;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.85rem 0 1.25rem 0;
  padding-bottom: 0.5rem;
  flex-wrap: wrap;
}

.filter-controls-group {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  flex: 1 1 500px;
}

.filter-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 260px;
  max-width: 320px;
  width: 100%;
  min-width: 0;
}

.filter-search-input {
  background: #fcfbfa;
  color: var(--ff-pine);
  border: 1px solid rgba(36, 47, 39, .18);
  border-radius: 4px;
  padding: .45rem 2.2rem .45rem .65rem;
  font-size: var(--ff-text-base);
  width: 100%;
  max-width: 100%;
  outline: 0;
  transition: border-color .15s ease;
}

.filter-search-input:focus {
  border-color: var(--ff-moss);
}

#directory-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--ff-pine);
  opacity: .5;
  cursor: pointer;
  padding: 0;
  margin: 0;
  outline: 0;
  z-index: 5;
  transition: opacity .15s ease;
}

#directory-search-clear:hover {
  opacity: 1;
}

.filter-dropdown-universal {
  display: block;
  background: #fcfbfa;
  color: var(--ff-pine);
  border: 1px solid rgba(36, 47, 39, .18);
  border-radius: 4px;
  padding: .45rem 2.2rem .45rem .65rem;
  font-size: var(--ff-text-base);
  font-weight: 500;
  width: 100%;
  max-width: 260px;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%23242f27" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>');
  background-repeat: no-repeat;
  background-position: right .75rem center;
  background-size: 12px 12px;
}

.online-toggle-label {
  display: flex;
  align-items: center;
  gap: .4rem;
  color: var(--ff-pine);
  font-size: var(--ff-text-base);
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.online-toggle-label input {
  accent-color: var(--ff-moss);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.species-group {
  margin-bottom: 1.75rem;
}

.species-title {
  font-family: var(--ff-font-serif);
  color: var(--ff-pine);
  font-size: var(--ff-text-xl);
  font-weight: 500;
  padding-bottom: 0.2rem;
  margin: 0 0 0.65rem 0;
  text-align: left;
}

.species-count {
  font-size: var(--ff-text-base);
  color: var(--ff-text-muted);
  font-weight: 400;
  margin-left: .4rem;
}

.nest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  width: 100%;
}

.nest-item {
  background: #faf7f0;
  border: 1px solid rgba(36, 47, 39, .12);
  border-radius: 6px;
  padding: .85rem .95rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.nest-item:hover {
  background: #fff;
  border-color: var(--ff-moss);
  box-shadow: 0 3px 10px rgba(36, 47, 39, .06);
}

.nest-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .5rem;
  margin-bottom: .2rem;
}

.nest-item-name {
  font-weight: 600;
  font-size: var(--ff-text-md);
  color: var(--ff-pine);
  line-height: 1.25;
}

.nest-item-species {
  font-size: var(--ff-text-xs);
  font-weight: 500;
  color: var(--ff-pine);
  display: flex;
  align-items: center;
  gap: .35rem;
  margin-bottom: .2rem;
}

.meta-dot {
  color: var(--ff-text-muted);
  opacity: .5;
}

.nest-item-location {
  font-size: var(--ff-text-xs);
  color: var(--ff-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: .75rem;
  line-height: 1.35;
}

.status-badge {
  font-size: var(--ff-text-xs);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.badge-active { color: var(--ff-pine); }
.dot-active {
  background-color: var(--ff-moss);
  box-shadow: 0 0 0 2px rgba(101, 115, 66, .25);
}

.badge-upcoming { color: var(--ff-pine); }
.dot-upcoming { background-color: var(--ff-gold); }

.badge-offline { color: var(--ff-text-muted); }
.dot-offline {
  background-color: var(--ff-text-muted);
  opacity: .6;
}

.directory-link {
  color: var(--ff-moss);
  text-decoration: none;
  font-size: var(--ff-text-base);
  font-weight: 500;
}

.directory-link:hover {
  color: var(--ff-terracotta);
  text-decoration: underline;
}

.directory-link.disabled {
  color: rgba(74, 85, 74, .5);
  cursor: not-allowed;
  font-weight: 400;
}

.directory-footer {
  margin-top: 2rem;
  font-size: var(--ff-text-xs);
  color: var(--ff-text-muted);
  padding-top: .75rem;
  margin-bottom: 1rem;
}

.loading-state {
  color: var(--ff-text-muted);
  font-size: var(--ff-text-base);
  padding: .5rem 0;
}

.nest-directory-wrapper {
  position: relative;
  max-height: 750px;
  overflow: hidden;
  transition: max-height .4s ease-in-out;
}

.nest-directory-wrapper.is-expanded {
  max-height: none;
}

.nest-directory-wrapper::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 180px;
  background: linear-gradient(to bottom, rgba(216, 212, 200, 0) 0%, var(--ff-sandstone) 90%);
  pointer-events: none;
  transition: opacity .3s ease;
  opacity: 1;
}

.nest-directory-wrapper.is-expanded::after {
  opacity: 0;
}

.directory-expand-bar {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 10;
}

.directory-expand-btn {
  background: #fcfbfa;
  color: var(--ff-pine);
  border: 1px solid rgba(36, 47, 39, .2);
  border-radius: 6px;
  padding: .75rem 2rem;
  font-size: var(--ff-text-base);
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(36, 47, 39, .08);
  transition: all .15s ease;
}

.directory-expand-btn:hover {
  background: var(--ff-pine);
  color: var(--ff-cream);
  border-color: var(--ff-pine);
}

.solar-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  color: var(--ff-text-muted);
  font-size: var(--ff-text-xs);
  font-weight: 500;
  vertical-align: middle;
}

.solar-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  display: inline-block;
}

.solar-icon.day { color: var(--ff-gold); }
.solar-icon.night { color: var(--ff-lavender); }

/* =================================================================
   NEST MAP
   ================================================================= */
.map-header {
  width: 100%;
  margin: 1.5rem auto 0.75rem;
  text-align: left;
}

.map-main-title {
  font-family: var(--ff-font-serif);
  font-size: var(--ff-text-hero);
  font-weight: 500;
  color: var(--ff-pine);
  margin: 0 0 0.25rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.map-subtitle {
  font-size: var(--ff-text-base);
  color: var(--ff-text-muted);
  margin: 0;
}

#nest-map-wrapper {
  position: relative;
  width: 100%;
  height: 520px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--ff-cream);
  border: 1px solid var(--ff-sandstone);
}

#map {
  width: 100%;
  height: 100%;
  display: block;
}

.custom-svg-pin {
  background: none;
  border: none;
}

.custom-svg-pin svg {
  transition: transform 0.15s ease-in-out;
  cursor: pointer;
}

.custom-svg-pin:hover svg {
  transform: scale(1.15);
}

.map-controls-bar {
  position: absolute;
  top: 16px;
  right: 16px;
  left: auto;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
}

.region-switcher-toggle,
.layer-switcher-toggle {
  position: relative;
  background: rgba(252, 251, 250, 0.95);
  border: 1px solid var(--ff-sandstone);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(36, 47, 39, 0.08);
  display: flex;
  overflow: hidden;
  padding: 3px;
  gap: 3px;
  flex-shrink: 0;
}

.region-btn,
.layer-btn {
  border: none;
  background: transparent;
  color: var(--ff-text-muted);
  padding: 4px 10px;
  font-size: var(--ff-text-xs);
  font-weight: 500;
  line-height: 1.2;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.region-btn:hover,
.layer-btn:hover:not(.active) {
  background: var(--ff-cream);
  color: var(--ff-pine);
}

.region-btn.active,
.layer-btn.active {
  background: var(--ff-moss);
  color: #fff;
}

.map-search-container {
  width: 100%;
  max-width: 400px;
  margin-bottom: 14px;
  position: relative;
}

#map-search-input {
  width: 100%;
  height: 38px;
  padding: 6px 36px 6px 12px;
  font-size: var(--ff-text-base);
  background: #fcfbfa;
  border: 1px solid var(--ff-sandstone);
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(36, 47, 39, 0.05);
  outline: none;
  color: var(--ff-pine);
  transition: border-color 0.15s ease;
}

#map-search-input:focus {
  border-color: var(--ff-moss);
}

#map-search-clear {
  position: absolute;
  right: 10px;
  top: 19px;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--ff-pine);
  opacity: 0.5;
  cursor: pointer;
  padding: 0;
  outline: none;
  z-index: 10;
  transition: opacity 0.15s ease;
}

#map-search-clear:hover {
  opacity: 1;
}

.map-search-dropdown {
  position: absolute;
  top: 42px;
  left: 0;
  right: 0;
  background: #fcfbfa;
  border: 1px solid var(--ff-sandstone);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(36, 47, 39, 0.1);
  max-height: 220px;
  overflow-y: auto;
  display: none;
  z-index: 1005;
}

.map-search-dropdown.active {
  display: block;
}

.map-search-item {
  padding: 8px 12px;
  font-size: var(--ff-text-xs);
  color: var(--ff-pine);
  cursor: pointer;
  border-bottom: 1px solid var(--ff-sandstone);
  line-height: 1.25;
}

.map-search-item:last-child {
  border-bottom: none;
}

.map-search-item:hover {
  background: var(--ff-cream);
}

.map-search-item-species {
  font-size: var(--ff-text-xs);
  color: var(--ff-text-muted);
  margin-top: 2px;
}

.external-nest-legend {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0 0.2rem;
  margin-bottom: 0;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.legend-left-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.nest-legend-title {
  font-weight: 600;
  font-size: var(--ff-text-base);
  color: var(--ff-pine);
}

.nest-legend-grid {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nest-legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--ff-text-base);
  font-weight: 500;
  color: var(--ff-pine);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.dot-falcon { background: var(--ff-terracotta); }
.dot-eagle  { background: var(--ff-pine); }
.dot-owl    { background: var(--ff-moss); }
.dot-other  { background: var(--ff-lavender); }

.nest-legend-disclaimer {
  font-size: var(--ff-text-xs);
  color: var(--ff-text-muted);
  font-style: italic;
  text-align: right;
}

.nest-card-panel {
  display: none;
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 1002;
  width: 320px;
  max-width: calc(100% - 32px);
  background: rgba(250, 247, 240, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(36, 47, 39, 0.16);
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(36, 47, 39, 0.18);
  padding: 0.85rem 0.95rem;
  margin: 0;
  text-align: left;
}

.nest-card-panel.active {
  display: flex;
  flex-direction: column;
}

.nest-card-panel .nest-item-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.25rem;
  width: auto;
  padding-right: 20px;
}

#card-status-badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 1;
}

.nest-card-panel .nest-item-name {
  font-weight: 600;
  font-size: var(--ff-text-md);
  color: var(--ff-pine);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.nest-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.4rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(36, 47, 39, 0.08);
}

.nest-card-actions .directory-link {
  font-size: var(--ff-text-base);
  font-weight: 500;
  color: var(--ff-moss);
  text-decoration: none;
}

.nest-card-actions .directory-link:hover {
  color: var(--ff-terracotta);
  text-decoration: underline;
}

.nest-card-actions .directory-link.disabled {
  color: rgba(74, 85, 74, 0.5);
  cursor: not-allowed;
  pointer-events: none;
}

.nest-card-close {
  position: absolute;
  top: 8px;
  right: 8px;
  border: none;
  background: transparent;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  color: var(--ff-text-muted);
  padding: 4px;
  transition: color 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nest-card-close:hover {
  color: var(--ff-pine);
}

/* =================================================================
   COMMUNITY SECTION
   ================================================================= */
.ff-community-section {
  position: relative;
  width: 100%;
  margin-top: 3rem;
  background: var(--ff-sandstone);
  line-height: 0;
}

.community-wrapper {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  line-height: normal;
  color: var(--ff-pine);
}

.community-header {
  max-width: 780px;
  margin: 0 auto 2rem;
  text-align: center;
}

.community-main-title {
  font-family: var(--ff-font-serif);
  font-size: 2rem;
  font-weight: 500;
  color: var(--ff-pine);
  margin: 0 0 0.75rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.community-intro {
  font-size: var(--ff-text-lg);
  line-height: 1.65;
  color: var(--ff-pine);
  margin: 0;
}

.community-cta-block {
  max-width: 680px;
  margin: 0 auto 3rem;
  text-align: center;
}

.cta-action-row {
  display: flex;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.ff-btn-community {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.85rem 1.75rem;
  background: linear-gradient(135deg, var(--ff-gold), var(--ff-terracotta));
  color: #fff;
  font-weight: 600;
  font-size: var(--ff-text-md);
  text-decoration: none;
  border-radius: 9999px;
  box-shadow: 0 3px 12px rgba(36, 47, 39, 0.15);
  transition: transform 0.15s, box-shadow 0.15s;
}

.ff-btn-community:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 16px rgba(36, 47, 39, 0.22);
}

.community-help-note {
  font-size: var(--ff-text-xs);
  color: var(--ff-text-muted);
  text-align: center;
  margin: 0.65rem 0 0 0;
  line-height: 1.4;
}

.community-help-note a {
  color: var(--ff-moss);
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.15s ease;
}

.community-help-note a:hover {
  color: var(--ff-terracotta);
}

.community-features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.75rem;
  margin-bottom: 2.75rem;
  padding-top: 1rem;
  text-align: left;
}

.feature-item {
  border-left: 3px solid var(--ff-terracotta);
  padding-left: 0.85rem;
}

.feature-title {
  font-family: var(--ff-font-serif);
  font-size: var(--ff-text-xl);
  font-weight: 500;
  color: var(--ff-pine);
  margin: 0 0 0.35rem;
  line-height: 1.25;
}

.feature-desc {
  font-size: var(--ff-text-base);
  line-height: 1.5;
  color: var(--ff-pine);
  opacity: 0.85;
  margin: 0;
}

.community-outro {
  font-style: italic;
  font-size: var(--ff-text-lg);
  line-height: 1.6;
  color: var(--ff-pine);
  opacity: 0.9;
  margin: 0 auto;
  max-width: 750px;
  text-align: center;
}

/* =================================================================
   FOOTER
   ================================================================= */
.ff-site-footer {
  width: 100%;
  background: var(--ff-cream);
  padding: 2.5rem 0 3.5rem;
}

.ff-footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.ff-footer-nav {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.ff-footer-title {
  font-family: var(--ff-font-serif);
  font-size: var(--ff-text-lg);
  font-weight: 500;
  color: var(--ff-pine);
}

.ff-footer-link {
  color: var(--ff-moss);
  text-decoration: none;
  font-size: var(--ff-text-base);
  font-weight: 500;
}

.ff-footer-link:hover {
  color: var(--ff-terracotta);
  text-decoration: underline;
}

.ff-footer-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: var(--ff-text-xs);
  color: var(--ff-text-muted);
}

.ff-footer-dot {
  color: var(--ff-sandstone);
  font-size: var(--ff-text-xs);
}

/* =================================================================
   RESPONSIVE MEDIA QUERIES
   ================================================================= */
@media screen and (max-width: 900px) {
  .community-features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media screen and (max-width: 768px) {
  .stage-sidebar-section {
    flex: 1 1 100%;
    max-width: 100%;
    min-width: 0;
  }
}

@media screen and (max-width: 650px) {
   body { padding-top: 56px; }
  .site-header { padding: 0.65rem 0.75rem; }
  .page-container { padding: 0 0.75rem; scroll-margin-top: 56px; }
  .stage-main-grid { gap: 0.85rem; }
  .stage-header { margin-top: 0; margin-bottom: 0.35rem; }
  .video-container { margin-bottom: 0.35rem; }
  .stage-meta-bar { padding: 0; min-height: 0; }
  .trending-item { padding: 0.45rem 0.4rem; }
  .sidebar-footer-row { padding: 0.5rem 0.1rem 0.75rem; }
  .ff-directory-section {
    background: linear-gradient(
      to bottom,
      var(--ff-cream) 0px,
      var(--ff-cream) 18px,
      var(--ff-sandstone) 18px,
      var(--ff-sandstone) calc(100% - 18px),
      var(--ff-cream) calc(100% - 18px)
    );
  }
  .ff-curve-wrap { height: 28px; }
  .ff-curve-wrap.top { margin-top: 0; margin-bottom: -2px; }
  .ff-curve-wrap.bottom { margin-top: -2px; margin-bottom: 0; }

  .directory-wrapper { padding: 1.25rem 1rem; }
  .filter-bar { margin: 0.85rem 0 1.25rem; padding-bottom: 0.5rem; }
  .filter-controls-group,
  .filter-search-wrapper,
  .filter-search-input,
  .filter-dropdown-universal {
    max-width: 100%;
    flex: 1 1 100%;
  }
  .species-group { margin-bottom: 1.5rem; }
  .species-title { margin: 0 0 0.65rem; }
  .directory-expand-bar { margin: 0.75rem 0 1.25rem; }

  #nest-map-wrapper { height: 440px; }
  .map-header { margin: 1.75rem auto 1rem; }
  .map-controls-bar { position: absolute; top: 12px; left: auto; right: 12px; }
  .external-nest-legend {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 10px 12px;
  }
  .nest-legend-grid { width: 100%; justify-content: space-between; }
  .nest-legend-disclaimer { text-align: left; }

  .leaflet-control-zoom {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1002;
    box-shadow: 0 2px 6px rgba(36, 47, 39, 0.1);
    border: 1px solid var(--ff-sandstone);
    border-radius: 4px;
    overflow: hidden;
  }
  .leaflet-control-zoom a {
    width: 28px;
    height: 28px;
    line-height: 28px;
    background: rgba(252, 251, 250, 0.95);
    color: var(--ff-pine);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
  }
  .layer-switcher-toggle {
    background: rgba(252, 251, 250, 0.95);
    padding: 2px;
    gap: 2px;
  }
  .layer-btn {
    padding: 3px 8px;
    font-size: var(--ff-text-xs);
  }

  .ff-community-section { margin-top: 1.75rem; }
  .community-wrapper { padding: 1.5rem 1.15rem; }
  .community-header { margin-bottom: 1.25rem; }
  .community-cta-block { margin-bottom: 1.75rem; }
  .community-features-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
  }
  .ff-btn-community { width: 100%; }
  .ff-site-footer { padding: 1.75rem 0 2.5rem; }

  .nest-card-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    border-top: 1px solid rgba(36, 47, 39, 0.2);
    background: rgba(250, 247, 240, 0.98);
    box-shadow: 0 -2px 10px rgba(36, 47, 39, 0.12);
    padding: 0 0.75rem;
    height: 48px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .nest-card-info-wrap {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    margin-right: 0.5rem;
  }
  .nest-card-panel .nest-item-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0;
    padding-right: 0;
    width: auto;
    min-width: 0;
  }
  .nest-card-panel .nest-item-species,
  .nest-card-panel .nest-item-location,
  .nest-card-actions .gmaps-link {
    display: none;
  }
  .nest-card-panel .nest-item-name {
    font-size: var(--ff-text-xs);
    font-weight: 600;
  }
  .nest-card-actions {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    flex-shrink: 0;
    gap: 0.5rem;
  }
  .nest-card-actions .directory-link {
    font-size: var(--ff-text-xs);
    font-weight: 600;
    white-space: nowrap;
  }
  .nest-card-close {
    position: static;
    padding: 2px 0 2px 4px;
  }
  .region-switcher-toggle {
    display: none;
  }
}

@media screen and (max-width: 480px) {
  .player-caption {
    font-size: 0.65rem;
    letter-spacing: 0.05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .ff-footer-nav,
  .ff-footer-meta {
    gap: 0.4rem;
  }
}

@media screen and (max-width: 420px) {
  /* Slim fixed header + tighter top clearance */
  body {
    padding-top: 50px;
  }
  .site-header {
    padding: 0.5rem 0.5rem;
  }

  /* Maximize player width while keeping clean 8px edge breathing room */
  .page-container {
    padding: 0 0.5rem;
    scroll-margin-top: 50px;
  }

  /* Pull "What's on now" higher above the fold */
  .stage-header {
    margin-bottom: 0.25rem;
  }
  .video-container {
    margin-bottom: 0.25rem;
  }
  .stage-main-grid {
    gap: 0.5rem;
  }
  .sidebar-top-row {
    margin-bottom: 0.25rem;
  }
  .tab-switcher {
    gap: 1rem;
    margin-bottom: 0.35rem;
  }
  .tab-btn {
    padding: 0.2rem 0 0.3rem;
  }
  .sidebar-subtitle {
    margin-bottom: 0.25rem;
  }
  .trending-item {
    padding: 0.4rem 0.35rem;
  }
}