:root {
  color-scheme: dark;
  --night: #0F1830; --deep: #16223D; --deep-2: #1D2B4B; --deep-3: #24355A;
  --contour: #2A3A5E; --contour-2: #3A4D76;
  --moon: #E8EDF7; --mist: #93A1BD; --haze: #6C7A98;
  --smalt: #5B8CFF; --erythrite: #E8739F; --erythrite-wash: #3A2240;
  --road: #F2B544; --sea: #4FD1E8;
  --ok: #7FD8B4; --wait: #E3C77E; --bad: #E8739F;
  --ui: "Bahnschrift", "DengXian", "等线", "Microsoft YaHei UI", "Noto Sans CJK SC", "PingFang SC", sans-serif;
  --rail-w: 64px; --lift: 0 18px 48px #050a1a99;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--night); color: var(--moon); font: 13px/1.55 var(--ui); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: #9DB8FF; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--smalt); outline-offset: 2px; }

.rail { position: fixed; inset: 0 auto 0 0; width: var(--rail-w); z-index: 30; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 0; background: #0B1328; border-right: 1px solid var(--contour); }
.rail__mark { width: 38px; height: 38px; margin-bottom: 14px; color: var(--moon); display: grid; place-items: center; }
.rail__mark svg { width: 30px; height: 30px; }
.rail__item { position: relative; width: 52px; padding: 8px 0 6px; border-radius: 10px; color: var(--haze); text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; }
.rail__item svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.rail__item:hover { color: var(--moon); background: #ffffff08; }
.rail__item[aria-current="page"] { color: var(--moon); background: #22345F; }
.rail__item[aria-current="page"]::before { content: ""; position: absolute; left: -6px; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--smalt); }
.rail__item--help { margin-top: auto; }

.stage { position: fixed; inset: 0 0 0 var(--rail-w); }
#map { position: absolute; inset: 0; }
.maplibregl-ctrl-attrib { background: #0F1830B0 !important; color: var(--haze) !important; font-size: 10px; }
.maplibregl-ctrl-attrib a { color: var(--mist) !important; }

.panel { position: absolute; z-index: 10; border: 1px solid var(--contour); border-radius: 16px; background: #131E39F2; backdrop-filter: blur(12px); box-shadow: var(--lift); }
.side { left: 16px; top: 16px; bottom: 16px; width: 420px; display: flex; flex-direction: column; }
.ask { position: relative; display: flex; gap: 8px; align-items: center; margin: 14px 14px 8px; padding: 0 6px 0 38px; height: 46px; border: 1px solid var(--contour-2); border-radius: 23px; background: #0F1830; }
.ask:focus-within { border-color: var(--smalt); box-shadow: 0 0 0 4px #5B8CFF26; }
.ask__icon { position: absolute; left: 14px; width: 17px; height: 17px; fill: none; stroke: var(--mist); stroke-width: 1.7; stroke-linecap: round; }
.ask input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 14.5px; }
.ask input::placeholder { color: var(--haze); }
.hints { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; border-bottom: 1px solid var(--contour); }
.hint { border: 1px solid var(--contour); border-radius: 14px; padding: 3px 10px; background: transparent; color: var(--mist); font-size: 12px; }
.hint:hover { color: var(--moon); border-color: var(--contour-2); }
.thread { flex: 1; overflow-y: auto; padding: 4px 16px 24px; scrollbar-width: thin; scrollbar-color: var(--contour-2) transparent; }
.turn { padding: 14px 0 6px; border-bottom: 1px solid #ffffff0D; }
.q { margin: 0 0 8px; font-size: 15px; font-weight: 600; line-height: 1.45; }
.p { margin: 0 0 10px; color: #CFD8EA; line-height: 1.75; }
.p b { color: var(--moon); }
.p em { font-style: normal; color: var(--erythrite); }
.muted { color: var(--mist); font-size: 12px; }
.h { margin: 14px 0 6px; color: var(--mist); font-size: 12px; font-weight: 400; display: flex; justify-content: space-between; }

.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--contour-2); border-radius: 8px; background: var(--deep-2); padding: 6px 12px; font-size: 12.5px; color: var(--moon); text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--deep-3); border-color: #5470A8; }
.btn--primary { background: #2F55C9; border-color: #5B8CFF; }
.btn--primary:hover { background: #3A63DA; }
.btn:disabled { opacity: .5; cursor: wait; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 6px; }

.totals { display: grid; grid-template-columns: repeat(3, 1fr); margin: 10px 0; border: 1px solid var(--contour); border-radius: 12px; overflow: hidden; }
.totals div { padding: 10px 12px; border-left: 1px solid var(--contour); }
.totals div:first-child { border-left: 0; }
.totals b { display: block; font-size: 22px; font-weight: 500; line-height: 1.15; }
.totals span { color: var(--mist); font-size: 11.5px; }
.totals .road b { color: var(--road); }
.totals .sea b { color: var(--sea); }

.path-card { margin: 8px 0; padding: 10px 12px; border: 1px solid var(--contour); border-radius: 12px; background: #0F1830; cursor: pointer; }
.path-card:hover, .path-card.is-on { border-color: #4B6BC0; }
.path-card__route { font-size: 12.5px; line-height: 1.6; }
.path-card__route i { font-style: normal; color: var(--haze); }
.path-card__km { display: flex; gap: 14px; margin-top: 6px; font-size: 12px; color: var(--mist); }
.path-card__km b { color: var(--moon); font-weight: 500; }
.k-road { color: var(--road) !important; } .k-sea { color: var(--sea) !important; }

.leg { display: grid; grid-template-columns: 34px 1fr auto; gap: 2px 10px; align-items: center; padding: 8px 0; border-top: 1px solid #ffffff0A; font-size: 12.5px; cursor: pointer; }
.leg:hover { background: #ffffff05; }
.leg > b { grid-column: 2; grid-row: 1; min-width: 0; }
.leg > .leg__mode { grid-column: 1; grid-row: 1 / span 2; font-size: 11px; text-align: center; border-radius: 6px; padding: 2px 0; }
.leg__mode--road { background: #3A2E12; color: var(--road); }
.leg__mode--sea { background: #0F3340; color: var(--sea); }
.leg__mode--same { background: var(--deep-2); color: var(--mist); }
.leg__mode--wait { background: var(--deep-2); color: var(--haze); }
.leg__mode--none { background: var(--erythrite-wash); color: var(--erythrite); }
.leg > span:not(.leg__mode) { color: var(--mist); font-size: 11.5px; grid-column: 2; grid-row: 2; }
.leg strong { grid-row: 1 / span 2; grid-column: 3; font-weight: 500; }

.sent { margin: 0 0 8px; padding-left: 10px; border-left: 2px solid var(--contour-2); line-height: 1.75; color: #D6DEEE; }
.sent sup { color: var(--mist); font-size: 10.5px; margin-left: 2px; }
.sent.l-ai_verified { border-left-color: var(--ok); }
.sent.l-pending { border-left-color: var(--wait); }
.sent.l-base { border-left-color: var(--smalt); }
.sent.l-rejected { border-left-color: var(--bad); color: var(--haze); text-decoration: line-through; text-decoration-color: #E8739F88; }
.claim { margin: 6px 0; padding: 9px 11px; border: 1px solid var(--contour); border-radius: 10px; background: #0F1830; font-size: 12px; }
.claim q { display: block; margin: 5px 0; color: var(--mist); font-style: italic; quotes: "“" "”"; }
.claim a { font-size: 11.5px; }
.badge { display: inline-block; padding: 0 8px; border-radius: 9px; font-size: 11px; line-height: 18px; border: 1px solid; margin-right: 6px; }
.badge.ai_verified { color: var(--ok); border-color: #3B7A63; }
.badge.pending { color: var(--wait); border-color: #6F6243; }
.badge.unsupported { color: var(--bad); border-color: #8E4A69; }
.badge.base { color: #A8C2FF; border-color: #3E5A9E; }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--contour-2); border-top-color: var(--smalt); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.bar { height: 4px; border-radius: 2px; background: var(--deep-2); overflow: hidden; margin: 6px 0 2px; }
.bar i { display: block; height: 100%; background: var(--smalt); transition: width .25s; }

.inspector { right: 16px; top: 72px; width: 360px; max-height: calc(100% - 100px); overflow-y: auto; padding: 18px 18px 20px; }
.x { position: absolute; right: 10px; top: 8px; border: 0; background: transparent; color: var(--mist); font-size: 20px; }
.ins-stage { display: inline-flex; align-items: center; gap: 7px; color: var(--mist); font-size: 12px; }
.ins-stage::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.ins-title { margin: 6px 28px 2px 0; font-size: 21px; font-weight: 600; line-height: 1.3; }
.ins-sub { margin: 0 0 12px; color: var(--mist); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 12px; font-size: 12.5px; }
.facts dt { color: var(--haze); } .facts dd { margin: 0; }
.note { margin: 10px 0 0; padding: 9px 11px; border-radius: 10px; background: #0F1830; color: var(--mist); font-size: 12px; line-height: 1.7; }

.closeup-bar { left: 50%; transform: translateX(-50%); bottom: 18px; display: flex; align-items: center; gap: 18px; padding: 10px 12px 10px 18px; max-width: calc(100% - 40px); }
.closeup-bar b { display: block; font-size: 15px; }
.closeup-bar span { color: var(--mist); font-size: 12px; }
.closeup-bar__actions { display: flex; gap: 6px; flex-wrap: wrap; }
body.is-closeup .side, body.is-closeup .legend { display: none; }

.toolbar { position: absolute; z-index: 9; right: 16px; top: 16px; display: flex; gap: 8px; }
body.has-inspector .toolbar { right: 392px; }
.seg { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--contour); border-radius: 10px; background: #131E39EE; }
.seg button { padding: 6px 11px; border: 0; border-radius: 7px; background: transparent; color: var(--mist); font-size: 12.5px; }
.seg button[aria-pressed="true"] { background: #22345F; color: var(--moon); }
.legend { position: absolute; z-index: 9; right: 60px; bottom: 26px; display: flex; flex-wrap: wrap; gap: 6px 14px; max-width: 560px; padding: 9px 13px; border-radius: 10px; background: #0F1830D0; color: var(--mist); font-size: 11.5px; }
body.has-inspector .legend { right: 436px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.legend .ln { width: 22px; height: 3px; border-radius: 2px; background: var(--c); }
.legend .dash { width: 22px; height: 0; border-top: 2px dashed #A9B6D3; background: none; border-radius: 0; }
.legend .ring { width: 9px; height: 9px; border: 2px solid var(--erythrite); background: none; }
.tip { position: absolute; z-index: 20; pointer-events: none; max-width: 280px; padding: 8px 10px; border: 1px solid var(--contour-2); border-radius: 8px; background: #101B36F4; font-size: 12px; line-height: 1.55; }
.tip b { display: block; font-size: 13px; }
.tip span { color: var(--mist); }

.fac-marker { width: 22px; height: 22px; border-radius: 50%; border: 3px solid #fff; background: var(--erythrite); box-shadow: 0 0 0 6px #E8739F44, 0 4px 14px #000a; }
.fac-radius { pointer-events: none; }

@media (max-width: 900px) {
  :root { --rail-w: 0px; }
  .rail { display: none; }
  .side { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; max-height: 52%; }
  .toolbar { top: 10px; right: 10px; }
  .legend { display: none; }
  .inspector { left: 8px; right: 8px; width: auto; top: 60px; max-height: 45%; }
  body.has-inspector .toolbar { right: 10px; }
  .closeup-bar { flex-direction: column; align-items: stretch; gap: 8px; bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }

/* ── 应用框架补充（v2） ─────────────────────────── */
.rail__badge { position: absolute; top: 3px; right: 6px; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--erythrite); color: #2A0E1C; font-size: 10px; font-weight: 700; line-height: 17px; text-align: center; }
.rail__item { border: 0; background: transparent; }
.side__head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 0; }
.dataset-pill { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 3px; border: 1px solid var(--contour-2); border-radius: 17px; background: #0F1830; font-size: 13.5px; }
.dataset-pill:hover { border-color: #5470A8; }
.dataset-pill__sym { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(150deg, #3352B8, #1D2E6C); color: #DDE6FF; font-weight: 600; font-size: 12.5px; }
.svc { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; flex: 1; }
.svc__item { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--mist); }
.svc__item::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--haze); }
.svc__item.is-on::before { background: var(--ok); }
.svc__item.is-off { color: var(--wait); }
.svc__item.is-off::before { background: var(--wait); }
.hint--recent { border-style: dashed; }
.btn--sm { padding: 4px 9px; font-size: 12px; }
.btn--ghost { background: transparent; }
.linkbtn { border: 0; background: none; padding: 0; color: #9DB8FF; font-size: inherit; text-decoration: underline; text-underline-offset: 2px; }
.actions--tight { margin: 0; gap: 4px; }
.mono { font-family: Consolas, "Cascadia Code", monospace; font-size: 11.5px; word-break: break-all; }
.path-card__forms { margin-top: 4px; color: var(--mist); font-size: 11.5px; }
.rel { display: grid; grid-template-columns: 10px 1fr auto; gap: 2px 10px; align-items: center; padding: 8px 0; border-top: 1px solid #ffffff0A; cursor: pointer; font-size: 12.5px; }
.rel:hover { background: #ffffff05; }
.rel > i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); grid-row: 1 / span 2; }
.rel > b { grid-column: 2; }
.rel > span { color: var(--mist); font-size: 11.5px; grid-column: 2; }
.rel > small { grid-column: 3; grid-row: 1 / span 2; color: var(--haze); font-size: 11px; }
.ins-h { display: flex; justify-content: space-between; align-items: center; margin: 16px 0 6px; font-size: 13px; color: var(--mist); font-weight: 400; }
.claim-row { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; width: 100%; padding: 8px 0; border: 0; border-top: 1px solid #ffffff0A; background: transparent; text-align: left; font-size: 12.5px; }
.claim-row:hover { background: #ffffff05; }
.claim-row .badge { grid-row: 1 / span 2; align-self: start; margin-top: 2px; }
.claim-row b { font-weight: 500; line-height: 1.5; }
.claim-row span:not(.badge) { color: var(--mist); font-size: 11px; }
.badge.human_verified { color: #9FE0C4; border-color: #3B7A63; background: #133328; }
.badge.ai_verified { background: #102A26; }
.badge.conflict { color: #F6C3D6; border-color: #8E4A69; }
.badge.rejected { color: var(--haze); border-color: var(--contour-2); }
blockquote { margin: 10px 0; padding: 9px 12px; border-left: 2px solid var(--contour-2); background: #0F1830; color: var(--mist); font-style: italic; border-radius: 0 8px 8px 0; line-height: 1.7; }

.toast { position: fixed; z-index: 60; left: 50%; bottom: 28px; transform: translateX(-50%); max-width: min(560px, calc(100% - 40px)); padding: 10px 16px; border: 1px solid var(--contour-2); border-radius: 10px; background: #16223DF5; box-shadow: var(--lift); font-size: 13px; }

/* 对话框 */
.dialog { width: min(620px, calc(100% - 32px)); max-height: calc(100% - 60px); padding: 22px 24px; border: 1px solid var(--contour-2); border-radius: 16px; background: #131E39; color: var(--moon); box-shadow: var(--lift); overflow-y: auto; }
.dialog::backdrop { background: #050A1AB0; }
.dlg-title { margin: 8px 28px 6px 0; font-size: 19px; line-height: 1.45; font-weight: 600; }
.review { display: grid; gap: 10px; margin-top: 6px; }
.field { display: grid; gap: 4px; color: var(--mist); font-size: 12px; }
.field input, .field textarea, .field select, select { width: 100%; min-height: 34px; padding: 7px 10px; border: 1px solid var(--contour-2); border-radius: 8px; background: #0F1830; color: var(--moon); font: 13px var(--ui); resize: vertical; }
.field input:focus, .field textarea:focus, select:focus { outline: none; border-color: var(--smalt); box-shadow: 0 0 0 3px #5B8CFF26; }
.seg--wide { flex-wrap: wrap; }
.seg--wide label { display: inline-flex; }
.seg--wide input { position: absolute; opacity: 0; pointer-events: none; }
.seg--wide span { padding: 6px 12px; border-radius: 7px; color: var(--mist); font-size: 12.5px; cursor: pointer; }
.seg--wide input:checked + span { background: #22345F; color: var(--moon); }
.seg--wide input:focus-visible + span { outline: 2px solid var(--smalt); }
.history { margin: 0; padding-left: 18px; font-size: 12.5px; }
.history li { margin: 0 0 6px; }
.history span { display: block; color: var(--haze); font-size: 11.5px; }
.check { display: inline-flex; align-items: center; gap: 6px; color: var(--mist); font-size: 12.5px; }

/* 覆盖式工作区 */
.view { position: absolute; inset: 0; z-index: 25; overflow-y: auto; background: var(--night); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 26px 34px 16px; border-bottom: 1px solid var(--contour); }
.page-head h1 { margin: 0 0 4px; font-size: 27px; font-weight: 600; }
.page-head p { margin: 0; color: var(--mist); max-width: 68ch; }
.page-head__tools { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.page-head__tools .field { min-width: 180px; }
.empty { padding: 40px 6px; color: var(--mist); line-height: 1.8; }
.status-key { display: flex; gap: 6px; flex-wrap: wrap; }

/* 链条 */
.view#view-chain { display: flex; flex-direction: column; overflow: hidden; }
.chain-board { position: relative; flex: 1; overflow: auto; padding: 22px 34px 34px; }
.chain-cols { position: relative; display: flex; gap: 46px; min-height: 100%; align-items: flex-start; }
.chain-col { flex: 0 0 196px; display: flex; flex-direction: column; gap: 9px; position: relative; z-index: 1; }
.chain-col__head { padding: 0 0 8px; border-bottom: 3px solid var(--c); margin-bottom: 4px; }
.chain-col__head b { font-size: 18px; font-weight: 600; }
.chain-col__head span, .chain-col__head small { display: block; color: var(--mist); font-size: 11.5px; }
.cnode { position: relative; display: block; width: 100%; padding: 9px 11px; border: 1px solid var(--contour-2); border-left: 3px solid var(--c); border-radius: 8px; background: var(--deep); text-align: left; }
.cnode:hover { background: var(--deep-2); }
.cnode b { display: block; font-size: 13px; line-height: 1.35; }
.cnode span { display: block; color: var(--mist); font-size: 11.5px; margin-top: 2px; }
.cnode.is-origin { box-shadow: 0 0 0 1px #fff inset; }
.cnode.is-candidate { border-style: dashed; border-color: #8E4A69; border-left: 3px dashed var(--erythrite); background: transparent; }
.cnode.is-break::after { content: "断点"; position: absolute; right: -8px; top: -9px; padding: 0 6px; border-radius: 8px; background: var(--erythrite); color: #2A0E1C; font-size: 10.5px; font-weight: 700; line-height: 17px; }
.chain-links { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.chain-links path { fill: none; stroke: #8193BB; stroke-width: 1.4; opacity: .8; }
.chain-links path.claim { stroke: var(--erythrite); stroke-dasharray: 5 4; opacity: .7; }

/* 证据台 */
.view#view-evidence { display: flex; flex-direction: column; overflow: hidden; }
.desk { flex: 1; min-height: 0; display: grid; grid-template-columns: 250px minmax(280px, 1fr) minmax(360px, 1.25fr); }
.desk > * { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--contour-2) transparent; }
.desk__queue { padding: 10px 12px 20px; border-right: 1px solid var(--contour); }
.q-group { margin: 14px 8px 6px; color: var(--haze); font-size: 11.5px; }
.qitem { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 9px 12px; margin-bottom: 3px; border: 0; border-radius: 10px; background: transparent; text-align: left; }
.qitem:hover { background: #ffffff07; }
.qitem[aria-current="true"] { background: var(--deep-2); }
.qitem b { font-size: 13.5px; font-weight: 600; }
.qitem strong { font-size: 18px; font-weight: 500; grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.qitem.is-hot strong { color: var(--erythrite); }
.qitem span { color: var(--mist); font-size: 11.5px; line-height: 1.45; }
.desk__list { border-right: 1px solid var(--contour); }
.litem { display: block; width: 100%; padding: 11px 18px; border: 0; border-bottom: 1px solid #ffffff0A; background: transparent; text-align: left; }
.litem:hover { background: #ffffff05; }
.litem[aria-current="true"] { background: var(--deep); box-shadow: inset 3px 0 0 var(--erythrite); }
.litem b { display: block; font-size: 13px; font-weight: 500; line-height: 1.5; }
.litem span { color: var(--mist); font-size: 11.5px; }
.litem small { float: right; color: var(--erythrite); font-size: 11.5px; margin-left: 8px; }
.desk__detail { padding: 22px 26px 40px; }
.desk__detail h2 { margin: 6px 0 6px; font-size: 21px; font-weight: 600; line-height: 1.35; }
.lede { margin: 0 0 14px; color: var(--mist); line-height: 1.75; }
.qbox { margin: 12px 0; color: var(--mist); font-size: 12.5px; }
.qbox summary { cursor: pointer; }
.queries { margin: 8px 0 0; padding: 0; list-style: none; }
.queries li { display: flex; gap: 8px; align-items: center; padding: 7px 10px; margin-bottom: 5px; border: 1px solid var(--contour); border-radius: 8px; background: #0F1830; }
.queries code { flex: 1; font: 12px var(--ui); color: #DCE4F5; }

/* 矿种与数据 */
.minerals { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; padding: 22px 34px 6px; }
.mineral { position: relative; padding: 16px 18px 12px; border: 1px solid var(--contour); border-radius: 16px; background: var(--deep); }
.mineral.is-active { border-color: #4B6BC0; background: linear-gradient(160deg, #1D2E5C, var(--deep) 70%); }
.mineral__sym { font-size: 34px; font-weight: 500; line-height: 1; }
.mineral__name { margin: 4px 0 10px; color: var(--mist); }
.mineral__stat { font-size: 12.5px; }
.mineral__stat b { font-size: 15px; font-weight: 500; }
.mineral .tag { position: absolute; right: 14px; top: 14px; font-size: 11px; color: var(--mist); }
.mineral.is-empty .mineral__sym { color: var(--haze); }
.data-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; padding: 14px 34px 40px; }
.card { padding: 20px 22px; border: 1px solid var(--contour); border-radius: 16px; background: var(--deep); }
.card h2 { margin: 0 0 12px; font-size: 18px; font-weight: 600; }
.card ul { padding-left: 18px; line-height: 1.8; color: #CFD8EA; }
.card p { color: #CFD8EA; line-height: 1.8; }
.qrow { display: grid; grid-template-columns: 150px 1fr 100px; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid #ffffff0A; font-size: 12.5px; }
.qrow:first-of-type { border-top: 0; }
.qbar { height: 8px; border-radius: 4px; background: #0F1830; overflow: hidden; }
.qbar i { display: block; height: 100%; background: var(--smalt); border-radius: 4px; }
.qbar.is-low i { background: var(--erythrite); }
.qrow b { text-align: right; font-weight: 500; }
.drop { position: relative; display: grid; gap: 3px; place-items: center; padding: 22px; margin: 10px 0; border: 1.5px dashed var(--contour-2); border-radius: 12px; cursor: pointer; text-align: center; }
.drop:hover { border-color: var(--smalt); }
.drop.is-disabled { opacity: .55; cursor: not-allowed; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop span { color: var(--mist); font-size: 12px; }
.link { font-size: 12.5px; }
.report { margin-top: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid; font-size: 12.5px; }
.report.is-ok { border-color: #3B7A63; background: #10261F; }
.report.is-bad { border-color: #8E4A69; background: var(--erythrite-wash); }
.report ul { margin: 6px 0; padding-left: 18px; line-height: 1.7; }
.help { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; padding: 22px 34px 40px; max-width: 1400px; }
kbd { padding: 0 6px; border: 1px solid var(--contour-2); border-radius: 5px; font: 11.5px var(--ui); }
code { font-family: Consolas, "Cascadia Code", monospace; font-size: 12px; color: #DCE4F5; }

body:not([data-view="map"]) .side, body:not([data-view="map"]) .inspector, body:not([data-view="map"]) .toolbar, body:not([data-view="map"]) .legend, body:not([data-view="map"]) .closeup-bar { visibility: hidden; }

@media (max-width: 1100px) {
  .desk { grid-template-columns: 220px 1fr; }
  .desk__detail { grid-column: 1 / -1; border-top: 1px solid var(--contour); }
  .data-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .stage { bottom: 58px; }
  .rail { display: flex; inset: auto 0 0 0; width: auto; height: 58px; flex-direction: row; justify-content: space-around; padding: 0 6px; border-right: 0; border-top: 1px solid var(--contour); }
  .rail__mark { display: none; }
  .rail__item--help { margin-top: 0; }
  .rail__item[aria-current="page"]::before { left: 12px; right: 12px; top: -1px; bottom: auto; width: auto; height: 3px; }
  .page-head { padding: 18px 16px 12px; }
  .desk { grid-template-columns: 1fr; }
  .desk__queue { display: flex; flex-wrap: nowrap; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--contour); }
  .q-group { display: none; }
  .qitem { flex: 0 0 180px; }
  .minerals, .data-grid, .help { padding-left: 16px; padding-right: 16px; }
  .chain-board { padding: 16px; }
  .qrow { grid-template-columns: 110px 1fr 80px; }
  .svc { display: none; }
}
.seg button { white-space: nowrap; }
@media (max-width: 900px) {
  .toolbar { left: 10px; right: 10px; justify-content: flex-end; gap: 6px; }
  .toolbar .seg:last-child { display: none; }
  .seg button { padding: 5px 8px; font-size: 12px; }
  .hints .hint:nth-child(n+3) { display: none; }
  .maplibregl-ctrl-bottom-right { bottom: 0; }
}
body.has-inspector .legend { display: none; }
body.has-inspector .maplibregl-ctrl-bottom-right { right: 392px; }
.intro { padding: 18px 2px; color: var(--mist); line-height: 1.8; font-size: 12.5px; }
.intro b { color: var(--moon); font-weight: 600; }
.intro ol { margin: 8px 0 0; padding-left: 18px; }
@media (max-width: 900px) { body.has-inspector .maplibregl-ctrl-bottom-right { right: 0; } }
