/* Публичный подбор автокрана. Светлая и тёмная тема сайта, телефон в приоритете. */
.kcalc { display: grid; gap: 16px; max-width: 100%; }
.kcalc, .kbox, .kform, .kfield, .krow, .kdir { min-width: 0; }
.kfield input, .kfield select, .kdir button { min-width: 0; max-width: 100%; }
@media (max-width: 420px) {
  header a.btn-brand { display: none; }
}
.kbox {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 16px;
}
.dark .kbox { background: #171717; border-color: #404040; }
.kform { display: grid; gap: 12px; }
.kfield { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kfield label { font-size: 14px; font-weight: 600; }
.kstep {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: 8px;
  min-width: 0;
}
.kstep button {
  min-width: 0;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: inherit;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  padding: 0;
}
.dark .kstep button { background: #0a0a0a; border-color: #525252; color: #f3f4f6; }
.kstep button:active { background: #f3f4f6; }
.dark .kstep button:active { background: #262626; }
.kdims { display: grid; gap: 8px; }
.kmini { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kmini > span { font-size: 12px; font-weight: 600; color: #6b7280; }
.dark .kmini > span { color: #a3a3a3; }
@media (min-width: 720px) {
  .kdims { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.kresult {
  display: grid;
  gap: 14px;
  margin-top: 12px;
  align-items: center;
  justify-content: start;
}
.kresult-copy { min-width: 0; }
.kresult-copy > :first-child { margin-top: 0; }
.ksimple-foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-top: 16px;
}
.ksimple-foot .kstar {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #6b7280;
}
.dark .ksimple-foot .kstar { color: #a3a3a3; }
.ksimple-foot .klink { margin-top: 10px; }
.ksimple-row {
  display: grid;
  gap: 18px;
  align-items: center;
}
.ksimple-main {
  display: grid;
  gap: 14px;
  align-items: center;
  min-width: 0;
}
.ksimple {
  width: 100%;
  max-width: 460px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  background: #f4f4f5;
}
.dark .ksimple { background: #111111; }
.kfoot {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #6b7280;
}
.dark .kfoot { color: #a3a3a3; }
@media (min-width: 860px) {
  .ksimple-row {
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: 12px 28px;
  }
  .ksimple-main {
    grid-template-columns: minmax(0, 1fr) minmax(190px, 250px);
    gap: 8px 24px;
  }
  .ksimple-main > .ksimple-empty { grid-column: 1 / -1; }
}
.kfield input, .kfield select {
  width: 100%;
  font-size: 16px;
  line-height: 1.3;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: inherit;
}
.dark .kfield input, .dark .kfield select {
  background: #0a0a0a;
  border-color: #525252;
  color: #f3f4f6;
}
.kfield input:focus, .kfield select:focus {
  outline: 2px solid #D4AF37;
  border-color: #D4AF37;
}
.krow { display: grid; gap: 10px; }
.krow-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.krow-3 input { padding-left: 8px; padding-right: 8px; text-align: center; }
@media (min-width: 640px) {
  .krow-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.klock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  font-weight: 600;
}
.dark .klock { background: #0a0a0a; border-color: #404040; }
.klock b { color: #AA1535; font-size: 18px; }
.dark .klock b { color: #f0647f; }
.kdir {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}
.kdir button, .kdir .khub {
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 8px;
}
.dark .kdir button, .dark .kdir .khub { background: #0a0a0a; border-color: #525252; }
.kdir button.on { background: #AA1535; color: #fff; border-color: #AA1535; }
.kdir .khub {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  line-height: 1.2;
}
.kdir [data-dir="front"] { grid-column: 2; grid-row: 1; }
.kdir [data-dir="left"] { grid-column: 1; grid-row: 2; }
.kdir .khub { grid-column: 2; grid-row: 2; }
.kdir [data-dir="right"] { grid-column: 3; grid-row: 2; }
.kdir [data-dir="back"] { grid-column: 2; grid-row: 3; }
.krange { width: 100%; accent-color: #AA1535; height: 32px; }
.kgo {
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: #AA1535;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  padding: 12px 16px;
}
.kgo:hover { background: #8a1029; }
.klegal {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #6b7280;
}
.dark .klegal { color: #a3a3a3; }
.kcat { margin: 0; font-size: 28px; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
.kanalog {
  margin: 6px 0 0;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.45;
  color: #6b7280;
}
.dark .kanalog { color: #a3a3a3; }
.kprice { margin: 12px 0 0; font-size: 22px; font-weight: 800; color: #8a6d12; }
.dark .kprice { color: #e6c85a; }
.kwarn {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 700;
  line-height: 1.4;
}
.dark .kwarn { background: rgba(154, 52, 18, .25); color: #fdba74; }
.kempty { margin: 0; font-size: 16px; line-height: 1.45; }
.kmodels { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.kmodel {
  text-align: left;
  width: 100%;
  cursor: pointer;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  padding: 12px;
  color: inherit;
}
.dark .kmodel { background: #0a0a0a; border-color: #404040; }
.kmodel.on { border-color: #AA1535; box-shadow: inset 0 0 0 1px #AA1535; }
.kmodel h3 { margin: 0; font-size: 16px; font-weight: 700; }
.kmeta { margin: 4px 0 0; font-size: 14px; color: #4b5563; }
.dark .kmeta { color: #d1d5db; }
.kbadges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.kbadges:empty { display: none; }
.kbadge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #ecfdf5;
  color: #166534;
}
.kbadge.req { background: #fef3c7; color: #92400e; }
.kbadge.okv { position: relative; cursor: help; background: #e0f2fe; color: #075985; }
.kbadge.okv .ktip {
  display: none;
  position: absolute;
  z-index: 30;
  left: 0;
  bottom: calc(100% + 8px);
  width: max-content;
  max-width: min(260px, 70vw);
  padding: 8px 10px;
  border-radius: 10px;
  background: #18181b;
  color: #f4f4f5;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  white-space: normal;
  text-align: left;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  pointer-events: none;
}
.dark .kbadge.okv .ktip { background: #f4f4f5; color: #18181b; }
.kbadge.okv:hover .ktip,
.kbadge.okv:focus .ktip,
.kbadge.okv:focus-within .ktip { display: block; }
.dark .kbadge { background: rgba(22, 101, 52, .35); color: #86efac; }
.dark .kbadge.req { background: rgba(146, 64, 14, .4); color: #fcd34d; }
.dark .kbadge.okv { background: rgba(7, 89, 133, .45); color: #7dd3fc; }
.kactions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.kactions a, .kswitch button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}
.dark .kactions a, .dark .kswitch button { border-color: #525252; }
.kactions a.solid { background: #AA1535; color: #fff; border-color: #AA1535; }
.khead { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #AA1535; margin: 16px 0 0; }
.kmore {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
}
.kmore::before,
.kmore::after {
  content: "";
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: 0.45;
}
.dark .kmore { color: #a3a3a3; }
.kviews { display: grid; gap: 10px; margin-top: 12px; }
.kview { min-width: 0; }
.kview p { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: #6b7280; }
.kview svg, .kchart {
  width: 100%;
  height: auto;
  display: block;
  background: #f4f4f5;
  border-radius: 12px;
}
.dark .kview svg { background: #111111; }
.dark .kchart { background: #16161a; }
.kswitch { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.kswitch button.on { background: #AA1535; color: #fff; border-color: #AA1535; }
.kviews[data-mode="side"] .kview-top, .kviews[data-mode="top"] .kview-side { display: none; }
.klink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #AA1535;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.klink:hover { background: #8a1029; color: #fff; }
@media (min-width: 900px) {
  .kcalc.full {
    grid-template-columns: minmax(320px, 400px) minmax(0, 1fr);
    align-items: start;
  }
  .kcalc.full > .kscheme,
  .kcalc.full > .kfoot { grid-column: 1 / -1; }
  .kcalc.full .kdims { grid-template-columns: 1fr; }
}
.kscheme:empty { display: none; }
