/* CPGCBL EMD R11.0 -- shared dense UI, sticky workspaces, borderless media lightbox.
   NO back-end writes. All palettes use the existing light/dark/hybrid selector. */
:root{--r110-header:60px;--r110-tabs:42px;--r110-control:34px;--r110-ease:cubic-bezier(.2,.75,.25,1)}
body.r107-ui[data-theme=light]{--bg:#eef3f7;--panel:#fff;--panel2:#f8fafc;--panel3:#eaf3f5;--line:#dae3e9;--text:#183045;--muted:#526a7b;--accent:#087d86;--accent2:#2474a9;--shadow:0 2px 13px #112e5010;--r110-subtle:#d5e3eb}
body.r107-ui[data-theme=dark]{--bg:#0b1926;--panel:#172b3d;--panel2:#1b3346;--panel3:#254458;--line:#365064;--text:#f2f8fc;--muted:#bdd0dc;--accent:#61d8d3;--accent2:#8ec2ee;--shadow:0 3px 18px #0003;--r110-subtle:#385669}
body.r107-ui[data-theme=hybrid]{--bg:#eef0f8;--panel:#fff;--panel2:#f6f8ff;--panel3:#ebeffb;--line:#d8deec;--text:#263751;--muted:#536680;--accent:#426bb8;--accent2:#009d9c;--shadow:0 2px 13px #203e6920;--r110-subtle:#d3deee}
body.r107-ui{font-family:Inter,"Segoe UI",system-ui,Arial,sans-serif!important;font-size:13px;line-height:1.36}
body.r107-ui .top{position:sticky!important;top:0!important;z-index:75!important;box-shadow:0 3px 10px #17395112!important;background:var(--panel)!important}
body.r107-ui #content{padding:10px 14px 22px!important}
body.r107-ui #content>.r5-shell{animation:none!important;transform:none!important;min-height:0}
body.r107-ui #content :is(.r5-hero,.r4-hero,.daily-hero){min-height:74px!important;padding:11px 15px!important;margin-bottom:9px!important;border:1px solid var(--line)!important;box-shadow:var(--shadow)!important}
body.r107-ui #content :is(.r5-hero h1,.r4-hero h1,.daily-hero h1){font-size:clamp(19px,1.8vw,23px)!important;margin:3px 0 4px!important;line-height:1.2!important}
body.r107-ui #content :is(.r5-kpis,.r79-bearing-kpis){gap:7px!important;margin:7px 0 10px!important}
body.r107-ui #content :is(.r5-kpi,.r4-kpi,.parity-kpi,.r79-kpi){min-height:60px!important;padding:8px 11px!important;border-color:var(--line)!important;box-shadow:0 1px 8px #122e4810!important;border-radius:10px!important}
body.r107-ui #content :is(.r5-kpi,.r4-kpi,.parity-kpi) :is(small,.label,span){line-height:1.3}
body.r107-ui #content :is(.r5-card,.card,.r79-panel-card,.r5-status-card){padding:10px 12px!important;box-shadow:0 1px 9px #1236530d!important;border-color:var(--line)!important;border-radius:10px!important}
body.r107-ui #content :is(.r5-grid,.r4-grid,.daily-insights,.r5-status-grid){gap:8px!important}
body.r107-ui #content :is(.r5-card,.card,.r79-panel-card){min-height:0!important;animation:none!important}
body.r107-ui #content :is(.r5-card h2,.r5-card h3,.card h3){margin:0 0 6px!important;line-height:1.3!important}
body.r107-ui #content :is(.r5-filter,.r4-filterbar,.r79-filterbar,.work-toolbar,.toolbar){gap:5px!important;padding:6px!important;min-height:0!important;margin-bottom:7px!important;border-color:var(--line)!important;box-shadow:0 1px 8px #15324c0c!important}
body.r107-ui #content :is(.r5-filter,.r4-filterbar,.work-toolbar,.toolbar) :is(input,select,.btn,button){min-height:var(--r110-control)!important;height:auto!important;padding:6px 9px!important;border-radius:7px!important;box-shadow:none!important}
body.r107-ui #content :is(.r5-tabs,.r4-tabs,.modules,.tabs){min-height:var(--r110-tabs)!important;margin-bottom:6px!important;border-color:var(--line)!important;border-radius:9px!important;box-shadow:0 1px 8px #183c6010!important}
body.r107-ui #content :is(.r5-tabs,.r4-tabs,.modules,.tabs) > :is(button,.tab,.module){min-height:29px!important;padding:5px 9px!important}
/* Universal sticky system. Never sticky the internal detail drawer. */
body.r107-ui #content [data-r110-sticky="tabs"]{position:sticky!important;top:var(--r110-header)!important;z-index:64!important;background:var(--panel)!important;box-shadow:0 5px 10px #16385715!important}
body.r107-ui #content [data-r110-sticky="filters"]{position:sticky!important;top:calc(var(--r110-header) + var(--r110-tabs))!important;z-index:63!important;background:var(--panel)!important;box-shadow:0 5px 10px #16385714!important}
body.r107-ui #content [data-r110-sticky="filters-only"]{position:sticky!important;top:var(--r110-header)!important;z-index:63!important;background:var(--panel)!important}
body.r107-ui #content [data-r110-sticky="table-tools"]{position:sticky!important;top:calc(var(--r110-header) + var(--r110-tabs) + var(--r110-control) + 10px)!important;z-index:60!important;background:var(--panel)!important;padding:4px 0!important}
/* In independently scrolling tables, keep column headers visible. */
body.r107-ui #content :is(.r5-tablewrap,.tablewrap,.r79-table-scroll,.r4-tablewrap){max-width:100%;overscroll-behavior:contain}
body.r107-ui #content :is(.r5-table,.table,.r79-table,.r4-table) thead th{position:sticky!important;top:0;z-index:3;background:var(--panel3)!important;box-shadow:inset 0 -1px 0 var(--line);font-size:11px;padding:8px 9px!important}
body.r107-ui #content :is(.r5-table,.table,.r79-table,.r4-table) tbody :is(td,th){padding:8px 9px!important;line-height:1.34!important;height:auto!important;vertical-align:middle!important}
body.r107-ui #content :is(.r5-table,.table,.r79-table,.r4-table) tbody tr{max-height:none}
body.r107-ui #content :is(.r5-table-toolbar,.table-head,.r79-table-toolbar){gap:7px!important;min-height:0!important;padding:4px 0!important;margin-bottom:5px!important}
body.r107-ui #content :is(.r5-table-toolbar,.table-head,.r79-table-toolbar) :is(.btn,select,button){min-height:31px!important;padding:5px 9px!important}
/* Compact drawer, preserving scroll and keyboard focus. */
body.r107-ui .drawer{background:#0a1a2b75!important;backdrop-filter:blur(8px)!important;-webkit-backdrop-filter:blur(8px)!important}
body.r107-ui .drawerpanel{width:min(810px,100vw)!important;box-shadow:-12px 0 38px #0a223a32!important}
body.r107-ui .drawerhead{min-height:50px!important;padding:7px 11px!important;border-color:var(--line)!important}
body.r107-ui .drawerhead b{font-size:13px!important}
body.r107-ui .drawerbody{padding:8px 10px 16px!important;overscroll-behavior:contain!important}
body.r107-ui .drawerbody :is(.r5-drawer-section,.r4-detail-card,.detail-hero,.r5-card,.card){padding:9px 11px!important;margin:0 0 8px!important;border-radius:10px!important;box-shadow:0 1px 6px #0e2a4310!important;border-color:var(--r110-subtle)!important;min-height:0!important}
body.r107-ui .drawerbody :is(.r5-kpis,.r5-detail-grid,.tech-grid,.r79-spec-grid,.detail-columns){gap:6px!important;margin:5px 0!important}
body.r107-ui .drawerbody :is(.r5-detail,.tech-field,.r79-spec-card,.detail,.r5-mini,.parity-metric){padding:7px 9px!important;min-height:43px!important;border-radius:7px!important;border-color:var(--r110-subtle)!important;box-shadow:none!important;overflow-wrap:anywhere!important}
body.r107-ui .drawerbody :is(.r5-detail,.tech-field,.detail) small{font-size:10px!important;line-height:1.2!important;margin:0 0 3px!important}
body.r107-ui .drawerbody :is(.r5-detail,.tech-field,.detail) b{font-size:12px!important;line-height:1.34!important;display:block!important}
body.r107-ui .drawerbody :is(.r5-actions,.r7-media-actions,.detail-actions){gap:5px!important;margin:6px 0!important;padding:5px 0!important}
body.r107-ui .drawerbody :is(button,.btn){min-height:30px;padding:5px 9px!important;font-size:11.5px!important}
body.r107-ui .drawerbody :is(.r5-drawer-section h3,.section-accent,.r79-section-title){font-size:12px!important;margin:3px 0 7px!important;letter-spacing:0!important}
body.r107-ui .drawerbody :is(.r5-table,.table) tbody td{padding:6px 7px!important}
body.r107-ui .drawerbody :is(.r5-image-grid,.r7-media-grid,.final-gallery){gap:6px!important}
body.r107-ui .drawerbody :is(.r5-image img,.r7-media-tile img,.r79-catalog-image img){object-fit:contain!important;max-height:210px!important}
body.r107-ui .drawerbody .r7-image-note{font-size:10.5px;line-height:1.36;padding:6px 8px;margin:6px 0}
/* Lightweight route indication masks stale content without redrawing the global shell. */
body.r107-ui #content.r110-switching{position:relative;min-height:240px}
body.r107-ui #content.r110-switching::before{content:"";position:absolute;inset:0;z-index:68;pointer-events:none;background:color-mix(in srgb,var(--bg) 85%,transparent)}
body.r107-ui #content.r110-switching::after{content:attr(data-r110-next);position:absolute;z-index:69;top:18px;left:18px;right:18px;max-width:420px;border:1px solid var(--line);background:var(--panel);border-radius:10px;padding:13px 15px;box-shadow:var(--shadow);font-weight:760;color:var(--text);pointer-events:none}
/* New borderless zoom-over-blur image experience built upon the existing R9.4 swipe/zoom engine. */
#emdR94Viewer{padding:0!important}
#emdR94Viewer .emd-r94-backdrop{background:rgba(4,12,22,.56)!important;backdrop-filter:blur(17px) saturate(.65)!important;-webkit-backdrop-filter:blur(17px) saturate(.65)!important}
#emdR94Viewer .emd-r94-modal{pointer-events:none!important;width:min(99vw,1550px)!important;height:96dvh!important;max-height:none!important;overflow:visible!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;animation:r110ImageEnter .22s var(--r110-ease) both!important}
#emdR94Viewer.r110-closing .emd-r94-modal{animation:r110ImageLeave .16s ease both!important}
@keyframes r110ImageEnter{from{opacity:0;transform:scale(.94)}to{opacity:1;transform:scale(1)}}
@keyframes r110ImageLeave{from{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.94)}}
#emdR94Viewer .emd-r94-head{pointer-events:none!important;background:transparent!important;border:0!important;padding:6px 13px!important;min-height:42px!important;align-items:flex-start!important}
#emdR94Viewer .emd-r94-ident{display:none!important}
#emdR94Viewer .emd-r94-tools{pointer-events:auto!important;margin-left:auto;flex-wrap:nowrap!important;gap:3px!important;padding:4px 5px!important;background:#142b43bc!important;border:1px solid #dcecf52e!important;border-radius:13px!important;box-shadow:0 4px 18px #0003!important;backdrop-filter:blur(12px)!important}
#emdR94Viewer .emd-r94-tools button{background:transparent!important;border:0!important;min-height:30px!important;min-width:31px!important;padding:5px 8px!important;color:#eff9ff!important;border-radius:7px!important}
#emdR94Viewer .emd-r94-tools button:hover{background:#ffffff25!important}
#emdR94Viewer .emd-r94-viewport{pointer-events:none!important;background:transparent!important;grid-template-columns:42px minmax(0,1fr) 42px!important;gap:3px!important;padding:3px 12px!important}
#emdR94Viewer .emd-r94-photo-area{pointer-events:auto!important;background:transparent!important;touch-action:none!important}
#emdR94Viewer #emdR94Image{border:0!important;border-radius:0!important;box-shadow:none!important;max-width:100%!important;max-height:100%!important;transition:opacity .13s ease,transform .13s ease!important}
#emdR94Viewer .emd-r94-prev,#emdR94Viewer .emd-r94-next{pointer-events:auto!important;min-height:62px!important;align-self:center!important;background:#172b3d8c!important;border-radius:10px!important;color:#fff!important;font-size:31px!important}
#emdR94Viewer .emd-r94-bottom{pointer-events:none!important;background:transparent!important;border:0!important;justify-content:center!important;min-height:34px!important;padding:4px 10px!important}
#emdR94Viewer #emdR94Caption{background:#142b43ca!important;color:#f1faff!important;text-align:center!important;max-width:750px!important;border-radius:30px!important;padding:5px 14px!important;flex:0 1 auto!important;font-size:11px!important}
#emdR94Viewer .emd-r94-tip,#emdR94Viewer #emdR94Notice{display:none!important}
@media(max-width:900px){body.r107-ui #content{padding:8px!important}body.r107-ui #content .r5-kpis{grid-template-columns:repeat(3,minmax(0,1fr))!important}body.r107-ui .drawerpanel{width:100vw!important}#emdR94Viewer .emd-r94-tools button span{display:none!important}}
@media(max-width:650px){:root{--r110-header:58px;--r110-tabs:40px}body.r107-ui #content :is(.r5-hero,.daily-hero){min-height:62px!important;padding:9px!important}body.r107-ui #content .r5-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}body.r107-ui #content [data-r110-sticky="tabs"]{top:var(--r110-header)!important}body.r107-ui #content [data-r110-sticky="filters"]{top:calc(var(--r110-header) + var(--r110-tabs))!important}#emdR94Viewer .emd-r94-modal{height:100dvh!important;width:100vw!important}#emdR94Viewer .emd-r94-viewport{grid-template-columns:28px minmax(0,1fr) 28px!important;padding:1px!important}#emdR94Viewer .emd-r94-prev,#emdR94Viewer .emd-r94-next{font-size:23px!important;min-height:52px!important}#emdR94Viewer .emd-r94-head{padding:5px!important}#emdR94Viewer .emd-r94-tools{gap:0!important}#emdR94Viewer .emd-r94-bottom{padding:5px!important}}
@media(prefers-reduced-motion:reduce){#emdR94Viewer .emd-r94-modal,body.r107-ui #content *{animation:none!important;transition:none!important}}
/* Expose cached identity without showing a full-page spinner. */
body.r107-ui .r110-preview{background:var(--panel);color:var(--text);border:1px solid var(--line);border-left:3px solid var(--accent);padding:10px 13px;border-radius:9px;display:flex;flex-direction:column;gap:2px;margin:0 0 8px;animation:r110ImageEnter .16s ease}
body.r107-ui .r110-preview strong{font-size:14px;line-height:1.3}
body.r107-ui .r110-preview small{color:var(--muted);font-size:11px}
body.r107-ui .r110-preview span{font-size:11px;color:var(--muted)}
body.r107-ui .r10-moby-host{transform:scale(.74);transform-origin:bottom right;right:5px!important;left:auto!important;bottom:5px!important;top:auto!important;z-index:78!important}
body.r107-ui .r10-moby-panel{z-index:1750!important}
body.r107-ui .drawer.open~.r10-moby-host{opacity:.45}
@media(max-width:650px){body.r107-ui .r10-moby-host{transform:scale(.67);right:2px!important;bottom:2px!important}}
/* Restrained tactile feedback, never full-screen movement. */
body.r107-ui #content :is(.r5-kpi,.parity-kpi){transition:box-shadow .17s ease,transform .17s ease!important}
body.r107-ui #content :is(.r5-kpi,.parity-kpi):is(:hover,:focus-within){transform:translateY(-1px)!important;box-shadow:0 4px 15px #163c5b1c!important}
body.r107-ui :is(.btn,.r5-tabs button,.r4-tabs button){transition:background-color .15s ease,border-color .15s ease,color .15s ease!important}
body.r107-ui :is(button,input,select,textarea):focus-visible{outline:2px solid var(--accent)!important;outline-offset:2px!important}
