/* L2BOH.NET — страницы базы предметов и NPC */
.db .qlib__head { margin-bottom: 16px; }
.db-hd { display: flex; align-items: center; gap: 14px; }
.db-ico { display: inline-block; width: 24px; height: 24px; flex: none; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .55); vertical-align: middle; }
.db-ico--none { background: #221b14; }
.db-ico--big { width: 48px; height: 48px; border-radius: 5px; box-shadow: 0 0 0 1px var(--gold-lo); }
.db-sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.db-wrap { display: grid; gap: 18px; grid-template-columns: 300px minmax(0, 1fr); align-items: start; }
@media (max-width: 899px) { .db-wrap { grid-template-columns: 1fr; } }
.db-facts > div { grid-template-columns: 130px 1fr; }
.db-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.db-tab { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 6px; background: #17130f; color: var(--muted); font-weight: 600; font-size: 15px; text-decoration: none; }
.db-tab:hover { color: var(--gold-hi); border-color: var(--gold-lo); }
.db-tab[aria-selected="true"] { color: #1a140c; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); border-color: var(--gold); }
.db-tab__n { min-width: 22px; padding: 1px 6px; border-radius: 10px; background: rgba(0, 0, 0, .35); color: inherit; font-size: 12px; text-align: center; }
.db-tab[aria-selected="true"] .db-tab__n { background: rgba(0, 0, 0, .18); }
.db-sec { margin-bottom: 18px; }
.db-sec__h { margin: 0 0 10px; color: var(--gold); font: 700 19px/1.2 var(--f-disp); }
.db-tw { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; }
.db-t { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.db-t th { padding: 8px 10px; background: #1b1610; color: var(--ash); font-weight: 600; font-size: 12.5px; text-align: left; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.db-t td { padding: 6px 10px; border-top: 1px solid var(--line); color: var(--text); vertical-align: middle; }
.db-t tr:hover td { background: rgba(217, 180, 90, .04); }
.db-c { text-align: center; } .db-r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.db-ok { color: #6fd36f; }
.db-it { display: inline-flex; align-items: center; gap: 8px; color: var(--gold-hi); text-decoration: none; }
.db-it:hover span { text-decoration: underline; text-underline-offset: 3px; }
.db-cnt { color: var(--muted); font-size: 13px; }
.db-gr { display: inline-grid; width: 22px; height: 20px; font-size: 11px; margin-left: 2px; }
.db-npc { color: var(--gold-hi); text-decoration: none; } .db-npc:hover { text-decoration: underline; text-underline-offset: 3px; }
.db-badge { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; vertical-align: 2px; }
.db-badge--rb { background: rgba(255, 102, 102, .15); color: #ff8a8a; border: 1px solid rgba(255, 102, 102, .35); }
.db-rec { margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255, 255, 255, .02); }
.db-rec__h { margin: 0 0 8px; }
.db-rec__m { display: block; margin-top: 4px; color: var(--ash); font-size: 13px; }
.db-ings { display: grid; gap: 6px 18px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin: 0; padding: 0; list-style: none; }
.db-coords { columns: 3 180px; margin: 6px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 13px; }
.kg__n { margin-left: 6px; padding: 1px 8px; border-radius: 10px; background: #221b13; color: var(--ash); font: 600 12px/1.6 var(--l2-ui-font, sans-serif); }
.kg .db-tw { margin-top: 8px; }
.set-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); margin-top: 10px; }
.set-c { display: grid; grid-template-columns: 32px 1fr; gap: 2px 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: #17130f; text-decoration: none; }
.set-c:hover { border-color: var(--gold-lo); background: #1e1812; }
.set-c .db-ico { grid-row: span 2; width: 32px; height: 32px; }
.set-c__t { color: var(--gold-hi); font-weight: 600; }
.set-c__s { color: var(--ash); font-size: 12.5px; }
.db-note { margin-bottom: 12px; }

/* главная «Спойл и крафт»: поиск, лента грейдов, плитки категорий */
.dbs { position: relative; display: flex; align-items: center; gap: 10px; max-width: 720px; margin: 0 0 18px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 8px; background: #15110d; }
.dbs:focus-within { border-color: var(--gold-lo); box-shadow: 0 0 0 3px rgba(217, 180, 90, .12); }
.dbs > svg { width: 18px; height: 18px; color: var(--gold); flex: none; }
.dbs input { flex: 1; min-width: 0; height: 48px; border: 0; background: none; color: var(--text); font: 500 16px var(--l2-ui-font, sans-serif); outline: none; }
.dbs__r { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0; max-height: 420px; overflow-y: auto; margin: 0; padding: 6px; list-style: none; border: 1px solid var(--gold-lo); border-radius: 8px; background: #17120d; box-shadow: 0 12px 30px rgba(0, 0, 0, .6); }
.dbs__r a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 5px; color: var(--gold-hi); text-decoration: none; }
.dbs__r a:hover, .dbs__r a.is-sel { background: rgba(217, 180, 90, .1); }
.dbs__none { padding: 10px; color: var(--ash); }
.gr-rail { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 0 0 18px; }
.gr { position: relative; display: grid; justify-items: center; gap: 4px; padding: 12px 6px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: linear-gradient(180deg, #1c1712, #120e0a); text-decoration: none; transition: border-color .15s, transform .15s; }
.gr:hover { border-color: var(--gold-lo); transform: translateY(-1px); }
.gr .db-ico { width: 32px; height: 32px; }
.gr__l { font: 700 22px/1 var(--f-disp); }
.gr__s { color: var(--ash); font-size: 12px; }
.gr[aria-current="true"] { border-color: var(--gold); background: linear-gradient(180deg, #2a2116, #17110b); box-shadow: inset 0 -3px 0 var(--gold), 0 6px 18px rgba(0, 0, 0, .35); }
.gr--ng .gr__l { color: #b0b0b0; } .gr--d .gr__l { color: #9999ff; } .gr--c .gr__l { color: #3fd23f; } .gr--b .gr__l { color: #ff6b6b; } .gr--a .gr__l { color: #c9c9c9; } .gr--s .gr__l { color: #ffe95c; }
.gp { margin-bottom: 20px; }
.gp__h { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; color: var(--text); font: 700 21px/1.2 var(--f-disp); }
.gp__h .cm-g { width: 38px; height: 32px; }
.gp__s { color: var(--ash); font: 400 14px var(--l2-ui-font, sans-serif); }
.ct-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.ct { position: relative; display: grid; justify-items: center; gap: 6px; padding: 16px 8px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: radial-gradient(120% 80% at 50% 0%, rgba(217, 180, 90, .08), transparent 60%), #15110d; text-align: center; text-decoration: none; transition: border-color .15s, transform .15s; }
.ct:hover { border-color: var(--gold-lo); transform: translateY(-2px); }
.ct .db-ico { width: 48px; height: 48px; border-radius: 6px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), 0 4px 10px rgba(0, 0, 0, .4); }
.ct__t { color: var(--gold-hi); font-weight: 600; font-size: 15px; }
.ct__n { position: absolute; top: 8px; right: 8px; min-width: 24px; padding: 1px 7px; border-radius: 10px; background: #251d14; color: var(--gold); font-size: 12px; font-weight: 700; }
.ct--set { border-color: var(--gold-lo); background: radial-gradient(120% 80% at 50% 0%, rgba(217, 180, 90, .18), transparent 65%), #19140e; }
@media (max-width: 640px) { .gr-rail { grid-template-columns: repeat(3, 1fr); } .ct-grid { grid-template-columns: repeat(2, 1fr); } }
.db-nm { display: inline-flex; flex-direction: column; line-height: 1.2; }
.db-ru { color: var(--ash); font-size: 12px; font-weight: 400; }
.db-it:hover .db-ru { text-decoration: none; }
/* раздел «Монстры и NPC» */
.ng-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ng-tab { padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: #17130f; color: var(--muted); font-size: 14px; text-decoration: none; }
.ng-tab:hover { color: var(--gold-hi); border-color: var(--gold-lo); }
.ng-tab.is-on { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #1a140c; border-color: var(--gold); font-weight: 600; }
.nc-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin: 6px 0 18px; }
.nc { position: relative; display: grid; grid-template-columns: 54px 1fr; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: #15110d; text-decoration: none; }
.nc:hover { border-color: var(--gold-lo); background: #1c1611; }
.nc__img, .nc__ph { width: 54px; height: 54px; border-radius: 5px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.6); }
.nc__ph { display: block; background: radial-gradient(circle at 50% 35%, #3a2e20 0 22%, transparent 23%), radial-gradient(ellipse at 50% 100%, #3a2e20 0 45%, transparent 46%), #1d1712; }
.nc__b { display: grid; min-width: 0; }
.nc__ti { color: #6fd36f; font-size: 11.5px; }
.nc__t { color: var(--gold-hi); font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nc__m { color: var(--ash); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nc__lv { color: var(--gold); font-weight: 600; }
.nc .db-badge { position: absolute; top: 6px; right: 8px; font-size: 9.5px; }
.db-side { display: grid; gap: 12px; align-content: start; }
.db-photo img { width: 100%; height: auto; border-radius: 6px; }
.db-photo--empty { display: grid; place-items: center; aspect-ratio: 3 / 2; border: 1px dashed var(--line-strong); border-radius: 6px; color: var(--ash); font-size: 13px; background: #15110d; }
/* страница монстра/NPC: всё сразу, без вкладок */
.nh { display: grid; gap: 12px; grid-template-columns: 260px minmax(0, 1fr) 260px; align-items: stretch; margin-bottom: 16px; }
@media (max-width: 1000px) { .nh { grid-template-columns: 200px minmax(0, 1fr); } .nh__map { grid-column: 1 / -1; } }
@media (max-width: 600px) { .nh { grid-template-columns: 1fr; } }
.nh__img { width: 100%; height: 100%; min-height: 180px; object-fit: cover; border: 1px solid var(--line-strong); border-radius: 8px; }
.nh__img--empty { display: grid; place-items: center; background: radial-gradient(circle at 50% 38%, #3a2e20 0 16%, transparent 17%), radial-gradient(ellipse at 50% 100%, #3a2e20 0 38%, transparent 39%), #17120d; }
.nh__img--empty span { margin-top: 70%; color: var(--ash); font-size: 13px; }
.nh__tiles { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; }
.nh__tile, .nh__map { display: grid; gap: 3px; align-content: start; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: linear-gradient(180deg, #1c1712, #13100c); }
.nh__k { color: var(--ash); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.nh__v { color: var(--text); font-weight: 600; font-size: 15px; }
.nh__map b { color: var(--gold-hi); }
.nh__map .db-coords { columns: 1; margin-top: 4px; }
.nh__lvl { display: inline-block; padding: 2px 8px; border-radius: 6px; background: #241c13; color: var(--gold); font: 700 15px/1.3 var(--l2-ui-font, sans-serif); vertical-align: 6px; }
.nh__sks { display: flex; flex-wrap: wrap; gap: 6px; }
.nh__sk { padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: 14px; background: #17130f; color: var(--muted); font-size: 13px; cursor: help; }
.nh__det { margin: 0 0 16px; border: 1px solid var(--line); border-radius: 6px; background: #14100c; }
.nh__det > summary { padding: 10px 14px; color: var(--gold); font: 700 15px var(--f-disp); cursor: pointer; }
.nh__st { margin: 0 14px 14px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); display: grid; }
.nh__ds { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
@media (max-width: 900px) { .nh__ds { grid-template-columns: 1fr; } }
.nh__h3 { margin: 0 0 8px; color: var(--text); font: 700 16px var(--f-disp); }
.nmap { height: 440px; border: 1px solid var(--line-strong); border-radius: 8px; background: #1a1611; }
.nmap__hint { margin-top: 6px; }
.leaflet-container { font: inherit; }

/* 3D-рендер модели из клиента (портрет 3:4) */
.nh__img--r { object-fit: cover; object-position: center 35%; aspect-ratio: 3 / 4; height: auto; background: #0e0b09; }
@media (max-width: 600px) { .nh__img--r { max-width: 300px; margin: 0 auto; } }
.nc__img { object-position: center 25%; }


/* переключатель хроник Interlude / High Five (10.11) */
.chron { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 14px; padding: 8px 10px; border: 1px solid var(--gold-lo); border-radius: 8px; background: linear-gradient(180deg, rgba(217,180,90,.10), rgba(217,180,90,.03)); }
.chron__l { color: var(--gold); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-right: 4px; }
.chron__b { padding: 7px 16px; border: 1px solid var(--line-strong); border-radius: 6px; background: #17130f; color: var(--muted); font: 700 15px var(--f-disp, serif); text-decoration: none; }
.chron__b:hover { color: var(--gold-hi); border-color: var(--gold-lo); }
.chron__b[aria-current="page"] { color: #1a1208; background: linear-gradient(180deg, #f0d48a, #c9a24c); border-color: #e8c66e; }
.gr--s80 .gr__l { color: #ffad66; text-shadow: 0 0 12px rgba(255, 140, 50, .45); }
.gr--s84 .gr__l { color: #ff74a3; text-shadow: 0 0 12px rgba(255, 60, 120, .45); }

/* калькулятор крафта (10.11) */
.cc-on .cc-static { display: none; }
.cc { margin: 6px 0 4px; }
.cc-bar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin: 4px 0 12px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: #15110d; }
.cc-f { display: flex; align-items: center; gap: 8px; color: var(--ash); font-size: 13px; }
.cc-f b { color: var(--gold-hi); }
.cc-seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; }
.cc-seg button { padding: 5px 12px; background: #17130f; color: var(--muted); border: 0; font-weight: 700; cursor: pointer; }
.cc-seg button[aria-pressed="true"] { background: linear-gradient(180deg, #f0d48a, #c9a24c); color: #1a1208; }
.cc-q, .cc-in { width: 92px; padding: 5px 8px; border: 1px solid var(--line-strong); border-radius: 5px; background: #0f0c09; color: var(--text); font: inherit; }
.cc-acts { margin-left: auto; }
.cc-x { padding: 5px 10px; border: 1px solid var(--line-strong); border-radius: 5px; background: #17130f; color: var(--muted); cursor: pointer; font-size: 12.5px; }
.cc-x:hover { color: var(--gold-hi); border-color: var(--gold-lo); }
.cc-h { margin: 14px 0 8px; color: var(--gold); font: 700 13px/1.3 var(--l2-ui-font, sans-serif); letter-spacing: .1em; text-transform: uppercase; }
.cc-tree, .cc-tree ul { list-style: none; margin: 0; padding: 0; }
.cc-tree { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.cc-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px calc(10px + var(--d, 0) * 22px); border-top: 1px solid var(--line); background: rgba(255,255,255,.015); }
.cc-tree > li:first-child > .cc-row { border-top: 0; }
.cc-n .cc-n .cc-row { background: rgba(0,0,0,.18); }
.cc-name { flex: 1; min-width: 0; color: var(--text); text-decoration: none; font-size: 14px; }
.cc-name b { color: var(--gold-hi); font-weight: 700; }
.cc-name small { display: block; color: var(--ash); font-size: 11.5px; }
.cc-name:hover { color: var(--gold-hi); }
.cc-t { flex: none; width: 28px; height: 28px; border: 1px solid var(--line-strong); border-radius: 50%; background: #17130f; color: var(--gold); cursor: pointer; }
.cc-t::before { content: "▾"; display: block; line-height: 26px; transition: transform .15s; }
.cc-t[aria-expanded="true"]::before { transform: rotate(180deg); }
.cc-scroll { overflow-x: auto; }
.cc-tbl { min-width: 620px; }
.cc-c { display: inline-flex; align-items: center; gap: 8px; }
.cc-c a { color: var(--text); }
.cc-miss { color: #ff9f6b; }
.cc-tbl tfoot td { border-top: 1px solid var(--line-strong); font-weight: 700; color: var(--gold); }
.cc-tot { color: var(--gold-hi) !important; font-size: 16px; }
.cc-note { margin-top: 8px; }

/* калькулятор v2: кнопки «Из чего / Скрыть», панель количества над расчётом */
.cc-t { flex: none; width: auto; height: auto; padding: 5px 12px 5px 10px; border: 1px solid var(--gold-lo); border-radius: 999px; background: linear-gradient(180deg, rgba(217,180,90,.16), rgba(217,180,90,.05)); color: var(--gold-hi); font: 600 12.5px var(--f-body, sans-serif); cursor: pointer; white-space: nowrap; }
.cc-t::before { content: "▾"; display: inline-block; margin-right: 6px; line-height: 1; transition: transform .15s; }
.cc-t[aria-expanded="true"] { background: linear-gradient(180deg, #f0d48a, #c9a24c); color: #1a1208; border-color: #e8c66e; }
.cc-t[aria-expanded="true"]::before { transform: rotate(180deg); }
.cc-t:hover { border-color: #e8c66e; box-shadow: 0 0 0 2px rgba(217,180,90,.18); }
.cc-x { padding: 6px 12px; border-color: var(--gold-lo); color: var(--gold-hi); background: linear-gradient(180deg, rgba(217,180,90,.14), rgba(217,180,90,.04)); font-weight: 600; }
.cc-x:hover { background: linear-gradient(180deg, #f0d48a, #c9a24c); color: #1a1208; }
.cc-qbar { margin-top: 0; }
.cc-qbar .cc-acts { margin-left: auto; display: inline-flex; gap: 6px; }
.cc-hint { flex-basis: 100%; margin: 2px 0 0; }
@media (max-width: 600px) { .cc-qbar .cc-acts { margin-left: 0; } .cc-row { padding-left: calc(8px + var(--d, 0) * 14px); } }

.cc-c { width: 100%; }
.cc-t--tbl { margin-left: auto; }
.cc-pw { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.cc-k { color: var(--gold, #d8b26a); font-size: 12px; font-weight: 600; min-height: 0; line-height: 1.1; }
.cc-k:empty { display: none; }
.cc-pr { text-align: right; }
/* S80 / S84 (HF): свои плашки — янтарная и малиновая, с огранённым кристаллом */
.gr-rail--8 { grid-template-columns: repeat(8, 1fr); }
@media (max-width: 900px) { .gr-rail--8 { grid-template-columns: repeat(4, 1fr); } }
.gr__gem { display: block; width: 32px; height: 32px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5)); }
.gr--s80 { border-color: #6e4020; background: radial-gradient(120% 90% at 50% 0%, rgba(255, 150, 60, .16), transparent 60%), linear-gradient(180deg, #24170e, #120c07); }
.gr--s84 { border-color: #6e2038; background: radial-gradient(120% 90% at 50% 0%, rgba(255, 70, 130, .16), transparent 60%), linear-gradient(180deg, #24101a, #12070b); }
.gr--s80:hover { border-color: #c06a2c; } .gr--s84:hover { border-color: #c03a68; }
.gr--s80[aria-current="true"] { border-color: #ff9a3c; box-shadow: inset 0 -3px 0 #ff9a3c, 0 6px 18px rgba(0, 0, 0, .35); }
.gr--s84[aria-current="true"] { border-color: #ff4f8b; box-shadow: inset 0 -3px 0 #ff4f8b, 0 6px 18px rgba(0, 0, 0, .35); }
.cm-g--s80 { color: #ffb070; background: linear-gradient(135deg, #3b2210, #1a0f08); border-color: #8a4a20; font-size: 13px; letter-spacing: -.02em; }
.cm-g--s84 { color: #ff80aa; background: linear-gradient(135deg, #3b1022, #1a080f); border-color: #8a2045; font-size: 13px; letter-spacing: -.02em; }
a.cm-g--s80:hover { border-color: #ff9a3c; background: linear-gradient(135deg, #4a2a12, #22140a); }
a.cm-g--s84:hover { border-color: #ff4f8b; background: linear-gradient(135deg, #4a1428, #220a14); }
/* сортировка таблиц */
.db-t--sort th { cursor: pointer; user-select: none; white-space: nowrap; }
.db-t--sort th:hover { color: var(--gold, #d8b26a); }
.db-t--sort th::after { content: ' \21C5'; opacity: .35; font-size: .85em; }
.db-t--sort th[aria-sort=ascending]::after { content: ' \25B2'; opacity: .9; color: var(--gold, #d8b26a); }
.db-t--sort th[aria-sort=descending]::after { content: ' \25BC'; opacity: .9; color: var(--gold, #d8b26a); }
/* mobile-fit v1 (11.11.2026): колонка не шире экрана, широкие таблицы листаются внутри своей рамки */
.db-wrap > * { min-width: 0; }
@media (max-width: 899px) { .db-wrap { grid-template-columns: minmax(0, 1fr); } }
.db-tw, .cc-scroll { max-width: 100%; -webkit-overflow-scrolling: touch; }
