:root {
  color-scheme: dark;
  --bg: #121212;
  --surface: #1e1e1e;
  --surface-hi: #272727;
  --line: #383838;
  --ink: #ececec;
  --muted: #b2b2b2;
  --accent: #ffd54f;
  --accent-hi: #ffe282;
  --green: #c3dc92;
  --blue: #a6d6df;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  --sans: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 86px; }
body { margin: 0; color: var(--ink); background: var(--bg); font: 14px/1.6 var(--sans); }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 3px; }
[hidden] { display: none !important; }
.shell { width: min(100% - 72px, 1360px); margin-inline: auto; }
.skip, .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 20; top: 8px; left: 8px; width: auto; height: auto; padding: 8px 12px; clip-path: none; color: #141611; background: var(--accent); }
.topbar { position: sticky; top: 0; z-index: 5; background: #121212; border-bottom: 1px solid #292929; }
.topbar-inner { display: flex; width: min(calc(100% - 32px),1160px); min-height: 62px; align-items: center; justify-content: space-between; gap: 22px; }
.brand { display: flex; align-items: center; gap: 11px; white-space: nowrap; }
.brand-mark { display: grid; width: 40px; height: 40px; place-items: center; color: #171710; background: var(--accent); border-radius: 4px; }
.brand-mark svg { width: 27px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.brand strong { display: block; font-size: 17px; line-height: 1.25; letter-spacing: .08em; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font: 10px/1.2 var(--mono); letter-spacing: .08em; }
nav { display: flex; gap: 16px; align-items: stretch; align-self: stretch; }
.nav-btn { position: relative; display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--muted); padding: 0 8px; white-space: nowrap; font-weight: 700; }
.nav-btn:hover, .nav-btn.selected { color: var(--ink); }
.nav-btn.selected::after { position: absolute; bottom: -1px; left: 6px; right: 6px; height: 2px; background: var(--accent); content: ""; }
.nav-divider { align-self: center; width: 1px; height: 18px; background: var(--line); }
#nav-count { color: var(--accent); font: 11px var(--mono); }
.season-chip { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 4px 12px; color: var(--ink); border: 1px solid #514628; border-radius: 18px; font-size: 12px; white-space: nowrap; }
.season-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.season-number { color: var(--accent); font: 11px var(--mono); }
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--accent); font: 700 11px/1.25 var(--mono); letter-spacing: .14em; }
.orange-stroke { width: 16px; height: 2px; background: var(--accent); }
.primary-button { display: inline-flex; gap: 14px; justify-content: center; align-items: center; min-height: 40px; padding: 7px 14px; border: 1px solid transparent; border-radius: 3px; background: var(--accent); color: #161710; font-weight: 800; white-space: nowrap; }
.primary-button:hover { background: var(--accent-hi); }
.sources-section { margin-top: 32px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-heading h2 { font-size: clamp(25px, 3vw, 34px); letter-spacing: -.045em; margin: 5px 0 0; line-height: 1.25; }
.database-header, .breadcrumb { display: flex; align-items: center; gap: 8px; }
.database-header { justify-content: space-between; min-height: 41px; padding: 5px 12px; }
.breadcrumb { color: var(--muted); min-width: 0; font-size: 13px; }
.breadcrumb h1 { margin: 0; font-size: inherit; color: var(--accent); }
.text-link { color: var(--muted); font-weight: 700; font-size: 12px; white-space: nowrap; }
.text-link span { color: var(--accent); margin-left: 4px; }
.text-link:hover { color: var(--ink); }
.controls { border-block: 1px solid var(--line); background: var(--surface); padding: 10px 12px 7px; }
.control-line { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 12px; }
.table-filter select, .more-filters summary, .search { min-height: 36px; border: 1px solid var(--line); border-radius: 3px; background: var(--bg); }
.table-filter select, .more-filters summary { padding: 5px 8px; color: var(--muted); font-size: 12px; }
.table-filter select { min-width: 130px; cursor: pointer; }
.search { display: flex; align-items: center; gap: 8px; width: min(100%,295px); padding: 0 9px; }
.search:focus-within { border-color: var(--accent); }
.search svg { width: 18px; flex: 0 0 18px; fill: none; stroke: var(--muted); stroke-width: 1.6; }
.search input { width: 100%; padding: 7px 0; min-width: 0; outline: none; border: 0; background: transparent; color: var(--ink); font-size: 13px; }
.search input::placeholder { color: var(--muted); }
kbd { padding: 0 5px; color: var(--muted); border: 1px solid var(--line); font: 11px/1.65 var(--mono); border-radius: 3px; }
.more-filters { position: relative; }
.more-filters summary { cursor: pointer; line-height: 24px; white-space: nowrap; }
.more-filters[open] summary { color: var(--accent); }
.sort select { min-height: 30px; background: var(--bg); border: 1px solid var(--line); border-radius: 3px; color: var(--muted); font-size: 12px; padding: 4px 6px; }
.control-options { position: absolute; z-index: 4; top: calc(100% + 4px); left: 0; display: grid; gap: 8px; width: max-content; min-width: 145px; padding: 10px; border: 1px solid var(--line); background: var(--surface-hi); box-shadow: 0 6px 18px #0007; }
.code-only { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; cursor: pointer; }
.code-only input { margin: 0; accent-color: var(--accent); }
.results-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; min-height: 29px; margin-top: 6px; color: var(--muted); font-size: 12px; }
.results-meta p { margin: 0; }
.results-meta b { color: var(--ink); font-family: var(--mono); }
.rating-status { font-size: 11px; }
.rating-status .rating-scope { color: inherit; margin: 0; }
.reset-filters { border: 0; background: none; color: var(--accent-hi); padding: 1px 3px; }
.layout-switch { display: inline-flex; gap: 2px; margin-left: auto; padding: 2px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); }
.layout-switch button { min-height: 24px; padding: 2px 8px; border: 1px solid transparent; border-radius: 2px; background: transparent; color: var(--muted); font: inherit; }
.layout-switch button:hover { color: var(--ink); }
.layout-switch button[aria-pressed="true"] { border-color: #5e5129; background: #302918; color: var(--accent); font-weight: 750; }
.gunsmith-shortcut { padding: 3px 4px; border: 0; background: none; color: var(--accent); }
.gunsmith-shortcut .shortcut-weapon { margin-left: 0; }
.loadout-table { position: relative; overflow: auto; max-height: max(315px,calc(100dvh - 200px)); border-inline: 1px solid var(--line); background: var(--surface); scrollbar-color: #656565 #232323; }
.scheme-table { width: 100%; border-spacing: 0; text-align: center; font-size: 12.5px; }
.scheme-table th, .scheme-table td { min-width: 92px; padding: 7px 10px; border: solid var(--line); border-width: 0 1px 1px 0; vertical-align: middle; }
.scheme-table tbody tr { height: 59px; }
.scheme-table thead th { position: sticky; z-index: 2; top: 0; height: 51px; color: var(--accent); background: var(--surface); font-size: 13px; white-space: nowrap; }
.scheme-table tr > :first-child { position: sticky; z-index: 1; left: 0; min-width: 174px; background: var(--surface); }
.scheme-table thead tr > :first-child { z-index: 3; }
.scheme-table tbody tr:hover td, .scheme-table tbody tr:hover th { background: var(--surface-hi); }
.scheme-table .table-rating { min-width: 72px; }
.rating-sort { padding: 4px 2px; border: 0; background: none; color: inherit; font: inherit; font-weight: 700; }
.rating-sort:hover { text-decoration: underline; }
.rating-badge { display: inline-block; min-width: 32px; padding: 3px 5px; border: 1px solid #4c4c4c; border-radius: 3px; color: #dedede; background: #292929; font: 750 11px/1.15 var(--sans); text-align: center; white-space: nowrap; }
.rating-S { color: #ffe39b; background: #42331b; border-color: #8a6d35; }
.rating-A { color: #b8ebcf; background: #20372c; border-color: #48715b; }
.rating-B { color: #c0daf9; background: #24364a; border-color: #486989; }
.rating-pending { color: var(--muted); background: transparent; border-style: dashed; }
.scheme-table .table-part { min-width: 108px; color: var(--accent); }
.scheme-table .table-empty { color: #9a9a9a; }
.scheme-table td.table-type, .scheme-table td.table-role { color: var(--muted); white-space: nowrap; }
.scheme-table .table-note { min-width: 190px; max-width: 250px; text-align: left; color: var(--muted); }
.scheme-table .table-source { min-width: 115px; }
.scheme-table td a { color: var(--accent); white-space: nowrap; }
.scheme-table time { display: block; color: var(--muted); font-size: 11px; }
.table-scheme { display: block; width: 100%; padding: 3px 2px; border: 0; background: transparent; color: var(--ink); text-align: left; }
.table-scheme strong, .table-scheme > span { display: block; }
.table-scheme:hover strong { color: var(--accent); text-decoration: underline; }
.table-scheme-meta { margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.table-scheme-meta small { color: var(--accent); font: inherit; white-space: nowrap; }
.table-scheme-meta .build-status, .card .build-status { color: #a9d7bb; white-space: nowrap; }
.table-scheme-meta .build-status.review, .card .build-status.review { color: var(--accent-hi); }
.table-actions { display: flex; justify-content: center; gap: 5px; white-space: nowrap; }
.table-actions button[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.cards { display: grid; width: min(calc(100% - 24px),1360px); margin: 12px auto 0; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.cards.compact-builds { grid-template-columns: repeat(auto-fit,minmax(min(100%,365px),1fr)); align-items: start; gap: 9px; }
.compact-weapon { min-width: 0; border: 1px solid var(--line); border-left: 2px solid var(--tone); border-radius: 4px; background: var(--surface); }
.compact-weapon header { display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px; padding: 9px 10px 7px; }
.compact-weapon h3 { margin: 0; font-size: 17px; }
.compact-weapon header .rating-badge { margin-left: auto; }
.compact-weapon ul { list-style: none; margin: 0; padding: 0; }
.compact-weapon li { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 7px; padding: 6px 8px 6px 10px; border-top: 1px solid var(--line); }
.compact-scheme .table-scheme { min-height: 29px; padding-inline: 0; }
.compact-scheme strong { overflow-wrap: anywhere; }
.compact-scheme strong span { color: var(--tone); }
.compact-source { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 5px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.compact-source .build-status { color: #a9d7bb; }
.compact-source .build-status.review { color: var(--accent-hi); }
.compact-actions { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.compact-actions button { min-height: 38px; }
.compact-actions .icon-button { width: 35px; }
@media (max-width: 345px) {
  .compact-weapon li { grid-template-columns: 1fr; }
}
.card { position: relative; overflow: hidden; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-top: 2px solid var(--tone, var(--accent)); border-radius: 3px; padding: 13px 15px; min-width: 0; }
.card:hover { border-inline-color: #5f675b; border-bottom-color: #5f675b; }
.mode-mp { --tone: var(--accent); --tint: #35271e; }
.mode-wz { --tone: var(--blue); --tint: #1c3034; }
.mode-dmz { --tone: var(--green); --tint: #2b3421; }
.card-top { display: flex; align-items: center; gap: 7px; }
.mode-tag { color: var(--tone,var(--accent)); background: var(--tint,#32251c); border: 1px solid color-mix(in srgb,var(--tone,var(--accent)) 25%,transparent); border-radius: 2px; font: 700 10px/1.3 var(--sans); padding: 4px 6px; white-space: nowrap; }
.weapon-type, .mini-label { color: var(--muted); font: 11px/1.4 var(--mono); letter-spacing: .08em; }
.icon-button { display: inline-grid; width: 31px; height: 31px; place-items: center; border: 1px solid var(--line); border-radius: 3px; background: transparent; color: var(--muted); padding: 4px; font-size: 18px; line-height: 1; }
.icon-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.65; }
.icon-button:hover, .icon-button[aria-pressed="true"] { color: var(--accent-hi); background: #32271f; border-color: #74432c; }
.favorite { margin-left: auto; }
.favorite[aria-pressed="true"] svg { fill: var(--accent); stroke: var(--accent); }
.card-title { margin: 9px 0 0; font-weight: 850; font-size: clamp(18px,2vw,24px); line-height: 1.25; letter-spacing: -.035em; }
.english { display: block; margin-top: 3px; color: var(--muted); font: 11px/1.35 var(--mono); }
.weapon-art { position: relative; overflow: hidden; aspect-ratio: 3.25; margin-top: 9px; background: #111611; border: 1px solid #363d33; border-radius: 2px; }
.weapon-art img { display: block; width: 103%; height: 100%; margin-left: -1.5%; object-fit: cover; object-position: 50% 20%; }
.weapon-art.season-art img { width: 115%; margin-left: -15%; object-position: 50% 23%; }
.weapon-art.tall-art img { object-position: 50% 36%; }
.role { margin: 9px 0; font-size: 12px; color: #d5dbce; }
.role strong { color: var(--tone,var(--accent)); }
.single-scheme-source { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.card-schemes { display: grid; gap: 6px; list-style: none; margin: 9px 0 0; padding: 0; }
.card-scheme, .scheme-choice { border: 1px solid var(--line); border-radius: 3px; background: #1d221c; color: var(--ink); text-align: left; }
.card-scheme { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 44px; padding: 5px 8px; }
.card-scheme strong, .scheme-choice strong { display: block; font-size: 12px; line-height: 1.25; }
.card-scheme small, .scheme-choice small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.3; }
.card-scheme:hover, .scheme-choice:hover, .scheme-choice[aria-pressed="true"] { border-color: var(--tone); background: var(--tint); }
.scheme-choice[aria-pressed="true"] strong, .scheme-arrow { color: var(--tone); }
.scheme-arrow { display: inline-flex; flex-shrink: 0; align-items: center; gap: 6px; }
.visual-badge { padding: 2px 4px; border: 1px solid var(--line); border-radius: 2px; color: var(--tone,var(--accent)); font: 700 10px/1.25 var(--sans); white-space: nowrap; }
.attachment-preview { display: grid; gap: 2px; margin: auto 0 0; border-block: 1px solid var(--line); padding: 7px 0; }
.attachment-preview div { display: grid; grid-template-columns: 55px minmax(0,1fr); gap: 7px; font-size: 11px; }
.attachment-preview dt { color: var(--muted); }
.attachment-preview dd { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); }
.card-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.card-schemes + .card-actions { margin-top: auto; padding-top: 10px; }
.card-actions > span { color: var(--muted); font-size: 11px; }
.card-buttons { display: flex; align-items: center; gap: 6px; }
.sub-button { padding: 4px 9px; border-radius: 3px; border: 1px solid #434b3e; background: #232822; color: var(--ink); font-size: 12px; font-weight: 750; min-height: 31px; }
.sub-button:hover { border-color: var(--accent); color: var(--accent-hi); }
.quick-code { background: #30271e; color: var(--accent-hi); border-color: #63412e; }
.empty { grid-column: 1/-1; text-align: center; border: 1px dashed #475143; padding: 42px 18px; color: var(--muted); }
.empty h3 { color: var(--ink); margin: 0 0 4px; }
.empty p { margin: 0 0 12px; }
.weapon-card { border-top-color: #56644b; }
.weapon-card .card-actions { margin-top: auto; padding-top: 6px; }
.sources-section { padding-bottom: 40px; }
.sources-layout { display: grid; grid-template-columns: 1fr 1.35fr; gap: 13px; }
.source-note, .source-links { border: 1px solid var(--line); background: var(--surface); padding: 17px; }
.source-note h3 { font-size: 18px; margin: 4px 0 5px; }
.source-note p { color: var(--muted); margin: 6px 0 0; font-size: 13px; }
.source-note .mini-label { color: var(--accent); }
.rating-sources { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.rating-source-card { display: flex; flex-direction: column; }
.rating-source-links { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: auto; padding-top: 10px; }
.rating-source-links a, .rating-detail a { color: var(--accent); }
.rating-source-links a { font-size: 12px; }
.rating-detail { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; color: var(--muted); font-size: 12px; }
.detail-summary .rating-detail-note { color: var(--muted); font-size: 12px; }
.source-links { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; }
.source-links a { display: flex; align-items: center; justify-content: space-between; gap: 6px; border-bottom: 1px solid var(--line); min-height: 33px; font-size: 12px; color: #dce1d8; }
.source-links a:hover, .source-links a span { color: var(--accent-hi); }
.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.footer-inner { display: flex; gap: 14px; align-items: center; justify-content: space-between; min-height: 58px; padding-block: 10px; }
.footer strong { color: var(--ink); white-space: nowrap; font-family: var(--mono); }
.footer strong span, .footer a:hover { color: var(--accent); }
.footer p { margin: 0; }
.footer a { white-space: nowrap; }
.detail-dialog { width: min(870px,calc(100% - 28px)); max-height: calc(100dvh - 30px); border: 1px solid #515151; border-top: 3px solid var(--accent); border-radius: 4px; padding: 0; background: var(--surface); color: var(--ink); }
.detail-dialog::backdrop { background: #090b09bb; backdrop-filter: blur(3px); }
.detail-inner { padding: 21px 23px; }
.detail-top { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.detail-inner h2 { margin: 6px 0 1px; font-size: clamp(22px,4vw,30px); line-height: 1.2; }
.detail-inner p { color: var(--muted); }
.detail-tags { display: flex; gap: 7px; align-items: center; }
.scheme-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.scheme-picker { margin-top: 14px; }
.scheme-mode-picker { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.scheme-mode-picker small { margin-left: 3px; color: var(--muted); font-size: 10px; }
.scheme-mode-picker [aria-pressed="true"] { border-color: var(--tone); color: var(--tone); background: var(--tint); }
.scheme-mode-empty { display: inline-flex; align-items: center; gap: 3px; padding: 3px 7px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); font-size: 12px; }
.scheme-picker h3 { margin: 0 0 5px; font-size: 12px; }
.scheme-picker small { color: var(--muted); font-weight: 400; }
.scheme-buttons { display: grid; grid-template-columns: repeat(auto-fit,minmax(135px,1fr)); gap: 6px; }
.scheme-choice { min-height: 45px; padding: 6px 8px; }
.detail-summary { margin: 12px 0 0; padding: 9px 10px; border: 1px solid var(--line); background: #151915; }
.detail-summary p { margin: 4px 0 0; font-size: 12px; }
.detail-summary p:first-child { margin-top: 0; }
.detail-summary .build-caveat { color: var(--accent-hi); }
.detail-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 13px; }
.detail-layout > * { min-width: 0; }
.slot-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.slot-heading h3 { margin: 0; font-size: 15px; }
#detail-compare[aria-pressed="true"] { border-color: var(--tone); color: var(--tone); }
#detail-compare[aria-pressed="true"] .compare-add, #detail-compare[aria-pressed="false"] .compare-remove { display: none; }
.build-preview { margin: 12px 0 0; border: 1px solid var(--line); background: #131713; }
.preview-heading { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 3px 8px; padding: 6px 9px; color: var(--ink); font-size: 12px; }
.preview-heading span { color: var(--muted); }
.build-preview[data-preview="fitted"] .preview-heading span { color: var(--tone,var(--accent-hi)); }
.build-preview .weapon-art { margin: 0; border-inline: 0; border-radius: 0; }
.preview-media { display: grid; place-items: center; padding: 3px; background: #101410; }
.preview-media img { display: block; width: 100%; height: auto; max-height: min(33dvh,310px); object-fit: contain; }
.build-preview figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 10px; padding: 5px 9px; color: var(--muted); font-size: 11px; }
.build-preview a { color: var(--accent-hi); }
.build-preview a:hover { text-decoration: underline; }
.gunsmith-entry { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 10px; margin-top: 11px; }
.gunsmith-entry > span, .gunsmith-preset { color: var(--muted); font-size: 12px; }
.gunsmith-preset { display: block; margin-top: 3px; }
.detail-dialog:has(.gunsmith-detail) { width: min(1090px, calc(100% - 28px)); }
.gunsmith-detail h2 span { white-space: nowrap; }
.gunsmith-top-actions { display: flex; flex-wrap: wrap; justify-content: end; align-items: center; gap: 6px; }
.gunsmith-grid { display: grid; grid-template-columns: minmax(0,1.36fr) minmax(0,1fr); align-items: start; gap: 14px; margin-top: 13px; }
.gunsmith-visual, .gunsmith-parts { min-width: 0; border: 1px solid var(--line); background: #151915; }
.gunsmith-stage { position: relative; overflow: hidden; background: radial-gradient(ellipse at 50% 38%, #343e36 0%, #19211c 60%, #111612 100%); }
.gunsmith-stage-label { position: absolute; top: 10px; left: 11px; right: 11px; display: flex; align-items: center; justify-content: space-between; gap: 8px; pointer-events: none; }
.gunsmith-stage-label strong { font: 750 12px var(--mono); color: var(--tone); }
.gunsmith-stage-label span { padding: 3px 5px; border: 1px solid var(--line); background: #151915; color: var(--muted); font-size: 11px; }
#vel-preview-canvas { display: block; width: 100%; height: clamp(270px,41vh,420px); touch-action: none; cursor: grab; }
#vel-preview-canvas:active { cursor: grabbing; }
#vel-preview-canvas:focus-visible { outline-offset: -3px; }
#vel-preview-unavailable { padding: 36px 11px 12px; }
.gunsmith-viewbar, .gunsmith-parts-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 7px; }
.gunsmith-viewbar { padding: 7px 9px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.gunsmith-parts { padding: 10px; }
.gunsmith-parts-heading h3 { margin: 0; font-size: 16px; }
.gunsmith-parts-heading > span { color: var(--tone); font: 750 12px var(--mono); }
.gunsmith-selects { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 9px; }
.gunsmith-select { display: grid; min-width: 0; gap: 3px; color: var(--muted); font-size: 11px; }
.gunsmith-select select { width: 100%; min-height: 36px; min-width: 0; padding: 5px 6px; border: 1px solid var(--line); border-radius: 3px; background: #252c24; color: var(--ink); font-size: 12px; }
.gunsmith-select select:disabled { opacity: .55; }
.gunsmith-parts .gunsmith-rule, .gunsmith-parts .gunsmith-change { margin: 8px 0; color: var(--muted); font-size: 12px; }
.gunsmith-parts .gunsmith-change { min-height: 1.45em; color: var(--accent-hi); }
.gunsmith-actions, .gunsmith-reference { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 9px; }
.gunsmith-reference { margin-top: 9px; color: var(--muted); font-size: 11px; }
.gunsmith-reference a { color: var(--accent-hi); }
.gunsmith-reference a:hover { text-decoration: underline; }
.build-analysis { padding: 11px 12px; background: #151915; border: 1px solid var(--line); border-left: 3px solid var(--tone); }
.evidence-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 9px; color: var(--muted); font-size: 11px; }
.evidence-type { padding: 2px 6px; background: var(--tint); color: var(--tone); border-radius: 2px; font-weight: 700; }
.evidence-meta time { font-family: var(--mono); }
.evidence-meta a { color: var(--accent-hi); }
.evidence-meta a:hover { text-decoration: underline; }
.build-analysis h3 { margin: 0 0 2px; font-size: 15px; }
.build-analysis p { margin: 4px 0 0; }
.build-analysis strong { color: var(--ink); }
.slot-list { display: grid; gap: 0; margin: 6px 0 10px; border: 1px solid var(--line); }
.slot-list > div { display: grid; grid-template-columns: 106px 1fr; gap: 10px; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.slot-list > div:last-child { border-bottom: 0; }
.slot-list dt { color: var(--muted); }
.slot-list dd { margin: 0; font-family: var(--mono); overflow-wrap: anywhere; }
.slot-list .apex-row { color: var(--accent-hi); background: #2f251e; }
.detail-code { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 9px 10px; background: #111511; border: 1px dashed #475141; }
.detail-code code { color: var(--green); font: 13px var(--mono); overflow-wrap: anywhere; }
.detail-primary-copy { justify-content: flex-start; margin-top: 10px; }
.detail-controls, .detail-sources { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.detail-sources { align-items: baseline; font-size: 12px; }
.detail-sources a { color: var(--accent-hi); font-size: 12px; }
.detail-sources a:hover { text-decoration: underline; }
.compare-tray { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 9px; width: max-content; max-width: calc(100% - 24px); padding: 8px; border: 1px solid #5c674e; border-radius: 5px; background: #242b21; box-shadow: 0 9px 30px #0008; }
#compare-selection { display: flex; flex-wrap: wrap; gap: 5px; padding-inline: 3px; }
#compare-selection span { color: #d8e1ce; border: 1px solid #4b5845; padding: 3px 5px; border-radius: 2px; font-size: 11px; }
.compare-overview { margin-top: 15px; }
.compare-overview h3 { margin: 0 0 7px; font-size: 15px; }
.compare-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.compare-summary-card { display: flex; flex-direction: column; min-width: 0; padding: 10px; border: 1px solid var(--line); border-top-color: var(--tone); background: var(--surface-hi); overflow-wrap: anywhere; }
.compare-context, .compare-rating { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; color: var(--muted); font-size: 11px; }
.compare-summary-card h4 { margin: 7px 0; font-size: 15px; line-height: 1.35; }
.compare-summary-card h4 span { display: block; color: var(--tone); font-size: 12px; }
.compare-tactics { display: grid; gap: 6px; margin: 0 0 8px; font-size: 12px; }
.compare-tactics dt, .compare-evidence strong { color: var(--ink); font-size: 11px; font-weight: 750; }
.compare-tactics dd { margin: 0; color: var(--muted); }
.compare-evidence { margin-top: auto; padding-top: 7px; border-top: 1px solid var(--line); font-size: 11px; }
.compare-evidence p, .compare-source-links { display: flex; flex-wrap: wrap; gap: 4px 7px; margin: 3px 0; }
.compare-status.review { color: var(--accent-hi); }
.compare-source-links a, .compare-rating a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.compare-rating { margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--line); }
.compare-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.compare-table caption { text-align: left; color: var(--muted); margin: 14px 0 5px; }
.compare-table caption strong { color: var(--ink); font-size: 15px; }
.compare-table th, .compare-table td { border-bottom: 1px solid var(--line); padding: 6px; text-align: left; overflow-wrap: anywhere; }
.compare-table th:first-child { width: 19%; color: var(--muted); }
.compare-table .build-preview { margin-top: 5px; }
.compare-table .preview-media img { max-height: 120px; }
.compare-table .preview-heading, .compare-table .build-preview figcaption { padding: 3px 5px; font-size: 10px; }
.compare-table td { font-family: var(--mono); }
.compare-table .difference td { color: var(--accent-hi); }
@media (max-width: 360px) { .compare-summary { grid-template-columns: minmax(0,1fr); } }
.toast { position: fixed; bottom: 72px; right: 14px; z-index: 10; background: #e8f0de; color: #171e15; border-radius: 3px; padding: 9px 13px; box-shadow: 0 6px 30px #0008; font-weight: 700; max-width: calc(100% - 28px); }
@media (max-width: 980px) {
  .shell { width: calc(100% - 40px); }
  .cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 640px) {
  html { scroll-padding-top: 106px; }
  .shell { width: calc(100% - 24px); }
  .topbar-inner { gap: 4px 8px; flex-wrap: wrap; padding: 7px 0 0; }
  .brand-mark { width: 33px; height: 33px; }
  .brand-mark svg { width: 22px; }
  .brand strong { font-size: 15px; }
  .brand small { font-size: 9px; }
  nav { width: 100%; order: 3; gap: 7px; }
  .nav-btn { min-height: 36px; padding-inline: 7px; font-size: 12px; }
  .sources-section { margin-top: 30px; }
  .database-header { padding-inline: 8px; }
  .breadcrumb { gap: 4px; font-size: 12px; }
  .game-subtitle { display: none; }
  .control-line { gap: 6px; }
  .table-filter select { min-width: 108px; }
  .control-options { left: auto; right: 0; }
  .loadout-table { max-height: max(315px,calc(100dvh - 244px)); }
  .scheme-table tr > :first-child { min-width: 120px; }
  .scheme-table .table-rating, .scheme-table .table-type, .scheme-table .table-role { min-width: 64px; }
  .scheme-table td.table-type { white-space: normal; }
  .scheme-table th, .scheme-table td { padding-inline: 7px; }
  .scheme-table thead th { height: 44px; }
  .controls { padding: 7px 8px 5px; }
  .search { order: -1; width: 100%; min-width: 0; }
  .search kbd { display: none; }
  .shortcut-weapon { display: none; }
  .cards, .sources-layout, .rating-sources { grid-template-columns: 1fr; }
  .sources-section { padding-bottom: 25px; }
  .footer-inner { flex-wrap: wrap; gap: 5px 9px; }
  .footer p { order: 3; width: 100%; }
  .detail-inner { padding: 15px; }
  .detail-layout { grid-template-columns: 1fr; }
  .gunsmith-grid { grid-template-columns: 1fr; }
  .gunsmith-detail h2 { font-size: clamp(18px,5vw,22px); }
  .gunsmith-visual { position: sticky; top: 0; z-index: 1; }
  #vel-preview-canvas { height: clamp(205px, 31dvh, 255px); }
  .gunsmith-top-actions { flex: 0 0 auto; flex-wrap: nowrap; }
  .gunsmith-top-actions .sub-button { min-height: 28px; }
  .scheme-buttons { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .preview-media img { max-height: 205px; }
  .slot-list > div { grid-template-columns: 72px 1fr; }
  .compare-tray { bottom: 8px; }
  .compare-tray .primary-button { gap: 4px; padding-inline: 6px; min-height: 34px; font-size: 12px; }
}
@media (max-width: 360px) { .rating-status .rating-scope { display: none; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
