/* Detective field atlas. Raster maps, Canvas vectors, warm paper and forest controls. */
body { background:#152820; color:#f5eedc; font-family:Arial, sans-serif; display:flex; flex-direction:column; height:100dvh; }
#header { background:#f1ead6; color:#22382a; box-shadow:none; padding:14px 20px; gap:12px; flex-wrap:wrap; }
#header h1 { font-family:Georgia,serif; font-size:clamp(21px,2vw,30px); letter-spacing:-.5px; }
#header a { color:#22382a; font-size:16px; }
.xp-display { border:1px solid #b3b299; color:#22382a; background:#e2dac0; }
#game-modes { background:#22382a; border-bottom:2px solid #c8aa5a; flex-wrap:wrap; overflow:visible; padding:10px 16px; }
.mode-btn { background:#314a38!important; border-color:#6d8069!important; color:#fff!important; font-size:15px; padding:10px 13px; border-radius:5px; }
.mode-btn.active { background:#e6c773!important; color:#1d3022!important; box-shadow:none; }
#container { flex:1; min-height:0; height:auto; }
#sidebar { background:#152820; width:370px; padding:20px; }
#sidebar p,#sidebar label { font-size:16px; line-height:1.5; }
.btn { font-size:16px!important; min-height:44px; border-radius:5px; }
.stat-box,.challenge-item,.mission-card { background:#233b2c; }
.section { background:#21382b; border-color:#56684f; }
.section h2 { border-color:#708267; }
.section>div:not(.stat-grid) { border-color:#697b61!important; }
.location-sidebar { background:#f1ead6!important; color:#22382a!important; max-width:min(500px,100vw)!important; }
.location-sidebar .card-content,.location-sidebar .sidebar-header,.location-sidebar .info-card { color:#22382a!important; background:#f1ead6!important; }
.location-sidebar h3,.location-sidebar h4,.location-sidebar p { color:#22382a!important; }
.location-sidebar .sidebar-header { border-bottom:2px solid #b3b299; }
.location-sidebar .sidebar-content { font-size:16px; }
button:focus-visible,a:focus-visible,input:focus-visible { outline:3px solid #efbb4b; outline-offset:3px; }
#gen-alpha-loading { display:none!important; }
.collection-dialog{position:fixed;inset:5dvh 5vw;margin:auto;width:min(680px,90vw);max-height:85dvh;overflow:auto;background:#f1ead6;color:#22382a;border:2px solid #78866c;padding:24px;border-radius:6px}.collection-dialog h2{font:28px Georgia,serif}.collection-dialog p{margin:16px 0;overflow-wrap:anywhere}.collection-dialog::backdrop{background:#10251dcc}
@media(max-width:800px) {
 body { height:auto; min-height:100dvh; overflow:auto; }
 #header { padding:14px; }
 #header h1 { flex-basis:100%; }
 #game-modes { gap:6px; padding:10px; }
 .mode-btn { flex:1 1 40%; white-space:normal; }
 #container { display:flex; flex-direction:column; }
 #map { height:52dvh; min-height:330px; flex:none; width:100%; }
 #sidebar { width:100%; max-height:none; overflow:visible; }
 .location-sidebar { width:100%!important; top:0!important; height:100dvh!important; }
 .toast-container { max-width:calc(100vw - 24px); }
 #population-legend { max-width:80%; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; } }
.btn {background:#dec574!important;color:#1e3126!important}.btn-secondary{background:#314a38!important;color:#f6eac9!important}
.location-sidebar .fact-label,.location-sidebar .fact-value,.location-sidebar .collection-text,.location-sidebar #locations-explored-count,.location-sidebar .location-coordinates {color:#233b2c!important}
.location-sidebar .fact-item {background:#fbf8ef!important;border-left:3px solid #7e9070!important;gap:16px}
.location-sidebar .fact-label {font-weight:600}.location-sidebar .fact-value{text-align:right;max-width:62%;overflow-wrap:anywhere}
.location-sidebar .card-header,.location-sidebar .collection-badge {background:#e4e8d8!important;color:#233b2c!important;border-color:#bec9b2!important;box-shadow:none!important}
.location-sidebar .card-toggle,.location-sidebar .coord-format-toggle,.location-sidebar .location-badge,.location-sidebar .card-header h4,.location-sidebar .sidebar-controls button {color:#233b2c!important}
.location-sidebar .coord-format-toggle,.location-sidebar .location-badge,.location-sidebar .location-coordinates,.location-sidebar .sidebar-controls button {background:#fbf8ef!important;border-color:#aab89c!important}
.location-sidebar a {color:#28553c!important;text-decoration:underline}.location-sidebar .sidebar-content::-webkit-scrollbar-thumb{background:#879878!important}
/* The reference drawer replaces the old placeholder-card stack. */
.location-sidebar.field-explorer {position:fixed!important;inset:16px 16px 16px auto!important;height:calc(100dvh - 32px)!important;width:470px!important;max-width:calc(100vw - 32px)!important;border:1px solid #8a9c80!important;border-radius:10px!important;background:#f6f3e9!important;box-shadow:0 12px 48px #112a2b55!important;display:flex;flex-direction:column;color:#243f31!important;font-family:Arial,sans-serif}
.fe-top{display:flex;align-items:center;justify-content:space-between;padding:13px 20px;border-bottom:1px solid #c5cfb9;background:#e8eddf;flex:none}.fe-eyebrow{font-size:12px;font-weight:700;letter-spacing:1.6px;color:#39583f}.fe-close,.fe-button{background:#fffdf7;color:#254332;border:1px solid #a8b899;border-radius:5px;min-height:44px;padding:10px 14px;font:600 14px Arial,sans-serif;cursor:pointer}.fe-body{overflow:auto;padding:22px 22px 30px;flex:1;min-height:0;scrollbar-color:#829776 #e8eddf}.fe-kicker{font-size:13px;text-transform:uppercase;letter-spacing:.7px;color:#53694e!important;margin-bottom:7px!important}.fe-title{font:700 29px/1.16 Georgia,serif!important;color:#203f2d!important;margin:0 0 10px!important;overflow-wrap:anywhere}.fe-coordinates{font:15px/1.5 Arial,sans-serif;color:#405547!important;margin:8px 0!important}.fe-country-line{font-weight:600;margin-bottom:24px!important}.fe-card{background:#fffdf7;border:1px solid #cbd5c0;border-radius:7px;padding:18px;margin-top:18px;color:#253e30;box-shadow:none}.fe-section-title{font:700 19px/1.3 Georgia,serif!important;margin:0 0 14px!important}.field-explorer .fe-card h4{font-size:15px;margin:18px 0 5px!important;color:#254332!important}.field-explorer .fe-card p,.field-explorer .fe-card li{font-size:15px;line-height:1.62;margin:8px 0;color:#2d4337!important;overflow-wrap:anywhere}.fe-facts{display:grid;grid-template-columns:minmax(100px,1fr) minmax(0,1.65fr);gap:10px 14px;font-size:14px;line-height:1.5}.fe-facts dt{color:#52614d;font-weight:500}.fe-facts dd{margin:0;color:#223e2c;font-weight:600;overflow-wrap:anywhere}.field-explorer .fe-muted{color:#56634f!important;font-size:13px!important}.fe-read-more{display:block;margin-top:16px;font-size:15px;font-weight:600}.fe-regions{list-style:none;padding:0}.fe-regions li{display:flex;gap:14px;justify-content:space-between;padding:8px 0;border-bottom:1px solid #dfe5d7}.fe-regions small{color:#617056;font-size:12px;flex:none}.fe-card ol{padding-left:22px}.fe-card .fe-button{display:block;margin:12px 0}.fe-body::-webkit-scrollbar{width:9px}.fe-body::-webkit-scrollbar-thumb{background:#829776;border:2px solid #e8eddf;border-radius:5px}
@media(max-width:800px){.location-sidebar.field-explorer{inset:0!important;width:100vw!important;max-width:100vw!important;height:100dvh!important;border-radius:0!important}.fe-body{padding:18px 16px 26px}.fe-title{font-size:27px!important}.fe-top{padding:10px 16px}.fe-facts{grid-template-columns:1fr 1.5fr}.fe-regions li{display:block}.fe-regions small{display:block;margin-top:3px}.fe-card{padding:16px}}
body:has(.field-explorer.active) .notification{top:auto;bottom:20px;left:20px;right:auto;max-width:calc(100vw - 40px);background:#e8eddf;color:#243f31;border:1px solid #a8b899;box-shadow:0 4px 16px #112a2b33;font-size:14px}
.field-explorer a:focus-visible,.field-explorer button:focus-visible{outline:3px solid #935c13;outline-offset:3px}
.field-explorer:not(.active){visibility:hidden;pointer-events:none}
