@font-face {
  font-family: 'Fira Game';
  src: url('/assets/fonts/fira-sans-extra-condensed-italic-900-latin.woff2') format('woff2');
  font-style: italic; font-weight: 900; font-display: swap;
}
@font-face {
  font-family: 'Fira Game';
  src: url('/assets/fonts/fira-sans-extra-condensed-italic-900-cyrillic.woff2') format('woff2');
  font-style: italic; font-weight: 900; font-display: swap;
  unicode-range: U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Roboto Condensed';
  src: url('/assets/fonts/roboto-condensed-normal-400-latin.woff2') format('woff2');
  font-weight: 100 900; font-display: swap;
}
@font-face {
  font-family: 'Roboto Condensed';
  src: url('/assets/fonts/roboto-condensed-normal-400-cyrillic.woff2') format('woff2');
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

:root {
  color-scheme: dark;
  --bg: #141613;
  --rail: #191c17;
  --panel: #20241e;
  --line: #383e32;
  --muted: #afb5a6;
  --ink: #eeeee5;
  --lime: #d6f642;
  --display: 'Fira Game', 'Arial Narrow', Impact, sans-serif;
  --body: 'Roboto Condensed', 'Arial Narrow', sans-serif;
  font: 16px/1.5 var(--body);
  color: var(--ink);
  background: var(--bg);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button:disabled, select:disabled { cursor: default; opacity: .55; }
button { border: 1px solid var(--line); background: var(--rail); }
button:hover, a:hover { color: var(--lime); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
img { display: block; max-width: 100%; }
p { color: var(--muted); margin: 0 0 1em; }
h1, h2, h3 { font: italic 900 2rem/1.05 var(--display); text-transform: uppercase; margin: 0; }
h3 { font-size: 1.5rem; }
[hidden] { display: none !important; }
.accent { color: var(--lime); }
.icon { width: 19px; height: 19px; display: inline-block; flex: none; vertical-align: middle; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip:focus { position: absolute; z-index: 20; inset: 5px auto auto 5px; color: var(--bg); background: var(--lime); padding: 8px; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: clamp(12px, 3vw, 45px); height: 70px; background: #121410; border-bottom: 1px solid var(--line); padding: 0 28px 0 22px; }
.brand { display: inline-flex; gap: 12px; align-items: center; white-space: nowrap; min-width: 188px; font: italic 900 2.1rem/.9 var(--display); }
.brand small { display: block; font: 700 .63rem/1.2 var(--body); letter-spacing: .14em; margin-top: 5px; color: var(--muted); }
.brand-mark { background: var(--lime); color: var(--bg); padding: 9px 8px 8px; min-width: 45px; text-align: center; clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%); }
.global-search { position: relative; display: flex; align-items: center; gap: 12px; flex: 1; max-width: 480px; background: #22251f; border: 1px solid var(--line); padding: 0 12px; }
.global-search span { color: var(--lime); font: 700 1.6rem/1 var(--body); }
.global-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: none; padding: 10px 0; }
.global-search:focus-within { outline: 1px solid var(--lime); }
kbd { border: 1px solid var(--line); border-radius: 3px; padding: 0 6px; color: var(--muted); }
.online { display: flex; margin-left: auto; gap: 9px; white-space: nowrap; align-items: center; color: var(--muted); }
.online i { background: #757d6f; width: 7px; height: 7px; border-radius: 50%; }
.online.ready:not(.stale) i { background: var(--lime); box-shadow: 0 0 9px #d6f64879; }
.online b { color: var(--ink); font-variant-numeric: tabular-nums; }
.menu { display: none; padding: 8px 12px; }
.shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: calc(100vh - 70px); }
.sidebar { position: sticky; top: 70px; align-self: start; height: calc(100vh - 70px); overflow-y: auto; background: var(--rail); border-right: 1px solid var(--line); padding: 22px 10px; }
.sidebar nav a { position: relative; display: flex; gap: 11px; align-items: center; min-height: 39px; padding: 7px 10px; border: 1px solid transparent; font-weight: 600; color: #d6dacd; }
.sidebar nav a .icon { color: #9da793; }
.sidebar nav a:hover { background: #272d21; color: var(--lime); }
.sidebar nav a[aria-current] { border-color: #465332; background: #2d381d; color: var(--lime); box-shadow: inset 3px 0 var(--lime); }
.sidebar nav a[aria-current] .icon { color: var(--lime); }
.nav-label, .label { color: var(--muted); text-transform: uppercase; font-size: .73rem; letter-spacing: .11em; font-weight: 700; }
.nav-label { padding: 0 10px; margin: 18px 0 5px; }
.content { width: 100%; max-width: 1660px; margin: 0 auto; min-width: 0; padding: 27px clamp(18px, 3vw, 55px) 0; display: flex; flex-direction: column; }
main { flex: 1; min-width: 0; }
.footer { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 50px; padding: 18px 0 22px; border-top: 1px solid var(--line); font-size: .88rem; color: var(--muted); }
.footer span { margin-right: auto; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 42px; padding: 9px 15px; gap: 9px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); font-weight: 750; line-height: 1.15; }
.button:hover { border-color: var(--lime); color: var(--lime); }
.button.primary { background: var(--lime); border-color: var(--lime); color: #1a1e11; }
.button.primary:hover { background: #e4ff7c; }
.button.dark { background: #181b17cd; border-color: #9aa28c86; }
.hero { position: relative; isolation: isolate; min-height: clamp(330px, 29vw, 445px); overflow: hidden; display: flex; align-items: center; border: 1px solid #4a5141; background: #20271d; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -2; background: url('/assets/street.webp') 76% 56% / cover no-repeat; filter: saturate(.82); }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #151914 2%, #161b14f4 19%, #171c17c7 38%, #161b151a 77%), linear-gradient(0deg, #11150fd9, transparent 55%); }
.hero-inner { padding: 28px clamp(20px, 4vw, 67px) 34px; max-width: 570px; }
.hero-tag { color: var(--lime); letter-spacing: .16em; font-weight: 800; font-size: .75rem; padding-left: 10px; border-left: 3px solid var(--lime); }
.hero h1 { font-size: clamp(5.4rem, 9vw, 9.5rem); margin: .03em 0 .08em; letter-spacing: -.022em; text-shadow: 2px 5px 0 #151713b5; white-space: nowrap; }
.hero h1 span { color: var(--lime); }
.hero p { font-size: 1.14rem; color: #ecede3; max-width: 350px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.home-section { margin-top: 28px; min-width: 0; }
.section-head { display: flex; justify-content: space-between; gap: 10px; align-items: end; border-bottom: 1px solid var(--line); padding: 0 0 10px; margin-bottom: 12px; }
.section-head h2 { display: flex; align-items: center; gap: 9px; }
.section-head h2::before { content: ''; width: 6px; height: .75em; background: var(--lime); transform: skewX(-10deg); }
.section-head a { white-space: nowrap; color: var(--lime); font-size: .9rem; }
.section-head a .icon { width: 14px; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tool-tile { display: flex; align-items: center; gap: 11px; min-height: 101px; padding: 14px; border: 1px solid var(--line); isolation: isolate; position: relative; overflow: hidden; background: var(--panel); }
.tool-tile::before { content: ''; z-index: -1; position: absolute; inset: 0; background: linear-gradient(90deg, #1c221bd9, #1c221b98), var(--tool-art) center / cover; filter: saturate(.75); }
.atlas-card { --tool-art: url('/assets/game/assets/city-map-original.png'); }
.tree-card { --tool-art: url('/assets/tree.webp'); }
.market-card { --tool-art: url('/assets/market.webp'); }
.tool-tile:hover, .category-card:hover, .item-card:hover { border-color: var(--lime); }
.tool-icon { color: var(--lime); display: grid; place-items: center; width: 40px; height: 40px; flex: none; border: 1px solid #81904d; background: #25311c; }
.tool-tile > .icon { margin-left: auto; color: var(--lime); }
.tool-tile p { margin: 4px 0 0; color: #e0e5d7; font-size: .88rem; }
.category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.category-card { position: relative; isolation: isolate; display: flex; min-height: 101px; flex-direction: column; align-items: flex-start; justify-content: end; gap: 2px; padding: 11px; border: 1px solid var(--line); background: linear-gradient(150deg, #2b3025, #1d211a 58%); overflow: hidden; }
.cat-icon { color: var(--lime); opacity: .8; }
.category-card strong { font-size: 1.05rem; line-height: 1.15; }
.category-card small { color: var(--muted); }
.category-card small .icon { width: 14px; }
.category-art { position: absolute; z-index: -1; right: -5px; top: 0; display: grid; place-items: center; height: 89px; width: 62%; opacity: .82; }
.category-art img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(1px 8px 8px #0009); mask-image: linear-gradient(180deg, black 55%, #0005); }
.home-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 19px; }
.quick-list a { position: relative; display: block; padding: 11px 24px 11px 11px; border-bottom: 1px solid var(--line); }
.quick-list a:hover { background: var(--panel); }
.quick-list strong, .quick-list small { display: block; }
.quick-list small { color: var(--muted); }
.quick-list .icon { position: absolute; right: 2px; top: 17px; color: var(--lime); }
.update { display: grid; grid-template-columns: minmax(75px, 20%) 1fr; align-items: baseline; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.update:last-child { border-bottom: 0; }
.update time { color: var(--lime); }
.update p { margin: 4px 0 0; }
.update h3 { font: 700 1.08rem/1.25 var(--body); text-transform: none; }
.page-head { margin-bottom: 23px; border-bottom: 1px solid var(--line); padding: 3px 0 14px; }
.page-head h1 { font-size: clamp(2.9rem, 6vw, 5rem); }
.page-head p { margin: 8px 0 0; font-size: 1.12rem; }
.crumbs { color: var(--muted); font-size: .9rem; margin-bottom: 8px; }
.crumbs a, .panel a:not(.button), .result-count a { color: var(--lime); text-decoration: underline; text-underline-offset: 3px; }
.panel { background: var(--panel); border: 1px solid var(--line); padding: 17px 20px; min-width: 0; }
.panel + .panel { margin-top: 13px; }
.panel h2 { margin-bottom: 12px; }
.panel p:last-child { margin-bottom: 0; }
.prose { max-width: 850px; font-size: 1.08rem; }
.prose p { color: var(--ink); }
.list { padding-left: 20px; }
.list li { margin-bottom: 4px; }
.filters { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; padding: 12px; border: 1px solid var(--line); background: var(--panel); }
.filters label { display: flex; flex-direction: column; gap: 4px; min-width: 0; max-width: 100%; color: var(--muted); font-size: .9rem; }
input, select { border: 1px solid #505847; border-radius: 0; min-height: 37px; background: #161a14; color: var(--ink); padding: 7px 10px; max-width: 100%; }
.filters select { min-width: 125px; }
.filters .button { min-height: 39px; }
.result-count { margin: 11px 0 7px; }
.inventory { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 9px; }
.item-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-top: 2px solid var(--rare); background: var(--panel); }
.item-art, .showcase { display: grid; place-items: center; background: radial-gradient(ellipse at center, color-mix(in srgb, var(--rare) 24%, #262a22), #1b1e18); }
.item-art { height: 99px; padding: 10px; }
.item-art img { width: 100%; height: 79px; object-fit: contain; }
.item-name { display: grid; gap: 2px; padding: 9px 9px 3px; line-height: 1.2; flex: 1; overflow-wrap: anywhere; }
.item-name small { color: var(--muted); }
.item-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px; align-items: center; padding: 7px 9px; }
.item-meta small { color: var(--rare); font-size: .75rem; }
.more { margin-top: 15px; }
.item-detail { display: grid; grid-template-columns: minmax(190px, 1fr) 2fr; gap: 14px; margin-bottom: 14px; }
.showcase { min-height: 240px; align-content: center; padding: 25px; border: 1px solid var(--rare); }
.showcase img { width: min(100%, 260px); max-height: 230px; object-fit: contain; }
.showcase span { color: var(--rare); font-weight: 700; }
.facts { margin: 0 0 15px; }
.facts > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; }
.fame-details { margin-bottom: 10px; color: var(--muted); }
.empty { padding: 18px; color: var(--muted); grid-column: 1 / -1; }
#compare-selects { display: flex; flex-wrap: wrap; gap: 10px; min-width: 0; }
#compare-selects select { width: min(209px, 100%); }
.table-wrap { margin-top: 14px; overflow-x: auto; border: 1px solid var(--line); }
.compare-table { width: 100%; border-collapse: collapse; background: var(--panel); }
.compare-table th, .compare-table td { text-align: left; padding: 9px 12px; border: 1px solid var(--line); min-width: 105px; }
.compare-table thead img { width: 80px; height: 65px; object-fit: contain; margin-bottom: 4px; }
.compare-table tbody tr:nth-child(odd) { background: #242922; }
.article-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); gap: 10px; }
.article-card { border: 1px solid var(--line); padding: 16px; background: var(--panel); }
.article-card:hover { border-color: var(--lime); }
.article-card img { width: 110px; height: 77px; object-fit: contain; margin: 0 0 7px; }
.article-card h2 { font-size: 1.6rem; }
.article-card p { margin: 7px 0; }
.article-card span { color: var(--lime); font-size: .9rem; }
.faq-section { margin-bottom: 20px; }
.faq-section h2 { margin-bottom: 7px; }
.faq-section details { padding: 10px 13px; border: 1px solid var(--line); background: var(--panel); margin-top: 5px; }
summary { cursor: pointer; font-weight: 700; }
.faq-section p { margin: 7px 0 0; }
dialog { width: min(550px, calc(100vw - 35px)); max-height: 82vh; color: var(--ink); background: var(--panel); border: 1px solid var(--lime); padding: 17px 20px 22px; }
dialog::backdrop { background: #0a0c09bf; }
.dialog-head { display: flex; justify-content: end; position: sticky; top: 0; }
.close { width: 36px; height: 36px; font-size: 1.5rem; }
#dialog-body a { color: var(--lime); }
#dialog-body .button { color: inherit; }
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(168px, 240px); border: 1px solid var(--line); margin-top: 12px; }
.map-view { background: #262d27; height: min(65vh, 700px); min-height: 315px; position: relative; overflow: hidden; cursor: grab; touch-action: none; user-select: none; }
.map-view.dragging { cursor: grabbing; }
.map-plane { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
.map-plane img { width: 100%; height: 100%; pointer-events: none; }
.map-pin { position: absolute; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; transform: translate(-50%, -50%) scale(var(--pin-scale)); background: #232923; border-color: #edf1e1; color: #edf1e1; padding: 0; line-height: 1; }
.map-pin:is(.building,.hub,.realm-district,.realm-place) { width: 24px; height: 24px; background: #d6f642; color: #171d11; border-color: #171d11; z-index: 1; }
.map-pin.realm-place { background: #eef1dc; }
.map-pin.realm-bonus { background: #26465a; }
.map-pin.access { background: #ac551e; }
.map-pin.containers, .map-pin.cargo { background: #7441a1; }
.map-pin.atm, .map-pin.cash { background: #42773f; }
.map-pin .icon { width: 14px; }
.map-pin span { display: none; position: absolute; pointer-events: none; left: 50%; top: 100%; margin-top: 2px; transform: translateX(-50%); background: #131710ee; color: var(--ink); padding: 3px 4px; font-size: .69rem; white-space: nowrap; }
.map-pin:hover, .map-pin:focus-visible { z-index: 3; border-color: var(--lime); }
.map-pin:hover span, .map-pin:focus-visible span, .show-labels .map-pin:is(.building,.hub,.realm-district,.realm-place) span { display: block; }
.map-controls { position: absolute; z-index: 2; top: 8px; right: 8px; display: grid; }
.map-controls button { width: 38px; height: 37px; font-size: 1.15rem; }
.map-controls button[aria-pressed="true"] { color: var(--lime); }
.map-scale { position: absolute; bottom: 8px; left: 8px; padding: 3px 8px; background: #1c221a; color: var(--lime); font-size: .84rem; }
.map-side { background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; height: min(65vh, 700px); min-height: 315px; }
.map-side h2 { font-size: 1.5rem; padding: 12px; }
.point-list { overflow: auto; flex: 1; }
.point-list button { text-align: left; width: 100%; padding: 6px 10px; display: grid; gap: 2px; border-width: 1px 0 0; }
.point-list small { color: var(--muted); }
.planner-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(270px, 1fr); gap: 12px; align-items: start; margin-top: 13px; }
.node-list { padding: 12px; background: var(--rail); border: 1px solid var(--line); max-height: 72vh; overflow: auto; }
.node-list h2 { font-size: 1.35rem; margin-bottom: 8px; }
.node-list h2:not(:first-child) { margin-top: 16px; }
.node-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); gap: 5px; }
.node-grid button, .tree-slot button { display: flex; flex-direction: column; align-items: center; padding: 7px 4px; gap: 4px; background: var(--panel); font-size: .87rem; line-height: 1.14; }
.node-grid button[aria-pressed="true"], .tree-slot button[aria-pressed="true"], [data-tree][aria-pressed="true"] { border-color: var(--lime); background: #303a25; }
.node-grid small, .tree-slot small { color: var(--lime); }
.node-grid img, .tree-slot img { width: 100%; height: 45px; object-fit: contain; }
.tree-scroll { overflow-x: auto; border: 1px solid var(--line); background: #191d17; padding: 9px; }
.tree-canvas { position: relative; }
.tree-canvas svg { position: absolute; fill: none; stroke: #8b9970; stroke-width: 1.4; pointer-events: none; }
.tree-slot { position: absolute; width: 125px; height: 76px; }
.tree-slot button { width: 100%; height: 100%; overflow: hidden; padding: 4px 3px; gap: 2px; }
.tree-slot img { height: 30px; }
.node-hero { display: flex; align-items: center; gap: 8px; margin: 10px 0 13px; }
.node-hero img { width: 75px; height: 60px; object-fit: contain; }
.node-hero h2 { margin: 0; font-size: 1.7rem; }
.node-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
#share-status { display: block; margin-top: 5px; color: var(--lime); }
#plan-url { width: 100%; margin-top: 10px; }
#node-detail h3 { margin: 15px 0 7px; }
.chain { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 5px; margin: 0 0 10px; padding: 0; }
.chain li { list-style: none; display: flex; align-items: center; gap: 5px; }
.chain li:not(:first-child)::before { content: '→'; color: var(--lime); }
.chain button { padding: 4px 7px; }

@media (max-width: 1180px) {
  .shell { grid-template-columns: 187px minmax(0, 1fr); }
  .brand { min-width: 151px; }
  .map-layout { grid-template-columns: minmax(0, 1fr) 173px; }
  .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tool-tile { padding: 10px; gap: 8px; }
  .tool-icon { width: 32px; height: 32px; }
}
@media (max-width: 930px) {
  .top { padding: 0 14px; gap: 14px; }
  .menu { display: block; }
  .shell { display: block; }
  .sidebar { position: fixed; left: 0; bottom: 0; z-index: 4; width: min(290px, 80vw); display: none; box-shadow: 8px 0 25px #0007; }
  .sidebar.visible { display: block; }
  .content { padding-top: 15px; }
}
@media (max-width: 650px) {
  .top { height: 58px; gap: 8px; }
  .sidebar { top: 58px; height: calc(100dvh - 58px); }
  .brand { min-width: 0; font-size: 1.55rem; gap: 6px; }
  .brand-mark { min-width: 30px; padding: 6px 5px; }
  .brand small, .global-search kbd, .online { display: none; }
  .global-search { gap: 5px; padding: 0 7px; }
  .global-search input { padding: 7px 0; font-size: .92rem; }
  .menu { padding: 6px 7px; }
  .content { padding-inline: 11px; }
  .hero { min-height: 324px; }
  .hero::before { background-position: 59% center; }
  .hero::after { background: linear-gradient(90deg, #151914ef, #15191446), linear-gradient(0deg, #141713e5 4%, transparent 65%); }
  .hero h1 { font-size: clamp(4.7rem, 17vw, 6.2rem); }
  .hero-inner { padding: 17px 15px; }
  .hero p { font-size: 1rem; max-width: 295px; }
  .hero-actions .button { padding: 6px 9px; }
  .tool-grid, .home-bottom, .planner-layout, .item-detail, .map-layout { grid-template-columns: minmax(0, 1fr); }
  .tool-tile { min-height: 66px; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-bottom { gap: 0; }
  .filters { padding: 8px; gap: 8px; }
  .filters label { flex: 1 1 128px; }
  .map-side { height: 260px; min-height: 0; border-left: 0; border-top: 1px solid var(--line); }
  .node-list { max-height: 45vh; }
  .node-grid { grid-template-columns: repeat(auto-fill, minmax(85px, 1fr)); }
}
