/* GTA VI LEONIDA ATLAS — Vice City Neon Sunset × kun97.tech Standards */
:root {
  --bg-page: #080510;
  --glass: rgba(14, 9, 26, 0.84);
  --glass-strong: rgba(14, 9, 26, 0.94);
  --glass-soft: rgba(255, 255, 255, 0.055);
  --glass-hover: rgba(255, 255, 255, 0.105);
  --border: rgba(255, 255, 255, 0.13);
  --border-hi: rgba(255, 100, 175, 0.42);
  --ink: #f7f4fc;
  --ink-soft: #d2cbe2;
  --muted: #988eb0;
  --vice-pink: #ff2e93;
  --vice-orange: #ff7b29;
  --vice-gold: #ffd166;
  --vice-cyan: #00e5ff;
  --vice-grad: linear-gradient(135deg, #ff2e93 0%, #ff7b29 55%, #ffd166 100%);
  --vice-grad-h: linear-gradient(90deg, #ff2e93 0%, #ff7b29 55%, #ffd166 100%);
  --kun-stud: #a93b32;
  --emerald: #10b981;
  --tier-S: #ffd166;
  --tier-A: #ff2e93;
  --tier-B: #00e5ff;
  --tier-C: #8e86a8;
  --shadow-float: 0 18px 48px rgba(4, 2, 12, 0.56), 0 2px 10px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.13);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body {
  margin: 0; padding: 0; height: 100%; overflow: hidden;
  background: var(--bg-page); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Noto Sans SC", "Hiragino Sans GB", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
a { color: var(--vice-gold); text-decoration: none; }
a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 46, 147, 0.55); }

/* Vice City Midnight Glass Surfaces */
.glass-island, .glass-panel {
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  box-shadow: var(--shadow-float);
}
.glass-island { border-radius: 14px; }
.glass-panel { border-radius: 18px; }

/* ================= GTA VI PAUSE-MENU TOP HUD ================= */
.hud-top {
  position: fixed; z-index: 40; top: 12px; left: 12px; right: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  pointer-events: none;
}
.hud-top > * { pointer-events: auto; }

.brand-island {
  display: flex; align-items: center; gap: 9px;
  height: 48px; padding: 0 14px 0 8px;
}
.icon-btn {
  width: 32px; height: 32px; border-radius: 9px; border: 0;
  background: var(--glass-soft); color: var(--ink-soft);
  display: grid; place-items: center; cursor: pointer; transition: all 140ms var(--ease);
}
.icon-btn:hover { background: var(--glass-hover); color: #fff; }
.icon-btn svg { width: 17px; height: 17px; }

.gta-emblem { flex: none; width: 56px; height: 34px; display: grid; place-items: center; }
.gta-emblem svg { width: 56px; height: 34px; filter: drop-shadow(0 0 10px rgba(255, 46, 147, 0.42)); }

.brand-meta { display: flex; flex-direction: column; min-width: 0; }
.brand-row { display: flex; align-items: center; gap: 6px; }
.brand-row strong { font-size: 14.5px; font-weight: 950; letter-spacing: 0.06em; line-height: 1.1; color: #fff; }
.brand-wordmark {
  background: linear-gradient(90deg, #ffffff 0%, #ffe6f2 55%, #ffd166 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent !important;
}
.brand-badge {
  padding: 1.5px 6px; border-radius: 4px; font-size: 9px; font-weight: 900; letter-spacing: 0.1em;
  background: rgba(0, 229, 255, 0.14); border: 1px solid rgba(0, 229, 255, 0.42); color: #7ff4ff;
}
.brand-sub { font-size: 10.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }

/* GTA VI Pause-Menu Center Tabs */
.nav-island {
  display: flex; align-items: center; gap: 4px; height: 48px; padding: 4px;
}
.nav-pill {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 40px; padding: 0 16px; border: 0; border-radius: 10px;
  background: transparent; color: var(--muted); cursor: pointer; white-space: nowrap;
  transition: all 160ms var(--ease);
}
.nav-pill__en { font-size: 8.5px; font-weight: 900; letter-spacing: 0.16em; opacity: 0.72; line-height: 1; }
.nav-pill__zh { font-size: 12.5px; font-weight: 800; line-height: 1.25; margin-top: 1px; }
.nav-pill:hover { color: #fff; background: var(--glass-soft); }
.nav-pill.is-active {
  background: linear-gradient(180deg, rgba(255, 46, 147, 0.24) 0%, rgba(255, 123, 41, 0.14) 100%);
  color: #fff;
  box-shadow: inset 0 -2.5px 0 var(--vice-pink), 0 0 18px rgba(255, 46, 147, 0.24);
}
.nav-pill.is-active .nav-pill__en { color: var(--vice-gold); opacity: 1; }

.util-island {
  display: flex; align-items: center; gap: 6px; height: 48px; padding: 5px 8px;
}
.lang-btn {
  height: 32px; min-width: 38px; padding: 0 9px; border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16); background: var(--glass-soft);
  color: var(--vice-gold); font-size: 11.5px; font-weight: 900; letter-spacing: 0.04em;
  cursor: pointer; transition: all 140ms var(--ease);
}
.lang-btn:hover { background: rgba(255, 46, 147, 0.24); border-color: rgba(255, 46, 147, 0.55); color: #fff; }
.theme-seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 9px; background: var(--glass-soft); }
.theme-btn {
  display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 9px;
  border: 0; border-radius: 7px; background: transparent; color: var(--muted);
  font-size: 12px; font-weight: 750; cursor: pointer; transition: all 140ms var(--ease);
}
.theme-btn svg { width: 13.5px; height: 13.5px; }
.theme-btn.is-active { background: rgba(255, 255, 255, 0.15); color: #fff; }
.island-sep { width: 1px; height: 20px; background: var(--border); }

.ip-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px;
  border: 1px solid rgba(16, 185, 129, 0.38); border-radius: 9px;
  background: rgba(16, 185, 129, 0.14); color: #d1fae5;
  font-size: 12px; font-weight: 800; white-space: nowrap; cursor: pointer;
}
.ip-pill:hover { background: rgba(16, 185, 129, 0.25); }
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald); flex: none;
}
.live-dot.is-offline { background: var(--vice-gold); box-shadow: 0 0 8px var(--vice-gold); }

/* kun97.tech Official Component: k-author */
.k-author {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px 0 4px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08); color: #fff;
  font-size: 12px; font-weight: 800; white-space: nowrap; cursor: pointer;
  transition: all 150ms var(--ease);
}
.k-author img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(255, 209, 102, 0.55); }
.k-author:hover { background: rgba(255, 46, 147, 0.22); border-color: rgba(255, 46, 147, 0.55); }

/* IP Popover */
.ip-popover {
  position: fixed; z-index: 55; top: 68px; right: 14px; width: 318px; max-width: calc(100vw - 24px);
  padding: 16px; display: flex; flex-direction: column; gap: 11px;
  background: var(--glass-strong);
}
.ip-popover__head { display: flex; align-items: center; justify-content: space-between; }
.ip-title-wrap { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.close-x {
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--glass-soft); color: var(--ink-soft); display: grid; place-items: center; cursor: pointer;
}
.close-x svg { width: 14px; height: 14px; }
.close-x:hover { background: var(--glass-hover); color: #fff; }
.ip-addr-bar {
  display: flex; align-items: center; justify-content: space-between; padding: 8px 11px;
  border-radius: 10px; background: var(--glass-soft); border: 1px solid var(--border);
  font-size: 12px; color: var(--muted);
}
.ip-addr-bar strong { color: var(--vice-gold); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.ip-popover__desc { margin: 0; font-size: 12px; line-height: 1.55; color: var(--muted); }
.ip-popover__stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.ip-stat-chip { padding: 8px 10px; border-radius: 10px; background: var(--glass-soft); font-size: 11px; color: var(--muted); }
.ip-stat-chip strong { display: block; margin-top: 2px; font-size: 14.5px; font-weight: 900; color: var(--ink); }
.btn-danger-ghost {
  height: 36px; border-radius: 10px; border: 1px solid rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.14); color: #fca5a5; font-size: 12px; font-weight: 800; cursor: pointer;
}
.btn-danger-ghost:hover { background: rgba(239, 68, 68, 0.28); color: #fff; }

/* ================= kun97.tech AUTHOR MODAL ================= */
.modal-backdrop {
  position: fixed; z-index: 65; inset: 0; display: grid; place-items: center; padding: 16px;
  background: rgba(5, 3, 12, 0.78); backdrop-filter: blur(10px);
}
.author-card {
  position: relative; width: 440px; max-width: 100%; max-height: 90dvh; overflow-y: auto;
  padding: 22px 22px 18px; background: var(--glass-strong);
  border-color: rgba(255, 46, 147, 0.35);
}
.author-card__close { position: absolute; top: 14px; right: 14px; }
.author-head { display: flex; align-items: center; gap: 14px; padding-right: 32px; }
.author-avatar {
  width: 64px; height: 64px; border-radius: 16px; object-fit: cover; flex: none;
  border: 2px solid rgba(255, 209, 102, 0.55); background: #1e1532;
}
.author-eyebrow { margin: 0 0 3px; font-size: 10px; font-weight: 900; letter-spacing: 0.14em; color: var(--vice-gold); }
.author-head h2 { margin: 0; font-size: 22px; font-weight: 950; color: #fff; }
.author-head h2 span { color: var(--vice-pink); }
.author-sig { margin: 3px 0 0; font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.author-bio { margin: 14px 0 14px; font-size: 13px; line-height: 1.62; color: var(--ink-soft); }
.author-section-label { font-size: 10.5px; font-weight: 850; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; margin: 12px 0 7px; }
.author-links { display: grid; gap: 7px; }
.k-entry {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 13px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--glass-soft); color: #fff; text-decoration: none; transition: all 150ms var(--ease);
}
.k-entry:hover { border-color: var(--vice-pink); background: var(--glass-hover); text-decoration: none; }
.k-entry__body { display: flex; flex-direction: column; gap: 2px; }
.k-entry__body b { font-size: 13.5px; font-weight: 850; color: #fff; }
.k-entry__body small { font-size: 11.5px; color: var(--muted); }
/* kun97.tech signature brick stud indicator */
.k-stud {
  flex: none; width: 12px; height: 12px; border-radius: 50%;
  background: var(--kun-stud); box-shadow: inset 0 1px 2px rgba(255,255,255,0.4), 0 0 0 3px rgba(169, 59, 50, 0.25);
}
.author-products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.author-prod-chip {
  padding: 9px 11px; border-radius: 11px; border: 1px solid var(--border); background: var(--glass-soft);
  display: flex; flex-direction: column; gap: 2px; text-decoration: none;
}
.author-prod-chip:hover { border-color: var(--vice-cyan); text-decoration: none; }
.author-prod-chip strong { font-size: 13px; color: #fff; }
.author-prod-chip span { font-size: 11px; color: var(--muted); }
.author-icp { margin: 14px 0 0; text-align: center; font-size: 11px; }
.author-icp a { color: var(--muted); }

/* ================= FULL-BLEED MAP STAGE ================= */
.view { position: fixed; inset: 0; }
.view--page { overflow-y: auto; background: var(--bg-page); padding-top: 72px; }
.map-stage { position: relative; width: 100%; height: 100%; overflow: hidden; user-select: none; }
#map-canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
#map-canvas.is-dragging { cursor: grabbing; }
#map-canvas.is-pointer { cursor: pointer; }

.loading-pill {
  position: absolute; z-index: 30; top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 10px; padding: 11px 18px;
  border-radius: 999px; font-size: 13px; font-weight: 750;
}
.spinner {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2); border-top-color: var(--vice-pink);
  animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ================= LEFT COMMAND DOCK ================= */
.map-dock {
  position: absolute; z-index: 25; top: 72px; left: 12px; bottom: 54px;
  width: 308px; max-width: calc(100vw - 24px);
  display: flex; flex-direction: column; overflow: hidden;
  transition: transform 240ms var(--ease), opacity 200ms var(--ease);
}
.map-dock.is-collapsed { transform: translateX(calc(-100% - 28px)); opacity: 0; pointer-events: none; }
.sheet-handle-bar, .mobile-sheet-foot { display: none; }

.dock-search { position: relative; flex: none; padding: 11px 12px 9px; border-bottom: 1px solid var(--border); }
.dock-search__svg { position: absolute; left: 23px; top: 21px; width: 15px; height: 15px; color: var(--muted); pointer-events: none; }
.dock-search input {
  width: 100%; height: 36px; padding: 0 34px; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.06);
  color: var(--ink); font-size: 12.5px; font-weight: 600; outline: none;
}
.dock-search input::placeholder { color: var(--muted); }
.dock-search input:focus { border-color: var(--vice-pink); background: rgba(255, 255, 255, 0.09); }
.search-kbd {
  position: absolute; right: 20px; top: 19px; padding: 1px 6px; border-radius: 5px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.06);
  font-size: 10.5px; font-weight: 700; color: var(--muted); pointer-events: none;
}
.dock-search__clear {
  position: absolute; right: 18px; top: 18px; width: 22px; height: 22px; border: 0;
  border-radius: 50%; background: rgba(255,255,255,0.16); color: #fff; cursor: pointer; font-weight: 800;
}
.search-dropdown {
  position: absolute; z-index: 48; left: 10px; right: 10px; top: 52px;
  max-height: 360px; overflow-y: auto; border-radius: 12px;
  border: 1px solid var(--border-hi); background: rgba(14, 9, 26, 0.98);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.72);
}
.search-item {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 11px;
  border: 0; border-bottom: 1px solid rgba(255,255,255,0.07); background: transparent;
  text-align: left; cursor: pointer;
}
.search-item:last-child { border-bottom: 0; }
.search-item:hover { background: var(--glass-hover); }
.search-item__thumb {
  flex: none; width: 42px; height: 28px; border-radius: 6px; object-fit: cover;
  background: var(--glass-soft); display: grid; place-items: center;
}
.search-item__thumb img.pin-mini { width: 22px; height: 22px; object-fit: contain; }
.search-item__info { min-width: 0; flex: 1; }
.search-item__info strong { display: block; font-size: 12.5px; font-weight: 800; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-item__info small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dock-toolbar {
  flex: none; padding: 8px 12px; border-bottom: 1px solid var(--border);
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.seg-pill {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; padding: 2px;
  border-radius: 9px; background: var(--glass-soft); border: 1px solid rgba(255,255,255,0.07);
}
.seg-pill--3 { grid-template-columns: repeat(3, 1fr); }
.seg-btn {
  height: 26px; border: 0; border-radius: 6px; background: transparent;
  color: var(--muted); font-size: 11px; font-weight: 750; cursor: pointer; white-space: nowrap;
}
.seg-btn.is-active { background: rgba(255, 255, 255, 0.16); color: #fff; font-weight: 850; }

.dock-scroll { flex: 1; overflow-y: auto; padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 13px; }
.dock-sec { display: flex; flex-direction: column; gap: 7px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 6px; }
.sec-head h2 { margin: 0; font-size: 11px; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.sec-right { display: flex; align-items: center; gap: 7px; }
.sec-metric { font-size: 11px; font-weight: 900; color: var(--vice-gold); font-variant-numeric: tabular-nums; }
.sec-links { display: flex; flex-wrap: wrap; gap: 3px; }
.sec-links button, .reset-link {
  border: 0; padding: 2.5px 6.5px; border-radius: 6px; background: var(--glass-soft);
  color: var(--ink-soft); font-size: 10.5px; font-weight: 750; cursor: pointer;
}
.sec-links button:hover, .reset-link:hover { background: rgba(255, 46, 147, 0.28); color: #fff; }

/* HD GTA VI Core Layer Rows */
.layer-list { display: grid; gap: 4px; }
.layer-row {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; padding: 6.5px 10px 6.5px 10px; border-radius: 10px;
  border: 1px solid transparent; background: rgba(255, 255, 255, 0.03);
  cursor: pointer; text-align: left; transition: all 140ms var(--ease);
}
.layer-row:hover { background: var(--glass-soft); }
.layer-row.is-on {
  background: rgba(255, 46, 147, 0.13); border-color: rgba(255, 46, 147, 0.36);
}
.layer-row.is-on::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px;
  border-radius: 99px; background: var(--row-accent, var(--vice-pink));
  box-shadow: 0 0 10px var(--row-accent, var(--vice-pink));
}
.layer-row__left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.layer-pin-img { width: 22px; height: 22px; object-fit: contain; flex: none; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.45)); }
.layer-row__name { font-size: 12.5px; font-weight: 750; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.layer-row.is-on .layer-row__name { color: #fff; font-weight: 850; }
.layer-row__count {
  font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums;
  padding: 2px 7px; border-radius: 999px; background: rgba(255,255,255,0.07); color: var(--muted);
}
.layer-row.is-on .layer-row__count { background: var(--vice-grad); color: #0b0614; font-weight: 900; }

/* HD GTA VI Building & Facility Pin Tile Grid! */
.pin-tile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.pin-tile-grid--2 { grid-template-columns: repeat(2, 1fr); }
.pin-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 7px 4px 6px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09); background: rgba(255, 255, 255, 0.035);
  cursor: pointer; text-align: center; transition: all 140ms var(--ease);
}
.pin-tile:hover { background: var(--glass-hover); border-color: rgba(255, 255, 255, 0.24); }
.pin-tile.is-on {
  background: linear-gradient(180deg, rgba(255, 46, 147, 0.22), rgba(255, 123, 41, 0.14));
  border-color: rgba(255, 123, 41, 0.65);
  box-shadow: 0 0 14px rgba(255, 46, 147, 0.2);
}
.pin-tile img { width: 24px; height: 24px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.45)); }
.pin-tile strong { font-size: 11px; font-weight: 800; color: var(--ink-soft); line-height: 1.15; }
.pin-tile.is-on strong { color: #fff; }
.pin-tile small { font-size: 9.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.pin-tile.is-on small { color: var(--vice-gold); }
.pin-tile--wide { flex-direction: row; justify-content: space-between; padding: 7px 9px; text-align: left; }
.pin-tile--wide .pt-left { display: flex; align-items: center; gap: 7px; min-width: 0; }
.pin-tile--wide img { width: 21px; height: 21px; }

/* Sub-Tabs & Official Chips */
.subtab-bar {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; padding: 3px;
  border-radius: 9px; background: var(--glass-soft); border: 1px solid rgba(255,255,255,0.06);
}
.subtab-bar--4 { grid-template-columns: repeat(4, 1fr); }
.subtab-btn {
  height: 26px; border: 0; border-radius: 6px; background: transparent;
  color: var(--muted); font-size: 11px; font-weight: 750; cursor: pointer; white-space: nowrap;
}
.subtab-btn.is-active { background: rgba(255,255,255,0.16); color: #fff; font-weight: 850; }

.chip-grid { display: flex; flex-wrap: wrap; gap: 5px; max-height: 186px; overflow-y: auto; }
.cls-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4.5px 8.5px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.10); background: rgba(255,255,255,0.04);
  color: var(--ink-soft); font-size: 11.5px; font-weight: 750; cursor: pointer;
}
.cls-chip:hover { border-color: rgba(255,255,255,0.28); color: #fff; background: var(--glass-hover); }
.cls-chip .c-dot { width: 6.5px; height: 6.5px; border-radius: 50%; flex: none; }
.cls-chip small { font-size: 10px; opacity: .65; font-variant-numeric: tabular-nums; }
.cls-chip.is-active { background: var(--vice-grad); border-color: transparent; color: #090512; font-weight: 850; }
.cls-chip.is-active .c-dot { background: #090512 !important; }
.cls-chip.is-active small { opacity: .85; }

.tier-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.tier-btn {
  height: 27px; padding: 0 2px; border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.10); background: rgba(255,255,255,0.04);
  color: var(--ink-soft); font-size: 11px; font-weight: 800; cursor: pointer; white-space: nowrap;
}
.tier-btn.is-active { background: #fff; color: #090512; border-color: #fff; }
.tier-btn--S.is-active { background: var(--tier-S); border-color: var(--tier-S); color: #090512; }
.tier-btn--A.is-active { background: var(--tier-A); border-color: var(--tier-A); color: #fff; }
.tier-btn--B.is-active { background: var(--tier-B); border-color: var(--tier-B); color: #090512; }
.tier-btn--C.is-active { background: var(--tier-C); border-color: var(--tier-C); color: #fff; }

.dock-fold { border-top: 1px solid var(--border); padding-top: 10px; }
.dock-fold summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between;
  font-size: 11.5px; font-weight: 800; color: var(--ink-soft); cursor: pointer; user-select: none;
}
.dock-fold summary::-webkit-details-marker { display: none; }
.dock-fold summary em { font-style: normal; font-size: 10.5px; color: var(--vice-gold); font-weight: 800; }
.fold-body { margin-top: 8px; display: grid; gap: 6px; }
.fold-body input, .fold-body select {
  width: 100%; height: 34px; padding: 0 9px; border-radius: 8px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.06);
  color: var(--ink); font-size: 12px; font-weight: 600; outline: none;
}
.fold-body select option { background: #120922; color: #fff; }
.spawn-active-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 6px 9px; border-radius: 8px; background: rgba(0, 229, 255, 0.14);
  border: 1px solid rgba(0, 229, 255, 0.42); font-size: 11.5px; font-weight: 800; color: #ccfaff;
}
.spawn-active-bar button {
  border: 0; border-radius: 6px; padding: 3px 8px; background: var(--vice-cyan); color: #07131a; font-size: 11px; font-weight: 900; cursor: pointer;
}

/* ================= HOVER CARD & RIGHT INSPECTOR DRAWER ================= */
.hover-card {
  position: absolute; z-index: 32; width: 284px; pointer-events: none; overflow: hidden;
  background: var(--glass-strong); animation: cardPop 120ms var(--ease);
}
@keyframes cardPop { from { opacity: 0; transform: translateY(4px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.hover-card__media { position: relative; width: 100%; aspect-ratio: 16 / 10; background: #10091e; overflow: hidden; }
.hover-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(10,5,20,0.12) 0%, rgba(10,5,20,0) 45%, rgba(14,9,26,0.94) 100%);
}
.media-scrim--tall {
  background: linear-gradient(180deg, rgba(10,5,20,0.28) 0%, rgba(10,5,20,0) 38%, rgba(14,9,26,0.98) 100%);
}

.jewel-badge {
  position: absolute; top: 9px; right: 9px; padding: 3px 8px; border-radius: 7px;
  font-size: 11px; font-weight: 900; letter-spacing: 0.03em; box-shadow: 0 4px 12px rgba(0,0,0,0.45);
}
.jewel-badge--inline { position: static; box-shadow: none; }
.jewel-badge--S { background: linear-gradient(135deg, #ffd166, #ff9f1c); color: #160c02; }
.jewel-badge--A { background: linear-gradient(135deg, #ff2e93, #e11d48); color: #fff; }
.jewel-badge--B { background: linear-gradient(135deg, #00e5ff, #0891b2); color: #04131c; }
.jewel-badge--C { background: rgba(152, 142, 176, 0.25); color: #eae5f5; border: 1px solid rgba(255,255,255,0.18); }

.media-caption { position: absolute; left: 10px; bottom: 8px; font-size: 11px; font-weight: 800; color: rgba(255,255,255,0.94); }
.hover-card__body { padding: 11px 13px 12px; display: flex; flex-direction: column; gap: 5px; }
.hc-top-badges { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.inline-tag {
  padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 750;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.13); color: var(--ink-soft);
}
.inline-tag--gold { background: rgba(255, 209, 102, 0.16); border-color: rgba(255, 209, 102, 0.45); color: #ffe7a3; }
.hc-title-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.hc-title-row h3 { margin: 0; font-size: 14.5px; font-weight: 850; color: #fff; line-height: 1.25; }
.found-pill {
  flex: none; padding: 2px 7px; border-radius: 99px; background: rgba(16, 185, 129, 0.22);
  border: 1px solid rgba(16, 185, 129, 0.55); color: #6ee7b7; font-size: 10px; font-weight: 850;
}
.hc-sub { margin: 0; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-code-box {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 10px; border-radius: 9px; margin-top: 2px;
  background: rgba(255, 209, 102, 0.14); border: 1px solid rgba(255, 209, 102, 0.45);
  font-size: 11.5px; color: #ffe7a3;
}
.hc-code-box strong { font-size: 16px; letter-spacing: 0.14em; color: #fff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.hc-desc { margin: 2px 0 0; font-size: 12px; line-height: 1.48; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.detail-drawer {
  position: absolute; z-index: 35; top: 72px; right: 12px; bottom: 58px;
  width: 368px; max-width: calc(100vw - 24px);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--glass-strong); animation: slideIn 180ms var(--ease);
}
@keyframes slideIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: translateX(0); } }
.drawer-mobile-handle { display: none; }
.drawer-close-float {
  position: absolute; z-index: 6; top: 10px; right: 10px;
  width: 32px; height: 32px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.2); background: rgba(14, 9, 26, 0.78);
  backdrop-filter: blur(10px); color: #fff; display: grid; place-items: center; cursor: pointer;
}
.drawer-close-float svg { width: 15px; height: 15px; }
.drawer-close-float:hover { background: var(--vice-pink); border-color: var(--vice-pink); }

.drawer-scroll { flex: 1; overflow-y: auto; }
.drawer-hero-media { position: relative; width: 100%; aspect-ratio: 16 / 10; background: #10091e; overflow: hidden; }
.drawer-hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.zoom-float-btn {
  position: absolute; z-index: 4; right: 10px; bottom: 10px;
  width: 32px; height: 32px; border-radius: 9px;
  border: 1px solid rgba(255,255,255,0.24); background: rgba(14, 9, 26, 0.72);
  color: #fff; display: grid; place-items: center; cursor: pointer;
}
.zoom-float-btn svg { width: 14px; height: 14px; }

.drawer-body { padding: 15px 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.drawer-body.is-no-photo { padding-top: 20px; }
.dd-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-right: 34px; }
.dd-pin-ico { width: 24px; height: 24px; object-fit: contain; }
.drawer-body h2 { margin: 0; font-size: 20px; font-weight: 900; line-height: 1.25; color: #fff; letter-spacing: -0.02em; }
.dd-en { margin: -7px 0 0; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.dd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; color: var(--ink-soft); }
.sep-dot { opacity: .4; }

.code-spotlight {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 15px; border-radius: 13px;
  background: linear-gradient(135deg, rgba(255, 46, 147, 0.18), rgba(255, 209, 102, 0.16));
  border: 1px solid rgba(255, 209, 102, 0.48);
}
.code-spotlight small { display: block; font-size: 11px; font-weight: 750; color: #ffe7a3; }
.code-spotlight strong { font-size: 28px; font-weight: 950; letter-spacing: 0.18em; color: #fff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.btn-glass-sm {
  height: 32px; padding: 0 12px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.24); background: rgba(255,255,255,0.12);
  color: #fff; font-size: 12px; font-weight: 800; cursor: pointer;
}
.btn-glass-sm:hover { background: rgba(255,255,255,0.22); }

.rating-strip {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
  padding: 11px 13px; border-radius: 12px; background: var(--glass-soft); border: 1px solid var(--border);
}
.r-item { display: flex; flex-direction: column; gap: 5px; }
.r-label { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); font-weight: 700; }
.r-label strong { color: #fff; font-weight: 900; }
.r-bar { height: 5px; border-radius: 99px; background: rgba(255,255,255,0.1); overflow: hidden; }
.r-bar i { display: block; height: 100%; border-radius: 99px; background: var(--vice-grad-h); }

.chain-box {
  padding: 11px 13px; border-radius: 12px; background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.3); display: flex; flex-direction: column; gap: 8px;
}
.chain-box__head { display: flex; justify-content: space-between; font-size: 12px; font-weight: 850; color: #9cf6ff; }
.chain-steps-list { display: grid; gap: 5px; max-height: 170px; overflow-y: auto; }
.chain-step-btn {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border-radius: 8px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.04); color: var(--ink-soft);
  font-size: 12px; font-weight: 700; text-align: left; cursor: pointer;
}
.chain-step-btn.is-current { border-color: var(--vice-cyan); background: rgba(0, 229, 255, 0.16); color: #fff; font-weight: 850; }
.chain-step-num {
  flex: none; width: 19px; height: 19px; border-radius: 50%; background: var(--vice-grad);
  color: #090512; display: grid; place-items: center; font-size: 10.5px; font-weight: 900;
}

.dd-text-block { display: flex; flex-direction: column; gap: 5px; }
.dd-text-block h3 { margin: 0; font-size: 11px; font-weight: 850; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.dd-text-block p { margin: 0; font-size: 13px; line-height: 1.58; color: var(--ink-soft); }
.dd-text-block blockquote {
  margin: 3px 0 0; padding: 8px 11px; border-left: 2.5px solid var(--vice-pink);
  border-radius: 0 8px 8px 0; background: var(--glass-soft); font-size: 12px; line-height: 1.5; color: var(--muted);
}

.dd-actions { display: grid; gap: 8px; margin-top: 4px; }
.dd-actions-sub { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.btn-vice-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 42px; padding: 0 16px; border: 0; border-radius: 11px;
  background: var(--vice-grad); color: #090512; font-size: 13.5px; font-weight: 900;
  cursor: pointer; box-shadow: 0 8px 24px rgba(255, 46, 147, 0.36); transition: all 150ms var(--ease);
}
.btn-vice-primary:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn-vice-primary.is-found { background: linear-gradient(135deg, #10b981, #059669); color: #fff; box-shadow: 0 8px 24px rgba(16, 185, 129, 0.34); }
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--glass-soft); color: var(--ink-soft);
  font-size: 12.5px; font-weight: 750; text-decoration: none; cursor: pointer;
}
.btn-secondary:hover { background: var(--glass-hover); color: #fff; border-color: var(--border-hi); text-decoration: none; }
.dd-foot-src { margin: 2px 0 0; font-size: 11px; color: var(--muted); }

/* ================= BOTTOM HUD ================= */
.hud-br { position: absolute; z-index: 24; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 8px; }
.coords-pill { height: 34px; padding: 0 12px; display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 750; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.zoom-island { display: inline-flex; overflow: hidden; height: 34px; }
.zoom-island button {
  width: 34px; height: 34px; border: 0; border-right: 1px solid var(--border);
  background: transparent; color: var(--ink-soft); display: grid; place-items: center; cursor: pointer;
}
.zoom-island button:last-child { border-right: 0; }
.zoom-island button svg { width: 15px; height: 15px; }
.zoom-island button:hover { background: var(--glass-hover); color: #fff; }

.hud-bl { position: absolute; z-index: 22; left: 12px; bottom: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: calc(100vw - 270px); }
.legend-pill {
  height: 32px; padding: 0 12px; display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 750; color: var(--ink-soft); white-space: nowrap;
}
.legend-pill span { display: inline-flex; align-items: center; gap: 4px; }
.dot { width: 7.5px; height: 7.5px; border-radius: 50%; display: inline-block; }
.attr-pill { height: 32px; padding: 0 11px; display: block; line-height: 30px; font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ================= GALLERY & PROGRESS PAGES ================= */
.page-ambient {
  position: fixed; z-index: 0; top: -180px; left: 50%; transform: translateX(-50%);
  width: min(1150px, 120vw); height: 480px; pointer-events: none;
  background: radial-gradient(ellipse at 28% 40%, rgba(255, 46, 147, 0.2), transparent 60%),
              radial-gradient(ellipse at 74% 52%, rgba(0, 229, 255, 0.14), transparent 60%);
  filter: blur(42px);
}
.page-wrap { position: relative; z-index: 1; max-width: 1360px; margin: 0 auto; padding: 24px 24px 80px; }
.page-eyebrow {
  margin: 0 0 8px; font-size: 11.5px; font-weight: 900; letter-spacing: 0.14em;
  background: var(--vice-grad-h); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-hero h1 { margin: 0; font-size: clamp(24px, 3.2vw, 36px); font-weight: 950; letter-spacing: -0.03em; color: #fff; }
.page-lead { margin: 10px 0 0; max-width: 74ch; font-size: 13.5px; line-height: 1.65; color: var(--muted); }

.pill-tabs { display: flex; flex-wrap: wrap; gap: 5px; padding: 4px; border-radius: 13px; background: var(--glass-soft); border: 1px solid var(--border); }
.ptab {
  height: 35px; padding: 0 13px; border: 0; border-radius: 9px; background: transparent;
  color: var(--muted); font-size: 12.5px; font-weight: 800; cursor: pointer;
}
.ptab:hover { color: #fff; }
.ptab.is-active { background: var(--vice-grad); color: #090512; font-weight: 900; }

.page-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.035); margin-bottom: 18px;
}
.toolbar-search { position: relative; flex: 1 1 240px; }
.toolbar-search svg { position: absolute; left: 12px; top: 11px; width: 15px; height: 15px; color: var(--muted); }
.toolbar-search input {
  width: 100%; height: 38px; padding: 0 12px 0 36px; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(10, 6, 20, 0.72); color: #fff; font-size: 13px; outline: none;
}
.toolbar-search input:focus { border-color: var(--vice-pink); }
.page-toolbar select {
  height: 38px; padding: 0 11px; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(10, 6, 20, 0.88); color: var(--ink); font-size: 12.5px; font-weight: 700;
}
.toolbar-count { margin-left: auto; font-size: 12.5px; font-weight: 850; color: var(--vice-gold); font-variant-numeric: tabular-nums; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.gcard {
  display: flex; flex-direction: column; overflow: hidden; border-radius: 16px;
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.035);
  cursor: pointer; text-align: left; padding: 0; transition: all 180ms var(--ease);
}
.gcard:hover { transform: translateY(-4px); border-color: rgba(255, 46, 147, 0.58); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.48); }
.gcard__media { position: relative; width: 100%; aspect-ratio: 16 / 10; background: #10091e; overflow: hidden; }
.gcard__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 320ms var(--ease); }
.gcard:hover .gcard__media img { transform: scale(1.04); }
.gcard--compact {
  position: relative;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.055) 0%, rgba(16, 10, 30, 0.72) 100%);
}
.gcard--compact::before {
  content: ""; display: block; height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--card-accent, var(--vice-pink)), transparent 88%);
}
.gcard__top-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.gcard__top-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.gcard__pin { width: 24px; height: 24px; object-fit: contain; }
.gcard__code-pill {
  display: inline-flex; align-items: center; gap: 8px; width: fit-content;
  margin: 4px 0 2px; padding: 5px 11px; border-radius: 9px;
  background: linear-gradient(135deg, rgba(255, 46, 147, 0.16), rgba(255, 209, 102, 0.16));
  border: 1px solid rgba(255, 209, 102, 0.45);
  font-size: 11px; font-weight: 800; color: #ffe7a3;
}
.gcard__code-pill strong { font-size: 15px; font-weight: 950; letter-spacing: 0.14em; color: #fff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.gcard__body { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.gcard__title { margin: 0; font-size: 15.5px; font-weight: 850; color: #fff; line-height: 1.25; }
.gcard__sub { margin: 0; font-size: 12px; color: var(--muted); }
.gcard__desc { margin: 3px 0 0; font-size: 12px; line-height: 1.5; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gcard__foot { margin-top: auto; padding-top: 9px; display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 800; color: var(--vice-gold); }
.load-more-wrap { display: flex; justify-content: center; margin-top: 24px; }

/* GTA VI Progress Bars Card */
.progress-hero-card { margin-bottom: 16px; border-color: rgba(255, 46, 147, 0.28); }
.overall-pct {
  font-size: 32px; font-weight: 950; letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
  background: var(--vice-grad-h); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.progress-bars-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pbar-item { padding: 11px 13px; border-radius: 12px; background: var(--glass-soft); border: 1px solid var(--border); }
.pbar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.pbar-head strong { color: #fff; font-variant-numeric: tabular-nums; }
.pbar-track { height: 6px; border-radius: 99px; background: rgba(255,255,255,0.1); overflow: hidden; }
.pbar-fill { height: 100%; border-radius: 99px; background: var(--vice-grad-h); transition: width 300ms var(--ease); }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi-card { padding: 16px 18px; border-radius: 16px; border: 1px solid var(--border); background: rgba(255, 255, 255, 0.035); }
.kpi-card small { display: block; font-size: 11.5px; font-weight: 750; color: var(--muted); }
.kpi-card strong {
  display: block; margin: 5px 0 3px; font-size: 27px; font-weight: 950; letter-spacing: -0.03em;
  background: var(--vice-grad-h); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.kpi-card span { font-size: 11.5px; color: var(--ink-soft); }

.two-col { display: grid; grid-template-columns: 1.25fr 1fr; gap: 16px; margin-bottom: 16px; }
.dark-card { padding: 20px 22px; border-radius: 18px; border: 1px solid var(--border); background: rgba(255, 255, 255, 0.035); }
.dark-card h2 { margin: 0 0 6px; font-size: 17px; font-weight: 850; color: #fff; }
.dark-card__sub { margin: 0 0 14px; font-size: 12.5px; color: var(--muted); }
.dark-card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.dark-input {
  width: 270px; max-width: 100%; height: 36px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(10, 6, 20, 0.72); color: #fff; font-size: 12.5px;
}

.sets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 7px; }
.set-chip-card {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
  padding: 9px 11px; border-radius: 10px; border: 1px solid var(--border); background: var(--glass-soft);
  cursor: pointer; text-align: left;
}
.set-chip-card:hover { border-color: var(--vice-pink); background: var(--glass-hover); }
.set-chip-card strong { display: block; font-size: 12.5px; font-weight: 800; color: #fff; }
.set-chip-card small { display: block; font-size: 10.5px; color: var(--muted); }
.set-chip-card em { font-style: normal; font-size: 14px; font-weight: 900; color: var(--vice-gold); }

.door-table { display: grid; gap: 7px; max-height: 410px; overflow-y: auto; }
.door-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--glass-soft);
  cursor: pointer; text-align: left;
}
.door-row:hover { border-color: var(--vice-gold); }
.door-row strong { display: block; font-size: 13px; color: #fff; }
.door-row small { display: block; font-size: 11px; color: var(--muted); }
.door-code-pill {
  flex: none; padding: 4px 10px; border-radius: 8px;
  background: rgba(255, 209, 102, 0.16); border: 1px solid rgba(255, 209, 102, 0.48);
  font-size: 14px; font-weight: 950; letter-spacing: 0.12em; color: #ffe7a3;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.wildlife-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 7px; max-height: 420px; overflow-y: auto; }
.wl-item { padding: 8px 10px; border-radius: 9px; border: 1px solid var(--border); background: var(--glass-soft); }
.wl-item.is-legendary { border-color: rgba(255, 209, 102, 0.52); background: rgba(255, 209, 102, 0.12); }
.wl-item strong { display: block; font-size: 12.5px; color: #fff; }
.wl-item small { display: block; font-size: 11px; color: var(--muted); }

/* kun97.tech Footer */
.site-footer {
  margin-top: 28px; padding: 18px 20px; border-radius: 16px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.03);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
}
.site-footer__brand { display: flex; align-items: center; gap: 12px; }
.site-footer__brand img { width: 36px; height: 36px; border-radius: 10px; border: 1px solid rgba(255,209,102,0.45); }
.site-footer__brand strong { display: block; font-size: 13.5px; color: #fff; }
.site-footer__brand span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.site-footer__links { display: flex; align-items: center; gap: 14px; font-size: 12px; font-weight: 700; }

/* Mobile Bottom Tabbar (Hidden on Desktop) */
.mobile-tabbar { display: none; }

/* Lightbox & Toast */
.lightbox {
  position: fixed; z-index: 75; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 24px; background: rgba(5, 3, 12, 0.94); backdrop-filter: blur(12px);
}
.lightbox img { max-width: min(94vw, 1200px); max-height: 82vh; border-radius: 14px; box-shadow: 0 28px 72px rgba(0, 0, 0, 0.72); }
.lightbox__close {
  position: absolute; top: 18px; right: 20px; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border-hi); background: rgba(255,255,255,0.12); color: #fff; display: grid; place-items: center; cursor: pointer;
}
.lightbox__close svg { width: 18px; height: 18px; }
.lightbox__cap { margin: 0; color: var(--ink-soft); font-size: 13.5px; font-weight: 700; text-align: center; }

.toast {
  position: fixed; z-index: 80; bottom: 24px; left: 50%; transform: translateX(-50%);
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--border-hi);
  background: rgba(14, 9, 26, 0.96); color: #fff; font-size: 12.5px; font-weight: 800;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55); white-space: nowrap; max-width: calc(100vw - 24px); overflow: hidden; text-overflow: ellipsis;
}

/* ================= RESPONSIVE & FIRST-CLASS MOBILE EXPERIENCE ================= */
@media (max-width: 1120px) {
  .two-col { grid-template-columns: 1fr; }
  .brand-sub, .brand-badge { display: none; }
  .k-author span { display: none; }
  .k-author { padding: 3px; width: 32px; justify-content: center; }
}

@media (max-width: 760px) {
  .hud-top { top: calc(8px + env(safe-area-inset-top)); left: 10px; right: 10px; gap: 6px; }
  .brand-island { height: 44px; padding: 0 10px 0 6px; gap: 6px; }
  #dock-collapse-btn { display: none; }
  .gta-emblem { width: 46px; height: 28px; }
  .gta-emblem svg { width: 46px; height: 28px; }
  .brand-row strong { font-size: 13px; }
  .nav-island { display: none; } /* Replaced by thumb-friendly mobile bottom tab bar! */
  .util-island { height: 44px; padding: 4px 5px; gap: 4px; }
  .lang-btn { height: 30px; min-width: 32px; padding: 0 6px; font-size: 10.5px; }
  .theme-btn { padding: 0 6px; height: 30px; }
  .theme-btn span { display: none; }
  .island-sep { height: 16px; }
  .island-sep.hide-sm { display: none; }
  .ip-pill { height: 30px; padding: 0 7px; font-size: 11px; }
  .k-author { width: 30px; height: 30px; padding: 2px; }
  .k-author img { width: 24px; height: 24px; }
  .k-author span { display: none; }

  /* Mobile Bottom App Tabbar (smoothly glides away when a bottom sheet opens, like iOS Maps!) */
  .mobile-tabbar {
    position: fixed; z-index: 42; left: 10px; right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    height: 56px; padding: 4px; border-radius: 16px;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
    background: var(--glass-strong); border: 1px solid var(--border);
    backdrop-filter: blur(22px) saturate(170%); -webkit-backdrop-filter: blur(22px) saturate(170%);
    box-shadow: var(--shadow-float);
    transition: transform 200ms var(--ease), opacity 180ms var(--ease);
  }
  body:has(#map-dock:not(.is-collapsed)) .mobile-tabbar,
  body:has(#detail-drawer:not([hidden])) .mobile-tabbar {
    transform: translateY(120%); opacity: 0; pointer-events: none;
  }
  .mtab {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    border: 0; border-radius: 11px; background: transparent; color: var(--muted);
    font-size: 10.5px; font-weight: 800; cursor: pointer;
  }
  .mtab svg { width: 18px; height: 18px; }
  .mtab.is-active {
    background: linear-gradient(180deg, rgba(255, 46, 147, 0.25), rgba(255, 123, 41, 0.14));
    color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 46, 147, 0.45);
  }
  .mtab.is-active svg { color: var(--vice-gold); }

  /* Mobile Filter Bottom Sheet */
  .map-dock {
    top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-width: none;
    height: 82dvh; border-radius: 22px 22px 0 0; z-index: 52;
    transform: translateY(0); opacity: 1;
  }
  .map-dock.is-collapsed { transform: translateY(105%); opacity: 0; pointer-events: none; }
  .sheet-handle-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px 6px; border-bottom: 1px solid var(--border); position: relative;
  }
  .sheet-pill {
    position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
    width: 38px; height: 4px; border-radius: 99px; background: rgba(255,255,255,0.28);
  }
  .sheet-title { font-size: 14px; font-weight: 900; color: #fff; margin-top: 4px; }
  .mobile-sheet-foot {
    display: block; padding: 10px 14px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border); background: var(--glass-strong);
  }
  .mobile-sheet-foot .btn-vice-primary { width: 100%; height: 44px; font-size: 14px; }

  /* kun97.tech COMPONENTS.md iPhone 16px Search Rule (Prevents Safari auto-zoom!) */
  .dock-search input, .toolbar-search input, .dark-input, .fold-body input { font-size: 16px; }
  .search-kbd { display: none; }

  /* Mobile Detail Bottom Sheet */
  .detail-drawer {
    top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-width: none;
    height: 74dvh; border-radius: 22px 22px 0 0; z-index: 54;
    animation: slideUp 200ms var(--ease);
  }
  @keyframes slideUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
  .drawer-mobile-handle {
    display: flex; justify-content: center; padding: 8px 0 2px; flex: none;
  }
  .drawer-mobile-handle span { width: 38px; height: 4px; border-radius: 99px; background: rgba(255,255,255,0.28); }
  .drawer-body { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }

  .hover-card { display: none !important; }
  /* Clean Vertical Zoom Pill on Right Edge Above Bottom Tabbar */
  .hud-br { right: 10px; bottom: calc(78px + env(safe-area-inset-bottom)); flex-direction: column; }
  .coords-pill { display: none; }
  .zoom-island { flex-direction: column; height: auto; width: 38px; }
  .zoom-island button { width: 38px; height: 38px; border-right: 0; border-bottom: 1px solid var(--border); }
  .zoom-island button:last-child { border-bottom: 0; }
  .hud-bl { display: none; }

  /* Pages mobile padding for bottom tabbar */
  .view--page { padding-top: 62px; }
  .page-wrap { padding: 14px 14px calc(92px + env(safe-area-inset-bottom)); }
  .progress-bars-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .gallery-grid { grid-template-columns: 1fr; gap: 12px; }
  .toast { bottom: calc(78px + env(safe-area-inset-bottom)); }
}
