@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(fonts/inter-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 500; font-display: swap; src: url(fonts/inter-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(fonts/inter-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 700; font-display: swap; src: url(fonts/inter-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: Bricolage; font-weight: 600; font-display: swap; src: url(fonts/bricolage-grotesque-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: Bricolage; font-weight: 800; font-display: swap; src: url(fonts/bricolage-grotesque-latin-800-normal.woff2) format('woff2'); }

:root {
  --bg: #141210; --panel: #1B1815; --raised: #1E1A17; --land: #2C2622; --line: #3A332D;
  --text: #F4EEE6; --muted: #B5ABA0; --soft: #D9D0C5;
  --accent: #FF6B4A; --accent-ink: #1A0A05; --link: #FF8A6E; --error: #FFB4A2;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, system-ui, sans-serif; }
a { color: var(--link); } a:hover { color: #FFB4A2; }
button, input { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.page { max-width: 1440px; margin: 0 auto; padding: 28px 40px 32px; display: flex; flex-direction: column; gap: 24px; min-height: 100vh; }

.top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.intro { display: flex; flex-direction: column; gap: 8px; flex: 1 1 420px; min-width: 0; }
.brand { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--link); }
h1 { margin: 0; font-family: Bricolage, Inter, sans-serif; font-weight: 800; font-size: clamp(36px, 5vw, 56px); line-height: 1.02; letter-spacing: -.03em; overflow-wrap: anywhere; }

.search { flex: 0 1 520px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.search label { font-size: 13px; color: var(--muted); }
.search-row { display: flex; gap: 8px; }
#q { flex: 1; min-width: 0; min-height: 52px; border: 2px solid var(--line); border-radius: 999px; padding: 0 22px; background: var(--raised); color: var(--text); font-size: 17px; font-weight: 500; }
#q:focus { border-color: var(--accent); outline: none; }
#q::placeholder { color: #8A8076; }
#go { min-height: 52px; padding: 0 26px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 16px; font-weight: 700; cursor: pointer; }
#go:disabled { opacity: .6; cursor: progress; }
.search-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); }
.try { background: none; border: 0; padding: 4px 0; color: var(--soft); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 12px; }
#counter.near { color: var(--error); }
.privacy { margin: 0; font-size: 12px; color: var(--muted); }
.error { margin: 0; min-height: 0; font-size: 14px; color: var(--error); }
.error:empty { display: none; }
.turnstile:empty { display: none; }

.map-wrap { position: relative; height: 400px; border-radius: 24px; overflow: hidden; background: var(--panel); }
.map { position: absolute; inset: 0; }
.legend { position: absolute; left: 20px; top: 20px; display: flex; flex-wrap: wrap; gap: 14px; padding: 10px 14px; border-radius: 999px; background: var(--bg); font-size: 12px; color: var(--soft); }
.legend span { display: flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.exact { background: var(--accent); }
.dot.place { border: 2px solid var(--accent); }
.dot.country { border: 2px dashed var(--muted); }
.map-status { position: absolute; right: 20px; bottom: 30px; margin: 0; padding: 6px 12px; border-radius: 999px; background: var(--bg); font-size: 13px; color: var(--soft); }
.map-status:empty { display: none; }
.demo-banner { position: absolute; left: 50%; top: 20px; transform: translateX(-50%); margin: 0; padding: 8px 14px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 600; white-space: nowrap; }
.map-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; color: var(--muted); }
.maplibregl-ctrl-attrib { background: rgba(20,18,16,.8) !important; color: var(--muted); }
.maplibregl-ctrl-attrib a { color: var(--soft) !important; }
.maplibregl-ctrl-group { background: var(--land) !important; }
.maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(1); }

.strip-wrap { display: flex; flex-direction: column; gap: 12px; }
.strip-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
h2 { margin: 0; font-family: Bricolage, Inter, sans-serif; font-weight: 600; font-size: 22px; }
#strip-count { font-size: 14px; color: var(--muted); white-space: nowrap; }
.strip { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 10px; align-items: flex-start; scroll-snap-type: x proximity; }
.strip:empty { display: none; }
.empty { margin: 0; color: var(--muted); }

.card { flex: none; width: 140px; display: flex; flex-direction: column; gap: 8px; scroll-snap-align: start; transition: width .2s ease; }
.card.selected { width: 200px; }
.media { position: relative; width: 100%; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: var(--land); cursor: pointer; }
.card.selected .media { outline: 3px solid var(--accent); outline-offset: -3px; }
.media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.media .initial { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: Bricolage, Inter, sans-serif; font-size: 40px; font-weight: 800; color: var(--line); }
.play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 60px; height: 60px; border-radius: 50%; border: 0; background: var(--text); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.play svg { width: 24px; height: 24px; fill: var(--bg); margin-left: 3px; }
.no-video { position: absolute; inset: auto 10px 10px; margin: 0; padding: 8px; border-radius: 10px; background: var(--bg); font-size: 12px; color: var(--soft); }
.card-text { background: none; border: 0; padding: 0; text-align: left; color: var(--text); cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-height: 44px; }
.card-title { font-size: 13px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card.selected .card-title { font-size: 14px; }
.card-meta { font-size: 12px; color: var(--muted); }

.foot { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); }

@media (max-width: 700px) {
  .page { padding: 20px 16px 24px; }
  .map-wrap { height: 320px; border-radius: 18px; }
  .legend { top: auto; bottom: 30px; left: 12px; }
  .map-status { top: 12px; bottom: auto; left: 12px; right: auto; max-width: calc(100% - 72px); }
  .demo-banner { white-space: normal; width: calc(100% - 24px); text-align: center; top: 56px; }
}
@media (prefers-reduced-motion: reduce) { .card { transition: none; } }
