/* Customer navigation stays in the store while a task is open.
   JS measures the real chrome and visual viewport; no payment content is styled here. */
body.hab-shell-overlays{
 --hab-shell-room:max(0px,calc(var(--hab-shell-viewport-height,100dvh) - var(--hab-shell-top,0px) - var(--hab-shell-bottom,0px)));
}
body.hab-shell-overlays>:is(.site-header,.storefront-shell-header),
body.hab-shell-overlays>.mobile-command{z-index:12002}
body.hab-shell-overlays:is(.smart-is-open,.browse-vehicle-is-open)>:is(.site-header,.storefront-shell-header),
body.hab-shell-overlays:has([data-search-layer]:not([hidden]))>:is(.site-header,.storefront-shell-header),
html.hab-one-open body.hab-shell-overlays>:is(.site-header,.storefront-shell-header){
 position:fixed!important;top:var(--hab-shell-viewport-top,0px)!important;inset-inline:0;width:100%;margin:0;
}
body.hab-shell-overlays:is(.smart-is-open,.browse-vehicle-is-open)>.mobile-command,
body.hab-shell-overlays:has([data-search-layer]:not([hidden]))>.mobile-command,
html.hab-one-open body.hab-shell-overlays>.mobile-command{
 top:calc(var(--hab-shell-viewport-top,0px) + var(--hab-shell-viewport-height,100dvh) - var(--hab-shell-bottom,0px));bottom:auto;
}
body.hab-shell-overlays.smart-is-open .store-vehicle-context[data-store-vehicle-context],
body.hab-shell-overlays .hab-modal-shell-top .store-vehicle-context[data-store-vehicle-context]{display:flex!important;visibility:visible;pointer-events:auto}

/* The same header/footer frame surrounds the existing Smart and FIT tasks. */
body.hab-shell-overlays .smart-panel.smart-panel,
body.hab-shell-overlays .browse-vehicle-panel.browse-vehicle-panel{
 z-index:12001;top:calc(var(--hab-shell-viewport-top,0px) + var(--hab-shell-top,0px) + 12px);bottom:auto;
 height:min(820px,max(0px,calc(var(--hab-shell-room) - 24px)));max-height:var(--hab-shell-room);
}
body.hab-shell-overlays .smart-panel .smart-scroll,
body.hab-shell-overlays .browse-vehicle-panel .browse-vehicle-content{
 min-height:0;overscroll-behavior:contain;scroll-padding-block:16px;
}
body.hab-shell-overlays .panel-backdrop,
body.hab-shell-overlays.browse-vehicle-is-open::after{
 z-index:12000;top:calc(var(--hab-shell-viewport-top,0px) + var(--hab-shell-top,0px));bottom:auto;height:var(--hab-shell-room);
}
body.hab-shell-overlays .search-layer[data-search-layer]:not([hidden]){
 z-index:12001;top:calc(var(--hab-shell-viewport-top,0px) + var(--hab-shell-top,0px));bottom:auto;
 height:var(--hab-shell-room);padding:12px;box-sizing:border-box;overflow:hidden;
}
body.hab-shell-overlays .search-layer>.search-box{max-height:100%;max-block-size:100%;margin-block:0;padding:18px;box-sizing:border-box}
body.hab-shell-overlays .search-layer>.search-box>[data-search-results]{flex:1;min-height:0;overflow:auto;scroll-padding-block:12px}
body.hab-shell-overlays .search-layer>.search-box>[data-search-close]{top:10px;inset-inline-end:12px;inset-inline-start:auto;z-index:1}
body.hab-shell-overlays .search-layer>.search-box>.journey-back{min-height:40px;margin-bottom:8px}
body.hab-shell-overlays .search-layer>.search-box input{height:54px;margin-block:10px;font-size:1.125rem}

/* Document readers retain their existing print layout. On screen their close
   controls and scrolling content occupy the same space as the other tasks. */
@media screen{
 body.hab-shell-overlays:has([data-content-layer]:not([hidden]))>:is(.site-header,.storefront-shell-header){position:fixed!important;top:var(--hab-shell-viewport-top,0px)!important;inset-inline:0;width:100%;margin:0}
 body.hab-shell-overlays:has([data-content-layer]:not([hidden]))>.mobile-command{top:calc(var(--hab-shell-viewport-top,0px) + var(--hab-shell-viewport-height,100dvh) - var(--hab-shell-bottom,0px));bottom:auto}
 body.hab-shell-overlays .content-layer[data-content-layer]:not([hidden]){z-index:12001;top:calc(var(--hab-shell-viewport-top,0px) + var(--hab-shell-top,0px));bottom:auto;height:var(--hab-shell-room);max-height:var(--hab-shell-room);box-sizing:border-box;overflow:hidden}
 body.hab-shell-overlays .content-layer>.content-drawer{height:100%;max-height:100%;box-sizing:border-box;overscroll-behavior:contain;padding-bottom:80px;scroll-padding-block:16px 88px}
 body.hab-shell-overlays .content-layer:has(.privacy-experience)>.content-drawer{height:auto;max-height:100%;padding-bottom:0}
 body.hab-shell-overlays .content-drawer:has(.privacy-experience)>[data-content-detail]{padding-bottom:80px;scroll-padding-bottom:88px}
 body.hab-shell-overlays:is(.drawer-open,:has(.search-layer:not([hidden])))>:is(.hab-support-launch,.journey-back-float,.storefront-shell-back){z-index:12003;display:flex!important;visibility:visible;pointer-events:auto;bottom:auto}
 body.hab-shell-overlays:is(.drawer-open,:has(.search-layer:not([hidden])))>:is(.journey-back-float,.storefront-shell-back){top:calc(var(--hab-shell-viewport-top,0px) + var(--hab-shell-viewport-height,100dvh) - var(--hab-shell-bottom,0px) - var(--hab-shell-tool-lift,0px) - 74px)}
 body.hab-shell-overlays:is(.drawer-open,:has(.search-layer:not([hidden])))>.hab-support-launch{top:calc(var(--hab-shell-viewport-top,0px) + var(--hab-shell-viewport-height,100dvh) - var(--hab-shell-bottom,0px) - var(--hab-shell-tool-lift,0px) - 56px)}
}

/* The account iframe scrolls inside the available space rather than under navigation. */
body.hab-shell-overlays .hab-one-overlay{
 z-index:12001;top:calc(var(--hab-shell-viewport-top,0px) + var(--hab-shell-top,0px));bottom:auto;
 height:var(--hab-shell-room);max-height:var(--hab-shell-room);padding:12px;box-sizing:border-box;
}
body.hab-shell-overlays .hab-one-dialog{max-height:100%;min-height:0;box-sizing:border-box}
body.hab-shell-overlays .hab-one-dialog:has(.hab-one-frame-wrap:not([hidden])){display:flex;flex-direction:column;height:100%;overflow:hidden}
body.hab-shell-overlays .hab-one-frame-wrap{flex:1;min-height:0;height:100%;max-height:100%;box-sizing:border-box;overflow:hidden}
body.hab-shell-overlays .hab-one-frame{min-height:0;height:100%}

/* Native dialogs own their top layer. Shared chrome is mounted inside them,
   so it remains visible and reachable without defeating modal focus isolation. */
body.hab-shell-overlays dialog.hab-shell-preview[open]{
 position:fixed;inset:var(--hab-shell-viewport-top,0px) 0 auto;margin:0;width:100%;max-width:100%;
 height:var(--hab-shell-viewport-height,100dvh);max-height:var(--hab-shell-viewport-height,100dvh);
 padding:0;border:0;border-radius:0;display:flex;flex-direction:column;gap:0;overflow:hidden;box-sizing:border-box;
}
body.hab-shell-overlays dialog.hab-shell-preview>.hab-modal-shell-top,
body.hab-shell-overlays dialog.hab-shell-preview>.hab-modal-shell-bottom{
 position:relative;flex:0 0 auto;width:100%;min-width:0;max-width:100%;margin:0;padding:0;z-index:30;
}
body.hab-shell-overlays dialog.hab-shell-preview>.hab-modal-shell-top{order:-100}
body.hab-shell-overlays dialog.hab-shell-preview>.hab-modal-shell-bottom{order:100}
body.hab-shell-overlays .hab-modal-shell-top>:is(.site-header,.storefront-shell-header){
 position:relative!important;inset:auto!important;width:100%;margin:0;transform:none;z-index:auto;
}
body.hab-shell-overlays .hab-modal-shell-bottom>.mobile-command{
 position:relative!important;inset:auto!important;width:100%;max-width:100%;height:auto;margin:0;transform:none;z-index:auto;box-sizing:border-box;
}
/* Floating return/support tools remain in the active layer without adding a
   second toolbar. The scroll region can always move a field above their area. */
body.hab-shell-overlays:is(.smart-is-open,.browse-vehicle-is-open)>:is(.hab-support-launch,.journey-back-float,.storefront-shell-back),
html.hab-one-open body.hab-shell-overlays>:is(.hab-support-launch,.journey-back-float,.storefront-shell-back){
 z-index:12003;display:flex!important;visibility:visible;pointer-events:auto;bottom:auto;
}
body.hab-shell-overlays:is(.smart-is-open,.browse-vehicle-is-open)>:is(.journey-back-float,.storefront-shell-back),
html.hab-one-open body.hab-shell-overlays>:is(.journey-back-float,.storefront-shell-back){
 top:calc(var(--hab-shell-viewport-top,0px) + var(--hab-shell-viewport-height,100dvh) - var(--hab-shell-bottom,0px) - var(--hab-shell-tool-lift,0px) - 74px);
}
body.hab-shell-overlays:is(.smart-is-open,.browse-vehicle-is-open)>.hab-support-launch,
html.hab-one-open body.hab-shell-overlays>.hab-support-launch{
 top:calc(var(--hab-shell-viewport-top,0px) + var(--hab-shell-viewport-height,100dvh) - var(--hab-shell-bottom,0px) - var(--hab-shell-tool-lift,0px) - 56px);
}
body.hab-shell-overlays dialog.hab-shell-preview>.hab-modal-shell-tools{
 position:absolute;inset-inline:0;bottom:calc(var(--hab-shell-bottom,0px) + var(--hab-shell-tool-lift,0px) + 10px);
 height:64px;min-height:0;margin:0;padding:0;z-index:31;pointer-events:none;
}
body.hab-shell-overlays .hab-modal-shell-tools>:is(.hab-support-launch,.journey-back-float,.storefront-shell-back){
 position:absolute;top:auto;bottom:0;margin:0;z-index:auto;display:flex!important;visibility:visible;pointer-events:auto;
}
body.hab-shell-overlays .hab-modal-shell-tools>.hab-support-launch{right:max(14px,env(safe-area-inset-right));left:auto}
body.hab-shell-overlays .hab-modal-shell-tools>.journey-back-float{left:max(12px,env(safe-area-inset-left));right:auto}
body.hab-shell-overlays .hab-modal-shell-tools>.storefront-shell-back{inset-inline-end:max(14px,env(safe-area-inset-left))}
body.hab-shell-overlays:is(.smart-is-open,.browse-vehicle-is-open) :is(.smart-scroll,.browse-vehicle-content),
body.hab-shell-overlays dialog.hab-shell-preview>:is(.smart-preview-scroll,.support-body,.catalog-details-body){
 padding-bottom:max(80px,calc(80px + var(--hab-shell-tool-lift,0px)));scroll-padding-bottom:88px;
}
body.hab-shell-overlays dialog.hab-shell-preview>.smart-preview-scroll{
 flex:1 1 0;min-height:0;overflow:auto;overscroll-behavior:contain;scroll-padding-block:16px;
}
body.hab-shell-overlays dialog.catalog-details-sheet[data-product-info-sheet].hab-shell-preview>.catalog-details-header{flex:0 0 auto;min-height:48px;padding-block:5px}
body.hab-shell-overlays dialog.catalog-details-sheet[data-product-info-sheet].hab-shell-preview>.catalog-details-body{flex:1 1 0;min-height:0;overflow:auto;overscroll-behavior:contain;scroll-padding-block:16px}
body.hab-shell-overlays dialog.hab-shell-preview>.smart-preview-header,
body.hab-shell-overlays dialog.hab-shell-preview>.smart-preview-journey,
body.hab-shell-overlays dialog.hab-shell-preview>.smart-preview-tabs,
body.hab-shell-overlays dialog.hab-shell-preview>.smart-preview-stages{flex:0 0 auto}
body.hab-shell-overlays dialog.hab-shell-preview>.smart-preview-header{min-height:48px;padding-block:5px}
body.hab-shell-overlays dialog.hab-shell-preview>.smart-preview-header .hab-smart-mark{width:27px;height:27px}
body.hab-shell-overlays dialog.hab-shell-preview>.smart-preview-header .smart-preview-brand b{font-size:1rem}
body.hab-shell-overlays dialog.hab-shell-preview>.smart-preview-header .smart-preview-header-actions button{min-height:38px}
/* A current saved-car row is already present in shared chrome. Cart edits keep
   their disabled row because that row belongs to the saved item, not the header. */
body.hab-shell-overlays dialog.hab-shell-preview:has(.hab-modal-shell-top .store-vehicle-status--saved)>.smart-preview-journey:has(>.store-vehicle-status--saved):not(:has([disabled])){display:none!important}

/* Support keeps its own form and status/footer owners. Only its outer viewport changes. */
body.hab-shell-overlays dialog.hab-support-window.hab-shell-preview>.support-body{
 flex:1 1 0;min-height:0;overflow:auto;overscroll-behavior:contain;scroll-padding-block:16px;
}
body.hab-shell-overlays dialog.hab-support-window.hab-shell-preview>.support-foot{position:relative;flex:none;margin:0}
body.hab-shell-overlays dialog.hab-support-window.hab-shell-preview>:is(.support-head,.support-steps,[data-support-context],.support-error,.support-foot){flex:0 0 auto}
body.hab-shell-overlays dialog.hab-support-window.hab-shell-preview>.support-body :is(input,select,textarea){scroll-margin-block:16px}

@media(min-width:721px){
 body.hab-shell-overlays dialog.hab-shell-preview>:is(.smart-preview-header,.smart-preview-journey,.smart-preview-tabs,.smart-preview-stages,.smart-preview-scroll){width:min(1080px,100%);margin-inline:auto;box-sizing:border-box}
 body.hab-shell-overlays dialog.hab-support-window.hab-shell-preview>:is(.support-head,.support-steps,[data-support-context],.support-body,.support-error,.support-foot){width:min(860px,100%);margin-inline:auto;box-sizing:border-box}
 body.hab-shell-overlays dialog.catalog-details-sheet[data-product-info-sheet].hab-shell-preview>:is(.catalog-details-header,.catalog-details-body){width:min(920px,100%);margin-inline:auto;box-sizing:border-box}
}
@media(max-width:720px){
 body.hab-shell-overlays.care-center-open>.mobile-command{display:grid}
 body.hab-shell-overlays .smart-panel.smart-panel,
 body.hab-shell-overlays .browse-vehicle-panel.browse-vehicle-panel{
  inset:calc(var(--hab-shell-viewport-top,0px) + var(--hab-shell-top,0px)) 0 auto;
  width:100%;height:var(--hab-shell-room);max-height:var(--hab-shell-room);margin:0;border:0;border-radius:0;
 }
 body.hab-shell-overlays .hab-one-overlay{padding:0}
 body.hab-shell-overlays .hab-one-dialog{width:100%;max-height:100%;border-radius:0}
 body.hab-shell-overlays .hab-one-dialog.hab-one-account-mode{width:100%;height:100%}
 body.hab-shell-overlays .smart-panel .smart-head,
 body.hab-shell-overlays .browse-vehicle-panel .smart-head{min-height:48px;padding-block:4px}
 body.hab-shell-overlays .browse-vehicle-panel .smart-head{grid-template-rows:40px}
 body.hab-shell-overlays .browse-vehicle-panel .smart-brand b{font-size:1.125rem}
 body.hab-shell-overlays .smart-panel .smart-head .sheet-drag-handle{display:none}
 body.hab-shell-overlays .smart-panel .smart-quick-menu,
 body.hab-shell-overlays .smart-panel .smart-context{top:48px}
}

/* Legacy compact viewport sizing is retained for short non-keyboard layouts.
   The explicit keyboard rules below release the complete typing workspace. */
body.hab-shell-overlays:is(.hab-shell-keyboard,:has(.smart-panel.keyboard-open),:has(.hab-support-window[data-keyboard=true])) .site-header .utility{display:none}
body.hab-shell-overlays:is(.hab-shell-keyboard,:has(.smart-panel.keyboard-open),:has(.hab-support-window[data-keyboard=true])) .site-header .nav-shell{height:48px;min-height:48px;padding-block:2px}
body.hab-shell-overlays:is(.hab-shell-keyboard,:has(.smart-panel.keyboard-open),:has(.hab-support-window[data-keyboard=true])) .site-header .brand img{width:72px;height:36px}
body.hab-shell-overlays:is(.hab-shell-keyboard,:has(.smart-panel.keyboard-open),:has(.hab-support-window[data-keyboard=true])) .store-vehicle-context{margin-block:0;padding-block:3px;min-height:38px}
body.hab-shell-overlays:is(.hab-shell-keyboard,:has(.smart-panel.keyboard-open),:has(.hab-support-window[data-keyboard=true])) .mobile-command{min-height:54px;padding-block:4px;gap:4px}
body.hab-shell-overlays:is(.hab-shell-keyboard,:has(.smart-panel.keyboard-open),:has(.hab-support-window[data-keyboard=true])) .mobile-command>button{min-height:44px;padding-block:2px}
body.hab-shell-overlays:is(.hab-shell-keyboard,:has(.smart-panel.keyboard-open),:has(.hab-support-window[data-keyboard=true])) .mobile-command>button span{font-size:.75rem}
body.hab-shell-overlays:is(.hab-shell-keyboard,:has(.smart-panel.keyboard-open),:has(.hab-support-window[data-keyboard=true])) .mobile-command>button img{width:20px;height:20px}
body.hab-shell-overlays:is(.hab-shell-keyboard,:has(.smart-panel.keyboard-open),:has(.hab-support-window[data-keyboard=true])) .storefront-shell-assurance{display:none}
body.hab-shell-overlays:is(.hab-shell-keyboard,:has(.smart-panel.keyboard-open),:has(.hab-support-window[data-keyboard=true])) .storefront-shell-nav{height:48px;min-height:48px;padding-block:2px}
body.hab-shell-overlays:is(.hab-shell-keyboard,:has(.smart-panel.keyboard-open),:has(.hab-support-window[data-keyboard=true])) .storefront-shell-brand img{width:72px;height:36px}
body.hab-shell-overlays:is(.hab-shell-keyboard,:has(.smart-panel.keyboard-open),:has(.hab-support-window[data-keyboard=true])) .storefront-shell-car{margin-block:0;padding-block:3px;min-height:38px}
body.hab-shell-overlays:is(.hab-shell-keyboard,:has(.smart-panel.keyboard-open),:has(.hab-support-window[data-keyboard=true])) .storefront-shell-bottom>:is(a,button){min-height:44px;padding-block:2px}
body.hab-shell-overlays:is(.hab-shell-keyboard,:has(.smart-panel.keyboard-open),:has(.hab-support-window[data-keyboard=true])) .storefront-shell-bottom>:is(a,button) span{font-size:.75rem}
body.hab-shell-overlays:is(.hab-shell-keyboard,:has(.smart-panel.keyboard-open),:has(.hab-support-window[data-keyboard=true])) .storefront-shell-bottom>:is(a,button) img{width:20px;height:20px}

@media(max-width:360px){
 /* Render the narrow dock at its final width as soon as the advisor is in the HTML. */
 body.hab-shell-overlays .mobile-command,
 body .mobile-command:has(> .hab-consultant-trigger){padding-inline:6px;gap:4px;grid-template-columns:minmax(0,1.8fr) minmax(64px,.8fr) minmax(54px,.7fr)}
 body.hab-shell-overlays .mobile-command [data-consultant-label],
 body .mobile-command > .hab-consultant-trigger [data-consultant-label]{font-size:12px}
 body.hab-shell-overlays .site-header .header-actions{gap:3px}
 body.hab-shell-overlays .site-header .nav-shell{padding-inline:8px;gap:8px}
 body.hab-shell-overlays dialog.hab-shell-preview>.smart-preview-header{padding-inline:8px;gap:6px}
 body.hab-shell-overlays dialog.hab-shell-preview>.smart-preview-header .smart-preview-header-actions{gap:4px}
}
@media(prefers-reduced-motion:reduce){
 body.hab-shell-overlays :is(.hab-modal-shell-top,.hab-modal-shell-bottom){scroll-behavior:auto}
}

/* Smart product customization keeps its own brand and saved-car context first.
   The dialog's existing flex layout consumes the full viewport without a header gap. */
body.hab-shell-overlays dialog.hab-shell-preview.hab-shell-smart-product>.smart-preview-journey{display:block!important;padding:4px 10px}
body.hab-shell-overlays dialog.hab-shell-preview.hab-shell-smart-product>.smart-preview-journey .store-vehicle-status--saved{display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:7px;width:100%;min-height:46px;padding:0 8px;box-sizing:border-box;border:1px solid #74b58c;border-radius:14px;background:linear-gradient(125deg,#fff,#edf8ef 68%,#fff);box-shadow:inset 0 0 0 2px #ffffffb3;color:#193d29}
body.hab-shell-overlays dialog.hab-shell-preview.hab-shell-smart-product>.smart-preview-journey .store-vehicle-status--saved>.store-vehicle-confirm{display:grid;place-items:center;flex:none;width:28px;height:32px;min-width:0;border:1px solid #c6e4cf;border-radius:8px;background:#e4f3e8;color:#1d7040}
body.hab-shell-overlays dialog.hab-shell-preview.hab-shell-smart-product>.smart-preview-journey .store-vehicle-status--saved>.store-vehicle-confirm svg{width:21px;height:21px}
body.hab-shell-overlays dialog.hab-shell-preview.hab-shell-smart-product>.smart-preview-journey .store-vehicle-status--saved>.store-vehicle-copy{display:grid;flex:none;min-width:0;gap:1px;text-align:start;overflow-wrap:anywhere}
body.hab-shell-overlays dialog.hab-shell-preview.hab-shell-smart-product>.smart-preview-journey .store-vehicle-status--saved>.store-vehicle-copy small{font-size:11px;font-weight:600;line-height:1.3;color:#246b40}
body.hab-shell-overlays dialog.hab-shell-preview.hab-shell-smart-product>.smart-preview-journey .store-vehicle-status--saved>.store-vehicle-copy b{font-size:14px;font-weight:700;line-height:1.35;white-space:normal;color:#193326;unicode-bidi:plaintext}
body.hab-shell-overlays dialog.hab-shell-preview.hab-shell-smart-product>.smart-preview-journey .store-vehicle-status--saved>[data-product-edit-vehicle]{display:flex;align-items:center;justify-content:center;flex:none;min-width:44px;min-height:44px;margin:0;padding:4px 8px;border:1px solid #a7cbb3;border-radius:10px;background:#ffffffd9;color:#215b36;font:inherit;font-size:13px;line-height:1.25;cursor:pointer}
body.hab-shell-overlays dialog.hab-shell-preview.hab-shell-smart-product>.smart-preview-journey .store-vehicle-status--saved>[data-product-edit-vehicle] em{display:flex;align-items:center;justify-content:center;gap:4px;margin:0;padding:0;min-width:0;font:inherit;font-weight:600}
body.hab-shell-overlays dialog.hab-shell-preview.hab-shell-smart-product>.smart-preview-journey .store-vehicle-status--saved>[data-product-edit-vehicle]:focus-visible{outline:2px solid #216c3e;outline-offset:2px}

/* A live Smart journey owns its header from the cart through embedded checkout.
   Keep the approved desktop width and the shared bottom bar and tools. */
body.hab-shell-overlays.smart-is-open:has(.smart-panel.open:not([inert])){--hab-shell-top:0px;--hab-shell-room:max(0px,calc(var(--hab-shell-viewport-height,100dvh) - var(--hab-shell-bottom,0px)))}
body.hab-shell-overlays.smart-is-open:has(.smart-panel.open:not([inert]))>:is(.site-header,.storefront-shell-header){display:none!important}
body.hab-shell-overlays.smart-is-open .smart-panel.smart-panel.open:not([inert]){top:var(--hab-shell-viewport-top,0px);height:var(--hab-shell-room);max-height:var(--hab-shell-room)}
body.hab-shell-overlays.smart-is-open .smart-panel.open:not([inert])>.smart-head{min-height:54px;padding:5px 14px}
body.hab-shell-overlays.smart-is-open .smart-panel.open:not([inert])>.smart-head .hab-smart-mark{width:27px;height:27px}
body.hab-shell-overlays.smart-is-open .smart-panel.open:not([inert])>.smart-head .smart-brand b{font-size:1rem}
body.hab-shell-overlays.smart-is-open .smart-panel.open:not([inert])>.smart-head .smart-brand small{display:none}
body.hab-shell-overlays.smart-is-open .smart-panel.open:not([inert])>:is(.smart-quick-menu,.smart-context){top:54px}
/* The existing PPF vehicle owner is retained. Only its saved-card dimensions
   join the shared compact context; an unselected car keeps its distinct state. */
body.hab-shell-overlays dialog.hab-shell-preview.hab-shell-smart-product>.smart-preview-journey>.ppf-fit[data-ppf-fit-context]{padding:0}
body.hab-shell-overlays dialog.hab-shell-preview.hab-shell-smart-product>.smart-preview-journey .store-vehicle-status--pending{display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:7px;width:100%;min-height:46px;padding:0 8px;box-sizing:border-box;border:1px solid #d5abb4;border-radius:14px;background:#fff7f8;color:#8b2438}
body.hab-shell-overlays dialog.hab-shell-preview.hab-shell-smart-product>.smart-preview-journey .store-vehicle-status--pending>.store-vehicle-prompt{display:grid;place-items:center;flex:none;width:28px;height:32px;min-width:0;color:#98253b}
body.hab-shell-overlays dialog.hab-shell-preview.hab-shell-smart-product>.smart-preview-journey .store-vehicle-status--pending>.store-vehicle-copy{display:grid;min-width:0;gap:1px;text-align:start;overflow-wrap:anywhere}
body.hab-shell-overlays dialog.hab-shell-preview.hab-shell-smart-product>.smart-preview-journey .store-vehicle-status--pending>.store-vehicle-copy :is(strong,b){font-size:13px;line-height:1.35;color:#8b2438}
body.hab-shell-overlays dialog.hab-shell-preview.hab-shell-smart-product>.smart-preview-journey .store-vehicle-status--pending>.store-vehicle-copy .store-vehicle-description{display:none}
body.hab-shell-overlays dialog.hab-shell-preview.hab-shell-smart-product>.smart-preview-journey .store-vehicle-status--pending>.store-vehicle-actions{display:flex;align-items:center;grid-column:auto;padding:0;border:0}
body.hab-shell-overlays dialog.hab-shell-preview.hab-shell-smart-product>.smart-preview-journey .store-vehicle-status--pending [data-product-edit-vehicle]{display:flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;max-width:88px;margin:0;padding:4px 8px;border:1px solid #c51f36;border-radius:10px;background:#c51f36;color:#fff;font:inherit;font-size:12px;line-height:1.3;cursor:pointer}
body.hab-shell-overlays dialog.hab-shell-preview.hab-shell-smart-product>.smart-preview-journey .store-vehicle-status--pending [data-product-edit-vehicle] em{margin:0;padding:0;font:inherit;font-weight:600}

/* 60% of the former 64/56px visual size; retain a comfortable touch target. */
body .journey-back.journey-back-float{width:38.4px;height:38.4px;min-width:0;min-height:38.4px;align-items:center;justify-content:center;gap:1px;padding:3px;font-size:10px;line-height:1.2;box-sizing:border-box;box-shadow:0 3px 10px #0002}
body .journey-back.journey-back-float svg{width:14.4px;height:14.4px}
body .journey-back.journey-back-float::after{content:"";position:absolute;left:50%;top:50%;width:44px;height:44px;transform:translate(-50%,-50%);border-radius:50%}
@media(max-width:720px){body .journey-back.journey-back-float{width:33.6px;height:33.6px;min-height:33.6px;font-size:9px}}

/* Manual FIT LOCK owns the whole visible viewport. Its original close/save
   controls restore the store; outer navigation must not consume its workspace. */
body.hab-shell-overlays.browse-vehicle-is-open>:is(.site-header,.storefront-shell-header,.mobile-command,.hab-support-launch,.journey-back-float,.storefront-shell-back){display:none!important}
body.hab-shell-overlays.browse-vehicle-is-open .browse-vehicle-panel.browse-vehicle-panel{
 z-index:12004;inset:var(--browse-viewport-top,0px) 0 auto;
 width:100%;height:var(--browse-viewport-height,100dvh);max-height:var(--browse-viewport-height,100dvh);
 margin:0;padding:0;border:0;border-radius:0;box-shadow:none;box-sizing:border-box;overflow:hidden;
}
body.hab-shell-overlays.browse-vehicle-is-open .browse-vehicle-panel>.smart-head{
 flex:0 0 auto;min-height:54px;grid-template-rows:44px;
 padding:max(5px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) 5px max(14px,env(safe-area-inset-left));
}
body.hab-shell-overlays.browse-vehicle-is-open .browse-vehicle-panel>.browse-vehicle-content{
 flex:1 1 0;min-height:0;overflow:auto;
 padding:0 max(12px,env(safe-area-inset-right)) max(22px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));
 scroll-padding-block:16px max(22px,env(safe-area-inset-bottom));
}
body.hab-shell-overlays.browse-vehicle-is-open .browse-vehicle-panel .smart-vehicle-form{max-width:680px;margin-inline:auto}

/* Typing owns the visible viewport. Navigation returns with keyboard dismissal;
   form fields, validation, values and each surface's scroll owner are preserved. */
body.hab-shell-overlays.hab-shell-keyboard{
 --hab-shell-top:0px!important;--hab-shell-bottom:0px!important;
 --hab-shell-room:var(--hab-shell-viewport-height,100dvh)!important;
}
html body.hab-shell-overlays.hab-shell-keyboard>:is(.site-header,.storefront-shell-header,.mobile-command,.storefront-shell-bottom,.journey-back-float,.storefront-shell-back,.hab-support-launch),
html body.hab-shell-overlays.hab-shell-keyboard.hab-shell-keyboard dialog.hab-shell-preview>:is(.hab-modal-shell-top,.hab-modal-shell-bottom,.hab-modal-shell-tools),
html body.hab-shell-overlays.hab-shell-keyboard .hab-one-close,
html body.hab-shell-overlays.hab-shell-keyboard .smart-panel>:is(.smart-head,.smart-context,.smart-quick-menu),
html body.hab-shell-overlays.hab-shell-keyboard .browse-vehicle-panel>.smart-head,
html body.hab-shell-overlays.hab-shell-keyboard.hab-shell-keyboard dialog.hab-shell-preview>:is(.smart-preview-header,.smart-preview-journey,.smart-preview-tabs,.smart-preview-stages,.catalog-details-header,.support-head,.support-steps,.support-foot,[data-support-context]){
 display:none!important;pointer-events:none!important;
}
html body.hab-shell-overlays.hab-shell-keyboard :is(.hab-one-overlay,.smart-panel.smart-panel,.browse-vehicle-panel.browse-vehicle-panel){
 top:var(--hab-shell-viewport-top,0px)!important;bottom:auto!important;
 height:var(--hab-shell-viewport-height,100dvh)!important;max-height:var(--hab-shell-viewport-height,100dvh)!important;
 padding:0!important;margin:0!important;border-radius:0;
}
html body.hab-shell-overlays.hab-shell-keyboard .hab-one-dialog{height:100%;max-height:100%;border-radius:0}
html body.hab-shell-overlays.hab-shell-keyboard .hab-one-frame-wrap{padding-top:0!important}
html body.hab-shell-overlays.hab-shell-keyboard :is(.smart-scroll,.browse-vehicle-content,.smart-preview-scroll,.support-body,.catalog-details-body){
 padding-bottom:16px!important;scroll-padding-block:12px!important;
}
/* Checkout/customizer actions remain in the scroll flow, never over the field. */
html body.hab-shell-overlays.hab-shell-keyboard :is([data-product-page-chrome-stack],.catalog-nav,.catalog-tabs,.screen-build-navigation,.hab-customizer-bar,.screen-buybar,.product-buybar,.hc-header,.hd-footer,.hc-submit){
 position:static!important;inset:auto!important;transform:none!important;
}

/* The storefront's customer entry, separate from checkout and gift frames. */
.hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) {
  --one-entry-paper: #fffbf7;
  --one-entry-ink: #301a27;
  --one-entry-red: #ad2145;
  --one-entry-pale: #eedadf;
}

.hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-dialog:not(.hab-one-account-mode) {
  width: min(100%, 750px);
  border: 1px solid #fff4;
  border-radius: clamp(20px, 4vw, 32px);
  box-shadow: 0 26px 70px #10070b82;
  scroll-padding-block: 18px;
}

.hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-dialog:not(.hab-one-account-mode) > .hab-one-close {
  z-index: 2;
  inset-block-start: 11px;
  inset-inline-end: 11px;
  width: 44px;
  height: 44px;
  color: var(--one-entry-ink);
  background: var(--one-entry-paper);
  border: 1px solid #5632442e;
  box-shadow: 0 4px 16px #270c1d16;
}

.hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-intro {
  position: relative;
  isolation: isolate;
  display: grid;
  justify-items: stretch;
  align-content: start;
  gap: 11px;
  padding: 24px clamp(14px, 4vw, 22px) 22px;
  background: radial-gradient(ellipse at 2% 18%, #653044, transparent 62%), linear-gradient(145deg, #52243a, #1d1821 83%);
  color: #fff7f5;
  text-align: start;
  font-family: var(--hab-font-family), Tahoma, Arial, sans-serif;
}

.hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-intro > .hab-one-symbol {
  display: none;
}

.hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-intro > .hab-one-mark {
  width: fit-content;
  margin-block-end: 1px;
  margin-inline-end: 52px;
  font-size: clamp(29px, 7vw, 41px);
  line-height: 1;
}

.hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-intro > .hab-one-mark span {
  color: #ff7594;
}

.hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-intro > h2 {
  max-width: 19ch;
  margin: 0;
  color: #fff9f6;
  font-size: clamp(23px, 6vw, 33px);
  font-weight: 800;
  line-height: 1.36;
  text-wrap: balance;
}

.hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-intro > [data-hab-one-desc] {
  max-width: 33ch;
  margin: 0;
  color: #f0dce2;
  font-size: .875rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-intro > .hab-one-entry-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 1px 0 3px;
  padding: 0;
  list-style: none;
}

.hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-entry-benefits li {
  min-inline-size: 0;
  padding: 5px 8px;
  border: 1px solid #fff3;
  border-radius: 7px;
  color: #fff0f5;
  font-size: .75rem;
  line-height: 1.45;
}

.hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-entry-benefits li > span {
  display: none;
}

.hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-intro > .hab-one-enter {
  min-height: 50px;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 9px 14px;
  border: 1px solid #ffacbe85;
  border-radius: 12px;
  background: var(--one-entry-red);
  color: white;
  box-shadow: none;
  line-height: 1.55;
}

.hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-intro > .hab-one-enter:focus-visible {
  outline: 3px solid #ee83a1;
  outline-offset: 3px;
}

.hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-intro > small {
  justify-self: center;
  color: var(--one-entry-pale);
  text-align: center;
  line-height: 1.5;
}

@media (min-width: 700px) {
  .hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-intro {
    grid-template-columns: minmax(0, .98fr) minmax(0, 1fr);
    grid-template-areas: "mark google" "title status" "desc enter" "benefits note";
    column-gap: 52px;
    row-gap: 12px;
    align-items: start;
    padding: 52px 36px 36px;
  }

  .hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-intro::before {
    content: "";
    position: absolute;
    inset-block: 10px;
    inset-inline-end: 10px;
    width: calc(50% - 10px);
    z-index: -1;
    border-radius: 22px;
    background: var(--one-entry-paper);
    pointer-events: none;
  }

  .hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-intro > .hab-one-mark { grid-area: mark; margin-inline-end: 0; }
  .hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-intro > h2 { grid-area: title; }
  .hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-intro > [data-hab-one-desc] { grid-area: desc; }
  .hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-intro > .hab-one-entry-benefits { grid-area: benefits; display: grid; gap: 5px; }
  .hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-entry-benefits li { padding: 5px 0; border: 0; border-block-start: 1px solid #fff2; border-radius: 0; }
  .hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-entry-benefits li > strong { display: block; font-size: .85rem; }
  .hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-entry-benefits li > span { display: block; color: var(--one-entry-pale); line-height: 1.5; }
  .hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-intro > [data-hab-one-google-wrap] { grid-area: google; }
  .hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-intro > [data-hab-one-google-status] { grid-area: status; color: #89203d; }
  .hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-intro > .hab-one-enter { grid-area: enter; }
  .hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-intro > small { grid-area: note; color: #66515a; }
}

/* Public HAB ONE overlay journey. */
.hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"], [src="/account?hab_one=1&lang=en"])) .hab-one-intro > :is(.hab-one-entry-wait, .hab-one-entry-fallback) {
  margin: 0;
  border-radius: 8px;
  color: #fff5f8;
  text-align: center;
  font-size: .875rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"], [src="/account?hab_one=1&lang=en"])) .hab-one-intro > .hab-one-entry-wait:not(:empty) {
  padding: 7px 10px;
  background: #ffffff18;
}

.hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"], [src="/account?hab_one=1&lang=en"])) .hab-one-intro > .hab-one-entry-wait:empty { display: none; }

.hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"], [src="/account?hab_one=1&lang=en"])) .hab-one-intro > .hab-one-entry-fallback {
  display: grid;
  place-items: center;
  min-block-size: 44px;
  padding: 5px 10px;
  border: 1px solid #fff5;
  background: transparent;
  font-family: inherit;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: .24em;
  cursor: pointer;
}

.hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"], [src="/account?hab_one=1&lang=en"])) .hab-one-intro > .hab-one-entry-fallback:focus-visible {
  outline: 3px solid #ff90ab;
  outline-offset: 3px;
}

@media (min-width: 700px) {
  .hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"], [src="/account?hab_one=1&lang=en"])) .hab-one-intro:has(.hab-one-entry-wait:not(:empty)) {
    grid-template-areas: "mark google" "title status" "desc enter" "benefits wait" "benefits fallback" "benefits note";
    row-gap: 7px;
  }

  .hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"], [src="/account?hab_one=1&lang=en"])) .hab-one-intro > .hab-one-entry-wait {
    grid-area: wait;
    color: #633149;
  }

  .hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"], [src="/account?hab_one=1&lang=en"])) .hab-one-intro > .hab-one-entry-wait:not(:empty) { background: #f7eef2; }

  .hab-one-overlay[data-hab-one-public-intro]:has(.hab-one-frame:is([src="/account?hab_one=1"], [src="/account?hab_one=1&lang=en"])) .hab-one-intro > .hab-one-entry-fallback {
    grid-area: fallback;
    border-color: #e2cfd8;
    background: #fff;
    color: #6d2347;
  }
}

/* Select the public card from its iframe request before form measurement. */
.hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) {
  --one-card-paper: #fffdfa;
  --one-card-ink: #291c25;
  --one-card-muted: #614c5a;
  --one-card-frame-bar: 52px;
  padding: 14px max(12px, env(safe-area-inset-right)) 14px max(12px, env(safe-area-inset-left));
}

.hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) > .hab-one-backdrop {
  background: #19131d63;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  animation: hab-one-card-backdrop-in 170ms ease-out both;
}

.hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-dialog {
  max-height: 100%;
  border: 1px solid #e6d6df;
  border-radius: 25px;
  background: var(--one-card-paper);
  box-shadow: 0 14px 44px #24101c42, 0 2px 5px #24101c19;
  scrollbar-width: thin;
  transition: none;
  animation: hab-one-card-in 190ms cubic-bezier(.2, .75, .25, 1) both;
}

.hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-dialog.hab-one-account-mode {
  display: flex;
  flex-direction: column;
  width: min(100%, 820px);
  height: auto;
  max-height: 100%;
  padding-block-start: var(--one-card-frame-bar);
  overflow: hidden;
}

.hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-dialog.hab-one-account-mode::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: var(--one-card-frame-bar);
  border-block-end: 1px solid #f0e6eb;
  background: var(--one-card-paper);
  pointer-events: none;
}

.hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-frame-wrap {
  flex: 0 1 auto;
  min-height: 0;
  height: var(--hab-one-frame-content-height, 460px);
  max-height: none;
  padding: 0;
  background: var(--one-card-paper);
  overflow: hidden;
  animation: hab-one-card-backdrop-in 160ms ease-out both;
}

.hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-frame {
  background: var(--one-card-paper);
}

.hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-dialog > .hab-one-close {
  z-index: 4;
  inset-block-start: 4px;
  inset-inline-end: 8px;
  width: 44px;
  height: 44px;
  min-height: 44px;
  border-color: #e5d7df;
  background: var(--one-card-paper);
  color: var(--one-card-ink);
}

.hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-dialog > .hab-one-close:focus-visible {
  outline: 3px solid #9c1d40;
  outline-offset: 1px;
}

.hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-dialog.hab-one-dialog:has(> .hab-one-card-success) {
  display: grid;
  width: min(100%, 420px);
  height: auto;
  padding-block-start: 0;
  color: var(--one-card-ink);
}

.hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-dialog:has(> .hab-one-card-success)::before {
  content: none;
}

.hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-dialog:has(> .hab-one-card-success) > :is(.hab-one-intro, .hab-one-frame-wrap) {
  display: none !important;
}

.hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-card-success[role="status"] {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 32px 20px 27px;
  color: var(--one-card-ink);
  text-align: center;
  line-height: 1.5;
}

.hab-one-card-success[role="status"] :is(svg, .hab-one-card-success-icon) {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e8f3ed;
  color: #246246;
  font-size: 1.5rem;
  font-weight: 800;
}

.hab-one-card-success[role="status"] :is(h2, strong) {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
}

.hab-one-card-success[role="status"] :is(p, small) {
  margin: 0;
  color: var(--one-card-muted);
  font-size: .875rem;
}

.hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"]))[data-hab-one-public-card="closing"] > .hab-one-backdrop {
  animation: hab-one-card-backdrop-out 145ms ease-in both;
}

.hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"]))[data-hab-one-public-card="closing"] .hab-one-dialog {
  animation: hab-one-card-out 145ms ease-in both;
}

@keyframes hab-one-card-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes hab-one-card-backdrop-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes hab-one-card-in {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: none; }
}
@keyframes hab-one-card-out {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(6px) scale(.99); }
}

@media (max-width: 720px) {
  .hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) {
    padding-block: 9px;
  }

  .hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-dialog {
    border-radius: 20px;
  }
}

html body.hab-shell-overlays.hab-shell-keyboard .hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) {
  align-items: start;
  padding: 5px max(12px, env(safe-area-inset-right)) 5px max(12px, env(safe-area-inset-left)) !important;
}

html body.hab-shell-overlays.hab-shell-keyboard .hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-dialog.hab-one-account-mode {
  height: auto;
  max-height: 100%;
  border-radius: 16px;
}

html body.hab-shell-overlays.hab-shell-keyboard .hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-dialog.hab-one-account-mode > .hab-one-close {
  display: grid !important;
  pointer-events: auto !important;
}

@media (prefers-reduced-motion: reduce) {
  .hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) > .hab-one-backdrop,
  .hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) :is(.hab-one-dialog, .hab-one-frame-wrap) {
    animation: none !important;
    transition: none;
  }
}

/* Mobile HAB ONE card over the storefront. */
.hab-one-dialog > .hab-one-card-brand { display: none; }

@media (max-width: 720px) {
  .hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) {
    --one-card-side: clamp(24px, 6.2vw, 28px);
    --one-card-frame-bar: 48px;
    --one-card-portion: .73;
    padding-inline: max(var(--one-card-side), env(safe-area-inset-left), env(safe-area-inset-right));
  }

  body.hab-shell-overlays:has(> .hab-one-overlay:not([hidden]) > .hab-one-dialog iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) > :is(.storefront-shell-back, .journey-back-float, .hab-support-launch) {
    z-index: 12000;
  }

  .hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) > .hab-one-backdrop {
    background: #24152854;
  }

  .hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-dialog {
    /* Base account-mode width stays bounded during the frame's first paint. */
    width: min(100%, 420px);
    max-height: min(100%, calc(var(--hab-shell-room, 100dvh) * var(--one-card-portion)));
    border-radius: 19px;
    box-shadow: 0 16px 40px #27112949, 0 2px 7px #27112924;
  }

  .hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-dialog.hab-one-account-mode::before {
    box-sizing: border-box;
    border-block-end-color: #eee2e8;
    background: #fbf4f7;
  }

  .hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-dialog.hab-one-account-mode:not(:has(> .hab-one-card-success)) > .hab-one-card-brand {
    position: absolute;
    z-index: 1;
    inset-block-start: 0;
    inset-inline-start: 14px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: var(--one-card-frame-bar);
    color: var(--one-card-ink);
    font-size: 1rem;
    font-weight: 850;
    line-height: 1;
    letter-spacing: .015em;
    pointer-events: none;
  }

  .hab-one-card-brand:dir(rtl) { flex-direction: row-reverse; }
  .hab-one-card-brand > em { color: #9c1d40; font-style: normal; }

  .hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-dialog.hab-one-account-mode > .hab-one-close {
    inset-block-start: 2px;
    inset-inline-end: 5px;
    border: 0;
    background: transparent;
    font-size: 24px;
  }

  .hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-dialog.hab-one-account-mode > .hab-one-close:hover {
    background: #f4e6ed;
  }

  .hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-dialog .hab-one-intro {
    gap: 8px;
    padding: 21px 16px 16px;
  }

  .hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-dialog .hab-one-intro > .hab-one-mark {
    margin-inline-end: 48px;
    font-size: 24px;
  }

  .hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-dialog .hab-one-intro > h2 {
    margin-inline-end: 27px;
    font-size: clamp(20px, 5.2vw, 23px);
    line-height: 1.32;
  }

  .hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-dialog .hab-one-intro > .hab-one-entry-benefits {
    display: none;
  }

  html body.hab-shell-overlays.hab-shell-keyboard .hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) {
    padding: 5px max(var(--one-card-side), env(safe-area-inset-left), env(safe-area-inset-right)) !important;
  }

  html body.hab-shell-overlays.hab-shell-keyboard .hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) .hab-one-dialog.hab-one-account-mode {
    max-height: 100%;
  }
}

@media (max-width: 720px) and (max-height: 600px) {
  .hab-one-overlay:has(iframe.hab-one-frame:is([src="/account?hab_one=1"],[src="/account?hab_one=1&lang=en"])) {
    --one-card-portion: .8;
  }
}
