/* Mobile reference geometry wins over generic embedded-module responsive rules. */
@layer mobile-center-reference {
body[data-bean-mobile] #bean-chat-overlay.is-mobile,
body[data-bean-mobile] #bean-chat-overlay.is-mobile.is-expanded { inset: var(--phone-top) auto auto var(--phone-left) !important; width: var(--phone-live-width) !important; height: var(--phone-live-height) !important; border: 0 !important; border-radius: 0 !important; transform: none !important; }
body[data-bean-mobile] #bean-chat-overlay .bean-chat-panel { display: block !important; width: 100%; height: 100%; padding: 0; border-radius: 0; }
body[data-bean-mobile] #bean-chat-overlay .bean-chat-toolbar { position: absolute !important; inset: 8px 8px auto !important; display: flex !important; justify-content: space-between; width: auto !important; padding: 0 !important; gap: 4px; }
body[data-bean-mobile] #bean-chat-overlay .bean-chat-toolbar-group { gap: 4px !important; }
body[data-bean-mobile] #bean-chat-overlay .bean-chat-tool { width: 28px !important; height: 28px !important; min-width: 28px !important; min-height: 28px !important; padding: 4px !important; border-radius: 7px !important; background: #000b !important; border: 1px solid #78c1cb !important; }
body[data-bean-mobile] #bean-chat-overlay .bean-chat-expand { display: none !important; }
body[data-bean-mobile] #bean-chat-overlay .bean-chat-close { display: inline-flex !important; }
body[data-bean-mobile] #bean-chat-overlay .bean-chat-header,
body[data-bean-mobile] #bean-chat-overlay .bean-chat-agent-card { display: none !important; }
body[data-bean-mobile] #bean-chat-overlay .bean-chat-log { position: absolute !important; inset: 44px 0 64px !important; padding: 0 !important; overflow: hidden !important; }
body[data-bean-mobile] #bean-chat-overlay .bean-chat-agent-layout { position: absolute !important; inset: 0 !important; display: block !important; height: 100% !important; min-height: 0 !important; }
body[data-bean-mobile] #bean-chat-overlay .bean-chat-agent-stage { display: block !important; position: absolute !important; inset: auto auto 0 0 !important; width: 24% !important; height: 40% !important; min-height: 0 !important; max-height: 300px; overflow: visible; }
body[data-bean-mobile] #bean-chat-overlay .bean-chat-agent-art { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; max-width: none !important; object-fit: contain; object-position: center bottom; }
body[data-bean-mobile] #bean-chat-overlay .bean-chat-agent-art[data-character-fit="visible-bounds"] { inset: auto !important; width: var(--fit-width) !important; height: var(--fit-height) !important; left: var(--fit-left) !important; top: var(--fit-top) !important; object-fit: fill !important; }
body[data-bean-mobile] #bean-chat-overlay .bean-chat-agent-main { position: absolute !important; inset: 0 0 0 24% !important; width: auto !important; height: 100% !important; min-height: 0 !important; padding: 8px 12px 20px 8px !important; overflow: auto !important; overscroll-behavior: contain; gap: 12px !important; }
body[data-bean-mobile] #bean-chat-overlay .bean-chat-intro-message { padding: 10px !important; border-radius: 10px; background: #000b !important; flex-shrink: 0; }
body[data-bean-mobile] #bean-chat-overlay .bean-chat-intro-message p,
body[data-bean-mobile] #bean-chat-overlay .bean-chat-bubble { font-size: 14px !important; line-height: 1.6 !important; overflow-wrap: anywhere; }
body[data-bean-mobile] #bean-chat-overlay .bean-chat-actions { position: absolute !important; inset: auto 0 0 !important; padding: 8px 10px !important; background: transparent !important; }
body[data-bean-mobile] #bean-chat-overlay .bean-chat-form { display: grid !important; grid-template-columns: minmax(0,1fr) 58px !important; gap: 8px !important; height: 46px !important; min-height: 0 !important; }
body[data-bean-mobile] #bean-chat-overlay .bean-chat-input,
body[data-bean-mobile] #bean-chat-overlay .bean-chat-send { height: 46px !important; min-height: 46px !important; min-width: 0 !important; border-radius: 12px !important; font-size: 16px !important; }
body[data-bean-mobile] #bean-chat-overlay .bean-chat-input { padding: 0 10px; background: #000b; }
body[data-bean-mobile] #bean-chat-overlay .bean-chat-send { background: #77edff !important; color: #041117 !important; }

}
@layer mobile-center-reference {
.mobile-centers{grid-template-columns:repeat(5,minmax(0,1fr))!important}
.mobile-center-button{width:100%!important;height:auto!important;min-height:0!important;aspect-ratio:1!important;box-sizing:border-box!important;padding:4px 1px!important;gap:2px!important;overflow:hidden}
.mobile-center-button img{width:48%!important;height:auto!important;aspect-ratio:1;min-height:0;object-fit:contain}
.mobile-center-button span{font-size:clamp(8px,1.8vw,11px)!important;white-space:nowrap!important}
.mobile-center-result{display:flex!important;flex-direction:column;gap:12px;flex:none;min-width:0}
.mobile-center-divider{height:1px;width:100%;border:0;background:#ffffff3b;margin:8px 0 4px}
.mobile-center-note{font-size:14px!important;line-height:1.6!important;padding:10px!important;background:#000b!important;border-radius:10px;margin:0!important}
.mobile-center-reselect{display:flex;flex-direction:column;gap:10px;margin-top:4px}
.mobile-center-content .wm-card{padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;display:block!important}
.mobile-center-content :is(.wm-title,.wm-description:not([data-chat-text-persistent="true"]),.wm-status:empty){display:none!important}
.mobile-center-content .wm-entry-turn>.wm-description[data-chat-text-persistent="true"]{display:block!important;margin:10px 0 8px;padding:8px 10px;border:1px solid #4f7887;border-radius:9px;background:rgba(30,44,57,.92);color:#f4f6f8}
.mobile-center-content iframe{width:100%!important;border:0!important;display:block!important;background:transparent!important}
.mobile-center-content .wm-universe-stage{height:254px!important;min-height:0!important;aspect-ratio:auto!important;background:#000b!important}
.mobile-center-button span{font-size:11px!important;color:#fff}
@media(max-width:360px){.mobile-centers{grid-template-columns:repeat(3,minmax(0,1fr))}}
}
@layer mobile-center-reference {
.mobile-center-content iframe{min-width:0!important;border-radius:0!important}
.mobile-center-content .wm-universe-stage{height:227px!important}
.mobile-center-note{font-weight:700!important}
body[data-bean-mobile] #bean-chat-overlay .bean-chat-toolbar{margin:0!important}
}
@layer mobile-center-reference {
body[data-bean-mobile] #bean-chat-overlay .bean-chat-toolbar{height:28px!important;min-height:0!important}
body[data-bean-mobile] #bean-chat-overlay .bean-chat-intro-message{border:0!important}
.mobile-center-result,.mobile-center-content{width:100%!important;max-width:100%!important;box-sizing:border-box!important}
.mobile-center-content .wm-modules{grid-template-columns:minmax(0,1fr)!important}
.mobile-center-content .wm-card{width:100%!important;min-width:0!important}
}
@layer mobile-center-reference{
.mobile-centers{grid-template-columns:repeat(6,minmax(0,1fr))!important}
.mobile-center-button{grid-column:span 2}
.mobile-center-button:nth-child(4){grid-column:1/span 2}
.mobile-center-button:nth-child(5){grid-column:3/span 2}
}

/* Mobile-only visual corrections: full-width controls, no duplicate walker/frame. */
@layer dialog-surfaces {
/* The foreground extends behind the input controls to the dialog's ground line. */
body[data-bean-mobile] #bean-chat-overlay .bean-chat-log{overflow:visible!important}
body[data-bean-mobile] #bean-chat-overlay .bean-chat-agent-stage::after{display:none!important}
body[data-bean-mobile] #bean-chat-overlay .chat-static-border-edge,
body[data-bean-mobile] #bean-chat-overlay .chat-world-subject[data-kind="walker"]{display:none!important}
body[data-bean-mobile] #bean-chat-overlay.is-mobile,
body[data-bean-mobile] #bean-chat-overlay.is-mobile.is-expanded{
  left:0!important;right:auto!important;width:100vw!important;max-width:none!important;
  border:0!important;border-radius:0!important;box-shadow:none!important;outline:0!important
}
body[data-bean-mobile] #bean-chat-overlay .bean-chat-toolbar{
  inset:0 auto auto 50%!important;width:100vw!important;max-width:none!important;height:44px!important;padding:8px!important;
  transform:translateX(-50%)!important;
  box-sizing:border-box!important;background:transparent!important
}
body[data-bean-mobile] #bean-chat-overlay .bean-chat-actions{
  inset:auto 0 0!important;width:100%!important;box-sizing:border-box!important;
  background:transparent!important
}
body[data-bean-mobile] #bean-chat-overlay .bean-chat-form{
  grid-template-columns:minmax(0,1fr) 46px 58px!important;width:100%!important;
  /* Keep the composer across the viewport even if a cached scene stylesheet loads later. */
  margin-left:0!important;
  background:transparent!important;box-sizing:border-box!important
}
body[data-bean-mobile] #bean-chat-overlay .bean-chat-agent-main{
  inset:0!important;width:100%!important;padding-left:calc(24% + 8px)!important;
  box-sizing:border-box!important
}
body[data-bean-mobile] #bean-chat-overlay .mobile-centers{
  position:relative!important;z-index:30!important;width:100%!important;
  max-width:100%!important;margin-left:0!important;gap:6px!important
}
body[data-bean-mobile] #bean-chat-overlay .mobile-center-button{min-width:0!important}
body[data-bean-mobile] #bean-chat-overlay .mobile-center-button img{width:58%!important}
body[data-bean-mobile] #bean-chat-overlay{
  --bean-chat-background-fit:cover!important;
  background-size:100% 100%,var(--bean-chat-background-fit)!important;
  background-position:center!important
}
/* Round subjects keep their full diameter; scene images fill the whole dialog. */
body[data-bean-mobile] #bean-chat-overlay:is([data-bean-background-category="星球"],[data-bean-background-category="星系"],[data-bean-background-url*="/home-orbits/core"]){
  --bean-chat-background-fit:contain!important
}
body[data-bean-mobile] #bean-chat-overlay .bean-chat-background-video{object-fit:var(--bean-chat-background-fit)!important;object-position:center!important}
}
.mobile-center-qr{position:fixed;inset:0;margin:auto;padding:0;width:min(320px,calc(100vw - 32px));height:auto;aspect-ratio:1;max-height:calc(100dvh - 64px);border:1px solid #8debf5;border-radius:16px;background:#000;overflow:visible;z-index:2147483647}
.mobile-center-qr::backdrop{background:#0007}
.mobile-center-qr iframe,.mobile-center-qr>img{display:block;width:100%;height:100%;aspect-ratio:1;border:0;border-radius:16px;object-fit:contain}
.mobile-center-qr>img{padding:12px;background:#fff;box-sizing:border-box}
.mobile-center-qr-close{position:absolute;top:-36px;right:0;width:30px;height:30px;border:1px solid #8debf5;border-radius:8px;background:#000b;color:#fff;font-size:22px}

/* Additional universe entries share the center-card frame and keep distinct tints. */
.mobile-centers [data-mobile-center="sculpt"]{--center-entry-fill:#32220de8}
.mobile-centers [data-mobile-center="search"]{--center-entry-fill:#092b32e8}
.mobile-centers [data-mobile-center="life"]{--center-entry-fill:#32132ae8}
.mobile-centers :is([data-mobile-center="sculpt"],[data-mobile-center="search"],[data-mobile-center="life"]){background:linear-gradient(var(--center-entry-fill),var(--center-entry-fill)) padding-box,linear-gradient(135deg,#7eeeff,#ff8bcf,#d0a2ff,#ffe89d) border-box}

@layer chat-pure-mode {
 html:not(.desktop-agent)[data-chat-pure="true"] body[data-bean-mobile] #bean-chat-overlay .mobile-centers {
   display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:3px!important;
 }
 html:not(.desktop-agent)[data-chat-pure="true"] body[data-bean-mobile] #bean-chat-overlay .mobile-centers>.mobile-center-button {
   --chat-pure-card-size:var(--mobile-center-size,64px);grid-column:auto!important;
   width:100%!important;min-width:0!important;max-width:none!important;height:var(--chat-pure-card-size)!important;
 }
 html:not(.desktop-agent)[data-chat-pure="true"] body[data-bean-mobile] #bean-chat-overlay .mobile-center-button .chat-pure-visual {
   width:calc(var(--chat-pure-card-size)*.58)!important;height:calc(var(--chat-pure-card-size)*.58)!important;min-height:calc(var(--chat-pure-card-size)*.58)!important;flex-basis:calc(var(--chat-pure-card-size)*.58)!important;
 }
 html:not(.desktop-agent) body[data-bean-mobile] #bean-chat-overlay :is(.bean-chat-expand,[data-frame-control="expand"]) {display:none!important}
}
.mobile-capability-content{height:1px;overflow:hidden}
/* Vertical mobile text-and-image navigation matches the content cards below. */
@layer chat-pure-mode {
 html:not(.desktop-agent)[data-chat-pure="false"] body[data-bean-mobile] #bean-chat-overlay .mobile-centers {
   display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;
 }
 html:not(.desktop-agent)[data-chat-pure="false"] body[data-bean-mobile] #bean-chat-overlay .mobile-centers>.mobile-center-button {
   grid-column:auto!important;width:100%!important;min-width:0!important;max-width:none!important;
   height:54px!important;min-height:54px!important;max-height:54px!important;aspect-ratio:auto!important;flex-basis:54px!important;padding:6px!important;border-radius:10px!important;
 }
 @media(max-width:450px){
   html:not(.desktop-agent)[data-chat-pure="false"] body[data-bean-mobile] #bean-chat-overlay .mobile-centers{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:3px!important}
   html:not(.desktop-agent)[data-chat-pure="false"] body[data-bean-mobile] #bean-chat-overlay .mobile-centers>.mobile-center-button{padding:4px!important}
 }
}

/* Shuttle choices use the same square sizing as the mobile home navigation. */
@layer chat-pure-mode {
 html:not(.desktop-agent)[data-chat-pure="true"] body[data-bean-mobile] #bean-chat-overlay [data-center-result="enter"] .wm-grid {
   display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:3px!important;
 }
 html:not(.desktop-agent)[data-chat-pure="true"] body[data-bean-mobile] #bean-chat-overlay [data-center-result="enter"] .wm-tile {
   --chat-pure-card-size:var(--mobile-center-size,64px);
   width:100%!important;min-width:0!important;max-width:none!important;height:var(--chat-pure-card-size)!important;
 }
 html:not(.desktop-agent)[data-chat-pure="true"] body[data-bean-mobile] #bean-chat-overlay [data-center-result="enter"] .chat-pure-visual {
   width:calc(var(--chat-pure-card-size)*.58)!important;height:calc(var(--chat-pure-card-size)*.58)!important;min-height:calc(var(--chat-pure-card-size)*.58)!important;flex-basis:calc(var(--chat-pure-card-size)*.58)!important;
 }
}

@layer chat-pure-mode {
 html.desktop-agent[data-chat-pure="true"] body[data-bean-mobile] #bean-chat-overlay .mobile-centers{display:grid!important;grid-template-columns:repeat(auto-fill,var(--chat-pure-desktop-card-size,64px))!important;gap:3px!important;justify-content:start!important}
 html.desktop-agent[data-chat-pure="true"] body[data-bean-mobile] #bean-chat-overlay .mobile-centers>.mobile-center-button{grid-column:auto!important;grid-row:auto!important}
 /* Match the application's 150px minimum long cards, without the legacy spans. */
 html.desktop-agent[data-chat-pure="false"] body[data-bean-mobile] #bean-chat-overlay .mobile-centers{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(min(100%,150px),1fr))!important;gap:6px!important;justify-content:center!important}
 html.desktop-agent[data-chat-pure="false"] body[data-bean-mobile] #bean-chat-overlay .mobile-centers>.mobile-center-button{grid-column:auto!important;grid-row:auto!important;width:100%!important;min-width:0!important;max-width:none!important;height:52px!important;min-height:52px!important;max-height:52px!important}
}

@layer mobile-center-reference {
 html.desktop-agent .mobile-center-content .wm-universe-stage{height:auto!important;aspect-ratio:3.6 / 1!important;background:#000b!important}
}
