@font-face {font-family:'Eurostile';src:local('Eurostile');font-weight:400 500;font-style:normal;font-display:swap;}
@font-face {font-family:'Eurostile';src:local('Eurostile Bold');font-weight:600 900;font-style:normal;font-display:swap;}

:root {
 color-scheme: dark;
 --canvas: #000000;
 --panel: #282828;
 --raised: #333333;
 --rule: #444444;
 --ink: #f2f2f2;
 --muted: #d0d0d0;
 --dim: #c2c2c2;
 --accent: #ff5500;
 --panel-width: 300px;
 font-family: 'Eurostile', sans-serif;
 font-size: 13px;
 color: var(--ink);
 background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; overflow: hidden; overscroll-behavior: none; }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
button, a, input, select, summary { outline-offset: 3px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); }
button { color: inherit; background: none; border: 0; cursor: pointer; }
button:hover { color: white; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
kbd { font: 11px 'Eurostile', sans-serif; color: var(--dim); }
#map { position: fixed; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
#map:active { cursor: grabbing; }
.controls { position: fixed; top: 16px; left: 16px; width: 278px; padding: 12px; background: var(--panel); border: 1px solid var(--rule); z-index: 3; }
.identity { display: flex; justify-content: space-between; align-items: center; margin: 0 0 12px; }
.identity a { font: 600 19px/1 'Eurostile', sans-serif; }
.identity span { margin-left: 8px; font: 400 10px 'Eurostile', sans-serif; color: var(--muted); }
.identity button { font-size: 11px; color: var(--muted); padding: 6px 0 6px 8px; text-decoration: underline; text-underline-offset: 3px; }
.searchbox { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px; background: var(--canvas); border: 1px solid #666666; color: var(--muted); }
.searchbox:focus-within { border-color: var(--ink); }
.searchbox input { min-width: 0; width: 100%; border: 0; outline: 0; background: none; color: var(--ink); font-size: 12px; }
.searchbox input::placeholder { color: var(--dim); }
.searchbox kbd { padding: 0 3px; }
#results { margin-top: 4px; max-height: 390px; overflow: auto; background: var(--panel); border: 1px solid var(--rule); }
#results button { display: flex; width: 100%; align-items: center; gap: 8px; padding: 10px 8px; text-align: left; border-bottom: 1px solid var(--rule); }
#results button:last-child { border: 0; }
#results button:hover, #results button:focus { background: var(--raised); }
#results .result-title { flex: 1; line-height: 1.5; font-size: 12px; }
#results small { color: var(--muted); font-size: 11px; }
#results .kind { color: var(--dim); font-size: 10px; min-width: 32px; }
#results .empty { padding: 12px; color: var(--muted); font-size: 12px; line-height: 1.6; }
#chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
#chips:empty { margin: 0; }
#chips button { border-bottom: 1px solid var(--accent); padding: 3px 0; color: var(--ink); font-size: 11px; }
#chips b { margin-left: 8px; font-weight: 400; color: var(--muted); }
details { margin-top: 12px; border-top: 1px solid var(--rule); }
summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 10px 0; cursor: pointer; font-size: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--muted); font-size: 15px; }
details[open] summary::after { content: '−'; }
summary span { margin-left: auto; color: var(--dim); font-size: 11px; }
.filterbody { display: grid; gap: 16px; padding: 4px 0 12px; }
.field { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.field > span { margin-left: auto; color: var(--ink); }
.field input[type=range] { width: 100%; height: 3px; accent-color: var(--accent); margin: 6px 0; }
.field select { max-width: 155px; padding: 4px; margin-left: auto; border: 1px solid var(--rule); background: var(--canvas); color: var(--ink); font-size: 11px; border-radius: 0; }
.filter-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.filter-row label { display: flex; align-items: center; gap: 6px; }
.filter-row input { margin: 0; accent-color: var(--ink); }
.filter-row button { padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; }
.map-count { display: flex; justify-content: space-between; gap: 8px; padding-top: 4px; color: var(--muted); font-size: 10px; }
.map-count #state { color: var(--dim); }
#loading { position: fixed; inset: 0; display: flex; justify-content: center; align-items: center; gap: 12px; background: var(--canvas); color: var(--muted); z-index: 10; font-size: 13px; }
#loading.error { color: #ff5500; }
.spinner { width: 12px; height: 12px; border: 1px solid var(--rule); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#tooltip { position: fixed; pointer-events: none; z-index: 6; max-width: 270px; padding: 8px 10px; border: 1px solid #777777; background: var(--panel); color: var(--ink); font-size: 13px; line-height: 1.4; }
#tooltip small { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }
#detail, #related-panel { position: fixed; top: 0; bottom: 0; width: var(--panel-width); height: 100dvh; background: var(--panel); z-index: 4; overflow: auto; scrollbar-width: thin; scrollbar-color: #6b6b6b var(--panel); }
#detail { left: 0; padding: 0 20px 24px; border-right: 1px solid var(--rule); }
#related-panel { right: 0; padding: 20px 12px 24px; border-left: 1px solid var(--rule); }
.detail-top { position: relative; height: 44px; display: flex; align-items: center; font-size: 11px; color: var(--muted); }
#close { position: fixed; top: 12px; left: calc(var(--panel-width) - 36px); width: 24px; height: 24px; padding: 0; background: var(--canvas); color: var(--ink); font: 24px/1 'Eurostile', sans-serif; z-index: 7; }
#poster-wrap { margin: 0 -20px 16px; }
#poster-wrap:empty { display: none; }
#poster-wrap img { display: block; width: 100%; height: auto; aspect-ratio: 2/3; object-fit: cover; background: var(--canvas); }
#detail:has(#poster-wrap img) .detail-top { position: absolute; top: 0; color: transparent; }
#title { font: 600 24px/1.15 'Eurostile', sans-serif; margin: 0 0 8px; color: var(--ink); }
#metadata { font-size: 12px; color: var(--muted); line-height: 1.6; }
#rating { display: flex; align-items: center; gap: 8px; margin: 12px 0 16px; font-size: 11px; }
#rating .score { font: 500 18px 'Eurostile', sans-serif; font-variant-numeric: tabular-nums; color: var(--ink); }
#rating .rating-caption { font-size: 10px; color: var(--dim); line-height: 1.4; }
#genres { display: flex; flex-wrap: wrap; gap: 4px 12px; }
#genres button { padding: 2px 0; border-bottom: 1px solid #999999; color: var(--muted); font-size: 11px; }
#genres button:hover { color: var(--ink); border-color: var(--ink); }
#film-info { margin-top: 20px; font-size: 12px; line-height: 1.7; color: var(--muted); }
#film-info span { display: inline-block; padding-top: 4px; font-size: 11px; color: var(--ink); }
.synopsis { margin: 16px 0 0; font-size: 13px; line-height: 1.7; color: var(--ink); }
#keywords { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 16px; }
#keywords button { padding: 0; color: var(--muted); font-size: 11px; text-decoration: underline; text-decoration-color: #999999; text-underline-offset: 3px; }
.links { display: flex; gap: 16px; padding: 20px 0 0; font-size: 12px; color: var(--ink); }
.neighbors-head { position: sticky; top: -20px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; padding: 4px 6px 12px; background: var(--panel); z-index: 1; }
.neighbors-head h2 { font-size: 14px; font-weight: 500; margin: 0; }
.neighbors-head > span { font-size: 11px; color: var(--muted); }
.neighbor { display: flex; width: 100%; align-items: center; gap: 8px; padding: 10px 6px; text-align: left; border-bottom: 1px solid #505050; }
.neighbor:hover, .neighbor.hovered { background: var(--raised); }
.neighbor i { flex: none; width: 6px; height: 6px; border-radius: 50%; }
.neighbor .film { flex: 1; font-size: 13px; line-height: 1.4; }
.neighbor .film small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.neighbor .score { font-size: 12px; color: var(--ink); font-variant-numeric: tabular-nums; }
.note { margin-top: 20px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.bottom-left { position: fixed; left: 20px; bottom: 16px; pointer-events: none; color: var(--muted); font-size: 11px; line-height: 1.8; }
#map-info { color: var(--ink); }
.instructions { color: var(--dim); font-size: 10px; }
.navigation { position: fixed; right: 16px; bottom: 16px; display: flex; gap: 0; align-items: stretch; border: 1px solid var(--rule); background: var(--panel); }
.navigation > button, .zoom { border-right: 1px solid var(--rule); }
.navigation > button:last-child { border: 0; }
.navigation button { min-height: 36px; padding: 8px 10px; color: var(--muted); font-size: 11px; }
.navigation button:hover { background: var(--raised); color: var(--ink); }
.navigation button:active { background: #555555; }
.zoom { display: flex; align-items: center; }
.zoom button { padding: 4px 10px; font-size: 18px; }
.zoom span { min-width: 44px; color: var(--muted); font-size: 10px; text-align: center; font-variant-numeric: tabular-nums; }
.selected .controls { left: calc(var(--panel-width) + 16px); width: 255px; }
.selected .bottom-left { left: calc(var(--panel-width) + 16px); }
.selected .navigation { right: calc(var(--panel-width) + 16px); }
#panel-switch, #mobile-actions { display: none; }
dialog { width: calc(100% - 32px); max-width: 470px; padding: 24px; border: 1px solid #777777; background: var(--panel); color: var(--ink); }
dialog::backdrop { background: #0009; }
dialog h2 { margin: 0 28px 16px 0; font: 600 24px 'Eurostile', sans-serif; }
dialog p { color: var(--muted); font-size: 13px; line-height: 1.7; }
dialog a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.dialog-close { position: absolute; top: 12px; right: 12px; padding: 0; color: var(--muted); font-size: 24px; }
#world-labels { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 2; }
.world-label { position: absolute; left: 0; top: 0; height: 24px; padding: 2px 4px; border: 0; color: #dedede; background: transparent; font: 400 10px 'Eurostile', sans-serif; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: auto; cursor: zoom-in; will-change: transform; }
.world-label.major { color: var(--ink); font-size: 10px; font-weight: 400; }
.world-label:hover, .world-label:focus-visible { background: var(--canvas); color: white; text-decoration: underline; text-underline-offset: 3px; }
@media (min-width:701px) and (max-width:1050px) {
 :root { --panel-width: 250px; }
 .selected .controls { width: 210px; }
 .identity a { font-size: 20px; }
 .identity span { font-size: 10px; margin-left: 6px; }
 #title { font-size: 26px; }
}
@media (max-width:700px), (pointer:coarse) and (max-height:500px) {
 :root { --panel-width: min(270px,78vw); }
 button, input, select { -webkit-tap-highlight-color: transparent; }
 .controls { top: max(10px,env(safe-area-inset-top)); left: max(10px,env(safe-area-inset-left)); width: min(310px,calc(100vw - 20px)); }
 .identity button { min-height: 36px; }
 .searchbox { min-height: 46px; }
 .searchbox input { font-size: 16px; }
 .searchbox kbd { display: none; }
 #results { max-height: 45dvh; }
 #results button { min-height: 48px; }
 .field select { font-size: 16px; max-width: 165px; }
 summary { min-height: 44px; }
 #detail { padding: 0 16px 120px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
 #poster-wrap { margin: 0 -16px 16px; }
 #related-panel { display: none; padding: 16px 10px 120px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
 .selected .controls, .selected .bottom-left, #panel-switch { display: none !important; }
 .selected #mobile-actions { display: block; position: fixed; left: max(8px,env(safe-area-inset-left)); right: max(8px,env(safe-area-inset-right)); bottom: max(8px,env(safe-area-inset-bottom)); padding: 10px 8px 0; background: var(--panel); border: 1px solid var(--rule); z-index: 9; }
 #mobile-current { padding: 0 4px 8px; color: var(--ink); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
 .mobile-buttons { display: grid; grid-template-columns: repeat(3,1fr); gap: 0; border-top: 1px solid var(--rule); }
 .mobile-buttons button { min-height: 46px; padding: 8px 3px; border-bottom: 3px solid transparent; color: var(--muted); font-size: 12px; }
 .mobile-buttons button[aria-pressed=true] { border-bottom-color: var(--accent); color: var(--ink); }
 .selected.map-only #detail, .selected.map-only #related-panel { display: none !important; }
 .selected.show-related:not(.map-only) #related-panel { display: block; }
 .selected.show-related #detail { display: none; }
 .selected .navigation { display: none; }
 .selected.map-only .navigation { display: flex; bottom: calc(max(8px,env(safe-area-inset-bottom)) + 94px); right: 10px; z-index: 3; }
 .navigation { right: 10px; bottom: max(10px,env(safe-area-inset-bottom)); max-width: calc(100vw - 20px); flex-wrap: wrap; justify-content: flex-end; }
 .navigation button { min-width: 34px; min-height: 40px; padding: 6px 7px; font-size: 11px; }
 .navigation .zoom button { font-size: 20px; }
 .neighbor { min-height: 48px; }
 #genres button { min-height: 32px; }
 #close { top: max(8px,env(safe-area-inset-top)); left: calc(var(--panel-width) - 43px); width: 36px; height: 36px; font-size: 26px; }
 .dialog-close { min-width: 44px; min-height: 44px; }
 .neighbors-head { top: -16px; }
 .bottom-left { left: 12px; bottom: 60px; max-width: 260px; font-size: 10px; }
 .instructions { font-size: 10px; }
 .world-label { min-height: 30px; }
}
@media (pointer:coarse) and (max-height:500px) {
 #poster-wrap img { max-height: 160px; object-fit: contain; }
 #title { font-size: 24px; }
 .selected #mobile-actions { padding-top: 6px; }
 #mobile-current { padding-bottom: 4px; }
}
@media (prefers-reduced-motion:reduce) { .spinner { animation: none; } }
#related-sort{max-width:115px;border:1px solid var(--rule);background:var(--panel);color:var(--muted);font:400 11px 'Eurostile',sans-serif;padding:5px 2px;border-radius:0}
.neighbor .film .match-reason{color:var(--dim);font-size:10px;line-height:1.5}
@media(max-width:700px),(pointer:coarse) and (max-height:500px){#related-sort{min-height:40px;font-size:12px}}

/* Black, graphite and blaze orange supplied by the owner. */
#rating .score,.neighbor .score{color:var(--ink)}
.searchbox:focus-within{border-color:#ff5500}
.world-label{font-size:10px!important;font-weight:400!important;height:23px;background:#000000;padding:3px 6px;border:1px solid #393939}
.world-label.major{font-size:10px!important;font-weight:400!important}
.world-label:hover{border-color:#ff5500;background:#000000}
.mobile-buttons button[aria-pressed=true]{border-bottom-color:#ff5500}
.identity a{color:var(--muted)}
.identity a span{color:var(--muted)}

#detail,#related-panel{transition:transform 240ms cubic-bezier(.22,.61,.36,1),opacity 240ms ease;transform:translateX(0);opacity:1}
.panels-closing #detail{transform:translateX(-105%);opacity:0;pointer-events:none}
.panels-closing #related-panel{transform:translateX(105%);opacity:0;pointer-events:none}
#related-title{max-width:155px;line-height:1.4}
#use-as-source{margin-top:16px;padding:9px 0;border-bottom:1px solid var(--accent);text-align:left;font-size:12px;color:var(--ink)}
@media(prefers-reduced-motion:reduce){#detail,#related-panel{transition:none}}
.recommendation-scope{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:0 6px 12px;margin-bottom:6px;border-bottom:1px solid var(--rule);font-size:11px;color:var(--muted)}
#related-scope{max-width:160px;padding:5px 3px;border:1px solid var(--rule);border-radius:0;background:var(--panel);color:var(--ink);font:400 11px Eurostile,sans-serif}
@media(max-width:700px),(pointer:coarse) and (max-height:500px){#related-scope{min-height:40px;font-size:12px}}

#browse-close { display:none; }
.browsing #browse-close { display:block; font-size:24px; margin-left:auto; }
.browsing #related-panel { display:block; }
@media(max-width:700px){.browsing #related-panel {top:230px; width:min(270px,78vw);padding-bottom:30px;} }

@media(max-width:700px){.browsing #related-panel {height:auto;bottom:0;} }

.poster-fallback{aspect-ratio:2/3;display:flex;flex-direction:column;justify-content:space-between;padding:24px;background:#202020;border-bottom:1px solid var(--rule);color:var(--muted)}.poster-fallback strong{font-size:28px;line-height:1.2;color:var(--ink)}.poster-fallback small{font-size:11px}#watch{border-top:1px solid var(--rule);padding-top:16px;margin-top:18px}#watch h2{font-size:13px}#watch p{font-size:13px;line-height:1.6}#watch p span{color:var(--muted);font-size:11px}#watch small{display:block;margin-top:12px;font-size:10px;color:var(--muted)}#live-details:empty{display:none}

.rating-secondary{display:block;flex-basis:100%;font-size:11px;color:var(--muted);margin-top:6px}

#rating{flex-wrap:wrap}
