/* ==========================================================================
   SHOKKER GRAPHIC-ATLAS DESIGN SYSTEM
   Open-World Graphic-Novel Pause-Menu x Collector-Dossier UI Architecture
   Sharp architectural corners, hard ink borders, angled chamfers,
   cinematic illustrated mastheads, and ultra-legible high-contrast cards.
   ========================================================================== */

:root {
  --sg-obsidian: #0B0D11;
  --sg-asphalt: #14171E;
  --sg-card: #181C24;
  --sg-card-elev: #1F2430;
  --sg-ink: #000000;
  --sg-crimson: #D92B2B;
  --sg-crimson-deep: #A61C1C;
  --sg-gold: #F2B705;
  --sg-gold-bright: #FFD23F;
  --sg-ivory: #F3EFE6;
  --sg-text: #ECE9E2;
  --sg-muted: #A7ABB4;
  --sg-line: rgba(243, 239, 230, 0.14);
  --sg-line-gold: rgba(242, 183, 5, 0.42);

  --sg-font-display: 'Barlow Condensed', 'Oswald', 'Impact', 'Arial Narrow', sans-serif;
  --sg-font-body: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  --sg-font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --sg-ink-border: 2.5px solid var(--sg-ink);
  --sg-shadow-hard: 5px 5px 0 rgba(0, 0, 0, 0.88);
  --sg-shadow-card: 4px 4px 0 rgba(0, 0, 0, 0.88);
  --sg-shadow-sm: 3px 3px 0 rgba(0, 0, 0, 0.85);
  --sg-radius-sharp: 3px;
  --sg-chamfer-badge: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px));
  --sg-chamfer-cta: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}

/* --------------------------------------------------------------------------
   Backdrop & Primary Graphic-Atlas Modal Shell
   -------------------------------------------------------------------------- */
.sg-atlas-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  background:
    radial-gradient(circle at 18% 12%, rgba(217, 43, 43, 0.14), transparent 46%),
    radial-gradient(circle at 86% 84%, rgba(242, 183, 5, 0.12), transparent 48%),
    rgba(6, 8, 12, 0.85);
  backdrop-filter: blur(7px);
  box-sizing: border-box;
}

.sg-atlas-backdrop.is-open,
.sg-atlas-backdrop.open {
  display: flex;
}

.sg-atlas-modal,
.sg-atlas-modal *,
.sg-atlas-modal *::before,
.sg-atlas-modal *::after {
  box-sizing: border-box;
}

.sg-atlas-modal {
  position: relative;
  width: min(1210px, 97vw);
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  background: var(--sg-obsidian);
  border: var(--sg-ink-border);
  border-radius: var(--sg-radius-sharp);
  box-shadow:
    var(--sg-shadow-hard),
    0 24px 64px rgba(0, 0, 0, 0.8),
    inset 0 0 0 1px rgba(243, 239, 230, 0.08);
  color: var(--sg-text);
  font-family: var(--sg-font-body);
  overflow: hidden;
  scrollbar-color: var(--sg-gold) var(--sg-obsidian);
  scrollbar-width: thin;
}

/* Crisp 3px Dual-Tone SHOKKER Crimson & Gold Top Accent Stripe */
.sg-atlas-modal::before {
  content: "";
  display: block;
  flex: 0 0 4px;
  width: 100%;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--sg-crimson) 0%,
    var(--sg-crimson) 56%,
    var(--sg-gold) 56%,
    var(--sg-gold) 100%
  );
  border-bottom: 1.5px solid var(--sg-ink);
  z-index: 4;
}

/* --------------------------------------------------------------------------
   Cinematic 21:9 Illustrated Masthead
   -------------------------------------------------------------------------- */
.sg-atlas-masthead {
  position: relative;
  flex: 0 0 auto;
  min-height: 112px;
  padding: 13px 22px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  background-color: var(--sg-obsidian);
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  border-bottom: 2.5px solid var(--sg-ink);
  overflow: hidden;
}

/* Directional Obsidian Vignette so display headline pops while right art shines */
.sg-atlas-masthead::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      92deg,
      rgba(11, 13, 17, 0.96) 0%,
      rgba(11, 13, 17, 0.82) 44%,
      rgba(11, 13, 17, 0.25) 100%
    ),
    linear-gradient(
      180deg,
      rgba(11, 13, 17, 0.16) 0%,
      rgba(11, 13, 17, 0.62) 100%
    );
  pointer-events: none;
  z-index: 1;
}

/* Subtle Graphic-Novel Halftone Dot Overlay */
.sg-atlas-masthead::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(243, 239, 230, 0.085) 1px, transparent 1px);
  background-size: 6px 6px;
  opacity: 0.52;
  pointer-events: none;
  z-index: 1;
}

.sg-atlas-masthead-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
  max-width: 720px;
}

.sg-atlas-kicker-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.sg-atlas-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 11px 3px 9px;
  background: var(--sg-crimson-deep);
  color: #ffffff;
  border: 2px solid var(--sg-ink);
  border-radius: 2px;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.92);
  clip-path: var(--sg-chamfer-badge);
  font-family: var(--sg-font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.2;
}

.sg-atlas-edition-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: rgba(11, 13, 17, 0.88);
  color: var(--sg-gold);
  border: 1.5px solid var(--sg-gold);
  border-radius: 2px;
  font-family: var(--sg-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sg-atlas-title {
  margin: 0;
  font-family: var(--sg-font-display);
  font-size: clamp(36px, 3.6vw, 44px);
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 0.96;
  color: var(--sg-ivory);
  text-shadow:
    3px 3px 0 var(--sg-ink),
    0 2px 14px rgba(0, 0, 0, 0.65);
}

.sg-atlas-title-accent {
  color: var(--sg-gold);
}

.sg-atlas-subtitle {
  margin: 5px 0 0;
  max-width: 68ch;
  font-family: var(--sg-font-body);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.38;
  color: var(--sg-text);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85);
}

.sg-atlas-close {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 13px;
  background: rgba(11, 13, 17, 0.92);
  color: var(--sg-ivory);
  border: 2.5px solid var(--sg-ink);
  border-radius: 3px;
  box-shadow: var(--sg-shadow-sm), inset 0 0 0 1px rgba(243, 239, 230, 0.22);
  font-family: var(--sg-font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.14s ease, color 0.14s ease;
}

.sg-atlas-close:hover,
.sg-atlas-close:focus-visible {
  background: var(--sg-crimson);
  color: #FFFFFF;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--sg-ink);
  outline: 2px solid var(--sg-gold);
  outline-offset: 1px;
}

/* --------------------------------------------------------------------------
   Tactile Press-Pass Quick-Launch Portal Strip
   -------------------------------------------------------------------------- */
.sg-atlas-portals {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 6px 20px;
  background: var(--sg-asphalt);
  border-bottom: 2px solid var(--sg-ink);
}

.sg-atlas-portals-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.sg-atlas-portals-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sg-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sg-gold);
}

.sg-atlas-portals-label::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--sg-crimson);
  border: 1.5px solid var(--sg-ink);
}

.sg-atlas-portals-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sg-atlas-press-pass {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px 5px 8px;
  background: var(--sg-card);
  color: var(--sg-ivory);
  border: 2px solid var(--sg-ink);
  border-left: 4px solid var(--sg-gold);
  border-radius: 3px;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.9);
  font-family: var(--sg-font-display);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.1;
  transition: transform 0.12s ease, background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.sg-atlas-press-pass:nth-child(odd) {
  border-left-color: var(--sg-crimson);
}

.sg-atlas-press-pass-tag {
  font-family: var(--sg-font-mono);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--sg-gold);
  letter-spacing: 0.04em;
}

.sg-atlas-press-pass:hover,
.sg-atlas-press-pass:focus-visible {
  background: var(--sg-gold);
  color: var(--sg-obsidian);
  border-color: var(--sg-ink);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--sg-ink);
  outline: none;
}

.sg-atlas-press-pass:hover .sg-atlas-press-pass-tag,
.sg-atlas-press-pass:focus-visible .sg-atlas-press-pass-tag {
  color: #6b0f0f;
}

/* --------------------------------------------------------------------------
   Dossier Filter Folder Tabs & Search Bar
   -------------------------------------------------------------------------- */
.sg-atlas-controls {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 8px;
  padding: 7px 20px;
  background: #101319;
  border-bottom: 2.5px solid var(--sg-ink);
}

.sg-atlas-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.sg-atlas-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  background: var(--sg-card);
  color: var(--sg-text);
  border: 2px solid var(--sg-ink);
  border-top: 2px solid rgba(243, 239, 230, 0.22);
  border-radius: 3px;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.85);
  font-family: var(--sg-font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.14s ease, color 0.14s ease;
}

.sg-atlas-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  padding: 1px 4px;
  background: rgba(11, 13, 17, 0.82);
  color: var(--sg-gold);
  border: 1px solid rgba(242, 183, 5, 0.35);
  border-radius: 2px;
  font-family: var(--sg-font-mono);
  font-size: 10px;
  font-weight: 700;
}

.sg-atlas-tab:hover {
  background: var(--sg-card-elev);
  color: var(--sg-ivory);
  border-top-color: var(--sg-gold);
  transform: translate(-1px, -1px);
}

.sg-atlas-tab.is-active,
.sg-atlas-tab[aria-selected="true"] {
  background: var(--sg-gold);
  color: var(--sg-obsidian);
  border: 2px solid var(--sg-ink);
  border-top: 3px solid var(--sg-crimson);
  box-shadow: 3px 3px 0 var(--sg-ink);
}

.sg-atlas-tab.is-active .sg-atlas-tab-count,
.sg-atlas-tab[aria-selected="true"] .sg-atlas-tab-count {
  background: var(--sg-obsidian);
  color: var(--sg-ivory);
  border-color: var(--sg-ink);
}

.sg-atlas-search-wrap {
  flex: 1 1 175px;
  max-width: 225px;
  min-width: 155px;
}

.sg-atlas-search {
  width: 100%;
  padding: 5px 10px;
  background: var(--sg-obsidian);
  color: var(--sg-ivory);
  border: 2px solid var(--sg-ink);
  border-bottom: 2px solid var(--sg-line-gold);
  border-radius: 3px;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.65);
  font-family: var(--sg-font-body);
  font-size: 12.5px;
  font-weight: 500;
}

.sg-atlas-search::placeholder {
  color: var(--sg-muted);
  font-family: var(--sg-font-mono);
  font-size: 11px;
}

.sg-atlas-search:focus {
  outline: 2px solid var(--sg-gold);
  outline-offset: 0;
  border-bottom-color: var(--sg-gold);
}

/* --------------------------------------------------------------------------
   Visual Collector Card Grid & Illustrated Collector Cards
   -------------------------------------------------------------------------- */
.sg-atlas-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 22px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  align-items: stretch;
  gap: 16px;
  background:
    radial-gradient(circle at 12% 0%, rgba(217, 43, 43, 0.06), transparent 36%),
    var(--sg-obsidian);
}

.sg-atlas-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: max-content;
  background: var(--sg-card);
  border: var(--sg-ink-border);
  border-radius: var(--sg-radius-sharp);
  box-shadow: var(--sg-shadow-card);
  overflow: hidden;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.sg-atlas-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sg-crimson) 0%, var(--sg-gold) 100%);
  z-index: 4;
}

.sg-atlas-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--sg-ink), 0 0 0 1px var(--sg-gold);
}

/* Top 118px Full-Bleed Illustrated Category Art Strip */
.sg-atlas-card-art {
  position: relative;
  width: 100%;
  height: 118px;
  flex: 0 0 118px;
  background: var(--sg-obsidian);
  border-bottom: 2px solid var(--sg-ink);
  overflow: hidden;
}

.sg-atlas-card-art-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: contrast(1.06) saturate(1.05);
  transition: transform 0.35s ease;
}

.sg-atlas-card:hover .sg-atlas-card-art-img {
  transform: scale(1.04);
}

.sg-atlas-card-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(11, 13, 17, 0.32) 0%,
      rgba(11, 13, 17, 0.18) 38%,
      rgba(24, 28, 36, 0.96) 100%
    );
  pointer-events: none;
  z-index: 1;
}

.sg-atlas-card-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.sg-atlas-cat-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  background: rgba(11, 13, 17, 0.92);
  color: var(--sg-ivory);
  border: 1.5px solid var(--sg-ink);
  border-left: 3px solid var(--sg-gold);
  border-radius: 2px;
  clip-path: var(--sg-chamfer-badge);
  font-family: var(--sg-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sg-atlas-status-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  background: var(--sg-crimson);
  color: #FFFFFF;
  border: 1.5px solid var(--sg-ink);
  border-radius: 2px;
  font-family: var(--sg-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Prominent Cadence / Date Stamp Block */
.sg-atlas-stamp-bar {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 8px;
  z-index: 3;
  display: flex;
  align-items: center;
}

.sg-atlas-stamp {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px 4px 9px;
  background: var(--sg-obsidian);
  color: var(--sg-gold);
  border: 2px solid var(--sg-ink);
  border-left: 4px solid var(--sg-crimson);
  border-radius: 2px;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.92);
  clip-path: var(--sg-chamfer-badge);
  font-family: var(--sg-font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.15;
}

.sg-atlas-card-body {
  flex: 1 1 auto;
  padding: 10px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sg-atlas-card-title {
  margin: 0;
  font-family: var(--sg-font-display);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.07;
  color: var(--sg-ivory);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sg-atlas-meta-grid {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 9px;
  background: rgba(11, 13, 17, 0.65);
  border: 1.5px solid rgba(0, 0, 0, 0.8);
  border-left: 3px solid var(--sg-gold);
  border-radius: 2px;
}

.sg-atlas-meta-row {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-family: var(--sg-font-body);
  font-size: 12px;
  line-height: 1.32;
  color: var(--sg-text);
}

.sg-atlas-meta-key {
  flex: 0 0 auto;
  font-family: var(--sg-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sg-gold);
}

.sg-atlas-card-desc {
  margin: 0;
  font-family: var(--sg-font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--sg-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Full-Width High-Contrast Action Footer Bar */
.sg-atlas-card-cta {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 8px;
  padding: 9px 13px 10px;
  background: #12151C;
  border-top: 2px solid var(--sg-ink);
}

.sg-atlas-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 12px;
  background: var(--sg-gold);
  color: var(--sg-obsidian);
  border: 2px solid var(--sg-ink);
  border-radius: 2px;
  box-shadow: 2px 2px 0 var(--sg-ink);
  clip-path: var(--sg-chamfer-cta);
  font-family: var(--sg-font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, transform 0.12s ease;
}

.sg-atlas-btn-primary:hover,
.sg-atlas-btn-primary:focus-visible {
  background: var(--sg-crimson);
  color: #FFFFFF;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--sg-ink);
  outline: none;
}

.sg-atlas-btn-3d {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 11px;
  background: var(--sg-obsidian);
  color: var(--sg-ivory);
  border: 2px solid var(--sg-ink);
  border-left: 3.5px solid var(--sg-crimson);
  border-radius: 2px;
  box-shadow: 2px 2px 0 var(--sg-ink);
  font-family: var(--sg-font-display);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, transform 0.12s ease, border-color 0.14s ease;
}

.sg-atlas-btn-3d:hover,
.sg-atlas-btn-3d:focus-visible {
  background: var(--sg-ivory);
  color: var(--sg-obsidian);
  border-left-color: var(--sg-gold);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--sg-ink);
  outline: none;
}

/* --------------------------------------------------------------------------
   Dossier Footer & Empty State
   -------------------------------------------------------------------------- */
.sg-atlas-footer {
  flex: 0 0 auto;
  padding: 8px 22px;
  background: var(--sg-asphalt);
  border-top: 2.5px solid var(--sg-ink);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  font-family: var(--sg-font-body);
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--sg-muted);
}

.sg-atlas-footer > span:first-child {
  flex: 1 1 420px;
  min-width: 0;
}

.sg-atlas-footer-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--sg-obsidian);
  color: var(--sg-gold);
  border: 1.5px solid var(--sg-ink);
  border-left: 3px solid var(--sg-crimson);
  border-radius: 2px;
  font-family: var(--sg-font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sg-atlas-empty {
  grid-column: 1 / -1;
  padding: 36px 20px;
  text-align: center;
  background: var(--sg-card);
  border: 2px solid var(--sg-ink);
  border-left: 4px solid var(--sg-crimson);
  border-radius: 3px;
  box-shadow: var(--sg-shadow-sm);
  font-family: var(--sg-font-body);
  font-size: 14.5px;
  color: var(--sg-text);
}

/* --------------------------------------------------------------------------
   Safe Global Enhancement Layer for Secondary Modals & Drawers
   Uses low-specificity :where() so module-owned layouts remain 100% intact
   while elevating display typography, ink framing, and dark obsidian cohesion.
   -------------------------------------------------------------------------- */
:where([id*="modal"], [id*="drawer"]) {
  font-family: var(--sg-font-body);
  scrollbar-color: var(--sg-gold) var(--sg-obsidian);
}

:where([id*="modal"] h2, [id*="drawer"] h2) {
  font-family: var(--sg-font-display);
  letter-spacing: 0.025em;
  text-transform: uppercase;
  color: var(--sg-ivory);
}

:where([id*="modal"] h3, [id*="drawer"] h3) {
  font-family: var(--sg-font-display);
  letter-spacing: 0.02em;
}

:where([id*="modal"] ::-webkit-scrollbar, [id*="drawer"] ::-webkit-scrollbar) {
  width: 8px;
  height: 8px;
}

:where([id*="modal"] ::-webkit-scrollbar-track, [id*="drawer"] ::-webkit-scrollbar-track) {
  background: var(--sg-obsidian);
}

:where([id*="modal"] ::-webkit-scrollbar-thumb, [id*="drawer"] ::-webkit-scrollbar-thumb) {
  background: var(--sg-gold);
  border: 1.5px solid var(--sg-ink);
  border-radius: 2px;
}

/* --------------------------------------------------------------------------
   Mobile Responsive Polish (<= 640px, verified on 390x844 with 0 overflow)
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .sg-atlas-backdrop {
    padding: 6px;
  }

  .sg-atlas-modal {
    width: calc(100vw - 12px);
    max-width: calc(100vw - 12px);
    max-height: calc(100dvh - 12px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .sg-atlas-masthead {
    position: sticky;
    top: 0;
    z-index: 6;
    min-height: 122px;
    padding: 14px 14px 12px;
    gap: 10px;
  }

  .sg-atlas-title {
    font-size: clamp(26px, 7.6vw, 34px);
    line-height: 0.98;
  }

  .sg-atlas-subtitle {
    font-size: 13px;
    margin-top: 6px;
  }

  .sg-atlas-portals,
  .sg-atlas-controls,
  .sg-atlas-footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .sg-atlas-portals-row {
    gap: 7px;
  }

  .sg-atlas-press-pass {
    min-height: 44px;
    font-size: 13.5px;
    padding: 8px 10px;
    max-width: 100%;
  }

  .sg-atlas-tab {
    min-height: 44px;
    font-size: 13.5px;
    padding: 7px 10px;
  }

  .sg-atlas-search-wrap {
    flex: 1 1 100%;
    max-width: 100%;
    min-width: 0;
  }

  .sg-atlas-search {
    min-height: 44px;
    font-size: 16px;
  }

  .sg-atlas-grid {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px;
    gap: 14px;
    overflow-y: visible;
  }

  .sg-atlas-card-cta {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .sg-atlas-btn-primary,
  .sg-atlas-btn-3d {
    min-height: 44px;
    width: 100%;
  }
}

/* ==========================================================================
   WAVE 384B — SHOKKER GRAPHIC-ATLAS LIVE 3D HUD, DOCK, WELCOME & PLACE CARD
   Zero backdrop-filter blur overhead (smooth 28-40+ FPS on RTX 4060 Ti),
   zero spatial bloat, crisp 2px ink framing, Crimson/Gold accent stripes,
   and Barlow Condensed uppercase display hierarchy across every HUD surface.
   ========================================================================== */
:root {
  --sg-obsidian-hud: rgba(11, 13, 17, 0.94);
  --sg-obsidian-solid: rgba(11, 13, 17, 0.97);
  --sg-hud-stripe: linear-gradient(
    90deg,
    var(--sg-crimson) 0%,
    var(--sg-crimson) 56%,
    var(--sg-gold) 56%,
    var(--sg-gold) 100%
  );
  --sg-hud-inner-rim: inset 0 0 0 1px rgba(243, 239, 230, 0.08);
}

/* --------------------------------------------------------------------------
   1. Shared Graphic-Atlas Chrome Base (Zero Blur Overhead, Crisp 2px Ink)
   -------------------------------------------------------------------------- */
.hud-layer .panel,
.hud-layer .topbar,
.hud-layer .bottom-bar,
.hud-layer .spotlight-card,
.hud-layer .studio-popover,
.hud-layer .status-banner,
.spotlight-kiosk-banner,
.modal-card {
  background: var(--sg-obsidian-hud);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 2px solid var(--sg-ink);
  border-radius: var(--sg-radius-sharp);
  box-shadow: var(--sg-shadow-sm), var(--sg-hud-inner-rim);
  color: var(--sg-text);
}

/* Dual-tone SHOKKER Crimson & Appalachian Gold top accent stripe (zero layout height shift) */
.hud-layer .left-panel,
.hud-layer .topbar,
.hud-layer .bottom-bar,
.hud-layer .spotlight-card,
.hud-layer .right-drawer,
.hud-layer .studio-popover,
.spotlight-kiosk-banner,
.modal-card {
  background-image: var(--sg-hud-stripe);
  background-position: top left;
  background-size: 100% 3px;
  background-repeat: no-repeat;
  background-color: var(--sg-obsidian-hud);
}

/* --------------------------------------------------------------------------
   2. Left Map Dock (#left-panel) — Same 284px Footprint, Graphic-Atlas Polish
   -------------------------------------------------------------------------- */
#left-panel.left-panel {
  border: 2px solid var(--sg-ink);
  border-radius: var(--sg-radius-sharp);
  box-shadow: var(--sg-shadow-sm), var(--sg-hud-inner-rim);
  scrollbar-color: var(--sg-gold) var(--sg-obsidian);
}

#left-panel.left-panel::-webkit-scrollbar-thumb {
  background: var(--sg-gold);
  border-radius: 2px;
}

#left-panel .brand-row {
  padding-top: 2px;
  padding-bottom: 7px;
  border-bottom: 1.5px solid var(--sg-ink);
}

#left-panel .brand-emblem {
  border-radius: 2px;
  background: linear-gradient(145deg, var(--sg-crimson) 0%, var(--sg-crimson-deep) 100%);
  border: 2px solid var(--sg-ink);
  box-shadow: 2px 2px 0 var(--sg-ink);
  color: var(--sg-ivory);
  font-family: var(--sg-font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

#left-panel .brand-eyebrow {
  font-family: var(--sg-font-mono);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
  color: var(--sg-gold);
}

#left-panel .brand-title {
  font-family: var(--sg-font-display);
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  line-height: 1.04;
  color: var(--sg-ivory);
  text-shadow: 2px 2px 0 var(--sg-ink);
  margin: 2px 0 2px;
}

#left-panel .brand-sub,
#left-panel .stats-pill {
  font-family: var(--sg-font-mono);
  font-size: 9.5px;
  color: var(--sg-muted);
}

#left-panel .brand-row .btn-sm {
  background: var(--sg-card);
  border: 1.5px solid var(--sg-ink);
  border-radius: 2px;
  box-shadow: 1.5px 1.5px 0 var(--sg-ink);
  color: var(--sg-ivory);
  font-family: var(--sg-font-display);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#left-panel .brand-row .btn-sm:hover {
  background: var(--sg-crimson);
  color: #ffffff;
  border-color: var(--sg-ink);
}

#left-panel .search-wrap {
  background: var(--sg-obsidian);
  border: 2px solid var(--sg-ink);
  border-bottom: 2px solid var(--sg-line-gold);
  border-radius: var(--sg-radius-sharp);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.65);
}

#left-panel .search-wrap:focus-within {
  background: var(--sg-obsidian);
  border-color: var(--sg-ink);
  border-bottom-color: var(--sg-gold);
  box-shadow: 0 0 0 1px var(--sg-gold), inset 0 2px 5px rgba(0, 0, 0, 0.65);
}

#left-panel #search-go {
  background: var(--sg-card-elev);
  border: 1.5px solid var(--sg-ink);
  border-radius: 2px;
  color: var(--sg-gold);
  font-family: var(--sg-font-display);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

#left-panel #search-go:hover {
  background: var(--sg-gold);
  color: var(--sg-obsidian);
}

/* Primary Left-Dock CTA: Find My Property & Lot Lines */
body #left-panel #btn-find-my-house.btn-find-house {
  background: var(--sg-gold);
  color: var(--sg-obsidian);
  border: 2px solid var(--sg-ink);
  border-radius: 2px;
  box-shadow: 2px 2px 0 var(--sg-ink);
  clip-path: var(--sg-chamfer-cta);
  font-family: var(--sg-font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 7px 10px;
}

body #left-panel #btn-find-my-house.btn-find-house:hover,
body #left-panel #btn-find-my-house.btn-find-house:focus-visible {
  background: var(--sg-crimson);
  color: #ffffff;
  border-color: var(--sg-ink);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--sg-ink);
}

/* Guided Tours & Quick Places Accordions */
#left-panel .studio-tours-menu,
#left-panel .quick-places-accordion {
  border-top: 1.5px solid rgba(243, 239, 230, 0.14);
}

#left-panel .studio-tours-summary,
#left-panel .quick-places-summary {
  font-family: var(--sg-font-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--sg-ivory);
  gap: 4px;
}

#left-panel .studio-tours-label,
#left-panel .studio-tours-meta {
  white-space: nowrap;
}

#left-panel .studio-tours-meta {
  font-family: var(--sg-font-mono);
  font-size: 9px;
  color: var(--sg-gold);
}

#left-panel .showcase-btn {
  background: var(--sg-card);
  border: 1.5px solid var(--sg-ink);
  border-radius: 2px;
  box-shadow: 1.5px 1.5px 0 rgba(0, 0, 0, 0.85);
  color: var(--sg-ivory);
  font-family: var(--sg-font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

#left-panel .showcase-btn.btn-primary {
  background: var(--sg-gold);
  color: var(--sg-obsidian);
  border-color: var(--sg-ink);
}

#left-panel .showcase-btn:hover {
  background: var(--sg-crimson);
  color: #ffffff;
  border-color: var(--sg-ink);
}

/* Left Dock County Tools Toolbar (overrides legacy inline pale-gold styles cleanly) */
#left-panel .quick-action-row {
  border-top: 1.5px solid rgba(243, 239, 230, 0.14);
  border-bottom: 1.5px solid rgba(243, 239, 230, 0.14);
}

#left-panel .quick-action-row #btn-todays-paper,
#left-panel .quick-action-row #btn-living-wiki,
#left-panel .quick-action-row #btn-scenic-tours,
#left-panel .quick-action-row #btn-seller-valuation,
#left-panel .quick-action-row #btn-commute,
#left-panel .quick-action-row #btn-relocation-atlas,
#left-panel .quick-action-row #btn-client-playbooks,
#left-panel .quick-action-row #btn-passport,
#left-panel .quick-action-row #btn-public-notices,
#left-panel .quick-action-row #btn-explainer-cards,
#left-panel .quick-action-row #btn-on-this-day {
  background: var(--sg-card) !important;
  border: 1.5px solid var(--sg-ink) !important;
  border-left: 3px solid var(--sg-gold) !important;
  border-radius: 2px !important;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.85);
  color: var(--sg-ivory) !important;
  font-family: var(--sg-font-display);
  font-size: 12.5px;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase;
}

#left-panel .quick-action-row #btn-todays-paper,
#left-panel .quick-action-row #btn-seller-valuation {
  border-left-color: var(--sg-crimson) !important;
}

#left-panel .quick-action-row #btn-seller-valuation {
  background: linear-gradient(90deg, rgba(217, 43, 43, 0.24), var(--sg-card) 42%) !important;
  color: var(--sg-gold-bright) !important;
}

#left-panel .quick-action-row #btn-todays-paper:hover,
#left-panel .quick-action-row #btn-living-wiki:hover,
#left-panel .quick-action-row #btn-scenic-tours:hover,
#left-panel .quick-action-row #btn-seller-valuation:hover,
#left-panel .quick-action-row #btn-commute:hover,
#left-panel .quick-action-row #btn-relocation-atlas:hover,
#left-panel .quick-action-row #btn-client-playbooks:hover,
#left-panel .quick-action-row #btn-passport:hover,
#left-panel .quick-action-row #btn-public-notices:hover,
#left-panel .quick-action-row #btn-explainer-cards:hover,
#left-panel .quick-action-row #btn-on-this-day:hover {
  background: var(--sg-gold) !important;
  color: var(--sg-obsidian) !important;
  border-color: var(--sg-ink) !important;
  border-left-color: var(--sg-crimson) !important;
}

#left-panel .quick-action-row .chip:not(.chip-accent),
#left-panel .quick-action-row a.chip {
  font-family: var(--sg-font-display);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--sg-text);
  border: 1px solid transparent;
}

#left-panel .quick-action-row .chip:not(.chip-accent):hover,
#left-panel .quick-action-row a.chip:hover {
  background: var(--sg-card-elev);
  border-color: var(--sg-ink);
  color: var(--sg-gold);
}

#left-panel .cat-section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--sg-font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--sg-gold);
}

#left-panel .cat-section-kicker::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--sg-crimson);
  border: 1px solid var(--sg-ink);
}

#left-panel .cat-neighborhood-tab,
#left-panel .cat-deals-tab,
#left-panel .cat-saved-tab {
  font-family: var(--sg-font-display) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

#left-panel #category-explorer-grid .cat-tile.active::before {
  border-radius: 1px;
  background: var(--sg-crimson);
}

#left-panel #category-directory-drawer.dir-drawer {
  background: var(--sg-asphalt);
  border: 2px solid var(--sg-ink);
  border-left: 3.5px solid var(--sg-gold);
  border-radius: var(--sg-radius-sharp);
  box-shadow: var(--sg-shadow-sm);
}

#left-panel .dir-title {
  font-family: var(--sg-font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--sg-ivory);
}

/* Preserve TN TREC Rule 1260-02-.12 font parity on legal footer (do NOT shrink Keller Williams Realty) */
#left-panel .legal-foot {
  background: rgba(20, 23, 30, 0.72);
  border-top: 2px solid var(--sg-ink) !important;
  margin: 4px -4px -4px;
  border-radius: 2px;
}

/* --------------------------------------------------------------------------
   3. Top Weather/Time HUD Bar (.topbar) & Status Readout (.status-banner)
   -------------------------------------------------------------------------- */
.hud-layer .topbar {
  border-radius: var(--sg-radius-sharp);
  box-shadow: var(--sg-shadow-sm), var(--sg-hud-inner-rim);
}

.hud-layer .topbar .weather-pill {
  font-family: var(--sg-font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--sg-ivory);
  border-right: 1.5px solid rgba(243, 239, 230, 0.14);
}

.hud-layer .topbar .seg-group {
  border-right: 1.5px solid rgba(243, 239, 230, 0.14);
}

.hud-layer .topbar .seg-group button {
  font-family: var(--sg-font-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  color: var(--sg-muted);
}

.hud-layer .topbar .seg-group button:hover {
  color: var(--sg-ivory);
}

.hud-layer .topbar .seg-group button.active {
  color: var(--sg-gold);
  font-weight: 800;
}

.hud-layer .topbar .seg-group button.active::after {
  height: 2px;
  background: var(--sg-crimson);
}

.hud-layer .topbar .studio-popover-trigger,
.hud-layer .topbar #btn-studio-layers {
  font-family: var(--sg-font-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sg-ivory);
  border-radius: 2px;
}

.hud-layer .topbar .studio-popover-trigger:hover,
.hud-layer .topbar .studio-popover-trigger.popover-open {
  background: var(--sg-card-elev);
  color: var(--sg-gold);
}

.hud-layer .topbar #btn-feature-biz {
  background: var(--sg-gold);
  color: var(--sg-obsidian);
  border: 1.5px solid var(--sg-ink);
  border-radius: 2px;
  box-shadow: 2px 2px 0 var(--sg-ink);
  clip-path: var(--sg-chamfer-cta);
  font-family: var(--sg-font-display);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hud-layer .topbar #btn-feature-biz:hover,
.hud-layer .topbar #btn-feature-biz:focus-visible {
  background: var(--sg-crimson);
  color: #ffffff;
  border-color: var(--sg-ink);
}

.hud-layer .status-banner {
  background: rgba(11, 13, 17, 0.90);
  border: 1.5px solid var(--sg-ink);
  border-left: 3px solid var(--sg-gold);
  border-radius: 2px;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.8);
  color: var(--sg-ivory);
  font-family: var(--sg-font-mono);
  font-size: 10px;
  letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   4. Bottom Tour/Drive Strip (.bottom-bar) & Spotlight Mini-Card
   -------------------------------------------------------------------------- */
.hud-layer .bottom-bar {
  border-radius: var(--sg-radius-sharp);
  box-shadow: var(--sg-shadow-sm), var(--sg-hud-inner-rim);
}

.hud-layer .bottom-bar .studio-dock-tour {
  background: var(--sg-crimson) !important;
  border: 1.5px solid var(--sg-ink) !important;
  border-radius: 2px !important;
  box-shadow: 2px 2px 0 var(--sg-ink);
  color: #ffffff !important;
  font-family: var(--sg-font-display);
  font-size: 12.5px;
  font-weight: 800 !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hud-layer .bottom-bar .studio-dock-tour:hover {
  background: var(--sg-gold) !important;
  color: var(--sg-obsidian) !important;
}

.hud-layer .bottom-bar .btn-sm,
.hud-layer .bottom-bar button.pill-gold,
.hud-layer .bottom-bar #shokker-all-tools-pill,
.hud-layer .bottom-bar [id*="all-tools"] {
  font-family: var(--sg-font-display);
  font-size: 12.5px;
  font-weight: 700 !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 2px !important;
  color: var(--sg-ivory) !important;
}

.hud-layer .bottom-bar .btn-sm:hover {
  background: var(--sg-card-elev);
  border-color: var(--sg-ink);
  color: var(--sg-gold) !important;
}

.hud-layer .bottom-bar #tour-counter {
  font-family: var(--sg-font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--sg-gold);
}

.hud-layer .bottom-bar #tour-select {
  background: var(--sg-obsidian);
  border: 1.5px solid var(--sg-ink);
  border-radius: 2px;
  color: var(--sg-ivory);
  font-family: var(--sg-font-body);
  font-size: 11px;
}

/* Spotlight Mini-Card (exact 268px desktop footprint) */
.hud-layer #spotlight-card.spotlight-card {
  border: 2px solid var(--sg-ink);
  border-left: 3.5px solid var(--sg-crimson);
  border-radius: var(--sg-radius-sharp);
  box-shadow: var(--sg-shadow-sm), var(--sg-hud-inner-rim);
}

.hud-layer #spotlight-card .spot-eyebrow {
  font-family: var(--sg-font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--sg-gold);
}

.hud-layer #spotlight-card .spot-arrow-btn {
  background: var(--sg-card);
  border: 1.5px solid var(--sg-ink) !important;
  border-radius: 2px !important;
  color: var(--sg-ivory);
}

.hud-layer #spotlight-card .spot-arrow-btn:hover {
  background: var(--sg-gold);
  color: var(--sg-obsidian);
}

.hud-layer #spotlight-card .spot-title {
  font-family: var(--sg-font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  line-height: 1.08;
  color: var(--sg-ivory);
  text-shadow: 1.5px 1.5px 0 var(--sg-ink);
}

.hud-layer #spotlight-card .spot-sub {
  font-family: var(--sg-font-body);
  font-size: 10.5px;
  color: var(--sg-muted);
}

.hud-layer #spotlight-card #spot-fly {
  background: var(--sg-gold);
  color: var(--sg-obsidian);
  border: 1.5px solid var(--sg-ink);
  border-radius: 2px;
  box-shadow: 2px 2px 0 var(--sg-ink);
  clip-path: var(--sg-chamfer-cta);
  font-family: var(--sg-font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hud-layer #spotlight-card #spot-fly:hover {
  background: var(--sg-crimson);
  color: #ffffff;
  border-color: var(--sg-ink);
}

.hud-layer #spotlight-card #spot-partner {
  background: var(--sg-card);
  border: 1.5px solid var(--sg-ink);
  border-left: 3px solid var(--sg-crimson);
  border-radius: 2px;
  color: var(--sg-ivory);
  font-family: var(--sg-font-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hud-layer #spotlight-card #spot-partner:hover {
  background: var(--sg-ivory);
  color: var(--sg-obsidian);
}

/* --------------------------------------------------------------------------
   5. Right Place Card Drawer (#right-drawer) — Collector Dossier Aesthetic
   -------------------------------------------------------------------------- */
#right-drawer.right-drawer {
  border: 2px solid var(--sg-ink);
  border-radius: var(--sg-radius-sharp);
  box-shadow: var(--sg-shadow-card), var(--sg-hud-inner-rim);
  scrollbar-color: var(--sg-gold) var(--sg-obsidian);
  max-height: calc(100dvh - 102px);
}

#right-drawer .drawer-head {
  position: sticky;
  top: -15px;
  z-index: 35;
  background: var(--sg-obsidian, #0b0d11);
  margin: -15px -15px 2px -15px;
  padding: 14px 15px 10px 15px;
  border-bottom: 2px solid var(--sg-ink);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.5);
}

#right-drawer .pill-tag {
  background: var(--sg-card);
  border: 1.5px solid var(--sg-ink);
  border-left: 3px solid var(--sg-gold);
  border-radius: 2px;
  padding: 2px 8px;
  color: var(--sg-ivory);
  font-family: var(--sg-font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

#right-drawer .pill-tag.gold {
  background: var(--sg-crimson);
  border-color: var(--sg-ink);
  border-left: 3px solid var(--sg-gold);
  color: #ffffff;
}

#right-drawer #drawer-title,
#right-drawer .card-title {
  font-family: var(--sg-font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  line-height: 1.04;
  color: var(--sg-ivory);
  text-shadow: 2px 2px 0 var(--sg-ink);
}

#right-drawer #drawer-subtitle,
#right-drawer .card-addr {
  font-family: var(--sg-font-mono);
  font-size: 11px;
  color: var(--sg-gold);
  margin-top: 4px;
}

#right-drawer #drawer-close {
  background: var(--sg-card);
  color: var(--sg-ivory);
  border: 2px solid var(--sg-ink);
  border-radius: var(--sg-radius-sharp);
  box-shadow: 2px 2px 0 var(--sg-ink);
  font-family: var(--sg-font-display);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

#right-drawer #drawer-close:hover,
#right-drawer #drawer-close:focus-visible {
  background: var(--sg-crimson);
  color: #ffffff;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--sg-ink);
}

#right-drawer .card-photo {
  border-radius: var(--sg-radius-sharp);
  border: 2px solid var(--sg-ink);
  box-shadow: var(--sg-shadow-sm);
}

#right-drawer .card-section {
  color: var(--sg-text);
  font-family: var(--sg-font-body);
}

#right-drawer .card-section h4 {
  font-family: var(--sg-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--sg-gold);
}

#right-drawer .metric-box,
#right-drawer .nh-schools-box,
#right-drawer .reach-scorecard,
#right-drawer .pc-drive-box,
#right-drawer .pc-homes-crosslink {
  background: var(--sg-card);
  border: 1.5px solid var(--sg-ink);
  border-left: 3px solid var(--sg-gold);
  border-radius: var(--sg-radius-sharp);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.85);
}

#right-drawer .metric-label,
#right-drawer .reach-scorecard-title {
  font-family: var(--sg-font-mono);
  color: var(--sg-gold);
}

#right-drawer .metric-val,
#right-drawer .reach-metric-val {
  font-family: var(--sg-font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--sg-ivory);
}

#right-drawer .pc-drive-item,
#right-drawer .reach-metric {
  background: var(--sg-obsidian);
  border: 1px solid var(--sg-ink);
  border-radius: 2px;
}

#right-drawer .pc-spotlight-ribbon,
#right-drawer .pc-claim-bar,
#right-drawer .pc-upgrade-banner,
#right-drawer .nh-cta-card {
  background: var(--sg-card);
  border: 2px solid var(--sg-ink);
  border-radius: var(--sg-radius-sharp);
  box-shadow: var(--sg-shadow-sm);
}

#right-drawer .pc-spotlight-ribbon-top {
  background: var(--sg-gold);
  color: var(--sg-obsidian);
  border-bottom: 2px solid var(--sg-ink);
  font-family: var(--sg-font-mono);
}

#right-drawer .pc-claim-bar-head,
#right-drawer .pc-upgrade-kicker {
  font-family: var(--sg-font-mono);
  color: var(--sg-gold);
}

#right-drawer .btn-primary,
#right-drawer .btn-gold,
#right-drawer .pc-claim-btn-primary,
#right-drawer .nh-ask-cta {
  background: var(--sg-gold);
  color: var(--sg-obsidian);
  border: 2px solid var(--sg-ink);
  border-radius: 2px;
  box-shadow: 2px 2px 0 var(--sg-ink);
  clip-path: var(--sg-chamfer-cta);
  font-family: var(--sg-font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

#right-drawer .btn-primary:hover,
#right-drawer .btn-gold:hover,
#right-drawer .pc-claim-btn-primary:hover,
#right-drawer .nh-ask-cta:hover {
  background: var(--sg-crimson);
  color: #ffffff;
  border-color: var(--sg-ink);
  filter: none;
}

#right-drawer .btn-sm:not(#drawer-close):not(.btn-primary):not(.btn-gold),
#right-drawer .pc-claim-btn-secondary,
#right-drawer .pc-save-btn {
  background: var(--sg-obsidian);
  color: var(--sg-ivory);
  border: 1.5px solid var(--sg-ink);
  border-left: 3px solid var(--sg-crimson);
  border-radius: 2px;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.85);
  font-family: var(--sg-font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#right-drawer .btn-sm:not(#drawer-close):not(.btn-primary):not(.btn-gold):hover,
#right-drawer .pc-claim-btn-secondary:hover,
#right-drawer .pc-save-btn:hover {
  background: var(--sg-ivory);
  color: var(--sg-obsidian);
  border-left-color: var(--sg-gold);
}

#right-drawer .pc-save-btn.saved-active {
  background: var(--sg-gold);
  color: var(--sg-obsidian);
  border-color: var(--sg-ink);
}

/* --------------------------------------------------------------------------
   6. First-Visit Welcome Card (#shokker-first-visit-welcome)
      Higher specificity beats runtime-injected welcome stylesheet while
      preserving 100% of desktop/mobile bounds and attribution clearance.
   -------------------------------------------------------------------------- */
html body #shokker-first-visit-welcome {
  background-color: var(--sg-obsidian-solid);
  background-image: var(--sg-hud-stripe);
  background-position: top left;
  background-size: 100% 3.5px;
  background-repeat: no-repeat;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 2px solid var(--sg-ink);
  border-radius: var(--sg-radius-sharp);
  box-shadow: var(--sg-shadow-card), var(--sg-hud-inner-rim);
  color: var(--sg-text);
  font-family: var(--sg-font-body);
}

html body #shokker-first-visit-welcome .sfvw-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: var(--sg-crimson);
  color: var(--sg-ivory);
  border: 1.5px solid var(--sg-ink);
  border-radius: 2px;
  clip-path: var(--sg-chamfer-badge);
  font-family: var(--sg-font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
}

html body #shokker-first-visit-welcome .sfvw-heading {
  font-family: var(--sg-font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--sg-ivory);
  text-shadow: 1.5px 1.5px 0 var(--sg-ink);
}

html body #shokker-first-visit-welcome #shokker-welcome-dismiss {
  background: var(--sg-card);
  border: 1.5px solid var(--sg-ink);
  border-radius: 2px;
  box-shadow: 2px 2px 0 var(--sg-ink);
  color: var(--sg-ivory);
  font-family: var(--sg-font-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

html body #shokker-first-visit-welcome #shokker-welcome-dismiss:hover {
  background: var(--sg-crimson);
  color: #ffffff;
  border-color: var(--sg-ink);
}

html body #shokker-first-visit-welcome .sfvw-front-door-input {
  background: var(--sg-obsidian);
  border: 2px solid var(--sg-ink);
  border-bottom: 2px solid var(--sg-line-gold);
  border-radius: var(--sg-radius-sharp);
  color: var(--sg-ivory);
}

html body #shokker-first-visit-welcome .sfvw-front-door-btn,
html body #shokker-first-visit-welcome .sfvw-cta-clip {
  background: var(--sg-gold);
  color: var(--sg-obsidian);
  border: 2px solid var(--sg-ink);
  border-radius: 2px;
  box-shadow: 2px 2px 0 var(--sg-ink);
  clip-path: var(--sg-chamfer-cta);
  font-family: var(--sg-font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

html body #shokker-first-visit-welcome .sfvw-front-door-btn:hover,
html body #shokker-first-visit-welcome .sfvw-cta-clip:hover {
  background: var(--sg-crimson);
  color: #ffffff;
  filter: none;
}

html body #shokker-first-visit-welcome .sfvw-primary-btn,
html body #shokker-first-visit-welcome .sfvw-card {
  background: var(--sg-card);
  border: 2px solid var(--sg-ink);
  border-left: 3px solid var(--sg-gold);
  border-radius: var(--sg-radius-sharp);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.85);
}

html body #shokker-first-visit-welcome .sfvw-primary-btn:hover,
html body #shokker-first-visit-welcome .sfvw-card:hover {
  background: var(--sg-card-elev);
  border-color: var(--sg-ink);
  border-left-color: var(--sg-crimson);
  box-shadow: 3px 3px 0 var(--sg-ink);
}

html body #shokker-first-visit-welcome .sfvw-card-title {
  font-family: var(--sg-font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--sg-ivory);
}

html body #shokker-first-visit-welcome .sfvw-secondary-chip {
  background: var(--sg-card);
  border: 1.5px solid var(--sg-ink);
  border-radius: 2px;
  font-family: var(--sg-font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sg-ivory);
}

/* --------------------------------------------------------------------------
   7. Popovers, Toast, Kiosk Lower-Third & Mobile Top Bar Cohesion (Zero Blur)
   -------------------------------------------------------------------------- */
.hud-layer .studio-popover-header,
.hud-layer .studio-popover-label {
  font-family: var(--sg-font-mono);
  color: var(--sg-gold);
}

.hud-layer .studio-layers-grid button,
.hud-layer .studio-layer-toggle {
  background: var(--sg-card);
  border: 1.5px solid var(--sg-ink);
  border-radius: 2px !important;
  color: var(--sg-ivory);
}

.hud-layer .studio-layers-grid button.active,
.hud-layer .studio-layer-toggle.active,
.hud-layer .studio-layer-toggle[aria-pressed="true"] {
  background: var(--sg-card-elev);
  border-color: var(--sg-gold);
}

.hud-layer .studio-select {
  background: var(--sg-obsidian);
  border: 1.5px solid var(--sg-ink);
  border-radius: 2px;
}

.shokker-toast,
.clean-view-exit-pill {
  background: var(--sg-obsidian-solid);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 2px solid var(--sg-ink);
  border-left: 3.5px solid var(--sg-gold);
  border-radius: var(--sg-radius-sharp);
  box-shadow: var(--sg-shadow-sm);
}

@media (max-width: 680px) {
  html body #shokker-mobile-topbar {
    background-color: var(--sg-obsidian-hud);
    background-image: var(--sg-hud-stripe);
    background-position: top left;
    background-size: 100% 3px;
    background-repeat: no-repeat;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 2px solid var(--sg-ink);
    border-radius: var(--sg-radius-sharp);
    box-shadow: var(--sg-shadow-sm), var(--sg-hud-inner-rim);
  }

  html body #shokker-mobile-search-btn .smob-emblem {
    background: var(--sg-crimson);
    border: 1.5px solid var(--sg-ink);
    border-radius: 2px;
    color: var(--sg-ivory);
    font-family: var(--sg-font-display);
    font-weight: 800;
  }

  html body #shokker-mobile-menu-btn {
    background: var(--sg-gold);
    color: var(--sg-obsidian);
    border: 1.5px solid var(--sg-ink);
    border-radius: 2px;
    font-family: var(--sg-font-display);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  html body #right-drawer.right-drawer {
    border-radius: var(--sg-radius-sharp) var(--sg-radius-sharp) 0 0;
  }
}
