/* calc-bodygraph-interactive.css — full-screen modal widget styles.
   Namespace: .cbi-* to avoid clashes with host page styles. */

/* ═══ Trigger button (rendered by calc-report.js on host page) ═══ */
.calc__bg-interactive {
  display: inline-block;
  margin-top: 14px;
  padding: 10px 22px;
  background: transparent;
  border: 1.5px solid #9B7DD6;
  color: #9B7DD6;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.calc__bg-interactive:hover { background: #9B7DD6; color: #fff; }
.calc__bg-interactive:focus-visible { outline: 2px solid #9B7DD6; outline-offset: 2px; }

.cbi-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 16, 20, 0.86);
  z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  overflow: auto;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #EDEBE4;
  -webkit-font-smoothing: antialiased;
}

.cbi-modal {
  background: #1E1F24;
  border: 1px solid #2D2E34;
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
  width: 100%; max-width: 1400px;
  padding: 24px;
  position: relative;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.cbi-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #1A1A1A;         /* чёрный — контрастно на белом фоне бодиграфа */
  border: 0;
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  z-index: 5;
  transition: background .15s ease, transform .1s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.cbi-close:hover { background: #333; }
.cbi-close:active { transform: scale(.94); }

.cbi-header { text-align: center; margin-bottom: 20px; padding-right: 40px; }
.cbi-title-h {
  font-family: 'Marcellus', 'Cormorant Garamond', Georgia, serif;
  font-size: 22px; font-weight: 400;
  margin: 0 0 6px; color: #EDEBE4;
}
.cbi-hint { color: #8B8B94; font-size: 13px; margin: 0; }

.cbi-layout {
  display: grid;
  grid-template-columns: 130px 1fr 130px 380px;
  gap: 18px;
  align-items: start;
}

/* ═══ Планетные колонки ═══ */
.cbi-planet-col {
  background: #16171B;
  border: 1px solid #2D2E34;
  border-radius: 16px;
  padding: 14px 6px;
}
.cbi-planet-col-inner {
  display: flex; flex-direction: column; gap: 3px;
}
.cbi-planet-col-title {
  text-align: center;
  font-family: 'Marcellus', serif;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: #EDEBE4;
  padding: 6px 0 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid #2D2E34;
}
.cbi-planet-col-title::after {
  content: '';
  display: block;
  width: 30px; height: 2px;
  margin: 5px auto 0;
}
.cbi-planet-col-design .cbi-planet-col-title::after { background: #E85B5B; }
.cbi-planet-col-personality .cbi-planet-col-title::after { background: #EDEBE4; }

.cbi-planet-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s ease;
  font-family: 'Marcellus', serif;
}
.cbi-planet-row:hover { background: rgba(255,255,255,.06); }
.cbi-planet-row .cbi-glyph {
  font-size: 16px;
  width: 20px; text-align: center; line-height: 1;
}
.cbi-planet-row .cbi-value {
  font-size: 14px;
  letter-spacing: 0.01em;
  padding-left: 2px;
}
.cbi-planet-col-design .cbi-planet-row .cbi-glyph,
.cbi-planet-col-design .cbi-planet-row .cbi-value { color: #E85B5B; }
.cbi-planet-col-personality .cbi-planet-row .cbi-glyph,
.cbi-planet-col-personality .cbi-planet-row .cbi-value { color: #EDEBE4; }
.cbi-planet-col-personality .cbi-planet-row {
  grid-template-columns: 1fr auto;
}
.cbi-planet-col-personality .cbi-planet-row .cbi-value {
  text-align: right; padding-left: 0; padding-right: 2px; order: 1;
}
.cbi-planet-col-personality .cbi-planet-row .cbi-glyph { order: 2; }

/* ═══ Bodygraph chart ═══ */
.cbi-chart {
  background: #FBFAF8;
  border: 1px solid #E4DFD5;
  border-radius: 16px;
  padding: 20px;
  min-height: 500px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: relative;
}
.cbi-chart-inner {
  width: 100%;
  display: flex; align-items: center; justify-content: center;
}
.cbi-chart svg { max-width: 500px; width: 100%; height: auto; display: block; }
.cbi-chart .cbi-loading { color: #6B6E78; font-style: italic; }

/* Subtitle под бодиграфом — «Генератор 5/2 · Еретик · Отшельник» */
.cbi-chart-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #E4DFD5;
  width: 100%;
  text-align: center;
  font-family: 'Marcellus', Georgia, serif;
  font-size: 15px;
  line-height: 1.35;
  color: #1A1A1A;
}
.cbi-chart-footer-type { font-weight: 600; }
.cbi-chart-footer-profile { color: #9B7DD6; font-weight: 600; margin: 0 4px; }
.cbi-chart-footer-lines {
  color: #6B6E78;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 15px;
}

/* Правила раскраски SVG (те же что на живом /human-design/) */
.cbi-chart svg path[id^="Gate"]:not([id^="GateText"]) {
  fill: #FFFFFF; stroke: #B0AC9E; stroke-width: 0.8;
}
.cbi-chart svg path.bg-gate-on { fill: #2a2a2a !important; stroke: #2a2a2a !important; }
.cbi-chart svg path.bg-gate-top    { fill: #f80000 !important; stroke: #f80000 !important; }
.cbi-chart svg path.bg-gate-bottom { fill: #2a2a2a !important; stroke: #2a2a2a !important; }

.cbi-chart svg [id="Head"] > path:first-of-type,
.cbi-chart svg [id="Ajna"] > path:first-of-type,
.cbi-chart svg [id="Throat"] > path:first-of-type,
.cbi-chart svg [id="G"] > path:first-of-type,
.cbi-chart svg [id="Ego"] > path:first-of-type,
.cbi-chart svg [id="SolarPlexus"] > path:first-of-type,
.cbi-chart svg [id="Sacral"] > path:first-of-type,
.cbi-chart svg [id="Spleen"] > path:first-of-type,
.cbi-chart svg [id="Root"] > path:first-of-type {
  fill: #FFFFFF; stroke: #1A1A1A; stroke-width: 1.4;
}
.cbi-chart svg [id="Head"].bg-on > path:first-of-type        { fill: #fee066 !important; stroke: #C4A730 !important; }
.cbi-chart svg [id="Ajna"].bg-on > path:first-of-type        { fill: #94cf48 !important; stroke: #5F8C1F !important; }
.cbi-chart svg [id="Throat"].bg-on > path:first-of-type      { fill: #caa652 !important; stroke: #8A7128 !important; }
.cbi-chart svg [id="G"].bg-on > path:first-of-type           { fill: #fae380 !important; stroke: #C4A730 !important; }
.cbi-chart svg [id="Ego"].bg-on > path:first-of-type         { fill: #f73a34 !important; stroke: #A61F1A !important; }
.cbi-chart svg [id="Spleen"].bg-on > path:first-of-type      { fill: #caa652 !important; stroke: #8A7128 !important; }
.cbi-chart svg [id="Sacral"].bg-on > path:first-of-type      { fill: #fb3739 !important; stroke: #A61F1A !important; }
.cbi-chart svg [id="SolarPlexus"].bg-on > path:first-of-type { fill: #caa652 !important; stroke: #8A7128 !important; }
.cbi-chart svg [id="Root"].bg-on > path:first-of-type        { fill: #caa652 !important; stroke: #8A7128 !important; }

.cbi-chart svg text[id^="GateText"] { fill: #1A1A1A; }

/* Активные кружочки-ворота (badge) — красная заливка */
.cbi-chart svg .bg-gate-badge-on path { fill: #f80000 !important; }

/* Клик-cursor */
.cbi-chart svg [id="Head"], .cbi-chart svg [id="Ajna"], .cbi-chart svg [id="Throat"],
.cbi-chart svg [id="G"], .cbi-chart svg [id="Ego"], .cbi-chart svg [id="SolarPlexus"],
.cbi-chart svg [id="Sacral"], .cbi-chart svg [id="Spleen"], .cbi-chart svg [id="Root"],
.cbi-chart svg [id^="GateTextBg"],
.cbi-chart svg [id^="GateText"],
.cbi-chart svg [id^="Gate"]:not([id^="GateText"]) { cursor: pointer; }

/* ═══ Info-panel ═══
   Внутри .cbi-info живут:
     .cbi-info-close  — position:absolute в правом верхнем углу
     .cbi-info-scroll — оболочка для контента, у неё overflow-y:auto.
   Кнопка ✕ находится над scrollable div → остаётся на месте при прокрутке. */
.cbi-info {
  background: #16171B;
  border: 1px solid #2D2E34;
  border-radius: 16px;
  padding: 0;
  position: sticky;
  top: 0;
  max-height: 720px;
  overflow: hidden;   /* внутри скроллит .cbi-info-scroll */
}
.cbi-info-scroll {
  padding: 20px;
  max-height: 720px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
/* На пустом состоянии showInfo не вызывалась — есть только placeholder внутри .cbi-info */
.cbi-info .cbi-info-empty { padding: 40px 20px; }
.cbi-info-empty {
  color: #8B8B94;
  text-align: center;
  padding: 40px 20px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 17px;
  font-style: italic;
  line-height: 1.55;
}
.cbi-info-icon {
  display: block;
  font-size: 36px;
  margin-bottom: 10px;
  animation: cbi-pulse 2.2s ease-in-out infinite;
}
@keyframes cbi-pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

.cbi-badge {
  display: inline-block;
  background: rgba(155,125,214,.18);
  color: #B49BE6;
  border: 1px solid rgba(155,125,214,.4);
  border-radius: 99px;
  padding: 3px 12px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.cbi-badge-gate { background: rgba(232,91,91,.14); color: #E85B5B; border-color: rgba(232,91,91,.4); }
.cbi-badge-channel { background: rgba(255,255,255,.1); color: #EDEBE4; border-color: rgba(255,255,255,.25); }
.cbi-badge-center { background: rgba(127,208,140,.14); color: #7FD08C; border-color: rgba(127,208,140,.35); }
.cbi-badge-planet { background: rgba(232,91,91,.14); color: #E85B5B; border-color: rgba(232,91,91,.4); }

.cbi-status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 11px; font-weight: 600;
  margin-left: 8px;
}
.cbi-status-active { background: #f80000; color: #FFFFFF; }
.cbi-status-defined { background: rgba(127,208,140,.15); color: #7FD08C; border: 1px solid rgba(127,208,140,.35); }
.cbi-status-open { background: rgba(232,91,91,.12); color: #E85B5B; border: 1px solid rgba(232,91,91,.35); }
.cbi-status-half { background: rgba(245,166,35,.15); color: #F5A623; border: 1px solid rgba(245,166,35,.4); }
.cbi-status-absent { background: rgba(139,139,148,.12); color: #B0B0B7; border: 1px solid rgba(139,139,148,.3); }

/* Кнопка закрытия info-панели (mobile bottom-sheet) — position:absolute
   внутри .cbi-info (которая fixed), поэтому НЕ едет при скролле контента.
   Крупная (40×40), с touch-action: manipulation для мгновенного отклика. */
.cbi-info-close {
  display: none;
  position: absolute !important;   /* !important чтобы гарантированно
                                       не унаследовать sticky/relative */
  top: 10px !important;
  right: 12px !important;
  width: 40px; height: 40px;
  background: rgba(255,255,255,.18);
  border: 0;
  border-radius: 50%;
  color: #FFFFFF;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  z-index: 30;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  touch-action: manipulation;
  pointer-events: auto;
  transition: background .12s ease;
}
.cbi-info-close:hover,
.cbi-info-close:active { background: rgba(255,255,255,.3); }

.cbi-title {
  font-family: 'Marcellus', Georgia, serif;
  font-size: 22px; font-weight: 400;
  margin: 0 0 5px; line-height: 1.2;
  color: #EDEBE4;
}
.cbi-sub {
  color: #8B8B94;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 14.5px;
  margin: 0 0 16px;
}

.cbi-section { margin: 14px 0; }
.cbi-section h3 {
  font-family: 'Marcellus', serif;
  font-size: 11.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #8B8B94;
  font-weight: 400;
  margin: 0 0 5px;
}
.cbi-section.cbi-true h3 { color: #7FD08C; }
.cbi-section.cbi-not h3 { color: #E85B5B; }
.cbi-section p {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 16px; line-height: 1.55;
  margin: 0;
  color: #EDEBE4;
}

.cbi-facts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-top: 6px;
}
.cbi-fact {
  background: rgba(255,255,255,.04);
  border: 1px solid #2D2E34;
  border-radius: 10px;
  padding: 9px 12px;
}
.cbi-fact.cbi-true { background: rgba(127,208,140,.07); border-color: rgba(127,208,140,.3); }
.cbi-fact.cbi-not  { background: rgba(232,91,91,.07); border-color: rgba(232,91,91,.3); }
.cbi-fact strong {
  display: block; font-size: 10.5px; color: #8B8B94;
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 3px;
  font-family: 'Marcellus', serif;
  font-weight: 400;
}
.cbi-fact.cbi-true strong { color: #7FD08C; }
.cbi-fact.cbi-not strong { color: #E85B5B; }
.cbi-fact span {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px; line-height: 1.35;
  color: #EDEBE4;
}

/* ═══ Paywall lock ═══ */
.cbi-paywall {
  text-align: center;
  padding: 30px 20px;
}
.cbi-paywall-icon {
  font-size: 46px;
  margin-bottom: 12px;
  opacity: .85;
}
.cbi-paywall-title {
  font-family: 'Marcellus', Georgia, serif;
  font-size: 20px; font-weight: 400;
  margin: 0 0 10px;
  color: #EDEBE4;
  line-height: 1.3;
}
.cbi-paywall-body {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 15px; line-height: 1.5;
  color: #B0B0B7;
  margin: 0 0 20px;
}
.cbi-paywall-cta {
  display: inline-block;
  padding: 12px 24px;
  background: #9B7DD6;
  color: #FFFFFF;
  border: 0;
  border-radius: 12px;
  font-family: 'Marcellus', serif;
  font-size: 15px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background .15s ease;
}
.cbi-paywall-cta:hover { background: #8568C4; }

.cbi-err {
  color: #E85B5B;
  font-family: 'Cormorant Garamond', serif;
  padding: 30px;
  text-align: center;
}

/* ═══ Tablet ═══ */
@media (max-width: 1180px) {
  .cbi-layout { grid-template-columns: 110px 1fr 110px; }
  .cbi-info {
    grid-column: 1 / -1;
    position: static;
    max-height: 400px;
  }
}

/* ═══ Mobile — full-screen PWA layout ═══
   Stack order (top → bottom):
     1. Design planets — horizontal scroll strip
     2. Personality planets — horizontal scroll strip
     3. Bodygraph — full screen width, centered
     4. Info panel — inline below everything (fills on tap) */
@media (max-width: 720px) {
  /* Overlay оставляет место сверху и снизу для nav-панелей сайта.
     Юзер видит nav и может скроллить страницу через открытые области.
     ВАЖНО: backdrop-filter здесь ОТКЛЮЧЕН — иначе overlay становится
     containing block для потомков с position:fixed, и .cbi-info bottom:0
     считалось бы относительно overlay, а не viewport (bug v19). */
  .cbi-overlay {
    padding: 0;
    top: 56px;
    bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    background: rgba(15, 16, 20, 0.86);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .cbi-modal {
    padding: 6px 4px;
    border-radius: 0;
    width: 100%;
    max-width: 100%;
    max-height: none;
    min-height: 100%;
    box-shadow: none;
  }
  .cbi-close { top: 6px; right: 6px; }
  .cbi-header { padding-right: 42px; margin-bottom: 8px; text-align: left; padding-left: 6px; }
  .cbi-title-h { font-size: 15px; }
  .cbi-hint { font-size: 11px; }

  .cbi-layout {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0;
  }

  /* Explicit stack ORDER: Design → Personality → Bodygraph → Info */
  .cbi-col-design       { order: 1; }
  .cbi-col-personality  { order: 2; }
  .cbi-chart            { order: 3; }
  .cbi-info             { order: 4; }

  /* Planet columns — horizontal scrollable strips */
  .cbi-planet-col {
    padding: 6px 10px;
    background: #16171B;
    border: 1px solid #2D2E34;
    border-radius: 10px;
    width: 100%;
  }
  .cbi-planet-col-title {
    text-align: left;
    padding: 0 0 5px;
    margin: 0 0 5px;
    font-size: 10.5px;
    border-bottom: 1px solid #2D2E34;
  }
  .cbi-planet-col-title::after { display: none; }

  .cbi-planet-col-inner {
    display: flex;
    flex-direction: row;
    gap: 5px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .cbi-planet-col-inner::-webkit-scrollbar { display: none; }

  .cbi-planet-row {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    background: rgba(255,255,255,.05);
    border-radius: 7px;
  }
  .cbi-planet-row .cbi-glyph { font-size: 13px; width: auto; }
  .cbi-planet-row .cbi-value { font-size: 12.5px; padding: 0; }
  .cbi-planet-col-personality .cbi-planet-row {
    grid-template-columns: none;
  }
  .cbi-planet-col-personality .cbi-planet-row .cbi-value {
    text-align: left; padding: 0; order: 2;
  }
  .cbi-planet-col-personality .cbi-planet-row .cbi-glyph { order: 1; }

  /* Full-width bodygraph — 100% ширины, центрирован, максимум места для цифр */
  .cbi-chart {
    width: 100%;
    padding: 6px;
    min-height: 62vh;              /* больше места для SVG → цифры крупнее */
    max-height: 75vh;
    border-radius: 10px;
    overflow: hidden;
    touch-action: manipulation;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .cbi-chart-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: center center;
    transition: transform .15s ease-out;
    will-change: transform;
  }
  .cbi-chart svg {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
  }
  .cbi-chart-footer {
    font-size: 14px;
    margin-top: 10px;
    padding-top: 10px;
    width: 100%;
  }
  .cbi-chart-footer-lines { font-size: 14px; }

  /* Info panel — bottom sheet: выезжает снизу вверх (translateY animation),
     стоит НАД bottom nav сайта. Внутри Flex layout:
        row 1: пустое место с абсолютной ручкой + ✕ (высота 44px)
        row 2: .cbi-info-scroll (flex:1) — только тут скроллится контент.
     Так кнопка ✕ ФИЗИЧЕСКИ вне scroll-области и не может ехать. */
  .cbi-info {
    position: fixed;
    left: 0; right: 0;
    bottom: 0;             /* тянем ДО САМОГО НИЗУ (перекрывает bottom nav) */
    top: auto;
    width: 100%;
    max-width: 100%;
    /* Высота увеличена на ~78px чтобы верх остался ровно там же где был,
       а нижний край опустился с bottom:78px до bottom:0 */
    max-height: calc(45vh + 78px);
    min-height: calc(32vh + 78px);
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #1E1F24;
    border: 1px solid #2D2E34;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 30px rgba(0,0,0,.5);
    /* translateY(200%) — двигаем sheet на 2 своих высоты вниз, чтобы
       гарантированно уйти за пределы viewport (даже с bottom:82px offset). */
    transform: translateY(200%);
    transition: transform .28s cubic-bezier(.35,.9,.3,1);
    z-index: 20;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .cbi-info.is-open { transform: translateY(0); }
  .cbi-info .cbi-info-empty { display: none; }

  /* Ручка сверху sheet: реальный DOM-элемент .cbi-info-handle.
     Тянешь вниз пальцем → sheet едет за пальцем, если сдвиг >80px — закрывается. */
  .cbi-info-handle {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
    cursor: grab;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
  }
  .cbi-info-handle::before {
    content: '';
    width: 44px; height: 5px;
    background: rgba(255,255,255,.32);
    border-radius: 3px;
  }
  .cbi-info-handle:active { cursor: grabbing; }
  .cbi-info-handle:active::before { background: rgba(255,255,255,.5); }

  /* z-index > bottom-nav's 60 → sheet выезжает ПОВЕРХ nav (без пробела).
     padding-bottom: safe-area-inset-bottom — растягивает фон sheet В safe-area
     (home-indicator iOS), чтобы sheet физически касался нижней кромки экрана. */
  .cbi-info {
    z-index: 100 !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  }
  /* ✕ — первый flex-child, фиксированная высота 44px. Вне scroll → статичен. */
  .cbi-info-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: static !important;      /* убираем absolute — flex-flow */
    align-self: flex-end !important;
    flex-shrink: 0;
    margin: 10px 12px 4px !important;
  }
  /* Scroll wrapper — второй flex-child, забирает всё оставшееся место */
  .cbi-info-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px 18px calc(18px + env(safe-area-inset-bottom, 0));
  }
}

/* Very small screens — hint less critical, hide */
@media (max-width: 400px) {
  .cbi-hint { display: none; }
  .cbi-title-h { font-size: 16px; }
}
