/* One effective-width layout for local, purple preview and Publish. */
html[data-brand-visual-mode="phone"] body{transform:none!important}
html:root body[data-app-layout="portrait"]{--bm-portrait-gutter:10px;--public-page-gap:8px;height:var(--bm-safe-vh,100dvh)!important;min-height:0!important;overflow:hidden}
html:root body[data-app-layout="portrait"] main{
  width:100%!important;max-width:100%!important;min-width:0!important;min-height:0!important;
  flex:1 1 0!important;height:0!important;margin:0!important;padding:10px!important;
  overflow:hidden!important;scrollbar-gutter:auto!important;
}
html:root body[data-app-layout="portrait"] main:has(.page.active:not(:is(#page-vision,#page-flock,#page-reasoning,#vision,#flock,#reasoning))){overflow:auto!important}
html:root body[data-app-layout="portrait"] :is(#page-vision,#page-flock,#page-reasoning,#vision,#flock,#reasoning){
  width:100%!important;max-width:100%!important;height:100%!important;min-height:0!important;margin:0!important;overflow:hidden!important;
  font-family:"PingFang SC","Microsoft YaHei",sans-serif;font-size:12px;line-height:1.5;
}
html:root body[data-app-layout="portrait"] :is(#page-vision,#page-flock,#page-reasoning,#vision,#flock,#reasoning) :is(.ai-shell,.flock-shell,.reasoning-chat-shell){
  width:100%!important;height:100%!important;min-height:0!important;max-height:100%!important;display:flex!important;flex-direction:column!important;gap:8px!important;overflow:hidden!important;
}
html:root body[data-app-layout="portrait"] :is(#page-vision,#page-flock,#page-reasoning,#vision,#flock,#reasoning) *{box-sizing:border-box}
html:root body[data-app-layout="portrait"] :is(#page-vision,#page-flock,#page-reasoning,#vision,#flock,#reasoning) .input-capsule-slot{flex:0 0 auto!important;margin:0!important}
html:root body[data-app-layout="portrait"] :is(#page-vision,#page-flock,#page-reasoning,#vision,#flock,#reasoning) :is(.environment-capsule,.reasoning-upload){width:100%!important;margin:0!important;--reasoning-capsule-height:60px}
html:root body[data-app-layout="portrait"] :is(#page-vision,#page-flock,#page-reasoning,#vision,#flock,#reasoning) :is(.environment-capsule,.reasoning-upload) .upload-capsule-bar{height:60px!important;min-height:60px!important;max-height:60px!important;padding:7px!important;gap:6px!important}
html:root body[data-app-layout="portrait"] :is(#page-vision,#page-flock,#page-reasoning,#vision,#flock,#reasoning) :is(.environment-capsule-thumb-button,.upload-capsule-icon,.upload-capsule-thumb){width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;flex-basis:44px!important}
html:root body[data-app-layout="portrait"] :is(#page-vision,#page-flock,#page-reasoning,#vision,#flock,#reasoning) :is(.environment-capsule-summary,.reasoning-upload .upload-capsule-main){height:44px!important;min-height:44px!important;padding-inline:5px!important}
html:root body[data-app-layout="portrait"] :is(#page-vision,#page-flock,#page-reasoning,#vision,#flock,#reasoning) .environment-capsule-state{display:none!important}
html:root body[data-app-layout="portrait"] :is(#page-vision,#page-flock,#page-reasoning,#vision,#flock,#reasoning) .upload-capsule-actions{gap:0!important}
html:root body[data-app-layout="portrait"] :is(#page-vision,#page-flock,#page-reasoning,#vision,#flock,#reasoning) .upload-capsule-action{width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;padding:0 6px!important;touch-action:manipulation}
html:root body[data-app-layout="portrait"] :is(#page-vision,#page-flock,#page-reasoning,#vision,#flock,#reasoning) .environment-capsule .upload-file-action{font-size:0!important}
html:root body[data-app-layout="portrait"] :is(#page-vision,#page-flock,#page-reasoning,#vision,#flock,#reasoning) .environment-capsule .upload-file-action::after{content:'↻';font-size:15px}
html:root body[data-app-layout="portrait"] :is(#page-vision,#page-flock,#page-reasoning,#vision,#flock,#reasoning) .reasoning-upload .wide-label{display:none!important}
html:root body[data-app-layout="portrait"] :is(#page-vision,#page-flock,#page-reasoning,#vision,#flock,#reasoning) .environment-capsule-panel{top:calc(100% + 5px)!important;padding:9px 9px 16px!important;border-radius:14px!important;box-sizing:border-box!important;max-height:var(--bm-input-height,calc(var(--bm-app-height,100dvh) - 190px))!important;overflow:auto!important;scrollbar-gutter:auto!important;overscroll-behavior:contain;scroll-padding-bottom:16px}
html:root body[data-app-layout="portrait"] :is(#page-vision,#page-flock,#page-reasoning,#vision,#flock,#reasoning) .environment-capsule-layout{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:9px!important}
html:root body[data-app-layout="portrait"] :is(#page-vision,#page-flock,#page-reasoning,#vision,#flock,#reasoning) .environment-photo-picker{height:148px!important;min-height:148px!important;max-height:148px!important;width:100%!important}
html:root body[data-app-layout="portrait"] :is(#page-vision,#page-flock,#page-reasoning,#vision,#flock,#reasoning) .vision-condition-title{font-size:12px!important;margin:0 0 4px!important}
html:root body[data-app-layout="portrait"] :is(#page-vision,#page-flock,#page-reasoning,#vision,#flock,#reasoning) .vision-condition-block+.vision-condition-block{margin-top:7px!important}
html:root body[data-app-layout="portrait"] :is(#page-vision,#page-flock,#page-reasoning,#vision,#flock,#reasoning) .environment-capsule .vision-choice-grid{display:flex!important;flex-wrap:wrap!important;gap:4px!important;margin-top:4px!important}
html:root body[data-app-layout="portrait"] :is(#page-vision,#page-flock,#page-reasoning,#vision,#flock,#reasoning) .environment-capsule :is(#vision-province,#flock-province){display:grid!important;grid-template-columns:repeat(auto-fit,minmax(54px,1fr))!important}
html:root body[data-app-layout="portrait"] :is(#page-vision,#page-flock,#page-reasoning,#vision,#flock,#reasoning) .environment-capsule :is(#vision-month,#flock-month){display:grid!important;grid-template-columns:repeat(auto-fit,minmax(44px,1fr))!important}
html:root body[data-app-layout="portrait"] :is(#page-vision,#page-flock,#page-reasoning,#vision,#flock,#reasoning) .environment-capsule .vision-choice{width:auto!important;min-width:0!important;max-width:100%!important;min-height:32px!important;height:auto!important;padding:4px 8px!important;font-size:11px!important;line-height:1.15!important;white-space:normal!important;overflow-wrap:anywhere}
html:root body[data-app-layout="portrait"] :is(#page-vision,#page-flock,#page-reasoning,#vision,#flock,#reasoning) .vision-habitat-row{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:6px!important}
html:root body[data-app-layout="portrait"] :is(#page-vision,#page-flock,#page-reasoning,#vision,#flock,#reasoning) .environment-capsule :is(.vision-run,.flock-run){align-self:flex-end!important;width:auto!important;min-width:98px!important;height:44px!important;min-height:44px!important;margin:2px 0 0!important;padding:0 10px!important;font-size:12px!important}
html:root body[data-app-layout="portrait"] :is(#page-vision,#vision) .vision-dialog-panel{flex:1 1 0!important;min-height:0!important;height:0!important;padding:12px!important;overflow:auto!important;border:1px solid #e5e7eb!important;border-radius:12px!important;background:#fff!important;scrollbar-gutter:stable}
html:root body[data-app-layout="portrait"] :is(#page-flock,#flock) .flock-workspace{flex:1 1 0!important;min-height:0!important;display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(150px,1fr) minmax(160px,1fr)!important;gap:8px!important;overflow:auto!important}
html:root body[data-app-layout="portrait"] :is(#page-flock,#flock) :is(.flock-canvas-card,.flock-canvas-wrap,.flock-summary){min-height:0!important;max-height:none!important;height:auto!important}
html:root body[data-app-layout="portrait"] :is(#page-reasoning,#reasoning) .reasoning-chat-panel{flex:1 1 0!important;height:0!important;min-height:0!important;padding:12px!important;overflow:hidden!important}
html:root body[data-app-layout="portrait"] :is(#page-reasoning,#reasoning) .reasoning-chat{height:0!important;min-height:0!important;flex:1 1 0!important;padding:12px 12px 18px!important;overflow-y:auto!important;gap:11px!important}
html:root body[data-app-layout="portrait"] :is(#page-vision,#page-flock,#page-reasoning,#vision,#flock,#reasoning) .reasoning-chat :is(.msg,.ai-msg){flex:0 0 auto!important;max-width:92%!important;max-height:none!important;overflow:visible!important;font-size:12px!important;padding:9px 12px!important;line-height:1.6!important}
html:root body[data-app-layout="portrait"] :is(#page-vision,#page-flock,#page-reasoning,#vision,#flock,#reasoning) .reasoning-compose{grid-template-columns:minmax(0,1fr) 44px!important;grid-template-rows:repeat(2,minmax(0,1fr))!important;gap:8px!important;margin-top:10px!important}
html:root body[data-app-layout="portrait"] :is(#page-vision,#page-flock,#page-reasoning,#vision,#flock,#reasoning) .reasoning-compose textarea{min-height:96px!important;height:96px!important;padding:11px 12px!important;font-size:16px!important;line-height:1.5!important;resize:none!important}
html:root body[data-app-layout="portrait"] :is(#page-vision,#page-flock,#page-reasoning,#vision,#flock,#reasoning) .reasoning-compose :is(.reasoning-send,.reasoning-reset){width:44px!important;min-width:44px!important;min-height:44px!important;height:auto!important}

/* Fixed glass lives on a sibling painting layer; only the card body scrolls. */
html body [data-bm-dialog="open"]{z-index:var(--bm-dialog-level)!important}
html body :is(.llm-detail-overlay,.upload-preview-overlay,.image-overlay,.vision-target-picker,.target-picker,.reasoning-feature-overlay){
  position:fixed!important;inset:auto!important;left:var(--bm-app-left,0px)!important;top:var(--bm-app-top,0px)!important;
  width:var(--bm-app-width,100vw)!important;height:var(--bm-app-height,100dvh)!important;max-width:none!important;max-height:none!important;
  display:flex;align-items:center!important;justify-content:center!important;padding:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))!important;
  overflow:hidden!important;background:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;touch-action:auto!important;isolation:isolate;
}
html body :is(.llm-detail-overlay,.upload-preview-overlay,.image-overlay,.vision-target-picker,.target-picker,.reasoning-feature-overlay)::before{
  content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:rgba(30,47,64,.22);backdrop-filter:blur(16px) saturate(125%);-webkit-backdrop-filter:blur(16px) saturate(125%);
}
html:root body[class] :is(#llm-detail-overlay,#reasoning-feature-detail-overlay) :is(.llm-detail-card,.reasoning-feature-detail-card){
  position:relative!important;display:flex!important;flex-direction:column!important;flex:0 1 auto!important;
  width:min(960px,100%)!important;max-width:100%!important;min-width:0!important;height:auto!important;min-height:0!important;max-height:100%!important;max-block-size:100%!important;margin:0!important;
  padding:0!important;border:1px solid rgba(226,234,241,.94)!important;border-radius:20px!important;background:rgba(252,254,255,.96)!important;
  box-shadow:0 24px 70px rgba(20,38,57,.22)!important;overflow:hidden!important;transform:none!important;contain:none!important;will-change:auto!important;
}
html:root body[class] :is(#llm-detail-overlay,#reasoning-feature-detail-overlay) :is(.llm-detail-head,.reasoning-feature-detail-head){position:relative!important;top:auto!important;flex:0 0 auto!important;padding:16px 62px 14px 16px!important;background:rgba(249,252,255,.96)!important;z-index:1!important}
html:root body[class] :is(#llm-detail-overlay,#reasoning-feature-detail-overlay) :is(.llm-detail-body,.reasoning-feature-detail-body){flex:1 1 auto!important;min-height:0!important;min-block-size:0!important;max-height:none!important;max-block-size:none!important;padding:16px!important;overflow:auto!important;overscroll-behavior:contain;touch-action:pan-x pan-y pinch-zoom!important;-webkit-overflow-scrolling:touch;contain:none!important;transform:none!important;will-change:auto!important}
html:root body[data-app-layout="portrait"] .llm-detail-title{font-size:17px!important;line-height:1.4!important}
html:root body[data-app-layout="portrait"] .llm-detail-summary{font-size:12px!important;line-height:1.6!important}
html body :is(.upload-preview-card,.image-overlay-card,.vision-target-card,.target-picker-card){max-width:100%!important;max-height:100%!important;margin:0!important;border-radius:18px!important;overflow:hidden!important;transform:none!important}
html body :is(.vision-target-card,.target-picker-card){display:flex!important;flex-direction:column!important;min-height:0!important}
html body :is(.vision-target-heading,.target-picker-head){flex:0 0 auto!important;padding-right:60px!important}
html body :is(.vision-target-stage,.target-stage){min-height:0!important;flex:1 1 auto!important;max-height:calc(var(--bm-app-height,100dvh) - 190px)!important}
html:root body[data-app-layout="portrait"] .bird-reference-overlay{left:var(--bm-app-left)!important;top:var(--bm-app-top)!important;right:auto!important;bottom:auto!important;width:var(--bm-app-width)!important;height:var(--bm-app-height)!important;padding:10px!important}
html:root body[data-app-layout="portrait"] .bird-reference-overlay:not(.is-flock-annotation) .bird-reference-frame{width:min(calc(var(--bm-app-width) - 40px),calc(var(--bm-app-height) - 100px))!important;max-width:100%!important;display:block!important}
html:root body[data-app-layout="portrait"] .bird-reference-stage{max-width:100%!important;border-radius:14px!important}
html:root body[data-app-layout="portrait"] .bird-reference-stage>img{max-width:94%!important;max-height:94%!important;object-fit:contain!important}
.portrait-dialog-host{position:relative}
html:root body[class] [data-bm-dialog] :is(.llm-dialog-portrait-close,.portrait-dialog-close,.portrait-dialog-native-close,.image-library-viewer-close){
  display:grid!important;place-items:center!important;position:absolute!important;top:6px!important;right:6px!important;z-index:20!important;
  width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;padding:0!important;
  border:1px solid rgba(180,199,215,.8)!important;border-radius:12px!important;background:rgba(249,252,255,.94)!important;color:#536d85!important;
  font:24px/1 sans-serif!important;cursor:pointer;pointer-events:auto!important;touch-action:manipulation;box-shadow:0 3px 12px rgba(42,61,81,.10)!important;
}
html:root body[class] [data-bm-dialog] :is(.llm-dialog-portrait-close,.portrait-dialog-close,.portrait-dialog-native-close,.image-library-viewer-close)::after{content:none!important}
html:root body[class] :is(.llm-dialog-portrait-close,.portrait-dialog-close,.portrait-dialog-native-close,.image-library-viewer-close)::before{content:none!important}
html:root body[class] :is(.llm-dialog-portrait-close,.portrait-dialog-close,.portrait-dialog-native-close,.image-library-viewer-close){text-indent:0!important;transform:none!important;will-change:auto!important;font-size:24px!important;line-height:1!important;color:#536d85!important;-webkit-text-fill-color:#536d85!important}
html body .upload-preview-head{padding-right:58px!important;flex:0 0 auto!important}
html body .hidden,html body [hidden]{display:none!important}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  html body :is(.llm-detail-overlay,.upload-preview-overlay,.image-overlay,.vision-target-picker,.target-picker,.reasoning-feature-overlay)::before{background:rgba(46,62,79,.38)}
}

html body > .flex.flex-1.min-h-0{display:flex;flex:1 1 0;min-height:0;overflow:hidden}
html:root body[data-app-layout="portrait"] > .flex.flex-1.min-h-0 > main{height:100%!important;padding:10px!important;box-sizing:border-box}
html:root body[data-app-layout="portrait"] main:has(>:is(#page-vision.active,#page-flock.active,#page-reasoning.active,#vision.active,#flock.active,#reasoning.active)){padding:10px!important}
html:root body[class] :is(#llm-detail-overlay,[data-bm-dialog]) :is(.llm-dialog-portrait-close,.portrait-dialog-close,.portrait-dialog-native-close,.image-library-viewer-close){display:grid!important;font:24px/1 sans-serif!important;color:#536d85!important;z-index:20!important}
html:root body[class] :is(#llm-detail-overlay,#reasoning-feature-detail-overlay){box-sizing:border-box!important;padding:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))!important}
html:root body[class] :is(#llm-detail-overlay,#reasoning-feature-detail-overlay) :is(.llm-detail-card,.reasoning-feature-detail-card){font:12px/1.65 "PingFang SC","Microsoft YaHei",sans-serif!important;color:#4b5b6b!important;overflow:hidden!important;animation:none!important}
html:root body[class] #llm-detail-overlay .llm-detail-eyebrow{display:block!important;margin:0!important;color:#7c8ea1!important;font-size:9px!important;line-height:1.2!important}
html:root body[class] #llm-detail-overlay .llm-detail-title{font-size:17px!important;font-weight:760!important;line-height:1.4!important;color:#3f566f!important;margin:1px 0 0!important}
html:root body[class] #llm-detail-overlay .llm-detail-summary{font-size:12px!important;line-height:1.6!important;color:#8793a0!important;margin:2px 0 0!important}
html:root body[class] #llm-detail-overlay .llm-detail-body{width:100%!important;max-width:100%!important;inline-size:100%!important;max-inline-size:100%!important;scrollbar-gutter:stable!important}
html:root body[class] :is(.llm-detail-body,.reasoning-feature-detail-body){scrollbar-width:auto!important;scrollbar-color:auto!important;scrollbar-gutter:stable!important}
html:root body[class] :is(.llm-detail-body,.reasoning-feature-detail-body)::-webkit-scrollbar{width:8px!important;height:8px!important}
html:root body[class] :is(.llm-detail-body,.reasoning-feature-detail-body)::-webkit-scrollbar-track{background:transparent!important}
html:root body[class] :is(.llm-detail-body,.reasoning-feature-detail-body)::-webkit-scrollbar-thumb{background:#b8c8d8!important;border:0!important;border-radius:4px!important}
html:root body[class] :is(.llm-detail-body,.reasoning-feature-detail-body)::-webkit-scrollbar-button{display:none!important;width:0!important;height:0!important}
@supports not selector(::-webkit-scrollbar){html:root body[class] :is(.llm-detail-body,.reasoning-feature-detail-body){scrollbar-width:thin!important;scrollbar-color:#b8c8d8 transparent!important}}
html:root body[class] #llm-detail-overlay .llm-detail-head{height:auto!important;min-height:0!important;max-height:none!important}
html:root body[class] [data-bm-dialog] :is(.llm-dialog-portrait-close,.portrait-dialog-close,.portrait-dialog-native-close,.image-library-viewer-close)::before,
html:root body[class] [data-bm-dialog] :is(.llm-dialog-portrait-close,.portrait-dialog-close,.portrait-dialog-native-close,.image-library-viewer-close)::after{content:none!important}
html:root body[class] [data-bm-dialog] > .portrait-dialog-close{position:absolute!important;top:var(--bm-close-top,6px)!important;left:var(--bm-close-left,auto)!important;right:auto!important}
html:root body[class] [data-bm-dialog] :is(.upload-preview-card,.image-overlay-card){display:flex!important;flex-direction:column!important;min-height:0!important}
html:root body[class] [data-bm-dialog] :is(.upload-preview-stage,.image-overlay-stage){min-height:0!important;flex:1 1 auto!important;max-height:calc(var(--bm-app-height,100dvh) - 100px)!important;overflow:hidden!important}
@media(min-width:601px){html:root[data-brand-visual-mode="phone"] body[data-app-layout="portrait"]{height:calc(var(--bm-safe-vh,100dvh) - 32px)!important}}
.bm-popover-head{position:sticky!important;top:0!important;z-index:5;display:flex!important;align-items:center;justify-content:space-between;gap:8px;width:100%;height:auto!important;min-height:44px!important;padding:0 0 0 10px!important;background:rgba(249,252,255,.98)!important;color:#536d85;font:12px/1.4 "Microsoft YaHei",sans-serif;border-bottom:1px solid #e3eaf0}
html:root body .bm-popover-close{display:grid;place-items:center;flex:0 0 44px;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;padding:0;border:0;border-radius:9px;background:transparent;color:#536d85;font:24px/1 sans-serif;cursor:pointer;touch-action:manipulation}
html:root body[data-app-layout="portrait"] .habitat-inspect-popover{width:min(260px,calc(var(--bm-app-width) - 16px));border-radius:11px;animation:none}
.habitat-inspect-popover{overflow:hidden!important;display:flex;flex-direction:column}
.habitat-inspect-body{min-height:0;overflow:auto;overscroll-behavior:contain}
html[data-brand-visual-mode="phone"] body{border:0!important;box-shadow:0 0 0 1px rgba(193,205,217,.9),0 26px 80px rgba(46,61,77,.18)!important}
/* Result references use the same effective bounds and controls in every shell. */
html:root body[class] .bird-reference-overlay{position:fixed!important;inset:auto!important;left:var(--bm-app-left)!important;top:var(--bm-app-top)!important;width:var(--bm-app-width)!important;height:var(--bm-app-height)!important;padding:10px!important;box-sizing:border-box}
html:root body[class] .bird-reference-viewer{width:auto!important;max-width:100%!important;max-height:100%!important;gap:10px!important;margin:0!important;font:16px/1.5 "PingFang SC","Microsoft YaHei",sans-serif!important;color:#1f2328!important}
html:root body[class] .bird-reference-frame{position:relative!important;display:block!important;width:auto;max-width:100%!important}
html:root body[class] .bird-reference-overlay:not(.is-flock-annotation) .bird-reference-frame{width:min(760px,calc(var(--bm-app-width) - 40px),calc(var(--bm-app-height) - 120px))!important}
html:root body[class] #bird-reference-overlay .bird-reference-stage{min-width:0!important;min-height:0!important;max-width:100%!important;max-height:100%!important;border-radius:14px!important;overflow:hidden!important}
html:root body[class] .bird-reference-overlay:not(.is-flock-annotation) .bird-reference-stage{width:100%!important;aspect-ratio:1!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;z-index:0!important}
html:root body[class] .bird-reference-overlay:not(.is-flock-annotation) .bird-reference-stage>img{width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;border-radius:14px!important;background:transparent!important}
html:root body[class] .bird-reference-overlay.is-flock-annotation .bird-reference-stage{aspect-ratio:auto!important;touch-action:none}
html:root body[class] .bird-reference-overlay.is-flock-annotation .bird-reference-stage>img{max-width:none!important;max-height:none!important;touch-action:none}
html:root body[class] .bird-reference-nav{position:absolute!important;top:calc(50% - 22px)!important;z-index:9!important;width:44px!important;height:44px!important;margin:0!important;border-radius:10px!important;font:25px/1 sans-serif!important;pointer-events:auto!important;touch-action:manipulation}
html:root body[class] .bird-reference-nav.is-prev{left:4px!important}
html:root body[class] .bird-reference-nav.is-next{right:4px!important}
html:root body[class] #bird-reference-overlay .bird-display-caption{display:flex!important;flex-direction:column!important;align-items:center!important;gap:2px!important;box-sizing:border-box!important;width:100%!important;max-width:100%!important;padding:10px 8px 0!important;color:#536576!important;font:13px/1.5 "PingFang SC","Microsoft YaHei",sans-serif!important;text-align:center!important}
html:root body[class] #bird-reference-overlay .bird-display-caption b{font-size:13px!important;font-weight:700!important;line-height:1.5!important}
html:root body[class] #bird-reference-overlay .bird-display-caption i{font-size:11px!important;font-weight:400!important;line-height:1.5!important}
html:root body[class] #bird-reference-overlay .bird-display-caption small{font-size:10px!important;font-weight:400!important;line-height:1.5!important}
/* Close controls follow the effective layout, including the phone preview. */
html:root body[class][data-app-layout="landscape"] :is(#llm-detail-overlay,[data-bm-dialog]) :is(.llm-dialog-portrait-close,.portrait-dialog-close,.portrait-dialog-native-close,.image-library-viewer-close),
html:root body[data-app-layout="landscape"] .bm-popover-close{display:none!important}
html:root body[class][data-app-layout="portrait"] :is(#llm-detail-overlay,[data-bm-dialog]) :is(.llm-dialog-portrait-close,.portrait-dialog-close,.portrait-dialog-native-close,.image-library-viewer-close),
html:root body[data-app-layout="portrait"] .bm-popover-close{font:20px/1 sans-serif!important;border:0!important;background:transparent!important;box-shadow:none!important;border-radius:8px!important}
html:root body[class][data-app-layout="landscape"] :is(.upload-preview-head,.image-overlay-head,.llm-detail-head,.reasoning-feature-detail-head,.target-picker-head,.vision-target-heading){padding-right:16px!important}

/* One effective result contract for local and publish; shells supply data only. */
html:root body .llm-stage-capsule{
  display:grid!important;grid-template-columns:8px minmax(0,1fr) auto!important;align-items:center!important;gap:10px!important;
  box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important;flex:0 0 auto!important;
  height:auto!important;min-height:52px!important;max-height:none!important;padding:10px 12px!important;text-align:left!important;overflow:hidden!important;
}
html:root body .llm-stage-copy{display:grid!important;grid-template-columns:minmax(90px,23%) minmax(0,1fr)!important;gap:10px!important;min-width:0!important;max-width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}
html:root body .llm-stage-copy :is(.llm-stage-title,.llm-stage-summary){display:block!important;min-width:0!important;width:auto!important;max-width:100%!important;height:auto!important;max-height:none!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:break-word!important;text-overflow:clip!important;-webkit-line-clamp:unset!important;line-clamp:unset!important;line-height:1.6!important;overflow:visible!important}
html:root body .llm-stage-open{display:flex!important;align-items:center!important;gap:3px!important;align-self:center!important;white-space:nowrap!important;font-size:11px!important;min-width:0!important}
html:root body :is(#ai-chat,#chat) .reasoning-process{width:100%!important;max-width:100%!important;min-width:0!important;flex:0 0 auto!important;padding:8px!important;box-sizing:border-box!important}
html:root body :is(#ai-chat,#chat,#vision-dialog,#flock-summary-results,#flock-summary){scroll-behavior:auto!important;overflow-anchor:none!important}
html:root body .reasoning-compose :is(.reasoning-send,.reasoning-reset){display:flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important;padding:0!important;line-height:1!important;text-indent:0!important;font-size:0!important}
html:root body .reasoning-compose :is(.reasoning-send,.reasoning-reset)::before,
html:root body .reasoning-compose :is(.reasoning-send,.reasoning-reset)::after{content:none!important}
html:root body .reasoning-compose :is(.reasoning-send,.reasoning-reset)>svg{display:block!important;flex:none!important;width:22px!important;height:22px!important;margin:0!important;transform:none!important;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* Text stays in normal flow. No percentage-height sections in scrolling cards. */
html:root body #llm-detail-body{box-sizing:border-box!important;scrollbar-gutter:auto!important;overflow-x:hidden!important;overflow-y:auto!important;word-break:normal;overflow-wrap:anywhere}
html:root body #llm-detail-body :is(section,article,header,div,dl,dt,dd,p){min-width:0;box-sizing:border-box;max-width:100%}
html:root body #llm-detail-body .llm-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;align-items:start!important;min-height:0!important;height:auto!important}
html:root body #llm-detail-body .llm-detail-section{height:auto!important;min-height:0!important;align-self:stretch;overflow-wrap:anywhere}
html:root body #llm-detail-body :is(.llm-detail-headline,.llm-detail-subline,.llm-detail-copy,.llm-detail-row,.vision-final-candidate,.vision-final-candidate-head,.vision-final-candidate-metrics,.vision-final-candidate-reason){white-space:normal!important;overflow-wrap:anywhere!important;word-break:break-word!important}
html:root body #llm-detail-body .llm-detail-row{display:flex!important;align-items:flex-start!important;flex-wrap:wrap!important;gap:8px!important}
html:root body #llm-detail-body .llm-detail-row>span:not(.llm-detail-rank):not(.llm-detail-score){flex:1 1 0;min-width:0}
html:root body #llm-detail-body .llm-detail-row>:only-child{flex:1 1 100%!important;width:100%!important;max-width:100%!important}
html:root body #llm-detail-body .llm-detail-row>:is(b,small,.llm-detail-rank,.llm-detail-score,.bird-reference-avatar){flex:0 0 auto;max-width:100%}
html:root body #llm-detail-body :is(.ai-semantic-tag,.ai-node-tag,.ai-source-tag,.geo-city-chip,.reasoning-mini-tag){display:inline-block!important;max-width:100%!important;box-sizing:border-box!important;height:auto!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:break-word!important;line-height:1.6!important;vertical-align:baseline!important}
html:root body #llm-detail-body .reasoning-source-list{grid-template-columns:minmax(0,1fr)!important}
html:root body #llm-detail-overlay .llm-detail-card{animation:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
html:root body #llm-detail-overlay :is(.llm-detail-head,.llm-detail-body,.llm-detail-section,.llm-detail-row,.llm-detail-kpi,.vision-final-candidate,.vision-decision-block){filter:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;transform:none!important;contain:none!important;will-change:auto!important}
html:root body #bird-reference-overlay .bird-reference-stage,
html:root body #bird-reference-overlay .bird-reference-stage>img{touch-action:none!important;user-select:none;-webkit-user-select:none;-webkit-user-drag:none}

.ask-structured{color:var(--text,#405368);font-size:14px;line-height:1.7;min-width:0;overflow-wrap:anywhere}
.ask-summary{padding:2px 0 16px;border-bottom:1px solid rgba(123,146,168,.2)}
.ask-summary h2{font-size:21px;margin:0 0 8px;color:#30485f}.ask-summary p{margin:0}
.ask-section-title{font-size:16px;line-height:1.5;margin:12px 0 8px;color:#456583;font-weight:650}
.ask-section-title>span{float:right;margin-left:12px;font-size:12px;font-weight:400;color:#7c8c9e}
.ask-section-title::after{content:"";display:block;clear:both}
/* Full species profiles vary in length: keep each next bird in reading order
   directly after the preceding profile, without a shared two-column row. */
.ask-candidate-grid{display:block}
.ask-candidate{min-width:0;padding:20px 0;border-bottom:1px solid rgba(123,146,168,.2)}
.ask-candidate header{display:flex;align-items:center;gap:12px}.ask-candidate header>div{min-width:0}
.ask-candidate header h3{font-size:18px;margin:0!important}.ask-candidate header small,.ask-candidate header i{display:block;color:#718496;font-size:12px}
.ask-candidate>p{margin:12px 0}.ask-candidate .bird-reference-avatar{flex-shrink:0}
.ask-knowledge{padding:8px 0;border-bottom:1px solid rgba(123,146,168,.15)}
.ask-profile{margin:4px 0}.ask-profile>.ask-section-title{font-size:12px;font-weight:500;color:#728599}
.ask-facts,.ask-matches{margin:0}.ask-facts>div,.ask-matches>div{display:grid;grid-template-columns:minmax(64px,25%) minmax(0,1fr);gap:12px;padding:7px 0;border-bottom:1px solid rgba(123,146,168,.08)}
.ask-facts dt,.ask-matches dt{color:#728599}.ask-facts dd,.ask-matches dd{margin:0;min-width:0;text-align:justify;text-justify:inter-ideograph}.ask-matches dd span,.ask-matches dt small{display:block}.ask-matches dt small{font-size:10px;font-weight:400}
.ask-scope{font-size:12px;color:#728599}.ask-fact-row p{margin:4px 0 12px}.ask-next{margin-top:20px;padding-left:14px;border-left:3px solid #8aa8bd}.ask-next h3{font-size:17px}.ask-next ol{padding-left:20px}.ask-next li{margin:8px 0}
.ask-full-answer,.ask-sources{margin-top:18px;border-top:1px solid rgba(123,146,168,.2)}.ask-sources .reasoning-source-card{background:transparent;box-shadow:none}
.ask-structured :is(p,li),.ask-full-answer .ai-md{text-align:justify;text-justify:inter-ideograph}
html:root body .bird-reference-strip.ask-reference-order{display:flex!important;align-items:center!important;justify-content:space-between!important;flex-wrap:nowrap!important;gap:28px!important;width:100%;max-width:100%;min-width:0;overflow-x:auto!important;overflow-y:hidden!important;touch-action:pan-x;overscroll-behavior-x:contain;padding:0 0 14px;border:0;border-bottom:1px solid rgba(123,146,168,.2);border-radius:0;background:transparent;box-shadow:none}
html:root body .ask-reference-main{display:flex;flex:0 0 auto;align-items:center;gap:12px}
html:root body .ask-reference-peers{display:flex;flex:0 0 auto;align-items:center;gap:12px;margin-left:auto;max-width:none!important;text-align:right}
.ask-reference-peers>small{flex:none;color:#8292a2;font-size:11px}.ask-reference-peers>div{display:flex;align-items:center;flex-wrap:nowrap;gap:12px}
html:root body .ask-reference-order .bird-reference-chip{display:flex;flex:0 0 auto;flex-direction:row;align-items:center;white-space:nowrap;gap:7px;font-size:12px}
@media(max-width:820px){
  /* Live input/status headers use the same natural-height rule as progress. */
  html:root body[data-app-layout="portrait"] :is(.environment-capsule.is-module-bar:not(.is-expanded),.reasoning-upload.is-module-bar:not(.is-context-expanded)) :is(.upload-capsule-bar,.environment-capsule-summary,.upload-capsule-main){height:auto!important;min-height:44px!important;max-height:none!important}
  html:root body[data-app-layout="portrait"] :is(.environment-capsule.is-module-bar:not(.is-expanded),.reasoning-upload.is-module-bar:not(.is-context-expanded)) .upload-capsule-copy b{position:relative!important;display:block!important;padding:4px 0 4px 25px!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:break-word!important;height:auto!important;max-height:none!important;line-height:1.6!important;overflow:visible!important}
  html:root body[data-app-layout="portrait"] :is(.environment-capsule.is-module-bar:not(.is-expanded),.reasoning-upload.is-module-bar:not(.is-context-expanded)) .upload-capsule-copy b::before{position:absolute;left:0;top:6px}
  /* Block copy avoids percentage-height grid cycles in mobile Blink.
     Actions share the title line; summaries use the remaining full width. */
  html:root body[data-app-layout="portrait"] :is(#page-vision,#page-flock,#page-reasoning,#vision,#flock,#reasoning) .llm-stage-capsule{position:relative!important;display:block!important;height:auto!important;min-height:52px!important;max-height:none!important;flex:0 0 auto!important;padding:10px 12px 10px 30px!important;overflow:hidden!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;filter:none!important;transform:none!important}
  html:root body[data-app-layout="portrait"] :is(#page-vision,#page-flock,#page-reasoning,#vision,#flock,#reasoning) .llm-stage-copy{display:block!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}
  html:root body[data-app-layout="portrait"] :is(#page-vision,#page-flock,#page-reasoning,#vision,#flock,#reasoning) :is(.llm-stage-title,.llm-stage-summary){display:block!important;height:auto!important;min-height:0!important;max-height:none!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:break-word!important;overflow:visible!important;-webkit-line-clamp:unset!important;line-clamp:unset!important;line-height:1.6!important}
  html:root body[data-app-layout="portrait"] .llm-stage-title{padding-right:62px!important}
  html:root body[data-app-layout="portrait"] .llm-stage-summary{margin-top:3px!important;padding:0!important}
  html:root body[data-app-layout="portrait"] .llm-stage-dot{position:absolute!important;left:12px!important;top:16px!important;margin:0!important}
  html:root body[data-app-layout="portrait"] .llm-stage-open{position:absolute!important;right:12px!important;top:11px!important;width:auto!important;min-width:0!important;margin:0!important}
  html:root body[data-app-layout="portrait"] :is(#ai-chat,#chat){padding:6px!important}
  html:root body[data-app-layout="portrait"] :is(#page-reasoning,#reasoning) :is(#ai-chat,#chat) .reasoning-process{width:100%!important;max-width:100%!important;border:0!important;padding:0!important;background:transparent!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
  html:root body[data-app-layout="portrait"] :is(#ai-chat,#chat) .reasoning-progress-list{width:100%!important;padding:0!important;margin:0!important;border:0!important;box-shadow:none!important;background:transparent!important}
  html:root body #llm-detail-body .llm-detail-grid{display:block!important}
  html:root body #llm-detail-body .llm-detail-grid>.llm-detail-section+*{margin-top:12px}
  html:root body #llm-detail-overlay::before{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;background:rgba(32,47,64,.28)}
  html:root body[class] #llm-detail-overlay :is(.llm-detail-card,.llm-detail-head,.llm-detail-body),html:root body[class] #reasoning-feature-detail-overlay .reasoning-feature-detail-card{background:#fbfdff!important}
  /* One scrolling card, including its heading. No nested flex scroller or
     giant glass layer to rerasterize during a fast Android fling. */
  html:root body[class] :is(#llm-detail-overlay,#reasoning-feature-detail-overlay) :is(.llm-detail-card,.reasoning-feature-detail-card){display:block!important;position:relative!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;touch-action:pan-y!important;-webkit-overflow-scrolling:touch;isolation:auto!important;box-shadow:none!important}
  html:root body[class] :is(#llm-detail-overlay,#reasoning-feature-detail-overlay) :is(.llm-detail-body,.reasoning-feature-detail-body){display:block!important;flex:none!important;height:auto!important;max-height:none!important;overflow:visible!important;padding:14px!important;scrollbar-gutter:auto!important}
  html:root body[class] :is(#llm-detail-overlay,#reasoning-feature-detail-overlay) :is(.llm-detail-head,.reasoning-feature-detail-head){position:static!important;z-index:auto!important}
  html:root body[class] :is(#llm-detail-overlay,#reasoning-feature-detail-overlay),html:root body[class] :is(#llm-detail-overlay,#reasoning-feature-detail-overlay) *{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;filter:none!important;will-change:auto!important;content-visibility:visible!important;contain:none!important;text-wrap:wrap!important;box-shadow:none!important}
  html:root body[class] :is(#llm-detail-overlay,#reasoning-feature-detail-overlay)::before{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
  .ask-candidate-grid{display:block}.ask-summary h2{font-size:19px}.ask-structured{font-size:13px}
}

/* Display image contract: one size, caption and per-image gesture surface. */
html:root body[class] :is(.image-library-viewer,#ss-image-compare){position:fixed!important;inset:auto!important;left:var(--bm-app-left)!important;top:var(--bm-app-top)!important;width:var(--bm-app-width)!important;height:var(--bm-app-height)!important;padding:10px!important;box-sizing:border-box!important}
html:root body[class] .bird-reference-overlay:not(.is-flock-annotation) .bird-reference-frame,
html:root body[class] .image-library-viewer:not(.is-pair) :is(.image-library-viewer-card,.image-library-viewer-stage){width:var(--bm-display-size)!important;max-width:100%!important}
html:root body[class] .image-library-viewer-stage{position:relative!important;display:block!important;overflow:visible!important;border:0!important;padding:0!important;background:transparent!important}
html:root body[class] .image-library-viewer-card{display:flex!important;flex-direction:column!important;align-items:center!important;filter:none!important;gap:10px!important}
html:root body[class] :is(.image-library-viewer-media,.image-library-viewer-pair-media,.ss-image-compare-stage){width:100%!important;aspect-ratio:1!important;min-height:0!important;height:auto!important;padding:0!important;background:transparent!important;overflow:hidden!important;border:0!important;border-radius:14px!important;touch-action:none;user-select:none}
html:root body[class] :is(.image-library-viewer-media,.image-library-viewer-pair-media,.ss-image-compare-stage)>img{width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;border-radius:14px!important;touch-action:none;user-select:none;-webkit-user-drag:none}
html:root body[class] :is(.image-library-viewer.is-pair .image-library-viewer-card,.image-library-viewer.is-pair .image-library-viewer-stage,.ss-image-compare-grid){width:min(calc(var(--bm-display-size) * 2 + 24px),calc(var(--bm-app-width) - 40px))!important;max-width:100%!important}
html:root body[class] :is(.image-library-viewer-pair,.ss-image-compare-grid){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;align-items:start!important;gap:24px!important;overflow:visible!important}
html:root body[class] .image-library-viewer :is(.image-library-viewer-caption,.bird-display-caption){width:100%!important;padding:10px 8px 0!important;gap:2px!important;font:13px/1.5 'PingFang SC','Microsoft YaHei',sans-serif!important}
html:root body[class] .image-library-viewer .bird-display-caption b{font:700 13px/1.5 'PingFang SC','Microsoft YaHei',sans-serif!important}
html:root body[class] .image-library-viewer .bird-display-caption i{font:italic 11px/1.5 'PingFang SC','Microsoft YaHei',sans-serif!important}
html:root body[class] .image-library-viewer .bird-display-caption small{font:10px/1.5 'PingFang SC','Microsoft YaHei',sans-serif!important}
html:root body[class] :is(.bird-reference-nav,.image-library-viewer-nav){display:grid!important;place-items:center!important;position:absolute!important;top:calc(50% - 22px)!important;width:44px!important;min-width:44px!important;height:44px!important;margin:0!important;padding:0!important;transform:none!important;border:1px solid #dbe4ec!important;border-radius:10px!important;background:rgba(249,252,255,.8)!important;color:#536d85!important;box-shadow:none!important;font:25px/1 sans-serif!important;touch-action:manipulation;-webkit-tap-highlight-color:transparent!important;z-index:9!important}
html:root body[class] :is(.bird-reference-nav,.image-library-viewer-nav).is-prev{left:4px!important;right:auto!important}
html:root body[class] :is(.bird-reference-nav,.image-library-viewer-nav).is-next{right:4px!important;left:auto!important}
html:root body[class] :is(.bird-reference-nav,.image-library-viewer-nav)[hidden]{display:none!important}
html:root body[class] :is(.bird-reference-nav,.image-library-viewer-nav):focus:not(:focus-visible){outline:none!important}
html:root body[class] :is(.bird-reference-nav,.image-library-viewer-nav):focus-visible{outline:2px solid #5b86c2!important;outline-offset:2px!important}
@media(hover:hover) and (pointer:fine){html:root body[class] :is(.bird-reference-nav,.image-library-viewer-nav):hover:not(:disabled){background:#e9f1fa!important;color:#315578!important}}
html:root body[data-app-layout="landscape"] :is(.bird-reference-nav,.image-library-viewer-nav).is-prev{left:-52px!important}
html:root body[data-app-layout="landscape"] :is(.bird-reference-nav,.image-library-viewer-nav).is-next{right:-52px!important}
html:root body .ask-reference-peers>small{writing-mode:vertical-rl;white-space:nowrap;align-self:center;text-align:center;line-height:1.4;letter-spacing:2px}
html:root body[class] :is(.image-library-viewer-pair,.image-library-viewer-media,.image-library-viewer-caption)[hidden]{display:none!important}
