/* ====================================================================================================
 * Тема «Зошит» (бренд «Рахуйка»): шкільний зошит у клітинку, синя кулькова ручка, червоні поля, жовтий маркер, рахівниця.
 * Калькулятор — як задача: «Дано» (комплектація) і «Відповідь» (ціна, підкреслена маркером).
 * Шрифти: Unbounded — заголовки й ціни, Onest — текст, Caveat — лише рукописне «Відповідь:».
 * Підключається після site.css замість theme.css (налаштування site.theme = zoshyt).
 * ==================================================================================================== */
:root {
  --pvc: #f8fafd;          /* папір */
  --paper: #ffffff;        /* аркуш */
  --ink: #1c2541;          /* чорнило */
  --ink2: #3b4566;
  --muted: #66708c;
  --line: #dde5f0;         /* клітинка */
  --line2: #b9c6d8;
  --oak: #2343d0;          /* синя ручка — дія */
  --oak-d: #1a33a6;
  --oak-bg: #e8edff;
  --pen: #2343d0; --pen-d: #1a33a6; --pen-bg: #e8edff;
  --red: #e03c31;          /* червона ручка вчителя / поля */
  --marker: #ffe14d;       /* маркер */
  --green: #2343d0;        /* сумісність з компонентами, що брали «зелений» акцент */
  --glass: #e6eef6; --glass-2: #ccdcec; --glass-ink: #2343d0; --sel: #e8edff;
  --ok: #1e8e5a; --warn: #9a5b00; --warn-bg: #fff6d6; --err: #c62828;
  --cell: rgba(35, 67, 208, .075);
  --f: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fd: "Unbounded", "Onest", system-ui, sans-serif;
  --fh: "Caveat", "Segoe Print", cursive;
  --r: 12px; --r-s: 8px;
  color-scheme: light;
}
body {
  background-color: var(--pvc);
  background-image: linear-gradient(var(--cell) 1px, transparent 1px), linear-gradient(90deg, var(--cell) 1px, transparent 1px);
  background-size: 22px 22px; color: var(--ink); font-family: var(--f); font-variation-settings: normal;
}
@media (min-width: 1180px) {                                       /* червоні поля зошита — ліворуч від вмісту */
  body::before { content: ""; position: fixed; top: 0; bottom: 0; left: max(10px, calc((100vw - 1240px) / 2 - 14px)); width: 2px; background: rgba(224, 60, 49, .55); pointer-events: none; z-index: 0; }
}
h1, h2, h3, .h3 { font-family: var(--fd); font-variation-settings: normal; letter-spacing: -0.02em; color: var(--ink); text-transform: none; }
h1 { font-weight: 700; } h2 { font-weight: 600; } h3, .h3 { font-weight: 600; font-family: var(--f); letter-spacing: -0.01em; }
a { color: var(--pen); } a:hover { color: var(--pen-d); }
.lead { color: var(--ink2); }
:focus-visible { outline: 2px solid var(--pen); outline-offset: 2px; }
::selection { background: var(--marker); color: var(--ink); }

/* кнопки й поля */
.btn { background: var(--pen); border-color: var(--pen); color: #fff; border-radius: 10px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.btn:hover { background: var(--pen-d); border-color: var(--pen-d); color: #fff; }
.btn.ghost { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--marker); border-color: var(--ink); color: var(--ink); }
.btn.white { background: #fff; color: var(--ink); border-color: #fff; }
.fld input, .fld select, .fld textarea, .sec-row select, .sec-row input { background: var(--paper); color: var(--ink); border-color: var(--line2); border-radius: 8px; }
.fld input:focus, .fld select:focus, .fld textarea:focus { border-color: var(--pen); box-shadow: 0 0 0 3px var(--pen-bg); }
.card { background: var(--paper); border-color: var(--line2); border-radius: var(--r); box-shadow: 4px 4px 0 var(--line); }
.seg { background: var(--paper); border-color: var(--line2); border-radius: 10px; }
.seg label + label { border-left-color: var(--line2); }
.seg input:checked + span { background: var(--ink); color: #fff; }
.chip { border-color: var(--line2); color: var(--ink2); background: var(--paper); }

/* смуга акції й шапка */
.promo-bar { background: var(--marker); color: var(--ink); font-size: .84rem; text-align: center; padding: 6px 12px; line-height: 1.35; position: relative; z-index: 1; }
.promo-bar a { color: var(--ink); text-decoration: underline; font-weight: 700; margin-left: 6px; }
.hdr { background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line2); }
.hdr-in { min-height: 68px; }
.logo { color: var(--ink); flex: 0 0 auto; gap: 10px; }
.logo .logo-mark { width: 36px; height: 36px; border-radius: 10px; }
.logo-word { font: 700 1.3rem/1 var(--fd); letter-spacing: -.03em; color: var(--ink); text-transform: lowercase; }
@media (max-width: 420px) { .logo-word { font-size: 1.05rem; } .logo .logo-mark { width: 30px; height: 30px; } }
.nav a { color: var(--ink2); font-size: .92rem; font-weight: 500; text-transform: none; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); border-bottom-color: var(--red); }
.nav .nav-calc { color: var(--pen); font-weight: 700; }
.tel { color: var(--ink); font-weight: 600; }
.reg-btn { color: var(--ink); border-color: var(--line2); background: var(--paper); border-radius: 10px; }
.cart-btn { color: var(--ink); } .cart-btn b { background: var(--red); color: #fff; }
.burger span { background: var(--ink); }
.hdr-cta { display: none; white-space: nowrap; }
@media (min-width: 760px) { .hdr-cta { display: inline-flex; min-height: 42px; padding: 0 16px; font-size: .86rem; } }
@media (min-width: 760px) and (max-width: 1279px) { .hdr-cta { display: none; } }
@media (min-width: 980px) and (max-width: 1279px) { .nav a { font-size: .84rem; padding-left: 6px; padding-right: 6px; } .reg-btn span { max-width: 80px; } }
.nav-open .nav { background: var(--paper); border-bottom-color: var(--line2); }
.nav-open .nav a { border-bottom-color: var(--line); }
.crumbs a, .crumbs ol { color: var(--muted); }

/* герой і «дошка» розрахунку — аркуш зошита */
.hero { border-bottom: 0; background: none; }
.hero h1 { max-width: 20ch; font-size: clamp(1.85rem, 3vw, 2.7rem); line-height: 1.1; }
.board, .calc-card { background: var(--paper); border: 1px solid var(--line2); border-radius: 16px; box-shadow: 6px 6px 0 var(--line); }
.board-draw, .calc-draw, .tpl-draw, .ci-img { border-color: var(--line); background-color: #f3f6fa; }
.stamp, .stamp th, .stamp td { border-color: var(--line2); }
.stamp th { background: #f4f7fb; color: var(--muted); font-weight: 500; }
.stamp-price output, .big-price, .po-sum b { font-family: var(--fd); font-weight: 700; color: var(--ink); letter-spacing: -.02em;
  background: linear-gradient(transparent 58%, var(--marker) 58%, var(--marker) 92%, transparent 92%); padding: 0 4px; }
.calc-sum .big-price::before { content: "Відповідь:"; display: block; font: 600 1.35rem/1 var(--fh); color: var(--red); letter-spacing: 0; margin-bottom: 2px; background: var(--paper); }
.qc-opt span, .tpl-pick label span, .ser-pick label span, .glass-pick label span, .sw-pick label span { background: var(--paper); border-color: var(--line2); border-radius: 10px; }
.qc-opt input:checked + span, .tpl-pick input:checked + span, .ser-pick input:checked + span, .glass-pick input:checked + span { background: var(--pen-bg); border-color: var(--pen); box-shadow: inset 0 0 0 1px var(--pen); }
.sw-pick input:checked + span { border-color: var(--pen); box-shadow: inset 0 0 0 1px var(--pen); }
.qc-opt i, .tpl-pick label span { color: var(--ink2); }
.view-tg { background: var(--paper); border-color: var(--line2); border-radius: 10px; } .view-tg input:checked + span { background: var(--ink); color: #fff; } .view-tg span { color: var(--ink2); }
.step { border-top: 1px dashed var(--line2); } .step legend { font-family: var(--fd); font-weight: 600; } .step legend span { color: var(--red); font-family: var(--fh); font-size: 1.6em; font-weight: 600; }
.sec-row { border-bottom-color: var(--line); }
.stepper { background: var(--paper); border-color: var(--line2); border-radius: 10px; } .stepper button { background: #f1f5fb; color: var(--ink); } .stepper button:hover { background: var(--pen-bg); }
.calc-sum > div { border-color: var(--line2); }
.mbar { background: var(--paper); border-top: 2px solid var(--ink); }
.mbar [data-price-m] { font-family: var(--fd); font-weight: 700; }
.specs { border-top: 1px dashed var(--line2); }
.specs summary { font-family: var(--fd); font-weight: 600; }
.specs summary::before { content: "Дано: "; color: var(--red); font-family: var(--fh); font-size: 1.3em; font-weight: 600; }
.warn li { border-left-color: var(--red); }

/* каталог, таблиці, списки */
.catalog, .tpl-grid { background: var(--paper); border-color: var(--line2); border-radius: var(--r); }
.cat-cell, .tpl { border-color: var(--line); }
.cat-cell:hover, a.tpl:hover { background: var(--pen-bg); color: var(--ink); }
.tbl-wrap { background: var(--paper); border-color: var(--line2); border-radius: var(--r); }
.tbl thead th { background: #f1f5fb; color: var(--ink2); border-bottom-color: var(--line2); font-weight: 600; }
.tbl th, .tbl td { border-bottom-color: var(--line); }
.tbl tbody tr:hover td { background: #fbfcff; }
.tbl.kv { background: var(--paper); border-color: var(--line2); }
.tbl td b, .price { font-variant-numeric: tabular-nums; }
.facts { border-color: var(--line2); background: var(--paper); } .facts div { border-color: var(--line); }
.prof, .faq, .cart-list { border-top-color: var(--line2); }
.prof li, .faq details, .reg-cols li, .obl, .ci { border-bottom-color: var(--line); }
.cut { border-color: var(--ink); background: var(--paper); } .cut i { border-right-color: var(--line2); } .cut i:nth-child(even) { background: var(--pen-bg); }
.faq summary::after { border-color: var(--red); }
.ticklist li::before, .hero-facts li::before { border-color: var(--red); }
.hero-facts b { font-family: var(--fd); }
.local { border-left-color: var(--red); }
.reg-cols a, .obl h2 a, .prof-name { color: var(--ink); }
.promo { border-top-color: var(--red); color: var(--ink); background: var(--paper); } .promo span { color: var(--ink2); } .promo .lnk { color: var(--pen); }
.band, .ai-band { background: var(--paper); border-top: 1px solid var(--line2); border-bottom: 1px solid var(--line2); }
.steps li::before { color: var(--red); font-family: var(--fh); font-size: 1.6em; }
.sw { background: var(--paper); border-color: var(--line2); }
.sheet { background: rgba(28, 37, 65, .45); }
.sheet-box { background: var(--paper); color: var(--ink); } .reg-list a { color: var(--ink); border-bottom-color: var(--line); } .x { color: var(--ink); }
.ftr { background: var(--ink); color: #e9edf6; }
.ftr a { color: #fff; } .ftr .muted, .ftr-bot { color: #aab3c8; } .ftr-h { color: #fff; }

/* профілі з фото, склопакети, фурнітура */
.pf-tabs { display: inline-flex; border: 1px solid var(--ink); border-radius: 10px; overflow: hidden; margin: 6px 0 22px; background: var(--paper); }
.pf-tabs button { background: transparent; color: var(--ink); border: 0; padding: 10px 30px; font: 600 .95rem var(--f); cursor: pointer; }
.pf-tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.pf-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.pf-card { display: flex; flex-direction: column; gap: 8px; padding: 18px; background: var(--paper); border: 1px solid var(--line2); border-radius: var(--r); box-shadow: 4px 4px 0 var(--line); }
.pf-card img { height: 210px; width: auto; max-width: 100%; object-fit: contain; align-self: center; }
.pf-card .brand { color: var(--red); font-size: .8rem; font-weight: 600; }
.pf-card b { font-size: 1.1rem; }
.pf-card h3 { margin: 0; font-size: 1.1rem; font-weight: 700; color: var(--ink); }
.pf-card .price { color: var(--ink); font-family: var(--fd); font-weight: 700; font-size: 1.05rem; margin-top: auto; }
.pf-card .btn { width: 100%; } .pf-card .btn + .btn { margin-top: 0; }
.pf-card .ph { height: 210px; display: grid; place-items: center; border: 1px dashed var(--line2); color: var(--ink2); }
.pf-card .ph svg { height: 180px; width: auto; }
.dots { display: flex; gap: 6px; align-items: center; } .dots i { width: 13px; height: 13px; border: 1.5px solid var(--ink); border-radius: 50%; display: block; } .dots i.on { background: var(--pen); border-color: var(--pen); }
.dots-l { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.heat { display: grid; gap: 4px; }
.gl-grid .pf-card img { height: 180px; } .gl-grid .pf-card p { margin: 0; color: var(--ink2); }
.hw-row { display: grid; gap: 22px; align-items: center; } @media (min-width: 900px) { .hw-row { grid-template-columns: 1fr 1.2fr; } }
.hw-list details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.hw-list summary { cursor: pointer; font-size: 1.08rem; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.hw-list summary::-webkit-details-marker { display: none; }
.hw-list summary .price { color: var(--pen); font-size: .92rem; font-weight: 700; white-space: nowrap; }
.hw-list details[open] summary { color: var(--pen); }
.hw-list p { color: var(--ink2); margin: 8px 0 0; }
.hw-img { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.hw-img img { width: 100%; height: auto; max-height: 360px; object-fit: contain; }
.prof-hero { display: grid; gap: 20px; align-items: center; } @media (min-width: 860px) { .prof-hero { grid-template-columns: 1.3fr .7fr; } }
.prof-hero img { max-height: 320px; width: auto; justify-self: center; }

/* дзвінок */
.fab-call { position: fixed; right: 16px; bottom: 90px; z-index: 45; width: 58px; height: 58px; border-radius: 50%; background: var(--pen); color: #fff; display: grid; place-items: center; box-shadow: 4px 4px 0 var(--ink); }
@media (min-width: 980px) { .fab-call { bottom: 24px; } }
.is-calc .fab-call { bottom: 96px; }
dialog.cb { border: 1px solid var(--line2); padding: 0; background: var(--paper); color: var(--ink); border-radius: var(--r); width: min(420px, 92vw); }
dialog.cb::backdrop { background: rgba(28, 37, 65, .45); }
dialog.cb form { padding: 20px; }

/* 3D-вигляд (win3d.js) */
.board-draw.is-3d, .calc-draw.is-3d { position: relative; padding: 0; overflow: hidden; background: #d9d4cc; aspect-ratio: 4 / 3; min-height: 0; display: block; }
.calc-draw.is-3d { aspect-ratio: 5 / 4; }
.is-3d canvas.w3d { display: block; width: 100%; height: 100%; cursor: grab; }
.is-3d canvas.w3d:active { cursor: grabbing; }
.w3d-hint { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); background: rgba(28,37,65,.78); color: #fff; font-size: .78rem; padding: 5px 12px; border-radius: 999px; pointer-events: none; transition: opacity .4s; white-space: nowrap; }
.w3d-hint.off { opacity: 0; }
.is-3d.busy canvas.w3d { opacity: .7; }
.w3d-btn { position: absolute; right: 10px; top: 10px; background: rgba(255,255,255,.94); color: var(--ink); border: 1px solid var(--line2); border-radius: 999px; font: 600 .78rem var(--f); padding: 7px 14px; cursor: pointer; }
.w3d-btn:hover { background: var(--marker); }
.w3d-save { right: auto; left: 10px; } .w3d-side { top: 52px; }

/* прайс-листи, популярні розміри */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mx th small { display: block; font-weight: 500; color: var(--muted); font-size: .74rem; }
.mx td a { color: var(--ink); text-decoration: none; display: block; }
.mx td a:hover { color: var(--pen); text-decoration: underline; }
.mx-wrap { max-height: 78vh; overflow: auto; }
.mx-grid { font-variant-numeric: tabular-nums; font-size: .86rem; }
.mx-grid th, .mx-grid td { padding: 7px 9px; text-align: right; white-space: nowrap; }
.mx-grid thead th { position: sticky; top: 0; z-index: 2; background: #eef3fa; }
.mx-grid tbody th { position: sticky; left: 0; z-index: 1; background: #f6f9fd; }
.mx-grid thead th:first-child { left: 0; z-index: 3; }
.mx-grid td.pg { background: #fff8cc; }
.mx-grid td.pg a { color: var(--ink); font-weight: 700; }
.chips-l { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.chip-l { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--line2); border-radius: 999px; color: var(--ink); background: var(--paper); text-decoration: none; font-size: .9rem; }
.chip-l:hover { border-color: var(--pen); color: var(--pen); }
.rooms { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.rooms a { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line2); border-radius: var(--r); color: var(--ink); text-decoration: none; background: var(--paper); }
.rooms a:hover { border-color: var(--pen); box-shadow: 3px 3px 0 var(--pen-bg); }
.rooms span { color: var(--muted); font-size: .82rem; } .rooms i { font-style: normal; color: var(--pen); font-weight: 700; }
.size-views { display: grid; gap: 12px; grid-template-columns: 1.3fr 1fr; align-items: center; }
.size-views .board-draw { min-height: 0; } .size-views svg { width: 100%; height: auto; }
.size-views .tpl-draw { background: #eef3f8; border-radius: var(--r); padding: 8px; }
@media (max-width: 640px) { .size-views { grid-template-columns: 1fr; } }

/* замір, відгуки, статус, друк */
.meas { max-width: 760px; display: grid; gap: 14px; }
.meas-out { border-top: 1px dashed var(--line2); padding-top: 12px; }
.meas-out b { color: var(--ink); font-family: var(--fd); font-size: 1.25rem; background: linear-gradient(transparent 58%, var(--marker) 58%); }
.meas-row { display: grid; gap: 24px; align-items: center; margin: 10px 0 18px; } @media (min-width: 900px) { .meas-row { grid-template-columns: 1.2fr 1fr; } }
.meas-fig { margin: 0; color: var(--ink); } .meas-fig svg { width: 100%; max-width: 420px; height: auto; display: block; }
.rv-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.rv { border: 1px solid var(--line2); border-radius: var(--r); padding: 16px; background: var(--paper); display: grid; gap: 8px; }
.rv-h { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; } .rv p { margin: 0; color: var(--ink2); }
.rv-stars { display: flex; gap: 3px; } .rv-stars i { width: 14px; height: 14px; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); background: var(--line2); }
.rv-stars i.on { background: #f5b400; }
.rv-reply { border-left: 3px solid var(--red); padding-left: 10px; color: var(--ink2); }
.rv-rate { border: 0; padding: 0; margin: 0; display: flex; gap: 6px; flex-wrap: wrap; } .rv-rate legend { width: 100%; margin-bottom: 6px; }
.rv-rate label span { display: inline-grid; place-items: center; min-width: 44px; min-height: 40px; border: 1px solid var(--line2); border-radius: 8px; cursor: pointer; background: var(--paper); }
.rv-rate input { position: absolute; opacity: 0; } .rv-rate input:checked + span { background: var(--pen); border-color: var(--pen); color: #fff; }
.rv-rate input:focus-visible + span { outline: 2px solid var(--pen); outline-offset: 2px; }
.st-steps { list-style: none; padding: 0; margin: 12px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; counter-reset: st; }
.st-steps li { counter-increment: st; text-align: center; font-size: .82rem; color: var(--muted); padding-top: 34px; position: relative; }
.st-steps li::before { content: counter(st); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line2); display: grid; place-items: center; font-weight: 700; background: var(--paper); }
.st-steps li.on { color: var(--ink); } .st-steps li.on::before { background: var(--pen); border-color: var(--pen); color: #fff; }
.st-res.cancel .st-steps { opacity: .4; }
.po { max-width: 980px; } .po-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 2px solid var(--ink); padding-bottom: 10px; }
.po-brand { font-family: var(--fd); font-size: 1.2rem; } .po-meta { text-align: right; }
.po-views { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; align-items: center; margin: 14px 0; }
.po-views svg { width: 100%; height: auto; max-height: 420px; } .po-draw { background: #fff; border-radius: var(--r); padding: 6px; }
.po-sum { font-size: 1.15rem; display: grid; gap: 4px; margin: 14px 0; } .po-sum b { font-size: 1.5rem; }
@media print {
  body { background: #fff !important; } body::before { display: none !important; }
  .promo-bar, .hdr, .crumbs, .ftr, .fab-call, .mbar, .po-act, dialog, .skip { display: none !important; }
}

/* поділитися, монтаж, повзунки, типи стулок */
.share { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.share > span { width: 100%; font-size: .82rem; color: var(--muted); }
.share a, .share button { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line2); background: var(--paper); color: var(--ink); font: 600 .82rem var(--f); text-decoration: none; cursor: pointer; }
.share a:hover, .share button:hover { border-color: var(--pen); color: var(--pen); }
.share .vb { border-color: #7360f2; } .share .tg { border-color: #2aabee; } .share .wa { border-color: #25d366; }
.mont-est { font-size: .86rem; color: var(--ink2); margin-top: 4px; }
.dims { align-items: end; }
.dims input[type=range] { width: 100%; accent-color: var(--pen); margin: 0; height: 28px; }
.sec-row b small { display: block; font-weight: 500; color: var(--muted); font-size: .76rem; }
.sec-types { display: flex; flex-wrap: wrap; gap: 6px; }
.sec-types label { cursor: pointer; position: relative; }
.sec-types input, .sec-row .sec-types input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; pointer-events: none; }
.sec-row > input { width: 110px; }
.sec-types label > span { display: grid; place-items: center; width: 44px; height: 50px; border: 1px solid var(--line2); border-radius: 8px; color: var(--ink2); background: var(--paper); }
.sec-types svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sec-types input:checked + span { border-color: var(--pen); background: var(--pen-bg); color: var(--pen); }
.sec-types input:focus-visible + span { outline: 2px solid var(--pen); outline-offset: 2px; }
.sec-row { grid-template-columns: 110px 1fr auto; align-items: center; }
@media (max-width: 520px) { .sec-row { grid-template-columns: 1fr; } }
.calc > * { min-width: 0; }
.seg { flex-wrap: wrap; max-width: 100%; } .seg label { flex: 1 1 auto; }
@media (max-width: 520px) { .seg span { padding-left: 10px; padding-right: 10px; font-size: .86rem; } }
.glass-pick, .glass-pick label, .glass-pick label span { min-width: 0; }
.glass-pick label span { grid-template-columns: minmax(0, 1fr) auto; }
@media (max-width: 520px) { .glass-pick label span { grid-template-columns: 1fr; } .glass-pick em { white-space: normal; overflow-wrap: anywhere; } }
.trust { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.trust li { border: 1px solid var(--ink); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 6px 14px; font-size: .86rem; font-weight: 600; }

/* галерея HPL-панелей МАСКО */
.macko { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line2); }
.mk-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 10px; }
.mk-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.mk-tabs button { flex: none; font: inherit; font-size: .86rem; color: var(--ink2); background: var(--paper); border: 1px solid var(--line2); border-radius: 999px; padding: 6px 12px; min-height: 38px; cursor: pointer; }
.mk-tabs button small { margin-left: 6px; color: var(--muted); }
.mk-tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.mk-tabs button[aria-selected="true"] small { color: #c9d0e4; }
.mk-models { display: grid; grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); gap: 8px; margin: 8px 0 14px; max-height: 372px; overflow-y: auto; }
.mk-models label, .mk-sw label { position: relative; cursor: pointer; }
.mk-models input, .mk-sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mk-models label > span { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px; border: 1px solid var(--line2); border-radius: 8px; background: var(--paper); }
.mk-models svg { display: block; width: 100%; max-width: 52px; height: auto; aspect-ratio: 140 / 300; }
.mk-models b { font-size: .78rem; font-weight: 600; color: var(--ink2); }
.mk-models input:checked + span { border-color: var(--pen); background: var(--pen-bg); box-shadow: inset 0 0 0 1px var(--pen); }
.mk-models input:focus-visible + span, .mk-sw input:focus-visible + span { outline: 2px solid var(--pen); outline-offset: 2px; }
.mk-row { margin: 6px 0 10px; } .mk-row > span { display: block; margin-bottom: 6px; font-size: .86rem; color: var(--muted); }
.mk-sw { display: flex; flex-wrap: wrap; gap: 4px; }
.mk-sw label > span { display: block; padding: 2px; border: 2px solid transparent; border-radius: 50%; }
.mk-sw i { display: block; width: 36px; height: 36px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
.mk-sw.mk-gl i { border-radius: 6px; } .mk-sw.mk-gl label > span { border-radius: 9px; }
.mk-sw em { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.mk-sw input:checked + span { border-color: var(--pen); }
.mk-own { margin-top: 6px; } .mk-own summary { cursor: pointer; font-size: .9rem; color: var(--pen); } .mk-own .fld { margin-top: 8px; }

/* населені пункти */
.reg-find { margin: 10px 0 6px; }
.place-res { list-style: none; margin: 0 0 12px; padding: 0; }
.place-res li + li { border-top: 1px solid var(--line); }
.place-res button { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--ink); font: inherit; padding: 10px 6px; cursor: pointer; border-radius: 8px; }
.place-res button:hover, .place-res button:focus-visible { background: var(--pen-bg); }
.place-res small { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; }
.place-find { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-top: 16px; }
.place-find .fld { flex: 1 1 280px; margin: 0; }
.dir-d { margin-bottom: 26px; } .dir-d h2 { font-size: 1.05rem; margin-bottom: 8px; }
.dir-h { padding: 10px 0; border-top: 1px dashed var(--line2); }
.dir-hn { font-weight: 700; }
.dir-h p { margin: 4px 0 0; color: var(--ink2); line-height: 1.6; }
.dir-h span.hit { background: var(--marker); color: var(--ink); border-radius: 3px; padding: 0 2px; }
.place-list { columns: 3 220px; column-gap: 28px; list-style: none; padding: 0; margin: 0; }
.place-list li { break-inside: avoid; padding: 4px 0; }
.place-list li:target { background: var(--marker); border-radius: 4px; padding-left: 6px; }
.place-list a { color: var(--muted); margin-left: 6px; }
.steps-list { padding-left: 1.2em; line-height: 1.7; }
.local-txt { line-height: 1.7; }

/* примірка на фото */
.tryon-btn { display: inline-flex; align-items: center; gap: 8px; width: 100%; justify-content: center; margin: 10px 0 4px; }
dialog.tryon { width: min(1100px, 100vw - 24px); max-height: calc(100dvh - 24px); padding: 16px; background: var(--paper); color: var(--ink); border: 1px solid var(--line2); border-radius: var(--r); overflow: auto; }
dialog.tryon::backdrop { background: rgba(28,37,65,.6); }
.tryon-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; } .tryon-h b { font-family: var(--fd); font-size: 1.05rem; }
.tryon-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 12px; }
.tryon-bar .btn { cursor: pointer; } .tryon-bar .btn[disabled] { opacity: .45; cursor: default; }
.tryon-stage { position: relative; width: fit-content; min-width: min(100%, 320px); max-width: 100%; min-height: 240px; margin: 0 auto; background: #eef3f8; border-radius: var(--r); overflow: hidden; touch-action: none; }
.tryon-stage > .tryon-photo { display: block; max-width: none; user-select: none; -webkit-user-drag: none; }
.tryon-empty { margin: 0; padding: 90px 16px; color: var(--muted); text-align: center; }
.tryon-it { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.tryon-win { position: absolute; left: 0; top: 0; max-width: none; max-height: none; transform-origin: 0 0; cursor: move; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); user-select: none; -webkit-user-drag: none; }
.tryon-hd { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: var(--pen); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.5); cursor: grab; touch-action: none; }
.tryon-it:not(.on) .tryon-hd { background: rgba(255,255,255,.75); width: 18px; height: 18px; margin: -9px 0 0 -9px; }

/* індекс цін, кошторис, «що можна зробити» */
.tbl.idx td small { margin-left: 4px; font-size: .75rem; }
.tbl small.up { color: var(--red); } .tbl small.down { color: var(--ok); }
.works { margin: 10px 0; padding-top: 10px; border-top: 1px dashed var(--line2); }
.works > b { display: block; margin-bottom: 6px; font-size: .92rem; }
.row-b.wk { font-size: .9rem; cursor: pointer; gap: 8px; } .row-b.wk input { accent-color: var(--pen); margin-right: 4px; }
.can-list { padding-left: 1.1em; line-height: 1.75; max-width: 75ch; } .can-list a { font-weight: 600; }
#rozmiry, #profili, #sklopakety, #furnitura, .dir-d { content-visibility: auto; contain-intrinsic-size: auto 900px; }

/* бренд-кіт і студія */
.bk-ctl { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 12px; }
.bk-marks { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.bk-marks label { cursor: pointer; }
.bk-marks input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bk-marks span { display: block; padding: 3px; border: 2px solid transparent; border-radius: 14px; }
.bk-marks svg { display: block; width: 48px; height: 48px; }
.bk-marks input:checked + span { border-color: var(--ink); }
.bk-marks input:focus-visible + span { outline: 2px solid var(--pen); outline-offset: 2px; }
.bk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 26px; }
.bk-card { margin: 0; border: 1px solid var(--line2); border-radius: var(--r); padding: 10px; background: var(--paper); }
.bk-card canvas { display: block; width: 100%; height: auto; background: repeating-conic-gradient(#eef2f8 0 25%, #fff 0 50%) 0 0 / 16px 16px; border-radius: 6px; }
.bk-card figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; font-size: .86rem; }
.bk-card figcaption span { color: var(--muted); }
.bk-card .btn { margin-left: auto; padding: 6px 12px; font-size: .8rem; }
.studio-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--red); border-radius: var(--r); background: #fff3f2; }
.studio-bar b { display: inline-flex; align-items: center; gap: 8px; }
.studio-bar b i { width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.studio-bar input[type=text] { flex: 1 1 220px; min-height: 38px; background: var(--paper); color: var(--ink); border: 1px solid var(--line2); border-radius: 8px; padding: 6px 10px; font: inherit; }
.studio-bar .tgl { margin: 0; }
