/* Этап 1 редизайна: мобильная оболочка (шапка, нижняя панель, hero, меню).
   Только добавляет правила поверх index.html; логику Радара не трогает. */

.mtab-bar{display:none;}

@media (max-width:680px){
  /* --- верхняя панель: бренд + поиск + меню, остальное уехало в меню/нижнюю панель --- */
  .nav-shell{top:0;padding:max(8px,env(safe-area-inset-top)) 12px 8px;}
  .nav-pill{width:100%;max-width:none;justify-content:flex-start;gap:6px;padding:6px 6px 6px 8px;overflow:visible;}
  .nav-pill > :not(.nav-brand):not(.nav-search-btn):not(.nav-hamburger){display:none !important;}
  .nav-brand{font-size:15px;min-height:44px;padding:0 10px 0 6px;}
  .nav-shell .nav-pill .nav-search-btn{margin-left:auto;min-width:44px;min-height:44px;justify-content:center;padding:0 12px;}
  .nav-hamburger{display:flex;width:44px;height:44px;}

  /* --- нижняя панель действий (большие цели под большой палец) --- */
  body{padding-bottom:calc(68px + env(safe-area-inset-bottom));}
  .mtab-bar{
    display:grid;grid-template-columns:repeat(5,1fr);position:fixed;left:0;right:0;bottom:0;z-index:58;
    padding:6px 6px calc(6px + env(safe-area-inset-bottom));
    background:color-mix(in srgb, var(--surface) 90%, transparent);
    backdrop-filter:blur(18px) saturate(1.4);-webkit-backdrop-filter:blur(18px) saturate(1.4);
    border-top:1px solid var(--hairline);
  }
  .mtab{
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:52px;
    background:none;border:none;border-radius:12px;color:var(--ink-dim);font:inherit;font-size:11px;
    text-decoration:none;position:relative;-webkit-tap-highlight-color:transparent;
  }
  .mtab svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
  .mtab:active{background:var(--surface-2);}
  .mtab.is-primary{color:#0b0c0e;background:#e3a868;font-weight:700;margin:0 4px;}
  .mtab.is-primary:active{background:#d99a55;}
  .mtab-badge{position:absolute;top:4px;left:calc(50% + 6px);background:#e3a868;color:#0b0c0e;font-size:10px;font-weight:800;padding:0 5px;border-radius:9px;line-height:16px;}

  #vinRadarSection{scroll-margin-top:76px;}

  /* --- hero --- */
  .hero{padding-top:84px;padding-bottom:72px;justify-content:flex-start;}
  .hero{min-height:0 !important;padding-top:84px;padding-bottom:20px;}
  .hero-sub{display:none;}
  .hero h1{font-size:clamp(38px,11vw,52px);}
  .hero-transition{height:0 !important;}
  .vr-hero-cta{display:none !important;}   /* поле VIN сразу под hero, отдельная кнопка-ссылка не нужна */
  .hero-scroll-cue{position:relative !important;left:auto !important;bottom:auto !important;transform:none !important;animation:none !important;margin:10px auto 0;}
  .vr-hero-cta-wrap{flex-direction:column !important;align-items:stretch !important;gap:10px !important;padding:0 20px;margin-top:26px !important;}
  .vr-hero-cta,.vr-hero-stock-btn{width:100%;justify-content:center !important;min-height:54px;padding:0 20px !important;font-size:15px !important;box-sizing:border-box;}
  .vr-hero-cta-wrap > span{display:none !important;}
  .hero-scroll-cue{min-width:96px;min-height:48px;justify-content:center;cursor:pointer;
    -webkit-tap-highlight-color:transparent;}

  /* --- боковое меню --- */
  .mobile-menu{overflow-y:auto;padding:max(16px,env(safe-area-inset-top)) 14px 24px;width:min(320px,86vw);}
  .mobile-menu a{min-height:48px;display:flex;align-items:center;padding:0 14px;font-size:16px;}
}

@media (max-width:680px){
  html .nav-hamburger{width:44px;height:44px;}
  html .mobile-menu .mm-close{width:44px;height:44px;}
  html #vinRadarInput{min-height:48px;font-size:16px;}
  html .vw-next-btn{min-height:44px;padding:0 16px;}
  html .pal-chip{min-height:40px;}
  html .tk-modal-close,html .vr-modal-close{width:44px;height:44px;}
  html #drawerClose,html #drawerCopy{min-height:44px;min-width:44px;}
  .hero .eyebrow{display:none;}              /* строка-лозунг не помогает найти инфу */
  .hero{padding-top:76px;padding-bottom:14px;}
  .hero-scroll-cue{margin-top:6px;min-height:40px;}
  .vr-hero-cta-wrap{margin-top:14px !important;}
  .vin-radar-wrap{padding-top:16px !important;margin-top:-8px;}
  .hero{padding-bottom:0 !important;}
  .vr-submit-btn{padding:14px 16px !important;min-height:48px;white-space:nowrap;}
  #vrVinInputShell input{min-width:0;}
}

@media (min-width:681px){
  .hero-scroll-cue{cursor:pointer;}
}

/* Ошибка ввода VIN */
#vrVinError{margin:8px 2px 0;padding:10px 14px;border-left:3px solid #ef4444;background:rgba(239,68,68,.1);color:var(--ink);font-size:14.5px;line-height:1.45;border-radius:0 8px 8px 0;}
#vrVinError[hidden]{display:none;}
