/* t-kbk.com — kbk-calc.css v2.0 */
.kcx-dock, .kcx-fab, .kcx-sheet, .kcx-modal { --n: #092c53; --n2: #0e3a6b; --g: #d9b36a; --g2: #c9a157; --sand: #ffe2a8; --b: #f5f4ee; --l: #e6e2d6; --t: #232830; --m: #6f7580;
    font-family: Roboto, Arial, sans-serif; box-sizing: border-box; -webkit-font-smoothing: antialiased; }
.kcx-dock *, .kcx-fab *, .kcx-sheet *, .kcx-modal * { box-sizing: border-box; }
.kcx-dock svg, .kcx-fab svg, .kcx-sheet svg, .kcx-modal svg { display: block; flex: none; }

/* ---------- плавающая колонка справа (ПК) ---------- */
.kcx-dock { position: fixed; right: 16px; top: 50%; transform: translateY(-50%); z-index: 9990; }
.kcx-dock__list { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.kcx-dock__item { position: relative; display: flex; align-items: center; flex-direction: row-reverse; height: 52px; padding: 0; border: 0; border-radius: 26px;
    background: var(--n); color: #fff !important; text-decoration: none !important; cursor: pointer; box-shadow: 0 8px 22px rgba(9, 44, 83, .28);
    transition: box-shadow .2s, transform .2s, background .2s; }
.kcx-dock__ico { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; color: var(--g); position: relative; }
.kcx-dock__ico svg { width: 24px; height: 24px; }
.kcx-dock__t { max-width: 0; overflow: hidden; white-space: nowrap; font: 600 14px/1 Roboto, Arial, sans-serif; opacity: 0; transition: max-width .3s ease, opacity .2s, padding .3s; padding-left: 0; }
.kcx-dock__item:hover, .kcx-dock__item:focus-visible { transform: translateX(-2px); box-shadow: 0 10px 26px rgba(9, 44, 83, .38); outline: none; }
.kcx-dock__item:hover .kcx-dock__t, .kcx-dock__item:focus-visible .kcx-dock__t { max-width: 280px; opacity: 1; padding-left: 20px; }
.kcx-dock__item.is-main { height: 60px; border-radius: 30px; background: var(--g); color: var(--n) !important; }
.kcx-dock__item.is-main .kcx-dock__ico { width: 60px; height: 60px; color: var(--n); }
.kcx-dock__item.is-main .kcx-dock__ico svg { width: 28px; height: 28px; }
.kcx-dock__item.is-main::before { content: ''; position: absolute; right: 0; top: 0; width: 60px; height: 60px; border-radius: 50%; box-shadow: 0 0 0 0 rgba(217, 179, 106, .6); animation: kcPulse 2.6s infinite; }
@keyframes kcPulse { 0% { box-shadow: 0 0 0 0 rgba(217, 179, 106, .55); } 70% { box-shadow: 0 0 0 16px rgba(217, 179, 106, 0); } 100% { box-shadow: 0 0 0 0 rgba(217, 179, 106, 0); } }
.kcx-dock__item.is-hot .kcx-dock__ico::after, .kcx-sheet__item.is-hot .kcx-dock__ico::after { content: ''; position: absolute; top: 12px; right: 12px; width: 9px; height: 9px; border-radius: 50%; background: #e2382b; box-shadow: 0 0 0 2px var(--n); }
.kcx-fab, .kcx-sheet { display: none; }

/* ---------- телефон ---------- */
@media (max-width: 767px) {
    .kcx-dock { display: none; }
    .kcx-fab { display: flex; align-items: center; gap: 8px; position: fixed; left: 12px; bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 9990;
        height: 46px; padding: 0 18px 0 14px; border: 0; border-radius: 23px; background: var(--g); color: var(--n); font: 700 14px Roboto, Arial, sans-serif;
        box-shadow: 0 8px 22px rgba(9, 44, 83, .3); cursor: pointer; }
    .kcx-fab svg { width: 22px; height: 22px; }
    .kcx-sheet { display: block; position: fixed; inset: 0; top: 0; left: 0; right: 0; bottom: 0; z-index: 10001; background: rgba(9, 25, 45, 0); pointer-events: none; transition: background .25s; }
    .kcx-sheet.is-open { background: rgba(9, 25, 45, .5); pointer-events: auto; }
    .kcx-sheet__in { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 20px 20px 0 0; padding: 8px 12px calc(14px + env(safe-area-inset-bottom));
        transform: translateY(105%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); }
    .kcx-sheet.is-open .kcx-sheet__in { transform: none; }
    .kcx-sheet__grab { width: 40px; height: 4px; border-radius: 2px; background: var(--l); margin: 4px auto 10px; }
    .kcx-sheet__item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 6px 8px; margin: 0; border: 0; border-radius: 12px; background: none;
        color: var(--t) !important; text-decoration: none !important; font: 600 15px Roboto, Arial, sans-serif; text-align: left; cursor: pointer; }
    .kcx-sheet__item:active { background: var(--b); }
    .kcx-sheet__item .kcx-dock__ico { width: 44px; height: 44px; border-radius: 12px; background: var(--n); }
    .kcx-sheet__item .kcx-dock__ico svg { width: 22px; height: 22px; }
    .kcx-sheet__item > span:nth-child(2) { flex: 1; }
    .kcx-sheet__item > svg { width: 18px; height: 18px; color: var(--m); }
    .kcx-sheet__item.is-hot .kcx-dock__ico::after { top: 7px; right: 7px; }
}

/* ---------- модальное окно ---------- */
html.kcx-lock, html.kcx-lock body { overflow: hidden; }
.kcx-modal { position: fixed; inset: 0; top: 0; left: 0; right: 0; bottom: 0; z-index: 10002; display: flex; align-items: center; justify-content: center; padding: 24px;
    background: rgba(9, 25, 45, 0); transition: background .25s; }
.kcx-modal.is-in { background: rgba(9, 25, 45, .55); }
.kcx-box { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 320px; width: 100%; max-width: 960px; height: min(640px, calc(100vh - 48px));
    background: #fff; border-radius: 22px; overflow: hidden; color: var(--t); box-shadow: 0 30px 80px rgba(0, 0, 0, .3);
    opacity: 0; transform: translateY(16px) scale(.98); transition: opacity .25s, transform .3s cubic-bezier(.2, .8, .2, 1); }
.kcx-modal.is-in .kcx-box { opacity: 1; transform: none; }
.kcx-x { position: absolute; top: 16px; right: 16px; z-index: 3; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .85); color: var(--n);
    display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 8px rgba(9, 44, 83, .12); }
.kcx-x svg { width: 18px; height: 18px; }
.kcx-x:hover { background: #fff; }

.kcx-main { display: flex; flex-direction: column; padding: 30px 34px 26px; overflow-y: auto; }
.kcx-title { font: 800 26px/1.15 Roboto, Arial, sans-serif; color: var(--n); letter-spacing: -.01em; }
.kcx-sub { margin-top: 6px; font-size: 14px; color: var(--m); }

.kcx-steps { display: flex; gap: 6px; margin: 20px 0 22px; flex-wrap: wrap; }
.kcx-st { display: flex; align-items: center; gap: 7px; padding: 5px 12px 5px 5px; border: 0; border-radius: 20px; background: var(--b); color: var(--m);
    font: 500 13px Roboto, Arial, sans-serif; cursor: default; transition: background .2s, color .2s; }
.kcx-st i { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #fff; font: 700 12px Roboto, Arial, sans-serif; font-style: normal; }
.kcx-st i svg { width: 14px; height: 14px; }
.kcx-st.is-cur { background: var(--n); color: #fff; }
.kcx-st.is-cur i { background: var(--g); color: var(--n); }
.kcx-st.is-done { color: var(--n); cursor: pointer; }
.kcx-st.is-done i { background: var(--g); color: var(--n); }
.kcx-st.is-done:hover { background: var(--l); }

.kcx-body { flex: 1; }
.kcx-q { font: 700 19px/1.3 Roboto, Arial, sans-serif; color: var(--n); margin-bottom: 16px; }
.kcx-hint { margin-top: 14px; font-size: 13px; line-height: 1.5; color: var(--m); }
.kcx-err { min-height: 20px; margin-top: 10px; font-size: 13px; color: #c62828; }
.kcx-err a { color: #c62828; font-weight: 700; }

/* карточки с картинками */
.kcx-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.kcx-card, .kcx-mark, .kcx-color { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 10px 14px; border: 2px solid var(--l);
    border-radius: 16px; background: #fff; color: var(--t); font-family: inherit; text-align: center; cursor: pointer; transition: border-color .15s, box-shadow .2s, transform .15s; }
.kcx-card:hover, .kcx-mark:hover, .kcx-color:hover { border-color: var(--g); box-shadow: 0 8px 20px rgba(9, 44, 83, .08); transform: translateY(-2px); }
.kcx-card.is-on, .kcx-mark.is-on, .kcx-color.is-on { border-color: var(--n); background: #fbfaf6; box-shadow: 0 0 0 3px rgba(9, 44, 83, .08); }
.kcx-card.is-on::after, .kcx-mark.is-on::after, .kcx-color.is-on::after { content: ''; position: absolute; top: 9px; right: 9px; width: 18px; height: 18px; border-radius: 50%;
    background: var(--n) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d9b36a' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-8.5'/%3E%3C/svg%3E") center / 12px no-repeat; }
.kcx-card__pic { width: 100%; height: 76px; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; border-radius: 12px; background: var(--b); }
.kcx-card__pic svg { width: 84px; height: 66px; }
.kcx-card b, .kcx-mark b, .kcx-color b { font-size: 14px; line-height: 1.25; color: var(--n); }
.kcx-card small, .kcx-mark small, .kcx-color small { font-size: 12px; color: var(--m); }

.kcx-marks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kcx-mark { padding: 12px 10px; }
.kcx-mark__fl { width: 96px; height: 46px; margin-bottom: 2px; }
.kcx-mark__fl svg { width: 96px; height: 46px; }
.kcx-mark b { font-size: 16px; }

.kcx-colors { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; max-width: 460px; }
.kcx-color { padding: 14px; }
.kcx-sw { width: 100%; height: 86px; border-radius: 12px; margin-bottom: 8px; border: 1px solid rgba(9, 44, 83, .1); }
.kcx-sw--kraft { background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .04) 0 2px, transparent 2px 7px), linear-gradient(135deg, #d6aa6e, #b98a4f); }
.kcx-sw--white { background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .025) 0 2px, transparent 2px 7px), linear-gradient(135deg, #fbfaf6, #e8e5db); }

/* поля */
.kcx-size { display: grid; gap: 12px; }
.kcx-size--3 { grid-template-columns: repeat(3, 1fr); }
.kcx-size--2 { grid-template-columns: repeat(2, 1fr); max-width: 420px; }
.kcx-in { position: relative; display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--m); }
.kcx-in input, .kcx-in textarea { width: 100%; height: 52px; padding: 0 14px; border: 2px solid var(--l); border-radius: 12px; background: #fff; color: var(--t);
    font: 600 17px Roboto, Arial, sans-serif; outline: none; transition: border-color .15s, box-shadow .15s; -moz-appearance: textfield; }
.kcx-in textarea { height: auto; padding: 12px 14px; font-weight: 400; font-size: 15px; resize: vertical; }
.kcx-in input::-webkit-outer-spin-button, .kcx-in input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.kcx-in input:focus, .kcx-in textarea:focus { border-color: var(--n); box-shadow: 0 0 0 4px rgba(9, 44, 83, .08); }
.kcx-in em { position: absolute; right: 14px; bottom: 16px; font-style: normal; font-size: 13px; color: var(--m); pointer-events: none; }
.kcx-in.is-bad input { border-color: #d64545; }
.kcx-in--full { grid-column: 1 / -1; }

/* количество */
.kcx-qty { max-width: 520px; }
.kcx-qty__val { display: flex; align-items: baseline; gap: 8px; border-bottom: 2px solid var(--l); padding-bottom: 4px; margin-bottom: 18px; }
.kcx-qty__val input { width: 100%; border: 0; outline: none; background: none; font: 800 40px/1.1 Roboto, Arial, sans-serif; color: var(--n); padding: 0; -moz-appearance: textfield; }
.kcx-qty__val input::-webkit-outer-spin-button, .kcx-qty__val input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.kcx-qty__val span { font-size: 16px; color: var(--m); }
.kcx-range { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 3px; outline: none; margin: 4px 0 18px;
    background: linear-gradient(90deg, var(--n) 0 var(--p, 0%), var(--l) var(--p, 0%) 100%); }
.kcx-range::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--g); border: 4px solid #fff; box-shadow: 0 2px 8px rgba(9, 44, 83, .35); cursor: pointer; }
.kcx-range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--g); border: 4px solid #fff; box-shadow: 0 2px 8px rgba(9, 44, 83, .35); cursor: pointer; }
.kcx-presets { display: flex; gap: 8px; flex-wrap: wrap; }
.kcx-pill { padding: 9px 16px; border: 2px solid var(--l); border-radius: 20px; background: #fff; color: var(--n); font: 600 14px Roboto, Arial, sans-serif; cursor: pointer; transition: all .15s; }
.kcx-pill:hover { border-color: var(--g); }
.kcx-pill.is-on { background: var(--n); border-color: var(--n); color: #fff; }

/* форма */
.kcx-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; max-width: 560px; }
.kcx-form .kcx-in input { font-weight: 500; font-size: 16px; }
.kcx-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.kcx-agree { grid-column: 1 / -1; display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; line-height: 1.45; color: var(--m); cursor: pointer; }
.kcx-agree input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--n); }
.kcx-agree a { color: var(--n); }

/* навигация */
.kcx-nav { display: flex; align-items: center; gap: 12px; padding-top: 14px; }
.kcx-back { border: 0; background: none; padding: 12px 4px; color: var(--m); font: 600 15px Roboto, Arial, sans-serif; cursor: pointer; }
.kcx-back:hover { color: var(--n); }
.kcx-next { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; height: 52px; padding: 0 26px; border: 0; border-radius: 14px; background: var(--n); color: #fff;
    font: 700 16px Roboto, Arial, sans-serif; cursor: pointer; box-shadow: 0 8px 20px rgba(9, 44, 83, .25); transition: background .15s, transform .15s; }
.kcx-next svg { width: 18px; height: 18px; color: var(--g); transition: transform .15s; }
.kcx-next:hover { background: var(--n2); }
.kcx-next:hover svg { transform: translateX(3px); }
.kcx-next[disabled] { opacity: .65; cursor: default; }

/* правая колонка */
.kcx-side { display: flex; flex-direction: column; gap: 14px; padding: 70px 24px 24px; background: linear-gradient(180deg, #f8f6ef, var(--b)); border-left: 1px solid var(--l); overflow-y: auto; }
.kcx-prev { height: 210px; display: flex; align-items: center; justify-content: center; }
.kcx-iso { width: 100%; height: 210px; }
.kcx-iso polygon { transition: all .3s; }
.kcx-prev__ph { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: 13px; color: var(--m); opacity: .8; }
.kcx-prev__ph svg { width: 110px; height: 88px; opacity: .5; }
.kcx-prev__pic svg { width: 190px; height: 150px; }
.kcx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.kcx-chip { display: inline-flex; gap: 6px; padding: 5px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--l); font-size: 12.5px; color: var(--t); }
.kcx-chip b { font-weight: 500; color: var(--m); }
.kcx-out { margin-top: auto; background: #fff; border: 1px solid var(--l); border-radius: 16px; padding: 14px 16px; }
.kcx-out__ph { font-size: 13px; color: var(--m); line-height: 1.45; }
.kcx-big { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.kcx-big div { background: var(--n); color: #fff; border-radius: 12px; padding: 10px 12px; }
.kcx-big b { display: block; font: 800 22px/1.1 Roboto, Arial, sans-serif; color: var(--sand); }
.kcx-big span { font-size: 12px; opacity: .8; }
.kcx-out table { width: 100%; border-collapse: collapse; font-size: 13px; }
.kcx-out td { padding: 5px 0; border-bottom: 1px dashed var(--l); }
.kcx-out tr:last-child td { border-bottom: 0; }
.kcx-out td + td { text-align: right; font-weight: 700; color: var(--n); white-space: nowrap; padding-left: 10px; }
.kcx-note { margin-top: 8px; font-size: 12px; color: #8a5a00; }

.kcx-done { text-align: center; padding: 30px 10px 0; }
.kcx-done__ico { width: 76px; height: 76px; margin: 0 auto 16px; border-radius: 50%; background: #e8f4ea; color: #2e7d32; display: flex; align-items: center; justify-content: center; animation: kcPop .4s cubic-bezier(.2, 1.4, .4, 1); }
.kcx-done__ico svg { width: 38px; height: 38px; }
@keyframes kcPop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.kcx-done p { max-width: 380px; margin: 0 auto; font-size: 15px; line-height: 1.55; color: var(--m); }
.kcx-done a { color: var(--n); font-weight: 700; }

/* ---------- телефон: модалка снизу, превью сверху компактно ---------- */
@media (max-width: 767px) {
    .kcx-modal { padding: 0; align-items: flex-end; }
    .kcx-box { display: flex; flex-direction: column-reverse; justify-content: flex-end; height: 94vh; height: 94dvh; max-width: none; border-radius: 22px 22px 0 0; transform: translateY(40px); }
    .kcx-side { flex: none; flex-direction: row; align-items: center; gap: 10px; padding: 12px 64px 12px 14px; border-left: 0; border-bottom: 1px solid var(--l); overflow: hidden; }
    .kcx-prev { flex: none; width: 92px; height: 66px; }
    .kcx-iso { height: 66px; }
    .kcx-iso text { display: none; }
    .kcx-prev__ph svg, .kcx-prev__pic svg { width: 80px; height: 60px; }
    .kcx-prev__ph span, .kcx-chips, .kcx-out table, .kcx-note { display: none; }
    .kcx-out { margin: 0; flex: 1; padding: 0; border: 0; background: none; }
    .kcx-out__ph { font-size: 12px; }
    .kcx-big { margin: 0; gap: 6px; }
    .kcx-big div { padding: 7px 9px; }
    .kcx-big b { font-size: 17px; }
    .kcx-big span { font-size: 11px; }
    .kcx-x { top: 12px; right: 12px; background: #fff; }
    .kcx-main { flex: 1; padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); }
    .kcx-title { font-size: 21px; }
    .kcx-sub { font-size: 13px; }
    .kcx-steps { margin: 14px 0 16px; gap: 5px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .kcx-steps::-webkit-scrollbar { display: none; }
    .kcx-st { flex: none; }
    .kcx-st:not(.is-cur) span { display: none; }
    .kcx-st:not(.is-cur) { padding: 5px; }
    .kcx-q { font-size: 17px; }
    .kcx-cards, .kcx-marks { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .kcx-card__pic { height: 62px; }
    .kcx-card__pic svg { width: 70px; height: 54px; }
    .kcx-size--3 { gap: 8px; }
    .kcx-in input { font-size: 16px; padding: 0 10px; }
    .kcx-in em { display: none; }
    .kcx-form { grid-template-columns: 1fr; }
    .kcx-qty__val input { font-size: 34px; }
    .kcx-nav { position: sticky; bottom: 0; background: #fff; padding: 12px 0 0; margin-top: 8px; }
    .kcx-next { height: 50px; padding: 0 22px; }
}
@media (prefers-reduced-motion: reduce) { .kcx-dock__item.is-main::before { animation: none; } .kcx-box, .kcx-modal, .kcx-sheet__in { transition: none; } }
@media print { .kcx-dock, .kcx-fab, .kcx-sheet, .kcx-modal { display: none !important; } }
/* v2.1: переключатель единиц (листы / м²) */
.kcx-unit { display: inline-flex; padding: 4px; margin-bottom: 14px; border-radius: 12px; background: var(--b); gap: 4px; }
.kcx-unit__b { padding: 8px 18px; border: 0; border-radius: 9px; background: none; color: var(--m); font: 600 14px Roboto, Arial, sans-serif; cursor: pointer; }
.kcx-unit__b.is-on { background: #fff; color: var(--n); box-shadow: 0 2px 6px rgba(9, 44, 83, .12); }
