/* ==========================================================================
   THE RED COYOTE: OUTLAWS OF MARS — Official Virtual Space & IP Hub
   Location: Red Sand Cantina & Dock Nine, Valles Marineris (0.38g)
   Author: Lakeside Harb
   ========================================================================== */

:root {
  --bg-obsidian: #070405;
  --bg-panel: #12090b;
  --bg-card: #1a0d10;
  --amber: #ff9e2c;
  --amber-bright: #ffd28a;
  --gold: #fbbf24;
  --brass: #c99e4c;
  --crimson: #e63946;
  --crimson-bright: #ff6b78;
  --emerald: #10b981;
  --emerald-bright: #6ee7b7;
  --cobalt: #38bdf8;
  --cobalt-bright: #bae6fd;
  --violet: #c084fc;
  --text-main: #f5e9dc;
  --text-muted: #b59e8c;
  --border-brass: rgba(255, 158, 44, 0.42);
  --border-strong: rgba(251, 191, 36, 0.78);
  --font-display: "Cinzel", Georgia, serif;
  --font-tech: "Chakra Petch", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

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

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: var(--bg-obsidian);
  color: var(--text-main);
  font-family: var(--font-tech);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Global Subtle CRT Scanlines & Warm Vignette */
.crt-scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 950;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.016) 0px,
    rgba(255, 255, 255, 0.016) 1px,
    rgba(0, 0, 0, 0.16) 2px,
    rgba(0, 0, 0, 0.16) 3px
  );
  opacity: 0.6;
}

.crt-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 951;
  background: radial-gradient(ellipse at center, transparent 58%, rgba(4, 2, 3, 0.72) 100%);
}

/* Top Cantina & Dock Nine Telemetry Header */
.cantina-topbar {
  position: sticky;
  top: 0;
  z-index: 500;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
  background: linear-gradient(180deg, rgba(16, 8, 10, 0.97) 0%, rgba(10, 5, 7, 0.94) 100%);
  border-bottom: 1px solid var(--border-brass);
  backdrop-filter: blur(8px);
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 12px;
}

.neon-sign-badge {
  position: relative;
  padding: 5px 12px;
  border: 1.5px solid #ff7b3a;
  background: rgba(68, 18, 12, 0.65);
  font-family: var(--font-tech);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #ffd8a8;
  text-shadow:
    0 0 8px rgba(255, 136, 56, 0.95),
    0 0 18px rgba(230, 57, 70, 0.75);
  box-shadow:
    0 0 14px rgba(255, 120, 44, 0.35),
    inset 0 0 10px rgba(255, 120, 44, 0.25);
  animation: neonFlicker 6.5s infinite;
}

@keyframes neonFlicker {
  0%, 18%, 20%, 52%, 54%, 89%, 91%, 100% {
    opacity: 1;
    text-shadow: 0 0 8px rgba(255, 136, 56, 0.95), 0 0 20px rgba(230, 57, 70, 0.8);
  }
  19%, 53% {
    opacity: 0.58;
    text-shadow: none;
  }
  90% {
    opacity: 0.8;
  }
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.brand-main {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #fff5e6;
}

.brand-main span {
  color: var(--crimson-bright);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.09em;
  color: var(--emerald-bright);
}

/* Quick Nav & Audio Controls */
.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.nav-chip,
.audio-btn {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: rgba(28, 14, 16, 0.9);
  border: 1px solid rgba(255, 158, 44, 0.38);
  color: var(--amber-bright);
  font-family: var(--font-tech);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: all 0.16s ease;
}

.nav-chip:hover,
.audio-btn:hover {
  background: rgba(255, 158, 44, 0.2);
  border-color: var(--gold);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(255, 158, 44, 0.32);
}

.nav-chip.gold-cta {
  background: linear-gradient(180deg, #fbbf24 0%, #c2610c 100%);
  border-color: #fef08a;
  color: #160803;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.32);
}

.audio-btn.active {
  border-color: var(--emerald-bright);
  color: var(--emerald-bright);
  background: rgba(16, 185, 129, 0.14);
}

/* ==========================================================================
   MAIN VIRTUAL SPACE DIORAMA STAGE (RED SAND CANTINA & DOCK NINE)
   ========================================================================== */
.hub-wrapper {
  max-width: 1420px;
  margin: 0 auto;
  padding: 14px 18px 28px;
}

.diorama-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 132px);
  min-height: 480px;
  background: #090405;
  border: 2px solid rgba(255, 158, 44, 0.55);
  box-shadow:
    0 18px 55px rgba(0, 0, 0, 0.85),
    0 0 36px rgba(230, 57, 70, 0.14),
    inset 0 0 45px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  user-select: none;
}

/* Riveted Brass Corner Brackets */
.corner-rivet {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid var(--gold);
  z-index: 40;
  pointer-events: none;
}
.corner-rivet.tl { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.corner-rivet.tr { top: 8px; right: 8px; border-left: 0; border-bottom: 0; }
.corner-rivet.bl { bottom: 8px; left: 8px; border-right: 0; border-top: 0; }
.corner-rivet.br { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }

/* Parallax Background Artwork Layer */
.cantina-bg-layer {
  position: absolute;
  inset: -2.5%;
  width: 105%;
  height: 105%;
  background-image: url("assets/art/env_cantina_hd.jpg");
  background-size: cover;
  background-position: center center;
  filter: contrast(1.05) saturate(1.08);
  transform: translate3d(0, 0, 0);
  transition: transform 0.12s ease-out;
  z-index: 1;
}

/* Live Atmospheric Canvas Layer (Aurora outside viewport, 0.38g dust motes, neon bloom) */
#cantina-fx-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

/* Top-Left Telemetry Overlay Inside Viewport */
.stage-hud-overlay {
  position: absolute;
  top: 16px;
  left: 22px;
  z-index: 25;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 12px;
  background: rgba(9, 5, 7, 0.74);
  border-left: 3px solid var(--emerald-bright);
  backdrop-filter: blur(4px);
}

.stage-hud-kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--emerald-bright);
}

.stage-hud-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(255, 224, 185, 0.85);
}

/* Bottom Exploration Prompt Banner */
.stage-prompt-pill {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  pointer-events: none;
  padding: 6px 16px;
  background: rgba(10, 5, 7, 0.84);
  border: 1px solid rgba(255, 158, 44, 0.45);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--amber-bright);
  white-space: nowrap;
}

/* ==========================================================================
   DIEGETIC INTERACTIVE CANTINA HOTSPOTS
   ========================================================================== */
.hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 30;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
  outline: none;
}

/* Pulsing Diegetic Beacon Ring */
.hotspot-beacon {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(28, 13, 11, 0.94) 0%, rgba(10, 5, 7, 0.97) 100%);
  border: 2px solid var(--accent, var(--gold));
  box-shadow:
    0 0 18px var(--accent-glow, rgba(251, 191, 36, 0.65)),
    inset 0 0 12px var(--accent-glow, rgba(251, 191, 36, 0.35));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent, var(--gold));
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease, color 0.2s ease;
}

.hotspot-beacon svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 5px var(--accent-glow, rgba(251, 191, 36, 0.7)));
}

.hotspot-beacon::before,
.hotspot-beacon::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1.5px solid var(--accent, var(--gold));
  opacity: 0.65;
  animation: beaconPulse 2.6s ease-out infinite;
}

.hotspot-beacon::after {
  animation-delay: 1.3s;
}

@keyframes beaconPulse {
  0% {
    transform: scale(0.88);
    opacity: 0.85;
  }
  100% {
    transform: scale(1.58);
    opacity: 0;
  }
}

/* Crisp Space Western Callout Plaque */
.hotspot-plaque {
  padding: 6px 12px;
  background: linear-gradient(180deg, rgba(20, 10, 12, 0.95) 0%, rgba(9, 4, 6, 0.97) 100%);
  border: 1.5px solid var(--accent, var(--gold));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.88), 0 0 16px rgba(0, 0, 0, 0.65);
  text-align: center;
  min-width: 168px;
  backdrop-filter: blur(4px);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.hotspot-title {
  display: block;
  font-family: var(--font-tech);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: #fff6e8;
}

.hotspot-sub {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--accent, var(--amber-bright));
}

.hotspot:hover .hotspot-beacon,
.hotspot:focus-visible .hotspot-beacon {
  transform: scale(1.16);
  color: #ffffff;
  box-shadow: 0 0 28px var(--accent, var(--gold));
}

.hotspot:hover .hotspot-plaque,
.hotspot:focus-visible .hotspot-plaque {
  transform: translateY(-3px);
  background: linear-gradient(180deg, rgba(46, 22, 16, 0.97) 0%, rgba(18, 9, 11, 0.98) 100%);
  border-color: #ffffff;
}

/* Precision Spatial Coordinates Matched 1:1 to Objects in env_cantina_hd.jpg */
.hotspot-booth {
  left: 18.5%;
  top: 57%;
  --accent: #38bdf8;
  --accent-glow: rgba(56, 189, 248, 0.65);
}

.hotspot-book {
  left: 45.5%;
  top: 79%;
  --accent: #fbbf24;
  --accent-glow: rgba(251, 191, 36, 0.65);
}

.hotspot-jukebox {
  left: 65.5%;
  top: 42%;
  --accent: #ff6b78;
  --accent-glow: rgba(230, 57, 70, 0.65);
}

.hotspot-helm {
  left: 80%;
  top: 72%;
  --accent: #6ee7b7;
  --accent-glow: rgba(16, 185, 129, 0.65);
}

/* ==========================================================================
   BELOW-STAGE QUICK ACCESS DECK (ESPECIALLY GREAT FOR MOBILE & TABLETS!)
   ========================================================================== */
.quick-deck {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.deck-card {
  cursor: pointer;
  text-align: left;
  padding: 13px 15px;
  background: linear-gradient(145deg, rgba(28, 14, 16, 0.95) 0%, rgba(13, 7, 9, 0.98) 100%);
  border: 1px solid rgba(255, 158, 44, 0.36);
  color: var(--text-main);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.deck-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: 0 8px 24px rgba(255, 158, 44, 0.18);
}

.deck-card-kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--amber);
  margin-bottom: 4px;
}

.deck-card-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: #fff6e8;
  margin-bottom: 4px;
}

.deck-card-desc {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
}

/* ==========================================================================
   MODALS — BOOK/POSTER, CRT HOLO-JUKEBOX, INLINE HELM GAME & BOOTH 7 CREW
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: rgba(5, 2, 4, 0.84);
  backdrop-filter: blur(7px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.modal-backdrop.hidden {
  display: none;
}

.modal-window {
  position: relative;
  width: 100%;
  max-width: 980px;
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(160deg, #1a0c0f 0%, #0c0608 65%, #12090c 100%);
  border: 2px solid var(--gold);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.92),
    0 0 40px rgba(255, 158, 44, 0.2);
  padding: 24px 26px;
}

.modal-window.modal-wide {
  max-width: 1220px;
  height: 90vh;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(255, 158, 44, 0.32);
}

.modal-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--amber);
  margin-bottom: 4px;
}

.modal-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.6vw, 28px);
  color: #fff6e8;
  letter-spacing: 0.05em;
}

.modal-close {
  cursor: pointer;
  background: rgba(230, 57, 70, 0.16);
  border: 1px solid var(--crimson-bright);
  color: #ffd5d8;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 13px;
  transition: all 0.15s ease;
}

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

/* --- MODAL 1: WANTED POSTER & NOVEL SHOWCASE --- */
.book-modal-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: start;
}

.book-art-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.book-art-card {
  border: 1.5px solid var(--gold);
  background: #0a0506;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.75);
  overflow: hidden;
}

.book-art-card img {
  display: block;
  width: 100%;
  height: auto;
}

.book-art-caption {
  padding: 5px 6px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--amber-bright);
  background: rgba(28, 13, 10, 0.95);
  border-top: 1px solid rgba(251, 191, 36, 0.35);
}

.book-author-tag {
  display: inline-block;
  padding: 4px 10px;
  margin-bottom: 10px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid var(--emerald-bright);
  color: var(--emerald-bright);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.book-synopsis {
  margin: 0 0 12px;
  font-size: 14.5px;
  line-height: 1.68;
  color: var(--text-main);
}

.book-cta-stack {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: 16px;
}

.book-cta-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  text-decoration: none;
  font-family: var(--font-tech);
  font-weight: 700;
  letter-spacing: 0.08em;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.book-cta-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.07);
}

.book-cta-btn.kindle {
  background: linear-gradient(180deg, #fbbf24 0%, #d97706 60%, #92400e 100%);
  border: 1.5px solid #fef08a;
  color: #160803;
  box-shadow: 0 0 22px rgba(251, 191, 36, 0.35);
}

.book-cta-btn.paperback {
  background: linear-gradient(180deg, #7c2d12 0%, #431407 100%);
  border: 1.5px solid var(--gold);
  color: #fffbeb;
  box-shadow: 0 0 18px rgba(217, 119, 6, 0.25);
}

.book-cta-btn.royalroad {
  background: rgba(56, 189, 248, 0.12);
  border: 1.5px solid var(--cobalt-bright);
  color: var(--cobalt-bright);
}

.cta-label-group {
  display: flex;
  flex-direction: column;
}

.cta-main-text {
  font-size: 14.5px;
}

.cta-sub-text {
  font-family: var(--font-mono);
  font-size: 10.5px;
  opacity: 0.85;
}

.cta-price-pill {
  padding: 5px 11px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  background: rgba(15, 7, 4, 0.85);
  color: #fde68a;
  border: 1px solid rgba(254, 240, 138, 0.5);
}

/* --- MODAL 2: RETRO CRT HOLO-JUKEBOX THEATER --- */
.jukebox-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.jukebox-tab {
  cursor: pointer;
  flex: 1 1 220px;
  padding: 11px 16px;
  background: rgba(26, 12, 15, 0.9);
  border: 1.5px solid rgba(255, 158, 44, 0.4);
  color: var(--amber-bright);
  font-family: var(--font-tech);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: left;
  transition: all 0.15s ease;
}

.jukebox-tab.active {
  background: linear-gradient(90deg, rgba(153, 27, 27, 0.55) 0%, rgba(68, 24, 12, 0.75) 100%);
  border-color: var(--gold);
  color: #ffffff;
  box-shadow: 0 0 18px rgba(230, 57, 70, 0.35);
}

.crt-tv-bezel {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #050304;
  border: 3px solid #78350f;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.95), 0 0 26px rgba(255, 158, 44, 0.22);
  overflow: hidden;
}

.crt-tv-bezel iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.jukebox-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.yt-sub-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(180deg, #dc2626 0%, #991b1b 100%);
  border: 1.5px solid #fca5a5;
  color: #ffffff;
  text-decoration: none;
  font-family: var(--font-tech);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  box-shadow: 0 0 20px rgba(220, 38, 38, 0.45);
  transition: transform 0.15s ease;
}

.yt-sub-btn:hover {
  transform: translateY(-2px);
}

.yt-direct-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.yt-direct-links a {
  color: var(--amber-bright);
  text-decoration: none;
}
.yt-direct-links a:hover {
  text-decoration: underline;
}

/* --- MODAL 3: INLINE SMUGGLER'S HELM GAME VIEWPORT --- */
.helm-modal-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  background: #14090b;
  border-bottom: 1.5px solid var(--gold);
}

.helm-back-btn {
  cursor: pointer;
  padding: 8px 14px;
  background: rgba(16, 185, 129, 0.18);
  border: 1.5px solid var(--emerald-bright);
  color: #a7f3d0;
  font-family: var(--font-tech);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.helm-back-btn:hover {
  background: rgba(16, 185, 129, 0.34);
  color: #ffffff;
}

.helm-fullpage-link {
  color: var(--amber-bright);
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid rgba(255, 158, 44, 0.45);
}

#helm-game-iframe {
  flex: 1;
  width: 100%;
  border: 0;
  background: #080405;
}

/* --- MODAL 4: BOOTH 7 CREW DOSSIERS, SHIP SPECS & BANTER --- */
.booth-roster-tabs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.roster-tab {
  cursor: pointer;
  padding: 9px 8px;
  background: rgba(24, 12, 14, 0.92);
  border: 1px solid rgba(255, 158, 44, 0.35);
  color: var(--text-muted);
  font-family: var(--font-tech);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  transition: all 0.15s ease;
}

.roster-tab:hover {
  color: #ffffff;
  border-color: var(--amber);
}

.roster-tab.active {
  background: linear-gradient(180deg, rgba(124, 45, 18, 0.85) 0%, rgba(45, 16, 12, 0.95) 100%);
  border-color: var(--gold);
  color: #fff6e8;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.28);
}

.dossier-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  padding: 16px;
  background: rgba(12, 6, 8, 0.85);
  border: 1px solid rgba(255, 158, 44, 0.32);
  margin-bottom: 18px;
}

.dossier-portrait-wrap {
  border: 1.5px solid var(--gold);
  background: #070405;
  overflow: hidden;
  align-self: start;
}

.dossier-portrait-wrap img {
  display: block;
  width: 100%;
  height: auto;
}

.dossier-role {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cobalt-bright);
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.dossier-name {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--amber-bright);
}

.dossier-bio {
  margin: 0 0 12px;
  font-size: 13.5px;
  line-height: 1.62;
  color: var(--text-main);
}

.dossier-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.spec-pill {
  padding: 4px 9px;
  background: rgba(255, 158, 44, 0.1);
  border: 1px solid rgba(255, 158, 44, 0.32);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #fde68a;
}

/* Interactive Booth 7 Banter Console */
.banter-box {
  padding: 16px;
  background: linear-gradient(180deg, rgba(20, 11, 14, 0.95) 0%, rgba(9, 5, 7, 0.98) 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.45);
}

.banter-header {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--cobalt-bright);
  margin-bottom: 10px;
}

.banter-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.banter-btn {
  cursor: pointer;
  padding: 8px 12px;
  background: rgba(56, 189, 248, 0.11);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: var(--cobalt-bright);
  font-family: var(--font-tech);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: all 0.14s ease;
}

.banter-btn:hover,
.banter-btn.active {
  background: rgba(56, 189, 248, 0.26);
  border-color: #ffffff;
  color: #ffffff;
}

.banter-transcript {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 110px;
}

.banter-line {
  padding: 10px 13px;
  background: rgba(14, 8, 10, 0.9);
  border-left: 3px solid var(--amber);
  animation: fadeSlideIn 0.24s ease-out both;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.banter-speaker {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 3px;
}

.banter-text {
  font-size: 13.5px;
  line-height: 1.55;
  color: #f8efe4;
  font-style: italic;
}

/* Live Free-Form AI Comms Terminal (Connected to Cloud Run Security Proxy) */
.ai-chat-panel {
  margin-top: 16px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(16, 20, 26, 0.95) 0%, rgba(8, 10, 14, 0.98) 100%);
  border: 1.5px solid rgba(110, 231, 183, 0.55);
  box-shadow: inset 0 0 24px rgba(16, 185, 129, 0.08);
}

.ai-chat-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.ai-chat-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--emerald-bright);
}

.ai-persona-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.persona-pill {
  cursor: pointer;
  padding: 5px 10px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(110, 231, 183, 0.35);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  transition: all 0.14s ease;
}

.persona-pill.active,
.persona-pill:hover {
  background: rgba(16, 185, 129, 0.28);
  border-color: var(--emerald-bright);
  color: #ffffff;
}

.ai-chat-log {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 10px;
  background: rgba(5, 7, 10, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.22);
  margin-bottom: 10px;
}

.chat-msg {
  padding: 8px 12px;
  font-size: 13.5px;
  line-height: 1.55;
  animation: fadeSlideIn 0.2s ease-out both;
}

.chat-msg.user {
  align-self: flex-end;
  max-width: 82%;
  background: rgba(56, 189, 248, 0.16);
  border-right: 3px solid var(--cobalt);
  color: #e0f2fe;
}

.chat-msg.bot {
  align-self: flex-start;
  max-width: 90%;
  background: rgba(28, 16, 12, 0.92);
  border-left: 3px solid var(--gold);
  color: #f8efe4;
}

.chat-msg-sender {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 3px;
}

.chat-msg.user .chat-msg-sender {
  color: var(--cobalt-bright);
  text-align: right;
}

.ai-chat-form {
  display: flex;
  gap: 8px;
}

.ai-chat-input {
  flex: 1;
  padding: 10px 13px;
  background: #07090d;
  border: 1.5px solid rgba(110, 231, 183, 0.45);
  color: #ffffff;
  font-family: var(--font-tech);
  font-size: 13.5px;
  outline: none;
}

.ai-chat-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.25);
}

.ai-chat-send {
  cursor: pointer;
  padding: 10px 18px;
  background: linear-gradient(180deg, #10b981 0%, #047857 100%);
  border: 1px solid #a7f3d0;
  color: #03150e;
  font-family: var(--font-tech);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.ai-chat-send:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* Footer */
.hub-footer {
  max-width: 1420px;
  margin: 0 auto;
  padding: 14px 18px 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(255, 158, 44, 0.22);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.hub-footer a {
  color: var(--amber-bright);
  text-decoration: none;
}

.hub-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (MOBILE PHONES & TABLETS)
   ========================================================================== */
@media (max-width: 980px) {
  .quick-deck {
    grid-template-columns: repeat(2, 1fr);
  }
  .booth-roster-tabs {
    grid-template-columns: repeat(3, 1fr);
  }
  .book-modal-grid {
    grid-template-columns: 1fr;
  }
  .book-art-pair {
    max-width: 340px;
    margin: 0 auto;
  }
}

@media (max-width: 720px) {
  .cantina-topbar {
    padding: 10px 12px;
  }
  .diorama-frame {
    aspect-ratio: 4 / 3;
    min-height: 360px;
  }
  .hotspot-plaque {
    min-width: 132px;
    padding: 5px 8px;
  }
  .hotspot-title {
    font-size: 10.5px;
  }
  .hotspot-sub {
    display: none;
  }
  .hotspot-beacon {
    width: 38px;
    height: 38px;
    font-size: 17px;
  }
  .stage-prompt-pill {
    font-size: 9.5px;
    padding: 5px 10px;
  }
  .quick-deck {
    grid-template-columns: 1fr;
  }
  .dossier-card {
    grid-template-columns: 1fr;
  }
  .dossier-portrait-wrap {
    max-width: 210px;
    margin: 0 auto;
  }
}
