/* Browser-only fixes, loaded after the shared desktop visual styles. */
/* Existing skins use layered !important rules; use their first layer rather
   than ineffective unlayered overrides. Reduced-motion rules remain intact. */
@layer lx-calm {
@media(min-width:761px) {
  body#focused-ui-preview header.topbar.has-studio-toolbar { box-sizing:border-box!important; max-width:100%!important; column-gap:6px!important; padding-left:16px!important; padding-right:16px!important; }
}
body#focused-ui-preview #panel-records .records-actions,
body#focused-ui-preview #panel-records #recordsFilter {
  display:flex!important; flex-wrap:wrap!important; min-width:0!important; gap:8px!important;
}
body#focused-ui-preview #panel-records .records-actions { align-items:center!important; }
body#focused-ui-preview #panel-records #recordsFilter { flex:1 1 320px!important; }
body#focused-ui-preview #panel-records .records-actions button,
body#focused-ui-preview #panel-records .record-actions button,
body#focused-ui-preview #panel-records #usageControls button {
  flex:0 0 auto!important; min-width:max-content!important; white-space:nowrap!important;
  word-break:normal!important; writing-mode:horizontal-tb!important; line-height:1.5!important;
}
body#focused-ui-preview #panel-records .record-main { min-width:0!important; flex-wrap:wrap!important; }
body#focused-ui-preview #panel-records .record-info { flex:1 1 180px!important; min-width:0!important; overflow-wrap:anywhere; }
body#focused-ui-preview #panel-records .record-actions { display:flex!important; flex-wrap:wrap!important; gap:8px!important; max-width:100%!important; }
body#focused-ui-preview #panel-records .record-preview video { max-width:100%!important; }
body#focused-ui-preview .bw-records-notice { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding:14px; margin:12px 0; border:1px solid #c8a66a55; border-radius:12px; color:#ead9b6; line-height:1.7; }
body#focused-ui-preview .bw-records-notice span { flex:1 1 200px; }
body#focused-ui-preview .bw-records-notice[hidden] { display:none!important; }
body#focused-ui-preview #runningPop { width:min(460px,calc(100vw - 24px))!important; max-height:min(520px,70dvh)!important; overflow:auto!important; box-sizing:border-box; }
body#focused-ui-preview #runningPop .running-pop-item { display:grid!important; grid-template-columns:24px minmax(0,1fr) auto auto!important; gap:8px!important; }
body#focused-ui-preview #runningPop .rpi-info { min-width:0!important; }
body#focused-ui-preview #runningPop .rpi-title { white-space:normal!important; overflow-wrap:anywhere; line-height:1.6!important; }
body#focused-ui-preview #runningPop button { min-width:max-content!important; white-space:nowrap!important; word-break:normal!important; flex-shrink:0!important; }
@media(max-width:1100px) {
  body#focused-ui-preview #panel-oral-guide .og-steps { display:grid!important; grid-template-columns:repeat(auto-fit,minmax(95px,1fr))!important; overflow:visible!important; gap:6px!important; }
  body#focused-ui-preview #panel-oral-guide .og-steps button { min-width:0!important; width:100%!important; white-space:normal!important; }
  body#focused-ui-preview #panel-oral-guide .og-steps button::after { display:none!important; }
}
@media(max-width:760px) {
  body#focused-ui-preview header.topbar.has-studio-toolbar {
    display:grid!important; grid-template-columns:34px minmax(0,1fr) 76px 38px!important;
    gap:6px!important; padding:8px 12px!important; height:auto!important; min-height:0!important;
    align-items:center!important;
  }
  body#focused-ui-preview header.topbar > .bw-nav-toggle { grid-area:1/1!important; }
  body#focused-ui-preview header.topbar > .brand { grid-area:1/2!important; width:auto!important; min-width:0!important; gap:6px!important; }
  body#focused-ui-preview header.topbar .brand h1 { font-size:14px!important; }
  body#focused-ui-preview header.topbar > #studioNavToolbar { grid-area:1/3!important; display:flex!important; width:76px!important; min-width:0!important; gap:4px!important; margin:0!important; padding:0!important; }
  body#focused-ui-preview header.topbar #studioNavToolbar button.studio-search-entry,
  body#focused-ui-preview header.topbar #studioNavToolbar button.studio-history-entry { width:36px!important; height:36px!important; min-width:0!important; padding:8px!important; flex:none!important; }
  body#focused-ui-preview header.topbar #studioNavToolbar .studio-search-label,
  body#focused-ui-preview header.topbar #studioNavToolbar .studio-search-keys,
  body#focused-ui-preview header.topbar #studioNavToolbar .studio-history-label,
  body#focused-ui-preview header.topbar #studioNavToolbar .studio-history-chevron { display:none!important; }
  body#focused-ui-preview header.topbar > .zlw-actions { grid-area:1/4!important; margin:0!important; }
  body#focused-ui-preview header.topbar > #topbarBalance { grid-area:2/1/3/-1!important; display:flex!important; min-width:0!important; width:100%!important; height:30px!important; margin:0!important; box-sizing:border-box!important; }
  body#focused-ui-preview header.topbar > .acct-group { grid-area:3/1/4/4!important; display:flex!important; min-width:0!important; width:auto!important; gap:6px!important; margin:0!important; }
  body#focused-ui-preview header.topbar .acct-group #accountSwitcher { display:flex!important; min-width:0!important; margin:0!important; }
  body#focused-ui-preview header.topbar .acct-group .as-name,
  body#focused-ui-preview header.topbar .acct-group .as-arrow { display:inline!important; }
  body#focused-ui-preview header.topbar .acct-group .as-trigger,
  body#focused-ui-preview header.topbar .acct-group .gc-trigger { height:34px!important; min-height:34px!important; min-width:0!important; padding:5px 8px!important; font-size:11px!important; white-space:nowrap!important; }
  body#focused-ui-preview header.topbar .acct-group .as-sub { display:none!important; }
  body#focused-ui-preview header.topbar > #providerPlanButton { grid-area:3/4!important; min-width:0!important; width:38px!important; height:34px!important; padding:2px!important; font-size:0!important; margin:0!important; }
  body#focused-ui-preview header.topbar > #providerPlanButton::before { content:'套餐'; font-size:11px; }
  body#focused-ui-preview header.topbar > #runningWrap { grid-area:4/1/5/-1!important; justify-self:end!important; margin:0!important; }
  body#focused-ui-preview header.topbar #asMenu { position:fixed!important; top:var(--studio-topbar-height,128px)!important; left:12px!important; right:12px!important; width:auto!important; max-width:none!important; }
  body#focused-ui-preview main { top:var(--studio-topbar-height,128px)!important; height:calc(100dvh - var(--studio-topbar-height,128px))!important; max-height:calc(100dvh - var(--studio-topbar-height,128px))!important; }
  body#focused-ui-preview nav.tabs.sidebar { top:var(--studio-topbar-height,128px)!important; height:calc(100dvh - var(--studio-topbar-height,128px))!important; max-height:calc(100dvh - var(--studio-topbar-height,128px))!important; }
  body#focused-ui-preview .bw-nav-shade { top:var(--studio-topbar-height,128px)!important; }
  body#focused-ui-preview #panel-records .panel-header { align-items:flex-start!important; flex-wrap:wrap!important; gap:14px!important; }
  body#focused-ui-preview #panel-records .records-actions { width:100%!important; }
  body#focused-ui-preview #panel-records .record-actions { flex:1 1 100%!important; justify-content:flex-start!important; }
  body#focused-ui-preview #panel-records #usageControls .usage-buttons { display:flex!important; flex-wrap:wrap!important; gap:8px!important; }
  body#focused-ui-preview .ws-bar { display:grid!important; grid-template-columns:minmax(0,1fr) auto!important; align-items:start!important; gap:8px!important; padding:12px!important; }
  body#focused-ui-preview .ws-bar .ws-actions { align-self:start!important; }
  body#focused-ui-preview .ws-bar .ws-notice { max-height:76px; }
  body#focused-ui-preview #runningPop { position:fixed!important; right:12px!important; left:auto!important; top:var(--studio-topbar-height,128px)!important; }
}
@media(max-width:400px) {
  body#focused-ui-preview #panel-records #recordsFilter { flex-basis:100%!important; }
  body#focused-ui-preview #panel-records #recordsFilter button { padding:8px 10px!important; }
  body#focused-ui-preview #runningPop .running-pop-item { grid-template-columns:minmax(0,1fr) auto auto!important; }
  body#focused-ui-preview #runningPop .rpi-icon { display:none!important; }
}
}
