/* Калькулятор крафта (/craft) — 09.10.2026, в цветах сайта.
   10.10.2026: переписан целиком — единые цвета, высоты и отступы для всех кнопок, полей, списков и таблиц;
   на телефоне таблицы — карточки, дерево — с узкими отступами. */
.ldc {
  --ink: #1f2a36; --txt: #3e4a57; --mut: #6b7785; --mut2: #8b96a2;
  --line: #e3e8ee; --line2: #eef2f6; --soft: #f5f7fa; --seg: #e9eef3;
  --acc: #2c5288; --acc2: #eaf1f9; --focus: #b8cdea; --ok: #1f8a5b;
  --r: 8px; --h: 36px; --hs: 32px;
}
/* на 768–1199 px боковое меню сайта «плавает» слева, а колонка контента — нет: без этого блоки калькулятора
   то обтекали меню, то уходили под всю его высоту (пустота на экран). flow-root ставит колонку целиком справа от меню. */
#ldc.ldc { display: flow-root; }
/* банер в боковом меню — фиксированные 230 px, а меню на 768–991 px уже (~180 px): не даём ему наползать на калькулятор */
.sbnopad img { max-width: 100%; height: auto; }
.ldc .ldc-lead { color: var(--txt); max-width: 760px; margin: 0 0 16px; line-height: 1.55; }
.ldc h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 18px; font-weight: 600; line-height: 1.3; margin: 28px 0 10px; color: var(--ink); }
.ldc h3 { font-size: 15px; font-weight: 600; margin: 16px 0 6px; }
.ldc a { text-decoration: none; }
.ldc a:hover { text-decoration: underline; text-underline-offset: 2px; }
.ldc button { font-family: inherit; }
.ldc :focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.ldc-note { color: var(--mut); font-size: 13px; line-height: 1.5; }
.ldc-static { margin: 6px 0 14px; }
.ldc-g { font-style: normal; font-size: 11px; font-weight: 700; color: var(--mut); margin-left: 4px; letter-spacing: .02em; }
.ldc-ic { width: 32px; height: 32px; border-radius: 6px; flex: none; box-shadow: 0 0 0 1px rgba(20, 40, 60, .14); background: #fff; }
.ldc-ic-sm { width: 24px; height: 24px; border-radius: 5px; }
.ldc-ic-big { width: 52px; height: 52px; border-radius: 9px; }
#ldc-app.is-loading { opacity: .5; pointer-events: none; transition: opacity .15s; }

/* ---------- поля, списки, кнопки (общие) */
.ldc input[type="search"], .ldc input[type="number"], .ldc select {
  font: inherit; color: var(--ink); background: #fff; border: 1px solid #cfd7e1; border-radius: var(--r); transition: border-color .15s, box-shadow .15s; }
.ldc input[type="search"]:hover, .ldc input[type="number"]:hover, .ldc select:hover { border-color: #b4c1cf; }
.ldc input[type="search"]:focus, .ldc input[type="number"]:focus, .ldc select:focus { outline: 0; border-color: var(--acc); box-shadow: 0 0 0 3px rgba(44, 82, 136, .14); }
.ldc input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.ldc input[type="number"]::-webkit-inner-spin-button, .ldc input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ldc input::placeholder { color: #9aa6b2; }
.ldc select { -webkit-appearance: none; appearance: none; height: var(--hs); padding: 0 30px 0 11px; font-size: 13px; font-weight: 600; color: var(--txt); cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236b7785' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 11px center; }
.ldc input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--acc); cursor: pointer; }
/* кнопки-действия: мягкие прямоугольные */
.ldc-btn, .ldc-share button, .ldc-more { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: var(--hs); padding: 0 12px; border: 0; border-radius: var(--r);
  background: #eef2f6; color: var(--txt); font-size: 13px; font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer; transition: background .15s, color .15s; }
.ldc-btn:hover, .ldc-share button:hover, .ldc-more:hover { background: #e2e8ef; color: var(--ink); }
.ldc-share svg { color: var(--mut); flex: none; }
.ldc-ls { display: none; }
.ldc-link { border: 0; background: none; padding: 0; color: var(--acc); font-size: 13px; font-weight: 400; cursor: pointer; }
.ldc-link:hover { text-decoration: underline; text-underline-offset: 2px; }
/* сегментный переключатель (хроника, грейд, рецепт) */
.ldc-chr, .ldc-seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--seg); border-radius: 10px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.ldc-chr::-webkit-scrollbar, .ldc-seg::-webkit-scrollbar { display: none; }
.ldc-chr a, .ldc-seg button { flex: none; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; border-radius: 7px;
  color: #4a5866; font-weight: 600; cursor: pointer; text-decoration: none !important; transition: background .15s, color .15s; }
.ldc-chr a { height: 34px; padding: 0 16px; font-size: 14px; }
.ldc-seg button { height: 26px; min-width: 32px; padding: 0 10px; font-size: 13px; }
.ldc-chr a:hover, .ldc-seg button:hover { color: var(--ink); background: rgba(255, 255, 255, .6); }
.ldc-chr a[aria-current], .ldc-seg button[aria-pressed="true"] { background: #fff; color: var(--acc); box-shadow: 0 1px 3px rgba(20, 40, 60, .16); }

/* ---------- шапка: хроника + поиск */
.ldc-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.ldc-search { position: relative; flex: 1 1 280px; min-width: 0; }
.ldc .ldc-search input { width: 100%; height: 40px; padding: 0 12px 0 38px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Ccircle cx='7' cy='7' r='5' fill='none' stroke='%238b96a2' stroke-width='1.6'/%3E%3Cpath d='M11 11l3.5 3.5' stroke='%238b96a2' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 13px center; }
.ldc-sug { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid #d9e0e8; border-radius: 10px;
  box-shadow: 0 12px 30px rgba(20, 40, 60, .16); max-height: 420px; overflow: auto; padding: 4px; }
.ldc-sug div { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 7px; cursor: pointer; }
.ldc-sug div.on, .ldc-sug div:hover { background: var(--acc2); }
.ldc-sug div > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.ldc-sug small { color: var(--mut); font-size: 12px; white-space: nowrap; }
.ldc-sug .ldc-none { color: var(--mut); cursor: default; padding: 10px; }
.ldc-addb { flex: none; height: 24px; padding: 0 9px; border: 0; border-radius: 6px; background: #eef2f6; color: var(--acc); font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.ldc-addb:hover { background: #dfe8f3; }

/* ---------- каталог */
.ldc-filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.ldc-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.ldc-tabs::-webkit-scrollbar { display: none; }
.ldc-tabs button { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent;
  background: none; font-size: 14px; font-weight: 600; color: #5b6875; cursor: pointer; white-space: nowrap; transition: color .15s, border-color .15s; }
.ldc-tabs button:first-child { padding-left: 2px; }
.ldc-tabs button span { min-width: 22px; padding: 1px 6px; border-radius: 6px; background: #eef2f6; color: var(--mut2); font-size: 11.5px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.ldc-tabs button:hover { color: var(--ink); border-bottom-color: #c9d4e1; }
.ldc-tabs button[aria-pressed="true"] { color: var(--acc); border-bottom-color: var(--acc); }
.ldc-tabs button[aria-pressed="true"] span { background: var(--acc2); color: var(--acc); }
.ldc-tabs button:disabled { opacity: .4; cursor: default; border-bottom-color: transparent; }
.ldc-sel { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; font-size: 13px; color: var(--mut); }
.ldc-sel label { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; }
.ldc-seg-w { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; }
.ldc-lbl { white-space: nowrap; }
.ldc-count { margin-left: auto; font-variant-numeric: tabular-nums; }
.ldc-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 2px 14px; }
.ldc-grid li { list-style: none !important; margin: 0; }
.ldc-grid a { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--r); color: var(--ink); text-decoration: none !important; transition: background .12s; }
.ldc-grid a:hover { background: var(--soft); }
.ldc-grid a:hover b { color: var(--acc); }
.ldc-grid a > span { min-width: 0; }
.ldc-grid b { font-weight: 600; line-height: 1.3; }
.ldc-grid small, .ldc-ru { display: block; color: var(--mut); font-size: 12px; line-height: 1.35; }
.ldc-more { display: flex; margin: 18px auto 0; height: 36px; padding: 0 22px; }

/* ---------- предмет: шапка */
.ldc-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 14px; margin: 2px 0 14px; }
.ldc-head > div { flex: 1 1 260px; min-width: 0; }
.ldc-title { font-size: 18px; font-weight: 600; line-height: 1.3; }
.ldc-recipe { display: flex; align-items: center; gap: 7px; margin-top: 6px; font-size: 13.5px; }
.ldc-rmeta { margin-top: 3px; font-size: 12.5px; color: var(--mut); }
.ldc-share { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; margin-left: auto; }
#ldc-msg { color: var(--ok); font-size: 12.5px; flex-basis: 100%; text-align: right; min-height: 0; }
#ldc-msg:empty { display: none; }
.ldc-recs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 14px; font-size: 13.5px; color: var(--mut); }
.ldc-recs small { flex-basis: 100%; font-size: 12px; }
/* количество */
.ldc-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ldc-n { display: inline-flex; align-items: center; gap: 12px; margin: 0; font-weight: 600; color: var(--ink); }
.ldc-step { display: inline-flex; height: var(--h); border: 1px solid #cfd7e1; border-radius: var(--r); overflow: hidden; background: #fff; }
.ldc-step:focus-within { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(44, 82, 136, .14); }
.ldc-step button { width: 36px; border: 0; background: #f2f5f8; color: var(--txt); font-size: 17px; line-height: 1; cursor: pointer; transition: background .12s, color .12s; }
.ldc-step button:hover { background: var(--acc2); color: var(--acc); }
.ldc .ldc-step input { width: 92px; height: 100%; border: 0; border-radius: 0; box-shadow: none; text-align: center; font-weight: 600; padding: 0 4px; }
.ldc-step-sm { height: var(--hs); }
.ldc-step-sm button { width: 30px; font-size: 15px; }
.ldc .ldc-step-sm input { width: 64px; }
.ldc-chk { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; color: var(--txt); cursor: pointer; }
.ldc-hint { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 50%; background: #eef2f6; color: var(--mut); font-size: 11px; font-weight: 700; cursor: help; }
/* ещё предметы в расчёте */
.ldc-list { padding: 12px 0 14px; border-bottom: 1px solid var(--line); }
.ldc-list-h { font-size: 13px; color: var(--mut); margin-bottom: 8px; }
.ldc-list ul { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ldc-list li { list-style: none !important; margin: 0; display: flex; align-items: center; gap: 10px; }
.ldc-list li > .ldc-nm { flex: 1; min-width: 0; }
.ldc-x { flex: none; width: 28px; height: 28px; border: 0; border-radius: 6px; background: none; color: #98a3ae; font-size: 20px; line-height: 1; cursor: pointer; }
.ldc-x:hover { background: #fdecea; color: #c0392b; }
.ldc-add { flex: none; max-width: 520px; }
.ldc .ldc-search.ldc-add input { height: var(--hs); padding-left: 12px; background-image: none; font-size: 13.5px; border-style: dashed; }
.ldc .ldc-search.ldc-add input:focus { border-style: solid; }
/* главное одной строкой */
.ldc-facts { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 14px 0 0; padding: 11px 14px; background: var(--soft); border-radius: 10px; font-size: 13.5px; color: #4a5866; }
.ldc-facts b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- дерево крафта */
.ldc-tree-hint { margin: -4px 0 10px; }
.ldc-tree-hint svg { vertical-align: -2px; color: #9aa6b2; }
.ldc-tree, .ldc-tree ul { list-style: none; margin: 0; padding: 0; }
.ldc-tree ul { margin-left: 15px; padding-left: 14px; border-left: 1px solid var(--line); }
.ldc-tree li { list-style: none !important; margin: 0; }
.ldc-row { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 8px 4px 0; border-radius: var(--r); }
.ldc-row.is-tog { cursor: pointer; }
.ldc-row.is-tog:hover { background: var(--soft); }
.ldc-tw, .ldc-tw0 { width: 22px; height: 22px; flex: none; border: 0; background: none; padding: 0; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; }
.ldc-tw { cursor: pointer; }
.ldc-tw:hover { background: #e3e9f0; }
.ldc-chev { width: 7px; height: 7px; border-right: 2px solid var(--mut); border-bottom: 2px solid var(--mut); transform: rotate(-45deg); transition: transform .15s; margin-left: -2px; }
.ldc-chev.is-open { transform: rotate(45deg); margin: -3px 0 0; }
.ldc-tree .is-root > .ldc-row .ldc-nm { font-weight: 600; }
.ldc-nm { flex: 1; min-width: 0; line-height: 1.3; }
.ldc-nm small { color: var(--mut); font-size: 12px; }
.ldc-qty { flex: none; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.25; color: var(--ink); }
.ldc-qty small { display: block; font-size: 11px; font-weight: 400; color: var(--mut); white-space: nowrap; }
.ldc-sub { margin: -4px 0 6px 70px; font-size: 12px; line-height: 1.45; color: var(--mut); }
.ldc-sub .ldc-link { font-size: 12px; }

/* ---------- таблицы «Ресурсы» и «Что скрафтить» */
.ldc-tw-wrap { overflow-x: auto; }
.ldc-t { width: 100%; border-collapse: collapse; font-size: 14px; }
.ldc-t th { padding: 8px 8px; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px; font-weight: 600; color: var(--mut); white-space: nowrap; }
.ldc-t td { padding: 8px 8px; border-bottom: 1px solid var(--line2); vertical-align: middle; line-height: 1.35; }
.ldc-t tbody tr:hover td { background: #fafbfc; }
.ldc-t th:first-child, .ldc-t td:first-child { padding-left: 4px; }
.ldc-t th:last-child, .ldc-t td:last-child { padding-right: 4px; }
.ldc-t .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ldc-t tfoot td { border-bottom: 0; padding-top: 12px; color: var(--mut); }
.ldc-t tfoot b { color: var(--ink); }
.ldc-t small { color: var(--mut); font-size: 12px; }
.ldc-it { display: flex; align-items: center; gap: 9px; min-width: 0; }
.ldc-rl { display: block; margin: 3px 0 0 33px; line-height: 1.4; }
.ldc .ldc-in { width: 88px; height: var(--hs); padding: 0 9px; text-align: right; font-size: 13.5px; font-variant-numeric: tabular-nums; }

/* ---------- нужные рецепты, «используется в» */
.ldc-recl, .ldc-uses { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2px 14px; }
.ldc-recl li, .ldc-uses li { list-style: none !important; margin: 0; }
.ldc-recl li { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.ldc-uses a { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--r); color: var(--ink); }
.ldc-uses a:hover { background: var(--soft); text-decoration: none; }
.ldc-uses a:hover .ldc-li-t { color: var(--acc); }
.ldc-li-t { min-width: 0; line-height: 1.3; }
.ldc-li-t small { display: block; color: var(--mut); font-size: 12px; margin-top: 1px; }

/* ---------- «Где добыть»: значок и окно */
.ldc-srcw { display: inline; }
.ldc-srcw .ldc-srcb { margin-left: 3px; vertical-align: -5px; }
.ldc-srcb { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 6px; background: none; color: #9aa6b2; cursor: pointer; }
.ldc-srcb:hover, .ldc-srcw:hover .ldc-srcb { color: var(--acc); background: var(--acc2); }

.ldc-foot { color: #98a3ae; font-size: 12px; line-height: 1.5; margin-top: 28px; }
.ldc-seo h3 { font-size: 15px; margin: 14px 0 4px; }
.ldc-seo p { font-size: 13px; line-height: 1.7; }

/* ---------- планшет */
@media (max-width: 1000px) {
  .ldc-sub { margin-left: 62px; }
}
/* ---------- телефон */
@media (max-width: 700px) {
  .ldc h2 { font-size: 17px; margin-top: 24px; }
  .ldc-bar { gap: 8px; }
  .ldc-chr { width: 100%; }
  .ldc-chr a { flex: 1; }
  .ldc-search { flex-basis: 100%; }
  .ldc-tabs { margin: 0 -2px; -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); mask-image: linear-gradient(to right, #000 85%, transparent); padding-right: 36px; }
  .ldc-sel { gap: 10px 14px; }
  .ldc-count { flex-basis: 100%; margin-left: 0; text-align: right; }
  .ldc-grid { grid-template-columns: 1fr; }
  .ldc-grid a { padding: 7px 4px; }
  .ldc-ic-big { width: 44px; height: 44px; }
  .ldc-title { font-size: 17px; }
  .ldc-share { justify-content: flex-start; margin-left: 0; flex-basis: 100%; }
  .ldc-share button { flex: 1; }
  .ldc-sug div > small { display: none; }
  .ldc-addb { width: 30px; padding: 0; font-size: 16px; }
  .ldc-lf { display: none; }
  .ldc-ls { display: inline; }
  #ldc-msg { text-align: left; }
  .ldc-ctl { gap: 12px 16px; }
  .ldc-add { max-width: none; }
  .ldc-facts { flex-direction: column; gap: 4px; }
  /* дерево: узкие отступы, количество — справа сверху */
  .ldc-tree ul { margin-left: 9px; padding-left: 9px; }
  .ldc-row { align-items: flex-start; padding-right: 2px; }
  .ldc-row .ldc-tw, .ldc-row .ldc-tw0 { margin-top: 5px; }
  .ldc-row .ldc-nm { align-self: center; overflow-wrap: anywhere; }
  .ldc-sub { margin-left: 30px; }
  .ldc-qty small { white-space: normal; max-width: 64px; margin-left: auto; line-height: 1.2; }
  /* таблицы — карточки: название, затем три числа, затем поля ввода */
  .ldc-t thead { display: none; }
  .ldc-t, .ldc-t tbody, .ldc-t tfoot { display: block; width: 100%; }
  .ldc-t tbody tr { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px 10px; padding: 12px 0; border-bottom: 1px solid var(--line2); }
  .ldc-t tbody tr:hover td { background: none; }
  .ldc-t td { border: 0; padding: 0 !important; }
  .ldc-t tbody td:nth-child(1) { grid-column: 1 / -1; }
  .ldc-t-cr tbody td:nth-child(2) { grid-column: 1 / 3; grid-row: 2; }
  .ldc-t-cr tbody td:nth-child(4) { grid-column: 3 / 5; grid-row: 2; }
  .ldc-t-cr tbody td:nth-child(6) { grid-column: 5 / 7; grid-row: 2; }
  .ldc-t-cr tbody td:nth-child(3) { grid-column: 1 / 4; grid-row: 3; }
  .ldc-t-cr tbody td:nth-child(5) { grid-column: 4 / 7; grid-row: 3; }
  .ldc-t-res tbody td:nth-child(2) { grid-column: 1 / 3; grid-row: 2; }
  .ldc-t-res tbody td:nth-child(4) { grid-column: 3 / 5; grid-row: 2; }
  .ldc-t-res tbody td:nth-child(3) { grid-column: 5 / 7; grid-row: 2; }
  .ldc-t td.n { display: block; text-align: left; white-space: normal; }
  .ldc-t td.n::before { content: attr(data-l); display: block; margin-bottom: 3px; font-size: 11.5px; color: var(--mut); font-weight: 400; }
  .ldc .ldc-t .ldc-in { width: 100%; text-align: left; }
  .ldc-t tfoot tr { display: flex; justify-content: space-between; padding-top: 4px; }
  .ldc-rl { margin-left: 33px; }
  .ldc-recl, .ldc-uses { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .ldc-chr a { padding: 0 10px; }
  .ldc-seg button { padding: 0 8px; min-width: 28px; }
}

/* ---------- всплывающие подсказки ([data-tip], одна плавающая .ldc-tip у body) */
.ldc-tip { position: fixed; z-index: 1000; max-width: 280px; padding: 7px 10px; background: #1f2a36; color: #fff; font-size: 12.5px; line-height: 1.4; font-weight: 400;
  border-radius: 7px; box-shadow: 0 6px 18px rgba(20, 40, 60, .22); pointer-events: none; opacity: 0; transform: translateY(3px); transition: opacity .12s, transform .12s; }
.ldc-tip.on { opacity: 1; transform: none; }
.ldc-tip::after { content: ''; position: absolute; left: var(--ax, 50%); top: 100%; margin-left: -5px; border: 5px solid transparent; border-top-color: #1f2a36; }
.ldc-tip.below::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: #1f2a36; }

/* ---------- окно «Где добыть» (у body, вне .ldc — цвета заданы явно) */
.ldc-pop { position: fixed; z-index: 999; width: 410px; max-width: calc(100vw - 16px); max-height: min(520px, calc(100vh - 16px)); overflow: auto; background: #fff; color: #1f2a36;
  border: 1px solid #d9e0e8; border-radius: 12px; box-shadow: 0 16px 40px rgba(20, 40, 60, .22); font-size: 13px; line-height: 1.4; opacity: 0; visibility: hidden; transition: opacity .12s; }
.ldc-pop.on { opacity: 1; visibility: visible; }
.ldc-pop a { color: #2c5288; text-decoration: none; }
.ldc-pop a:hover { text-decoration: underline; text-underline-offset: 2px; }
.ldc-pop-h { display: flex; align-items: center; gap: 9px; padding: 12px 12px 8px 14px; font-size: 14.5px; }
.ldc-pop-h b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ldc-pop-x { flex: none; width: 28px; height: 28px; border: 0; border-radius: 6px; background: none; font-size: 20px; line-height: 1; color: #98a3ae; cursor: pointer; }
.ldc-pop-x:hover { background: #f2f5f8; color: #1f2a36; }
.ldc-pop-b { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 12px 10px 14px; color: #6b7785; font-size: 12px; border-bottom: 1px solid #edf1f5; }
.ldc-pop-lv { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ldc-pop .ldc-seg { display: inline-flex; gap: 2px; padding: 2px; background: #e9eef3; border-radius: 8px; flex: none; }
.ldc-pop .ldc-seg button { height: 22px; min-width: 0; padding: 0 6px; border: 0; border-radius: 6px; background: none; color: #4a5866; font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; }
.ldc-pop .ldc-seg button:hover { background: rgba(255, 255, 255, .6); color: #1f2a36; }
.ldc-pop .ldc-seg button[aria-pressed="true"] { background: #fff; color: #2c5288; box-shadow: 0 1px 3px rgba(20, 40, 60, .16); }
.ldc-pop-s { padding: 10px 14px 4px; }
.ldc-pop-t { margin-bottom: 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #4a5866; }
.ldc-pop-t small { margin-left: 4px; font-size: 11.5px; font-weight: 400; letter-spacing: 0; text-transform: none; color: #8b96a2; }
.ldc-pop ul { list-style: none; margin: 0; padding: 0; }
.ldc-pop li { list-style: none !important; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) 46px 52px 50px; gap: 8px; align-items: baseline; padding: 5px 0; border-bottom: 1px solid #f2f4f7; }
.ldc-pop li:last-child { border-bottom: 0; }
.ldc-pop-m { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ldc-pop-m small { color: #8b96a2; }
.ldc-pop-l, .ldc-pop-q { color: #6b7785; font-size: 12px; white-space: nowrap; text-align: right; }
.ldc-pop-c { font-weight: 700; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ldc-pop-f { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 14px 12px; border-top: 1px solid #edf1f5; font-size: 12.5px; }
@media (max-width: 700px) { .ldc-pop li { grid-template-columns: minmax(0, 1fr) 42px 52px; } .ldc-pop-q { display: none; } }
@media (prefers-reduced-motion: reduce) { .ldc-tip, .ldc-pop, .ldc-chev, .ldc-tabs button { transition: none; } }
