.xixi-sticky475{position:sticky!important;top:var(--sticky-top475)!important;z-index:var(--sticky-z475)!important}
/* Keep the native border space, but paint the body and header enclosure once each. */
.xixi-sticky-table475{position:relative;overflow:visible!important;border-color:transparent!important}
.xixi-sticky-table475::before{content:"";position:absolute;inset:var(--sticky-frame-inset475);border:var(--sticky-border475);border-radius:inherit;clip-path:inset(var(--sticky-body-start475) 0 0);pointer-events:none}
thead.xixi-sticky475::after{content:"";position:absolute;inset:-1px var(--sticky-outline-right475,-1px) 0 var(--sticky-outline-left475,-1px);border:var(--sticky-border475);border-bottom:0;border-radius:var(--sticky-radius475) var(--sticky-radius475) 0 0;pointer-events:none}

/* Collapsed table borders normally belong to the scrolling table paint layer.
   Paint the same border strokes on the stationary cells without changing widths. */
thead.xixi-sticky475 th{position:relative;border-right-color:transparent!important;border-bottom-color:transparent!important}
thead.xixi-sticky475 th::after{content:"";position:absolute;inset:0 -.5px -1px 0;border-right:var(--sticky-cell-right475);border-bottom:var(--sticky-cell-bottom475);pointer-events:none}

/* Release extra controls into normal flow when the full dock occupies half the view. */
.xixi-sticky475.xixi-unpinned475{position:relative!important;top:auto!important;z-index:auto!important}

/* Keep the text-management controls with the existing admin dock while the
   page scrolls. The inner text list keeps its own independent scrollbar. */
#adminTextToolbar{background:#fff;padding:0 0 1px}
body.theme-dark #adminTextToolbar{background:#1e293b}
#adminTextToolbar.xixi-stuck475{isolation:isolate}
/* Repaint the original settings card's padded background and outer frame with
   the toolbar. The real section stays in flow and keeps its normal scrollbar. */
#adminTextToolbar.xixi-stuck475::before{content:"";position:absolute;inset:-20px -21px -20px;background:#fff;border:1px solid #e2e8f0;border-bottom:0;border-radius:8px 8px 0 0;z-index:-1;pointer-events:none}
body.theme-dark #adminTextToolbar.xixi-stuck475::before{background:#1e293b;border-color:#334155}

/* v163.478: give the document canvas its own paint, and share the body surface.
   The header does not create a second forced-dark background. The sticky
   occluder inherits in CSS instead of copying a browser-adjusted JS color. */
html{background-color:#f3f4f6}
html:has(body.theme-dark){background-color:#0f172a}
body{--xixi-dock-background:#f3f4f6}
body.theme-dark{--xixi-dock-background:#0f172a}
/* The fixed occluder paints the gaps behind the dock. Do not extend pseudo
   elements outside rows: they cover borders and enlarge the mobile viewport. */
/* Cards retain their own opaque theme surface when pinned. */
.xixi-stuck475:not(thead):not(#adminTextToolbar):not(.challenge-card){background-color:var(--xixi-dock-background)}
body>.xixi-dock-surface470{background:var(--xixi-dock-background)}
.xixi-swipe-surface{position:sticky;top:0;height:0;z-index:55;pointer-events:none}
.xixi-swipe-surface::before{content:"";position:absolute;inset:0 0 auto;height:var(--dock-height);background:var(--xixi-dock-background)}
