/* ==========================================================================
   ZONE - AAA CRIME SYNDICATE RPG SCREEN SURFACES (v128)
   MotionSites Borderless Tonal UI, Mobile Right-Pane Viewport & 60fps CSS
   File: assets/ui/aaa-game-surfaces.css
   Scope: Page body scroll/backdrop fix + strictly #zone-main (all inner
          screens, hero stages, poster cards, tables, CTAs, inputs, modals).
          Topbar & Sidebar remain owned by @carbon-hud-chrome.
   Loaded AFTER: zone-design.css, zone-layout.css, district-compositions108.css,
                 gym116.css, and noir-game-hud.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. PAGE BACKDROP, 60FPS SCROLL COMPOSITING & MOTIONSITES TONAL TOKENS
      Overrides noir-game-hud.css background-attachment: fixed scroll jank
   -------------------------------------------------------------------------- */
html:not([data-theme="light"]) body {
  background-color: #06080e !important;
  background-image:
    radial-gradient(960px 480px at 85% -8%, rgba(56, 189, 248, 0.055), transparent 62%),
    radial-gradient(840px 460px at 12% 14%, rgba(16, 185, 129, 0.045), transparent 60%),
    linear-gradient(180deg, #06080e 0%, #080c15 52%, #06080e 100%) !important;
  background-attachment: scroll !important;
}

html[data-theme="light"] body {
  background-color: #f3f4f8 !important;
  background-image: linear-gradient(180deg, #f5f6fa 0%, #edf0f6 100%) !important;
  background-attachment: scroll !important;
  color: #0f172a !important;
}

/* Kill expensive Chromium backdrop-filter blur passes on ALL repeating elements inside #zone-main */
html body #zone-main *:not(.zig-modal-backdrop) {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Scoped MotionSites Tonal Tokens + Inline CSS Variable Harmonization inside #zone-main */
html:not([data-theme="light"]) body #zone-main {
  --ags-surface-1: #0b0f19;
  --ags-surface-2: #121826;
  --ags-surface-2-hover: #172033;
  --ags-surface-3: rgba(255, 255, 255, 0.032);
  --ags-surface-3-hover: rgba(255, 255, 255, 0.06);
  --ags-border-1: rgba(255, 255, 255, 0.04);
  --ags-border-2: rgba(255, 255, 255, 0.05);
  --ags-divider: rgba(255, 255, 255, 0.045);
  --ags-shadow-1: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 22px 48px -14px rgba(0, 0, 0, 0.62);
  --ags-shadow-2: inset 0 1px 0 rgba(255, 255, 255, 0.075), 0 10px 26px -8px rgba(0, 0, 0, 0.46);
  --ags-specular-sheen: radial-gradient(120% 60% at 50% 0%, rgba(255, 255, 255, 0.08), transparent 60%);
  --ags-pill-bg: rgba(255, 255, 255, 0.07);
  --ags-pill-hover: rgba(255, 255, 255, 0.12);
  --ags-icon-plate: rgba(255, 255, 255, 0.045);
  --ags-gold: #eab308;
  --ags-gold-soft: rgba(234, 179, 8, 0.22);
  --ags-emerald: #10b981;
  --ags-emerald-soft: rgba(16, 185, 129, 0.2);
  --ags-crimson: #ef4444;
  --ags-ink-1: #f8fafc;
  --ags-ink-2: #cbd5e1;
  --ags-ink-3: #94a3b8;

  /* Harmonize inline template variables inside #zone-main so inline 1px borders vanish into tonal depth */
  --panel: #0b0f19;
  --panel2: #121826;
  --deep: #121826;
  --z1: #121826;
  --z2: #151d2e;
  --btn: rgba(255, 255, 255, 0.07);
  --tb1: transparent;
  --tb2: transparent;
  --border: rgba(255, 255, 255, 0.04);
  --border2: rgba(255, 255, 255, 0.05);
  --border3: rgba(255, 255, 255, 0.055);
  --edge: rgba(255, 255, 255, 0.04);
  --line: rgba(255, 255, 255, 0.045);
  --track: rgba(255, 255, 255, 0.065);
}

html[data-theme="light"] body #zone-main {
  --ags-surface-1: #ffffff;
  --ags-surface-2: #f8fafc;
  --ags-surface-2-hover: #ffffff;
  --ags-surface-3: rgba(15, 23, 42, 0.032);
  --ags-surface-3-hover: rgba(15, 23, 42, 0.058);
  --ags-border-1: rgba(15, 23, 42, 0.055);
  --ags-border-2: rgba(15, 23, 42, 0.06);
  --ags-divider: rgba(15, 23, 42, 0.055);
  --ags-shadow-1: 0 14px 34px -10px rgba(15, 23, 42, 0.07);
  --ags-shadow-2: 0 6px 18px -6px rgba(15, 23, 42, 0.06);
  --ags-specular-sheen: radial-gradient(120% 60% at 50% 0%, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0) 60%);
  --ags-pill-bg: rgba(15, 23, 42, 0.06);
  --ags-pill-hover: rgba(15, 23, 42, 0.1);
  --ags-icon-plate: rgba(15, 23, 42, 0.045);
  --ags-gold: #b45309;
  --ags-gold-soft: rgba(180, 83, 9, 0.18);
  --ags-emerald: #059669;
  --ags-emerald-soft: rgba(5, 150, 105, 0.18);
  --ags-crimson: #dc2626;
  --ags-ink-1: #0f172a;
  --ags-ink-2: #1e293b;
  --ags-ink-3: #475569;

  /* Clean Studio Alabaster/Stone inline variables inside #zone-main */
  --panel: #ffffff;
  --panel2: #f8fafc;
  --deep: #f8fafc;
  --z1: #f8fafc;
  --z2: #ffffff;
  --btn: rgba(15, 23, 42, 0.06);
  --tb1: transparent;
  --tb2: transparent;
  --border: rgba(15, 23, 42, 0.055);
  --border2: rgba(15, 23, 42, 0.06);
  --border3: rgba(15, 23, 42, 0.065);
  --edge: rgba(15, 23, 42, 0.05);
  --line: rgba(15, 23, 42, 0.055);
  --track: rgba(15, 23, 42, 0.075);
  --t1: #0f172a;
  --t2: #1e293b;
  --t3: #334155;
  --t4: #334155;
  --mu: #64748b;
  --mu2: #64748b;
}

html body #zone-main bdi,
html body #zone-main [data-zfig] {
  font-variant-numeric: tabular-nums;
}

/* Restore modern pill & studio radii crushed by noir-game-hud.css:75-84 inside #zone-main */
html body #zone-main [style*="border-radius:999px"],
html body #zone-main [style*="border-radius: 999px"] {
  border-radius: 999px !important;
}

html body #zone-main [style*="border-radius:10px"],
html body #zone-main [style*="border-radius: 10px"] {
  border-radius: 10px !important;
}

html body #zone-main [style*="border-radius:9px"],
html body #zone-main [style*="border-radius: 9px"] {
  border-radius: 9px !important;
}

/* --------------------------------------------------------------------------
   1. BORDERLESS STUDIO PILL BUTTONS & SIGNATURE CTAs INSIDE #zone-main
      Defeats zone-layout.css:7,85,99,147 & district-compositions108.css
      Strict 60fps transition: transform, opacity, background-color, color ONLY
   -------------------------------------------------------------------------- */
html body #zone-main button {
  font-weight: 600 !important;
  letter-spacing: -0.005em;
  font-variant-numeric: tabular-nums;
}

/* Standard Studio Pill Action Buttons (excludes structural card/pin/row/chip/tab buttons) */
html body #zone-main button:not(.zig-game-card):not(.zig-city-chip):not(.zig-flight-card):not(.zig-sound-btn):not(.zig-btn):not(.zig-btn-secondary):not(.zone-map-pin-btn):not(.zone-crime-choice):not(.zone-gym-station):not(.zone-mobile-tabbar *):not([style*="background:none"]):not(.zone-tutorial-close):not(.zone-chat-sender-btn):not(.zone-inventory-row > button:first-child):not(.zone-quick-actions > button):not(.zone-home-resource-strip button):not(.zone-crime-activity-nav button):not(.zone-city-destinations button):not([data-ztabs] button):not([data-roulette-bet]):not([data-casino-table] > div:nth-of-type(2) > button:not([data-bj-action]):not([data-roulette-bet])):not([data-casino-table="slots"] > div:nth-of-type(3) > button) {
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: -0.005em !important;
  text-transform: none !important;
  border-radius: 10px !important;
  border: 0 !important;
  clip-path: none !important;
  transition:
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 180ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
    color 180ms cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/* Neutral Borderless Studio Pill (Dark & Day via tokens) */
html body #zone-main button:not(.zone-action-primary):not(.zone-action-danger):not([aria-pressed="true"]):not([aria-expanded="true"]):not([style*="activebg"]):not([style*="accFill1"]):not([style*="#c74a3a"]):not(.zig-game-card):not(.zig-city-chip):not(.zig-flight-card):not(.zig-sound-btn):not(.zig-btn):not(.zig-btn-secondary):not(.zone-map-pin-btn):not(.zone-crime-choice):not(.zone-gym-station):not(.zone-mobile-tabbar *):not([style*="background:none"]):not(.zone-tutorial-close):not(.zone-chat-sender-btn):not(.zone-inventory-row > button:first-child):not(.zone-quick-actions > button):not(.zone-page-heading button):not(.familyStat):not(.zone-home-resource-strip button):not(.zone-crime-activity-nav button):not(.zone-city-destinations button):not([data-ztabs] button):not([data-roulette-bet]):not([data-casino-table] > div:nth-of-type(2) > button:not([data-bj-action]):not([data-roulette-bet])):not([data-casino-table="slots"] > div:nth-of-type(3) > button) {
  background-color: var(--ags-pill-bg) !important;
  background-image: none !important;
  border: 0 !important;
  color: var(--ags-ink-1) !important;
  text-shadow: none !important;
  box-shadow: none !important;
}

html body #zone-main button:not(.zone-action-primary):not(.zone-action-danger):not([aria-pressed="true"]):not([aria-expanded="true"]):not([style*="activebg"]):not([style*="accFill1"]):not([style*="#c74a3a"]):not(.zig-game-card):not(.zig-city-chip):not(.zig-flight-card):not(.zig-sound-btn):not(.zig-btn):not(.zig-btn-secondary):not(.zone-map-pin-btn):not(.zone-crime-choice):not(.zone-gym-station):not(.zone-mobile-tabbar *):not([style*="background:none"]):not(.zone-tutorial-close):not(.zone-chat-sender-btn):not(.zone-inventory-row > button:first-child):not(.zone-quick-actions > button):not(.zone-page-heading button):not(.familyStat):not(.zone-home-resource-strip button):not(.zone-crime-activity-nav button):not(.zone-city-destinations button):not([data-ztabs] button):not([data-roulette-bet]):not([data-casino-table] > div:nth-of-type(2) > button:not([data-bj-action]):not([data-roulette-bet])):not([data-casino-table="slots"] > div:nth-of-type(3) > button):not(:disabled):hover {
  background-color: var(--ags-pill-hover) !important;
  color: var(--ags-ink-1) !important;
  transform: translateY(-1px);
}

/* Active / Selected Studio Pill State ([aria-pressed="true"], [aria-expanded="true"], or inline activebg) */
html body #zone-main button:not(.zone-crime-choice):not(.zone-gym-station):not(.zone-crime-activity-nav button):not(.zone-mobile-tabbar *):is([aria-pressed="true"], [aria-expanded="true"], [style*="activebg"]) {
  background-color: #10b981 !important;
  background-image: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  border: 0 !important;
  border-radius: 10px !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  text-shadow: none !important;
  box-shadow: 0 6px 16px -4px rgba(16, 185, 129, 0.38) !important;
}

/* SIGNATURE STUDIO EMERALD PRIMARY CTA (.zone-action-primary) */
html body #zone-main button.zone-action-primary,
html body #zone-main button[style*="accFill1"] {
  background-color: #10b981 !important;
  background-image: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  border: 0 !important;
  border-radius: 10px !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  letter-spacing: -0.005em !important;
  text-transform: none !important;
  text-shadow: none !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 8px 20px -4px rgba(16, 185, 129, 0.38) !important;
}

html body #zone-main button.zone-action-primary:not(:disabled):hover,
html body #zone-main button[style*="accFill1"]:not(:disabled):hover {
  transform: translateY(-1px) !important;
  background-color: #059669 !important;
  background-image: linear-gradient(135deg, #34d399 0%, #059669 100%) !important;
  color: #ffffff !important;
}

/* SIGNATURE STUDIO CRIMSON DANGER CTA (.zone-action-danger & attack red buttons) */
html body #zone-main button.zone-action-danger,
html body #zone-main button[style*="#c74a3a"]:not([data-roulette-bet]) {
  background-color: #ef4444 !important;
  background-image: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  border: 0 !important;
  border-radius: 10px !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  letter-spacing: -0.005em !important;
  text-transform: none !important;
  text-shadow: none !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 8px 20px -4px rgba(239, 68, 68, 0.36) !important;
}

html body #zone-main button.zone-action-danger:not(:disabled):hover,
html body #zone-main button[style*="#c74a3a"]:not([data-roulette-bet]):not(:disabled):hover {
  transform: translateY(-1px) !important;
  background-color: #dc2626 !important;
  background-image: linear-gradient(135deg, #f87171 0%, #dc2626 100%) !important;
  color: #ffffff !important;
}

/* Tactile Active Press & Disabled Polish */
html body #zone-main button:not(.zone-map-pin-btn):not(.zone-mobile-tabbar *):not(:disabled):active {
  transform: translateY(1px) !important;
}

html body #zone-main button:disabled {
  opacity: 0.44 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

/* --------------------------------------------------------------------------
   2. PHOTOREALISTIC UE5 HERO STAGES (.zone-page-heading) & --screen-art BINDING
      Level-1 Tonal Stage (18px radius, hairline border, zero neon AI bars)
   -------------------------------------------------------------------------- */
html body #zone-main,
html body #zone-main .zone-page-heading,
html body #zone-main[data-zone-screen="home"],
html body #zone-main[data-zone-screen="home"] .zone-page-heading,
html body #zone-main[data-zone-screen="city"],
html body #zone-main[data-zone-screen="city"] .zone-page-heading,
html body #zone-main[data-zone-screen="faction"],
html body #zone-main[data-zone-screen="faction"] .zone-page-heading,
html body #zone-main[data-zone-screen="bank"],
html body #zone-main[data-zone-screen="bank"] .zone-page-heading,
html body #zone-main[data-zone-screen="properties"],
html body #zone-main[data-zone-screen="properties"] .zone-page-heading,
html body #zone-main[data-zone-screen="hof"],
html body #zone-main[data-zone-screen="hof"] .zone-page-heading,
html body #zone-main[data-zone-screen="job"],
html body #zone-main[data-zone-screen="job"] .zone-page-heading,
html body #zone-main[data-zone-screen="jobs"],
html body #zone-main[data-zone-screen="jobs"] .zone-page-heading,
html body #zone-main[data-zone-screen="education"],
html body #zone-main[data-zone-screen="education"] .zone-page-heading,
html body #zone-main[data-zone-screen="newspaper"],
html body #zone-main[data-zone-screen="newspaper"] .zone-page-heading {
  --screen-art: url('/assets/ui/motion-art/hero-syndicate-turf.webp') !important;
}

html body #zone-main[data-zone-screen="crimes"],
html body #zone-main[data-zone-screen="crimes"] .zone-page-heading,
html body #zone-main[data-zone-screen="attack"],
html body #zone-main[data-zone-screen="attack"] .zone-page-heading,
html body #zone-main[data-zone-screen="jail"],
html body #zone-main[data-zone-screen="jail"] .zone-page-heading,
html body #zone-main[data-zone-screen="hospital"],
html body #zone-main[data-zone-screen="hospital"] .zone-page-heading,
html body #zone-main[data-zone-screen="missions"],
html body #zone-main[data-zone-screen="missions"] .zone-page-heading,
html body #zone-main[data-zone-screen="market"],
html body #zone-main[data-zone-screen="market"] .zone-page-heading,
html body #zone-main[data-zone-screen="items"],
html body #zone-main[data-zone-screen="items"] .zone-page-heading,
html body #zone-main[data-zone-screen="elimination"],
html body #zone-main[data-zone-screen="elimination"] .zone-page-heading {
  --screen-art: url('/assets/ui/motion-art/hero-street-crimes.webp') !important;
}

html body #zone-main[data-zone-screen="gym"],
html body #zone-main[data-zone-screen="gym"] .zone-page-heading {
  --screen-art: url('/art/zone-gym-interior-v105.webp') !important;
}

html body #zone-main[data-zone-screen="casino"],
html body #zone-main[data-zone-screen="casino"] .zone-page-heading {
  --screen-art: url('/assets/ui/motion-art/arcade-casino.webp') !important;
}

html body #zone-main .zone-page-heading {
  min-height: 98px !important;
  padding: 20px 24px !important;
  border-radius: 18px !important;
  position: relative !important;
  overflow: hidden !important;
  isolation: isolate;
  align-items: center !important;
  gap: 14px !important;
  contain: layout style;
}

/* Kill AI neon top bar and full-width neon rule under hero stage */
html body #zone-main .zone-page-heading::before {
  content: none !important;
  display: none !important;
}

html body #zone-main .zone-page-rule {
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Atmospheric particle canvas mounted by aaa-game-fx.js inside .zone-page-heading */
html body #zone-main .zone-page-heading > canvas,
html body #zone-main .zone-page-heading .zaaa-hero-atmosphere {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none !important;
  z-index: 1 !important;
  display: block !important;
  background: transparent !important;
}

/* Dark Mode Hero Stage: Tonal #0b0f19 Scrim -> Crisp UE5 Artwork */
html:not([data-theme="light"]) body #zone-main .zone-page-heading {
  background-color: #0b0f19 !important;
  background-image:
    linear-gradient(
      96deg,
      rgba(11, 15, 25, 0.96) 0%,
      rgba(11, 15, 25, 0.88) 38%,
      rgba(11, 15, 25, 0.46) 70%,
      rgba(11, 15, 25, 0.24) 100%
    ),
    var(--screen-art) !important;
  background-size: cover !important;
  background-position: center 42% !important;
  background-repeat: no-repeat !important;
  border: 1px solid rgba(255, 255, 255, 0.04) !important;
  box-shadow: var(--ags-shadow-1) !important;
}

/* Day Mode Hero Stage: Clean Studio Alabaster Scrim -> Crisp UE5 Artwork */
html[data-theme="light"] body #zone-main .zone-page-heading {
  background-color: #ffffff !important;
  background-image:
    linear-gradient(
      96deg,
      rgba(255, 255, 255, 0.98) 0%,
      rgba(248, 250, 252, 0.94) 42%,
      rgba(241, 245, 249, 0.68) 74%,
      rgba(241, 245, 249, 0.48) 100%
    ),
    var(--screen-art) !important;
  background-size: cover !important;
  background-position: center 42% !important;
  background-repeat: no-repeat !important;
  border: 1px solid rgba(15, 23, 42, 0.055) !important;
  box-shadow: var(--ags-shadow-1) !important;
}

html body #zone-main .zone-page-heading h1 {
  font: 800 26px/1.1 var(--zone-display) !important;
  letter-spacing: -0.02em !important;
  text-transform: none !important;
  position: relative !important;
  z-index: 2 !important;
}

html:not([data-theme="light"]) body #zone-main .zone-page-heading h1 {
  color: #f8fafc !important;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.85) !important;
}

html[data-theme="light"] body #zone-main .zone-page-heading h1 {
  color: #0f172a !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.92) !important;
}

html body #zone-main .zone-page-heading > span,
html body #zone-main .zone-page-heading > p,
html body #zone-main .zone-page-heading > small {
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.42 !important;
  position: relative !important;
  z-index: 2 !important;
}

html:not([data-theme="light"]) body #zone-main .zone-page-heading > span,
html:not([data-theme="light"]) body #zone-main .zone-page-heading > p,
html:not([data-theme="light"]) body #zone-main .zone-page-heading > small {
  color: #cbd5e1 !important;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85);
}

html[data-theme="light"] body #zone-main .zone-page-heading > span,
html[data-theme="light"] body #zone-main .zone-page-heading > p,
html[data-theme="light"] body #zone-main .zone-page-heading > small {
  color: #334155 !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
}

/* Hero Action Studio Pills (City / Tutorial) - double ID beats global :not(...) chains */
html body #zone-main .zone-page-heading > div {
  position: relative !important;
  z-index: 2 !important;
  gap: 8px !important;
}

html body #zone-main#zone-main .zone-page-heading > div button {
  min-height: 34px !important;
  padding: 7px 14px !important;
  border-radius: 10px !important;
  border: 0 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: -0.005em !important;
  text-shadow: none !important;
  transition:
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 180ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
    color 180ms cubic-bezier(0.22, 1, 0.36, 1) !important;
}

html:not([data-theme="light"]) body #zone-main#zone-main .zone-page-heading > div button:not([aria-expanded="true"]) {
  background-color: rgba(15, 23, 42, 0.78) !important;
  background-image: none !important;
  color: #f8fafc !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.36) !important;
}

html:not([data-theme="light"]) body #zone-main#zone-main .zone-page-heading > div button:not([aria-expanded="true"]):not(:disabled):hover {
  background-color: rgba(30, 41, 59, 0.92) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

html[data-theme="light"] body #zone-main#zone-main .zone-page-heading > div button:not([aria-expanded="true"]) {
  background-color: rgba(255, 255, 255, 0.92) !important;
  background-image: none !important;
  color: #0f172a !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18) !important;
}

html[data-theme="light"] body #zone-main#zone-main .zone-page-heading > div button:not([aria-expanded="true"]):not(:disabled):hover {
  background-color: #ffffff !important;
  color: #0f172a !important;
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   3. MOTIONSITES LEVEL-1 CONTAINERS, CLEAN HEADERS, QUICK TILES & ARCADE
   -------------------------------------------------------------------------- */

/* Level-1 Tonal Containers (#0b0f19 Dark / #ffffff Day, 18px radius, 0.04 hairline) */
html body #zone-main .zone-panel,
html body #zone-main div:has(> .zone-panel-heading + .zone-panel):not(#zone-tutorial-panel),
html body #zone-main .zig-arcade-deck,
html body #zone-main .zig-home-arcade,
html body #zone-main #zig-world-flight-bar,
html body #zone-main .zig-world-flight-bar,
html body #zone-main .zone-city-directory {
  background-color: var(--ags-surface-1) !important;
  background-image: none !important;
  border: 1px solid var(--ags-border-1) !important;
  border-radius: 18px !important;
  box-shadow: var(--ags-shadow-1) !important;
  contain: layout style;
}

/* Fuse split sibling .zone-panel-heading + .zone-panel wrappers into ONE seamless 18px Level-1 card */
html body #zone-main div:has(> .zone-panel-heading + .zone-panel):not(#zone-tutorial-panel) {
  overflow: hidden;
}

html body #zone-main div:has(> .zone-panel-heading + .zone-panel):not(#zone-tutorial-panel) > .zone-panel {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  contain: none;
}

/* Tutorial wrapper (contains two stacked child sections) */
html body #zone-main #zone-tutorial-panel > .zone-panel-heading {
  background-color: var(--ags-surface-1) !important;
  border: 1px solid var(--ags-border-1) !important;
  border-bottom: 1px solid var(--ags-divider) !important;
  border-radius: 18px 18px 0 0 !important;
}

html body #zone-main #zone-tutorial-panel > .zone-panel-heading + .zone-panel {
  border-top: 0 !important;
  border-radius: 0 0 18px 18px !important;
}

/* Confident Human-Studio Panel Typography (Purge AI uppercase + wide tracking + neon 2px underlines) */
html body #zone-main .zone-panel-heading,
html body #zone-main [data-zhead],
html body #zone-main .zig-arcade-title,
html body #zone-main .zig-world-flight-title,
html body #zone-main #zig-world-flight-bar .zig-world-flight-title,
html body #zone-main .zone-dossier-card-head,
html body #zone-main#zone-main .zone-street-dispatch h2,
html body #zone-main#zone-main [data-zone-world-dispatch] h2,
html body #zone-main#zone-main section.zone-panel strong[style*="text-transform:uppercase"] {
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
  text-transform: none !important;
}

/* Purge remaining 3px solid yellow / 2px neon top/left AI borders across Word on the Street, Loadout, Reconnect & Inline Sections */
html body #zone-main#zone-main .zone-street-dispatch,
html body #zone-main#zone-main [data-zone-world-dispatch],
html body #zone-main#zone-main .zone-connection-recovery,
html body #zone-main#zone-main .zone-loadout,
html body #zone-main#zone-main .zone-city-travel-bar,
html body #zone-main#zone-main .zone-dossier-deck,
html body #zone-main#zone-main section.zone-panel[style*="border-top:2px"],
html body #zone-main#zone-main section.zone-panel[style*="border-inline-start:3px"] {
  background-color: var(--ags-surface-1) !important;
  background-image: var(--ags-specular-sheen) !important;
  border: 1px solid var(--ags-border-1) !important;
  border-top: 1px solid var(--ags-border-1) !important;
  border-inline-start: 1px solid var(--ags-border-1) !important;
  border-radius: 16px !important;
  box-shadow: var(--ags-shadow-1) !important;
}

html:not([data-theme="light"]) body #zone-main#zone-main .zone-street-dispatch,
html:not([data-theme="light"]) body #zone-main#zone-main [data-zone-world-dispatch] {
  border: 1px solid rgba(255, 255, 255, 0.045) !important;
  border-inline-start: 1px solid rgba(255, 255, 255, 0.045) !important;
}

html body #zone-main#zone-main .zone-street-dispatch {
  overflow: hidden;
}

html body #zone-main#zone-main .zone-street-dispatch > header {
  background: transparent !important;
  border-block-end: 1px solid var(--ags-divider) !important;
  min-block-size: 54px !important;
  padding: 12px 16px !important;
}

html body #zone-main#zone-main .zone-street-dispatch h2 {
  font-size: 15px !important;
  line-height: 1.3 !important;
  color: var(--ags-ink-1) !important;
}

html body #zone-main#zone-main .zone-street-dispatch button {
  border-radius: 10px !important;
  border: 0 !important;
  min-height: 44px !important;
}

html body #zone-main#zone-main [data-zone-connection="1"] {
  border: 0 !important;
  background: transparent !important;
  color: var(--ags-ink-3) !important;
  font-size: 11px !important;
  padding: 2px 4px !important;
  box-shadow: none !important;
}

html body #zone-main#zone-main .zone-route-receipt,
html body #zone-main#zone-main .zone-peer-feedback,
html body #zone-main#zone-main .zone-crime-receipt {
  background-color: var(--ags-surface-2) !important;
  background-image: var(--ags-specular-sheen) !important;
  border: 1px solid var(--ags-border-2) !important;
  border-inline-start: 1px solid var(--ags-border-2) !important;
  border-radius: 14px !important;
  padding: 12px 15px !important;
  box-shadow: var(--ags-shadow-2) !important;
}

html body #zone-main .zone-panel-heading,
html body #zone-main .zone-dossier-card-head {
  background: transparent !important;
  color: var(--ags-ink-1) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ags-divider) !important;
  border-radius: 0 !important;
  padding: 14px 18px 12px !important;
  font-size: 14px !important;
  min-height: 0 !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

html body #zone-main .zone-panel-heading h2 {
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
  text-transform: none !important;
  color: var(--ags-ink-1) !important;
  margin: 0 !important;
}

/* Panel Header Pill Buttons (Street / Suit / Tactical, Refresh, Clear) */
html body #zone-main .zone-panel-heading button:not([aria-pressed="true"]):not([style*="activebg"]) {
  background-color: var(--ags-pill-bg) !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 10px !important;
  padding: 5px 11px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  color: var(--ags-ink-1) !important;
  box-shadow: none !important;
}

html body #zone-main .zone-panel-heading button:not([aria-pressed="true"]):not([style*="activebg"]):not(:disabled):hover {
  background-color: var(--ags-pill-hover) !important;
}

html body #zone-main .zone-overline {
  font-weight: 700 !important;
  font-size: 11px !important;
  letter-spacing: 0.02em !important;
  text-transform: none !important;
  color: var(--ags-gold) !important;
}

/* YOUR BASE OF OPERATIONS Strip (.zone-home-brief): Borderless 14px Tonal Strip */
html body #zone-main .zone-home-brief {
  border: 0 !important;
  border-radius: 14px !important;
  overflow: hidden !important;
}

html:not([data-theme="light"]) body #zone-main .zone-home-brief {
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.78), rgba(11, 15, 25, 0.62)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 40px -14px rgba(0, 0, 0, 0.55) !important;
}

html[data-theme="light"] body #zone-main .zone-home-brief {
  background: linear-gradient(90deg, #ffffff 0%, #f8fafc 100%) !important;
  box-shadow: var(--ags-shadow-1) !important;
}

html:not([data-theme="light"]) body #zone-main .zone-home-brief .zone-hideout-scene {
  background-color: transparent !important;
  background-image:
    linear-gradient(92deg, rgba(11, 15, 25, 0.9) 0%, rgba(17, 24, 39, 0.74) 48%, rgba(11, 15, 25, 0.34) 100%),
    url('/assets/ui/motion-art/hero-syndicate-turf.webp') !important;
  background-size: cover !important;
  background-position: center 48% !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045) !important;
  box-shadow: none !important;
}

html[data-theme="light"] body #zone-main .zone-home-brief .zone-hideout-scene {
  background-color: transparent !important;
  background-image:
    linear-gradient(92deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 250, 252, 0.92) 52%, rgba(241, 245, 249, 0.78) 100%),
    url('/assets/ui/motion-art/hero-syndicate-turf.webp') !important;
  background-size: cover !important;
  background-position: center 48% !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.055) !important;
  box-shadow: none !important;
}

html body #zone-main .zone-hideout-scene > div {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 6px 2px;
}

html[data-theme="light"] body #zone-main .zone-hideout-scene strong {
  color: #0f172a !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.88) !important;
}

html[data-theme="light"] body #zone-main .zone-hideout-scene span:not(.zone-overline) {
  color: #0f172a !important;
  background-color: rgba(255, 255, 255, 0.92) !important;
  padding: 4px 10px !important;
  border-radius: 999px !important;
  font-weight: 600 !important;
  text-shadow: none !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.14) !important;
}

/* Home Vitals Resource Strip: Borderless Tonal Cells */
html body #zone-main .zone-home-resource-strip {
  border: 0 !important;
  background: transparent !important;
}

html body #zone-main .zone-home-resource-strip button {
  border-radius: 12px !important;
  border: 0 !important;
  background-color: var(--ags-surface-3) !important;
  background-image: none !important;
  color: var(--ags-ink-1) !important;
  padding: 10px 12px !important;
  box-shadow: none !important;
  transition:
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
    color 180ms cubic-bezier(0.22, 1, 0.36, 1) !important;
}

html body #zone-main .zone-home-resource-strip button:not(:disabled):hover {
  transform: translateY(-1px);
  background-color: var(--ags-surface-3-hover) !important;
}

/* --------------------------------------------------------------------------
   LEVEL-2 INTERACTIVE TONAL CARDS (#121826 -> #172033 Dark / #f8fafc -> #fff Day)
   -------------------------------------------------------------------------- */
html body #zone-main .zone-quick-actions {
  gap: 12px !important;
}

html body #zone-main .zone-quick-actions > button {
  min-height: 70px !important;
  padding: 13px 15px !important;
  border-radius: 14px !important;
  position: relative !important;
  overflow: hidden !important;
  background-color: var(--ags-surface-2) !important;
  background-image: var(--ags-specular-sheen) !important;
  border: 1px solid var(--ags-border-2) !important;
  color: var(--ags-ink-1) !important;
  box-shadow: var(--ags-shadow-2) !important;
  font-weight: 700 !important;
  contain: layout style;
  transition:
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
    color 180ms cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/* Kill AI gold corner-triangle dog-ears and spotlight overlays on Quick-Deploy Tiles */
html body #zone-main .zone-quick-actions > button::before,
html body #zone-main .zone-quick-actions > button::after {
  content: none !important;
  display: none !important;
}

html body #zone-main .zone-quick-actions > button:hover {
  transform: translateY(-2px) !important;
  background-color: var(--ags-surface-2-hover) !important;
}

html body #zone-main .zone-quick-actions > button > span:last-child > span:first-child {
  font-weight: 700 !important;
  font-size: 13.5px !important;
  letter-spacing: -0.01em !important;
  color: var(--ags-ink-1) !important;
}

html body #zone-main .zone-quick-actions > button > span:last-child > span:last-child {
  font-weight: 500 !important;
  color: var(--ags-ink-3) !important;
}

/* Vibrant Animated Frosted Icon Plates (Quick-Actions, City Destinations & Arcade Emblem) */
html body #zone-main .zone-quick-actions > button .zone-nav-icon,
html body #zone-main .zone-city-destinations button :is(.zone-nav-icon, .zone-city-place-icon),
html body #zone-main .zig-arcade-emblem {
  border: 0 !important;
  border-radius: 12px !important;
  background: var(--ags-icon-plate) !important;
  box-shadow: none !important;
  display: grid !important;
  place-items: center !important;
  position: relative !important;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1) !important;
}

html body #zone-main .zone-quick-actions > button .zone-nav-icon {
  width: 44px !important;
  height: 44px !important;
  flex: 0 0 44px !important;
}

html body #zone-main .zone-city-destinations button :is(.zone-nav-icon, .zone-city-place-icon) {
  width: 38px !important;
  height: 38px !important;
  flex: 0 0 38px !important;
}

html body #zone-main .zig-arcade-emblem {
  width: 38px !important;
  height: 38px !important;
  flex: 0 0 38px !important;
  color: var(--ags-gold) !important;
}

/* Smooth GPU micro-tilt on parent hover */
html body #zone-main .zone-quick-actions > button:hover .zone-nav-icon,
html body #zone-main .zone-city-destinations button:hover :is(.zone-nav-icon, .zone-city-place-icon),
html body #zone-main .zig-arcade-deck:hover .zig-arcade-emblem,
html body #zone-main .zig-home-arcade:hover .zig-arcade-emblem {
  transform: scale(1.1) rotate(-2deg) !important;
}

/* Defeat legacy raster mask & solid-gold SVG fill crushers while preserving vibrant multi-stop <linearGradient> fills */
html body #zone-main .zone-quick-actions > button .zone-nav-icon::before,
html body #zone-main .zone-city-destinations button :is(.zone-nav-icon, .zone-city-place-icon)::before {
  content: none !important;
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: none !important;
  -webkit-mask: none !important;
  mask: none !important;
}

html body #zone-main .zone-quick-actions > button .zone-nav-icon svg:first-child:not(:only-child),
html body #zone-main .zone-city-destinations button :is(.zone-nav-icon, .zone-city-place-icon) svg:first-child:not(:only-child) {
  display: none !important;
}

html body #zone-main .zone-quick-actions > button .zone-nav-icon svg:last-child {
  display: block !important;
  visibility: visible !important;
  width: 24px !important;
  height: 24px !important;
}

html body #zone-main .zone-city-destinations button :is(.zone-nav-icon, .zone-city-place-icon) svg:last-child,
html body #zone-main .zig-arcade-emblem svg {
  display: block !important;
  visibility: visible !important;
  width: 20px !important;
  height: 20px !important;
}

html body #zone-main .zone-quick-actions > button .zone-nav-icon svg:not([viewBox="0 0 512 512"]),
html body #zone-main .zone-city-destinations button :is(.zone-nav-icon, .zone-city-place-icon) svg:not([viewBox="0 0 512 512"]) {
  fill: none !important;
}

html body #zone-main .zone-quick-actions > button .zone-nav-icon svg[viewBox="0 0 512 512"] {
  fill: var(--ags-gold) !important;
}

/* Home Modules: Daily Objective, Next Move, Streak (Zero orange 3px corner brackets!) */
html body #zone-main .zone-daily-objective,
html body #zone-main .zone-next-move,
html body #zone-main .zone-login-reward {
  background-color: var(--ags-surface-2) !important;
  background-image: var(--ags-specular-sheen) !important;
  border: 1px solid var(--ags-border-2) !important;
  border-inline-start: 1px solid var(--ags-border-2) !important;
  border-radius: 14px !important;
  padding: 14px 16px !important;
  margin: 12px 14px !important;
  box-shadow: var(--ags-shadow-2) !important;
}

html body #zone-main .zone-objective-identity strong,
html body #zone-main .zone-next-move strong {
  color: var(--ags-ink-1) !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  letter-spacing: -0.01em !important;
}

html body #zone-main .zone-objective-identity > bdi {
  font-weight: 700 !important;
  color: var(--ags-gold) !important;
  font-size: 13.5px !important;
}

html body #zone-main .zone-objective-progress,
html body #zone-main .zone-record-track {
  height: 7px !important;
  border-radius: 999px !important;
  overflow: hidden;
  border: 0 !important;
  background: var(--track) !important;
}

html body #zone-main .zone-objective-progress > span,
html body #zone-main .zone-record-track > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #10b981 0%, #34d399 65%, #eab308 100%) !important;
}

html body #zone-main .zone-home-mission {
  background-color: transparent !important;
  padding: 12px 16px !important;
  border-bottom: 1px solid var(--ags-divider) !important;
  transition: background-color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

html body #zone-main .zone-home-mission:last-child {
  border-bottom: 0 !important;
}

html body #zone-main .zone-home-mission:hover {
  background-color: var(--ags-surface-3) !important;
}

/* Studio Architectural 3D Character Stage (YOUR CHARACTER) */
html:not([data-theme="light"]) body #zone-main .zone-character-stage {
  background: radial-gradient(circle at 50% 36%, #182338 0%, #0d1422 70%, #080c15 100%) !important;
  border-radius: 14px !important;
  margin: 12px 12px 6px !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
  overflow: hidden !important;
}

html[data-theme="light"] body #zone-main .zone-character-stage {
  background: radial-gradient(circle at 50% 36%, #1e293b 0%, #0f172a 72%, #090d16 100%) !important;
  border-radius: 14px !important;
  margin: 12px 12px 6px !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 8px 20px -6px rgba(15, 23, 42, 0.14) !important;
  overflow: hidden !important;
}

html body #zone-main .zone-character-stage span[style*="rgba(10,12,15"] {
  background: rgba(11, 15, 25, 0.84) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 999px !important;
  color: #f8fafc !important;
  font-weight: 600 !important;
}

html body #zone-main .zone-equipped-summary {
  margin: 10px 12px !important;
  padding: 12px 14px !important;
  border-radius: 14px !important;
  background-color: var(--ags-surface-2) !important;
  background-image: none !important;
  border: 1px solid var(--ags-border-2) !important;
  box-shadow: var(--ags-shadow-2) !important;
}

html body #zone-main .zone-loadout-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px !important;
  padding: 2px 12px 14px !important;
  background: transparent !important;
  border: 0 !important;
}

html body #zone-main .zone-loadout-stats > div {
  background-color: var(--ags-surface-2) !important;
  background-image: none !important;
  border: 1px solid var(--ags-border-2) !important;
  border-top: 1px solid var(--ags-border-2) !important;
  border-radius: 12px !important;
  padding: 9px 6px !important;
  text-align: center;
  box-shadow: var(--ags-shadow-2) !important;
}

html body #zone-main .zone-loadout-stats > div > span {
  display: block;
  font-size: 10.5px !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: var(--ags-ink-3) !important;
}

html body #zone-main .zone-loadout-stats > div > bdi {
  display: block;
  margin-top: 3px;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  color: var(--ags-ink-1) !important;
}

html body #zone-main .zone-territory-summary {
  padding: 11px 13px !important;
  border-radius: 14px !important;
  background-color: var(--ags-surface-2) !important;
  background-image: none !important;
  border: 1px solid var(--ags-border-2) !important;
  box-shadow: var(--ags-shadow-2) !important;
}

/* De-box inline turf bar wrapper inside Family Territories */
html body #zone-main .zone-territory-summary + div[style*="border:1px solid"] {
  background-color: var(--ags-surface-3) !important;
  border: 0 !important;
  border-radius: 10px !important;
  padding: 9px 11px !important;
}

html body #zone-main .zone-dossier-card {
  background-color: var(--ags-surface-2) !important;
  background-image: none !important;
  border: 1px solid var(--ags-border-2) !important;
  border-radius: 14px !important;
  box-shadow: var(--ags-shadow-2) !important;
}

/* --------------------------------------------------------------------------
   SYNDICATE ARCADE & CINEMATIC POSTER CARDS (.zig-arcade-deck & .zig-game-card)
   -------------------------------------------------------------------------- */
html body #zone-main .zig-arcade-deck,
html body #zone-main .zig-home-arcade {
  padding: 18px !important;
}

html body #zone-main .zig-arcade-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 15px !important;
  color: var(--ags-ink-1) !important;
}

/* MotionSites Spark Badge Live Pill */
html body #zone-main .zig-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px !important;
  border-radius: 999px !important;
  border: 0 !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  line-height: 1.3;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
}

html:not([data-theme="light"]) body #zone-main .zig-live-pill {
  background-color: rgba(16, 185, 129, 0.16) !important;
  background-image: radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.16), transparent 65%) !important;
  color: #34d399 !important;
}

html[data-theme="light"] body #zone-main .zig-live-pill {
  background-color: rgba(5, 150, 105, 0.12) !important;
  background-image: radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.7), transparent 65%) !important;
  color: #047857 !important;
}

/* Sound Toggle Studio Pill */
html body #zone-main .zig-sound-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  border: 0 !important;
  border-radius: 10px !important;
  padding: 7px 13px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  background-color: var(--ags-pill-bg) !important;
  background-image: none !important;
  color: var(--ags-ink-1) !important;
  box-shadow: none !important;
  transition:
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
    color 180ms cubic-bezier(0.22, 1, 0.36, 1) !important;
}

html body #zone-main .zig-sound-btn svg {
  width: 15px !important;
  height: 15px !important;
  flex-shrink: 0;
}

html body #zone-main .zig-sound-btn:hover {
  transform: translateY(-1px);
  background-color: var(--ags-pill-hover) !important;
}

/* Level-2 Poster Card Shell (Borderless Tonal 14px Card + Liquid Glass Sheen, 60fps Compositing) */
html body #zone-main .zig-game-card {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  background-color: var(--ags-surface-2) !important;
  background-image: var(--ags-specular-sheen) !important;
  border: 1px solid var(--ags-border-2) !important;
  color: var(--ags-ink-1) !important;
  box-shadow: var(--ags-shadow-2) !important;
  contain: layout style;
  transition:
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
    color 180ms cubic-bezier(0.22, 1, 0.36, 1) !important;
}

html body #zone-main .zig-game-card::before,
html body #zone-main .zig-game-card::after {
  content: none !important;
  display: none !important;
}

html body #zone-main .zig-game-card:hover {
  transform: translateY(-3px) !important;
  background-color: var(--ags-surface-2-hover) !important;
}

/* 16:10 Photorealistic UE5 Key-Art Media Stage + Transparent Shader Canvas */
html body #zone-main .zig-card-media {
  position: relative !important;
  aspect-ratio: 16 / 10 !important;
  width: 100% !important;
  overflow: hidden !important;
  background: #080c14 !important;
  flex-shrink: 0;
}

html body #zone-main .zig-card-art {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  transform: scale(1.001);
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1) !important;
}

html body #zone-main .zig-game-card:hover .zig-card-art {
  transform: scale(1.055) !important;
}

/* Override noir-game-hud.css:276-281,625 opaque #06090f 98px canvas rule */
html body #zone-main .zig-game-card canvas.zig-card-shader,
html body #zone-main .zig-card-media > canvas {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: transparent !important;
  pointer-events: none !important;
  z-index: 2 !important;
  display: block !important;
}

/* Soft bottom gradient blending poster art into tonal card body */
html body #zone-main .zig-card-media::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 46%;
  background: linear-gradient(180deg, rgba(18, 24, 38, 0) 0%, rgba(18, 24, 38, 0.82) 100%);
  pointer-events: none;
  z-index: 2;
}

html[data-theme="light"] body #zone-main .zig-card-media::after {
  height: 32%;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 0.36) 100%);
}

/* Crisp High-Contrast Studio Pill Badge Over Poster Art (Zero backdrop-filter lag!) */
html body #zone-main .zig-card-badge {
  position: absolute !important;
  top: 10px !important;
  inset-inline-start: 10px !important;
  z-index: 3 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  background: rgba(11, 15, 25, 0.86) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #f8fafc !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  padding: 4px 10px !important;
  border-radius: 999px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.38);
}

html body #zone-main .zig-game-card-body {
  padding: 13px 14px 14px !important;
  gap: 6px !important;
  position: relative;
  z-index: 3;
}

html body #zone-main .zig-game-card-kicker {
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-weight: 600 !important;
}

/* Borderless Studio Pill CTA inside .zig-game-card (Kills hollow 1px green box-in-box!) */
html body #zone-main .zig-game-card-cta {
  margin-top: auto !important;
  padding: 9px 14px !important;
  border: 0 !important;
  border-radius: 10px !important;
  display: inline-flex !important;
  width: 100% !important;
  box-sizing: border-box !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: -0.005em !important;
  text-transform: none !important;
  box-shadow: none !important;
  transition:
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
    color 180ms cubic-bezier(0.22, 1, 0.36, 1) !important;
}

html:not([data-theme="light"]) body #zone-main .zig-game-card-cta {
  background-color: rgba(255, 255, 255, 0.065) !important;
  background-image: none !important;
  color: #f1f5f9 !important;
}

html[data-theme="light"] body #zone-main .zig-game-card-cta {
  background-color: rgba(15, 23, 42, 0.055) !important;
  background-image: none !important;
  color: #0f172a !important;
}

html body #zone-main .zig-game-card:hover .zig-game-card-cta {
  background-color: #10b981 !important;
  background-image: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 20px -4px rgba(16, 185, 129, 0.42) !important;
}

html body #zone-main .zig-game-card-cta svg {
  width: 14px !important;
  height: 14px !important;
  flex-shrink: 0;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

html body #zone-main .zig-game-card:hover .zig-game-card-cta svg {
  transform: translateX(2px);
}

html body #zone-main .zig-btn {
  background-color: #10b981 !important;
  background-image: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  border: 0 !important;
  border-radius: 10px !important;
  padding: 7px 14px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  box-shadow: 0 6px 16px -4px rgba(16, 185, 129, 0.35) !important;
}

html body #zone-main .zig-btn-secondary {
  background-color: var(--ags-pill-bg) !important;
  background-image: none !important;
  color: var(--ags-ink-1) !important;
  border: 0 !important;
  border-radius: 10px !important;
  padding: 7px 13px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

html body #zone-main .zig-btn-secondary:hover {
  background-color: var(--ags-pill-hover) !important;
}

/* --------------------------------------------------------------------------
   4. SCREEN-SPECIFIC MOTIONSITES TONAL IMMERSION
   -------------------------------------------------------------------------- */

/* --- 4A. CRIMES: Tonal Category Pills, Clean Heist Dossier & Tonal Crime Cards --- */
html body #zone-main .zone-crime-activity-nav {
  gap: 8px !important;
  padding-bottom: 12px !important;
}

html body #zone-main .zone-crime-activity-nav button {
  border-radius: 14px !important;
  border: 1px solid var(--ags-border-2) !important;
  background-color: var(--ags-surface-2) !important;
  background-image: none !important;
  color: var(--ags-ink-2) !important;
  font-weight: 600 !important;
  box-shadow: var(--ags-shadow-2) !important;
  transition:
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
    color 180ms cubic-bezier(0.22, 1, 0.36, 1) !important;
}

html body #zone-main .zone-crime-activity-nav button:hover {
  transform: translateY(-1px);
  background-color: var(--ags-surface-2-hover) !important;
  color: var(--ags-ink-1) !important;
}

html:not([data-theme="light"]) body #zone-main .zone-crime-activity-nav button[aria-pressed="true"] {
  background-color: #172033 !important;
  background-image: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(23, 32, 51, 0.96) 100%) !important;
  border-color: rgba(16, 185, 129, 0.36) !important;
  color: #ffffff !important;
}

html[data-theme="light"] body #zone-main .zone-crime-activity-nav button[aria-pressed="true"] {
  background-color: #ecfdf5 !important;
  background-image: none !important;
  border-color: rgba(5, 150, 105, 0.3) !important;
  color: #065f46 !important;
}

html body #zone-main .zone-crime-operation {
  gap: 16px !important;
}

html body #zone-main .zone-crime-neighborhood {
  padding: 18px 20px !important;
}

html body #zone-main .zone-crime-resources {
  margin: 12px 0 0 !important;
  max-width: 100% !important;
  border-radius: 14px !important;
  background: transparent !important;
  border: 0 !important;
  gap: 8px !important;
}

html body #zone-main .zone-crime-resources > span {
  background-color: var(--ags-surface-2) !important;
  background-image: none !important;
  border: 1px solid var(--ags-border-2) !important;
  border-radius: 12px !important;
  padding: 10px 12px !important;
  box-shadow: var(--ags-shadow-2) !important;
}

html body #zone-main .zone-crime-plan {
  margin-block-start: 0 !important;
  border: 1px solid var(--ags-border-1) !important;
  position: relative;
  padding: 18px 20px !important;
}

/* Kill rotated top-right pseudo tape artifact from district-compositions108.css:22 */
html body #zone-main .zone-crime-plan::before,
html body #zone-main .zone-crime-plan::after {
  content: none !important;
  display: none !important;
}

html body #zone-main .zone-crime-plan dl {
  gap: 8px !important;
}

html body #zone-main .zone-crime-plan dl > div {
  background-color: var(--ags-surface-2) !important;
  background-image: none !important;
  border: 1px solid var(--ags-border-2) !important;
  border-radius: 12px !important;
  padding: 9px 12px !important;
}

html body #zone-main .zone-crime-readiness {
  border: 0 !important;
  border-inline-start: 0 !important;
  border-radius: 10px !important;
  background-color: var(--ags-surface-3) !important;
  padding: 10px 12px !important;
}

html body #zone-main .zone-crime-opportunities {
  margin-top: 14px !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 14px 14px !important;
}

html body #zone-main .zone-crime-opportunities > .zone-panel-heading {
  margin: 0 -14px 4px !important;
  padding: 14px 18px 12px !important;
}

html body #zone-main .zone-crime-choice {
  background-color: var(--ags-surface-2) !important;
  background-image: none !important;
  border: 1px solid var(--ags-border-2) !important;
  border-inline-start: 1px solid var(--ags-border-2) !important;
  border-radius: 14px !important;
  padding: 13px 16px !important;
  color: var(--ags-ink-1) !important;
  box-shadow: var(--ags-shadow-2) !important;
  transition:
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
    color 180ms cubic-bezier(0.22, 1, 0.36, 1) !important;
}

html body #zone-main .zone-crime-choice:hover {
  transform: translateY(-1px);
  background-color: var(--ags-surface-2-hover) !important;
}

html:not([data-theme="light"]) body #zone-main .zone-crime-choice[aria-pressed="true"] {
  background-color: #172033 !important;
  background-image: linear-gradient(90deg, rgba(16, 185, 129, 0.16) 0%, rgba(23, 32, 51, 0.96) 100%) !important;
  border-color: rgba(16, 185, 129, 0.38) !important;
}

html[data-theme="light"] body #zone-main .zone-crime-choice[aria-pressed="true"] {
  background-color: #ecfdf5 !important;
  background-image: none !important;
  border-color: rgba(5, 150, 105, 0.32) !important;
}

html body #zone-main .zone-crime-choice > span:first-child > strong {
  font-size: 13.5px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
  color: var(--ags-ink-1) !important;
}

html body #zone-main .zone-crime-choice > span:last-child > bdi:first-child {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--ags-gold-soft);
  border: 0;
  color: var(--ags-gold) !important;
  font-weight: 700 !important;
}

/* --- 4B. GYM: Clean Non-Colliding Grid, Level-2 Tonal Stat Cards & Train CTA --- */
@media (min-width: 901px) {
  html body #zone-main[data-zone-screen="gym"] .zone-gym-workspace {
    grid-template-columns: minmax(0, 1fr) 320px !important;
    gap: 16px !important;
    padding: 18px !important;
    align-items: start !important;
  }

  html body #zone-main[data-zone-screen="gym"] .zone-gym-floor {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  html body #zone-main[data-zone-screen="gym"] .zone-gym-floor-scene {
    min-height: 290px !important;
    border-radius: 14px !important;
  }

  html body #zone-main[data-zone-screen="gym"] .zone-gym-floor-scene header {
    max-width: 72% !important;
  }

  html body #zone-main[data-zone-screen="gym"] .zone-gym-floor-readout {
    max-width: 100% !important;
    margin: 12px 0 0 !important;
    border-radius: 14px !important;
  }

  html body #zone-main[data-zone-screen="gym"] .zone-gym-session {
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: stretch !important;
    margin: 0 !important;
  }

  html body #zone-main[data-zone-screen="gym"] .zone-gym-stations {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    margin-block-start: 2px !important;
    gap: 12px !important;
    border: 0 !important;
  }
}

/* Keep Gym Floor Scene Header light in BOTH themes because it sits over dark gym photo scrim */
html body #zone-main[data-zone-screen="gym"] .zone-gym-floor-scene .zone-overline {
  color: #facc15 !important;
}

html body #zone-main[data-zone-screen="gym"] .zone-gym-floor-scene h2 {
  color: #f8fafc !important;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9) !important;
}

html body #zone-main[data-zone-screen="gym"] .zone-gym-floor-scene p {
  color: #e2e8f0 !important;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85) !important;
}

html body #zone-main[data-zone-screen="gym"] .zone-gym-floor-readout {
  background-color: var(--ags-surface-2) !important;
  background-image: none !important;
  border: 1px solid var(--ags-border-2) !important;
  box-shadow: var(--ags-shadow-2) !important;
}

html body #zone-main[data-zone-screen="gym"] .zone-gym-station {
  border-radius: 14px !important;
  border: 1px solid var(--ags-border-2) !important;
  background-color: var(--ags-surface-2) !important;
  background-image: none !important;
  color: var(--ags-ink-1) !important;
  box-shadow: var(--ags-shadow-2) !important;
  transition:
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
    color 180ms cubic-bezier(0.22, 1, 0.36, 1) !important;
}

html body #zone-main[data-zone-screen="gym"] .zone-gym-station:hover {
  transform: translateY(-2px);
  background-color: var(--ags-surface-2-hover) !important;
}

html:not([data-theme="light"]) body #zone-main[data-zone-screen="gym"] .zone-gym-station[aria-pressed="true"] {
  background-color: #172033 !important;
  background-image: linear-gradient(180deg, rgba(16, 185, 129, 0.16) 0%, rgba(23, 32, 51, 0.98) 100%) !important;
  border-color: rgba(16, 185, 129, 0.38) !important;
}

html[data-theme="light"] body #zone-main[data-zone-screen="gym"] .zone-gym-station[aria-pressed="true"] {
  background-color: #ecfdf5 !important;
  background-image: none !important;
  border-color: rgba(5, 150, 105, 0.34) !important;
}

html body #zone-main[data-zone-screen="gym"] .zone-gym-station bdi {
  font-weight: 800 !important;
  font-size: 16px !important;
  color: var(--ags-ink-1) !important;
}

html body #zone-main[data-zone-screen="gym"] .zone-gym-session,
html body #zone-main .zone-gym-session {
  background-color: var(--ags-surface-2) !important;
  background-image: none !important;
  border: 1px solid var(--ags-border-2) !important;
  border-radius: 14px !important;
  box-shadow: var(--ags-shadow-2) !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

html body #zone-main .zig-gym-wrap,
html body #zone-main .zig-heist-wrap {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

html body #zone-main .zig-gym-wrap canvas,
html body #zone-main .zig-heist-wrap canvas {
  max-width: 100% !important;
  box-sizing: border-box !important;
  display: block !important;
}

html body #zone-main[data-zone-screen="gym"] .zone-gym-session-metrics {
  gap: 8px !important;
}

html body #zone-main[data-zone-screen="gym"] .zone-gym-session-metrics > div {
  background-color: var(--ags-surface-3) !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 10px !important;
  padding: 9px 11px !important;
}

html body #zone-main[data-zone-screen="gym"] button.zone-gym-train {
  min-height: 46px !important;
  border-radius: 12px !important;
  clip-path: none !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  letter-spacing: -0.005em !important;
  text-transform: none !important;
}

html body #zone-main .zone-membership-row {
  background-color: transparent !important;
  border-bottom: 1px solid var(--ags-divider) !important;
  transition: background-color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

html body #zone-main .zone-membership-row[data-zone-current="true"] {
  background-color: var(--ags-surface-3) !important;
}

html body #zone-main .zone-membership-row:hover {
  background-color: var(--ags-surface-3-hover) !important;
}

/* --- 4C. ITEMS & LOADOUT: Tonal Gear Pedestal Slots & Studio Tabs --- */
html body #zone-main .zone-loadout-slots > div {
  background-color: var(--ags-surface-2) !important;
  background-image: none !important;
  border: 1px solid var(--ags-border-2) !important;
  border-inline-start: 1px solid var(--ags-border-2) !important;
  border-radius: 14px !important;
  padding: 12px 14px !important;
  box-shadow: var(--ags-shadow-2) !important;
}

html body #zone-main [data-ztabs] {
  gap: 6px !important;
  padding-bottom: 8px !important;
}

html body #zone-main [data-ztabs] button {
  border-radius: 10px !important;
  padding: 8px 14px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  border: 0 !important;
  background-color: var(--ags-pill-bg) !important;
  background-image: none !important;
  color: var(--ags-ink-2) !important;
  transition:
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
    color 180ms cubic-bezier(0.22, 1, 0.36, 1) !important;
}

html body #zone-main [data-ztabs] button:hover {
  background-color: var(--ags-pill-hover) !important;
  color: var(--ags-ink-1) !important;
}

html body #zone-main [data-ztabs] button[style*="activebg"] {
  background-color: #10b981 !important;
  background-image: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 16px -4px rgba(16, 185, 129, 0.35) !important;
}

html body #zone-main [data-ztabs] button[style*="activebg"] bdi {
  color: rgba(255, 255, 255, 0.88) !important;
}

html body #zone-main .zone-inventory-search {
  background-color: var(--ags-surface-1) !important;
  border: 1px solid var(--ags-border-1) !important;
  border-radius: 16px !important;
  box-shadow: var(--ags-shadow-1) !important;
}

html body #zone-main .zone-inventory-row {
  padding: 12px 16px !important;
  border-bottom: 1px solid var(--ags-divider) !important;
  background-color: transparent !important;
  transition: background-color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

html body #zone-main .zone-inventory-row:last-child {
  border-bottom: 0 !important;
}

html body #zone-main .zone-inventory-row:hover {
  background-color: var(--ags-surface-3) !important;
}

/* Weapon / Gear Showcase Pedestal Slot */
html body #zone-main .zone-item-thumbnail {
  width: 84px;
  min-height: 54px;
  border-radius: 12px !important;
  display: grid !important;
  place-items: center !important;
  flex: 0 0 84px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--ags-border-2) !important;
}

html:not([data-theme="light"]) body #zone-main .zone-item-thumbnail {
  background: radial-gradient(circle at 50% 54%, rgba(16, 185, 129, 0.16) 0%, #121826 74%) !important;
}

html[data-theme="light"] body #zone-main .zone-item-thumbnail {
  background: radial-gradient(circle at 50% 54%, rgba(5, 150, 105, 0.1) 0%, #f8fafc 76%) !important;
}

html body #zone-main .zone-item-thumbnail img {
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

html body #zone-main .zone-inventory-row:hover .zone-item-thumbnail img {
  transform: scale(1.05);
}

html body #zone-main .zone-viewer-badge,
html body #zone-main .zone-street-count {
  padding: 3px 9px !important;
  border-radius: 999px !important;
  border: 0 !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  text-transform: none !important;
  background: var(--ags-emerald-soft) !important;
  color: var(--ags-emerald) !important;
}

/* --- 4D. CLEAN STUDIO TABLES & DOSSIER STRIPS (Attack, Market, Jail, Hospital, HOF, Missions, Faction) --- */
html body #zone-main .zone-table-heading {
  font-size: 11.5px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
  text-transform: none !important;
  padding: 12px 16px !important;
  background: transparent !important;
  color: var(--ags-ink-3) !important;
  border-bottom: 1px solid var(--ags-divider) !important;
}

html body #zone-main .zone-table-row,
html body #zone-main .zone-mission-row,
html body #zone-main .zone-competition-rank:not(.zone-table-heading) {
  background-color: transparent !important;
  background-image: none !important;
  padding-block: 11px !important;
  padding-inline: 16px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ags-divider) !important;
  transition: background-color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

html body #zone-main .zone-table-row:hover,
html body #zone-main .zone-mission-row:hover,
html body #zone-main .zone-competition-rank:not(.zone-table-heading):hover {
  background-color: var(--ags-surface-3) !important;
}

/* Hall of Fame Subtle Podium Highlights */
html body #zone-main[data-zone-screen="hof"] [data-zscroll] > .zone-table-row:nth-of-type(2) {
  background-color: rgba(234, 179, 8, 0.06) !important;
}
html body #zone-main[data-zone-screen="hof"] [data-zscroll] > .zone-table-row:nth-of-type(3) {
  background-color: rgba(148, 163, 184, 0.05) !important;
}
html body #zone-main[data-zone-screen="hof"] [data-zscroll] > .zone-table-row:nth-of-type(4) {
  background-color: rgba(217, 119, 66, 0.05) !important;
}

/* Attack Combat HUD, Turn Dock, Market Listings & Faction Operations */
html body #zone-main .zone-combat-hud,
html body #zone-main .zone-combat-turn-dock,
html body #zone-main .zone-market-listing,
html body #zone-main .zone-operation,
html body #zone-main .zone-operation-definitions > article,
html body #zone-main .zone-shared-upgrades > div {
  background-color: var(--ags-surface-2) !important;
  background-image: none !important;
  border: 1px solid var(--ags-border-2) !important;
  border-radius: 14px !important;
  box-shadow: var(--ags-shadow-2) !important;
}

html body #zone-main .zone-market-form {
  background-color: var(--ags-surface-2) !important;
  border: 1px solid var(--ags-border-2) !important;
  border-radius: 14px !important;
}

/* --- 4E. BANK: MotionSites Tonal Vault Summary & Actions --- */
html body #zone-main[data-zone-screen="bank"] .zone-bank-summary {
  background-color: var(--ags-surface-1) !important;
  background-image: none !important;
  border: 1px solid var(--ags-border-1) !important;
  border-radius: 18px !important;
  box-shadow: var(--ags-shadow-1) !important;
  padding: 14px !important;
  gap: 12px !important;
}

html body #zone-main[data-zone-screen="bank"] .zone-bank-summary > .zone-panel {
  background-color: var(--ags-surface-2) !important;
  background-image: none !important;
  border: 1px solid var(--ags-border-2) !important;
  border-inline-start: 1px solid var(--ags-border-2) !important;
  border-radius: 14px !important;
  box-shadow: var(--ags-shadow-2) !important;
  padding: 16px 18px !important;
}

html body #zone-main[data-zone-screen="bank"] .zone-bank-actions {
  background-color: var(--ags-surface-1) !important;
  background-image: none !important;
  border: 1px solid var(--ags-border-1) !important;
  border-radius: 18px !important;
  padding: 20px 22px !important;
  box-shadow: var(--ags-shadow-1) !important;
}

/* --- 4F. JOBS, EDUCATION, PROPERTIES, CITY DIRECTORY & WORLD FLIGHT CARDS --- */
html body #zone-main .zone-employment-row,
html body #zone-main .zone-course-row {
  background-color: transparent !important;
  border-bottom: 1px solid var(--ags-divider) !important;
  transition: background-color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

html body #zone-main .zone-employment-row:hover,
html body #zone-main .zone-course-row:hover {
  background-color: var(--ags-surface-3) !important;
}

html body #zone-main .zone-employment-row[data-zone-current="true"],
html body #zone-main .zone-course-row[data-zone-current="true"] {
  background-color: var(--ags-surface-3) !important;
}

html body #zone-main[data-zone-screen="properties"] .zone-property-dossiers {
  gap: 12px !important;
  border-top: 0 !important;
}

html body #zone-main[data-zone-screen="properties"] .zone-property-dossier {
  background-color: var(--ags-surface-2) !important;
  background-image: none !important;
  border: 1px solid var(--ags-border-2) !important;
  border-radius: 14px !important;
  box-shadow: var(--ags-shadow-2) !important;
  overflow: hidden;
  transition:
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

html body #zone-main[data-zone-screen="properties"] .zone-property-dossier:hover {
  transform: translateY(-2px);
  background-color: var(--ags-surface-2-hover) !important;
}

/* City 3D Map Shell Bezel Containment & Family Claim Tonal Badge */
html body #zone-main .zone-city-map-shell {
  margin-top: 0 !important;
  padding: 5px !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  background-color: var(--ags-surface-1) !important;
  border: 1px solid var(--ags-border-1) !important;
  box-shadow: var(--ags-shadow-1) !important;
}

html body #zone-main .zone-city-map-shell > iframe,
html body #zone-main #zone-city-map {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  border-radius: 13px !important;
}

html body #zone-main#zone-main button.familyStat,
html body #zone-main#zone-main .familyRail .claimMetric {
  min-height: 32px !important;
  padding: 4px 10px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(234, 179, 8, 0.22) !important;
  background-color: rgba(234, 179, 8, 0.1) !important;
  background-image: none !important;
}

/* Global Syndicate Flight Network Bar & Level-2 World City Cards */
html body #zone-main #zig-world-flight-bar,
html body #zone-main .zig-world-flight-bar {
  padding: 16px 18px !important;
  gap: 12px !important;
}

html body #zone-main .zig-world-flight-title {
  font-size: 14px !important;
  color: var(--ags-ink-1) !important;
}

html body #zone-main .zig-world-flight-title svg,
html body #zone-main .zig-world-flight-meta svg,
html body #zone-main .zig-city-chip svg,
html body #zone-main .zig-flight-card svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  vertical-align: -2px;
}

html body #zone-main .zig-world-cities-row {
  gap: 9px !important;
}

html body #zone-main .zig-city-chip,
html body #zone-main .zig-flight-card {
  padding: 10px 12px !important;
  border-radius: 14px !important;
  border: 1px solid var(--ags-border-2) !important;
  background-color: var(--ags-surface-2) !important;
  background-image: var(--ags-specular-sheen) !important;
  color: var(--ags-ink-1) !important;
  box-shadow: var(--ags-shadow-2) !important;
  transition:
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
    color 180ms cubic-bezier(0.22, 1, 0.36, 1) !important;
}

html body #zone-main .zig-city-chip:hover,
html body #zone-main .zig-flight-card:hover {
  transform: translateY(-2px);
  background-color: var(--ags-surface-2-hover) !important;
}

html:not([data-theme="light"]) body #zone-main :is(.zig-city-chip, .zig-flight-card).is-active {
  background-color: #172033 !important;
  background-image: linear-gradient(180deg, rgba(16, 185, 129, 0.18) 0%, rgba(23, 32, 51, 0.96) 100%) !important;
  border-color: rgba(16, 185, 129, 0.38) !important;
}

html[data-theme="light"] body #zone-main :is(.zig-city-chip, .zig-flight-card).is-active {
  background-color: #ecfdf5 !important;
  background-image: none !important;
  border-color: rgba(5, 150, 105, 0.34) !important;
}

html body #zone-main :is(.zig-city-chip, .zig-flight-card).is-locked {
  border-style: solid !important;
  opacity: 0.62 !important;
}

/* City Directory Search & Level-2 Tonal Destination Cards */
html body #zone-main .zone-city-search {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ags-divider) !important;
  border-radius: 0 !important;
  padding: 10px 14px 12px !important;
  color: var(--ags-ink-1) !important;
}

html body #zone-main .zone-city-destinations {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  padding: 12px !important;
}

html body #zone-main .zone-city-destinations button {
  border-radius: 14px !important;
  border: 1px solid var(--ags-border-2) !important;
  border-inline-start: 1px solid var(--ags-border-2) !important;
  padding: 10px 12px !important;
  background-color: var(--ags-surface-2) !important;
  background-image: var(--ags-specular-sheen) !important;
  color: var(--ags-ink-1) !important;
  font-weight: 600 !important;
  box-shadow: var(--ags-shadow-2) !important;
  transition:
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
    color 180ms cubic-bezier(0.22, 1, 0.36, 1) !important;
}

html body #zone-main .zone-city-destinations button:hover {
  transform: translateY(-1px);
  padding-inline-start: 12px !important;
  background-color: var(--ags-surface-2-hover) !important;
}

html body #zone-main .zone-bulletin-entry,
html body #zone-main .zone-stock-entry {
  padding: 10px 16px !important;
  border-bottom: 1px solid var(--ags-divider) !important;
}

/* --- 4G. CASINO: High-Low Pedestal & Coherent Felt Contrast --- */
html body #zone-main .zone-playing-card-stage {
  padding: 16px 24px;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 35%, #1c6b45 0%, #0d3924 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 14px 30px -8px rgba(0, 0, 0, 0.45);
}

html body #zone-main .zone-guide-copy dl > div {
  background-color: var(--ags-surface-2);
  border: 1px solid var(--ags-border-2);
  border-radius: 12px;
  padding: 8px 11px;
}

/* --- 4H. RECESSED STUDIO INPUTS, SELECTS, TEXTAREAS & MODALS INSIDE #zone-main --- */
html body #zone-main input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html body #zone-main select,
html body #zone-main textarea {
  border-radius: 10px !important;
  font-weight: 500;
  transition:
    background-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
    color 180ms cubic-bezier(0.22, 1, 0.36, 1) !important;
}

html:not([data-theme="light"]) body #zone-main input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html:not([data-theme="light"]) body #zone-main select,
html:not([data-theme="light"]) body #zone-main textarea {
  background-color: #121826 !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  color: #f8fafc !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35) !important;
}

html:not([data-theme="light"]) body #zone-main input::placeholder,
html:not([data-theme="light"]) body #zone-main textarea::placeholder {
  color: #64748b !important;
}

html[data-theme="light"] body #zone-main input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html[data-theme="light"] body #zone-main select,
html[data-theme="light"] body #zone-main textarea {
  background-color: #f8fafc !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  color: #0f172a !important;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

html[data-theme="light"] body #zone-main input::placeholder,
html[data-theme="light"] body #zone-main textarea::placeholder {
  color: #64748b !important;
}

html body #zone-main input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
html body #zone-main select:focus,
html body #zone-main textarea:focus {
  outline: none !important;
  border-color: var(--ags-emerald) !important;
  box-shadow: 0 0 0 3px var(--ags-emerald-soft) !important;
}

html body #zone-main .zone-modal-card {
  background-color: var(--ags-surface-1) !important;
  background-image: none !important;
  border: 1px solid var(--ags-border-2) !important;
  border-radius: 18px !important;
  box-shadow: var(--ags-shadow-1) !important;
}

/* --------------------------------------------------------------------------
   5. 100% DAY MODE ALABASTER CONTRAST, MOBILE DOCK & ARABIC RTL EXCELLENCE
   -------------------------------------------------------------------------- */
html[data-theme="light"] body #zone-main [data-zone-syndicate-hub="1"],
html[data-theme="light"] body #zone-main [data-zone-casino-pit="1"],
html[data-theme="light"] body #zone-main [data-torn-company-specials="1"],
html[data-theme="light"] body #zone-main [data-torn-bazaar-shield="1"],
html[data-theme="light"] body #zone-main [data-torn-edu-matrix="1"],
html[data-theme="light"] body #zone-main [data-torn-island-staff="1"],
html[data-theme="light"] body #zone-main [data-torn-jail-tools="1"],
html[data-theme="light"] body #zone-main [data-torn-bank-cds="1"],
html[data-theme="light"] body #zone-main [data-torn-hospital-blood="1"],
html[data-theme="light"] body #zone-main [data-torn-casino-games="1"],
html[data-theme="light"] body #zone-main [data-torn-honors-medals="1"] {
  background-color: #ffffff !important;
  background-image: none !important;
  border: 1px solid rgba(15, 23, 42, 0.055) !important;
  color: #0f172a !important;
}

html[data-theme="light"] body #zone-main [data-syndicate-panel],
html[data-theme="light"] body #zone-main [data-torn-company-specials="1"] div[style*="rgba(8,11,16"],
html[data-theme="light"] body #zone-main [data-torn-edu-matrix="1"] div[style*="rgba(8,11,16"],
html[data-theme="light"] body #zone-main [data-torn-island-staff="1"] div[style*="rgba(8,11,16"],
html[data-theme="light"] body #zone-main [data-torn-bank-cds="1"] div[style*="rgba(8,11,16"],
html[data-theme="light"] body #zone-main [data-torn-casino-games="1"] div[style*="rgba(8,11,16"] {
  background-color: #f8fafc !important;
  border: 1px solid rgba(15, 23, 42, 0.06) !important;
  color: #0f172a !important;
}

html[data-theme="light"] body #zone-main [data-syndicate-panel="bounties"] > div:first-child > strong {
  color: #b91c1c !important;
}

html[data-theme="light"] body #zone-main [data-syndicate-panel="chat"] > div:first-child > strong {
  color: #059669 !important;
}

/* Override noir-game-hud.css:1048 Day Mode attack row heavy border */
html[data-theme="light"] body #zone-main[data-zone-screen="attack"] [data-zrow="1"] {
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.055) !important;
  color: #0f172a !important;
}

/* Coherent Casino Felt Contrast in Day Mode */
html[data-theme="light"] body #zone-main [data-casino-table] > div:first-child > strong {
  color: #fef3c7 !important;
}

html[data-theme="light"] body #zone-main [data-casino-table] > div:first-child > span,
html[data-theme="light"] body #zone-main [data-bj-status="1"],
html[data-theme="light"] body #zone-main [data-roulette-status="1"],
html[data-theme="light"] body #zone-main [data-slots-status="1"],
html[data-theme="light"] body #zone-main [data-casino-table="blackjack"] > div:nth-of-type(2) > div {
  color: #ecfdf5 !important;
}

html[data-theme="light"] body #zone-main [data-casino-table="roulette"] > div:nth-of-type(2) {
  background: rgba(6, 26, 17, 0.68) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
}

html[data-theme="light"] body #zone-main [data-casino-table="roulette"] > div:nth-of-type(2) > div > div:first-child {
  color: #d1fae5 !important;
}

html[data-theme="light"] body #zone-main [data-slots-reel="1"] {
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%) !important;
  border: 1px solid rgba(234, 179, 8, 0.45) !important;
  box-shadow: inset 0 1px 0 #ffffff, 0 4px 10px rgba(0, 0, 0, 0.22) !important;
}

html[data-theme="light"] body #zone-main [data-slots-reel="1"] small {
  color: #0f172a !important;
}

html[data-theme="light"] body #zone-main [data-casino-table="slots"] > div:nth-of-type(2) small {
  color: #fef3c7 !important;
}

/* Lockdown / Hospitalized / Jailed Alert Banner legibility */
html body #zone-main > div[style*="#3a2626"] {
  border-radius: 14px !important;
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
}

html[data-theme="light"] body #zone-main > div[style*="#3a2626"] {
  background: #fef2f2 !important;
  border: 1px solid rgba(239, 68, 68, 0.28) !important;
}

html[data-theme="light"] body #zone-main > div[style*="#3a2626"] strong {
  color: #991b1b !important;
}

html[data-theme="light"] body #zone-main > div[style*="#3a2626"] span {
  color: #1e293b !important;
}

html[data-theme="light"] body #zone-main > div[style*="#3a2626"] bdi {
  color: #b91c1c !important;
}

/* ==========================================================================
   5. v128 MOBILE RIGHT-PANE GAME VIEWPORT OVERHAUL (<= 900px & <= 640px)
      Designed for 290px - 350px #zone-main width alongside 66px Left Menu Rail
   ========================================================================== */
@media (max-width: 900px) {
  html body #zone-main {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    width: auto !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
    gap: 8px !important;
    padding-bottom: 16px !important;
  }

  /* Universal zero-overflow containment across all child grids, cards, tables & iframes */
  html body #zone-main > *,
  html body #zone-main .zone-panel,
  html body #zone-main .zone-content-split,
  html body #zone-main .zone-auto-grid,
  html body #zone-main section,
  html body #zone-main article,
  html body #zone-main details,
  html body #zone-main form,
  html body #zone-main dl,
  html body #zone-main iframe,
  html body #zone-main canvas {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Hide legacy bottom tabbar since persistent left menu rail owns navigation */
  html body #zone-main .zone-mobile-tabbar {
    display: none !important;
  }

  /* Collapse multi-column desktop splits cleanly inside narrow right-pane #zone-main */
  html body #zone-main .zone-content-split,
  html body #zone-main .zone-home-grid,
  html body #zone-main .zone-items-grid,
  html body #zone-main .zone-dossier-grid,
  html body #zone-main .zone-property-dossiers {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  /* Compact Hero Stage & Base of Operations */
  html body #zone-main .zone-page-heading {
    min-height: 76px !important;
    padding: 12px 14px !important;
    border-radius: 14px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 4px 8px !important;
    align-items: center !important;
  }

  html body #zone-main .zone-page-heading h1 {
    font-size: 19px !important;
    line-height: 1.15 !important;
  }

  html body #zone-main .zone-page-heading > span {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    font-size: 11.5px !important;
    line-height: 1.35 !important;
  }

  html body #zone-main#zone-main .zone-page-heading > div button {
    min-height: 30px !important;
    padding: 5px 10px !important;
    font-size: 11px !important;
  }

  html body #zone-main .zone-home-brief {
    border-radius: 14px !important;
    padding: 0 !important;
    font-size: 12px !important;
  }

  html body #zone-main .zone-home-brief .zone-hideout-scene {
    min-height: 48px !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
  }

  html body #zone-main .zone-hideout-scene > div {
    gap: 4px 8px !important;
    align-items: center !important;
    padding: 2px 0 !important;
  }

  html body #zone-main .zone-hideout-scene strong {
    font-size: 14px !important;
  }

  html body #zone-main .zone-hideout-scene span:not(.zone-overline) {
    font-size: 10.5px !important;
  }

  html body #zone-main .zone-panel,
  html body #zone-main div:has(> .zone-panel-heading + .zone-panel):not(#zone-tutorial-panel),
  html body #zone-main .zig-arcade-deck,
  html body #zone-main .zig-home-arcade,
  html body #zone-main #zig-world-flight-bar,
  html body #zone-main .zig-world-flight-bar,
  html body #zone-main .zone-city-directory {
    border-radius: 14px !important;
  }

  html body #zone-main .zone-panel-heading,
  html body #zone-main .zone-dossier-card-head {
    padding: 10px 12px 9px !important;
    font-size: 13px !important;
  }

  /* Home Quick-Deploy 2x2 Tight Grid (34x34 Frosted Icon Squircles) */
  html body #zone-main#zone-main .zone-quick-actions,
  html body #zone-main#zone-main .zone-quick-actions.zone-auto-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  html body #zone-main#zone-main .zone-quick-actions > button {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    min-height: 54px !important;
    padding: 10px !important;
    border-radius: 12px !important;
  }

  html body #zone-main#zone-main .zone-quick-actions > button .zone-nav-icon {
    width: 34px !important;
    height: 34px !important;
    flex: 0 0 34px !important;
    border-radius: 10px !important;
  }

  html body #zone-main#zone-main .zone-quick-actions > button .zone-nav-icon svg:last-child {
    width: 19px !important;
    height: 19px !important;
  }

  html body #zone-main#zone-main .zone-quick-actions > button > span:last-child {
    min-width: 0 !important;
    flex: 1 1 0% !important;
  }

  html body #zone-main#zone-main .zone-quick-actions > button > span:last-child > span:first-child {
    font-size: 12px !important;
    line-height: 1.2 !important;
    display: block !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  html body #zone-main#zone-main .zone-quick-actions > button bdi {
    font-size: 10px !important;
    line-height: 1.2 !important;
    display: block !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Compact Character 3D Stage & Loadout Stats on Mobile */
  html body #zone-main#zone-main .zone-character-stage {
    height: 220px !important;
    min-height: 220px !important;
    margin: 8px 10px 4px !important;
    border-radius: 12px !important;
  }

  html body #zone-main#zone-main #zone-char-3d {
    height: 220px !important;
    width: 100% !important;
  }

  html body #zone-main .zone-equipped-summary {
    margin: 6px 10px !important;
    padding: 9px 11px !important;
  }

  html body #zone-main .zone-loadout-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    padding: 2px 10px 10px !important;
  }

  html body #zone-main .zone-daily-objective,
  html body #zone-main .zone-next-move,
  html body #zone-main .zone-login-reward {
    margin: 8px 10px !important;
    padding: 11px 12px !important;
  }

  /* Syndicate Arcade Deck Compact Header & Tablet 2x2 Grid */
  html body #zone-main .zig-arcade-deck,
  html body #zone-main .zig-home-arcade {
    padding: 10px 11px !important;
  }

  html body #zone-main .zig-arcade-header {
    gap: 8px !important;
    margin-bottom: 8px !important;
    flex-wrap: wrap !important;
  }

  html body #zone-main .zig-arcade-emblem {
    width: 32px !important;
    height: 32px !important;
    flex: 0 0 32px !important;
    border-radius: 9px !important;
  }

  html body #zone-main .zig-arcade-title {
    font-size: 13.5px !important;
  }

  html body #zone-main .zig-arcade-sub {
    font-size: 11px !important;
    line-height: 1.3 !important;
  }

  html body #zone-main .zig-sound-btn {
    padding: 5px 9px !important;
    font-size: 10.5px !important;
  }

  html body #zone-main .zig-arcade-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  html body #zone-main .zig-getaway-bar {
    flex-wrap: wrap !important;
    gap: 6px !important;
    padding: 8px 10px !important;
  }

  html body #zone-main .zig-stage-controls {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    width: 100% !important;
  }

  /* CITY SCREEN: Horizontal-Scroll World Flights + Tall Playable 3D Map + Stacked Directory */
  html body #zone-main #zig-world-flight-bar,
  html body #zone-main .zig-world-flight-bar {
    padding: 10px 12px !important;
    gap: 8px !important;
  }

  html body #zone-main .zig-world-flight-top {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
  }

  html body #zone-main .zig-world-cities-row {
    display: grid !important;
    grid-template-columns: none !important;
    grid-auto-flow: column !important;
    grid-auto-columns: minmax(132px, 148px) !important;
    overflow-x: auto !important;
    overscroll-behavior-x: contain !important;
    scrollbar-width: none !important;
    gap: 8px !important;
    padding-bottom: 2px !important;
  }

  html body #zone-main .zig-world-cities-row::-webkit-scrollbar {
    display: none !important;
  }

  html body #zone-main .zone-city-workspace {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  html body #zone-main .zone-city-map-shell:not(.zone-city-map-expanded) {
    aspect-ratio: auto !important;
    height: min(58dvh, 430px) !important;
    min-height: 340px !important;
    border-radius: 14px !important;
    padding: 4px !important;
  }

  html body #zone-main .zone-city-map-shell:not(.zone-city-map-expanded) > iframe,
  html body #zone-main #zone-city-map {
    border-radius: 10px !important;
  }

  html body #zone-main .zone-city-directory {
    height: auto !important;
    max-height: 320px !important;
    padding: 10px !important;
  }

  html body #zone-main .zone-city-destinations {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    padding: 8px 4px 4px !important;
    overflow-y: auto !important;
    max-height: 230px !important;
  }

  html body #zone-main .zone-city-destinations button {
    min-height: 52px !important;
    padding: 8px 9px !important;
    border-radius: 12px !important;
  }

  html body #zone-main .zone-city-destinations button :is(.zone-nav-icon, .zone-city-place-icon) {
    width: 30px !important;
    height: 30px !important;
    flex: 0 0 30px !important;
    border-radius: 8px !important;
  }

  /* ATTACK SCREEN: Stacked Kit, 220px Combat Frame, Graceful VS Bar & 2x2 Stat Opponent Cards */
  html body #zone-main .zone-loadout {
    padding: 10px 12px !important;
  }

  html body #zone-main .zone-loadout header {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  html body #zone-main .zone-loadout-slots {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  html body #zone-main .zone-loadout-slots > div {
    padding: 9px 11px !important;
    border-radius: 12px !important;
  }

  html body #zone-main #zone-combat-frame,
  html body #zone-main .zone-combat-host {
    width: 100% !important;
    max-width: 100% !important;
    height: 220px !important;
    min-height: 220px !important;
    max-height: 220px !important;
    border-radius: 12px !important;
    display: block !important;
    overflow: hidden !important;
  }

  html body #zone-main .zig-brawl-banner {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 6px 8px !important;
    padding: 8px 10px !important;
    border-radius: 12px !important;
    margin-bottom: 6px !important;
  }

  html body #zone-main .zig-brawl-side {
    min-width: 0 !important;
  }

  html body #zone-main .zig-brawl-side > div:first-child {
    gap: 4px !important;
    font-size: 10.5px !important;
  }

  html body #zone-main .zig-brawl-side > div:first-child > span {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  html body #zone-main .zig-brawl-banner > div:nth-child(2) {
    max-width: 78px !important;
    min-width: 0 !important;
  }

  html body #zone-main .zig-brawl-vs {
    font-size: 13px !important;
    padding: 0 2px !important;
  }

  html body #zone-main .zig-brawl-banner > div:nth-child(2) > div:last-child {
    font-size: 8.5px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  html body #zone-main [data-torn-hitbox-loadout="1"] {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  /* Responsive Card Tables (Attack, Market, Jail, Hospital, HOF) across full <= 900px range */
  html body #zone-main:is([data-zone-screen="attack"], [data-zone-screen="market"], [data-zone-screen="jail"], [data-zone-screen="hospital"], [data-zone-screen="hof"]) [data-zscroll] {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  html body #zone-main:is([data-zone-screen="attack"], [data-zone-screen="market"], [data-zone-screen="jail"], [data-zone-screen="hospital"], [data-zone-screen="hof"]) .zone-table-heading {
    display: none !important;
  }

  html body #zone-main:is([data-zone-screen="attack"], [data-zone-screen="market"], [data-zone-screen="jail"], [data-zone-screen="hospital"], [data-zone-screen="hof"]) .zone-table-row {
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    padding: 11px 12px !important;
    margin: 0 0 8px !important;
    border: 1px solid var(--ags-border-2) !important;
    border-radius: 14px !important;
    background-color: var(--ags-surface-2) !important;
    background-image: var(--ags-specular-sheen) !important;
    box-shadow: var(--ags-shadow-2) !important;
  }

  html body #zone-main:is([data-zone-screen="attack"], [data-zone-screen="market"], [data-zone-screen="jail"], [data-zone-screen="hospital"], [data-zone-screen="hof"]) .zone-table-row > :first-child {
    grid-column: 1 / -1 !important;
  }

  html body #zone-main [data-label]::before {
    content: attr(data-label);
    display: block;
    color: var(--ags-ink-3);
    font-size: 9.5px;
    font-weight: 600;
    line-height: 1.3;
  }

  /* Attack Opponent Cards: Name header + [Level | Odds] + 2x2 Stat Pills + Full-Width Attack CTA */
  html body #zone-main#zone-main[data-zone-screen="attack"] .zone-table-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    margin: 0 0 8px !important;
  }

  html body #zone-main#zone-main[data-zone-screen="attack"] .zone-table-row > div:first-child {
    grid-column: 1 / -1 !important;
    padding-bottom: 5px !important;
    border-bottom: 1px solid var(--ags-divider) !important;
  }

  html body #zone-main#zone-main[data-zone-screen="attack"] .zone-table-row > bdi {
    background-color: var(--ags-surface-3) !important;
    padding: 5px 8px !important;
    border-radius: 8px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
  }

  html body #zone-main#zone-main[data-zone-screen="attack"] .zone-table-row > span:nth-last-child(2) {
    grid-column: 2 !important;
    grid-row: 2 !important;
    align-self: stretch !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: var(--ags-surface-3) !important;
    padding: 5px 8px !important;
    border-radius: 8px !important;
    font-size: 11.5px !important;
  }

  html body #zone-main#zone-main[data-zone-screen="attack"] .zone-table-row > button:last-child {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-height: 38px !important;
    margin-top: 2px !important;
  }

  /* GYM SCREEN: 2x2 Station Selector, 2x2 Session Metrics, Compact Canvas + Train CTA Together */
  html body #zone-main#zone-main[data-zone-screen="gym"] .zone-gym-workspace {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    padding: 10px !important;
  }

  html body #zone-main#zone-main[data-zone-screen="gym"] .zone-gym-floor {
    order: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  html body #zone-main#zone-main[data-zone-screen="gym"] .zone-gym-floor-scene {
    min-height: 108px !important;
    aspect-ratio: auto !important;
    padding: 12px 14px !important;
    border-radius: 12px !important;
    clip-path: none !important;
  }

  html body #zone-main#zone-main[data-zone-screen="gym"] .zone-gym-floor-scene header {
    max-width: 100% !important;
  }

  html body #zone-main#zone-main[data-zone-screen="gym"] .zone-gym-floor-scene h2 {
    font-size: 20px !important;
    margin-block: 3px !important;
  }

  html body #zone-main#zone-main[data-zone-screen="gym"] .zone-gym-floor-readout {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 9px 11px !important;
    border-radius: 12px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 6px !important;
  }

  html body #zone-main#zone-main[data-zone-screen="gym"] .zone-gym-stations {
    order: 1 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }

  html body #zone-main#zone-main[data-zone-screen="gym"] .zone-gym-station {
    min-height: 58px !important;
    padding: 9px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
  }

  html body #zone-main#zone-main[data-zone-screen="gym"] .zone-gym-station-art {
    width: 32px !important;
    height: 36px !important;
    flex: 0 0 32px !important;
    border-radius: 8px !important;
  }

  html body #zone-main#zone-main[data-zone-screen="gym"] .zone-gym-station bdi {
    font-size: 13px !important;
  }

  html body #zone-main#zone-main[data-zone-screen="gym"] .zone-gym-session {
    order: 2 !important;
    margin: 0 !important;
    padding: 11px !important;
    gap: 7px !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
  }

  html body #zone-main#zone-main[data-zone-screen="gym"] .zone-gym-session-identity h3 {
    font-size: 17px !important;
    margin: 0 !important;
  }

  html body #zone-main#zone-main[data-zone-screen="gym"] .zone-gym-session-benefit {
    margin: 0 !important;
    font-size: 11.5px !important;
    line-height: 1.35 !important;
  }

  html body #zone-main#zone-main[data-zone-screen="gym"] .zone-gym-session-metrics {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    margin: 0 !important;
  }

  html body #zone-main#zone-main[data-zone-screen="gym"] .zone-gym-session-metrics > div {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important;
    padding: 7px 9px !important;
  }

  html body #zone-main#zone-main[data-zone-screen="gym"] .zone-gym-session-metrics dd {
    text-align: start !important;
    max-width: 100% !important;
    font-size: 12px !important;
  }

  html body #zone-main#zone-main[data-zone-screen="gym"] .zig-gym-wrap canvas,
  html body #zone-main#zone-main[data-zone-screen="gym"] #zig-gym-canvas {
    max-height: 136px !important;
  }

  html body #zone-main#zone-main[data-zone-screen="gym"] button.zone-gym-train {
    min-height: 42px !important;
    width: 100% !important;
    margin: 0 !important;
  }

  /* CRIMES SCREEN: Horizontal-Scroll Category Pills, Compact Vault Canvas & Clean Opportunity Rows */
  html body #zone-main .zone-crime-activity-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overscroll-behavior-x: contain !important;
    scrollbar-width: none !important;
    gap: 7px !important;
    padding: 2px 2px 8px !important;
  }

  html body #zone-main .zone-crime-activity-nav::-webkit-scrollbar {
    display: none !important;
  }

  html body #zone-main .zone-crime-activity-nav button {
    flex: 0 0 auto !important;
    min-height: 44px !important;
    padding: 7px 11px !important;
    border-radius: 12px !important;
  }

  html body #zone-main .zone-crime-operation {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    padding-top: 4px !important;
  }

  html body #zone-main .zone-crime-neighborhood {
    padding: 12px !important;
    margin: 0 !important;
  }

  html body #zone-main .zone-crime-neighborhood h2 {
    font-size: 19px !important;
    text-transform: none !important;
  }

  html body #zone-main .zone-crime-scene {
    min-height: 156px !important;
    aspect-ratio: auto !important;
    padding: 8px !important;
    border-radius: 12px !important;
    clip-path: none !important;
  }

  html body #zone-main .zig-heist-wrap canvas,
  html body #zone-main #zig-heist-canvas {
    max-height: 148px !important;
  }

  html body #zone-main .zone-crime-resources {
    margin: 8px 0 0 !important;
    max-width: 100% !important;
    padding: 8px 10px !important;
    border-radius: 10px !important;
    gap: 10px !important;
  }

  html body #zone-main .zone-crime-plan {
    margin: 0 !important;
    padding: 12px !important;
    border-radius: 14px !important;
  }

  html body #zone-main .zone-crime-plan dl {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    margin: 8px 0 !important;
  }

  html body #zone-main .zone-crime-plan dl > div {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important;
    padding: 6px 8px !important;
    border-radius: 8px !important;
    background-color: var(--ags-surface-3) !important;
    border: 0 !important;
  }

  html body #zone-main .zone-crime-plan dd {
    text-align: start !important;
  }

  /* ITEMS, BANK, JOBS, EDUCATION & PROPERTIES Mobile Right-Pane Fit */
  html body #zone-main [data-ztabs] {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    gap: 6px !important;
  }

  html body #zone-main [data-ztabs]::-webkit-scrollbar {
    display: none !important;
  }

  html body #zone-main [data-ztabs] button {
    flex: 0 0 auto !important;
  }

  html body #zone-main .zone-inventory-search {
    grid-template-columns: minmax(0, 1fr) auto !important;
    padding: 10px 12px !important;
    gap: 8px !important;
  }

  html body #zone-main .zone-inventory-search label,
  html body #zone-main .zone-inventory-search input {
    grid-column: 1 / -1 !important;
  }

  html body #zone-main .zone-item-stage {
    height: 200px !important;
    min-height: 180px !important;
  }

  html body #zone-main#zone-main[data-zone-screen="bank"] .zone-bank-summary {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    padding: 10px !important;
    gap: 8px !important;
  }

  html body #zone-main#zone-main[data-zone-screen="bank"] .zone-bank-summary > .zone-panel {
    grid-column: 1 !important;
    grid-row: auto !important;
    padding: 12px 14px !important;
  }

  html body #zone-main#zone-main[data-zone-screen="bank"] .zone-bank-actions {
    padding: 12px 14px !important;
    margin: 0 !important;
  }
}

/* Compact Phone Portrait Width (<= 640px): Horizontal Arcade Stack & Single-Column Cards */
@media (max-width: 640px) {
  html body #zone-main .zig-arcade-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  html body #zone-main#zone-main .zig-game-card {
    display: grid !important;
    grid-template-columns: 104px minmax(0, 1fr) !important;
    align-items: center !important;
    border-radius: 12px !important;
    min-height: 92px !important;
  }

  html body #zone-main#zone-main .zig-card-media {
    width: 104px !important;
    height: 92px !important;
    min-height: 92px !important;
    max-height: 92px !important;
    aspect-ratio: auto !important;
  }

  html body #zone-main#zone-main .zig-card-badge {
    top: 5px !important;
    inset-inline-start: 5px !important;
    padding: 2px 6px !important;
    font-size: 8px !important;
  }

  html body #zone-main#zone-main .zig-game-card-body {
    padding: 7px 10px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 3px !important;
    min-width: 0 !important;
  }

  html body #zone-main#zone-main .zig-game-card-name {
    font-size: 12.5px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  html body #zone-main#zone-main .zig-game-card-desc {
    font-size: 10.5px !important;
    line-height: 1.25 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 1 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  html body #zone-main#zone-main .zig-game-card-cta {
    margin-top: 3px !important;
    padding: 5px 10px !important;
    font-size: 10.5px !important;
    min-height: 26px !important;
    width: auto !important;
    align-self: flex-start !important;
  }

  html body #zone-main .zone-city-destinations {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html body #zone-main .zone-city-legend {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px 10px !important;
    padding: 10px 12px !important;
  }

  html.zaaa-rail-open body #zone-main#zone-main .zone-quick-actions,
  html.zaaa-rail-open body #zone-main#zone-main .zone-quick-actions.zone-auto-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html body #zone-main .zone-crime-choice {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
    padding: 10px 12px !important;
  }

  html body #zone-main .zone-crime-choice > span:last-child {
    text-align: start !important;
  }

  html body #zone-main .zone-employment-row,
  html body #zone-main .zone-course-row,
  html body #zone-main .zone-membership-row,
  html body #zone-main[data-zone-screen="properties"] .zone-current-property,
  html body #zone-main[data-zone-screen="properties"] .zone-property-dossier {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
    padding: 12px !important;
  }

  html body #zone-main[data-zone-screen="properties"] .zone-current-property .zone-property-art-panel,
  html body #zone-main[data-zone-screen="properties"] .zone-property-dossier .zone-property-art-panel {
    min-height: 120px !important;
    max-height: 140px !important;
    aspect-ratio: 16 / 9 !important;
  }
}

/* Reduced Motion Respect (60fps Accessibility & Low-Power Mode) */
@media (prefers-reduced-motion: reduce) {
  html body #zone-main *,
  html body #zone-main *::before,
  html body #zone-main *::after {
    transition-duration: 0.01ms !important;
  }

  html body #zone-main .zig-game-card:hover,
  html body #zone-main .zone-quick-actions > button:hover,
  html body #zone-main .zone-quick-actions > button:hover .zone-nav-icon,
  html body #zone-main .zone-city-destinations button:hover :is(.zone-nav-icon, .zone-city-place-icon) {
    transform: none !important;
  }
}

/* 100% Arabic RTL Zero Letter-Spacing & Directional Scrim Mirroring */
html[dir="rtl"] body #zone-main#zone-main,
html[dir="rtl"] body #zone-main#zone-main *,
html[dir="rtl"] body #zone-main#zone-main *::before,
html[dir="rtl"] body #zone-main#zone-main *::after,
html[dir="rtl"] body #zone-main#zone-main button,
html[lang="ar"] body #zone-main#zone-main,
html[lang="ar"] body #zone-main#zone-main *,
html[lang="ar"] body #zone-main#zone-main *::before,
html[lang="ar"] body #zone-main#zone-main *::after,
html[lang="ar"] body #zone-main#zone-main button {
  letter-spacing: 0px !important;
}

html[dir="rtl"]:not([data-theme="light"]) body #zone-main .zone-page-heading {
  background-image:
    linear-gradient(
      264deg,
      rgba(11, 15, 25, 0.96) 0%,
      rgba(11, 15, 25, 0.88) 38%,
      rgba(11, 15, 25, 0.46) 70%,
      rgba(11, 15, 25, 0.24) 100%
    ),
    var(--screen-art) !important;
}

html[dir="rtl"][data-theme="light"] body #zone-main .zone-page-heading {
  background-image:
    linear-gradient(
      264deg,
      rgba(255, 255, 255, 0.98) 0%,
      rgba(248, 250, 252, 0.94) 42%,
      rgba(241, 245, 249, 0.68) 74%,
      rgba(241, 245, 249, 0.48) 100%
    ),
    var(--screen-art) !important;
}

html[dir="rtl"]:not([data-theme="light"]) body #zone-main .zone-home-brief .zone-hideout-scene {
  background-image:
    linear-gradient(268deg, rgba(11, 15, 25, 0.9) 0%, rgba(17, 24, 39, 0.74) 48%, rgba(11, 15, 25, 0.34) 100%),
    url('/assets/ui/motion-art/hero-syndicate-turf.webp') !important;
}

html[dir="rtl"][data-theme="light"] body #zone-main .zone-home-brief .zone-hideout-scene {
  background-image:
    linear-gradient(268deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 250, 252, 0.92) 52%, rgba(241, 245, 249, 0.78) 100%),
    url('/assets/ui/motion-art/hero-syndicate-turf.webp') !important;
}

html[dir="rtl"] body #zone-main .zig-game-card:hover .zig-game-card-cta svg {
  transform: translateX(-2px) scaleX(-1);
}

html[dir="rtl"] body #zone-main .zig-game-card-cta svg {
  transform: scaleX(-1);
}
