.rich-html figcaption{font-size:12px;color:var(--desc);margin-top:4px}
.fullscreen-tool{margin-left:auto}
.editor-shell.fullscreen{position:fixed;inset:0;z-index:82;background:var(--background);padding:calc(12px + env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) calc(22px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));margin:0!important;border-radius:0!important;border:none!important;box-shadow:none!important;display:grid;grid-template-rows:auto auto 1fr auto auto;overflow:hidden}
.editor-shell.fullscreen::before,.editor-shell.fullscreen .rich-toolbar,.editor-shell.fullscreen .editor-stage,.editor-shell.fullscreen .editor-footer{width:min(1100px,100%);margin-inline:auto}
.editor-shell.fullscreen .editor-stage{min-height:0;display:flex;flex-direction:column}
.editor-shell.fullscreen .rich-editor{flex:1;min-height:calc(100dvh - 250px);padding:12px 14px;border:1px solid var(--border);border-radius:18px;background:var(--secondbackground);overflow:auto}
.editor-shell.fullscreen .editor-footer{margin-top:0}
.editor-shell.fullscreen::before{content:'Fullscreen editor';font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--desc);display:block;margin-bottom:6px}
.drawer{position:fixed;inset:0;display:none;z-index:48}
.drawer.active{display:block}
.drawer-pane{position:absolute;left:0;right:0;bottom:0;background:var(--background);border-radius:24px 24px 0 0;border:1px solid var(--border);padding:16px;max-height:min(94svh,calc(100dvh - 8px));overflow:auto;display:grid;grid-template-rows:auto 1fr}
.drawer-pane .editor-shell{min-height:0}
.drawer-pane .rich-editor{min-height:220px;background:var(--secondbackground);border:1px solid var(--border);border-radius:16px;padding:14px 14px 18px}
.fab-stack,.fab-stack button{pointer-events:auto;touch-action:manipulation}
.warning-btn,.quick-btn{position:relative;z-index:42}
@media (max-width:767px){
  .editor-shell.fullscreen{padding:calc(10px + env(safe-area-inset-top)) 10px calc(18px + env(safe-area-inset-bottom)) 10px}
  .editor-shell.fullscreen::before,.editor-shell.fullscreen .rich-toolbar,.editor-shell.fullscreen .editor-stage,.editor-shell.fullscreen .editor-footer{width:100%}
  .content-shell{padding-bottom:126px!important}
  .search-btn .kbd{display:none!important}
  .topbar{padding:8px 10px}
  .topbar .header-card{gap:6px;padding:0}
  .topbar-title{font-size:15px}
  .search-btn{min-width:44px;width:44px;max-width:44px;padding:0;justify-content:center}
  .search-btn span:not(:first-child){display:none}
  .bottom-nav{grid-template-columns:repeat(5,minmax(0,1fr))!important;height:72px!important;padding:6px 6px calc(8px + env(safe-area-inset-bottom))!important;overflow:hidden}
  .bottom-nav a{min-width:0;gap:3px;font-size:10px!important;line-height:1.02;padding:0 2px}
  .bottom-nav a span{display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .fab-stack{right:max(14px, env(safe-area-inset-right));bottom:calc(98px + env(safe-area-inset-bottom))!important;gap:12px;z-index:49}
  .drawer-pane{padding:14px 14px calc(18px + env(safe-area-inset-bottom));max-height:calc(100dvh - 6px);border-radius:22px 22px 0 0}
  .drawer-pane .page-toolbar{margin-bottom:10px}
  .drawer-pane .editor-footer{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .drawer-pane .editor-footer .input-tagbox{grid-column:1 / -1;min-width:0}
}



/* V11.7 orientation + mobile reflow hardening */
html,body{overscroll-behavior:none;touch-action:manipulation}
body.compact-shell .search-btn .search-label,
body.compact-shell .search-btn .search-kbd{display:none!important}
body.compact-shell .search-btn{width:42px!important;min-width:42px!important;max-width:42px!important;padding:0!important;justify-content:center}
body.compact-shell .topbar-actions{gap:4px}
body.compact-shell .icon-btn{width:38px;min-width:38px;height:38px;padding:0}
body.tablet-shell .content-wrap{height:auto;min-height:100%}
body.tablet-shell .resources-layout{grid-template-columns:minmax(200px,240px) minmax(0,1fr)!important}
