:root {
  --page-gutter: clamp(14px, 2.5vw, 36px);
  color-scheme: dark;
  --bg: #12101c;
  --panel: #201a30;
  --line: #493854;
  --ink: #fff4ed;
  --muted: #c9b9cd;
  --pink: #ff92c3;
  --peach: #ffc17f;
  --mint: #92e4da;
  font-family: system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 90px; }
body { margin: 0; background: radial-gradient(ellipse at 70% 0%, #332047 0, transparent 36rem), var(--bg); color: var(--ink); }
a { color: inherit; }
button, input, select { font: inherit; }
button, select {
  background: #30243e; color: var(--ink); border: 1px solid var(--line);
  border-radius: .65rem; padding: .6rem .8rem; min-height: 44px;
}
button { cursor: pointer; }
button:hover, a:hover { color: var(--pink); }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
[hidden] { display: none !important; }
.skip { position: fixed; z-index: 5; left: 12px; top: 12px; background: var(--panel); padding: 10px; transform: translateY(-200%); }
.skip:focus { transform: translateY(0); }
.header { position: sticky; top: 0; z-index: 4; border-bottom: 1px solid var(--line); background: #15101ef5; }
.header-inner, main, footer { padding-inline: var(--page-gutter); }
.header-inner { min-height: 68px; display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: clamp(10px,2vw,24px); align-items: center; }
.header a { text-decoration: none; }
.brand { display: flex; align-items: center; width: min(100%, 235px); min-height: 44px; container-type: inline-size; }
.brand-lockup { display: grid; grid-template-columns: 29% minmax(0,1fr); align-items: stretch; gap: 3.5%; width: 100%; }
.brand-gta { position: relative; display: flex; align-items: center; justify-content: center; gap: .15em; padding-bottom: 1px; border: 1px solid #5e3a65; border-radius: 5px; background: #27152e; color: #ffedd8; font: italic 900 8.5cqw/1 Arial, sans-serif; letter-spacing: -.055em; white-space: nowrap; }
.brand-gta b { color: #ffc49f; font-size: 1.09em; }
.brand-gta::after { content: ''; position: absolute; left: 11%; right: 11%; bottom: 8%; height: 1px; background: #86ded5; }
.brand-wordmark { position: relative; display: block; aspect-ratio: 2425 / 386; overflow: hidden; }
.brand-wordmark img { position: absolute; display: block; width: 119.46%; height: auto; left: -9.73%; top: -61.14%; }
nav, .languages, .actions { display: flex; gap: 10px; align-items: center; }
nav { gap: clamp(12px, 2vw, 26px); }
nav a { white-space: nowrap; padding-block: 12px; }
nav a[aria-current] { color: var(--pink); text-decoration: underline; text-underline-offset: 7px; }
.languages { margin-left: auto; gap: 3px; }
.languages a { display: grid; place-items: center; min-height: 44px; min-width: 42px; padding: 6px; color: var(--muted); border-radius: 8px; }
.languages [aria-current] { background: #3a2946; color: var(--pink); font-weight: 750; }
.intro {
  position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0,1fr);
  align-items: center; min-height: clamp(310px, 40vw, 490px);
  margin: 0 calc(-1 * var(--page-gutter)) 32px; padding: clamp(54px, 6vw, 76px) var(--page-gutter);
  overflow: hidden; border-bottom: 1px solid #624263;
  background: linear-gradient(90deg,#191025 0%,#201531ec 25%,#20153150 65%,#20153110), linear-gradient(0deg,#170e2a 0%,transparent 60%), url('assets/coast.jpg') center 55% / cover, linear-gradient(135deg,#241332 25%,#944975 74%,#f69878);
}
.hero-copy { max-width: 760px; }
body[data-page="home"] { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body[data-page="home"] main { display: grid; flex: 1; }
body[data-page="home"] .intro { margin-bottom: 0; }
.eyebrow { color: var(--mint); letter-spacing: .15em; font-size: .82rem; font-weight: 850; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-weight: 950; font-size: clamp(3.1rem, 8vw, 7.4rem); letter-spacing: -.026em; line-height: .94; text-wrap: balance; margin-bottom: 17px; color: #ffdbb6; }
.hero-copy > p:not(.eyebrow) { font-size: clamp(1rem,2vw,1.2rem); max-width: 32ch; }
.primary { display: inline-flex; min-height: 46px; align-items: center; padding: .65rem 1.05rem; border-radius: 10px; text-decoration: none; background: linear-gradient(120deg,var(--peach),var(--pink)); color: #201226; font-weight: 820; }
.primary:hover { color: #201226; filter: brightness(1.1); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 14px; }
body:not([data-page="home"]) main { padding-top: 24px; }
main :is(.section-head,.guide-section) h1 { font-size: clamp(2rem,5vw,3.7rem); line-height: 1.1; letter-spacing: -.035em; margin-bottom: .35rem; }
h2 { font-size: clamp(1.8rem,4vw,3rem); letter-spacing: -.055em; margin-bottom: .35rem; line-height: 1.1; }
.section-head p, .guide-intro, .credits, footer { color: var(--muted); margin-bottom: 0; }
.progress { flex: 0 0 auto; color: var(--muted); text-align: right; }
.progress strong { display: block; color: var(--mint); font-size: 1.75rem; line-height: 1.1; }
.atlas { margin-inline: calc(-1 * var(--page-gutter)); border-block: 1px solid var(--line); display: grid; grid-template-columns: clamp(270px, 21vw, 320px) minmax(0,1fr); overflow: hidden; }
aside { min-width: 0; padding: 16px; background: var(--panel); border-right: 1px solid var(--line); max-height: 610px; overflow: auto; }
aside > label, .guide-tools label { display: block; font-weight: 730; margin-bottom: 7px; }
.search-field { position: relative; }
input[type=search] { color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; width: 100%; min-height: 44px; padding: 9px 11px; }
.search-field input:placeholder-shown { padding-right: 34px; }
.search-field kbd { display: none; }
#suggestions { display: grid; gap: 4px; margin-top: 7px; }
#suggestions button { text-align: left; }
#suggestions small { display: block; color: var(--muted); }
#suggestions p { margin: 4px 0; color: var(--muted); }
@media (pointer:fine) { .search-field input:placeholder-shown + kbd { display: block; position: absolute; right: 9px; top: 10px; border: 1px solid var(--line); padding: 1px 6px; border-radius: 4px; color: var(--muted); } }
.actions, .hide { margin: 10px 0; }
.actions button { flex: 1; font-size: .84rem; }
.hide, .filter { display: flex; align-items: center; gap: 9px; min-height: 40px; cursor: pointer; }
.map-scope { display: flex; align-items: center; gap: 8px; margin-top: 9px; min-height: 40px; font-size: .9rem; cursor: pointer; }
.cluster-items { display: grid; gap: 5px; margin-top: 10px; max-height: 145px; overflow: auto; }
.cluster-items button { text-align: left; }
.cluster-items small { display: block; color: var(--muted); }
button:disabled { opacity: .5; cursor: default; }
.filter small { margin-left: auto; color: var(--muted); }
.filter canvas { width: 22px; height: 22px; flex: 0 0 22px; }
input[type=checkbox] { accent-color: var(--mint); width: 18px; height: 18px; flex-shrink: 0; }
details { border-top: 1px solid var(--line); padding: 10px 0; }
#filter-panel { margin-top: 12px; }
summary { cursor: pointer; font-weight: 730; }
.stage { position: relative; height: 610px; min-width: 0; background: #2c68a6; overflow: hidden; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.stage canvas:active { cursor: grabbing; }
.stage canvas.has-marker { cursor: pointer; }
#map-tooltip { position: absolute; top: 0; left: 0; z-index: 2; pointer-events: none; max-width: min(240px, calc(100% - 16px)); padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #171223; box-shadow: 0 4px 12px #120b1f90; font-size: .85rem; font-weight: 720; overflow-wrap: anywhere; }
.tools, .status, #detail { position: absolute; }
.tools { right: 12px; top: 12px; display: flex; gap: 5px; }
.tools button { background: #1e1828f5; min-width: 44px; }
.status { bottom: 12px; left: 12px; background: #15111eea; border: 1px solid var(--line); border-radius: 8px; padding: .5rem .65rem; pointer-events: none; }
#detail { bottom: 58px; left: 12px; max-width: calc(100% - 24px); width: 330px; background: var(--panel); border: 1px solid var(--pink); border-radius: 12px; padding: 14px; box-shadow: 0 12px 35px #120b1f90; }
#detail h3 { margin: 0 42px 4px 0; }
#detail p { color: var(--muted); margin-bottom: .75rem; }
#detail .close { position: absolute; right: 8px; top: 8px; min-width: 44px; }
.credits { font-size: .85rem; margin: 9px 0 0; }
.directory { margin: 24px 0 42px; }
.directory h3 { margin-bottom: .65rem; }
#results, .guide-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,255px),1fr)); gap: 10px; }
#results button, .guide-card { text-align: left; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
#results small { display: block; color: var(--muted); }
#more { margin-top: 12px; }
.guide-section { border-top: 1px solid var(--line); padding-block: 28px 34px; }
.guide-intro { max-width: 75ch; }
.guide-tools { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 16px 0 12px; }
.guide-tools > div:first-child { flex: 1 1 220px; max-width: 380px; }
.guide-tools > div:last-child { max-width: 100%; }
.guide-tools select { max-width: 100%; }
.guide-count { color: var(--muted); font-size: .9rem; margin-bottom: 10px; }
.guide-grid { grid-template-columns: repeat(auto-fill,minmax(min(100%,280px),1fr)); }
.guide-card { border-top: 2px solid var(--section-accent,var(--pink)); padding: 15px; }
.guide-card h3 { margin-bottom: .5rem; font-size: 1.1rem; }
.guide-card p { color: var(--muted); margin-bottom: .7rem; }
.guide-card p:last-child { margin-bottom: 0; }
.guide-card .metadata { color: var(--section-accent,var(--pink)); font-size: .85rem; }
.guide-card a, .text-link { color: var(--mint); }
.text-link { display: inline-flex; min-height: 44px; align-items: center; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
.guide-preview { position: fixed; z-index: 6; width: min(240px, calc(100vw - 16px)); padding: 8px; border: 1px solid var(--pink); border-radius: 11px; background: #21182e; color: var(--ink); box-shadow: 0 8px 22px #10091cb0; pointer-events: none; }
.guide-preview img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; border-radius: 6px; background: #15101f; }
.guide-preview strong { display: block; margin-top: 5px; font-size: .9rem; }
.guide-preview small { display: block; margin-top: 3px; color: var(--muted); }
.guide-source { margin: 14px 0 0; font-size: .9rem; color: var(--muted); }
#cars { --section-accent: var(--peach); }
#secrets { --section-accent: var(--mint); }
#news { --section-accent: #c6b6ff; }
.sequence { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 10px; padding: 0; list-style: none; }
.sequence kbd { display: inline-grid; place-items: center; width: 26px; height: 28px; background: #382b49; border: 1px solid #59466c; border-radius: 5px; font: 700 16px system-ui; }
footer { padding-bottom: 28px; }
@media (max-width: 900px) {
  .brand { width: min(100%, 185px); }
  html { scroll-padding-top: 112px; }
  .header-inner { grid-template-columns: minmax(0,1fr) auto; gap: 0 8px; padding-top: 5px; }
  nav { grid-column: 1 / -1; grid-row: 2; overflow-x: auto; justify-content: safe center; gap: 16px; }
  nav a { display: flex; align-items: center; min-height: 44px; padding: 5px 1px; font-size: .9rem; }
  .languages { grid-column: 2; grid-row: 1; }
}
@media (max-width: 760px) {
  .intro { min-height: 320px; background-position: center,center,62% center,center; }
  .atlas { grid-template-columns: minmax(0,1fr); }
  aside { max-height: 290px; border-right: 0; border-bottom: 1px solid var(--line); }
  .stage { height: clamp(330px,59svh,510px); }
  .progress { font-size: .82rem; }
}


.explore-section { margin: 1.6rem 0 2.2rem; }
.explore-section .guide-grid { align-items: start; margin: .8rem 0; }
.explore-list { list-style: none; margin: 0 0 .8rem; padding: 0; }
.explore-list li { padding: .65rem 0; border-bottom: 1px solid var(--line); }
.explore-list li p { margin: .25rem 0 .4rem; }
.explore-list label, .explore-number { display: flex; align-items: center; gap: .5rem; margin: .5rem 0; }
.explore-number input { width: 5.25rem; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: .4rem; }
.explore-section progress { width: 100%; accent-color: var(--mint); }
#detail { max-height: calc(100% - 120px); overflow: auto; }
#detail a + button { display: block; margin-top: .55rem; }
.explore-visual { margin: 0 0 .8rem; }
.explore-visual img, .explore-visual .explore-map-preview, .guide-preview .explore-map-preview { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 7px; }
.explore-visual img { object-fit: cover; background: #2c68a6; }
.explore-visual figcaption { margin-top: .25rem; color: var(--muted); font-size: .75rem; }
.explore-map-link { display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; }
.explore-map-preview { position: relative; display: block; width: 65px; aspect-ratio: 16 / 10; flex-shrink: 0; border-radius: 5px; overflow: hidden; background: #2c68a6 url('assets/leonida.webp') var(--preview-x) var(--preview-y) / 420% auto no-repeat; }
.explore-map-preview::after { content: ''; position: absolute; left: var(--preview-x); top: var(--preview-y); transform: translate(-50%,-50%); width: 25%; aspect-ratio: 1; border: 2px solid #ffe7f1; border-radius: 50%; background: #ff92c35c; }
.explore-menu-preview { display: grid; align-content: center; gap: .35rem; min-height: 100px; padding: 1rem; border-radius: 7px; border: 1px solid var(--line); background: #15101f; }
.explore-menu-preview small { color: var(--muted); }
.explore-menu-preview strong { color: var(--mint); }

.weapon-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0; }
.weapon-found { display: flex; align-items: center; gap: .5rem; margin-top: .6rem; }
.reference-filters > label { display: block; margin: .65rem 0 .35rem; font-weight: 700; }
.reference-note { margin: .45rem 0 .7rem; color: var(--muted); font-size: .8rem; }
.reference-filter-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: .45rem; }
.reference-filter-row label { min-width: 0; }
.reference-filter-row label span { overflow-wrap: anywhere; }
.reference-filter-row > a { color: var(--mint); font-size: .72rem; }
