/* ==========================================================================
   THE GRAND ESTATE — Private Cinema & Personal Library Portal
   Root Landing Page Stylesheet (styles.css)
   ========================================================================== */

:root {
  /* Core Architectural Palette */
  --bg-obsidian: #08070a;
  --bg-foyer: #0e0c12;
  --bg-card: #15121a;
  --bg-card-elevated: #1c1823;
  --bg-glass: rgba(20, 16, 24, 0.84);

  /* Cinema Wing Accents (Velvet & Marquee Gold) */
  --cinema-crimson: #9e1b2b;
  --cinema-crimson-deep: #520912;
  --cinema-crimson-glow: rgba(212, 38, 60, 0.38);
  --cinema-gold: #f0c45a;

  /* Library Wing Accents (Walnut, Brass & Leather) */
  --library-amber: #d49442;
  --library-walnut: #4e2b18;
  --library-walnut-deep: #29150b;
  --library-amber-glow: rgba(212, 148, 66, 0.36);
  --library-parchment: #f5ebd6;

  /* Shared Gold Filigree & Typography */
  --gold-bright: #f6d57a;
  --gold-primary: #d4af37;
  --gold-muted: #9a7b2c;
  --gold-border: rgba(212, 175, 55, 0.28);
  --gold-border-strong: rgba(246, 213, 122, 0.58);

  --text-primary: #f7f2e7;
  --text-secondary: #cbbba0;
  --text-dim: #8c7e6a;

  --font-cinema: 'Cinzel', Georgia, serif;
  --font-library: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  --shadow-deep: 0 24px 60px rgba(0, 0, 0, 0.75);
  --shadow-gold: 0 0 32px rgba(212, 175, 55, 0.18);
  --transition-smooth: all 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Ambient Lighting Themes */
body[data-ambiance="midnight"] {
  --bg-obsidian: #040508;
  --bg-foyer: #080a10;
  --bg-card: #0e111a;
  --gold-primary: #c9a646;
}

body[data-ambiance="study"] {
  --bg-obsidian: #100a07;
  --bg-foyer: #180f0a;
  --bg-card: #22160f;
  --gold-primary: #deb052;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--bg-obsidian);
  background-image:
    radial-gradient(ellipse 65% 45% at 18% 12%, rgba(158, 27, 43, 0.16), transparent 70%),
    radial-gradient(ellipse 65% 45% at 82% 12%, rgba(184, 115, 51, 0.16), transparent 70%),
    radial-gradient(ellipse 90% 60% at 50% 100%, rgba(212, 175, 55, 0.07), transparent 75%),
    linear-gradient(180deg, var(--bg-obsidian) 0%, var(--bg-foyer) 45%, #070609 100%);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Subtle Architectural Background Grid & Vignette */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(212, 175, 55, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(212, 175, 55, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 30%, black 20%, transparent 85%);
}

/* ==========================================================================
   TOP ARCHITECTURAL HEADER & NAVIGATION
   ========================================================================== */

.estate-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 8, 13, 0.88);
  backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid var(--gold-border);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.65);
}

.estate-header::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
  opacity: 0.55;
}

.header-container {
  max-width: 1560px;
  margin: 0 auto;
  padding: 0.75rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.estate-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  user-select: none;
}

.brand-crest {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2b1419 0%, #1c140d 50%, #2a1c11 100%);
  border: 1px solid var(--gold-border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), inset 0 0 12px rgba(212, 175, 55, 0.22);
  transition: var(--transition-smooth);
}

.estate-brand:hover .brand-crest {
  transform: scale(1.06) rotate(-3deg);
  box-shadow: 0 6px 22px rgba(212, 175, 55, 0.35);
}

.brand-text-group {
  display: flex;
  flex-direction: column;
}

.brand-kicker {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--gold-primary);
  font-weight: 600;
}

.brand-name {
  font-family: var(--font-cinema);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: linear-gradient(90deg, #fff6df 0%, var(--gold-bright) 50%, #e0b252 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.15;
}

/* Mode Switcher Tabs (Foyer / Cinema / Library / Split) */
.wing-switcher {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--gold-border);
  border-radius: 999px;
  padding: 0.25rem;
  gap: 0.25rem;
}

.wing-tab {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.48rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.wing-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.wing-tab.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.26) 0%, rgba(158, 27, 43, 0.32) 100%);
  color: var(--gold-bright);
  border: 1px solid var(--gold-border-strong);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.wing-tab-count {
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Header Right Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.btn-estate {
  appearance: none;
  border: 1px solid var(--gold-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.52rem 0.95rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.btn-estate:hover {
  border-color: var(--gold-border-strong);
  background: rgba(212, 175, 55, 0.14);
  transform: translateY(-1px);
}

.btn-estate-gold {
  background: linear-gradient(135deg, #e5be55 0%, #b88728 100%);
  color: #120d06;
  border-color: #f9df8b;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(212, 175, 55, 0.28);
}

.btn-estate-gold:hover {
  background: linear-gradient(135deg, #f5d26e 0%, #ca9832 100%);
  color: #090603;
  box-shadow: 0 6px 24px rgba(212, 175, 55, 0.45);
}

/* ==========================================================================
   MAIN FOYER CONTAINER
   ========================================================================== */

.foyer-main {
  position: relative;
  z-index: 1;
  max-width: 1560px;
  margin: 0 auto;
  padding: 1.75rem 1.75rem 4rem;
}

/* Welcome Banner / Estate Plaque */
.estate-plaque {
  text-align: center;
  margin-bottom: 1.65rem;
  position: relative;
}

.plaque-overline {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--gold-primary);
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid var(--gold-border);
  padding: 0.32rem 0.95rem;
  border-radius: 999px;
  margin-bottom: 0.65rem;
}

.plaque-title {
  font-family: var(--font-cinema);
  font-size: clamp(1.65rem, 3vw, 2.55rem);
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.8);
  margin-bottom: 0.35rem;
}

.plaque-subtitle {
  font-family: var(--font-library);
  font-style: italic;
  font-size: clamp(0.98rem, 1.4vw, 1.18rem);
  color: var(--text-secondary);
  max-width: 740px;
  margin: 0 auto;
}

/* ==========================================================================
   MONUMENTAL DUAL-WING PORTALS (CINEMA & LIBRARY)
   ========================================================================== */

.dual-portals-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem;
  margin-bottom: 2.25rem;
}

.wing-portal {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  min-height: 510px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem;
  border: 1px solid var(--gold-border);
  box-shadow: var(--shadow-deep);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.35s ease, box-shadow 0.35s ease;
  isolation: isolate;
}

.wing-portal:hover {
  transform: translateY(-5px);
}

.wing-portal-cinema {
  background: linear-gradient(160deg, #24080d 0%, #120609 55%, #0b070a 100%);
  border-color: rgba(235, 92, 108, 0.35);
}

.wing-portal-cinema:hover {
  border-color: rgba(240, 196, 90, 0.72);
  box-shadow: 0 28px 68px rgba(158, 27, 43, 0.35), 0 0 40px rgba(240, 196, 90, 0.15);
}

.wing-portal-library {
  background: linear-gradient(160deg, #26150b 0%, #140c07 55%, #0b0806 100%);
  border-color: rgba(212, 148, 66, 0.35);
}

.wing-portal-library:hover {
  border-color: rgba(240, 196, 90, 0.72);
  box-shadow: 0 28px 68px rgba(168, 101, 35, 0.32), 0 0 40px rgba(212, 148, 66, 0.16);
}

/* Live Dynamic Backdrop inside Each Wing */
.portal-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 25%;
  opacity: 0.28;
  filter: saturate(1.15) contrast(1.08);
  transition: opacity 0.8s ease, transform 7s ease;
  z-index: -2;
}

.wing-portal:hover .portal-backdrop {
  opacity: 0.38;
  transform: scale(1.05);
}

.portal-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.wing-portal-cinema .portal-overlay {
  background:
    radial-gradient(circle at 85% 18%, rgba(220, 38, 62, 0.28), transparent 55%),
    linear-gradient(180deg, rgba(16, 6, 9, 0.55) 0%, rgba(16, 6, 9, 0.84) 52%, rgba(10, 5, 8, 0.97) 100%);
}

.wing-portal-library .portal-overlay {
  background:
    radial-gradient(circle at 85% 18%, rgba(212, 148, 66, 0.26), transparent 55%),
    linear-gradient(180deg, rgba(22, 13, 7, 0.55) 0%, rgba(18, 11, 6, 0.85) 52%, rgba(11, 7, 5, 0.97) 100%);
}

/* Marquee Lights / Wood Trim Top Accent */
.portal-top-trim {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
}

.wing-portal-cinema .portal-top-trim {
  background: repeating-linear-gradient(
    90deg,
    #f7d774 0px,
    #f7d774 6px,
    transparent 6px,
    transparent 14px
  );
  box-shadow: 0 0 14px rgba(247, 215, 116, 0.75);
}

.wing-portal-library .portal-top-trim {
  background: linear-gradient(90deg, #6e3f1d, #e2af56, #8c5227, #e2af56, #6e3f1d);
  box-shadow: 0 0 14px rgba(226, 175, 86, 0.5);
}

/* Portal Header */
.portal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.portal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.55rem;
}

.wing-portal-cinema .portal-badge {
  background: rgba(180, 28, 48, 0.38);
  color: #ffccd2;
  border: 1px solid rgba(255, 120, 138, 0.45);
}

.wing-portal-library .portal-badge {
  background: rgba(168, 102, 38, 0.38);
  color: #ffe3b8;
  border: 1px solid rgba(235, 174, 96, 0.45);
}

.portal-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff4d64;
  box-shadow: 0 0 8px #ff4d64;
  animation: pulseGlow 2s infinite;
}

.wing-portal-library .portal-pulse {
  background: #f5b952;
  box-shadow: 0 0 8px #f5b952;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.portal-title {
  font-size: clamp(1.5rem, 2.2vw, 2.05rem);
  line-height: 1.15;
  margin-bottom: 0.3rem;
}

.wing-portal-cinema .portal-title {
  font-family: var(--font-cinema);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff6e0;
}

.wing-portal-library .portal-title {
  font-family: var(--font-library);
  font-weight: 700;
  color: #fdf2dc;
}

.portal-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.portal-emblem-large {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--gold-border);
  box-shadow: inset 0 0 18px rgba(212, 175, 55, 0.16);
}

/* Portal Stats Row */
.portal-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-bottom: 1.15rem;
}

.portal-stat-box {
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  text-align: center;
  backdrop-filter: blur(8px);
}

.portal-stat-val {
  display: block;
  font-family: var(--font-cinema);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gold-bright);
  line-height: 1.15;
}

.portal-stat-lbl {
  font-size: 0.69rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

/* Live Featured Spotlight inside Portal */
.portal-spotlight {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  background: rgba(0, 0, 0, 0.52);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  margin-bottom: 1.15rem;
  backdrop-filter: blur(10px);
}

.spotlight-thumb-wrap {
  width: 58px;
  height: 84px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--gold-border-strong);
  background: #1a141c;
  cursor: pointer;
  position: relative;
}

.wing-portal-library .spotlight-thumb-wrap {
  width: 66px;
  height: 66px;
  border-radius: 8px;
}

.spotlight-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.spotlight-info {
  flex: 1;
  min-width: 0;
}

.spotlight-kicker {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold-primary);
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.spotlight-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.spotlight-name:hover {
  color: var(--gold-bright);
  text-decoration: underline;
}

.spotlight-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotlight-shuffle-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.spotlight-shuffle-btn:hover {
  background: rgba(212, 175, 55, 0.22);
  border-color: var(--gold-bright);
  transform: rotate(90deg);
}

/* Miniature Visual Preview Ribbon inside Each Wing */
.portal-preview-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.55rem;
  margin-bottom: 1.35rem;
}

.strip-item {
  aspect-ratio: 2 / 3;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #16121a;
  cursor: pointer;
  position: relative;
  transition: var(--transition-smooth);
}

.wing-portal-library .strip-item {
  aspect-ratio: 1 / 1;
  border-radius: 7px;
}

.strip-item:hover {
  transform: translateY(-4px) scale(1.06);
  border-color: var(--gold-bright);
  z-index: 2;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.75);
}

.strip-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Portal CTA Buttons Row */
.portal-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-portal-primary {
  flex: 1;
  min-width: 210px;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
}

.wing-portal-cinema .btn-portal-primary {
  background: linear-gradient(135deg, #c81e35 0%, #8a1122 100%);
  color: #fff;
  border-color: rgba(255, 160, 172, 0.45);
  box-shadow: 0 8px 24px rgba(180, 20, 42, 0.45);
}

.wing-portal-cinema .btn-portal-primary:hover {
  background: linear-gradient(135deg, #e02841 0%, #a31529 100%);
  box-shadow: 0 10px 30px rgba(224, 40, 65, 0.65);
  transform: translateY(-2px);
}

.wing-portal-library .btn-portal-primary {
  background: linear-gradient(135deg, #d8963e 0%, #965b19 100%);
  color: #140b04;
  border-color: rgba(255, 222, 168, 0.55);
  box-shadow: 0 8px 24px rgba(184, 115, 40, 0.42);
}

.wing-portal-library .btn-portal-primary:hover {
  background: linear-gradient(135deg, #eba94f 0%, #b06d22 100%);
  box-shadow: 0 10px 30px rgba(216, 150, 62, 0.62);
  transform: translateY(-2px);
}

.btn-portal-secondary {
  appearance: none;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--gold-border);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: var(--transition-smooth);
}

.btn-portal-secondary:hover {
  background: rgba(212, 175, 55, 0.18);
  border-color: var(--gold-bright);
}

/* ==========================================================================
   OMNI-SEARCH BAR (SEARCH MOVIES + BOOKS TOGETHER)
   ========================================================================== */

.omni-search-section {
  background: linear-gradient(180deg, rgba(25, 20, 31, 0.9) 0%, rgba(16, 13, 21, 0.94) 100%);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.65rem;
  margin-bottom: 2.25rem;
  box-shadow: var(--shadow-deep);
}

.omni-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.omni-title-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.omni-title {
  font-family: var(--font-cinema);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--gold-bright);
  letter-spacing: 0.04em;
}

.omni-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.omni-scope-pills {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.scope-pill {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.38rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.scope-pill:hover {
  color: var(--text-primary);
  border-color: var(--gold-border);
}

.scope-pill.active {
  background: rgba(212, 175, 55, 0.2);
  color: var(--gold-bright);
  border-color: var(--gold-border-strong);
}

.omni-input-row {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 0.85rem;
}

.omni-search-icon {
  position: absolute;
  left: 1.1rem;
  font-size: 1.1rem;
  pointer-events: none;
}

.omni-input {
  width: 100%;
  padding: 0.95rem 3rem 0.95rem 3rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: rgba(6, 5, 8, 0.78);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.96rem;
  outline: none;
  transition: var(--transition-smooth);
}

.omni-input:focus {
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
}

.omni-clear-btn {
  position: absolute;
  right: 0.9rem;
  appearance: none;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.omni-clear-btn.visible {
  display: inline-flex;
}

.omni-chips-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.chip-label {
  font-size: 0.74rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 0.2rem;
}

.quick-chip {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-size: 0.75rem;
  padding: 0.25rem 0.68rem;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.quick-chip:hover {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-bright);
  border-color: var(--gold-border);
}

/* Omni-Search Results Drawer */
.omni-results-container {
  display: none;
  margin-top: 1.35rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.omni-results-container.active {
  display: block;
}

.omni-results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.omni-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 1.1rem;
}

/* ==========================================================================
   CURATED SHOWCASE SHELVES & CAROUSELS
   ========================================================================== */

.showcase-section {
  margin-bottom: 2.6rem;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--gold-border);
}

.section-title {
  font-family: var(--font-cinema);
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}

.section-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.section-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Media Cards Grid */
.showcase-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1.15rem;
}

.estate-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
}

.estate-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold-border-strong);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.65);
}

.card-art-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  background: #100d14;
  overflow: hidden;
}

.estate-card[data-type="book"] .card-art-wrap {
  aspect-ratio: 1 / 1;
}

.card-art-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.estate-card:hover .card-art-wrap img {
  transform: scale(1.06);
}

.card-wing-pill {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  z-index: 2;
}

.card-wing-pill.cinema {
  background: rgba(158, 27, 43, 0.88);
  color: #fff;
  border: 1px solid rgba(255, 160, 175, 0.4);
}

.card-wing-pill.library {
  background: rgba(140, 82, 30, 0.9);
  color: #fff6e5;
  border: 1px solid rgba(245, 195, 120, 0.45);
}

.card-badge-corner {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.16rem 0.48rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.78);
  color: var(--gold-bright);
  border: 1px solid rgba(212, 175, 55, 0.35);
}

.card-body {
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   CURATOR'S DOUBLE FEATURE / CROSSOVER PAIRINGS
   ========================================================================== */

.pairings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.pairing-card {
  background: linear-gradient(145deg, rgba(30, 16, 22, 0.78) 0%, rgba(20, 15, 18, 0.9) 50%, rgba(28, 19, 12, 0.82) 100%);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: var(--transition-smooth);
}

.pairing-card:hover {
  border-color: var(--gold-bright);
  transform: translateY(-4px);
  box-shadow: var(--shadow-deep);
}

.pairing-theme-tag {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold-bright);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  padding-bottom: 0.45rem;
}

.pairing-duet {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
}

.pairing-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  padding: 0.45rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-smooth);
}

.pairing-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.pairing-art {
  width: 82px;
  height: 116px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--gold-border-strong);
  margin-bottom: 0.5rem;
  background: #120f16;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55);
}

.pairing-art.book-art {
  width: 96px;
  height: 96px;
  margin-top: 10px;
  margin-bottom: calc(0.5rem + 10px);
}

.pairing-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pairing-item-type {
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-primary);
  font-weight: 700;
}

.pairing-item-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pairing-item-meta {
  font-size: 0.72rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pairing-bridge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: var(--gold-primary);
  font-size: 0.95rem;
}

/* ==========================================================================
   EMBEDDED WING VIEWPORT (CINEMA / LIBRARY / DUAL SPLIT VIEW)
   ========================================================================== */

.wing-viewport-section {
  display: none;
  flex-direction: column;
  height: calc(100vh - 73px);
  width: 100%;
  background: #050407;
}

.wing-viewport-section.active {
  display: flex;
}

.viewport-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1.5rem;
  background: rgba(16, 13, 22, 0.95);
  border-bottom: 1px solid var(--gold-border);
  gap: 1rem;
  flex-wrap: wrap;
}

.viewport-status {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.viewport-frames-wrap {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.viewport-frames-wrap.split-mode {
  grid-template-columns: 1fr 1fr;
}

.wing-iframe-pane {
  width: 100%;
  height: 100%;
  border: none;
  background: #09070b;
  display: none;
}

.wing-iframe-pane.visible {
  display: block;
}

.viewport-frames-wrap.split-mode .wing-iframe-pane {
  border-right: 2px solid var(--gold-border-strong);
}

/* ==========================================================================
   INSPECTOR & TONIGHT'S PAIRING MODAL
   ========================================================================== */

.estate-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(4, 3, 6, 0.84);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.estate-modal-backdrop.open {
  display: flex;
}

.estate-modal {
  position: relative;
  width: 100%;
  max-width: 880px;
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(165deg, #1b1522 0%, #100d15 100%);
  border: 1px solid var(--gold-border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.85);
  padding: 2rem;
}

.modal-close {
  position: sticky;
  top: 0;
  float: right;
  appearance: none;
  border: 1px solid var(--gold-border);
  background: rgba(0, 0, 0, 0.65);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  z-index: 5;
  transition: var(--transition-smooth);
}

.modal-close:hover {
  background: var(--cinema-crimson);
  border-color: #ff99a6;
}

.modal-detail-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 1.75rem;
  align-items: start;
}

.modal-poster-box {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--gold-border-strong);
  background: #0e0b12;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.65);
}

.modal-poster-box img {
  width: 100%;
  display: block;
}

.modal-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.65rem 0 1rem;
}

.modal-pill {
  font-size: 0.74rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--gold-border);
  color: var(--gold-bright);
}

.modal-synopsis {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.25rem;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.modal-synopsis p {
  margin-bottom: 0.65rem;
}

.modal-stills-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.55rem;
  margin-bottom: 1.25rem;
}

.modal-stills-row img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Fallback Generic Art inside Cards */
.fallback-art {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.85rem;
  background: linear-gradient(145deg, #2b131b 0%, #120c18 100%);
  color: var(--gold-bright);
}

.fallback-art.book {
  background: linear-gradient(145deg, #382012 0%, #190e08 100%);
}

.fallback-art-icon {
  font-size: 1.8rem;
  margin-bottom: 0.35rem;
}

.fallback-art-title {
  font-family: var(--font-cinema);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Footer */
.estate-footer {
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--gold-primary);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--gold-bright);
  text-decoration: underline;
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
  .showcase-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .pairings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .dual-portals-grid {
    grid-template-columns: 1fr;
  }
  .pairings-grid {
    grid-template-columns: 1fr;
  }
  .modal-detail-layout {
    grid-template-columns: 1fr;
  }
  .modal-poster-box {
    max-width: 220px;
    margin: 0 auto;
  }
}

@media (max-width: 680px) {
  .showcase-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .portal-preview-strip {
    grid-template-columns: repeat(3, 1fr);
  }
  .header-container {
    justify-content: center;
  }
}
