:root {
  color-scheme: light;
  --ink: #242822;
  --muted: #555d54;
  --line: #d4d8ce;
  --paper: #f7f7f1;
  --warm: #ebeee4;
  --white: #fdfdf8;
  --accent: #a74519;
  --bright: #eb8d4f;
  --sea: #172229;
  font-family: "Instrument Sans", "Segoe UI", "Malgun Gothic", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button, input, select, a { touch-action: manipulation; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #ba5d33; outline-offset: 2px; }
.topbar { display:grid; grid-template-columns:minmax(240px,1fr) auto minmax(240px,1fr); align-items:stretch; min-height:68px; background:#222820; color:#f5f4e9; padding:0 24px; }
.brand { display:flex; align-items:center; gap:12px; width:max-content; }
.brand-mark { width:27px; height:27px; border:1px solid #a45b35; background:#322e23; display:grid; place-items:center; }
.brand-mark::after { content:""; width:14px; height:13px; background:var(--bright); clip-path:polygon(0 57%,28% 57%,28% 24%,53% 45%,53% 18%,100% 49%,100% 98%,0 98%); }
.brand strong { display:block; font-size:19px; font-weight:730; letter-spacing:-.025em; line-height:1.1; }
.brand div span { display:block; color:#c7cabc; margin-top:3px; font-size:11px; letter-spacing:.03em; }
.tabs { display:flex; gap:6px; }
.tabs button { border:0; border-bottom:3px solid transparent; background:none; color:#daddcf; min-width:98px; padding:0 15px; font-size:14px; }
.tabs button[aria-current] { color:#fffdfa; border-bottom-color:var(--bright); background:#2d342b; font-weight:700; }
.header-end { display:flex; align-items:center; justify-content:flex-end; gap:14px; }
.header-end a { font-size:12px; color:#d6d9cb; text-decoration:none; white-space:nowrap; }
.home-short { display:none; }
.header-end a:hover { text-decoration:underline; }
.header-end select { max-width:155px; min-height:36px; color:#fffdf0; background:#30372e; border-color:#67705e; }
.loading { padding:32px; color:var(--muted); }
.map-page { display:grid; grid-template-columns:332px minmax(0,1fr); height:calc(100dvh - 68px); min-height:500px; }
.sidebar { display:flex; flex-direction:column; min-height:0; min-width:0; border-inline-end:1px solid #2c3026; }
.filters { flex-shrink:0; border-bottom:1px solid var(--line); padding:21px 20px 15px; }
h1,h2,h3,p { margin:0; }
h1 { font-size:23px; line-height:1.25; letter-spacing:-.045em; }
.titleline,.recipe-heading { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-bottom:15px; }
.search { display:flex; align-items:center; gap:10px; background:var(--white); border:1px solid #aeb6a8; border-radius:4px; padding:0 11px; min-height:43px; }
.search:focus-within { border-color:var(--accent); outline:1px solid var(--accent); }
.search input { padding:9px 0; border:0; outline:0; color:var(--ink); background:transparent; width:100%; min-width:0; font-size:14px; }
.search input::placeholder { color:#60675c; }
.magnify { width:12px; height:12px; border:1.6px solid #555d54; border-radius:50%; display:block; position:relative; flex-shrink:0; margin-inline-end:2px; }
.magnify::after { content:""; position:absolute; width:5px; height:1.5px; bottom:-2px; inset-inline-end:-4px; background:#555d54; transform:rotate(46deg); }
.control { min-width:0; margin-top:12px; display:grid; gap:4px; }
.control label { font-size:12px; font-weight:650; color:var(--muted); }
select { border:1px solid #adb7a6; border-radius:4px; background:var(--white); color:var(--ink); font-size:13px; padding:6px 8px; width:100%; min-height:36px; }
.filter-grid { display:grid; grid-template-columns:1fr 1fr; gap:0 8px; }
#costControl { grid-column:1/-1; }
.link-button { padding:0; border:0; background:transparent; color:var(--accent); font-size:12px; font-weight:650; text-align:start; text-decoration:underline; text-underline-offset:3px; }
#clearFilters { margin-top:14px; }
.ingredient-scope { display:grid; gap:4px; margin-top:10px; padding:6px 9px; background:var(--warm); border:1px solid var(--line); border-radius:4px; }
.ingredient-scope-title { display:flex; justify-content:space-between; align-items:center; gap:8px; }
#ingredientScopeName { min-width:0; font-size:14px; font-weight:650; }
#clearIngredient { padding:2px 8px; min-width:30px; min-height:30px; }
#backToRecipe { justify-self:start; padding-block:4px; }
.map-results { min-height:0; display:flex; flex-direction:column; flex:1; overflow:hidden; }
.result-head { display:flex; justify-content:space-between; gap:8px; align-items:center; padding:12px 20px; color:var(--muted); border-bottom:1px solid var(--line); background:var(--warm); }
.result-head h2 { font-size:13px; color:var(--ink); }
.result-head span,#recipeCount { font-size:12px; color:var(--muted); font-variant-numeric:tabular-nums; }
#pinResults { overflow:auto; min-height:0; overscroll-behavior:contain; scrollbar-width:thin; }
.group { border-bottom:1px solid var(--line); }
.group summary { cursor:pointer; min-height:46px; list-style:none; display:flex; align-items:center; gap:10px; padding:8px 20px; font-size:13px; font-weight:680; }
.group summary::-webkit-details-marker { display:none; }
.group summary::after { content:"›"; font-weight:600; color:var(--muted); font-size:18px; line-height:1; }
.group[open] summary::after { transform:rotate(90deg); }
.icon-caption { display:inline-flex; align-items:center; gap:8px; min-width:0; }
.icon-caption > span:last-child { min-width:0; overflow-wrap:anywhere; }
.generic-icon { width:24px; height:24px; flex:none; display:inline-grid; place-items:center; }
.generic-icon::after { content:""; width:11px; height:11px; border:1.5px solid #64705f; border-radius:2px; transform:rotate(45deg); }
.recipe-row .generic-icon { width:32px; }
.thumbnail { display:block; width:24px; height:24px; object-fit:contain; flex:none; }
.group summary .icon-caption { flex:1; }
.group summary .key, .detail-top h2 .key { margin-inline:7px; }
.place .thumbnail,.detail-info .thumbnail { width:20px; height:20px; }
.detail-top h2 .thumbnail { width:36px; height:36px; }
.recipe-detail h2 .thumbnail { width:42px; height:42px; }
.recipe-row .thumbnail { width:32px; height:32px; }
.recipe-summary { display:grid; gap:3px; min-width:0; overflow-wrap:anywhere; }
.group-count { color:var(--muted); font-weight:500; margin-inline-start:auto; font-size:12px; }
.group[open] > summary { background:#edf0e8; }
.place,.recipe-row { width:100%; border:0; background:transparent; text-align:start; cursor:pointer; }
.place { display:grid; gap:4px; padding:9px 20px 9px 40px; border-top:1px solid #e4e7de; font-size:13px; }
.place small,.recipe-row small { color:var(--muted); }
.place:hover,.recipe-row:hover,.place[aria-current],.recipe-row[aria-current] { background:#e9ede1; }
.place[aria-current], .recipe-row[aria-current] { box-shadow:inset 3px 0 var(--accent); }
.empty { color:var(--muted); padding:20px; font-size:14px; line-height:1.6; }
.map-stage { position:relative; min-width:0; min-height:0; overflow:hidden; isolation:isolate; background:var(--sea); color:#fbfff8; }
#atlas { display:block; width:100%; height:100%; touch-action:none; cursor:grab; outline-offset:-3px; }
#atlas.dragging { cursor:grabbing; }
.map-top,.map-bottom { position:absolute; inset-inline:16px; display:flex; justify-content:space-between; align-items:flex-start; gap:10px; pointer-events:none; }
.map-top { top:16px; }
.map-bottom { bottom:16px; align-items:flex-end; }
.map-tools,.map-build,.scale,.map-help { background:#1d2829f5; border:1px solid #5d6a65; border-radius:4px; }
.map-build { padding:8px 10px; font-size:12px; display:flex; align-items:center; gap:8px; }
.map-build #buildVersion { color:#d5decf; font-size:11px; font-variant-numeric:tabular-nums; margin-inline-start:4px; }
.signal { width:6px; height:6px; background:var(--bright); }
.map-tools { display:flex; pointer-events:auto; }
.map-tools button { border:0; border-inline-end:1px solid #535f5a; background:transparent; color:#f7fbf3; font-size:19px; min-height:36px; width:38px; }
.map-tools button:last-child { border-inline-end:0; }
.map-tools button:hover { background:#384743; }
.map-tools #waterToggle { width:auto; padding-inline:8px; font-size:12px; white-space:nowrap; }
.map-tools #waterToggle[aria-pressed="true"] { background:#244e5b; color:#c4edff; }
.map-stage:fullscreen { width:100vw; height:100vh; }
.map-stage.fullscreen-fallback { position:fixed; inset:0; z-index:4; }
.map-help { padding:6px 9px; color:#e0e9dc; font-size:11px; }
.scale { display:grid; gap:4px; padding:7px 8px; font-size:11px; direction:ltr; }
.scale i { display:block; height:5px; border:solid #f0f2e7; border-width:0 1px 1px; }
.pin-detail { position:absolute; inset-inline-end:16px; bottom:52px; width:min(330px,calc(100% - 32px)); max-height:calc(100% - 110px); overflow:auto; padding:15px; background:#f7f8ef; color:var(--ink); border:1px solid #aeb6a8; border-radius:4px; box-shadow:0 8px 30px #1118; }
.detail-top { display:flex; align-items:start; justify-content:space-between; gap:10px; }
.detail-top h2 { font-size:18px; line-height:1.25; }
.close-detail { width:28px; height:28px; border:1px solid var(--line); background:white; border-radius:3px; line-height:1; font-size:19px; flex-shrink:0; }
.detail-meta { margin-top:5px; color:var(--muted); font-size:12px; line-height:1.5; }
.detail-info { margin:13px 0; padding:9px 10px; border-inline-start:3px solid var(--accent); background:#e9ede1; font-size:14px; line-height:1.45; }
.detail-info div + div { margin-top:5px; }
.detail-actions { display:flex; gap:12px; flex-wrap:wrap; margin-top:9px; }
.key { display:inline-block; width:10px; height:10px; border-radius:50%; background:var(--key); border:1px solid #303a31; flex:none; }
.key.drop_pod { border-radius:1px; }
.key.fracking_core,.key.fracking_satellite { transform:rotate(45deg); border-radius:1px; }
.key.player_start_anchor { clip-path:polygon(50% 0,100% 100%,0 100%); border-radius:0; }
.key.collectible { border-radius:0; clip-path:polygon(50% 0,64% 32%,100% 37%,74% 62%,80% 100%,50% 81%,20% 100%,26% 62%,0 37%,36% 32%); }
.key.world_item { width:11px; height:8px; border-radius:2px; }
.key.hand_deposit { border-radius:0; clip-path:polygon(0 85%,15% 32%,60% 5%,100% 40%,90% 85%); }
.recipes-page { width:min(1220px,100%); margin-inline:auto; padding:28px 26px; display:grid; grid-template-columns:minmax(280px, 380px) minmax(0,1fr); gap:26px; align-items:start; min-height:calc(100dvh - 68px); }
.recipe-index { list-style:none; min-width:0; }
.recipe-results { margin-top:15px; border:1px solid var(--line); background:var(--white); border-radius:4px; max-height:calc(100dvh - 260px); overflow:auto; }
.recipe-row { min-height:55px; display:flex; align-items:center; gap:10px; padding:9px 12px; border-bottom:1px solid var(--line); font-size:14px; }
.recipe-row:last-child { border-bottom:0; }
.recipe-detail { background:var(--white); border:1px solid var(--line); border-top:3px solid var(--accent); padding:24px; min-width:0; border-radius:4px; }
.recipe-detail h2 { font-size:26px; line-height:1.25; letter-spacing:-.04em; }
.recipe-detail h3 { font-size:15px; margin-bottom:8px; }
.recipe-detail p { color:var(--muted); font-size:14px; line-height:1.55; }
.recipe-detail section { margin-top:19px; padding-top:15px; border-top:1px solid var(--line); }
.formula { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.pair-list { list-style:none; margin:0; padding:0; }
.pair-list li { display:flex; justify-content:space-between; gap:10px; padding:5px 0; font-size:14px; }
.pair-list em { font-style:normal; font-variant-numeric:tabular-nums; flex:none; }
.pair-list .has-ingredient-map-link { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; row-gap:1px; }
.ingredient-map-link { grid-column:1/-1; justify-self:start; min-height:30px; overflow-wrap:anywhere; }
.path-box { background:var(--warm); border-inline-start:2px solid #a1ad97; padding:11px 12px; font-size:13px; line-height:1.5; }
.path-box + .path-box { margin-top:10px; }
.path-box strong { display:block; line-height:1.5; }
.path-box ol { padding-inline-start:18px; margin:7px 0 0; }
.path-box li + li { margin-top:9px; }
.route-meta { font-size:12px !important; margin-top:3px; }
.recipe-actions { margin-top:12px; }
.more,.quiet { padding:7px 10px; border:1px solid #aeb6a8; background:var(--white); color:var(--ink); border-radius:4px; font-size:13px; }
.more { margin:10px; }
.mobile-only { display:none; }
@media(max-width: 900px) {
  .topbar { padding-inline:14px; grid-template-columns:minmax(160px,1fr) auto minmax(150px,1fr); }
  .home-long { display:none; }
  .home-short { display:inline; }
  .map-page { grid-template-columns:285px minmax(0,1fr); }
  .filters { padding-inline:14px; }
}
@media(max-width: 700px) {
  .topbar { padding:0 12px; min-height:0; grid-template-columns:1fr auto; grid-template-rows:50px 42px; }
  .tabs { grid-column:1/-1; grid-row:2; }
  .tabs button { flex:1; padding:0 5px; font-size:13px; }
  .header-end { grid-column:2; grid-row:1; gap:9px; }
  .brand strong { font-size:16px; }
  .brand div span { font-size:10px; }
  .brand-mark { width:24px; height:24px; }
  .header-end select { max-width:120px; min-height:34px; }
  .map-page { display:flex; flex-direction:column; min-height:0; height:auto; }
  .sidebar { display:contents; }
  .filters { order:0; padding:14px 12px 12px; }
  .titleline { margin-bottom:8px; }
  h1 { font-size:20px; }
  .mobile-only { display:inline-block; }
  #filterFields.collapsed { display:none; }
  .map-stage { order:1; height:clamp(360px,58dvh,590px); }
  .map-results { order:2; }
  #pinResults { overflow:visible; }
  .map-top,.map-bottom { inset-inline:8px; }
  .map-top { top:8px; }
  .map-bottom { bottom:8px; }
  .map-tools button { width:36px; min-height:37px; }
  .map-help { display:none; }
  .pin-detail { bottom:43px; inset-inline-end:8px; max-height:calc(100% - 108px); width:min(330px,calc(100% - 16px)); }
  .recipes-page { display:flex; flex-direction:column; gap:16px; padding:16px 12px; }
  .recipe-index,.recipe-detail { width:100%; }
  .recipe-results { max-height:300px; }
  .recipe-detail { padding:15px; }
}
@media (min-width:701px) and (max-height:520px) {
  .map-page { min-height:calc(100dvh - 68px); }
  .sidebar { overflow:auto; }
  .map-results { overflow:visible; flex:none; }
  #pinResults { overflow:visible; }
}
@media(prefers-reduced-motion:reduce) {
  * { scroll-behavior:auto !important; }
}

 .route-notice { padding:8px 16px; background:var(--warm); border-bottom:1px solid var(--line); font-size:13px; }
.share-link { display:inline-flex; align-items:center; flex-wrap:wrap; gap:4px 8px; min-width:0; max-width:100%; }
.share-link input { width:16em; max-width:100%; min-width:0; border:1px solid #aeb6a8; border-radius:4px; padding:6px; font-size:12px; }
 .field-key { padding:5px 8px; max-width:55%; border:1px solid #5d6a65; border-radius:4px; background:#1d2829; font-size:11px; text-align:right; }
.unofficial { padding:10px 16px; min-height:30px; font-size:11px; background:#1d2829; color:#e5ebdd; }
.map-page { height:max(520px,calc(100dvh - 98px)); }
@media(max-width:700px){.map-page{height:auto;} .field-key{font-size:10px;} }

