@layer opd-controls {
/* Final local visual pass: neutral surfaces with the existing blue brand accent. */
:root{--bg:#080808!important;--surface:#101010!important;--surface2:#161616!important;--surface3:#222222!important;--line:#303030!important;--txt:#f5f5f5!important;--muted:#a3a3a3!important;--dim:#767676!important}
html body{background-color:#080808!important}
html body button[data-neutral-control]{--neutral-control-fill:#111217;--neutral-control-border:#303138;box-shadow:none!important}
html body button[data-neutral-control]:hover{--neutral-control-fill:#1b1c22;--neutral-control-border:#52535b}
html body button[data-neutral-control]:is(.active,[aria-pressed="true"]){--neutral-control-fill:#232323;--neutral-control-border:#6b6b6b}
html body button[data-neutral-control]:focus-visible{outline:2px solid #a3a3a3!important;outline-offset:3px}
html body :is(.tag,.asset-card .tag,#detail-tags .tag){background:#171717!important;background-image:none!important;border-color:#333!important;color:#aaa!important}
html body :is(.search-wrap,.catalog-bar input,.opd-sort-menu){background-color:#131313!important;border-color:#333!important}
html body #detail-modal .layer-main{background:transparent!important}
html body #detail-modal :is(.layer-media-column,.study-case-rail){background:#0d0d0d!important;background-image:none!important;border-color:#303030!important;box-shadow:none!important}
html body #detail-modal .layer-insight-grid{gap:12px!important}
html body #detail-modal .layer-insight-grid article{background:#161616!important;background-image:none!important;border:0!important;border-radius:12px!important;padding:20px!important}
html body #detail-modal .layer-insight-grid article h3{margin:0 0 12px!important;color:#f2f2f2!important}
html body #detail-modal .layer-insight-grid article :is(p,li){color:#aaa!important}
html body #detail-modal .study-case-rail{gap:0!important}
html body #detail-modal .study-rail-section{margin-top:30px!important;padding-top:0!important;border:0!important}
html body #detail-modal .study-case-discussion{margin-top:30px!important}
html body #detail-modal .study-case-discussion h3{margin-bottom:14px!important}
.compact-purchase{min-width:0}
.compact-purchase-flow{display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;width:100%;gap:4px;list-style:none;margin:0 0 15px;padding:0;color:#aaa;font-size:13px;line-height:1.7}
.compact-purchase-flow li{display:contents;white-space:nowrap}
.compact-purchase-flow svg{width:15px;height:15px;flex:none;color:#818181}
.compact-wechat-card{display:flex;align-items:center;gap:13px;width:100%;min-width:0;padding:17px 15px;border:1px solid #353535;border-radius:14px;background:#171717}
html body :is(#detail-modal,#contact-modal) button.compact-scan{display:grid!important;place-items:center;flex:none;width:62px!important;height:62px!important;min-width:62px!important;min-height:62px!important;padding:3px!important;border:1px solid #ddd!important;border-radius:9px!important;background:#fff!important;color:#d3d3d3!important;cursor:pointer;box-shadow:none!important;-webkit-tap-highlight-color:transparent;overflow:hidden}
.compact-scan img{display:block;width:100%;height:100%;object-fit:contain}
.compact-scan svg{width:22px;height:22px}
html body :is(#detail-modal,#contact-modal) button.compact-scan:is(:hover,[aria-expanded="true"]){background:#383838!important;border-color:#666!important}
.compact-wechat-text{min-width:0;flex:1}
.compact-wechat-text strong{display:block;font-size:17px;font-weight:600;line-height:1.4;color:#f5f5f5;letter-spacing:0}
.compact-wechat-text p{font-size:12px;line-height:1.65;color:#a3a3a3;margin:5px 0 0;overflow-wrap:anywhere}
html body :is(#detail-modal,#contact-modal) button.compact-copy{display:inline-flex!important;align-items:center;justify-content:center;gap:7px;flex:none;min-height:36px!important;padding:7px 12px!important;border:1px solid #303138!important;border-radius:22px!important;background:#111217!important;color:#f1f1f3!important;font-size:12px!important;line-height:1.5;white-space:nowrap;box-shadow:none!important;cursor:pointer}
.compact-copy svg{width:17px;height:17px;flex:none}
html body :is(#detail-modal,#contact-modal) button.compact-copy:hover{background:#262626!important;color:#fff!important;border-color:#737373!important}
html body :is(.compact-copy,.compact-scan):focus-visible{outline:2px solid #d0d0d0;outline-offset:3px}
.compact-qr-panel{text-align:center;margin-top:12px;padding:18px 12px;border:1px solid #333;border-radius:14px;background:#141414}
.compact-qr-panel img{display:block;width:160px!important;height:160px!important;max-width:100%;object-fit:contain;border-radius:12px;padding:7px;background:#fff;margin:0 auto}
.compact-qr-panel p{margin:12px 0 0;color:#aaa;font-size:12px;line-height:1.7}
.compact-copy-feedback:not(.is-error){position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.compact-copy-feedback.is-error{font-size:12px;line-height:1.7;color:#eee;margin:10px 0 0}
html body #opd-copy-toast:popover-open{display:block!important;position:fixed!important;inset:auto!important;left:var(--toast-x,50%)!important;top:var(--toast-y,50%)!important;bottom:auto!important;transform:translate(-50%,-100%)!important;max-width:calc(100vw - 40px)!important;margin:0!important;padding:12px 20px!important;border:1px solid #555!important;border-radius:12px!important;background:rgba(10,10,10,.74)!important;backdrop-filter:blur(16px) saturate(120%)!important;-webkit-backdrop-filter:blur(16px) saturate(120%)!important;color:#fff!important;font-size:14px!important;line-height:1.6!important;box-shadow:0 8px 32px #0008!important;z-index:99999;pointer-events:none}
html body button.secondary{border-radius:100px!important;color:#f5f5f7!important}
@media(min-width:761px){html body #detail-modal .study-case-rail{display:flex!important;flex-direction:column!important;overflow-y:auto!important}html body #detail-modal .detail-rail-reading{flex:none!important;min-height:0;overflow:visible!important}html body #detail-modal .study-case-rail>section{flex-shrink:0}html body #detail-modal .study-case-discussion{margin-top:var(--purchase-offset,28px)!important;padding-top:0!important;padding-bottom:0!important;position:relative!important;bottom:auto!important;z-index:3;background:#0d0d0d!important}}
@media(max-width:760px){html body #detail-modal .detail-rail-reading{display:contents}html body #detail-modal .study-case-discussion{position:static!important;margin-top:28px!important}}
html body #contact-modal.purchase-contact-dialog{width:min(560px,calc(100vw - 32px))!important;max-width:560px!important;background:#0d0d0d!important;background-image:none!important;border:1px solid #353535!important;border-radius:20px!important;max-height:calc(100dvh - 32px)!important;box-shadow:0 24px 80px #0009!important}
html body #contact-modal.purchase-contact-dialog .dialog-content{padding:28px!important}
html body #contact-modal.purchase-contact-dialog #contact-title{margin:0 42px 16px 0!important;font-size:28px!important;line-height:1.4!important;letter-spacing:-.02em!important}
html body #contact-modal.purchase-contact-dialog .modal-close{top:23px!important;right:23px!important;width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;color:#bbb!important}
html body #contact-modal.purchase-contact-dialog .study-contact-intro{margin:0 0 22px!important;padding:0!important;width:100%!important;max-width:none!important;border:0!important;text-align:left!important;text-wrap:pretty!important;color:#aaa!important;font-size:14px!important;line-height:1.85!important}
html body #contact-modal.purchase-contact-dialog .study-contact-notice{margin:18px 0 0!important;color:#858585!important;font-size:12px!important;line-height:1.8!important}
@container study-rail (max-width:390px){.compact-wechat-card{flex-wrap:wrap}.compact-wechat-text{flex-basis:calc(100% - 80px)}html body .compact-copy{margin-left:75px}.compact-purchase-flow{gap:3px;font-size:12px}.compact-purchase-flow svg{width:12px;height:12px}}
@media(max-width:600px){html body #contact-modal.purchase-contact-dialog .dialog-content{padding:24px 20px!important}html body #contact-modal.purchase-contact-dialog #contact-title{font-size:25px!important;margin-bottom:14px!important}html body #contact-modal.purchase-contact-dialog .modal-close{right:18px!important;top:23px!important}.compact-wechat-card{flex-wrap:wrap;padding:15px 13px;gap:12px}.compact-wechat-text{flex-basis:calc(100% - 80px)}html body .compact-copy{margin-left:74px}.compact-purchase-flow{font-size:12px;gap:3px}.compact-purchase-flow svg{width:12px;height:12px}html body #detail-modal .layer-insight-grid article{padding:18px!important}}
@media(max-width:350px){.compact-purchase-flow{font-size:11px;gap:2px}.compact-purchase-flow svg{width:10px;height:10px}}


/* One frame size across every kit, independent of original image proportions. */
html body #detail-modal .layer-media-stage{width:100%!important;max-width:none!important;height:auto!important;min-height:0!important;max-height:none!important;aspect-ratio:16 / 9!important;overflow:hidden!important;background:#0d0d0d!important;position:relative!important}
html body #detail-modal .layer-media-inner{position:absolute!important;inset:0!important;width:100%!important;height:100%!important}
html body #detail-modal #detail-image{width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;object-fit:contain!important;object-position:center!important;background:#0d0d0d!important}
html body #catalog-view #side-categories .side-button{--neutral-control-fill:#111217!important;--neutral-control-border:#111217!important;min-height:44px!important;padding:12px 12px!important;box-shadow:none!important;position:relative;transition:color .15s ease!important}
html body #catalog-view #side-categories .side-button:is(:hover,.active,[aria-pressed="true"]){--neutral-control-fill:#111217!important;--neutral-control-border:#111217!important;box-shadow:none!important}
html body #catalog-view #side-categories .side-button.active::before{content:""!important;display:block!important;position:absolute!important;left:0!important;top:10px!important;bottom:10px!important;width:3px!important;height:auto!important;border:0!important;border-radius:3px!important;background:#3352ff!important;background-image:none!important;box-shadow:none!important;animation:none!important}
html body #catalog-view.tree-browse #side-categories{gap:8px!important;overflow-anchor:none}
html body #catalog-view.tree-browse .tree-children{gap:8px!important}
html body #catalog-view.tree-browse .tree-group{margin-top:30px!important}
html body #catalog-view.tree-browse .tree-group-title{margin-bottom:14px!important;line-height:1.8!important}
html body #catalog-view .filter-btn.active{--neutral-control-fill:#111217; background:#111217!important}
html body #catalog-view #catalog-pager{display:none!important}
.catalog-scroll-loader{display:flex;flex-direction:column;align-items:center;gap:12px;padding:32px 16px;min-height:100px;color:#888;font-size:13px;text-align:center}
.catalog-scroll-loader p{margin:0}
.catalog-scroll-loader .secondary{min-width:180px;padding:10px 20px}
html body #catalog-view{overflow-anchor:none}
@media(max-width:1023px){html body #catalog-view.tree-browse #side-categories{gap:10px!important}html body #catalog-view.tree-browse .tree-group{margin-top:16px!important}html body #catalog-view.tree-browse .tree-group-title{margin-bottom:10px!important}html body #catalog-view #side-categories .side-button{min-height:42px!important;padding:10px 12px!important}}

@media(min-width:761px){
 html body #detail-modal.opd-layer-detail{height:min(880px,88dvh)!important;max-height:calc(100dvh - 32px)!important}
 html body #detail-modal .layer-media-stage{width:min(100%,var(--detail-frame-width,100%))!important;margin-inline:auto!important}
 html body #detail-modal .detail-rail-reading .study-rail-section{margin-top:20px!important}
 html body #detail-modal .detail-rail-reading .study-rail-section h3{margin-bottom:10px!important}
 html body #detail-modal .resource-price-card{min-height:56px!important;padding-block:12px!important}
 html body #detail-modal .resource-price-list{gap:8px!important}
}

/* Gallery navigation and content-sized purchase column, approved local revision. */
html body #detail-modal .layer-gallery-controls{grid-template-columns:minmax(0,1fr)!important;gap:0!important}
html body #detail-modal #detail-thumbnails{width:100%!important;min-width:0!important;cursor:grab;touch-action:pan-x;overscroll-behavior-x:contain}
html body #detail-modal #detail-thumbnails.is-dragging{cursor:grabbing;scroll-behavior:auto!important}
html body #detail-modal .main-gallery-arrow{position:absolute!important;top:50%!important;bottom:auto!important;transform:translateY(-50%)!important;z-index:5!important;width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;padding:9px!important;border:1px solid #484848!important;border-radius:50%!important;background:rgba(15,15,15,.76)!important;backdrop-filter:blur(10px);color:#f5f5f5!important;box-shadow:0 2px 12px #0004!important}
html body #detail-modal #gallery-prev.main-gallery-arrow{left:14px!important;right:auto!important}
html body #detail-modal #gallery-next.main-gallery-arrow{right:14px!important;left:auto!important}
html body #detail-modal .main-gallery-arrow:disabled{opacity:.35!important}
html body :is(#home-view,#catalog-view) .asset-card:is(:hover,:focus-visible) .tag{background:transparent!important}
html body :is(#detail-modal,#contact-modal) .compact-wechat-card{display:grid!important;grid-template-columns:120px minmax(0,1fr)!important;column-gap:18px!important;row-gap:8px!important;align-items:center!important}
html body :is(#detail-modal,#contact-modal) button.compact-scan{grid-column:1!important;grid-row:1 / 3!important;width:120px!important;height:120px!important;min-width:120px!important;min-height:120px!important;padding:5px!important;border-radius:12px!important}
html body :is(#detail-modal,#contact-modal) .compact-wechat-text{grid-column:2!important;grid-row:1!important;min-width:0!important;align-self:end!important}
html body :is(#detail-modal,#contact-modal) button.compact-copy{grid-column:2!important;grid-row:2!important;justify-self:start!important;align-self:start!important;margin-left:0!important}
html body :is(#detail-modal,#contact-modal) .compact-qr-panel img{width:240px!important;height:240px!important}
@media(max-width:600px){html body :is(#detail-modal,#contact-modal) .compact-wechat-card{grid-template-columns:112px minmax(0,1fr)!important;column-gap:14px!important}html body :is(#detail-modal,#contact-modal) button.compact-scan{width:112px!important;height:112px!important;min-width:112px!important;min-height:112px!important}}
@media(max-width:350px){html body :is(#detail-modal,#contact-modal) .compact-wechat-card{grid-template-columns:minmax(0,1fr)!important;text-align:center}html body :is(#detail-modal,#contact-modal) button.compact-scan{grid-column:1!important;grid-row:1!important;justify-self:center!important}html body :is(#detail-modal,#contact-modal) .compact-wechat-text{grid-column:1!important;grid-row:2!important;justify-self:center!important}html body :is(#detail-modal,#contact-modal) button.compact-copy{grid-column:1!important;grid-row:3!important;justify-self:center!important}}
html body #detail-modal .detail-rail-reading{display:contents!important}
html body #detail-modal .study-case-rail{gap:28px!important;height:auto!important;min-height:0!important;align-self:start!important}
html body #detail-modal .study-case-rail :is(.detail-identity-group,.study-rail-section){margin-top:0!important;margin-bottom:0!important;flex-shrink:0!important}
html body #detail-modal .detail-identity-group #detail-tags{margin-bottom:0!important}
@media(min-width:761px){html body #detail-modal .layer-main{align-items:start!important}html body #detail-modal .layer-media-column{height:100%!important}html body #detail-modal .study-case-rail{max-height:100%!important;overflow-y:auto!important}}
@media(max-width:760px){html body #detail-modal .study-case-rail{max-height:none!important}html body #detail-modal .main-gallery-arrow{width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;padding:7px!important}html body #detail-modal #gallery-prev.main-gallery-arrow{left:9px!important}html body #detail-modal #gallery-next.main-gallery-arrow{right:9px!important}}
}
