/* AUTO-LIVE 3D orchestration — standalone Tanya page only. */
#fawa-welcome-viewport{isolation:isolate;touch-action:pan-y pinch-zoom}
#fawa-welcome-viewport canvas{position:absolute;inset:0;z-index:3;opacity:0;transition:opacity .62s cubic-bezier(.22,.61,.36,1);pointer-events:none}
#fawa-welcome-fallback{z-index:2;opacity:1;transition:opacity .62s cubic-bezier(.22,.61,.36,1);pointer-events:none}
#fawa-welcome[data-autolive="transition"] #fawa-welcome-viewport canvas,
#fawa-welcome[data-autolive="live"] #fawa-welcome-viewport canvas{opacity:1;pointer-events:auto}
#fawa-welcome[data-autolive="transition"] #fawa-welcome-fallback,
#fawa-welcome[data-autolive="live"] #fawa-welcome-fallback{opacity:0}
#fawa-welcome[data-autolive="fallback"] #fawa-welcome-viewport canvas{display:none!important}
#fawa-welcome[data-autolive="fallback"] #fawa-welcome-fallback{opacity:1}
#fawa-welcome-loading{display:none!important}
#fawa-welcome .fawa-welcome-tools[hidden]{display:none!important}
@media(prefers-reduced-motion:reduce){#fawa-welcome-viewport canvas,#fawa-welcome-fallback{transition-duration:.01ms!important}}
/* Compact secondary 3D controls on phone-size viewports. */
@media(max-width:820px){
  #fawa-welcome .fawa-welcome-tools[open]{width:min(350px,calc(100% - 40px))!important}
  #fawa-welcome .fawa-welcome-tools[open] .fawa-welcome-controls{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px!important;padding:6px!important}
  #fawa-welcome .fawa-welcome-tools[open] .fawa-welcome-controls button{min-width:0!important;min-height:36px!important;padding:5px 3px!important;font-size:10px!important;line-height:1.15!important;white-space:normal!important}
  #fawa-welcome .fawa-welcome-tools summary{min-height:40px!important;padding:8px 10px!important;font-size:11px!important}
}
@media(max-width:360px){
  #fawa-welcome .fawa-welcome-tools[open]{width:calc(100% - 28px)!important}
  #fawa-welcome .fawa-welcome-tools[open] .fawa-welcome-controls button{font-size:9px!important}
}

/* Final mobile compact control polish */
@media(max-width:820px){
  #fawa-welcome .fawa-welcome-tools{width:min(330px,calc(100% - 48px))!important;bottom:118px!important;border-radius:16px!important}
  #fawa-welcome .fawa-welcome-tools summary{min-height:40px!important;padding:8px 10px!important;font-size:11px!important}
  #fawa-welcome .fawa-welcome-tools[open] .fawa-welcome-controls{grid-template-columns:1fr 1fr!important;gap:5px!important;padding:7px!important}
  #fawa-welcome .fawa-welcome-tools[open] .fawa-welcome-controls button{min-height:38px!important;padding:7px 8px!important;font-size:11px!important;border-radius:10px!important}
}
@media(max-width:400px){
  #fawa-welcome .fawa-welcome-tools{width:min(308px,calc(100% - 52px))!important}
  #fawa-welcome .fawa-welcome-tools[open] .fawa-welcome-controls button{font-size:10px!important}
}
@media(max-width:820px){
  #fawa-welcome .fawa-welcome-tools[open]{width:min(330px,calc(100% - 48px))!important}
}
@media(max-width:400px){
  #fawa-welcome .fawa-welcome-tools[open]{width:min(308px,calc(100% - 52px))!important}
}

/* Mobile/iPhone: atomic static-to-3D handoff prevents ghost/double Tanya. */
@media(max-width:820px){
  #fawa-welcome-viewport canvas,#fawa-welcome-fallback{transition:none!important}
}


/* iOS/in-app mobile viewport can report a transient desktop-like width while the sheet opens.
   UA class locks Tanya to mobile geometry from the first rendered frame. */
html.fawa-handheld #fawa-welcome .fawa-welcome-stage{left:50%!important;right:auto!important;top:27%!important;width:min(108%,500px)!important;height:54%!important;min-height:0!important;transform:translateX(-50%)!important}
html.fawa-handheld #fawa-welcome canvas,html.fawa-handheld #fawa-welcome-fallback{width:100%!important;height:100%!important;margin:0!important;transform:none!important;object-fit:contain!important}
