/* R22: celular deitado. Apenas apresentação; jornada e efeitos permanecem intactos. */
@media (orientation:landscape) and (max-height:500px) and (max-width:1100px){
  /* Gestão: a navegação recolhida deixa a área útil para o conteúdo. */
  body:not(.balcao-active)>#sidebar{width:235px;height:100dvh;padding:16px 14px;transform:translateX(-100%);overflow-y:auto;overscroll-behavior:contain}
  body:not(.balcao-active).menu-open>#sidebar{transform:translateX(0)}
  body:not(.balcao-active) .app{margin-left:0}
  body:not(.balcao-active) .mobile-menu{display:block;min-width:44px;min-height:44px}
  body:not(.balcao-active) .mobile-shade{position:fixed;inset:0;background:#10271e66;z-index:29}
  body:not(.balcao-active).menu-open .mobile-shade{display:block}
  body:not(.balcao-active)>#sidebar .brand{margin:0 12px 16px}
  body:not(.balcao-active)>#sidebar .workspace-label{margin-bottom:8px}
  body:not(.balcao-active)>#sidebar nav{gap:2px;flex-shrink:0}
  body:not(.balcao-active)>#sidebar .nav-item{min-height:44px;padding:8px 14px}
  body:not(.balcao-active)>#sidebar .sidebar-bottom{padding:16px 14px 4px;flex-shrink:0}
  body:not(.balcao-active) .app>header:not(#bc-header){height:56px;padding:0 max(12px,env(safe-area-inset-right)) 0 max(12px,env(safe-area-inset-left));gap:10px}
  body:not(.balcao-active) .shop-icon,body:not(.balcao-active) .profile>div,body:not(.balcao-active) .search-label,body:not(.balcao-active) .search-trigger kbd{display:none}
  body:not(.balcao-active) .context{gap:8px;min-width:0}
  body:not(.balcao-active) .header-actions{gap:6px}
  body:not(.balcao-active) .search-trigger,body:not(.balcao-active) .attention-trigger{min-width:44px;min-height:44px;padding:4px;border:0;background:transparent}
  body:not(.balcao-active) main{padding:18px max(16px,env(safe-area-inset-right)) 16px max(16px,env(safe-area-inset-left))}
  body:not(.balcao-active) .page-heading{margin-bottom:18px}
  body:not(.balcao-active) .page-heading h1{font-size:25px}
  body:not(.balcao-active) .metrics{grid-template-columns:repeat(4,minmax(0,1fr));padding:16px 0;gap:0}
  body:not(.balcao-active) .metric{padding:0 14px}
  body:not(.balcao-active) .metric:nth-child(2){border-right:1px solid var(--line)}
  body:not(.balcao-active) .metric:last-child{border:0}
  /* Balcão: contexto compacto e faixa contínua em uma única linha. */
  #bc-header{height:56px;min-height:56px;display:flex;padding:4px max(12px,env(safe-area-inset-right)) 4px max(12px,env(safe-area-inset-left));gap:10px}
  #bc-header .bc-brand-context{width:auto;min-width:0;gap:12px;justify-content:flex-start}
  #bc-header .bc-brand{font-size:21px;gap:6px}
  #bc-header .bc-brand-symbol{font-size:23px}
  #bc-header .identity-balcao-logo{max-width:100px;max-height:25px}
  #bc-header .bc-brand.identity-brand small{font-size:8px}
  #bc-header .bc-store-context{border-left:1px solid var(--line);padding-left:12px;min-width:0}
  #bc-header .bc-store-context strong{font-size:11px}
  #bc-header .bc-store-context select{font-size:11px;min-height:26px;max-width:180px}
  #bc-header .bc-header-right{width:auto;justify-content:flex-end;gap:6px;flex-shrink:0}
  #bc-header .bc-person{display:none}
  #bc-header .bc-mode-toggle,#bc-header .bc-management{min-height:44px;font-size:11px;padding:7px 10px;flex:none}
  .balcao-active main{padding:14px max(16px,env(safe-area-inset-right)) calc(94px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));min-height:calc(100dvh - 56px)}
  .balcao-active .bc-heading{display:flex;align-items:center;gap:12px;margin-bottom:12px}
  .balcao-active .bc-heading h1{font-size:20px;margin:4px 0}
  .balcao-active .bc-heading .muted{font-size:11px}
  .balcao-active .bc-heading .back{margin:0;min-height:44px;padding:7px 12px;font-size:11px}
  .balcao-active .bc-journey{padding:4px 10px;gap:4px;justify-content:flex-start;overflow-x:auto}
  .balcao-active .bc-journey button{min-height:44px;padding:7px 9px;font-size:11px}
  .balcao-active .bc-body{padding:16px 18px;min-height:0}
  .balcao-active .bc-prompt{margin-bottom:14px}
  .balcao-active .bc-prompt h2{font-size:21px;margin:5px 0 7px}
  .balcao-active .bc-prompt p{font-size:12px;line-height:1.5}
  .balcao-active .bc-field{margin:12px 0}
  .balcao-active .bc-field input,.balcao-active .bc-field select{min-height:44px;font-size:16px}
  .balcao-active #bc-client-results{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .balcao-active .bc-client{min-height:64px;padding:10px 12px}
  .balcao-active .bc-client strong{font-size:13px}
  .balcao-active .bc-client small{font-size:11px}
  .balcao-active .bc-options,.balcao-active .bc-frames{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
  .balcao-active .bc-choice{min-height:135px;padding:13px}
  .balcao-active .bc-choice-head strong{font-size:13px}
  .balcao-active .glasses{height:65px}
  .balcao-active .bc-bottom{padding:10px 18px;gap:10px;flex-wrap:nowrap}
  .balcao-active .bc-bottom .bc-primary{flex-basis:auto;flex-grow:0}
  .balcao-active .bc-primary,.balcao-active .back,.balcao-active .text-button{min-height:44px}
  .balcao-active .bc-lensview{display:flex;padding:14px 16px;gap:12px}
  .balcao-active .bc-lensview .back{margin:0}
  .balcao-active .bc-tray{grid-template-columns:minmax(85px,.85fr) minmax(0,2fr) auto minmax(105px,.8fr);align-items:center;gap:8px;padding:6px max(12px,env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}
  .bc-tray-client{min-width:0}
  .bc-tray-client>small,.bc-tray-client .status{display:none}
  .bc-tray-client>strong{display:block;margin:0;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .bc-tray-picks{grid-column:auto;grid-row:auto;min-width:0;gap:0}
  .bc-tray-picks button,.bc-tray-picks button:first-child{min-width:0;min-height:44px;padding:4px 8px;border-left:1px solid var(--line)}
  .bc-tray-picks small{font-size:9px;letter-spacing:0}
  .bc-tray-picks span{font-size:10px;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .bc-tray-value{grid-column:auto;grid-row:auto;display:block;justify-self:end;border:0;padding:0}
  .bc-tray-value>small{font-size:8px;letter-spacing:.4px}
  .bc-tray-value strong{font-size:20px;margin:0}
  .bc-tray-details{position:static;min-width:0}
  .bc-tray-details summary{font-size:10px;min-height:44px;line-height:1.3}
  .bc-tray-details[open]>div{position:absolute;left:12px;right:12px;bottom:calc(100% + 8px);width:auto;max-width:none;max-height:calc(100dvh - 140px);overflow-y:auto;padding:14px 18px;overscroll-behavior:contain}
  /* LensView: cabeçalho e ações acessíveis; somente o conteúdo interno rola. */
  .lv-dialog{width:calc(100vw - 8px);height:calc(100dvh - 8px);max-height:calc(100dvh - 8px);margin:4px auto;border-radius:12px;overflow:hidden}
  .lv-root{height:100%;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto}
  .lv-head{min-height:52px;padding:5px 14px;gap:10px}
  .lv-head h2{font-size:19px;margin:2px 0 0}
  .lv-head .lv-eyebrow{font-size:8px}
  .lv-dialog .lv-close{min-height:44px;height:44px;width:44px;padding:6px}
  .lv-body{display:block;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:10px 14px 16px;scroll-padding-block:8px}
  .lv-tabs{flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;gap:6px;margin-bottom:10px;padding:0 0 4px;scrollbar-width:thin}
  .lv-tabs button{flex-shrink:0;white-space:nowrap;min-height:44px;font-size:11px;padding:7px 10px}
  .lv-tone-toolbar{display:flex;align-items:center;gap:10px;margin-bottom:10px}
  .lv-tone-toolbar h3,.lv-tone-toolbar .lv-tone-intro h3{font-size:18px;line-height:1.25;margin:3px 0}
  .lv-tone-toolbar .lv-source{margin:0;flex-shrink:0}
  .lv-tone-toolbar .lv-source button{min-height:44px;font-size:11px;padding:7px 10px}
  .lv-tone-stage,.lv-night-stage,.lv-polar-stage,.lv-finish-stage,.lv-care-stage{height:clamp(150px,52dvh,230px);min-height:0}
  .lv-window-stage{width:min(100%,520px);height:clamp(150px,52dvh,220px);min-height:0;aspect-ratio:auto}
  .lv-controls{margin-top:16px;padding-top:14px;border-top:1px solid #dfe7e2;gap:14px}
  .lv-foot{position:static;min-height:56px;padding:6px 14px;gap:8px}
  .lv-foot>div:first-child{display:none}
  .lv-foot-actions{display:flex;width:100%;justify-content:flex-end;gap:8px}
  .lv-dialog .lv-foot-actions button{min-height:44px;padding:7px 14px;font-size:12px;flex:none}
  .lv-material-card>svg{height:110px}
  .lv-material-profile>svg{height:95px}
  .lv-camera-prompt{padding:12px;gap:7px;overflow-y:auto;justify-content:flex-start}
  .lv-camera-prompt .lv-camera-icon{display:none}
  .lv-camera-prompt h3{font-size:17px}
  .lv-camera-prompt p{font-size:11px;max-width:550px}
  .lv-dialog .lv-camera-prompt button{min-height:44px;padding:7px 12px;flex-shrink:0}
}
@media (orientation:landscape) and (max-height:500px) and (max-width:660px){
  #bc-header .bc-brand{font-size:18px}
  #bc-header .bc-brand-context{gap:8px}
  #bc-header .bc-store-context{padding-left:8px}
  #bc-header .bc-store-context select{max-width:135px}
  #bc-header .bc-mode-toggle,#bc-header .bc-management{padding:6px 8px;font-size:10px}
  .bc-tray-picks button,.bc-tray-picks button:first-child{padding-inline:5px}
  .bc-tray-client>strong{font-size:11px}
  .bc-tray-value strong{font-size:17px}
  .balcao-active .bc-tray{grid-template-columns:minmax(75px,.8fr) minmax(0,1.7fr) auto minmax(85px,.8fr);gap:6px}
  .balcao-active .bc-options,.balcao-active .bc-frames{grid-template-columns:repeat(2,minmax(0,1fr))}
  body:not(.balcao-active) .metric{padding-inline:10px}
  body:not(.balcao-active) .metric-value{font-size:21px}
}
@media (orientation:landscape) and (max-height:500px) and (max-width:1100px){
  html{scroll-padding-block:64px 82px}
  .balcao-active .bc-heading>div>p.muted{display:none}
  .lv-visual{display:flex;flex-direction:column}
  .lv-visual>*{order:5;flex-shrink:0}
  .lv-visual>.lv-tabs{order:0}
  .lv-visual>.lv-tone-toolbar,.lv-visual>.lv-window-top,.lv-visual>.lv-use-intro,.lv-visual>.lv-scenes,.lv-visual>.lv-material-selects{order:1}
  .lv-visual>.lv-comparison,.lv-visual>.lv-window-stage,.lv-visual>.lv-finish-stage,.lv-visual>.lv-care-stage,.lv-visual>.lv-material-cards{order:2}
}
