/* GTA VI Explorer — Exact gta.mics.dev .sheet, .tabs, .float, .ltable & .chip Styles */

.sx-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 0 0 14px;
}
.sx-search-wrap {
  position: relative; flex: 1 1 280px; display: flex; align-items: center;
}
.sx-search-wrap svg {
  position: absolute; left: 13px; width: 16px; height: 16px; color: var(--muted); pointer-events: none;
}
.sx-search {
  width: 100%; height: 40px; padding: 0 68px 0 38px;
  border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--surface-1); color: var(--text);
  font: 500 14px/1 Manrope, sans-serif; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.sx-search:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-bg); }
.sx-count {
  position: absolute; right: 10px;
  font: 600 11px/1 'JetBrains Mono', monospace;
  padding: 4px 8px; border-radius: 999px;
  background: var(--surface-3); color: var(--lilac);
}
.sx-select, .sx-chip-btn {
  height: 40px; padding: 0 13px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--surface-1); color: var(--muted);
  font: 600 13px/1 Manrope, sans-serif; cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.sx-select { color: var(--text); }
.sx-select:hover, .sx-chip-btn:hover { color: var(--text); border-color: var(--line-3); background: var(--surface-2); }
.sx-chip-btn.on { border-color: var(--accent-line); background: var(--accent-bg); color: var(--white); }

.sx-tags {
  display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto;
  margin: 0 0 18px; padding-bottom: 2px; scrollbar-width: none;
}
.sx-chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 30px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 999px;
  background: none; color: var(--muted); font: 500 13px Manrope, sans-serif;
  white-space: nowrap; cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.sx-chip:hover { color: var(--text); border-color: var(--line-3); }
.sx-chip.on { background: var(--accent-bg); border-color: var(--accent-line); color: var(--white); }
.sx-chip small { font: 600 11px/1 'JetBrains Mono', monospace; color: var(--dim); }
.sx-chip.on small { color: var(--lilac); }

.sx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
  gap: 14px;
}
.sx-card {
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: flex; flex-direction: column;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.sx-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-line);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .42);
}
.sx-thumb {
  position: relative; aspect-ratio: 4 / 3;
  background: radial-gradient(120% 90% at 50% 20%, var(--surface-3), var(--surface-1));
  display: grid; place-items: center; padding: 12px; overflow: hidden;
}
.sx-checker .sx-thumb, .sx-stage.sx-checker {
  background-color: #14111e;
  background-image:
    linear-gradient(45deg, #1d182b 25%, transparent 25%),
    linear-gradient(-45deg, #1d182b 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #1d182b 75%),
    linear-gradient(-45deg, transparent 75%, #1d182b 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}
.sx-thumb img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .5));
  transition: transform .18s ease;
}
.sx-card:hover .sx-thumb img { transform: scale(1.05); }

.sx-3d-badge {
  position: absolute; top: 8px; right: 8px;
  font: 700 10px/1 'JetBrains Mono', monospace;
  padding: 4px 7px; border-radius: 6px;
  background: var(--accent-bg-strong); border: 1px solid var(--accent-line); color: var(--lilac-2);
}
.sx-card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.sx-name {
  font: 600 12.5px/1.3 'JetBrains Mono', monospace; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sx-meta {
  display: flex; justify-content: space-between; align-items: center;
  font: 500 11px/1 Manrope, sans-serif; color: var(--dim);
}

.sx-more { text-align: center; margin: 26px 0 8px; }
.sx-more button {
  padding: 10px 22px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--surface-2); color: var(--text);
  font: 600 13.5px/1 Manrope, sans-serif; cursor: pointer;
}
.sx-more button:hover { border-color: var(--accent-line); background: var(--accent-bg); color: var(--white); }

/* Audio cards */
.sx-audio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 12px; }
.sx-audio-card {
  background: var(--surface-1); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 15px; display: flex; flex-direction: column; gap: 8px;
}
.sx-audio-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sx-audio-card audio { width: 100%; height: 34px; filter: invert(0.92) hue-rotate(180deg); }

/* ── gta.mics.dev .modal + .sheet (exact structure & proportions) ── */
.sx-modal {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; padding: 24px;
  background: rgba(5, 5, 8, .72); backdrop-filter: blur(8px);
}
.sx-modal[hidden] { display: none; }

.sx-sheet {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1440px, 100%);
  height: min(900px, 100%);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: var(--surface-2);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .68);
  overflow: hidden;
}

.sx-sheet-head {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 12px; min-width: 0;
  padding: 14px 20px; border-bottom: 1px solid var(--line);
}
.sx-sheet-head h2 {
  margin: 0; font: 600 18px/1.2 'JetBrains Mono', monospace; color: var(--white);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sx-sheet-head .sx-origin {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--dim); font: 500 12.5px/1 'JetBrains Mono', monospace;
}

/* ‹ 3 of 24,677 › stepper before close button */
.sx-step {
  flex: none; display: flex; align-items: center; gap: 2px; margin-left: auto;
}
.sx-step button {
  display: grid; place-items: center; width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer;
  transition: background .15s, color .15s;
}
.sx-step button:hover:not(:disabled) { background: rgba(255,255,255,.08); color: var(--white); }
.sx-step button:disabled { opacity: .32; cursor: default; }
.sx-step span {
  min-width: 78px; color: var(--dim); font: 500 12.5px/1 Manrope, sans-serif;
  font-variant-numeric: tabular-nums; text-align: center;
}
.sx-close {
  flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px;
  margin-left: 6px; border: 0; border-radius: 10px; background: none;
  color: var(--muted); font-size: 18px; cursor: pointer;
  transition: background .15s, color .15s;
}
.sx-close:hover { background: rgba(255,255,255,.08); color: var(--white); }

/* Left 380px .facts rail */
.sx-facts {
  overflow-y: auto; padding: 16px 20px 20px;
  border-right: 1px solid var(--line);
  background: var(--surface-1);
  display: flex; flex-direction: column; gap: 14px;
}
.sx-dpic {
  aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; display: grid; place-items: center; padding: 10px;
  background: radial-gradient(120% 90% at 50% 20%, var(--surface-3), var(--surface-1));
}
.sx-dpic img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(0,0,0,.45)); }

.sx-ltable { display: grid; gap: 3px; }
.sx-ltable > div {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 8px 11px; border-radius: 8px; background: var(--sunken);
}
.sx-ltable span.k { font: 500 12px/1 Manrope, sans-serif; color: var(--dim); flex: none; }
.sx-ltable code {
  min-width: 0; font: 500 12px/1.2 'JetBrains Mono', monospace; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right;
}
.sx-cp {
  flex: none; padding: 3px 7px; border-radius: 6px; border: 1px solid var(--line-2);
  background: var(--surface-3); color: var(--lilac); font: 600 11px/1 Manrope, sans-serif; cursor: pointer;
}
.sx-cp:hover { border-color: var(--accent-line); color: var(--white); }

/* Vehicle stat bars (gta.mics.dev/vehicles style) */
.sx-vstats { display: grid; gap: 7px; padding: 10px 12px; border-radius: 10px; background: var(--sunken); border: 1px solid var(--line); }
.sx-vstats-head { display: flex; justify-content: space-between; align-items: baseline; font: 700 11.5px/1 Manrope, sans-serif; text-transform: uppercase; letter-spacing: .06em; color: var(--lilac); margin-bottom: 2px; }
.sx-sbar { display: grid; gap: 4px; }
.sx-sbar-top { display: flex; justify-content: space-between; font: 500 11.5px/1 Manrope, sans-serif; color: var(--muted); }
.sx-sbar-top b { font: 600 11.5px/1 'JetBrains Mono', monospace; color: var(--text); }
.sx-sbar-track { height: 6px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; }
.sx-sbar-fill { height: 100%; border-radius: 999px; background: var(--grad); }

/* World placements (gta.mics.dev/objects .oplaces style) */
.sx-places { display: grid; gap: 3px; }
.sx-places-title { font: 700 11px/1 Manrope, sans-serif; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); margin: 2px 0 4px; display: flex; justify-content: space-between; }
.sx-place-row {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 7px 10px; border: 1px solid transparent; border-radius: 8px;
  background: var(--sunken); color: var(--text); text-align: left; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.sx-place-row:hover { border-color: var(--accent-line); background: var(--accent-bg); }
.sx-place-row code { font: 500 11.5px/1 'JetBrains Mono', monospace; color: var(--lilac-2); }
.sx-place-row span { font: 500 11px/1 'JetBrains Mono', monospace; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 48%; }

/* Radio stations & track table */
.sx-station-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 10px; margin-bottom: 22px; }
.sx-station-card {
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface-1); display: flex; flex-direction: column; gap: 4px;
}
.sx-station-card b { font: 700 13.5px/1.2 Outfit, sans-serif; color: var(--white); }
.sx-station-card code { font: 500 11px/1 'JetBrains Mono', monospace; color: var(--lilac); }
.sx-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-1); }
.sx-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.sx-table th, .sx-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.sx-table th { background: var(--surface-2); color: var(--dim); font: 700 11px/1 Manrope, sans-serif; text-transform: uppercase; letter-spacing: .05em; }
.sx-table td code { font: 500 12px/1 'JetBrains Mono', monospace; color: var(--text); }

/* Interactive Leonida Official Maps + 2D World Coordinate Map */
.sx-imap-shell {
  position: relative; width: 100%; height: 640px; border-radius: 14px;
  border: 1px solid var(--line-2); background: #070b14; overflow: hidden; margin-bottom: 14px;
  user-select: none; touch-action: none;
}
.sx-imap-shell:fullscreen { height: 100vh; border-radius: 0; border: 0; }
.sx-imap-stage {
  position: absolute; inset: 0; cursor: grab; overflow: hidden;
}
.sx-imap-stage:active { cursor: grabbing; }
.sx-imap-img {
  position: absolute; top: 0; left: 0; transform-origin: 0 0;
  max-width: none; max-height: none; pointer-events: none;
  image-rendering: auto; will-change: transform;
}
.sx-imap-thumbs {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 10px; margin-bottom: 28px;
}
.sx-imap-thumb {
  display: flex; flex-direction: column; overflow: hidden; padding: 0;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface-1);
  color: var(--text); text-align: left; cursor: pointer;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.sx-imap-thumb:hover { transform: translateY(-2px); border-color: var(--line-3); }
.sx-imap-thumb.on { border-color: var(--accent-line); box-shadow: 0 0 0 2px var(--accent-bg); }
.sx-imap-thumb img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; background: #070b14; }
.sx-imap-thumb span { padding: 8px 10px; font: 600 12px/1.3 Manrope, sans-serif; color: var(--text); }
.sx-imap-thumb.on span { color: var(--white); }

.sx-map-shell {
  position: relative; width: 100%; height: 600px; border-radius: 14px;
  border: 1px solid var(--line-2); background: #070b14; overflow: hidden; margin-bottom: 24px;
}
.sx-map-shell canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.sx-map-shell canvas:active { cursor: grabbing; }
.sx-map-hud {
  position: absolute; top: 12px; left: 12px; right: 12px; z-index: 2;
  width: fit-content; max-width: calc(100% - 24px);
  padding: 8px 12px; border-radius: 10px; background: rgba(10, 10, 15, .82);
  border: 1px solid var(--line-2); backdrop-filter: blur(8px);
  font: 500 12px/1.4 'JetBrains Mono', monospace; color: var(--text); pointer-events: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sx-scenes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.sx-scene-card {
  padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-1);
  display: flex; flex-direction: column; gap: 8px; cursor: pointer;
  transition: transform .15s, border-color .15s;
}
.sx-scene-card:hover { transform: translateY(-2px); border-color: var(--accent-line); }
.sx-scene-card.sx-scene-feat {
  border-color: var(--accent-line);
  background: linear-gradient(145deg, rgba(168, 85, 247, .12), var(--surface-1));
}
.sx-scene-card h3 { margin: 0; font: 700 14.5px/1.2 'JetBrains Mono', monospace; color: var(--white); }
.sx-scene-card .sx-sm { font: 500 12px/1.4 Manrope, sans-serif; color: var(--muted); }

/* Home page tile previews */
.tile-pic .sx-tile-img {
  width: 100%; height: 100%; object-fit: contain; padding: 10px;
  background: radial-gradient(120% 90% at 50% 25%, var(--surface-3), var(--surface-1));
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .5));
  transition: transform .2s ease;
}
.tile-pic .sx-tile-img.cover { object-fit: cover; padding: 0; filter: none; }
.tile:hover .tile-pic .sx-tile-img { transform: scale(1.05); }

/* TV & Movies Bink 2 Visual Gallery + Video Player Modal */
.sx-vgrid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 14px;
}
.sx-vcard {
  background: var(--surface-1); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; display: flex; flex-direction: column; cursor: pointer;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.sx-vcard:hover { transform: translateY(-2px); border-color: var(--accent-line); box-shadow: 0 12px 28px rgba(0, 0, 0, .42); }
.sx-vthumb {
  position: relative; aspect-ratio: 16 / 9; background: #070b14; overflow: hidden;
  display: grid; place-items: center;
}
.sx-vthumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s ease; }
.sx-vcard:hover .sx-vthumb img { transform: scale(1.04); }
.sx-vplay {
  position: absolute; top: 8px; right: 8px;
  font: 700 10.5px/1 'JetBrains Mono', monospace; padding: 4px 8px; border-radius: 6px;
  background: var(--grad); color: var(--white); box-shadow: 0 4px 12px rgba(0, 0, 0, .45);
}
.sx-vdur {
  position: absolute; bottom: 8px; right: 8px;
  font: 600 11px/1 'JetBrains Mono', monospace; padding: 3px 6px; border-radius: 6px;
  background: rgba(10, 10, 15, .82); color: var(--white);
}
.sx-vstage {
  position: relative; flex: 1; min-height: 320px; border: 1px solid var(--line);
  border-radius: 14px; background: #05060b; display: grid; place-items: center; overflow: hidden;
}
.sx-vstage video, .sx-vstage img { max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain; background: #000; }

.sx-swatches { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 0 0; }
.sx-swatch {
  width: 22px; height: 22px; border-radius: 6px; border: 2px solid transparent;
  cursor: pointer; font-size: 10px; font-weight: 800; color: #0a0a0f;
  display: grid; place-items: center; padding: 0;
}
.sx-swatch.on { border-color: #fff; box-shadow: 0 0 0 2px var(--purple); }
.sx-swatches input[type=color] {
  width: 24px; height: 24px; padding: 0; border: 1px solid var(--line-2);
  border-radius: 6px; background: transparent; cursor: pointer;
}

.sx-cta { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 8px; }
.sx-cta a, .sx-cta button {
  display: flex; justify-content: center; align-items: center; gap: 8px;
  height: 38px; padding: 0 14px; border-radius: 10px;
  font: 600 13px/1 Manrope, sans-serif; text-decoration: none; cursor: pointer; border: 0;
}
.sx-btn-pri { background: var(--grad); color: var(--white); }
.sx-btn-pri:hover { filter: brightness(1.08); }
.sx-btn-sec { background: var(--surface-3); color: var(--text); border: 1px solid var(--line-2) !important; }
.sx-btn-sec:hover { border-color: var(--accent-line) !important; color: var(--white); }

/* Right .side with top .tabs (Image | 3D Preview) */
.sx-side {
  display: flex; flex-direction: column; gap: 14px; min-width: 0; min-height: 0;
  padding: 10px 20px 20px;
}
.sx-tabs {
  display: flex; flex-wrap: wrap; align-self: stretch; gap: 4px;
  border-bottom: 1px solid var(--line); margin: 0 -8px; padding: 0 8px;
}
.sx-tabs button {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 7px;
  height: 40px; padding: 0 14px; border: 0; background: none;
  color: var(--dim); font: 600 13.5px/1 Manrope, sans-serif; cursor: pointer;
  transition: color .15s;
}
.sx-tabs button:hover:not(:disabled) { color: var(--text); }
.sx-tabs button:disabled { opacity: .4; cursor: not-allowed; }
.sx-tabs button.on { color: var(--white); }
.sx-tabs button.on::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px;
  height: 2px; border-radius: 2px; background: var(--accent);
}
.sx-tabs .sx-lock {
  font: 600 10.5px/1 Manrope, sans-serif; padding: 2px 6px; border-radius: 999px;
  background: rgba(88, 101, 242, .22); color: #a5b4fc;
}

.sx-stage {
  position: relative; flex: 1; min-height: 280px;
  border: 1px solid var(--line); border-radius: 14px;
  background: radial-gradient(120% 90% at 50% 20%, var(--surface-3), var(--surface-1));
  overflow: hidden;
}
.sx-stage canvas { display: block; width: 100%; height: 100%; }
.sx-stage-img {
  position: absolute; inset: 0; margin: auto; max-width: 84%; max-height: 84%;
  object-fit: contain; filter: drop-shadow(0 18px 34px rgba(0, 0, 0, .58));
}
.sx-loading {
  position: absolute; inset: 0; display: grid; place-items: center;
  font: 600 14px/1 Manrope, sans-serif; color: var(--lilac); pointer-events: none;
}

/* gta.mics.dev .float bottom-left toolbar */
.sx-float {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  display: flex; flex-wrap: wrap; gap: 2px; padding: 4px;
  border-radius: 10px; background: rgba(10, 10, 15, .68);
  backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px var(--line-2);
}
.sx-float button {
  height: 30px; padding: 0 11px; border: 0; border-radius: 7px;
  background: none; color: var(--muted); font: 600 12.5px/1 Manrope, sans-serif;
  cursor: pointer; transition: background .15s, color .15s;
}
.sx-float button:hover { background: rgba(255,255,255,.08); color: var(--text); }
.sx-float button.on { background: var(--accent-bg-strong); color: var(--white); }

/* Discord Login Gate overlay inside 3D tab */
.sx-gate {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 12px; padding: 28px;
  background: rgba(10, 10, 15, .82); backdrop-filter: blur(10px);
}
.sx-gate[hidden] { display: none; }
.sx-gate h3 { margin: 0; font: 700 19px/1.2 Outfit, sans-serif; color: var(--white); }
.sx-gate p { margin: 0; max-width: 360px; font: 500 13.5px/1.5 Manrope, sans-serif; color: var(--muted); }
.sx-gate .sx-gate-btn {
  display: inline-flex; align-items: center; gap: 9px;
  height: 42px; padding: 0 20px; border-radius: 10px; border: 0;
  background: #5865F2; color: #fff; font: 700 14px/1 Manrope, sans-serif;
  cursor: pointer; box-shadow: 0 8px 24px rgba(88, 101, 242, .35);
}
.sx-gate .sx-gate-btn:hover { background: #4752c4; }

@media (max-width: 960px) {
  .sx-modal { padding: 0; place-items: stretch; }
  .sx-sheet { display: flex; flex-direction: column; width: 100%; height: 100%; border: 0; border-radius: 0; overflow-y: auto; }
  .sx-sheet-head { position: sticky; top: 0; z-index: 3; background: rgba(21, 18, 31, .94); backdrop-filter: blur(10px); }
  .sx-side { order: 2; flex: none; padding: 10px 14px 14px; }
  .sx-stage { flex: none; height: 50vh; min-height: 280px; }
  .sx-facts { order: 3; overflow: visible; border-right: 0; border-top: 1px solid var(--line); }
  .sx-step span { display: none; }
}

.sx-toast {
  position: fixed; bottom: 22px; right: 22px; z-index: 300;
  padding: 10px 16px; border-radius: 10px;
  background: var(--grad); color: var(--white);
  font: 700 13px/1 Manrope, sans-serif; box-shadow: 0 10px 28px rgba(0, 0, 0, .45);
}
.sx-toast[hidden] { display: none; }

/* Dialogue explorer (v20261122k) */
.sx-dlg-status { margin: 0 0 12px; color: var(--dim); font-size: 12.5px; }
.sx-dlg-table td { vertical-align: top; line-height: 1.45; }
.sx-dlg-table td:nth-child(3), .sx-dlg-table td:nth-child(4) { min-width: 240px; }
.sx-dlg-key { word-break: break-all; }
.sx-dim { color: var(--dim); }
.sx-dlg-table mark { background: var(--accent-bg); color: var(--white); border-radius: 3px; padding: 0 2px; }
#sxd-mission { max-width: 220px; }

/* v20261122l: voices, mission titles, derived names */
.sx-dlg-play { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-3); background: var(--surface-2); color: var(--text); cursor: pointer; font-size: 11px; line-height: 1; }
.sx-dlg-play:hover { border-color: var(--accent-line); color: var(--white); }
.sx-dlg-play.on { background: var(--accent-bg); border-color: var(--accent-line); color: var(--white); }
.sx-dlg-mis { display: inline-block; margin-bottom: 3px; color: var(--lilac); font-weight: 600; font-size: 12px; }
.sx-dlg-table td:first-child { width: 40px; }
.sx-name.sx-derived { font-style: italic; }

/* /map layers (road network, traffic lights, night lights) */
.sx-map-layers{flex-wrap:wrap;gap:8px;align-items:center;margin-top:-6px}
.sx-map-layers #sxm-lstat{flex:1 1 100%;min-width:0}

/* Preview gate: signed-out visitors after the short audio/video preview */
.sx-pgate { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 16px; background: rgba(5, 5, 9, .62); }
.sx-pgate[hidden] { display: none; }
.sx-pgate .sx-gate { position: relative; inset: auto; width: min(420px, 100%); border-radius: 18px; border: 1px solid rgba(255, 255, 255, .1); padding: 34px 26px 28px; box-shadow: 0 24px 60px rgba(0, 0, 0, .55); }
.sx-pgate .sx-close { position: absolute; top: 12px; right: 12px; }
.sx-gate-ico { width: 52px; height: 52px; border-radius: 14px; background: rgba(88, 101, 242, .18); border: 1px solid rgba(88, 101, 242, .45); display: grid; place-items: center; color: #a5b4fc; }

/* Custom dropdown (replaces the native select list) */
.sx-dd { position: relative; display: inline-flex; flex: 0 0 auto; }
.sx-dd > select.sx-dd-native { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.sx-dd-btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 10px;
  height: 40px; min-width: 150px; max-width: 320px; padding: 0 11px 0 14px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--surface-1); color: var(--text);
  font: 600 13px/1 Manrope, sans-serif; cursor: pointer; transition: color .15s, border-color .15s, background .15s, box-shadow .15s;
}
.sx-dd-btn:hover { border-color: var(--line-3); background: var(--surface-2); }
.sx-dd-btn:focus-visible, .sx-dd.open .sx-dd-btn { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-bg); }
.sx-dd-lbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-dd-btn svg { width: 16px; height: 16px; flex: none; color: var(--muted); transition: transform .15s; }
.sx-dd.open .sx-dd-btn svg { transform: rotate(180deg); color: var(--lilac); }
.sx-dd-pop {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
  min-width: 100%; width: max-content; max-width: min(440px, calc(100vw - 32px));
  padding: 6px; border-radius: 12px; border: 1px solid var(--line-2);
  background: rgb(21 18 31 / .97); backdrop-filter: blur(14px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .55);
}
.sx-dd-pop[hidden] { display: none; }
.sx-dd-pop.up { top: auto; bottom: calc(100% + 6px); }
.sx-dd-pop.right { left: auto; right: 0; }
.sx-dd-search {
  width: 100%; height: 34px; margin: 0 0 6px; padding: 0 10px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--surface-1); color: var(--text);
  font: 500 13px/1 Manrope, sans-serif; outline: none;
}
.sx-dd-search:focus { border-color: var(--accent-line); }
.sx-dd-list { max-height: min(340px, 60vh); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.sx-dd-opt {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 8px;
  color: var(--muted); font: 600 13px/1.3 Manrope, sans-serif; cursor: pointer; white-space: normal;
}
.sx-dd-opt::before { content: ''; width: 14px; flex: none; text-align: center; color: var(--lilac); font-size: 12px; }
.sx-dd-opt[aria-selected="true"] { color: var(--white); }
.sx-dd-opt[aria-selected="true"]::before { content: '✓'; }
.sx-dd-opt.act { background: var(--surface-3); color: var(--text); }
.sx-dd-opt[aria-disabled="true"] { opacity: .45; cursor: default; }
.sx-dd-opt[hidden], .sx-dd-grp[hidden], .sx-dd-empty[hidden] { display: none; }
.sx-dd-grp { padding: 10px 10px 5px; font: 700 10.5px/1 'JetBrains Mono', monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.sx-dd-empty { padding: 12px 10px; color: var(--dim); font: 500 13px/1 Manrope, sans-serif; }
.sx-tags.sx-tags-wrap { flex-wrap: wrap; overflow: visible; }
@media (max-width: 640px) {
  .sx-dd { flex: 1 1 160px; }
  .sx-dd-btn { width: 100%; max-width: none; }
}

/* /map Places layer: one toggle chip per category, coloured dot = map colour */
.sx-poi-cats { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 12px; }
.sx-poi-cats[hidden] { display: none; }
.sx-poi-chip { gap: 7px; }
.sx-poi-chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--poi); box-shadow: 0 0 0 2px rgba(8, 8, 14, .8); opacity: .35; }
.sx-poi-chip.on i { opacity: 1; }

/* vehicle ratings, game test times, compare dock + table */
.sx-desc { margin: 0; font: 500 13px/1.5 Manrope, sans-serif; color: var(--muted); }
.sx-desc[hidden] { display: none; }
.sx-vstats-head .sx-cmp-add.on { color: var(--lilac); border-color: var(--lilac); }
.sx-vtests { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); }
.sx-vtests div { display: flex; justify-content: space-between; gap: 8px; font: 500 11.5px/1.2 Manrope, sans-serif; color: var(--muted); }
.sx-vtests b { font: 600 11.5px/1.2 'JetBrains Mono', monospace; color: var(--text); white-space: nowrap; }
.sx-cmp-dock { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; max-width: calc(100vw - 32px); padding: 8px 10px; border-radius: 14px; background: rgba(14, 14, 22, .96); border: 1px solid var(--line); box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.sx-cmp-dock[hidden], .sx-cmp-pane[hidden] { display: none; }
.sx-cmp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 10px; border-radius: 999px; background: var(--sunken); border: 1px solid var(--line); font: 600 12px/1 Manrope, sans-serif; }
.sx-cmp-chip button { border: 0; background: none; color: var(--dim); cursor: pointer; font-size: 11px; padding: 2px 4px; }
.sx-cmp-dock .sx-cmp-open { padding: 7px 14px; }
.sx-cmp-dock .sx-cmp-open:disabled { opacity: .5; cursor: default; }
.sx-cmp-pane { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(4, 4, 10, .72); }
.sx-cmp-box { width: min(900px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 16px; border-radius: 16px; background: var(--card, #12121c); border: 1px solid var(--line); }
.sx-cmp-box header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.sx-cmp-box h2 { margin: 0; font: 700 18px/1.2 Outfit, sans-serif; }
.sx-cmp-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.sx-cmp-table th, .sx-cmp-table td { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; font: 500 12.5px/1.3 Manrope, sans-serif; vertical-align: middle; }
.sx-cmp-table tbody th { color: var(--muted); width: 130px; }
.sx-cmp-table thead th { vertical-align: bottom; }
.sx-cmp-table thead img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: contain; border-radius: 10px; background: var(--sunken); margin-bottom: 6px; }
.sx-cmp-table thead span { display: block; font: 700 13.5px/1.2 Outfit, sans-serif; }
.sx-cmp-table thead code { font-size: 11px; color: var(--dim); }
.sx-cmp-table td { position: relative; font-family: 'JetBrains Mono', monospace; }
.sx-cmp-table td i { position: absolute; left: 8px; top: 50%; height: 6px; max-width: calc(100% - 52px); transform: translateY(-50%); border-radius: 999px; background: var(--grad); opacity: .85; }
.sx-cmp-table td b { position: relative; float: right; font-weight: 600; }
.sx-cmp-table td.best { color: #86efac; }
.sx-cmp-table td.best b { color: #86efac; }
@media (max-width: 600px) { .sx-cmp-table tbody th { width: 92px; } .sx-cmp-table th, .sx-cmp-table td { padding: 6px 4px; font-size: 11.5px; } }

/* /social */
.sx-soc-tabs { margin-bottom: 14px; }
.sx-soc-tabs small { opacity: .6; font-weight: 500; margin-left: 4px; }
.sx-soc-cloud { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 16px; }
.sx-soc-tag { border: 1px solid var(--line); background: var(--sunken); color: #93c5fd; border-radius: 999px; padding: 5px 10px; font: 600 12px/1 Manrope, sans-serif; cursor: pointer; }
.sx-soc-tag small { color: var(--dim); font-weight: 500; }
.sx-soc-grid { columns: 3 280px; column-gap: 12px; }
.sx-soc-post { break-inside: avoid; margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; background: var(--sunken); border: 1px solid var(--line); }
.sx-soc-post p { margin: 0; font: 500 13.5px/1.5 Manrope, sans-serif; color: var(--text); overflow-wrap: anywhere; }
.sx-soc-post.ad { border-color: rgba(250, 204, 21, .35); }
.sx-soc-spon { display: inline-block; margin-bottom: 6px; font: 700 10.5px/1 Manrope, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: #facc15; }
.sx-soc-img { margin-top: 10px; padding: 10px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px dashed var(--line); font: 500 12.5px/1.45 Manrope, sans-serif; color: var(--muted); overflow-wrap: anywhere; }
.sx-soc-img > span { display: block; margin-bottom: 4px; font: 700 10.5px/1 Manrope, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.sx-soc-tag, .sx-soc-at { cursor: pointer; }
span.sx-soc-tag { border: 0; background: none; padding: 0; font: inherit; color: #93c5fd; }
span.sx-soc-at { color: var(--lilac); }
.sx-soc-note { margin: 14px 0 0; color: var(--dim); }
.sx-soc-chatwrap { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 12px; }
.sx-soc-chat { max-height: 70vh; overflow: auto; padding: 10px; border-radius: 12px; background: var(--sunken); border: 1px solid var(--line); }
.sx-soc-line { padding: 6px 8px; border-radius: 8px; font: 500 13px/1.4 Manrope, sans-serif; overflow-wrap: anywhere; }
.sx-soc-line:nth-child(odd) { background: rgba(255,255,255,.025); }
.sx-soc-users { max-height: 70vh; overflow: auto; padding: 10px 12px; border-radius: 12px; background: var(--sunken); border: 1px solid var(--line); }
.sx-soc-users h3 { margin: 0 0 8px; font: 700 11.5px/1 Manrope, sans-serif; text-transform: uppercase; letter-spacing: .06em; color: var(--lilac); }
.sx-soc-users div { display: flex; flex-wrap: wrap; gap: 5px; }
.sx-soc-users span { padding: 3px 7px; border-radius: 6px; background: rgba(255,255,255,.05); font: 500 11.5px/1.3 'JetBrains Mono', monospace; color: var(--muted); }
.sx-loading-inline { padding: 24px; color: var(--dim); font: 500 13px Manrope, sans-serif; }
@media (max-width: 760px) { .sx-soc-chatwrap { grid-template-columns: 1fr; } .sx-soc-users { max-height: 30vh; } }

/* /movies transcript */
.sx-trans { display: grid; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--sunken); border: 1px solid var(--line); }
.sx-trans[hidden] { display: none; }
.sx-trans-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font: 700 11.5px/1 Manrope, sans-serif; text-transform: uppercase; letter-spacing: .06em; color: var(--lilac); }
.sx-trans-head .sx-dd, .sx-trans-head select { max-width: 210px; text-transform: none; letter-spacing: 0; }
.sx-trans-list { max-height: 260px; overflow: auto; display: grid; gap: 2px; }
.sx-trans-list button { display: grid; grid-template-columns: 48px 1fr; gap: 8px; text-align: left; border: 0; background: none; color: var(--muted); padding: 5px 6px; border-radius: 7px; cursor: pointer; font: 500 12.5px/1.4 Manrope, sans-serif; }
.sx-trans-list button:hover { background: rgba(255,255,255,.04); color: var(--text); }
.sx-trans-list button.on { background: rgba(168, 85, 247, .14); color: var(--text); }
.sx-trans-list code { font-size: 11px; color: var(--dim); padding-top: 1px; }
video::cue { font-family: Manrope, sans-serif; background: rgba(0,0,0,.72); }

/* /extras */
.sx-ex-list { columns: 3 300px; column-gap: 12px; }
.sx-ex-card { break-inside: avoid; margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; background: var(--sunken); border: 1px solid var(--line); }
.sx-ex-card.got { border-color: rgba(134, 239, 172, .4); }
.sx-ex-card h3 { margin: 0 0 6px; font: 700 14.5px/1.3 Outfit, sans-serif; color: var(--text); }
.sx-ex-card p { margin: 0 0 6px; font: 500 13px/1.5 Manrope, sans-serif; color: var(--muted); }
.sx-ex-card p b { color: var(--text); }
.sx-ex-loc { color: var(--lilac) !important; font-weight: 600 !important; font-size: 12px !important; }
.sx-ex-tiers { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sx-ex-tick { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); font: 600 11.5px/1 Manrope, sans-serif; color: var(--muted); cursor: pointer; user-select: none; }
.sx-ex-tick input { accent-color: #86efac; margin: 0; }
.sx-ex-tick:has(input:checked) { color: #86efac; border-color: rgba(134, 239, 172, .45); }
.sx-ex-news details summary { cursor: pointer; font: 600 12px Manrope, sans-serif; color: var(--lilac); }
.sx-ex-news details p { margin-top: 8px; }

/* /map 3D World */
.sx-w3d-shell { position: relative; height: min(72vh, 760px); min-height: 380px; border-radius: 14px; overflow: hidden; background: #0e1726; border: 1px solid var(--line); }
.sx-w3d-shell canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.sx-w3d-shell:fullscreen { height: 100vh; border-radius: 0; }
.sx-w3d-gate { display: grid; place-items: center; }
.sx-w3d-gate .sx-gate { position: static; display: grid; }

/* numbered pager (100 per page) */
.sx-pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 24px 0 8px; }
.sx-pager[hidden] { display: none; }
.sx-pager button {
  min-width: 38px; height: 36px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line-2);
  background: var(--surface-2); color: var(--text); font: 600 13px/1 Manrope, sans-serif; cursor: pointer;
}
.sx-pager button:hover:not(:disabled):not(.on) { border-color: var(--accent-line); background: var(--accent-bg); color: var(--white); }
.sx-pager button.on { background: var(--accent-bg); border-color: var(--accent-line); color: var(--white); cursor: default; }
.sx-pager button:disabled { opacity: .4; cursor: default; }
.sx-pg-gap { color: var(--muted); padding: 0 2px; }
.sx-pager button[aria-label] { font-size: 18px; }
@media (max-width: 520px) { .sx-pager { gap: 4px; } .sx-pager button { min-width: 34px; height: 34px; padding: 0 9px; } }
.sx-pg-info { flex-basis: 100%; text-align: center; font: 500 12px/1.4 Manrope, sans-serif; color: var(--muted); margin-top: 2px; }

/* link from the item sheet to the item's own page */
.sx-page-link { display: inline-block; margin: 2px 0 10px; font: 600 13px/1.4 Manrope, sans-serif; color: var(--lilac); }
.sx-page-link:hover { color: var(--white); }
.sx-page-link[hidden] { display: none; }

/* /customization */
.sx-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.sx-chips[hidden] { display: none; }
.sx-cz-table td b { color: var(--text); font-weight: 600; }
.sx-cz-table th[hidden] { display: none; }
.sx-cz-k { display: inline-block; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font: 600 11.5px/1.2 Manrope, sans-serif; white-space: nowrap; }

/* /extras TV news + food */
.sx-tv-lines { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.sx-tv-lines li { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 10px; line-height: 1.45; }
.sx-tv-t { color: var(--muted); font: 600 12px/1.6 Manrope, sans-serif; font-variant-numeric: tabular-nums; }
.sx-tv-es { display: block; color: var(--muted); font-size: .92em; }
.sx-ex-food h3 { margin-bottom: 2px; }

.sx-ex-card p.sx-pl { white-space: pre-line; }
