/* =========================================================
   ГОЛОС БЕТОН — PWA Calculator
   Включает: foundation-calc.css + мобильные улучшения + тёмная тема
   ========================================================= */

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

:root{
  --bg:#f4f7fb;
  --card:#fff;
  --border:rgba(15,23,42,.10);
  --text:#0f172a;
  --text-muted:rgba(15,23,42,.65);
  --blue:#2563eb;
  --blue-dark:#1d4ed8;
  --hero-from:#0b1220;
  --hero-to:#101a31;
  --total-from:#0b1220;
  --total-to:#101a31;
  --input-bg:#fff;
  --bar-bg:#f3f6ff;
  --note-bg:#fff;
}

@media(prefers-color-scheme:dark){
  :root{
    --bg:#0d1117;
    --card:#161b22;
    --border:rgba(255,255,255,.10);
    --text:#e6edf3;
    --text-muted:rgba(230,237,243,.55);
    --input-bg:#21262d;
    --bar-bg:#161b22;
    --note-bg:#161b22;
  }
}

html{
  -webkit-text-size-adjust:100%;
  -webkit-tap-highlight-color:transparent;
  scroll-behavior:smooth;
}

body{
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;
  font-size:21px;
  background:var(--bg);
  color:var(--text);
  min-height:100dvh;
  /* Safe Area для телефонов с чёлкой */
  padding-top:env(safe-area-inset-top,0);
  padding-bottom:env(safe-area-inset-bottom,0);
  padding-left:env(safe-area-inset-left,0);
  padding-right:env(safe-area-inset-right,0);
}

/* ── HEADER ── */
/* Grid вместо flex: в Chrome (Android) колонка лого иначе считала min-width и наезжала на кнопку; в Яндексе ок */
.app-header{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  background:linear-gradient(180deg,#0b1220,#101a31);
  position:sticky;top:0;z-index:100;
  box-shadow:0 2px 12px rgba(0,0,0,.4);
  overflow:hidden;
  box-sizing:border-box;
}
.app-header__logo{
  display:flex;align-items:center;justify-content:flex-start;
  min-width:0;
  max-width:100%;
  overflow:hidden;
  text-decoration:none;
  position:relative;z-index:1;
}
.app-header__logo img{
  display:block;
  height:34px;width:auto;max-height:34px;
  max-width:100%;
  object-fit:contain;object-position:left center;
}
.app-header__title{color:#fff;font-size:19px;font-weight:900;letter-spacing:.04em;line-height:1.2}
.app-header__title small{display:block;font-size:16px;font-weight:400;opacity:.7;letter-spacing:.02em}
.app-header__phone{
  display:flex;align-items:center;justify-content:center;gap:4px;
  height:38px;padding:0 12px;border-radius:10px;
  background:#2563eb;border:none;
  color:#fff;font-size:16px;font-weight:700;text-decoration:none;
  white-space:nowrap;letter-spacing:.02em;
  box-shadow:0 4px 14px rgba(37,99,235,.40);
  transition:background .2s;
  justify-self:end;
  flex-shrink:0;
  position:relative;z-index:2;
  max-width:100%;
}
.app-header__phone:active{background:#1d4ed8}

@media(max-width:400px){
  .app-header{padding:8px 10px;gap:8px}
  .app-header__logo img{height:30px;max-height:30px}
  .app-header__phone{
    height:36px;padding:0 10px;font-size:15px;border-radius:9px;
  }
}

/* ── CONTAINER ── */
.app-wrap{max-width:640px;margin:0 auto;padding:16px 12px 80px}

/* ── HISTORY PANEL ── */
.history-bar{
  display:flex;align-items:center;justify-content:space-between;
  padding:10px 14px;margin-bottom:12px;
  background:var(--card);border:1px solid var(--border);
  border-radius:14px;gap:8px;
}
.history-bar__title{font-size:18px;font-weight:900;color:var(--text-muted);text-transform:uppercase;letter-spacing:.06em}
.history-bar__btn{
  padding:6px 12px;border-radius:8px;border:1px solid var(--border);
  background:transparent;color:var(--text-muted);font-size:17px;font-weight:700;cursor:pointer;
  transition:background .15s;
}
.history-bar__btn:active{background:var(--border)}

/* ── HISTORY LIST ── */
.history-list{
  display:none;flex-direction:column;gap:6px;margin-bottom:12px;
}
.history-list.is-open{display:flex}
.history-item{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:10px 14px;background:var(--card);border:1px solid var(--border);
  border-radius:12px;cursor:pointer;transition:border-color .15s;
  animation:fadeIn .2s ease;
}
.history-item:active{border-color:var(--blue)}
.history-item__info{flex:1;min-width:0}
.history-item__title{font-size:19px;font-weight:700;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.history-item__sub{font-size:17px;color:var(--text-muted);margin-top:2px}
.history-item__total{font-size:20px;font-weight:900;color:var(--blue);white-space:nowrap}
.history-item__del{
  width:28px;height:28px;border-radius:50%;border:none;background:transparent;
  color:var(--text-muted);font-size:19px;cursor:pointer;display:flex;align-items:center;justify-content:center;
  flex-shrink:0;transition:color .15s;
}
.history-item__del:active{color:#e11d48}

/* ── CALCULATOR (основной стиль из foundation-calc.css) ── */

#gbFcalc.gb-fcalc{
  width:100%;border-radius:18px;overflow:visible;
  border:1px solid var(--border);
  background:var(--card);
  box-shadow:0 12px 32px rgba(15,23,42,.12);
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;
}

#gbFcalc .gbf-hero{
  padding:16px 16px 10px;
  background:
    radial-gradient(circle at 20% 10%,rgba(37,99,235,.18) 0,transparent 45%),
    radial-gradient(circle at 80% 0%,rgba(34,197,94,.14) 0,transparent 46%),
    linear-gradient(180deg,#0b1220 0%,#101a31 100%);
  color:#fff;border-radius:17px 17px 0 0;
}

#gbFcalc .gbf-hero__top{display:flex;gap:12px;align-items:flex-end;justify-content:space-between;flex-wrap:wrap}
#gbFcalc .gbf-hero__title{font-size:30px;font-weight:900;letter-spacing:.02em}
#gbFcalc .gbf-hero__desc{max-width:780px;opacity:.9;line-height:1.35;font-size:18px}

#gbFcalc .gbf-mode{
  display:inline-flex;align-items:stretch;gap:0;
  border:1px solid rgba(255,255,255,.20);background:rgba(255,255,255,.06);
  border-radius:10px;overflow:hidden;
  width:min(420px,100%);justify-content:center;
}
#gbFcalc .gbf-mode__btn{
  border:0;background:transparent;color:#fff;cursor:pointer;
  padding:10px 18px;flex:1 1 50%;height:40px;
  display:flex;align-items:center;justify-content:center;
  font-weight:900;text-transform:uppercase;letter-spacing:.08em;font-size:18px;
  border-radius:0;
}
#gbFcalc .gbf-mode__btn+.gbf-mode__btn{border-left:1px solid rgba(255,255,255,.14)}
#gbFcalc .gbf-mode__btn.is-active{
  background:rgba(255,255,255,.22);
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.18);
}

#gbFcalc .gbf-types{margin-top:10px;display:flex;gap:8px;flex-wrap:wrap;align-items:center;justify-content:center;width:100%}
#gbFcalc .gbf-type{
  border:1px solid rgba(37,99,235,.35);background:rgba(37,99,235,.18);
  border-radius:10px;padding:8px 14px;cursor:pointer;
  display:flex;align-items:center;justify-content:center;gap:10px;user-select:none;
  min-width:90px;text-align:center;
  transition:background .15s,border-color .15s;
}
#gbFcalc .gbf-type__label{font-weight:900;text-transform:uppercase;letter-spacing:.08em;font-size:19px;color:#e0eaff;white-space:nowrap}
#gbFcalc .gbf-type.active{
  background:rgba(37,99,235,.55);border-color:#60a5fa;
  box-shadow:inset 0 0 0 2px rgba(96,165,250,.30),0 0 10px rgba(37,99,235,.25);
}
#gbFcalc .gbf-type.active .gbf-type__label{color:#fff}

#gbFcalc .gbf-herotitle{width:100%;display:flex;justify-content:center;margin-bottom:4px}

/* BAR */
#gbFcalc .gbf-bar{padding:10px 12px;background:var(--bar-bg);border-bottom:1px solid var(--border);overflow-x:hidden}
#gbFcalc .g-pmd-bar{display:flex;flex-wrap:wrap;gap:10px 12px;align-items:center}

#gbFcalc .g-pmd-field{display:flex;align-items:center;gap:8px}
#gbFcalc .g-pmd-label{font-size:21px;font-weight:900;color:var(--text);white-space:nowrap}
#gbFcalc .g-pmd-ctrl{display:inline-flex;align-items:center;gap:6px}
#gbFcalc .g-pmd-btn{
  width:32px;height:32px;border-radius:10px;border:1px solid var(--border);
  background:var(--input-bg);cursor:pointer;font-size:19px;line-height:1;
  display:flex;align-items:center;justify-content:center;padding:0;color:var(--text);
  transition:background .12s;
}
#gbFcalc .g-pmd-btn.active,#gbFcalc .g-pmd-btn:active{background:var(--text);color:var(--input-bg);border-color:var(--text)}
#gbFcalc .g-pmd-sign{min-width:28px;text-align:center;font-weight:900;color:var(--text)}
#gbFcalc .g-pmd-input{width:0;height:0;opacity:0;position:absolute;pointer-events:none}
#gbFcalc .g-pmd-info{font-size:19px;color:var(--text-muted);line-height:1.3;max-width:min(720px,70vw)}

#gbFcalc .g-pmd-bar>.g-pmd-field:first-child{order:10;flex:0 0 100%}
#gbFcalc .g-pmd-bar>.g-pmd-field:first-child .g-pmd-ctrl{display:flex;flex-wrap:wrap;align-items:center;gap:8px}

#gbFcalc .g-pmd-field--delivery{order:20;flex:0 0 100%;display:flex;align-items:center;gap:10px;flex-direction:column;align-items:stretch}
#gbFcalc .g-pmd-field--delivery>.g-pmd-label{font-size:21px;margin-bottom:2px}

#gbFcalc .gbf-delivery-ctrl{display:flex;flex-direction:column;align-items:stretch;gap:8px;width:100%}
#gbFcalc .gbf-address-row{display:flex;flex-direction:row;flex-wrap:wrap;gap:6px;width:100%}
#gbFcalc .gbf-address-row>#gbf-address{order:1;flex:1 1 100%;min-width:0;box-sizing:border-box}
#gbFcalc .gbf-address-row .gbf-address-clear-btn{order:2;flex:1 1 calc(50% - 3px);min-width:0;box-sizing:border-box}
#gbFcalc .gbf-address-row .gbf-address-apply-btn{order:3;flex:1 1 calc(50% - 3px);min-width:0;box-sizing:border-box}

#gbFcalc #gbf-address{
  height:44px;padding:0 14px;border:1px solid var(--border);border-radius:10px;
  font-size:19px;background:var(--input-bg);color:var(--text);
}
#gbFcalc .gbf-address-clear-btn{
  height:44px;padding:0 14px;background:var(--input-bg);color:var(--text-muted);
  border:1px solid var(--border);border-radius:10px;font-size:21px;font-weight:600;
  cursor:pointer;white-space:nowrap;transition:background .15s;
}
#gbFcalc .gbf-address-clear-btn:active{background:var(--border)}
#gbFcalc .gbf-address-apply-btn{
  height:44px;padding:0 18px;background:var(--blue);color:#fff;border:none;
  border-radius:10px;font-size:21px;font-weight:700;cursor:pointer;white-space:nowrap;
  transition:background .15s;
}
#gbFcalc .gbf-address-apply-btn:active{background:var(--blue-dark)}

/* Строка км: на ПК кнопка карты уезжает вправо (margin-left: auto), иначе всё в одну линию — выглядит тесно */
#gbFcalc .gbf-distance-row{
  display:flex;align-items:center;flex-wrap:wrap;gap:8px;width:100%;
  min-width:0;box-sizing:border-box;
}
#gbFcalc .gbf-distance-prefix,#gbFcalc .gbf-distance-suffix{
  font-size:21px;color:var(--text-muted);white-space:nowrap;flex:0 0 auto;
}
#gbFcalc #gbf-km-manual{
  width:70px;height:44px;padding:0 10px;border:1px solid var(--border);border-radius:10px;
  font-size:19px;background:var(--input-bg);color:var(--text);flex:0 0 70px;box-sizing:border-box;
}
#gbFcalc .gbf-open-yandex-btn{
  margin-left:auto;
  height:44px;padding:0 16px;
  background:var(--input-bg);
  color:var(--blue);
  border:1.5px solid var(--blue);
  border-radius:10px;
  font-size:17px;font-weight:700;
  cursor:pointer;white-space:nowrap;
  transition:background .18s,color .18s,border-color .18s;
  flex:0 0 auto;box-sizing:border-box;-webkit-tap-highlight-color:transparent;
}
#gbFcalc .gbf-open-yandex-btn:hover{
  background:var(--blue);
  color:#fff;
}
#gbFcalc .gbf-open-yandex-btn:active{background:var(--blue-dark)}
#gbFcalc .gbf-open-yandex-btn:focus-visible{
  outline:2px solid var(--blue);outline-offset:2px;
}

/* Как на сайте: на узком экране кнопка — отдельной строкой на всю ширину (на ПК не ломает ряд) */
@media(max-width:768px){
  #gbFcalc .gbf-distance-row{gap:6px}
  #gbFcalc .gbf-open-yandex-btn{
    margin-left:0;
    flex:0 0 100%;
    width:100%;
  }
}
#gbFcalc .gbf-delivery-error{font-size:20px;color:#e11d48;margin-top:2px}
#gbFcalc #gbf-distance-label{font-size:20px;color:var(--text-muted);margin-top:2px}

/* BODY */
#gbFcalc .gbf-body{padding:12px;background:var(--card)}

#gbFcalc .gbf-card{
  border:1px solid var(--border);border-radius:14px;padding:12px;margin-bottom:10px;
  background:var(--card);
  animation:fadeIn .2s ease;
}
#gbFcalc .gbf-card__title{font-size:24px;font-weight:900;color:var(--text);margin:0 0 10px}
#gbFcalc .gbf-card__titlerow{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:10px}
#gbFcalc .gbf-card__titlerow .gbf-card__title{margin:0;flex:1 1 auto}
#gbFcalc .gbf-field--inline{display:flex;flex-direction:row;align-items:center;gap:8px;font-size:19px;font-weight:900;color:var(--text);white-space:nowrap}
#gbFcalc .gbf-field--inline input{width:90px;height:38px;padding:0 10px;border-radius:10px;border:1px solid var(--border);background:var(--input-bg);font-size:20px;color:var(--text)}

#gbFcalc .gbf-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}

#gbFcalc .gbf-field{display:flex;flex-direction:column;gap:6px;font-size:20px;font-weight:900;color:var(--text)}
#gbFcalc .gbf-field input,#gbFcalc .gbf-field select{
  padding:8px 10px;border-radius:12px;border:1px solid var(--border);
  background:var(--input-bg);font-size:19px;height:44px;
  box-sizing:border-box;color:var(--text);transition:border-color .15s;
  -webkit-appearance:none;appearance:none;
}
#gbFcalc .gbf-field input:focus,#gbFcalc .gbf-field select:focus{
  outline:none;border-color:var(--blue);box-shadow:0 0 0 3px rgba(37,99,235,.15);
}
#gbFcalc .gbf-field-label{font-size:19px;font-weight:900;color:var(--text-muted)}
#gbFcalc .gbf-mixer-plan-display{font-size:20px;color:var(--text-muted);font-weight:600;line-height:1.4}

#gbFcalc .gb-error{
  margin-top:10px;padding:10px 12px;border-radius:12px;
  background:#fff2f2;border:1px solid #ffd2d2;color:#b00000;font-weight:900;font-size:21px;
}

/* TOTAL */
#gbFcalc .gbf-total{
  border-radius:16px;padding:14px;
  background:linear-gradient(180deg,#0b1220 0%,#101a31 100%);color:#fff;
  margin-bottom:10px;
  animation:pulseIn .35s ease;
}
#gbFcalc .gbf-trows{display:flex;flex-direction:column;gap:8px}
#gbFcalc .gbf-trow{display:flex;align-items:baseline;justify-content:space-between;gap:12px;font-size:21px;opacity:.92}
#gbFcalc .gbf-trow b{font-weight:900;white-space:nowrap;text-align:right}
#gbFcalc .gbf-trow.gbf-trow--volume3{display:grid;grid-template-columns:1fr auto 1fr;align-items:baseline;column-gap:12px}
#gbFcalc .gbf-trow--volume3 .gbf-tl{justify-self:start}
#gbFcalc .gbf-trow--volume3 .gbf-tc{justify-self:center;white-space:nowrap;font-size:34px;font-weight:900}
#gbFcalc .gbf-trow--volume3 .gbf-tr{justify-self:end;white-space:nowrap;text-align:right}
#gbFcalc .gbf-trow--total{opacity:1;border-top:1px solid rgba(255,255,255,.12);padding-top:10px;margin-top:4px}
#gbFcalc .gbf-trow--total span{font-weight:900;letter-spacing:.10em}
#gbFcalc .gbf-trow--total b{font-size:38px}

/* NOTE + LEAD FORM */
#gbFcalc .gbf-note-block.gbf-lead-wrap{
  margin-top:0;padding:14px;border-radius:14px;border:1px solid var(--border);background:var(--note-bg);
}
#gbFcalc .gbf-lead{display:flex;gap:16px;align-items:flex-start;flex-wrap:wrap;flex-direction:column}
#gbFcalc .gbf-lead__left{flex:1 1 100%}
#gbFcalc .gbf-lead__right{flex:1 1 100%;max-width:100%}
#gbFcalc .gbf-note-title{font-weight:900;color:var(--text);margin:0 0 6px;font-size:20px}
#gbFcalc .gbf-note-list{margin:0 0 12px;padding-left:18px;color:var(--text-muted);font-size:18px;line-height:1.4}
#gbFcalc .gbf-note-list li{margin:5px 0}

/* ACTION BUTTONS */
#gbFcalc .gbf-lead-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:0}
#gbFcalc .gbf-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  min-height:48px;padding:0 20px;border-radius:12px;border:1px solid transparent;
  font-size:19px;font-weight:900;letter-spacing:.04em;text-transform:uppercase;
  cursor:pointer;text-decoration:none;white-space:nowrap;
  transition:background .15s,box-shadow .15s,transform .08s,color .15s,border-color .15s;
  -webkit-tap-highlight-color:transparent;
}
#gbFcalc .gbf-btn:active{transform:scale(.97)}

#gbFcalc .gbf-btn--ghost{background:var(--input-bg);color:var(--text);border-color:var(--border)}
#gbFcalc .gbf-btn--ghost:active{border-color:var(--text)}
.gbf-btn--call{
  background:linear-gradient(135deg,#16a34a,#15803d);color:#fff;
  box-shadow:0 6px 18px rgba(22,163,74,.30);
  margin-top:10px;
}
.gbf-btn--call:active{background:linear-gradient(135deg,#15803d,#166534)}

/* Оставить заявку → прокрутка к блоку amo */
.gbf-btn--lead{
  background:linear-gradient(135deg,var(--blue),#1d4ed8);color:#fff;
  box-shadow:0 6px 18px rgba(37,99,235,.35);
  font-weight:800;
}
.gbf-btn--lead:active{background:linear-gradient(135deg,#1d4ed8,#1e40af)}

/* LEAD FORM */
#gbFcalc .gbf-lead-form{display:flex;flex-direction:column;gap:8px;align-items:center;max-width:340px;width:100%;margin:0 auto}
#gbFcalc .gbf-lead-form .gbf-lead-field,
#gbFcalc .gbf-lead-form .gbf-lead-agree,
#gbFcalc .gbf-lead-form .gbf-lead-msg{width:100%}
#gbFcalc .gbf-lead-field input{
  width:100%;min-height:48px;padding:0 14px;border-radius:12px;
  border:1px solid var(--border);font-size:19px;box-sizing:border-box;
  background:var(--input-bg);color:var(--text);transition:border-color .15s;
}
#gbFcalc .gbf-lead-field input:focus{outline:none;border-color:var(--blue);box-shadow:0 0 0 3px rgba(37,99,235,.15)}
#gbFcalc .gbf-lead-agree{font-size:18px;color:var(--text-muted);line-height:1.4}
#gbFcalc .gbf-lead-agree a{color:var(--text);text-decoration:underline}
#gbFcalc .gbf-lead-msg{margin-top:4px;font-size:18px}
#gbFcalc .gbf-lead-msg--ok{color:#16a34a}
#gbFcalc .gbf-lead-msg--err{color:#b91c1c}

/* Show/hide types */
#gbFcalc .gb-type{display:none}
#gbFcalc .gb-type.is-active{display:block}
#gbFcalc .gb-sol{display:none}
#gbFcalc .gb-sol.is-active{display:block}

/* Zero highlight */
#gbFcalc input.is-zero{color:#e11d48}

/* ── ОБЩИЙ КЛАСС ДЛЯ ВСЕХ КНОПОК ДЕЙСТВИЙ ── */
.action-btns-wrap{margin-top:10px;display:flex;justify-content:center}
.action-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  width:100%;max-width:260px;min-height:50px;
  padding:0 24px;border-radius:14px;border:none;
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;
  font-size:21px;font-weight:700;letter-spacing:.6px;
  text-transform:uppercase;
  cursor:pointer;transition:opacity .15s,transform .08s,box-shadow .15s;
  text-decoration:none;box-sizing:border-box;
  -webkit-tap-highlight-color:transparent;
}
.action-btn:active{transform:scale(.97);opacity:.88}

/* ── СТОЛБЕЦ КНОПОК — все одной ширины ── */
.action-btns-group{
  display:flex;flex-direction:column;gap:8px;
  width:100%;max-width:340px;
  margin:10px auto 0;
}
.action-btns-group .action-btn{max-width:none;width:100%}

/* Форма — встроена в action-btns-group, все поля 100% */
#gbFcalc .gbf-inline-form{display:contents}

/* Модальное окно заявки (amoCRM внутри) */
body.lead-modal-open{overflow:hidden;touch-action:none}

.lead-form-modal{
  position:fixed;inset:0;z-index:10050;
  display:none;align-items:center;justify-content:center;
  padding:max(12px,env(safe-area-inset-top)) 12px 12px;
  box-sizing:border-box;
}
.lead-form-modal.is-open{display:flex}
.lead-form-modal__backdrop{
  position:absolute;inset:0;border:none;margin:0;padding:0;
  background:rgba(15,23,42,.55);cursor:pointer;
}
.lead-form-modal__panel{
  position:relative;z-index:1;
  width:100%;max-width:440px;max-height:min(92vh,880px);
  display:flex;flex-direction:column;
  background:var(--card);color:var(--text);
  border-radius:16px;box-shadow:0 24px 48px rgba(0,0,0,.35);
  border:1px solid var(--border);
  overflow:hidden;
}
.lead-form-modal__head{
  flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:14px 16px;border-bottom:1px solid var(--border);
}
.lead-form-modal__title{margin:0;font-size:18px;font-weight:800}
.lead-form-modal__close{
  width:40px;height:40px;border:none;border-radius:10px;
  background:transparent;color:var(--text);font-size:26px;line-height:1;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
}
.lead-form-modal__close:hover{background:rgba(37,99,235,.12)}
.lead-form-modal__body{
  flex:1;min-height:0;overflow:auto;padding:12px 14px 16px;
  -webkit-overflow-scrolling:touch;
}
.lead-form-modal__body iframe,
#amoforms_holder_1697182 iframe{
  max-width:100%;
}
#gbFcalc .gbf-inline-input{
  width:100%;min-height:50px;padding:0 16px;
  border-radius:14px;border:1px solid var(--border);
  font-size:19px;box-sizing:border-box;
  background:var(--input-bg);color:var(--text);
  transition:border-color .15s;
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;
}
#gbFcalc .gbf-inline-input:focus{outline:none;border-color:var(--blue);box-shadow:0 0 0 3px rgba(37,99,235,.15)}
#gbFcalc .gbf-inline-agree{font-size:20px;color:var(--text-muted);line-height:1.5;display:flex;align-items:flex-start;gap:8px}
#gbFcalc .gbf-inline-agree input[type=checkbox]{margin-top:2px;flex-shrink:0}
#gbFcalc .gbf-lead-msg{font-size:20px;text-align:center}
#gbFcalc .gbf-lead-msg--ok{color:#16a34a}
#gbFcalc .gbf-lead-msg--err{color:#b91c1c}

/* Блок Важно (упрощённый) */
#gbFcalc .gbf-note-block{
  padding:12px 0 0;
  border-top:1px solid var(--border);
  margin-top:8px;
}
#gbFcalc .gbf-note-title{font-weight:900;color:var(--text);margin:0 0 6px;font-size:21px}
#gbFcalc .gbf-note-list{margin:0;padding-left:16px;color:var(--text-muted);font-size:19px;line-height:1.5}
#gbFcalc .gbf-note-list li{margin:4px 0}

/* Кнопки внутри формы — тоже одной ширины */
#gbFcalc .gbf-lead-form .action-btn{max-width:none;width:100%}

/* ── DOWNLOAD BUTTON ── */
.download-btn{
  background:linear-gradient(135deg,#6b7280,#4b5563);color:#fff;
  box-shadow:0 6px 18px rgba(75,85,99,.35);
}

/* ── SAVE BUTTON ── */
.save-btn{
  background:linear-gradient(135deg,#16a34a,#15803d);color:#fff;
  box-shadow:0 6px 18px rgba(22,163,74,.30);
}

/* ── INSTALL BANNER ── */
body.is-vk-host .install-banner,
body.is-vk-host .install-guide{
  display:none !important;
}

.install-banner{
  display:none;align-items:center;gap:12px;padding:12px 16px;margin-bottom:12px;
  background:linear-gradient(135deg,#1e3a5f,#2563eb);border-radius:14px;color:#fff;
  animation:slideDown .3s ease;
}
.install-banner.is-visible{display:flex}
.install-banner__text{flex:1;font-size:21px;font-weight:700;line-height:1.3}
.install-banner__text strong{display:block;font-size:20px;margin-bottom:2px}
.install-banner__btn{
  padding:8px 16px;border-radius:10px;border:none;background:#fff;color:#1e3a5f;
  font-size:18px;font-weight:900;cursor:pointer;white-space:nowrap;flex-shrink:0;
  transition:opacity .15s;
}
.install-banner__btn:active{opacity:.8}
.install-banner__close{
  width:28px;height:28px;border:none;background:rgba(255,255,255,.15);color:#fff;
  border-radius:50%;font-size:19px;cursor:pointer;display:flex;align-items:center;justify-content:center;
  flex-shrink:0;
}

/* ── INSTALL GUIDE ── */
.install-guide{
  margin:24px 16px 8px;
  background:linear-gradient(160deg,#1a3358,#1e4d8c);
  border-radius:16px;
  padding:22px 18px;
  color:#fff;
  box-shadow:0 8px 24px rgba(20,40,90,.40);
}
.ig-title{
  font-size:21px;font-weight:800;text-align:center;
  letter-spacing:.4px;margin-bottom:18px;
}
.ig-block{display:block;}
.ig-divider{height:1px;background:rgba(255,255,255,.2);margin:16px 0;}
.ig-os{
  font-size:21px;font-weight:700;margin-bottom:10px;
  opacity:.95;letter-spacing:.2px;
}
.ig-step{
  font-size:20px;line-height:1.6;
  padding:6px 0 6px 12px;
  border-left:3px solid rgba(125,211,252,.5);
  margin-bottom:6px;
}
.ig-step strong{color:#7dd3fc;}
.ig-warn{
  margin-top:12px;
  font-size:18px;line-height:1.6;
  background:rgba(255,255,255,.10);
  border-radius:10px;
  padding:10px 12px;
  opacity:.85;
}

/* ── FOOTER ── */
.app-footer{
  text-align:center;padding:24px 16px;color:var(--text-muted);font-size:19px;line-height:1.7;
}
.app-footer a{color:var(--text-muted);text-decoration:underline}
.app-footer__policy-wrap{
  display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:8px 14px;
  margin:14px 0 10px;
}
.app-footer__policy{
  font-size:17px;color:var(--text-muted);text-decoration:underline;
}
.app-footer__policy:hover{color:var(--blue)}
.app-footer small{display:block;margin-top:4px;font-size:16px}

/* Нижняя полоса — как .gb-footer__bottom на сайте */
.app-footer-bottom{
  text-align:center;padding:16px 16px calc(20px + env(safe-area-inset-bottom,0));
  border-top:1px solid var(--border);
  background:var(--card);
}
.app-footer-bottom__text{
  font-size:16px;color:var(--text-muted);line-height:1.5;
}
.app-footer-bottom__text a{
  color:inherit;text-decoration:none;
}
.app-footer-bottom__text a:hover{text-decoration:underline}

@media(prefers-color-scheme:dark){
  .app-footer-bottom{border-top-color:rgba(255,255,255,.08)}
}

/* ── ANIMATIONS ── */
@keyframes fadeIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@keyframes pulseIn{0%{transform:scale(.98);opacity:.7}60%{transform:scale(1.01)}100%{transform:scale(1);opacity:1}}
@keyframes slideDown{from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}

/* ── TOAST ── */
.toast{
  position:fixed;bottom:calc(20px + env(safe-area-inset-bottom,0px));left:50%;
  transform:translateX(-50%) translateY(20px);
  background:#0f172a;color:#fff;padding:12px 18px;border-radius:12px;
  font-size:16px;font-weight:600;line-height:1.35;text-align:center;
  max-width:min(92vw,420px);white-space:normal;word-wrap:break-word;
  opacity:0;transition:opacity .25s,transform .25s;pointer-events:none;z-index:9999;
  box-shadow:0 4px 20px rgba(0,0,0,.4);
}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
body.is-vk-host .toast{
  bottom:calc(28px + env(safe-area-inset-bottom,0px));
  max-width:min(94vw,380px);
  font-size:15px;
}

/* ── RESPONSIVE ── */
@media(min-width:480px){
  #gbFcalc .gbf-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  /* Блок «Важно + форма» остаётся всегда в одну колонку */
  #gbFcalc .gbf-lead{flex-direction:column;align-items:center}
  #gbFcalc .gbf-lead__left,
  #gbFcalc .gbf-lead__right{flex:0 0 100%;max-width:100%;width:100%}
}
@media(min-width:560px){
  #gbFcalc .gbf-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}


