/* Shared Cinema navigation. The second selector supports pages served by the
   existing app until their next build; their React buttons/handlers stay intact. */
:root { --cinema-nav-ring: #a78bfa88; }
/* Keep navigation and chat above the trailer feed's initial loading screen. */
body:has(#yt-player-container) .fixed.inset-0.z-\[100\]:has(.h-24.animate-spin) { z-index: 40; }
[data-home-navigation],
nav.fixed.inset-x-0.bottom-0:has(> div > button[aria-label="Chat"]) {
  position: fixed;
  z-index: 50;
  inset-inline: auto;
  left: 50%;
  right: auto;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: min(352px, calc(100% - 40px));
  margin: 0;
  font: 10px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-sizing: border-box;
}
[data-home-navigation],
nav.fixed.inset-x-0.bottom-0:has(> div > button[aria-label="Chat"]) > div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: none;
  padding: 8px;
  border: 1px solid #a78bfa40;
  border-radius: 28px;
  background: #1c152bed;
  box-shadow: 0 12px 40px #0008, inset 0 1px 0 #ffffff0a;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-sizing: border-box;
}
nav.fixed.inset-x-0.bottom-0:has(> div > button[aria-label="Chat"]) {
  display: block;
  padding: 0;
}
nav.fixed.inset-x-0.bottom-0:has(> div > button[aria-label="Chat"]) > div { width: 100%; }
[data-home-navigation] > a, [data-home-navigation] > button,
nav.fixed.inset-x-0.bottom-0:has(> div > button[aria-label="Chat"]) > div > button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
  min-width: 0;
  min-height: 60px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: #bcb2ce;
  font: 500 10px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-decoration: none;
  cursor: pointer;
  transform: none;
  box-sizing: border-box;
}
[data-home-navigation] > a > span:first-child,
[data-home-navigation] > button > span:first-child,
nav.fixed.inset-x-0.bottom-0:has(> div > button[aria-label="Chat"]) button > span,
nav.fixed.inset-x-0.bottom-0:has(> div > button[aria-label="Chat"]) button > span > span:last-child {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: inherit;
  background: transparent;
  box-shadow: none;
  box-sizing: border-box;
}
nav.fixed.inset-x-0.bottom-0:has(> div > button[aria-label="Chat"]) button > span > span:not(:last-child) { display: none; }
[data-home-navigation] > [aria-current="page"],
[data-home-navigation] > [aria-expanded="true"],
nav.fixed.inset-x-0.bottom-0:has(> div > button[aria-label="Chat"]) button:has(.shadow-glow) { color: #f7f5ff; }
[data-home-navigation] > [aria-current="page"] > span:first-child,
[data-home-navigation] > [aria-expanded="true"] > span:first-child,
nav.fixed.inset-x-0.bottom-0:has(> div > button[aria-label="Chat"]) button > span > span.shadow-glow {
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
  box-shadow: 0 0 0 2px #1c152b, 0 0 0 3px var(--cinema-nav-ring), 0 2px 16px #8b5cf635;
}
[data-home-navigation] > [data-nav-ai]:not([aria-expanded="true"]) > span:first-child,
nav.fixed.inset-x-0.bottom-0:has(> div > button[aria-label="Chat"]) button[aria-label="Chat"] > span > span:not(.shadow-glow) {
  color: #c4b5fd;
  background: radial-gradient(circle, #8b5cf622, transparent 75%);
}
[data-home-navigation] svg,
nav.fixed.inset-x-0.bottom-0:has(> div > button[aria-label="Chat"]) svg { width: 21px; height: 21px; stroke-width: 2; }
[data-home-navigation] [data-nav-ai] svg,
nav.fixed.inset-x-0.bottom-0:has(> div > button[aria-label="Chat"]) button[aria-label="Chat"] svg { width: 22px; height: 22px; }
nav.fixed.inset-x-0.bottom-0:has(> div > button[aria-label="Chat"]) button::after { display: block; font: inherit; line-height: 14.5px; }
nav.fixed.inset-x-0.bottom-0:has(> div > button[aria-label="Chat"]) button[aria-label="Home"]::after { content: "Home"; }
nav.fixed.inset-x-0.bottom-0:has(> div > button[aria-label="Chat"]) button[aria-label="Reels"]::after { content: "Reels"; }
nav.fixed.inset-x-0.bottom-0:has(> div > button[aria-label="Chat"]) button[aria-label="Chat"]::after { content: "AI"; }
nav.fixed.inset-x-0.bottom-0:has(> div > button[aria-label="Chat"]) button[aria-label="Profile"]::after { content: "Profile"; }
[data-home-navigation] > a:focus-visible, [data-home-navigation] > button:focus-visible,
nav.fixed.inset-x-0.bottom-0:has(> div > button[aria-label="Chat"]) button:focus-visible { outline: 2px solid #c4b5fd; outline-offset: 4px; }
