/* 10.10.2026: калькулятор статов Interlude — новый интерфейс (ld-calc2.js). Старая форма скрыта и работает как движок расчёта.
   Раскладка — по ширине самого калькулятора (классы w520/w680/w820 ставит ld-calc2.js): ≥680 px — итоги справа и прилипают при прокрутке, уже — итоги сверху
   и строка главных параметров внизу экрана. */
.lc2, .lc2-dlg {
  --ink: #1b2633; --txt: #3b4856; --mut: #687583; --mut2: #8d98a4;
  --line: #e2e7ed; --line2: #edf1f5; --soft: #f5f7fa; --seg: #e8edf2; --card: #fff;
  --acc: #2c5288; --acc-h: #234472; --acc2: #eaf1f9; --acc3: #d7e5f5; --focus: rgba(44, 82, 136, .28);
  --up: #1d7a4a; --up2: #e3f4ea; --down: #b3261e; --down2: #fdecea;
  --hp: #d0453e; --mp: #3474d1; --cp: #d98a1c;
  --r: 10px; --r2: 14px;
  --sh: 0 1px 2px rgba(20, 40, 60, .05), 0 4px 16px rgba(20, 40, 60, .06);
}
/* до запуска нового интерфейса старая форма не мелькает; если скрипт не запустился — ld-calc2 снимает класс (см. calculator.html) */
html.lc2:not(.lc-old) .skillisttabwrapper { display: none !important; }
html:not(.lc2) .lc2, html.lc-old .lc2 { display: none; }
html.lc2:not(.lc-old) .lc-bar { display: none !important; }   /* строка параметров старой версии (ld-calc.js) */

/* ---------- переключатель версий: «Новый калькулятор / Старая версия» — заметный, над калькулятором */
.lc-ver { --acc: #2c5288; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 18px; padding: 12px; border: 2px solid #b9cfe8;
  border-radius: 16px; background: linear-gradient(135deg, #eef5fd 0%, #f6f1fd 100%); box-shadow: 0 4px 18px rgba(44, 82, 136, .1); }
html:not(.lc2) .lc-ver { display: none; }   /* новый интерфейс не запустился — показывать нечего */
.lc-ver-h { grid-column: 1 / -1; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #4b5d73; }
.lc-ver button { display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding: 12px 14px; border: 2px solid #d3deea; border-radius: 12px; background: rgba(255, 255, 255, .65);
  text-align: left; cursor: pointer; font: inherit; color: #1b2633; transition: border-color .15s, background .15s, box-shadow .15s, transform .15s; }
.lc-ver button:hover { border-color: #8fb0d6; background: #fff; transform: translateY(-1px); }
.lc-ver button:focus-visible { outline: 3px solid rgba(44, 82, 136, .35); outline-offset: 2px; }
.lc-ver button[aria-checked="true"] { border-color: var(--acc); background: #fff; box-shadow: 0 6px 18px rgba(44, 82, 136, .18); }
.lc-ver i { flex: none; position: relative; width: 22px; height: 22px; margin-top: 1px; border: 2px solid #9fb3c8; border-radius: 50%; background: #fff; }
.lc-ver button[aria-checked="true"] i { border-color: var(--acc); background: var(--acc); }
.lc-ver button[aria-checked="true"] i::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.lc-ver span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lc-ver b { font-size: 16px; line-height: 1.3; }
.lc-ver em { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: #2b9466; color: #fff; font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .03em; vertical-align: 2px; }
.lc-ver small { font-size: 12.5px; line-height: 1.4; color: #5b6878; }
/* сколько игроков пользуются каждой версией (значок «игроки») и полоска соотношения: синий — новая, серый — старая */
.lc-ver button { position: relative; }
.lc-ver-n { flex: none; align-self: center; display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 6px 12px; border-radius: 999px;
  font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lc-ver-n svg { width: 17px; height: 17px; }
.lc-ver span.lc-ver-n { flex-direction: row; }
.lc-ver-n b { font-size: 15px; line-height: 1; }
.lc-up { background: #e3edf9; color: #2c5288; }
.lc-down { background: #eceff3; color: #56616e; }
.lc-ver-n.is-bump { animation: lc-bump .5s ease; }
@keyframes lc-bump { 40% { transform: scale(1.18); } }
.lc-ver-bar { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 5px; }
.lc-ver-bar[hidden] { display: none; }
.lc-ver-r { display: block; height: 6px; border-radius: 999px; background: #c5cdd6; overflow: hidden; }
.lc-ver-r i { display: block; height: 100%; width: 50%; border-radius: 999px 0 0 999px; background: #2c5288; transition: width .5s ease; }
.lc-ver-bar small { font-size: 12.5px; color: #4b5d73; }
.lc-ver-bar small b { color: #1b2633; }
@media (max-width: 600px) {
  .lc-ver button { display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: 8px; align-items: start; }
  .lc-ver-n { grid-column: 2; justify-self: start; align-self: end; margin: 8px 0 0; padding: 4px 10px; font-size: 14px; }
  .lc-ver-n b { font-size: 14px; }
  .lc-ver { gap: 8px; padding: 10px; }
  .lc-ver button { padding: 10px; gap: 8px; }
  .lc-ver b { font-size: 14.5px; }
  .lc-ver em { display: none; }
  .lc-ver i { width: 18px; height: 18px; }
  .lc-ver button[aria-checked="true"] i::after { left: 4px; top: 1px; width: 4px; height: 8px; }
}
.lc2 { margin: 0 0 24px; color: var(--txt); font-size: 14px; line-height: 1.45; }
.lc2 *, .lc2-dlg * { box-sizing: border-box; }
.lc2 button, .lc2 select, .lc2 input, .lc2-dlg button, .lc2-dlg input { font: inherit; color: inherit; }
.lc2 :focus-visible, .lc2-dlg :focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.lc2 [hidden], .lc2-dlg [hidden] { display: none !important; }
.lc2-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.lc2-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.lc2-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* ---------- итоги */
/* изменение после действия: +35 зелёным / −12 красным, гаснет */
/* ---------- итоги: окно «Статус» как в клиенте Lineage 2 (Interlude). Без картинок: фактура — шум SVG feTurbulence,
   который браузер генерирует на лету; рамка, скосы и блики — градиенты и тени. Цвета полос HP / MP / CP — как в игре. */
.gw { --gw-txt: #d6d0bf; --gw-lab: #aea795; --gw-val: #f1ecdd; --gw-line: rgba(0, 0, 0, .55); --gw-hl: rgba(255, 255, 255, .055);
  position: relative; display: flex; flex-direction: column; color: var(--gw-txt); font: 12px/1.35 Tahoma, Verdana, "Segoe UI", "DejaVu Sans", sans-serif;
  border: 3px solid transparent; border-radius: 4px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .95 0 0 0 0 .85 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.09'/%3E%3C/svg%3E") padding-box,
    radial-gradient(120% 60% at 50% 0%, rgba(120, 110, 90, .16), transparent 70%) padding-box,
    linear-gradient(180deg, #2c2c2f 0%, #1d1e21 55%, #17181a 100%) padding-box,
    linear-gradient(160deg, #9b927a 0%, #4a463c 22%, #2a2823 45%, #6f6856 70%, #2b2924 100%) border-box;
  box-shadow: 0 0 0 1px #050505, inset 0 0 0 1px #000, inset 0 0 0 2px rgba(255, 245, 220, .07), 0 12px 32px rgba(10, 12, 16, .35); }
.gw-title { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; height: 26px; padding: 0 10px;
  background: linear-gradient(180deg, #4b4840 0%, #34322c 48%, #24231f 52%, #2c2a25 100%); border-bottom: 1px solid #000;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 1px 0 rgba(255, 255, 255, .05); color: #ece5cd; font-size: 12.5px; text-shadow: 0 1px 0 #000; letter-spacing: .02em; }
.gw-title::before, .gw-title::after { content: ""; width: 6px; height: 6px; transform: rotate(45deg); background: linear-gradient(135deg, #f0dc9c, #8f7840); box-shadow: 0 0 0 1px #000; }
.gw-in { display: flex; flex-direction: column; padding: 7px 8px 9px; }
.gw-who { display: flex; flex-direction: column; padding: 0 2px 6px; }
.gw-who b { color: #8fe0ff; font-size: 13px; font-weight: 400; text-shadow: 0 1px 0 #000; }
.gw-who small { color: #c9b27a; font-size: 12px; }
.gw-bars { display: flex; flex-direction: column; gap: 3px; padding: 0 2px 4px; }
.gw-row { display: flex; align-items: center; gap: 6px; }
.gw-k { flex: none; width: 22px; color: var(--gw-txt); }
.gw-bar { position: relative; flex: 1 1 auto; height: 14px; border: 1px solid #000; background: linear-gradient(180deg, #120f0e, #1d1a18); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05), 0 1px 0 rgba(255, 255, 255, .06); }
.gw-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; transition: width .5s cubic-bezier(.2, .7, .2, 1); }
.gw-fill::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 45%; background: linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, .04)); }
.gw-hp .gw-fill { background: linear-gradient(180deg, #e3645c 0%, #b62520 50%, #7a0e0a 100%); }
.gw-mp .gw-fill { background: linear-gradient(180deg, #6c9cec 0%, #2457b7 50%, #10306f 100%); }
.gw-cp .gw-fill { background: linear-gradient(180deg, #f6cf6a 0%, #c98b12 50%, #7c510a 100%); }
.gw-bar b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 400; line-height: 1;
  font-variant-numeric: tabular-nums; text-shadow: 0 0 2px #000, 0 1px 1px #000; white-space: nowrap; }
.gw-bar .lc2-d { position: absolute; right: 2px; top: 1px; z-index: 2; line-height: 10px; padding: 0 4px; font-size: 10px; border-radius: 3px; }
.gw .gw-sec { margin: 6px -8px 2px; padding: 3px 10px; background: linear-gradient(180deg, #34322d, #24231f); border-top: 1px solid #4a473e; border-bottom: 1px solid #0b0b0a;
  color: #ebe5d2; font: inherit; font-size: 12px; letter-spacing: 0; text-transform: none; text-shadow: 0 1px 0 #000; }
.gw-st { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.gw-st > div { position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 6px; min-width: 0; padding: 2px 6px; }
.gw-st > div:nth-child(odd) { border-right: 1px solid var(--gw-line); box-shadow: 1px 0 0 var(--gw-hl); }
.gw-st dt { margin: 0; min-width: 0; color: var(--gw-lab); font-weight: 400; font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gw-st dd { position: relative; margin: 0; font-style: normal; }
.gw-st dd b { color: var(--gw-val); font-weight: 400; font-variant-numeric: tabular-nums; }
.gw-st dd .lc2-d { position: absolute; right: calc(100% + 3px); top: 1px; z-index: 2; line-height: 13px; padding: 0 4px; font-size: 10.5px; border-radius: 3px; }
.gw-base { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gw-base > div:nth-child(odd) { border-right: 0; box-shadow: none; }
.gw-base > div:not(:nth-child(3n)) { border-right: 1px solid var(--gw-line); box-shadow: 1px 0 0 var(--gw-hl); }
.gw-act { display: flex; flex-direction: column; gap: 5px; margin-top: 10px; }
.gw-btn { height: 27px; padding: 0 10px; border: 1px solid #070707; border-radius: 2px; cursor: pointer; color: #ebe3c9; font: 12px Tahoma, Verdana, "Segoe UI", sans-serif; text-shadow: 0 1px 0 #000;
  background: linear-gradient(180deg, #5b574c 0%, #3d3a33 48%, #2b2924 52%, #36342e 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 0 0 1px #5d584a; transition: filter .15s; }
.gw-btn:hover { filter: brightness(1.18); }
.gw-btn:active { filter: brightness(.9); }
.gw-btn-p { color: #ffd98a; }
.gw .gw-btn:focus-visible { outline: 2px solid #c9a24e; outline-offset: 2px; }
.gw-note { margin: 7px 2px 0; font-size: 11.5px; color: #958f7f; }
/* изменение после действия — светлое на тёмном окне */
.gw .lc2-d { font-family: Tahoma, Verdana, sans-serif; }
.gw .lc2-d.is-up { color: #9dffb2; background: rgba(10, 70, 30, .92); box-shadow: 0 0 0 1px #000; }
.gw .lc2-d.is-down { color: #ffaaa2; background: rgba(90, 10, 8, .92); box-shadow: 0 0 0 1px #000; }
/* уже, чем колонка справа (итоги сверху): окно не растягиваем во всю ширину */
.lc2:not(.w680) .gw { width: 100%; max-width: 440px; margin: 0 auto; }
.lc2-d { font-style: normal; font-size: 11px; font-weight: 700; line-height: 16px; padding: 0 5px; border-radius: 6px; opacity: 0; pointer-events: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lc2-d.is-up { color: var(--up); background: var(--up2); }
.lc2-d.is-down { color: var(--down); background: var(--down2); }
.lc2-d.is-show { animation: lc2-delta 2.4s ease-out forwards; }
@keyframes lc2-delta { 0% { opacity: 0; transform: translateY(3px); } 8% { opacity: 1; transform: none; } 75% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- кнопки и поля */
.lc2-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid #cfd8e2; border-radius: 9px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
.lc2-btn:hover { border-color: #9fb3c8; background: var(--soft); }
.lc2 .lc2-btn-p { background: var(--acc); border-color: var(--acc); color: #fff; }
.lc2 .lc2-btn-p:hover { background: var(--acc-h); border-color: var(--acc-h); }
.lc2 select { text-align: left; text-align-last: left; height: 34px; padding: 0 28px 0 10px; border: 1px solid #cfd8e2; border-radius: 9px; color: var(--ink); max-width: 100%; cursor: pointer;
  -webkit-appearance: none; appearance: none; 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='%23687583' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center; }
.lc2 select:hover { border-color: #9fb3c8; }
.lc2 select:disabled { opacity: .5; cursor: default; }

/* ---------- разделы */
.lc2-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.lc2-nav a { padding: 5px 11px; border-radius: 999px; background: var(--seg); color: #485666; font-size: 13px; font-weight: 600; text-decoration: none !important; transition: background .15s, color .15s; }
.lc2-nav a:hover { background: var(--acc3); color: var(--acc); }
.lc2-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r2); box-shadow: var(--sh); padding: 14px 16px 16px; scroll-margin-top: 12px; }
.lc2-h { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.lc2-h h2 { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.3; color: var(--ink); }
.lc2-cnt { padding: 1px 8px; border-radius: 999px; background: var(--acc2); color: var(--acc); font-size: 12px; font-weight: 600; }
.lc2-h [data-clear] { margin-left: auto; }
.lc2 .lc2-btn-s { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; color: var(--mut); }
.lc2 .lc2-btn-s:hover { color: var(--down); border-color: #e5b4b0; background: var(--down2); }
.lc2-empty { margin: 0; color: var(--mut); font-size: 13px; }

/* переключатель */
.lc2-sw { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.lc2-sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lc2-sw > span, .lc2-tog { position: relative; flex: none; width: 34px; height: 20px; border-radius: 999px; background: #c5cfda; transition: background .18s; }
.lc2-sw > span::after, .lc2-tog::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .18s; }
.lc2-sw input:checked + span, .is-on .lc2-tog { background: var(--acc); }
.lc2-sw input:checked + span::after, .is-on .lc2-tog::after { transform: translateX(14px); }
.lc2-sw input:focus-visible + span { outline: 2px solid var(--acc); outline-offset: 2px; }
.lc2-sw em { font-style: normal; font-size: 12.5px; color: var(--mut); }

/* ---------- персонаж */
#lc2-char .lc2-body { display: flex; flex-direction: column; gap: 14px; }
.lc2-row2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.lc2-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lc2-lb { font-size: 12.5px; font-weight: 700; color: var(--mut); }
.lc2-lb small { font-weight: 400; color: var(--mut2); margin-left: 4px; }
.lc2-pk { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 12px 6px 8px; border: 1px solid #cfd8e2; border-radius: var(--r); background: #fff; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.lc2-pk:hover:not(:disabled) { border-color: #9fb3c8; box-shadow: 0 2px 8px rgba(20, 40, 60, .07); }
.lc2-pk:disabled { cursor: default; background: var(--soft); }
.lc2-pk-t { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.lc2-pk-t b { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc2-pk-t small { font-size: 11.5px; color: var(--mut2); }
.lc2-chev { flex: none; width: 8px; height: 8px; margin-right: 2px; border-right: 1.6px solid var(--mut); border-bottom: 1.6px solid var(--mut); transform: rotate(45deg) translateY(-2px); }
.lc2-ic { flex: none; width: 32px; height: 32px; border-radius: 7px; object-fit: cover; image-rendering: pixelated; box-shadow: 0 0 0 1px rgba(20, 40, 60, .12); }
.lc2-ic-cls { width: 36px; height: 36px; image-rendering: auto; }
.lc2-ic-ph { display: inline-flex; align-items: center; justify-content: center; background: var(--seg); color: var(--mut); font-size: 11px; font-weight: 700; text-transform: uppercase; box-shadow: none; }
.lc2-lvl { display: flex; align-items: center; gap: 12px; }
.lc2-step { display: inline-flex; flex: none; height: 38px; border: 1px solid #cfd8e2; border-radius: var(--r); overflow: hidden; background: #fff; }
.lc2-step:focus-within { border-color: var(--acc); box-shadow: 0 0 0 3px var(--focus); }
.lc2-step button { width: 36px; border: 0; background: var(--soft); font-size: 18px; color: var(--txt); cursor: pointer; }
.lc2-step button:hover { background: var(--acc2); color: var(--acc); }
.lc2-step input { width: 52px; border: 0; text-align: center; font-size: 17px; font-weight: 700; color: var(--ink); -moz-appearance: textfield; appearance: textfield; }
.lc2-step input::-webkit-inner-spin-button, .lc2-step input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.lc2-step input:focus { outline: 0; }
.lc2-lvl input[type=range] { flex: 1 1 auto; min-width: 80px; accent-color: var(--acc); }
.lc2-marks { display: flex; flex-wrap: wrap; gap: 3px; }
.lc2-marks button, .lc2-dlg-chips button { height: 26px; min-width: 34px; padding: 0 9px; border: 0; border-radius: 7px; background: var(--seg); color: #485666; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.lc2-marks button:hover, .lc2-dlg-chips button:hover { background: var(--acc3); color: var(--acc); }
.lc2-marks button[aria-pressed="true"], .lc2-dlg-chips button[aria-pressed="true"] { background: var(--acc); color: #fff; }
.lc2-seg { display: inline-flex; align-self: flex-start; gap: 2px; padding: 3px; border-radius: 11px; background: var(--seg); }
.lc2-seg button { height: 30px; padding: 0 16px; border: 0; border-radius: 8px; background: none; font-weight: 600; color: #485666; cursor: pointer; }
.lc2-seg button:hover { color: var(--ink); background: rgba(255, 255, 255, .55); }
.lc2-seg button[aria-checked="true"] { background: #fff; color: var(--acc); box-shadow: 0 1px 3px rgba(20, 40, 60, .16); }
.lc2-tats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.lc2-pk-tat { min-height: 44px; padding-left: 12px; }
.lc2-pk-tat.is-empty b { color: var(--mut2); font-weight: 400; }

/* ---------- экипировка */
.lc2-sets { display: flex; gap: 6px; margin: 0 0 12px; }
.lc2-sets .lc2-btn { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.lc2-slots { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.lc2-slot { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 6px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; transition: border-color .15s, box-shadow .15s; min-width: 0; }
.lc2-slot:hover:not(.is-dis) { border-color: #a9bccf; box-shadow: 0 2px 10px rgba(20, 40, 60, .07); }
.lc2-slot.is-empty { border-style: dashed; background: #fbfcfd; }
.lc2-slot.is-dis { background: var(--soft); }
.lc2-slot-w { flex-wrap: wrap; }
.lc2-slot-b { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.lc2-slot-b:disabled { cursor: default; }
.lc2 .lc2-slot-b:focus-visible { outline: 0; }
.lc2-slot:has(.lc2-slot-b:focus-visible) { outline: 2px solid var(--acc); outline-offset: 1px; }
.lc2-slot-ic { position: relative; flex: none; width: 40px; height: 40px; }
.lc2-slot-ic img, .lc2-slot-ic .lc2-ic-ph { display: block; width: 40px; height: 40px; border-radius: 8px; image-rendering: pixelated; box-shadow: 0 0 0 1px rgba(20, 40, 60, .14); }
.is-empty .lc2-slot-ic img { filter: grayscale(1); opacity: .32; }
.lc2-slot-ic .lc2-gr { position: absolute; right: -5px; bottom: -5px; }
.lc2-slot-t { display: flex; flex-direction: column; min-width: 0; }
.lc2-slot-t small { font-size: 11.5px; color: var(--mut2); line-height: 1.2; }
.lc2-slot-t b { font-weight: 600; color: var(--ink); line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow-wrap: anywhere; }
.lc2-slot-t em { font-style: normal; font-size: 12px; color: var(--mut); line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.lc2-slot-t em:empty { display: none; }
.is-empty .lc2-slot-t b, .is-dis .lc2-slot-t b { color: var(--mut); font-weight: 400; }
.lc2-ench { flex: none; position: relative; }
.lc2-ench select { width: 66px; height: 32px; padding: 0 22px 0 9px; font-weight: 700; background-position: right 8px center; }
.lc2-ench.is-up select { color: var(--acc); border-color: #a9c0dc; background-color: var(--acc2); }
.lc2-sa { display: flex; align-items: center; gap: 8px; flex: 1 1 100%; padding: 6px 0 0 50px; }
.lc2-sa span { font-size: 11.5px; font-weight: 700; color: var(--mut); }
.lc2-sa select { flex: 1 1 auto; height: 32px; min-width: 0; }
/* грейд */
.lc2-gr { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 18px; padding: 0 4px; border-radius: 5px; font-style: normal; font-size: 10.5px; font-weight: 800; line-height: 1; color: #fff; background: var(--g); box-shadow: 0 0 0 2px #fff; flex: none; }
.g-N { --g: #8d98a4; } .g-D { --g: #3f7fbf; } .g-C { --g: #2b9466; } .g-B { --g: #b07d12; } .g-A { --g: #c4561a; } .g-S { --g: #9338b0; } .g-H { --g: #b3261e; }

/* ---------- плитки умений */
.lc2-auto { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 0 0 14px; border-radius: var(--r); background: var(--acc2); cursor: pointer; }
.lc2-auto b { display: block; color: var(--ink); }
.lc2-auto small { display: block; font-size: 12px; color: var(--mut); }
.lc2-preset { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; margin: 0 0 14px; border-radius: var(--r); background: var(--soft); }
.lc2-preset label { margin: 0; font-weight: 700; font-size: 13px; color: var(--ink); }
.lc2-preset select { flex: 1 1 220px; }
.lc2-tgs { display: flex; flex-direction: column; gap: 14px; }
.lc2-tg h3 { margin: 0 0 7px; font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--mut); }
.lc2-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 6px; }
.lc2-tile { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); background: #fff; overflow: hidden; transition: border-color .15s, background .15s, box-shadow .15s; }
.lc2-tile:hover { border-color: #a9bccf; }
.lc2-tile.is-on { border-color: #8fb0d6; background: var(--acc2); box-shadow: inset 0 0 0 1px #8fb0d6; }
.lc2-tile-r { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 8px; cursor: pointer; }
.lc2-tile.is-dis .lc2-tile-r { cursor: default; opacity: .5; }
.lc2-tile-ic { flex: none; width: 28px; height: 28px; }
.lc2-tile-ic img, .lc2-tile-ic .lc2-ic-ph { display: flex; width: 28px; height: 28px; border-radius: 6px; image-rendering: pixelated; }
.lc2-tile:not(.is-on) .lc2-tile-ic img { filter: saturate(.55); opacity: .8; }
.lc2-tile-n { flex: 1 1 auto; min-width: 0; font-size: 13px; font-weight: 600; line-height: 1.25; color: var(--ink); overflow-wrap: anywhere; user-select: none; }
.lc2 .lc2-tile-x { flex: 1 1 auto; min-width: 0; height: 28px; padding: 0 20px 0 0; border: 0; border-radius: 0; background-color: transparent; background-position: right 4px center; font-size: 13px; font-weight: 600; text-overflow: ellipsis; }
.lc2 .lc2-tile-x:hover:not(:disabled) { color: var(--acc); }
.lc2 .lc2-tog { padding: 0; border: 0; cursor: pointer; width: 30px; height: 18px; }
.lc2 .lc2-tog:disabled { cursor: default; }
.lc2-tile .lc2-tog::after { width: 14px; height: 14px; }
.lc2-tile.is-on .lc2-tog::after { transform: translateX(12px); }
.lc2 .lc2-tile-v { height: 28px; margin: -2px 8px 7px 44px; width: auto; font-size: 12.5px; border-radius: 7px; padding-left: 8px; background-position: right 8px center; background-color: rgba(255, 255, 255, .7); }

/* ---------- строка параметров (телефон) и уведомление */
.lc2-strip { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px 8px;
  padding: 7px 12px calc(7px + env(safe-area-inset-bottom)); background: rgba(247, 250, 253, .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid #cfdcea; box-shadow: 0 -4px 18px rgba(20, 40, 60, .12); cursor: pointer; }
.lc2-strip span { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.lc2-strip small { font-size: 10.5px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc2-strip b { font-size: 14px; color: var(--acc); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc2-toast { position: fixed; left: 50%; bottom: 84px; z-index: 1001; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 9px 16px; border-radius: 10px; background: #1f2a36; color: #fff; font-size: 13.5px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
.lc2-toast.is-show { animation: lc2-toast 2.6s ease forwards; }
@keyframes lc2-toast { 0% { opacity: 0; transform: translate(-50%, 8px); } 8%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }

/* ---------- окно выбора */
.lc2-dlg { width: min(560px, calc(100vw - 24px)); max-height: min(720px, calc(100dvh - 48px)); padding: 0; border: 0; border-radius: 16px; background: #fff; color: var(--txt); box-shadow: 0 24px 64px rgba(15, 30, 50, .3); overflow: hidden; }
.lc2-dlg::backdrop { background: rgba(18, 28, 40, .45); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.lc2-dlg[open] { display: flex; animation: lc2-in .16s ease-out; }
@keyframes lc2-in { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.lc2-dlg-in { display: flex; flex-direction: column; width: 100%; max-height: inherit; min-height: 0; }
.lc2-dlg-in > * { flex: none; }
.lc2-dlg header { display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px 18px; }
.lc2-dlg h3 { margin: 0; flex: 1 1 auto; font-size: 17px; font-weight: 700; color: var(--ink); }
.lc2-x { width: 34px; height: 34px; border: 0; border-radius: 9px; background: var(--soft); font-size: 22px; line-height: 1; color: var(--mut); cursor: pointer; }
.lc2-x:hover { background: var(--seg); color: var(--ink); }
.lc2-dlg .lc2-dlg-q { display: block; width: auto; margin: 0 14px 8px; height: 40px; line-height: normal; box-shadow: none; outline: 0; padding: 0 12px 0 36px; border: 1px solid #cfd8e2; border-radius: 10px; font-size: 15px; color: var(--ink);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23687583' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l3.5 3.5'/%3E%3C/svg%3E") no-repeat 12px center; }
.lc2-dlg .lc2-dlg-q:focus { outline: 0; border-color: var(--acc); box-shadow: 0 0 0 3px var(--focus); }
.lc2-dlg-chips { display: flex; flex-wrap: wrap; gap: 3px; padding: 0 14px 8px; }
.lc2-dlg-l { list-style: none; margin: 0; padding: 0 8px 12px; overflow-y: auto; overscroll-behavior: contain; flex: 1 1 auto; min-height: 0; border-top: 1px solid var(--line2); }
.lc2-dlg-l ul { list-style: none; margin: 0; padding: 0; }
.lc2-dlg-l li { list-style: none !important; margin: 0; }
.lc2-dg-h { display: flex; align-items: center; gap: 6px; position: sticky; top: 0; z-index: 1; padding: 10px 8px 5px; background: rgba(255, 255, 255, .96); font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--mut); }
.lc2-dg-h .lc2-gr { box-shadow: none; }
.lc2-pi { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; cursor: pointer; }
.lc2-pi:hover, .lc2-pi.is-act { background: var(--soft); }
.lc2-pi.is-cur { background: var(--acc2); }
.lc2-pi.is-cur b { color: var(--acc); }
.lc2-pi-t { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.lc2-pi-t b { font-weight: 600; color: var(--ink); line-height: 1.3; }
.lc2-pi-t small { font-size: 12px; color: var(--mut); }
.lc2-pi .lc2-gr { box-shadow: none; }
.lc2-dlg-e { margin: 0; padding: 18px; color: var(--mut); text-align: center; }

/* ---------- широкий калькулятор: итоги справа */
/* ширина калькулятора (min-width: 520px) — класс от ld-calc2.js (ResizeObserver); container queries ломают фиксированный фон body в Chrome */
.lc2.w520 .lc2-row2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.lc2.w520 .lc2-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lc2.w520 .lc2-slot-w { grid-column: 1 / -1; }

/* ширина калькулятора (min-width: 680px) — класс от ld-calc2.js (ResizeObserver); container queries ломают фиксированный фон body в Chrome */
.lc2.w680 .lc2-grid { grid-template-columns: minmax(0, 1fr) 252px; align-items: start; }
.lc2.w680 .lc2-side { order: 2; position: sticky; top: 10px; max-height: calc(100vh - 20px); overflow-y: auto; scrollbar-width: thin; }
.lc2.w680 .lc2-main { order: 1; }
.lc2.w680 .lc2-row2 { grid-template-columns: minmax(0, 1fr); }
.lc2.w680 .lc2-slots { grid-template-columns: minmax(0, 1fr); }

/* ширина калькулятора (min-width: 820px) — класс от ld-calc2.js (ResizeObserver); container queries ломают фиксированный фон body в Chrome */
.lc2.w820 .lc2-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lc2.w820 .lc2-row2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }


/* ---------- телефон */
/* ширина калькулятора (max-width: 519px) — класс от ld-calc2.js (ResizeObserver); container queries ломают фиксированный фон body в Chrome */
.lc2:not(.w520) .lc2-sets .lc2-btn { flex: 1 1 0; padding: 0 8px; }

@media (max-width: 600px) {
  .lc2-card { padding: 12px; border-radius: 12px; }
  .lc2-tats { grid-template-columns: minmax(0, 1fr); }
  .lc2-dlg { width: 100vw; max-width: 100vw; max-height: 88dvh; margin: auto 0 0; border-radius: 18px 18px 0 0; }
  .lc2-dlg[open] { animation: lc2-up .2s ease-out; }
  @keyframes lc2-up { from { transform: translateY(40px); opacity: .6; } }
  .lc2-dlg-l { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .lc2-sa { padding-left: 0; }
  body:has(.lc2-strip:not([hidden])) { padding-bottom: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .lc2 *, .lc2-dlg, .lc2-dlg * { animation-duration: .01ms !important; transition: none !important; }
}

/* текст под калькулятором */
.lc-seo { max-width: 860px; margin: 26px 0 10px; line-height: 1.6; color: #3e4a57; }
.lc-seo h2 { font-size: 20px; margin: 22px 0 10px; color: #1f2a36; }
.lc-seo h3 { font-size: 16px; margin: 16px 0 6px; color: #1f2a36; }
.lc-seo ul { padding-left: 20px; }
.lc-seo li { margin: 4px 0; }
.lc-intro { max-width: 820px; margin: 0 0 14px; line-height: 1.55; color: #3e4a57; }
