/* Konfigurator – layout on top of site.css */
.kf { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; align-items: start; }
.kf-steps { display: grid; gap: 16px; }
.step { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }
.step-h { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.step-h .mono { font-size: 13px; color: var(--accent-ink); }
.step-h h2 { font-size: 20px; letter-spacing: -0.01em; }
.opts { display: grid; gap: 8px; }
.opts.three { grid-template-columns: repeat(3, 1fr); }
.opt { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid #B7C2CC; border-radius: 4px; cursor: pointer; background: var(--white); min-height: 44px; }
.opt:hover { border-color: var(--muted); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt b { font-size: 16px; }
.opt span { font-size: 14px; color: var(--muted); line-height: 1.35; }
.opt .mono { font-size: 13px; color: var(--accent-ink); }
.opt:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: #F0F9FE; }
.opt:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.opt.is-on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: #F0F9FE; }
.opt .mini { height: 92px; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.opt .mini svg { height: 100%; width: auto; }
.len { display: grid; grid-template-columns: 1fr 140px; gap: 16px; align-items: center; }
.len input[type="range"] { width: 100%; accent-color: var(--accent); min-height: 44px; }
.numin { display: flex; align-items: center; border: 1px solid #B7C2CC; border-radius: 4px; background: var(--white); min-height: 48px; }
.numin input { width: 100%; border: 0; font: 500 18px var(--mono); padding: 0 8px 0 12px; min-height: 46px; color: var(--ink); background: transparent; }
.numin input:focus { outline: none; }
.numin:focus-within { outline: 2px solid var(--accent); border-color: var(--accent); }
.numin span { padding: 0 12px; color: var(--muted); font-size: 15px; }
.presets { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.presets button { min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); font: 500 14px var(--mono); color: var(--ink); cursor: pointer; }
.presets button:hover { border-color: var(--accent); }
.hint { font-size: 14px; color: var(--muted); margin-top: 10px; }
.hint.warn { color: #9A3412; }
.qty { display: inline-flex; align-items: center; border: 1px solid #B7C2CC; border-radius: 4px; overflow: hidden; background: var(--white); }
.qty button { width: 44px; height: 46px; border: 0; background: var(--paper); font: 600 20px var(--f); cursor: pointer; color: var(--ink); }
.qty button:hover { background: var(--line); }
.qty input { width: 72px; height: 46px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; font: 500 18px var(--mono); color: var(--ink); }
.qty input:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.addrow { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.addrow .btn { flex: 1; min-width: 200px; }

.kf-view { position: sticky; top: calc(var(--hdr) + 16px); background: var(--night); color: var(--white); border-radius: var(--r); overflow: hidden; }
.kv-top { padding: 24px 24px 0; display: flex; justify-content: space-between; gap: 16px; align-items: start; flex-wrap: wrap; }
.kv-top .lab { font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mist); }
.kv-code { font: 500 clamp(30px, 3.4vw, 44px)/1.1 var(--mono); letter-spacing: .02em; margin-top: 8px; }
.kv-code i { font-style: normal; color: var(--accent); }
.kv-name { color: var(--mist); font-size: 15px; margin-top: 6px; }
.kv-stage { padding: 8px 24px 0; display: flex; justify-content: center; min-height: 340px; align-items: center; background-image: linear-gradient(rgb(255 255 255 / .035) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .035) 1px, transparent 1px); background-size: 24px 24px; }
.kv-stage svg { width: 100%; max-height: 380px; height: auto; }
.kv-foot { display: grid; grid-template-columns: auto 1fr; gap: 24px; padding: 20px 24px 24px; border-top: 1px solid var(--line-d); align-items: center; }
.kv-foot .sect { width: 120px; height: auto; }
.kv-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 0; }
.kv-facts dt { font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mist); }
.kv-facts dd { margin: 4px 0 0; font-weight: 600; font-size: 15px; }
.kv-src { font-size: 13px; color: var(--mist); padding: 0 24px 20px; }
.copybtn { min-height: 44px; padding: 0 14px; border: 1px solid var(--line-d); border-radius: 4px; background: transparent; color: var(--white); font: 600 14px var(--f); cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.copybtn:hover { border-color: var(--accent); }
.copybtn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; }

.fit { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.fit-res { display: flex; gap: 24px; align-items: center; }
.fit-res .stack { width: 92px; flex: none; }
.fit-res .stack svg { width: 100%; height: auto; }
.fit-res .stack rect.pl { fill: #E6EBF0; stroke: #9AA8B5; }
.fit-res .stack rect.pr { fill: var(--night); }
.fit-res .stack rect.pr.din { fill: var(--accent); }
.fit-res b { font: 500 44px/1 var(--mono); color: var(--accent-ink); display: block; }
.fit-res p { font-size: 16px; color: var(--muted); }
@media (max-width: 760px) { .fit { grid-template-columns: 1fr; gap: 20px; } }

.list-empty { padding: 24px; border: 1px dashed #B7C2CC; border-radius: var(--r); color: var(--muted); font-size: 16px; text-align: center; background: var(--white); }
.olist { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.olist th, .olist td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; font-size: 16px; }
.olist th { font: 600 12px/1 var(--f); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--paper); }
.olist td.c { font-family: var(--mono); font-weight: 500; }
.olist td.n { text-align: right; font-family: var(--mono); }
.olist td.x { width: 56px; text-align: right; }
.olist .rm { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 4px; background: var(--white); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.olist .rm:hover { color: #B42318; border-color: #B42318; }
.olist .rm svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; }
.olist tr:last-child td { border-bottom: 0; }
.list-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.acc-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.acc-i { display: flex; gap: 12px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; flex-wrap: wrap; }
.acc-i img { width: 56px; height: 56px; object-fit: cover; border-radius: 4px; }
.acc-i .t { flex: 1; min-width: 120px; }
.acc-i b { display: block; font: 500 13px var(--mono); color: var(--accent-ink); }
.acc-i span { font-size: 15px; line-height: 1.35; display: block; }
@media (max-width: 1000px) { .acc-row { grid-template-columns: 1fr; } }

.mbar { display: none; }
@media (max-width: 960px) {
  .kf { grid-template-columns: 1fr; gap: 16px; }
  .kf-view { position: relative; top: 0; order: -1; }
  .kv-stage { min-height: 240px; }
  .kv-foot { grid-template-columns: 1fr; }
  .kv-foot .sect { display: none; }
  .mbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--night); color: var(--white); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); gap: 12px; align-items: center; border-top: 1px solid var(--line-d); }
  .mbar .mono { font-size: 17px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mbar .btn { min-height: 46px; padding: 0 16px; }
  body.has-mbar { padding-bottom: 72px; }
}
@media (max-width: 600px) { .opts.three { grid-template-columns: 1fr; } .len { grid-template-columns: 1fr; } .olist th:nth-child(2), .olist td:nth-child(2) { display: none; } }

.mbar[hidden] { display: none !important; }
