/* =========================================================================
   КОНСТРУКТОР КОЛЕСА НА ПЕРВОМ ЭКРАНЕ ГЛАВНОЙ (03.10.2026).
   Макет — myscreens/home-builder/ (принят владельцем; «панельность уменьшить»:
   карточка без рамки и тяжёлой тени, панели правки компактнее).
   Все классы — с приставкой hb-: у style.css главной свои .modal, .chip и т. п.
   Цвета — фирменные из шапки landing.css: графит, василёк, бумага.
   ========================================================================= */

.main-banner.hb-hero { grid-template-columns: minmax(0, 1fr) 620px; gap: 44px; }
.hb-hero .main-banner__h1 { font-size: 50px; line-height: 1.04; letter-spacing: -.04em; }
.hb-hero .main-banner__p { font-size: 18px; margin-top: 18px; max-width: 540px; }
.hb-hero .main-banner__advantages { margin-top: 20px; }
.hb-hero .hero-trial-note { margin-top: 18px; }
.hb-hero .hb-links { margin-top: 20px; }
.hb-have { color: rgba(255,255,255,.62); font-size: 14px; }
.hb-have a { color: #93b4ff; text-decoration: underline; text-underline-offset: 2px; }
/* Слой выше полосы фактов: панель правки и шторка на телефоне не должны уходить под неё. */
.hb-hero .main-banner__wheel { min-height: 0; display: block; z-index: 6; }

/* Карточка конструктора — плоская: подложка чуть светлее фона, без рамки */
.hb { position: relative; padding: 18px; border-radius: 24px; background: rgba(255,255,255,.06); color: #fff; text-align: left; }
.hb__head { display: flex; align-items: center; gap: 10px; }
.hb__num { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #2563eb; color: #fff; font-size: 12.5px; font-weight: 800; }
.hb__num--in { background: rgba(255,255,255,.22); margin-right: 2px; }
.hb__q { font-size: 16px; font-weight: 800; letter-spacing: -.01em; }

.hb__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.hb__chip { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px 0 6px; border-radius: 10px; border: 0; background: rgba(255,255,255,.08); color: #fff; font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background .15s; }
.hb__chip img { width: 24px; height: 24px; }
.hb__chip:hover { background: rgba(255,255,255,.14); }
.hb__chip.on { background: #fff; color: #101828; }
.hb.is-fresh .hb__chip { animation: hbHint 2.4s ease-in-out 1s 2; }
@keyframes hbHint { 0%, 100% { box-shadow: 0 0 0 0 rgba(147,180,255,0); } 50% { box-shadow: 0 0 0 2px rgba(147,180,255,.75); } }

.hb__stage { position: relative; margin-top: 14px; height: 330px; border-radius: 16px; overflow: hidden;
  background: repeating-linear-gradient(135deg, #eef2f8 0 14px, #e7ecf4 14px 28px); }
.hb__frame { position: absolute; inset: 0; }
.hb__stage iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; background: transparent; }
.hb__tag { position: absolute; left: 10px; bottom: 9px; padding: 5px 9px; border-radius: 8px; background: rgba(16,24,40,.72); color: #fff; font-size: 12px; pointer-events: none; }
.hb__stage.is-loading::after { content: "Собираем колесо…"; position: absolute; inset: 0; display: grid; place-items: center; color: #667085; font-size: 14px; background: #eef2f8; }

.hb__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.hb__tools { display: flex; gap: 6px; }
.hb__tool { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 10px; border: 0; background: rgba(255,255,255,.08); color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.hb__tool:hover { background: rgba(255,255,255,.14); }
.hb__tool svg { width: 15px; height: 15px; fill: currentColor; opacity: .8; }
.hb__tool.on { background: rgba(255,255,255,.2); }
.hb__dot { width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(255,255,255,.7); }
.hb__cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 20px; border: 0; border-radius: 14px; color: #fff; font: inherit; font-size: 16px; font-weight: 800; background: linear-gradient(90deg, #2470a1, #2563eb); box-shadow: 0 10px 26px rgba(37,99,235,.34); white-space: nowrap; cursor: pointer; }
.hb__cta svg { width: 18px; height: 18px; fill: currentColor; }
.hb__cta:hover { filter: brightness(1.06); }
.hb__cta[disabled] { opacity: .7; cursor: wait; }
.hb__cta--wide { width: 100%; margin-top: 16px; }

/* Панель правки — слева от конструктора, поверх текста первого экрана:
   предпросмотр остаётся целиком на виду. Компактная: строки по 36px. */
.hb__panel { position: absolute; top: 58px; right: calc(100% + 16px); width: 420px; max-height: calc(100% - 58px); overflow: auto; z-index: 5; padding: 12px; border-radius: 14px; background: #fff; color: #101828; box-shadow: 0 16px 44px rgba(16,24,40,.28); }
.hb__panel[hidden] { display: none; }
.hb-p__h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.hb-p__h b { font-size: 14px; }
.hb-p__x { border: 0; background: #eef2f6; width: 28px; height: 28px; border-radius: 8px; font-size: 17px; line-height: 1; color: #101828; cursor: pointer; }
.hb-prz { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.hb-prz__row { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 4px 0 6px; border: 1px solid #e2e8f0; border-radius: 9px; }
.hb-prz__row img { width: 20px; height: 20px; flex: none; }
/* Значок приза — кнопка выбора из стандартных (03.10). Обычный значок — на цвете сектора. */
.hb-prz__ico { flex: none; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: #98a2b3; font: inherit; font-size: 15px; line-height: 1; cursor: pointer; }
.hb-prz__ico img { width: 20px; height: 20px; display: block; object-fit: contain; }
.hb-prz__ico:hover, .hb-prz__ico:focus-visible { outline: 2px solid #2563eb; outline-offset: 1px; }
.hb-prz__ico.is-empty { border: 1px dashed #b9c4d6; }
/* Выбор значка: вкладки библиотек, сетка, «Без значка» и пояснение про свои картинки */
.hb-ip__back { flex: none; border: 0; background: #eef2f6; height: 28px; padding: 0 10px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 700; color: #101828; cursor: pointer; }
.hb-p__h .hb-ip__t { flex: 1; min-width: 0; margin: 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Вкладки равной ширины в одну строку: длинное название обрезается многоточием, а не переносится под кнопку. */
.hb-ip__tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; margin-bottom: 8px; }
.hb-ip__tabs button { min-width: 0; height: 32px; padding: 0 8px; border: 0; border-radius: 8px; background: #f2f4f7; color: #475467; font: inherit; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.hb-ip__tabs button.on { background: #101828; color: #fff; }
.hb-ip__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; }
.hb-ip__i { display: grid; place-items: center; height: 40px; padding: 0; border: 0; border-radius: 9px; background: #f2f4f7; cursor: pointer; }
.hb-ip__i img { width: 26px; height: 26px; display: block; object-fit: contain; }
.hb-ip__i:hover { filter: brightness(1.08); }
.hb-ip__i.on { outline: 2px solid #2563eb; outline-offset: 2px; }
.hb-ip__foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 12px; color: #667085; }
.hb-ip__none { flex: none; height: 30px; padding: 0 12px; border: 1px solid #d0d5dd; border-radius: 8px; background: #fff; color: #101828; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.hb-ip__none.on { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.14); }
.hb-ip__msg { margin: 6px 0; font-size: 13px; color: #475467; }
.hb-ip__retry { border: 0; background: none; padding: 0; color: #2563eb; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.hb-ip__own { margin: 10px 0 0; padding: 8px 10px; border-radius: 9px; background: #eff4ff; color: #344054; font-size: 12.5px; line-height: 1.45; }
.hb-prz__row input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 13.5px; color: #101828; background: transparent; }
.hb-prz__row:focus-within { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.14); }
.hb-prz__del { flex: none; border: 0; background: none; color: #98a2b3; font-size: 16px; width: 24px; height: 24px; border-radius: 6px; cursor: pointer; }
.hb-prz__del:hover { background: #fef3f2; color: #d92d20; }
.hb-prz__add { display: flex; align-items: center; justify-content: center; height: 36px; border: 1px dashed #b9c4d6; border-radius: 9px; background: none; color: #2563eb; font: inherit; font-weight: 700; font-size: 13.5px; cursor: pointer; }
.hb-p__note { margin: 8px 0 0; font-size: 12px; color: #667085; line-height: 1.45; }
.hb-txt label { display: block; font-size: 12px; font-weight: 700; color: #667085; margin: 8px 0 4px; }
.hb-txt label:first-child { margin-top: 0; }
.hb-txt input { width: 100%; height: 36px; padding: 0 10px; border: 1px solid #e2e8f0; border-radius: 9px; font: inherit; font-size: 13.5px; outline: 0; box-sizing: border-box; }
.hb-txt input:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.14); }
.hb-sw { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.hb-sw button { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px; border: 1px solid #e2e8f0; border-radius: 9px; background: #fff; font: inherit; font-size: 12.5px; font-weight: 600; color: #101828; cursor: pointer; text-align: left; }
.hb-sw button.on { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.16); }
.hb-sw i { flex: none; width: 22px; height: 22px; border-radius: 50%; display: block; border: 1px solid rgba(16,24,40,.12); }

.hb__fallback { padding: 30px 10px; text-align: center; }
.hb__fallback p { margin: 0 0 16px; color: rgba(255,255,255,.78); }
.hb.is-failed > :not(.hb__fallback) { display: none; }

/* Окно «сохранить» */
.hb-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; background: rgba(5,10,20,.62); backdrop-filter: blur(3px); text-align: left; }
.hb-modal[hidden] { display: none; }
.hb-modal__box { position: relative; width: 100%; max-width: 480px; padding: 24px; border-radius: 20px; background: #fff; color: #101828; box-shadow: 0 30px 90px rgba(0,0,0,.4); max-height: calc(100vh - 40px); overflow: auto; box-sizing: border-box; }
.hb-modal__x { position: absolute; right: 14px; top: 14px; width: 34px; height: 34px; border: 0; border-radius: 10px; background: #eef2f6; font-size: 20px; line-height: 1; color: #101828; cursor: pointer; }
.hb-modal__top { display: flex; gap: 14px; align-items: center; padding-right: 30px; }
.hb-modal__thumb { flex: none; width: 60px; height: 60px; border-radius: 50%; box-shadow: 0 4px 14px rgba(16,24,40,.18); }
.hb-modal h2 { margin: 0; font-size: 20px; line-height: 1.25; letter-spacing: -.01em; color: #101828; }
.hb-modal__sub { margin: 6px 0 0; font-size: 14px; color: #667085; line-height: 1.5; }
.hb-modal form { margin-top: 16px; }
.hb-f__lbl { display: block; font-size: 13px; font-weight: 700; margin: 12px 0 6px; color: #101828; }
.hb-f__lbl span { color: #667085; font-weight: 500; }
.hb-f__inp { display: block; width: 100%; height: 46px; padding: 0 14px; border: 1px solid #d0d5dd; border-radius: 12px; font: inherit; font-size: 16px; outline: 0; color: #101828; background: #fff; box-sizing: border-box; }
.hb-f__inp:focus { border-color: #2563eb; box-shadow: 0 0 0 4px rgba(37,99,235,.14); }
.hb-f__inp.is-bad { border-color: #d92d20; }
.hb-f__hint { margin-top: 6px; font-size: 12.5px; color: #667085; }
.hb-f__typo { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: #fff7e6; color: #7a4b00; font-size: 13.5px; }
.hb-f__typo[hidden] { display: none; }
.hb-f__typo button { margin-left: 6px; border: 0; background: #f5b301; color: #2b1a00; font: inherit; font-weight: 700; border-radius: 8px; padding: 4px 10px; font-size: 13px; cursor: pointer; }
.hb-f__err { margin-top: 6px; font-size: 13px; color: #d92d20; }
.hb-f__err[hidden] { display: none; }
.hb-f__err--top { margin-top: 12px; }
.hb-chk { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 14px; line-height: 1.45; cursor: pointer; color: #101828; }
.hb-chk input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: #2563eb; flex: none; }
.hb-chk a { color: #2563eb; text-decoration: underline; }
.hb-taken { margin-top: 12px; padding: 14px; border-radius: 14px; background: #eff4ff; }
.hb-taken[hidden] { display: none; }
.hb-taken p { margin: 0; font-size: 14px; line-height: 1.5; color: #101828; }
.hb-taken .hb-f__lbl { margin-top: 10px; }
.hb-taken__forgot { display: inline-block; margin-top: 8px; font-size: 13px; color: #2563eb; text-decoration: underline; }
.hb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.hb-modal__foot { margin: 10px 0 0; text-align: center; font-size: 12.5px; color: #667085; }
#hb-new-only[hidden], #hb-step-mail[hidden], #hb-step-limit[hidden] { display: none; }

/* Лимит колёс исчерпан: список «заменить / удалить» */
.hb-lim__msg { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: #fff7e6; color: #7a4b00; font-size: 14px; line-height: 1.5; }
.hb-lim__list { display: grid; gap: 8px; }
.hb-lim__w { padding: 12px; border: 1px solid #e2e8f0; border-radius: 12px; }
.hb-lim__name { font-weight: 700; font-size: 14.5px; color: #101828; }
.hb-lim__meta { margin-top: 2px; font-size: 12.5px; color: #667085; }
.hb-lim__meta b { color: #b54708; font-weight: 600; }
.hb-lim__acts { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.hb-lim__btn { height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid #d0d5dd; background: #fff; color: #101828; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.hb-lim__btn--p { background: #2563eb; border-color: #2563eb; color: #fff; }
.hb-lim__btn--d { color: #b42318; border-color: #fecdca; }
.hb-lim__btn--dd { background: #d92d20; border-color: #d92d20; color: #fff; }
.hb-lim__confirm { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #fef3f2; color: #7a271a; font-size: 13px; line-height: 1.5; }
.hb-lim__confirm p { margin: 0 0 6px; }
.hb-lim__alt { margin: 12px 0 0; font-size: 13px; color: #667085; }
.hb-lim__alt a { color: #2563eb; text-decoration: underline; }

@media (max-width: 1180px) {
  .main-banner.hb-hero { grid-template-columns: minmax(0, 1fr) 540px; gap: 28px; }
  .hb-hero .main-banner__h1 { font-size: 42px; }
  .hb__panel { width: 360px; }
  .hb-ip__tabs button { padding: 0 5px; font-size: 12.5px; }
  .hb-prz { grid-template-columns: 1fr; }
}

/* Одна колонка: заголовок → конструктор → доводы. Левая колонка «растворяется»,
   чтобы конструктор встал сразу под заголовком, а не после всех доводов. */
@media (max-width: 960px) {
  .main-banner.hb-hero { display: flex; flex-direction: column; gap: 0; }
  .hb-hero .main-banner__left { display: contents; }
  .hb-hero .main-banner__h1 { order: 1; }
  .hb-hero .main-banner__p { order: 2; }
  .hb-hero .main-banner__wheel { order: 3; width: 100%; max-width: 640px; margin: 22px auto 0; }
  .hb-hero .main-banner__advantages { order: 4; margin-left: auto; margin-right: auto; }
  .hb-hero .hero-trial-note { order: 5; text-align: center; }
  .hb-hero .hb-links { order: 6; justify-content: center; }
  /* Панель правки — шторкой снизу. У предков конструктора не должно быть
     backdrop-filter/transform: иначе position: fixed считался бы от них. */
  .hb__panel { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 42vh; border-radius: 18px 18px 0 0; z-index: 1000; padding: 14px 16px 18px; box-shadow: 0 -12px 40px rgba(0,0,0,.35); }
  .hb-prz { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .hb-hero .main-banner__h1 { font-size: 29px; line-height: 1.08; }
  .hb-hero .main-banner__p { display: none; }
  .hb-hero .main-banner__wheel { margin-top: 16px; }
  .hb { padding: 12px; border-radius: 20px; }
  .hb__q { font-size: 15.5px; }
  .hb__chips { flex-wrap: nowrap; overflow-x: auto; margin: 10px -12px 0; padding: 0 12px 4px; scrollbar-width: none; }
  .hb__chips::-webkit-scrollbar { display: none; }
  .hb__stage { height: 380px; margin-top: 10px; border-radius: 14px; }
  .hb__tag { display: none; }
  .hb__bar { flex-direction: column; align-items: stretch; gap: 8px; margin-top: 10px; }
  .hb__tools { display: grid; grid-template-columns: repeat(3, 1fr); }
  .hb__tool { justify-content: center; padding: 0 6px; }
  .hb__cta { font-size: 15.5px; }
  .hb-modal { place-items: end stretch; padding: 0; }
  .hb-modal__box { max-width: none; border-radius: 20px 20px 0 0; padding: 20px 16px 18px; max-height: 92vh; }
  .hb-modal h2 { font-size: 18px; }
  .hb-modal__thumb { width: 50px; height: 50px; }
}
