/* local-ui-v1.css: unchanged local declarations; configuration scope only. */
/* Local real-engine UI bridge v1: visual layer only. No calculation/state changes. */
html:where([data-config-ui-active]){--wc-bg:#080d10;--wc-panel:rgba(20,29,33,.82);--wc-panel-2:rgba(14,22,26,.88);--wc-line:rgba(188,201,202,.16);--wc-muted:#879598;--wc-gold:#d8ba6d;--wc-ice:#9bd7e8;--wc-text:#e9ece7}
html:where([data-config-ui-active]),:where(html[data-config-ui-active]) body{background:radial-gradient(ellipse at 78% -18%,#1d2b31 0,transparent 42%),linear-gradient(120deg,#070b0e,#0a1115 62%,#070a0d)!important;color:var(--wc-text)!important}
html:where([data-config-ui-active]),:where(html[data-config-ui-active]) body{overflow-x:hidden!important}
:where(html[data-config-ui-active]) body{font-family:'DM Sans','Microsoft YaHei',sans-serif!important}
:where(html[data-config-ui-active]) .wrap{background:transparent!important;isolation:isolate}
:where(html[data-config-ui-active]) .site-decor{opacity:.12!important}
:where(html[data-config-ui-active]) .app-topbar{height:66px!important;position:fixed!important;left:0!important;right:0!important;top:0!important;z-index:30!important;background:rgba(8,14,17,.82)!important;border-bottom:1px solid var(--wc-line)!important;box-shadow:0 10px 35px #0005!important;backdrop-filter:blur(18px)!important}
:where(html[data-config-ui-active]) .app-topbar-motif{opacity:.08!important}
:where(html[data-config-ui-active]) #announcementBar{display:none!important}
:where(html[data-config-ui-active]) #workspacePhaseBar{position:fixed!important;left:0!important;top:66px!important;bottom:0!important;width:218px!important;z-index:20!important;border-right:1px solid var(--wc-line)!important;background:rgba(9,15,18,.86)!important;backdrop-filter:blur(18px)!important}
:where(html[data-config-ui-active]) .app-sidenav{width:218px!important;height:100%!important;background:transparent!important;border:0!important;padding:24px 14px 18px!important}
:where(html[data-config-ui-active]) .app-sidenav-brand{height:auto!important;margin:0 6px 36px!important;color:var(--wc-gold)!important}
:where(html[data-config-ui-active]) .app-sidenav-brand-mark{background:var(--wc-gold)!important;box-shadow:0 0 18px #d8ba6d66!important}
:where(html[data-config-ui-active]) .app-sidenav-brand-cn{font-size:17px!important;letter-spacing:2px!important;color:var(--wc-gold)!important}
:where(html[data-config-ui-active]) .app-sidenav-brand-en{color:#829295!important;letter-spacing:3px!important}
:where(html[data-config-ui-active]) .app-sidenav-group{margin-bottom:21px!important}
:where(html[data-config-ui-active]) .app-sidenav-group-title{padding:0 10px 6px!important;color:#829092!important;font-size:10px!important;letter-spacing:1px!important}
:where(html[data-config-ui-active]) .app-sidenav-row{margin:3px 0!important}
:where(html[data-config-ui-active]) .app-sidenav-item{height:43px!important;border:1px solid transparent!important;border-radius:5px!important;color:#9da9aa!important;background:transparent!important;padding:0 11px!important;transition:background .18s,border-color .18s,color .18s!important}
:where(html[data-config-ui-active]) .app-sidenav-item:hover{background:rgba(29,41,44,.72)!important;color:#e7ece7!important}
:where(html[data-config-ui-active]) .app-sidenav-item.active{color:var(--wc-gold)!important;background:rgba(216,186,109,.12)!important;border-color:rgba(216,186,109,.32)!important;box-shadow:inset 2px 0 var(--wc-gold)!important}
:where(html[data-config-ui-active]) .app-sidenav-indicator{display:none!important}
:where(html[data-config-ui-active]) .app-sidenav-help{color:#829295!important}
:where(html[data-config-ui-active]) .app-sidenav-special{border:1px solid var(--wc-line)!important;background:rgba(25,34,37,.68)!important;border-radius:5px!important;color:#b7c0be!important;margin-top:7px!important}
:where(html[data-config-ui-active]) .app-sidenav-special:hover{border-color:rgba(216,186,109,.48)!important;color:var(--wc-gold)!important}
:where(html[data-config-ui-active]) #workspaceLayout{display:block!important;margin-left:218px!important;min-height:calc(100vh - 66px)!important;background:transparent!important}
:where(html[data-config-ui-active]) #sidebar{min-height:calc(100vh - 66px)!important;background:transparent!important;padding:25px 28px 56px!important}:where(html[data-config-ui-active]) #workspaceLayout.phase-setup #sidebar{display:block!important}
:where(html[data-config-ui-active]) #sidebar .sidebar-layout{display:block!important;background:transparent!important;border:0!important;box-shadow:none!important}
:where(html[data-config-ui-active]) #sidebar .sidebar-shell{display:block!important;max-width:1500px!important;margin:0 auto!important}
:where(html[data-config-ui-active]) .setup-team-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:15px!important;align-items:start!important}
:where(html[data-config-ui-active]) .setup-member-col{background:linear-gradient(145deg,rgba(25,35,39,.86),rgba(11,18,22,.82))!important;border:1px solid var(--wc-line)!important;border-radius:7px!important;box-shadow:0 18px 46px #0004!important;overflow:hidden!important}
:where(html[data-config-ui-active]) .setup-member-col-head{padding:14px 16px!important;border-bottom:1px solid var(--wc-line)!important;background:rgba(25,37,40,.42)!important}
:where(html[data-config-ui-active]) .setup-member-col-title strong{color:var(--wc-muted)!important;font-size:11px!important;letter-spacing:1px!important}
:where(html[data-config-ui-active]) .setup-member-chip,:where(html[data-config-ui-active]) .setup-clear-member{color:var(--wc-text)!important}
:where(html[data-config-ui-active]) .setup-member-chip:hover{color:var(--wc-gold)!important}
:where(html[data-config-ui-active]) .setup-member-dmg{color:var(--wc-muted)!important}
:where(html[data-config-ui-active]) .setup-member-dmg-value{color:var(--wc-ice)!important;font-family:ui-monospace,monospace!important}
:where(html[data-config-ui-active]) .setup-sec{border-top:1px solid rgba(188,201,202,.11)!important;margin-top:0!important;padding:16px!important;background:transparent!important}
:where(html[data-config-ui-active]) .setup-sec-title{color:var(--wc-text)!important;font-size:13px!important;letter-spacing:.3px!important}
:where(html[data-config-ui-active]) .setup-sec-mark{background:var(--wc-gold)!important;box-shadow:0 0 10px #d8ba6d55!important}
:where(html[data-config-ui-active]) .setup-pick-card,:where(html[data-config-ui-active]) .build-hero-card{background:linear-gradient(120deg,rgba(26,38,42,.75),rgba(12,20,23,.75))!important;border:1px solid var(--wc-line)!important;border-radius:5px!important;color:var(--wc-text)!important;transition:border-color .18s,transform .18s,background .18s!important}
:where(html[data-config-ui-active]) .setup-pick-card:hover,:where(html[data-config-ui-active]) .build-hero-card:hover{border-color:rgba(216,186,109,.7)!important;background:rgba(40,50,50,.7)!important;transform:translateY(-1px)!important}
:where(html[data-config-ui-active]) .setup-chip-board,:where(html[data-config-ui-active]) .resonance-chain-compact{border:1px solid var(--wc-line)!important;background:rgba(9,16,19,.48)!important;border-radius:5px!important}
:where(html[data-config-ui-active]) .resonance-chain-current{color:var(--wc-gold)!important}
:where(html[data-config-ui-active]) .resonance-chip{border:1px solid var(--wc-line)!important;background:#172328!important;color:#c5ceca!important;border-radius:4px!important}
:where(html[data-config-ui-active]) .resonance-chip.active{background:var(--wc-gold)!important;border-color:var(--wc-gold)!important;color:#141918!important}
:where(html[data-config-ui-active]) .build-panel-stat-card{background:rgba(21,31,35,.78)!important;border:1px solid var(--wc-line)!important;border-radius:5px!important;color:var(--wc-text)!important}
:where(html[data-config-ui-active]) .build-panel-stat-card:hover{border-color:rgba(216,186,109,.62)!important}
:where(html[data-config-ui-active]) .build-panel-stat-value{color:var(--wc-ice)!important;font-family:ui-monospace,monospace!important}
:where(html[data-config-ui-active]) .build-panel-stat-label{color:var(--wc-muted)!important}
:where(html[data-config-ui-active]) .build-slot-card{background:rgba(15,25,29,.82)!important;border-color:var(--wc-line)!important;border-radius:5px!important}
:where(html[data-config-ui-active]) .build-slot-card.is-main{border-color:rgba(216,186,109,.55)!important}
:where(html[data-config-ui-active]) .setup-member-lower,:where(html[data-config-ui-active]) .setup-member-upper{gap:12px!important}
:where(html[data-config-ui-active]) #main:empty{display:none!important}:where(html[data-config-ui-active]) #main:not(:empty){display:block!important}
:where(html[data-config-ui-active]) #siteFooter{margin-left:218px!important;background:transparent!important;border-top:1px solid var(--wc-line)!important;color:var(--wc-muted)!important}
@media(max-width:1100px){:where(html[data-config-ui-active]) .setup-team-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* Frame alignment with the approved DEMO: compact rail, full-width workbench. */
:where(html[data-config-ui-active]) #workspacePhaseBar{width:190px!important}
:where(html[data-config-ui-active]) .app-sidenav{width:190px!important;top:66px!important;height:calc(100vh - 66px)!important;padding-left:10px!important;padding-right:10px!important}
:where(html[data-config-ui-active]) #workspacePhaseBar .app-sidenav{position:absolute!important;left:0!important;top:0!important;width:190px!important;height:100%!important}
:where(html[data-config-ui-active]) .app-sidenav-brand{margin-left:4px!important;margin-right:4px!important}
:where(html[data-config-ui-active]) .app-sidenav-item,:where(html[data-config-ui-active]) .app-sidenav-special{padding-left:9px!important;padding-right:9px!important}
:where(html[data-config-ui-active]) #workspaceLayout{margin-left:190px!important}
:where(html[data-config-ui-active]) #siteFooter{margin-left:190px!important}
:where(html[data-config-ui-active]) #workspaceLayout #sidebar{padding-left:18px!important;padding-right:18px!important}
:where(html[data-config-ui-active]) #workspaceLayout #sidebar .sidebar-shell{max-width:none!important;margin-left:0!important;margin-right:0!important}
:where(html[data-config-ui-active]) .app-sidenav-special[data-nav-matrix]{display:none!important}
:where(html[data-config-ui-active]) .app-sidenav-special[data-nav-public-db] .app-sidenav-badge{display:none!important}
@media(max-width:1100px){:where(html[data-config-ui-active]) #workspacePhaseBar{width:180px!important}:where(html[data-config-ui-active]) .app-sidenav{width:180px!important}:where(html[data-config-ui-active]) #workspaceLayout{margin-left:180px!important}:where(html[data-config-ui-active]) #siteFooter{margin-left:180px!important}}

/* Remove the legacy shell's second left offset. The fixed rail owns the only rail width. */
:where(html[data-config-ui-active]) .wrap{padding-left:0!important;padding-right:16px!important}
:where(html[data-config-ui-active]) .wrap>.app-topbar{margin-left:0!important;width:auto!important;box-sizing:border-box!important}


/* Reserve the fixed 66px header height inside the app shell. */
:where(html[data-config-ui-active]) body{padding-top:0!important}
:where(html[data-config-ui-active]) .wrap{margin-top:0!important;padding-top:66px!important}
/* A legacy intro transition leaves a 24px flow stub after it is removed. */
:where(html[data-config-ui-active]) .wrap{margin-top:0!important;padding-top:66px!important}


/* local-config-v1.css: unchanged local declarations; configuration scope only. */
/* Config page only: active member workspace matching the approved React DEMO structure. */
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup #sidebar{padding:22px 30px 60px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .sidebar-shell{max-width:1540px!important}
:where(html[data-config-ui-active]) .local-team-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:0 0 15px;padding:9px;border:1px solid var(--wc-line);border-radius:7px;background:rgba(15,23,27,.78);box-shadow:0 12px 38px #0003}
:where(html[data-config-ui-active]) .local-team-card{display:flex;align-items:center;gap:10px;min-height:58px;padding:7px 11px;border:1px solid transparent;border-radius:5px;background:transparent;color:#aab5b4;text-align:left;cursor:pointer;transition:background .18s,border-color .18s,color .18s,transform .18s}
:where(html[data-config-ui-active]) .local-team-card:hover{background:rgba(33,45,48,.7);color:#e8ece8;transform:translateY(-1px)}
:where(html[data-config-ui-active]) .local-team-card.active{border-color:rgba(216,186,109,.7);background:linear-gradient(120deg,rgba(216,186,109,.16),rgba(20,32,35,.8));color:var(--wc-gold);box-shadow:inset 2px 0 var(--wc-gold)}
:where(html[data-config-ui-active]) .local-team-avatar{width:42px;height:42px;display:grid;place-items:center;overflow:hidden;border:1px solid var(--wc-line);border-radius:4px;background:#121b1f;color:var(--wc-ice);font:12px ui-monospace,monospace;flex:none}
:where(html[data-config-ui-active]) .local-team-avatar img{width:100%;height:100%;object-fit:cover}:where(html[data-config-ui-active]) .local-team-copy{display:grid;gap:3px;min-width:0}:where(html[data-config-ui-active]) .local-team-copy strong{font-size:13px;font-weight:600}:where(html[data-config-ui-active]) .local-team-copy small{color:var(--wc-muted);font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:where(html[data-config-ui-active]) .local-team-card.active .local-team-copy small{color:#b9aa7b}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-team-grid{display:block!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-col{display:none!important;grid-template-columns:minmax(0,1fr) 292px;gap:18px;border:1px solid var(--wc-line)!important;border-radius:7px!important;background:linear-gradient(145deg,rgba(24,35,39,.88),rgba(10,17,21,.84))!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-col.local-active{display:grid!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-col>.setup-member-col-head{grid-column:1/-1}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-upper{grid-column:1/-1;display:grid!important;grid-template-columns:minmax(0,1fr) 292px;gap:18px;padding:0 18px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-upper-left{min-width:0}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-upper-right{min-width:0}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-lower{grid-column:1/-1;padding:0 18px 18px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-col-head{padding:17px 20px!important;background:linear-gradient(100deg,rgba(35,53,57,.75),rgba(14,23,27,.4))!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-col-title{align-items:center}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-col-title strong{font:10px ui-monospace,monospace!important;letter-spacing:1.5px!important;color:var(--wc-ice)!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-chip-name{font-size:26px!important;letter-spacing:2px;color:var(--wc-text)!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-dmg{font-size:11px!important}:where(html[data-config-ui-active]) .setup-member-dmg-value{font-size:22px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec{margin-top:12px!important;border:1px solid var(--wc-line)!important;border-radius:6px!important;background:rgba(9,17,20,.5)!important;padding:15px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-title{font-size:14px!important;color:var(--wc-text)!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-lower{display:block!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-lower .setup-sec-echo,:where(html[data-config-ui-active]) .setup-member-lower .setup-sec-echo{margin-top:15px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .echo-slot-grid,:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .build-slot-grid,:where(html[data-config-ui-active]) #workspaceLayout.phase-setup [class*=echo-slot]{scrollbar-color:var(--wc-gold) transparent}
@media(max-width:1100px){:where(html[data-config-ui-active]) .local-team-strip{grid-template-columns:1fr}:where(html[data-config-ui-active]) .local-team-card{min-height:48px}:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-upper{grid-template-columns:1fr}:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-col{grid-template-columns:1fr}}

/* Structure pass: match the DEMO composition while retaining original event targets. */
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-upper{display:grid!important;grid-template-columns:minmax(0,1fr) 292px!important;gap:18px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-upper-left{display:block!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-char{display:none!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-hero{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 260px;min-height:218px;overflow:hidden;margin:0 18px 14px;border:1px solid rgba(155,215,232,.24);border-radius:7px;background:#102027;box-shadow:0 18px 55px #0005}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-hero-art{position:absolute;inset:0;background-position:center 28%;background-size:cover;background-repeat:no-repeat;filter:saturate(.98) contrast(1.04)}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-hero-art:not([style*="background-image"]){background:radial-gradient(circle at 78% 28%,rgba(155,215,232,.28),transparent 35%),linear-gradient(120deg,#11272e,#0b1418 70%)}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-hero-shade{position:absolute;inset:0;background:linear-gradient(90deg,rgba(5,13,18,.72) 0%,rgba(7,20,27,.42) 34%,rgba(8,22,29,.16) 62%,rgba(8,16,20,.02) 100%),linear-gradient(0deg,rgba(5,13,18,.28),transparent 62%)}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-hero-copy{position:relative;z-index:1;align-self:center;padding:26px 28px;max-width:480px}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-hero-copy small{font:10px ui-monospace,monospace;letter-spacing:2px;color:var(--wc-ice)}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-hero-copy h2{margin:9px 0 4px;font-size:36px;font-weight:500;letter-spacing:3px;color:#f2eee2}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-hero-copy p{margin:0 0 17px;color:#aab8b7;font-size:12px}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-hero-action{border:1px solid rgba(216,186,109,.62);background:rgba(16,28,32,.78);color:var(--wc-gold);padding:8px 12px;border-radius:4px;cursor:pointer}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-hero-action span{font-size:17px;vertical-align:-1px;margin-left:12px}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-hero-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}:where(html[data-config-ui-active]) .local-hero-crop{border:1px solid rgba(155,215,232,.28);background:rgba(16,28,32,.72);color:#a9c6cc;padding:8px 11px;border-radius:4px;cursor:pointer}:where(html[data-config-ui-active]) .local-hero-crop:hover{border-color:rgba(216,186,109,.62);color:var(--wc-gold)}
:where(html[data-config-ui-active]) .local-bg-cropper{position:fixed;inset:0;z-index:12000;display:grid;place-items:center;padding:24px;background:rgba(3,7,9,.76);backdrop-filter:blur(12px)}:where(html[data-config-ui-active]) .local-bg-cropper-card{width:min(720px,calc(100vw - 48px));padding:18px;border:1px solid rgba(216,186,109,.42);border-radius:10px;background:#101b20;box-shadow:0 24px 80px #000b}:where(html[data-config-ui-active]) .local-bg-cropper-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}:where(html[data-config-ui-active]) .local-bg-cropper-head div{display:grid;gap:4px}:where(html[data-config-ui-active]) .local-bg-cropper-head small{font:10px ui-monospace,monospace;letter-spacing:1.5px;color:#92b4bd}:where(html[data-config-ui-active]) .local-bg-cropper-head strong{font-size:18px;color:#e9ece7}:where(html[data-config-ui-active]) .local-bg-cropper-head button{width:32px;height:32px;border:1px solid #ffffff1c;border-radius:6px;background:#ffffff08;color:#b9c3c1;font-size:22px;cursor:pointer}:where(html[data-config-ui-active]) .local-bg-cropper-preview{position:relative;height:270px;overflow:hidden;border:1px solid #ffffff20;border-radius:7px;background:#071216}:where(html[data-config-ui-active]) .local-bg-cropper-image{position:absolute;inset:0;background-repeat:no-repeat;background-size:100% auto;background-position:50% 40%}:where(html[data-config-ui-active]) .local-bg-cropper-preview>span{position:absolute;left:12px;bottom:10px;padding:4px 7px;border-radius:4px;background:#071216b8;color:#b7c6c5;font-size:11px}:where(html[data-config-ui-active]) .local-bg-cropper-controls{display:grid;gap:12px;padding:16px 2px 8px}:where(html[data-config-ui-active]) .local-bg-cropper-controls label{display:grid;grid-template-columns:90px 54px 1fr;align-items:center;gap:10px;color:#b5c1bf;font-size:13px}:where(html[data-config-ui-active]) .local-bg-cropper-controls output{font:12px ui-monospace,monospace;color:var(--wc-gold)}:where(html[data-config-ui-active]) .local-bg-cropper-controls input{accent-color:var(--wc-gold)}:where(html[data-config-ui-active]) .local-bg-cropper-foot{display:flex;justify-content:flex-end;gap:8px;padding-top:8px}:where(html[data-config-ui-active]) .local-bg-cropper-foot button{border:1px solid #ffffff1f;border-radius:5px;padding:8px 13px;background:#ffffff08;color:#c6d0cc;cursor:pointer}:where(html[data-config-ui-active]) .local-bg-cropper-foot button.primary{border-color:#d8ba6d99;background:#d8ba6d;color:#18201e;font-weight:600}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-upper-left>.setup-sec-weapon{margin:0 0 14px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .setup-sec-body{display:grid!important;grid-template-columns:minmax(0,1fr) 180px;gap:12px;align-items:start}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .setup-pick-card{min-height:96px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-upper-right{align-self:stretch!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-upper-right .setup-sec{height:100%!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-lower-body{padding:0 18px 18px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-echo{margin-top:0!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-echo-controls{display:grid!important;grid-template-columns:1fr 1fr;gap:8px 18px!important;padding:13px!important;border:1px solid var(--wc-line);border-radius:5px;background:rgba(8,15,18,.54)}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-echo-ctrl-row{min-width:0!important;border:0!important;padding:5px 0!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-echo-ctrl-row:last-child{grid-column:1/-1}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-echo-ctrl-label{color:var(--wc-muted)!important;font-size:11px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .build-slots-stack{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:8px!important;margin-top:11px!important;overflow:visible!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .build-slot-card{min-width:0!important;min-height:190px!important;padding:10px!important;background:linear-gradient(180deg,rgba(22,35,40,.9),rgba(11,19,23,.9))!important;border:1px solid var(--wc-line)!important;border-radius:5px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .build-slot-card.is-main{border-color:rgba(216,186,109,.68)!important;box-shadow:inset 0 2px var(--wc-gold)!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .build-slot-visual{height:64px!important;background:rgba(5,11,14,.56)!important;border-radius:4px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .build-slot-title-row{display:block!important;margin-top:7px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .build-slot-visual-name{font-size:12px!important;color:#e8e5d9!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .build-slot-meta-line{font-size:10px!important;color:var(--wc-muted)!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .echo-summary{margin-top:10px!important;border:1px solid var(--wc-line);border-radius:5px;background:rgba(8,15,18,.55);padding:10px 12px!important;color:var(--wc-muted)!important}
@media(max-width:1100px){:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-hero{grid-template-columns:1fr}:where(html[data-config-ui-active]) .local-hero-copy{max-width:none!important}:where(html[data-config-ui-active]) .setup-echo-controls{grid-template-columns:1fr!important}:where(html[data-config-ui-active]) .setup-echo-ctrl-row:last-child{grid-column:auto!important}:where(html[data-config-ui-active]) .build-slots-stack{grid-template-columns:repeat(3,minmax(0,1fr))!important}}

/* DEMO parity pass: make the real DOM use the same left workspace / right summary composition. */
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-col.local-active{display:block!important;padding-bottom:18px!important}
/* 桥接宿主只允许出现在活动列：非活动列即便残留 .local-bridge-host 也保持隐藏（防切换后上一列整列可见） */
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-col.local-active,:where(html[data-config-ui-active]) 
#workspaceLayout.phase-setup .setup-member-col:has(>.local-config-layout):has(>.build-modal-backdrop){display:block!important;padding-bottom:18px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-col:not(.local-active){display:none!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-col.local-active>.local-config-layout{display:grid!important;grid-template-columns:minmax(0,1fr) 290px;gap:20px;padding:0 20px 0!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main{min-width:0;display:block!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-aside{min-width:0;align-self:start;display:block!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main>.local-config-hero{margin:0 0 10px!important;min-height:255px;height:255px;border-radius:6px}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main>.setup-member-upper-left{display:block!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-aside>.setup-member-upper-right{display:block!important;padding:0!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-aside>.setup-member-upper-right>.setup-sec{min-height:485px;height:auto!important;margin-top:0!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main>.setup-lower-body{padding:0!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .setup-sec-weapon .setup-sec-body{grid-template-columns:1fr 1fr!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .setup-sec-echo{margin-top:10px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .build-slots-stack{grid-template-columns:repeat(5,minmax(0,1fr))!important}
@media(max-width:1100px){:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-col.local-active>.local-config-layout{grid-template-columns:1fr;padding:0 14px!important}:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-aside{order:-1}:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-aside>.setup-member-upper-right>.setup-sec{min-height:0}:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .build-slots-stack{grid-template-columns:repeat(3,minmax(0,1fr))!important}}

/* The shell itself must begin directly beside the compact rail. */
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup #sidebar{padding-left:18px!important;padding-right:18px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup #sidebar .sidebar-layout{max-width:none!important;margin-left:0!important;margin-right:0!important}

/* Real renderer replaces member columns when opening a picker. Keep the modal host visible. */
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-col:has(> .build-modal-backdrop){display:block!important;position:static!important;overflow:visible!important}

/* Echo card refinement: a compact information hierarchy without changing any real controls. */
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .build-slots-stack{gap:9px!important;align-items:stretch!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .build-slot-card{display:flex!important;flex-direction:column!important;min-height:264px!important;padding:11px!important;border-radius:8px!important;background:linear-gradient(160deg,rgba(25,38,43,.96),rgba(10,18,22,.96))!important;box-shadow:inset 0 1px rgba(222,239,233,.05),0 12px 28px rgba(0,0,0,.2)!important;transition:border-color .18s,background .18s,transform .18s!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .build-slot-card:hover{transform:translateY(-2px)!important;border-color:rgba(216,186,109,.55)!important;background:linear-gradient(160deg,rgba(31,46,50,.98),rgba(11,20,24,.98))!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .build-slot-card.is-main{border-color:rgba(216,186,109,.82)!important;box-shadow:inset 0 2px var(--wc-gold),inset 0 1px rgba(255,255,255,.05),0 14px 30px rgba(0,0,0,.24)!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .build-slot-identity{gap:10px!important;margin-bottom:10px!important;padding-bottom:10px!important;border-bottom:1px solid rgba(188,201,202,.13)!important;align-items:flex-start!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .build-slot-visual,:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .build-slot-visual img,:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .build-slot-visual-ph{width:76px!important;height:76px!important;border-radius:7px!important;flex:none!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .build-slot-meta{gap:3px!important;padding-top:1px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .build-slot-visual-name{font-size:13px!important;line-height:1.25!important;letter-spacing:.02em!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .build-slot-meta-line{font-size:10px!important;line-height:1.4!important;color:#a5b4b4!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .build-slot-main-badge{padding:2px 6px!important;font-size:9px!important;letter-spacing:.02em!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .echo-main-card{display:block!important;margin:0 0 9px!important;padding:10px!important;border-radius:8px!important;background:linear-gradient(135deg,rgba(33,31,28,.72),rgba(24,27,28,.72))!important;border:1px solid rgba(216,186,109,.23)!important;box-shadow:none!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .echo-main-row{display:block!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .echo-main-card .echo-row-label{display:block!important;margin-bottom:7px!important;color:#e4e5dc!important;font-size:12px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .echo-main-fields{display:grid!important;grid-template-columns:minmax(0,1fr) 76px!important;gap:7px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .echo-main-fields select{min-width:0!important;width:100%!important;height:34px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .echo-main-value{width:100%!important;min-width:0!important;height:34px!important;border-radius:6px!important;text-align:center!important;color:var(--wc-gold)!important;font-size:18px!important;font-weight:700!important;background:rgba(13,19,21,.72)!important;border-color:rgba(216,186,109,.25)!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .echo-sub-block{gap:7px!important;margin-top:0!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .echo-sub-divider{display:none!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .echo-sub-empty{padding:8px 9px!important;border:1px solid rgba(188,201,202,.10)!important;border-radius:7px!important;background:rgba(12,22,26,.55)!important;color:#829395!important;font-size:10px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .echo-sub-row{padding:7px 8px!important;border-radius:7px!important;background:rgba(12,22,26,.62)!important;border:1px solid rgba(188,201,202,.12)!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .setup-add-sub{align-self:flex-start!important;margin-top:1px!important;padding:6px 9px!important;border-radius:6px!important;color:var(--wc-gold)!important;font-size:10px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .build-slot-foot{margin-top:auto!important;padding-top:10px!important;border-top:1px solid rgba(188,201,202,.10)!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .build-slot-foot .btn{width:100%!important;min-height:30px!important;padding:5px 8px!important;border-radius:6px!important;font-size:10px!important}

/* Content-first pass: show the stat effect/value, remove redundant row labels. */
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .build-slot-card{min-height:238px!important;padding:10px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .build-slot-identity{gap:8px!important;margin-bottom:8px!important;padding-bottom:8px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .build-slot-visual,:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .build-slot-visual img,:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .build-slot-visual-ph{width:68px!important;height:68px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .build-slot-visual-name{font-size:12px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .echo-main-card{margin:0 0 7px!important;padding:8px!important;background:rgba(20,27,29,.52)!important;border-color:rgba(216,186,109,.16)!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .echo-main-card .echo-row-label,:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .echo-sub-row .echo-row-label{display:none!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .echo-main-fields{grid-template-columns:minmax(0,1fr) 70px!important;gap:6px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .echo-main-fields select,:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .echo-main-value{height:31px!important;font-size:11px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .echo-main-value{font-size:16px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .echo-sub-row{padding:5px 6px!important;gap:0!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .echo-sub-tip{display:none!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .echo-sub-row .echo-row-fields{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,.8fr) 22px!important;gap:5px!important;width:100%!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .echo-sub-row select{min-width:0!important;width:100%!important;height:29px!important;font-size:10px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .echo-sub-del{width:22px!important;height:29px!important;padding:0!important;border:0!important;background:transparent!important;color:#87999a!important;font-size:16px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .echo-sub-empty{padding:6px 8px!important;font-size:9px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .setup-add-sub{padding:5px 8px!important;font-size:9px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .build-slot-foot{padding-top:7px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .build-slot-foot .btn{width:auto!important;min-height:27px!important;padding:4px 9px!important;font-size:9px!important}

/* Element-damage main stats show only the element and result; the internal category stays in the DOM. */
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .echo-main-fields:has(>[data-echo-main-element]){grid-template-columns:minmax(0,1fr) 78px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .echo-main-fields:has(>[data-echo-main-element])>[data-echo-main1]{display:none!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .echo-main-fields:has(>[data-echo-main-element])>[data-echo-main-element]{display:block!important;min-width:0!important;width:100%!important}

/* Give each echo readable space; the strip scrolls horizontally instead of shrinking controls. */
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .build-slots-stack{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;grid-template-columns:none!important;overflow-x:auto!important;overflow-y:visible!important;padding:2px 2px 12px!important;scroll-snap-type:x proximity!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .build-slots-stack>.build-slot-card{flex:0 0 236px!important;width:236px!important;scroll-snap-align:start!important}
@media(min-width:1500px){:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .build-slots-stack>.build-slot-card{flex-basis:252px!important;width:252px!important}}
/* Full-width echo workspace and readable PC controls. */
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide{grid-column:1/-1;grid-row:2;padding:0!important;min-width:0}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .build-slots-stack{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;overflow:visible!important;padding:0!important;gap:12px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .build-slots-stack>.build-slot-card{width:auto!important;min-width:0!important;min-height:280px!important;padding:14px!important;transform:none!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .build-slot-card *{font-family:'Microsoft YaHei UI','Microsoft YaHei',sans-serif!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .build-slot-visual-name{font-size:14px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .build-slot-meta-line,:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .setup-add-sub,:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .build-slot-foot .btn{font-size:12px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .build-slot-meta-line{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .echo-main-card,:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .echo-sub-row{background:transparent!important;border:0!important;border-bottom:1px solid #ffffff12!important;border-radius:0!important;padding:8px 0!important;box-shadow:none!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .echo-main-fields{grid-template-columns:minmax(0,1fr) 72px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .echo-main-fields>select{display:none!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .echo-sub-row .echo-row-fields{grid-template-columns:minmax(0,1fr) 76px 22px!important;gap:4px!important;flex:1!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .echo-sub-row select{font-size:13px!important;height:34px!important;padding:0 3px!important;background:transparent!important;border-color:transparent!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .echo-sub-row .echo-row-fields:has(>select:nth-of-type(3)){grid-template-columns:minmax(0,1fr) 76px 22px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .echo-sub-row .echo-row-fields:has(>select:nth-of-type(3))>select:first-child{grid-column:1/-1}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .echo-main-value{font-size:16px!important;background:transparent!important;border:0!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .build-slot-card.is-main .build-slot-foot{display:none!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .echo-sub-empty{font-size:12px!important;border:0!important;background:transparent!important}
:where(html[data-config-ui-active]) .local-stat-trigger{width:100%;min-width:0;text-align:left;display:flex;justify-content:space-between;align-items:center;padding:6px 3px;color:#e9ece7;background:transparent;border:0;border-radius:4px;font:14px 'Microsoft YaHei',sans-serif;cursor:pointer}
:where(html[data-config-ui-active]) .local-stat-trigger::after{content:'⌄';color:#93a2a8;margin-left:6px}
:where(html[data-config-ui-active]) .local-stat-trigger:hover,:where(html[data-config-ui-active]) .local-stat-trigger:focus-visible{background:#ffffff0c;outline:1px solid #d8ba6d66}
:where(html[data-config-ui-active]) .local-stat-popup{position:fixed;z-index:10000;width:232px;padding:6px;background:#172027;border:1px solid #d8ba6d66;border-radius:8px;box-shadow:0 14px 40px #0009}
:where(html[data-config-ui-active]) .local-stat-popup button{display:block;width:100%;text-align:left;border:0;border-radius:4px;padding:10px 12px;background:transparent;color:#e9ece7;font:14px 'Microsoft YaHei',sans-serif;cursor:pointer}
:where(html[data-config-ui-active]) .local-stat-popup button:hover,:where(html[data-config-ui-active]) .local-stat-popup button:focus-visible{background:#d8ba6d20;color:#e4ca86}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main.local-echo-wide .echo-main-fields:has(>.local-stat-trigger)>select{display:none!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main.local-echo-wide .echo-main-fields:has(>.local-stat-trigger){grid-template-columns:minmax(0,1fr) 72px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-summary{height:106px;margin:0 0 14px;padding:12px 15px;border:1px solid rgba(188,201,202,.16);border-radius:7px;background:rgba(16,25,29,.68);display:grid;grid-template-columns:120px 1fr;gap:12px;align-items:center}
:where(html[data-config-ui-active]) .local-summary-kicker{font:10px ui-monospace,monospace;letter-spacing:1.4px;color:#8faab0}:where(html[data-config-ui-active]) .local-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}:where(html[data-config-ui-active]) .local-summary-grid div{display:grid;gap:5px;border-left:1px solid rgba(188,201,202,.13);padding-left:12px;min-width:0}:where(html[data-config-ui-active]) .local-summary-grid small{font-size:11px;color:#849496}:where(html[data-config-ui-active]) .local-summary-grid b{font:14px ui-monospace,monospace;color:#e5ece8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:where(html[data-config-ui-active]) .local-summary-grid i{font-style:normal;color:var(--wc-gold);margin-left:7px;font-size:12px}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main>.setup-sec-weapon{margin-top:0!important}
/* Summary follows weapon content without an artificial alignment spacer. */
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .local-config-summary{margin-top:0!important}
@media(max-width:1050px){:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-summary{grid-template-columns:1fr;height:auto}:where(html[data-config-ui-active]) .local-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:1101px){:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .build-slots-stack{grid-template-columns:repeat(5,minmax(0,1fr))!important;overflow-x:hidden!important}:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .build-slot-card{min-width:0!important}}

/* Keep副词条选择器 readable when five echo cards share the row.  On narrower
   viewports the strip scrolls instead of collapsing the stat name to one glyph. */
@layer localConfigFix {
  :where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .build-slots-stack {
    grid-template-columns: repeat(5, minmax(246px, 1fr)) !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    padding-bottom: 10px !important;
  }
  :where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .build-slots-stack > .build-slot-card {
    min-width: 246px !important;
  }
  :where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .echo-sub-row .echo-row-fields {
    grid-template-columns: minmax(112px, 1fr) 76px 22px !important;
    min-width: 0 !important;
  }
  :where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .echo-sub-row .echo-row-fields > select:not(.echo-sub-value) {
    min-width: 112px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  :where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .echo-sub-row .echo-row-fields > .echo-sub-value {
    min-width: 76px !important;
  }
  /* The stat selector and value selector are one visual control pair. */
  :where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .echo-sub-row .echo-row-fields > .echo-field-select {
    box-sizing: border-box !important;
    background: var(--ui-inner, #1b1d26) !important;
    border: 1px solid var(--ui-line, #4b4b58) !important;
    border-radius: 8px !important;
    color: var(--ui-text, #ececf2) !important;
  }
  /* Keep all five cards in the same viewport, matching the local layout. */
  :where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .build-slots-stack {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    overflow-x: hidden !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  :where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .build-slots-stack > .build-slot-card {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }
}

/* Configuration hierarchy: original controls, clearer character/weapon ownership. */
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup {font-family:'Microsoft YaHei UI','Microsoft YaHei',sans-serif}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup :is(button,select,input,.setup-sec-title,.build-hero-name,.local-hero-copy h2){font-family:'Microsoft YaHei UI','Microsoft YaHei',sans-serif!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-col-head{padding:9px 20px!important;background:transparent!important;border-bottom:0!important;min-height:42px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-col-title>.setup-member-chip{display:none!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-col-title>strong{font:12px 'Microsoft YaHei UI',sans-serif!important;letter-spacing:0!important;color:#a6b2bf!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-clear-member{font-size:12px!important;padding:5px 9px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-dmg-value{font:18px ui-monospace,Consolas,monospace!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-hero-copy h2{font-size:32px!important;font-weight:600!important;letter-spacing:1px!important;line-height:1.3}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-hero-copy small{font-size:11px!important;letter-spacing:1px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-hero-copy p{font-size:13px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-team-copy small{font-size:11px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-title{font-size:16px!important;font-weight:600!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .build-hero-name{font-size:18px!important;font-weight:600!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main>[data-wc-chain-compact]{display:flex!important;align-items:center;justify-content:space-between;gap:16px;margin:0 0 14px!important;padding:14px 16px!important;border:1px solid #b6c7dc24!important;border-radius:6px!important;background:#151d28a8!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main>[data-wc-chain-compact] .resonance-chain-checks-head{display:flex;align-items:center;gap:16px;margin:0!important;font-size:14px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .resonance-chip-row{display:flex;gap:6px;flex-wrap:wrap}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .resonance-chip{min-width:36px!important;min-height:32px!important;padding:4px 9px!important;font:13px ui-monospace,Consolas,monospace!important;border-radius:5px!important;box-shadow:none!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .resonance-chain-current{font:13px ui-monospace,Consolas,monospace!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .weapon-ref-compact .resonance-chain-checks-head{font-size:14px!important;margin-bottom:12px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-summary{height:auto;min-height:76px;grid-template-columns:80px 1fr;background:#131c2580}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-summary-kicker{font:12px 'Microsoft YaHei UI',sans-serif;letter-spacing:0}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup :is(button,select):focus-visible{outline:2px solid #d8ba6d;outline-offset:3px}
/* Two separated windows onto the same portrait; only the lower window is frosted. */
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main>.local-config-hero{margin-bottom:12px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main>[data-wc-chain-compact]{position:relative;isolation:isolate;overflow:hidden;height:96px;box-sizing:border-box;justify-content:flex-start;gap:28px;padding:16px 24px!important;background:#121b25!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main>[data-wc-chain-compact]::before{content:'';position:absolute;inset:0;z-index:-2;background-image:var(--chain-image);background-size:var(--chain-size);background-position:var(--chain-position);background-repeat:no-repeat;filter:blur(5px) saturate(.8);pointer-events:none}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main>[data-wc-chain-compact]::after{content:'';position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,rgba(10,17,27,.88),rgba(15,23,35,.68) 48%,rgba(18,28,39,.32));pointer-events:none}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup [data-wc-chain-compact] .resonance-chain-checks-head{flex-direction:column;align-items:flex-start!important;gap:7px!important;flex:none;min-width:80px}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup [data-wc-chain-compact] .resonance-chip-row{gap:14px;flex-wrap:nowrap}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup [data-wc-chain-compact] .resonance-chip{position:relative;width:42px;height:40px;border:1px solid #b9c8d53d!important;background:#101b29b8!important;color:#a6b3c1!important;overflow:visible}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup [data-wc-chain-compact] .resonance-chip:nth-child(n+3)::before{content:'';position:absolute;left:-15px;top:50%;width:13px;height:1px;background:#b9c8d544;pointer-events:none}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup [data-wc-chain-compact] .resonance-chip:first-child{margin-right:10px}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup [data-wc-chain-compact] .resonance-chip.is-unlocked{color:#dfc681!important;border-color:#d8ba6d66!important;background:#d8ba6d1c!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup [data-wc-chain-compact] .resonance-chip.active{color:#171e26!important;background:#d8ba6d!important;border-color:#ead59b!important;box-shadow:0 0 0 3px #d8ba6d20!important}
:where(html[data-config-ui-active]) .local-bg-cropper-preview{height:auto;min-height:120px}
:where(html[data-config-ui-active]) .local-crop-chain-preview{position:absolute;bottom:0;left:0;right:0;height:var(--crop-lower);box-sizing:border-box;display:flex;align-items:center;padding:0 15px;color:#e5d6ac;font:11px ui-monospace,monospace;background:linear-gradient(90deg,#0a111be0,#121c2752);backdrop-filter:blur(4px);border-top:1px solid #ffffff20}
:where(html[data-config-ui-active]) .local-crop-chain-preview::before{content:'';position:absolute;bottom:100%;left:0;right:0;height:var(--crop-gap);background:#101b20}
:where(html[data-config-ui-active]) .local-bg-cropper-preview>span{top:10px;bottom:auto}
/* Subtle engraving and a six-segment resonance dial; decorative only. */
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main>[data-wc-chain-compact]{container-type:inline-size;box-shadow:inset 0 1px #e2efff0d!important}
:where(html[data-config-ui-active]) .local-chain-gauge{position:relative;margin-left:auto;flex:0 0 150px;height:84px;pointer-events:none;user-select:none;opacity:.65}
:where(html[data-config-ui-active]) .local-chain-gauge svg{width:150px;height:90px;fill:none;stroke:#b3c3d342;stroke-width:3}
:where(html[data-config-ui-active]) .local-chain-gauge .local-chain-orbit{stroke-width:.6;stroke:#c3d3df38}
:where(html[data-config-ui-active]) .local-chain-gauge [data-chain-segment]{transition:stroke .18s ease}
:where(html[data-config-ui-active]) .local-chain-gauge .lit{stroke:#d8ba6d}
:where(html[data-config-ui-active]) .local-chain-readout{position:absolute;left:0;right:0;bottom:12px;text-align:center;color:#c6cfd9;font:24px ui-monospace,Consolas,monospace;letter-spacing:2px}
:where(html[data-config-ui-active]) .local-chain-readout b{font-weight:400}:where(html[data-config-ui-active]) .local-chain-readout small{font-size:12px;color:#a1aebc;letter-spacing:0}
:where(html[data-config-ui-active]) .local-chain-corners{position:absolute;inset:6px;pointer-events:none;background:linear-gradient(#d8ba6d44,#d8ba6d44) top left/22px 1px no-repeat,linear-gradient(#d8ba6d44,#d8ba6d44) top left/1px 10px no-repeat,linear-gradient(#b5c8db38,#b5c8db38) bottom right/22px 1px no-repeat,linear-gradient(#b5c8db38,#b5c8db38) bottom right/1px 10px no-repeat}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup [data-wc-chain-compact] .resonance-chip.is-unlocked::before{background:#d8ba6d80}
@container(max-width:740px){:where(html[data-config-ui-active]) .local-chain-gauge{display:none}}
@media(prefers-reduced-motion:reduce){:where(html[data-config-ui-active]) .local-chain-gauge [data-chain-segment]{transition:none}}
/* Precision resonance instrument: static at rest, brief activation on selection. */
:where(html[data-config-ui-active]) .local-chain-gauge{flex-basis:180px;height:96px;opacity:.85;align-self:center}
:where(html[data-config-ui-active]) .local-chain-gauge svg{position:absolute;top:0;left:0;width:180px;height:160px;stroke-width:2.5}
:where(html[data-config-ui-active]) .local-chain-gauge .local-chain-disc{fill:#07131b55;stroke:#c8e4ef24;stroke-width:.7}
:where(html[data-config-ui-active]) .local-chain-gauge .local-chain-tick{stroke:#d8edf16b;stroke-width:.7}
:where(html[data-config-ui-active]) .local-chain-gauge .local-chain-inner{stroke:#8ccbd366;stroke-width:.8}
:where(html[data-config-ui-active]) .local-chain-gauge .local-chain-reticle{stroke:#bddde666;stroke-width:.7}
:where(html[data-config-ui-active]) .local-chain-gauge .lit{stroke:#87d7e7}
:where(html[data-config-ui-active]) .local-chain-gauge .current{stroke:#e5c878;filter:drop-shadow(0 0 3px #d8ba6d66);animation:chain-energize .45s ease-out 1}
:where(html[data-config-ui-active]) .local-chain-readout{top:40px;bottom:auto;display:grid;gap:3px;font-size:27px;color:#e2edf0;text-shadow:0 0 12px #98dce32b}
:where(html[data-config-ui-active]) .local-chain-readout small{font:11px 'Microsoft YaHei UI',sans-serif;color:#b0c7d0;letter-spacing:2px}
@keyframes chain-energize{from{stroke:#f3fcff;stroke-width:4;filter:drop-shadow(0 0 6px #8edbec)}to{stroke:#e5c878;stroke-width:2.5;filter:drop-shadow(0 0 3px #d8ba6d66)}}
@media(prefers-reduced-motion:reduce){:where(html[data-config-ui-active]) .local-chain-gauge .current{animation:none}}
/* Align the two upper columns by layout, not a fixed spacer. */
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-layout>.local-config-main:not(.local-echo-wide){display:flex!important;flex-direction:column!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-layout>.local-config-main>.local-config-hero,:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main>[data-wc-chain-compact]{flex-shrink:0}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main>.setup-member-upper-left{display:flex!important;flex-direction:column;flex:1}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-upper-left>.setup-sec-weapon{flex:1;display:flex;flex-direction:column;margin:0!important;padding:16px 20px!important;background:linear-gradient(110deg,#202b3699,#101922aa)!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-aside{align-self:stretch;display:flex!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-aside>.setup-member-upper-right{flex:1;display:flex!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-aside>.setup-member-upper-right>.setup-sec{flex:1;height:auto!important;min-height:0;margin:0!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .setup-sec-weapon .setup-sec-body{flex:1;grid-template-columns:minmax(0,1fr) 240px!important;align-items:center;gap:24px}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .setup-pick-card{border:0!important;background:transparent!important;box-shadow:none!important;padding:8px 0!important;gap:18px!important;text-align:left}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .setup-pick-card:hover{background:#d9ecff06!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .build-weapon-icon{width:88px;height:88px;flex:0 0 88px;border-radius:8px;background:radial-gradient(ellipse,#d8ba6d18,transparent 72%);border:1px solid #c5d9eb14}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .build-weapon-icon img{width:100%;height:100%;object-fit:contain}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .build-hero-stat-line{font-size:13px!important;line-height:1.7;color:#aabac9}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .weapon-ref-compact{border:0!important;border-left:1px solid #b8cadb26!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;padding:8px 0 8px 22px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-layout{row-gap:16px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .setup-sec-echo{margin-top:0!important}
/* The legacy summary min-height:100% excluded the title and overflowed its frame. */
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-aside .setup-sec-panel{display:flex!important;flex-direction:column;min-height:min-content!important;box-sizing:border-box}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-aside .setup-sec-panel>.setup-sec-title{flex:none}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-aside .build-panel-summary{min-height:0!important;height:auto!important;flex:1 0 auto;box-sizing:border-box;margin-bottom:0!important}
/* Reuse the original echo controls inside the weapon panel; slot cards stay full width. */
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .setup-sec-weapon>.setup-sec-body{flex:0 0 auto;grid-template-columns:minmax(0,1fr) 240px!important;gap:18px;padding-bottom:12px}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon>.setup-echo-controls{margin:0!important;padding:12px 0 0!important;border:0!important;border-top:1px solid #b8cadb26!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:8px 18px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .setup-echo-ctrl-label{font-size:12px!important;min-width:64px;color:#9eafbd!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .setup-echo-ctrl-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .setup-chip-row{display:flex;flex-wrap:wrap;gap:5px}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .setup-echo-controls> :last-child{grid-column:auto!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .setup-echo-controls button{font-size:12px!important}
/* Compact horizontal equipment configuration with original controls in a native dialog. */
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-upper-left>.setup-sec-weapon{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(270px,.85fr);column-gap:24px;align-content:start;row-gap:12px}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon>.setup-sec-title{grid-column:1/-1}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main .setup-sec-weapon>.setup-sec-body{display:grid!important;grid-template-columns:1fr!important;gap:4px;padding:0;align-content:start}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .weapon-ref-compact{padding:8px 0!important;border-left:0!important;display:flex;gap:14px;align-items:center}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .weapon-ref-compact .resonance-chain-checks-head{margin:0!important;gap:8px}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon>.setup-echo-controls{display:flex!important;flex-direction:column;gap:10px!important;border-top:0!important;border-left:1px solid #b8cadb26!important;padding:0 0 0 20px!important;min-width:0;align-self:stretch}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .setup-echo-ctrl-row[hidden]{display:none!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .build-set-rows{width:100%;min-width:0}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .build-set-row{display:flex;gap:6px;min-width:0}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .build-set-pick{flex:1;min-width:0;width:auto;padding:6px 8px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .build-set-row input{width:44px!important;min-width:0!important}
:where(html[data-config-ui-active]) .local-template-open{align-self:flex-start;padding:8px 12px;border:1px solid #b8cadb38;border-radius:5px;background:#192632;color:#d8e2eb;cursor:pointer;font-size:13px}
:where(html[data-config-ui-active]) .local-template-dialog{position:fixed;inset:0;margin:auto;max-height:calc(100dvh - 48px);overflow:auto;width:min(580px,85vw);box-sizing:border-box;padding:24px;border:1px solid #c2d9e444;border-radius:10px;background:#111d29;color:#e5edf3;box-shadow:0 24px 80px #0009}
:where(html[data-config-ui-active]) .local-template-dialog::backdrop{background:#03091199;backdrop-filter:blur(5px)}
:where(html[data-config-ui-active]) .local-template-head{display:flex;justify-content:space-between;align-items:center;font-size:18px}:where(html[data-config-ui-active]) .local-template-head button{border:0;background:transparent;color:#d0dce5;font-size:24px;cursor:pointer}
:where(html[data-config-ui-active]) .local-template-dialog p{color:#9aafc0;font-size:13px;margin:12px 0 20px}
:where(html[data-config-ui-active]) .local-template-dialog .setup-echo-ctrl-row{display:flex;flex-direction:column;align-items:flex-start!important;gap:10px!important;padding:14px 0!important}
:where(html[data-config-ui-active]) .local-template-dialog .setup-chip-row{display:flex;flex-wrap:wrap;gap:8px}
/* Member identity and readable instrument panel, scoped to configuration. */
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-team-strip{gap:12px;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-team-card{position:relative;isolation:isolate;overflow:hidden;min-height:82px;padding:14px 18px;border:1px solid #b7ccdf20;border-radius:7px;background:#101720;color:#cad5df;transform:none!important;box-shadow:inset 0 1px #e0eeff09}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-team-card.active{background:#151e28;color:#f1e7cb;border-color:#d8ba6d68;box-shadow:inset 3px 0 #d8ba6d,inset 0 1px #e8d69919}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-team-card:hover{border-color:#bdd9eb66;background:#18212d}
:where(html[data-config-ui-active]) .local-team-portrait{position:absolute;inset:0 0 0 auto;width:62%;height:100%;object-fit:cover;object-position:65% 38%;opacity:.24;mask-image:linear-gradient(90deg,transparent,#000 75%);pointer-events:none;z-index:-1}
:where(html[data-config-ui-active]) .local-team-card.active .local-team-portrait{opacity:.42}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-team-avatar{width:48px;height:48px;border:1px solid #c7dceb36;border-radius:6px;background:#131e2b;box-shadow:0 3px 10px #0004}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-team-copy{gap:7px}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-team-copy strong{font-size:15px;font-weight:600;letter-spacing:.03em}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-team-copy small{color:#9caabc;font-size:11px!important}
:where(html[data-config-ui-active]) .local-team-copy small b{font:13px ui-monospace,Consolas,monospace;color:#d3dfe9;margin-left:7px}
:where(html[data-config-ui-active]) .local-team-index{margin-left:auto;align-self:flex-start;font:13px ui-monospace,Consolas,monospace;letter-spacing:2px;color:#a9c1d478}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-col{background:linear-gradient(130deg,#131b2499,#0b111999)!important;border-color:#bdd2e514!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-aside .setup-sec-panel{background:linear-gradient(155deg,#17212ce8,#0e151ee8)!important;border-color:#b6cee32b!important;box-shadow:inset 0 1px #ebf5ff0a}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-aside .build-panel-summary{background:transparent!important;border:0!important;box-shadow:none!important;padding:6px 0 0!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .build-panel-summary-grid{gap:8px!important;align-content:start}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .build-panel-stat-card{background:#09121b55!important;border-color:#b9cfe31c!important;box-shadow:none!important;padding:11px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .build-panel-stat-card::before,:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .build-panel-stat-card::after{display:none!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .build-panel-stat-card:not(.half){display:flex!important;flex-direction:row!important;justify-content:space-between;align-items:center;gap:8px;min-height:46px!important;height:auto!important;border:0!important;border-bottom:1px solid #b9cfe31a!important;border-radius:0!important;background:transparent!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .build-panel-stat-card:hover{background:#b9d8f00b!important;border-color:#b9d8f057!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .build-panel-stat-label{font:12px 'Microsoft YaHei UI','Microsoft YaHei',sans-serif!important;color:#a5b4c4!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .build-panel-stat-value{font:17px ui-monospace,Consolas,monospace!important;color:#e0e9ef!important;white-space:nowrap}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .build-panel-stat-card.half .build-panel-stat-value{font-size:20px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .build-panel-stat-label-row{min-width:0;gap:6px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .build-panel-stat-icon{opacity:.65}
/* Restore roomy attribute cards while retaining the cleaner panel frame. */
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .build-panel-stat-card:not(.half){display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:flex-start!important;gap:8px!important;min-height:64px!important;padding:12px!important;border:1px solid #b9cfe324!important;border-radius:5px!important;background:#09121b55!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .build-panel-stat-card:not(.half) .build-panel-stat-value{font-size:20px!important}
/* Round two: portrait typography, layered glass and a restrained equipment plinth. */
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-hero-copy{padding:26px 30px}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-hero-copy small{display:inline-flex;align-items:center;gap:8px;color:#bfcedb}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-hero-copy small::before{content:'';width:18px;height:1px;background:#d8ba6d}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-hero-copy h2{font-size:34px!important;letter-spacing:2px!important;text-shadow:0 2px 18px #0007}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-hero-copy p{color:#d0c19b!important;letter-spacing:2px}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-hero-action{background:#101923c9;border-color:#d8ba6d70;box-shadow:inset 0 1px #f0dfb51a}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-hero-crop{background:#111b2266;border-color:#c3d5e32b;color:#b9c8d4;font-size:12px}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-hero{box-shadow:inset 0 1px #e8f4ff18,0 8px 24px #0002!important;border-color:#bdd3e638!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main>[data-wc-chain-compact]::before{filter:blur(4px) saturate(.85)}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-main>[data-wc-chain-compact]::after{background:linear-gradient(90deg,#09121ce8,#111d2bb3 48%,#101d2a66)}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-upper-left>.setup-sec-weapon{background:linear-gradient(120deg,#17212ee6,#0d151fe6)!important;border-color:#b6cee324!important;box-shadow:inset 0 1px #d9ebff0c}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .build-weapon-icon{position:relative;background:radial-gradient(ellipse at 50% 38%,#e5c67620,transparent 70%),linear-gradient(150deg,#26334266,#0a121c77);border:1px solid #d3e4f21c;border-bottom-color:#d8ba6d55;box-shadow:inset 0 1px #e4f1ff0c,0 5px 12px #0003}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .build-weapon-icon::after{content:'';position:absolute;left:20%;right:20%;bottom:5px;height:1px;background:linear-gradient(90deg,transparent,#d8ba6d88,transparent);pointer-events:none}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon :is(.build-hero-meta,.build-hero-stat-line,.build-set-pick,.echo-set-count-label){font-family:'Microsoft YaHei UI','Microsoft YaHei',sans-serif!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .build-set-pick{background:#152130b3!important;border:1px solid #bacfe326!important;border-radius:5px!important;color:#dce5ed}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .build-set-pick:hover{border-color:#c6dceb66!important;background:#203042!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .setup-add-set{background:#111d2966!important;border-color:#bacfe329!important;min-height:30px;color:#a8bdce}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .echo-set-count-input{background:#0c1621!important;border-color:#bacfe326!important;color:#e0e9ef;font-family:ui-monospace,Consolas,monospace!important}
/* Equipment showcase: one enclosure, two material zones, live configuration footer. */
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-upper-left>.setup-sec-weapon{position:relative;background:radial-gradient(ellipse at 14% 45%,#a4c7dc0d,transparent 42%),linear-gradient(110deg,#1b2631f0,#0d151ff0)!important;padding:18px 22px 0!important;row-gap:15px;overflow:hidden}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .setup-pick-card{gap:20px!important;min-height:126px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .build-weapon-icon{width:108px;height:108px;flex-basis:108px;border:0;border-radius:50%;background:radial-gradient(circle,#d8ba6d16 0,#a5d7ef09 53%,transparent 55%),repeating-conic-gradient(from 15deg,#b1c9db24 0deg 1deg,transparent 1deg 30deg);box-shadow:inset 0 0 0 1px #bfd6e323,0 8px 20px #0002}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .build-weapon-icon img{position:relative;z-index:1;padding:4px;box-sizing:border-box;filter:drop-shadow(0 5px 5px #0007)}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .build-weapon-icon::before{content:'';position:absolute;inset:8px;border:1px solid #d8ba6d42;border-left-color:transparent;border-right-color:transparent;border-radius:50%;pointer-events:none}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .build-weapon-icon::after{left:18%;right:18%;bottom:0;box-shadow:0 2px 8px #d8ba6d33}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .build-hero-name{font-size:20px!important;letter-spacing:.5px}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .weapon-ref-compact{padding:12px 0!important;gap:14px}
:where(html[data-config-ui-active]) .local-equipment-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:34px;margin-bottom:4px}
:where(html[data-config-ui-active]) .local-equipment-heading strong{font:600 14px 'Microsoft YaHei UI',sans-serif;color:#d7e4ed;white-space:nowrap}
:where(html[data-config-ui-active]) .local-equipment-heading .local-template-open{padding:6px 8px;font-size:11px;background:#18263699;border-color:#b8cadb24}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon>.setup-echo-controls{padding-top:5px!important;gap:10px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .build-set-row{align-items:center;padding:4px 0;gap:8px}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .build-set-pick{min-height:44px;padding:7px 10px!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon .echo-set-count-label{font-size:11px;color:#8d9fae}
:where(html[data-config-ui-active]) .local-equipment-status{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;gap:12px 28px;margin:0 -22px;padding:12px 22px;background:#080f1777;border-top:1px solid #b3cada1c;box-shadow:inset 0 1px #e7f2ff04}
:where(html[data-config-ui-active]) .local-equipment-status span{display:flex;align-items:center;gap:12px;font:11px 'Microsoft YaHei UI',sans-serif;color:#8fa4b5}
:where(html[data-config-ui-active]) .local-equipment-status b{font:13px ui-monospace,Consolas,monospace;color:#ccdae5;font-weight:400}
:where(html[data-config-ui-active]) .local-equipment-status span:nth-child(2) b{color:#cbbb8d}
/* Subtle prism trim, no continuously moving glare. */
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-member-upper-left>.setup-sec-weapon{border:1px solid transparent!important;background:radial-gradient(ellipse at 12% 35%,#a4bded18,transparent 42%),linear-gradient(115deg,#172334,#101824) padding-box,linear-gradient(125deg,#6ea9ef88,#9f8ee833 40%,#b79deca6) border-box!important;box-shadow:inset 0 1px #edf4ff12,0 8px 24px #07102022}
/* Gradient only: no reflection overlay or shimmer. */
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon::after{content:none!important;display:none!important;animation:none!important}/* Native segmented controls: original buttons remain the only calculation inputs. */
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .resonance-chip-row.local-rubber-row{position:relative;isolation:isolate;display:inline-flex!important;flex-wrap:nowrap!important;gap:0!important;padding:4px!important;border:1px solid #b7cce526;border-radius:10px;background:#091420a8;box-shadow:inset 0 2px 6px #0003;align-self:flex-start}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-rubber-row .resonance-chip,:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-rubber-row .resonance-chip.active,:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-rubber-row .resonance-chip.is-unlocked{position:relative;z-index:1;margin:0!important;min-width:40px!important;width:44px!important;height:34px!important;min-height:34px!important;padding:0 8px!important;border:0!important;border-radius:7px!important;background:transparent!important;box-shadow:none!important;color:#bccbda!important;transition:color .15s}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-rubber-row .resonance-chip::before{display:none!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-rubber-row .resonance-chip.active{color:#242330!important}
:where(html[data-config-ui-active]) .local-rubber-thumb{position:absolute;z-index:0;top:4px;bottom:4px;background:linear-gradient(135deg,#e5d39a,#cbb777);border-radius:7px;box-shadow:inset 0 1px #fff5,0 2px 5px #0003;pointer-events:none}
:where(html[data-config-ui-active]) .local-rubber-row[aria-disabled='true']{opacity:.45}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspaceLayout.phase-setup .weapon-ref-compact .local-rubber-row{background:#dce1ed88;box-shadow:inset 0 1px 4px #39476618;border-color:#939fbb36}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspaceLayout.phase-setup .setup-sec-weapon .local-rubber-row .resonance-chip{background:transparent!important;border:0!important;color:#526177!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspaceLayout.phase-setup .setup-sec-weapon .local-rubber-row .resonance-chip.active{background:transparent!important;color:#27283b!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] .weapon-ref-compact .local-rubber-thumb{background:linear-gradient(135deg,#d2def6,#d5cbef)}

/* Template dialog rows must not inherit the equipment panel's stretched layout. */
:where(html[data-config-ui-active]) .local-template-dialog .setup-echo-ctrl-row{min-height:0!important;height:auto!important;justify-content:flex-start!important;gap:10px!important}
:where(html[data-config-ui-active]) .local-template-dialog .setup-echo-ctrl-label{flex:0 0 auto!important;min-height:0!important;color:inherit!important}

/* Echo materials: stable controls, independent status line, hover-only breathing rim. */
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .build-slot-meta{min-width:0;flex:1}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .build-slot-meta>span:first-child{display:flex!important;flex-direction:column;align-items:flex-start;gap:6px;min-width:0}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .build-slot-visual-name{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;line-height:1.45!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .build-slot-main-badge{display:inline-flex!important;position:absolute!important;top:9px!important;left:9px!important;z-index:2;pointer-events:none;flex:none;white-space:nowrap!important;font-size:11px!important;line-height:1.5;padding:2px 8px!important;border-radius:5px;color:#b9e7ff!important;background:#21374b!important;border:1px solid #658fab!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .build-slot-card.build-slot-card{position:relative;isolation:isolate;border-radius:12px!important;background:radial-gradient(ellipse at 5% 0,#29435a88,transparent 55%),linear-gradient(145deg,#141f30,#0b1320 65%,#1c2037)!important;border-color:#7187af55!important;box-shadow:inset 0 1px #dceaff21,0 8px 22px #03081740!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .build-slot-card.build-slot-card::after{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;border:1px solid #8dd7ff55;background:linear-gradient(130deg,#93dbff0c,transparent 35%,#9e8cf612);box-shadow:inset 0 0 24px #7aaeff18,0 0 16px #739aff18;opacity:.25;z-index:-1}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .build-slot-card.build-slot-card.is-main{border-color:#8bc5dc99!important;box-shadow:inset 0 2px #8ac9e0,0 8px 22px #03081740!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspaceLayout.phase-setup .local-echo-wide .build-slot-card.build-slot-card{background:radial-gradient(ellipse at 0 0,#ffffff,transparent 60%),linear-gradient(135deg,#fffdf7,#f3f0f6 65%,#e9edf7)!important;border-color:#b2bdd366!important;box-shadow:inset 0 1px #fff,0 7px 20px #4355810e!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspaceLayout.phase-setup .local-echo-wide .build-slot-card.build-slot-card.is-main{border-color:#b7a57899!important;box-shadow:inset 0 2px #c5ae78,0 7px 20px #4355810e!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspaceLayout.phase-setup .local-echo-wide .build-slot-main-badge{background:#f0e9d8!important;border-color:#cbb78088!important;color:#735925!important}
@media(hover:hover) and (prefers-reduced-motion:no-preference){
 :where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .build-slot-card.build-slot-card:hover::after{animation:echo-rim-breathe 2.8s ease-in-out infinite}
}
@keyframes echo-rim-breathe{0%,100%{opacity:.3}50%{opacity:1}}

/* Static typographic engraving beneath equipment controls. */
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .setup-sec-weapon{position:relative;isolation:isolate}
:where(html[data-config-ui-active]) .local-equipment-lettering{position:absolute;inset:0;overflow:hidden;border-radius:inherit;pointer-events:none;z-index:-1;display:grid;grid-template-columns:1fr 1fr;align-items:end;padding:0 20px 39px;gap:12px;color:rgba(149,200,235,.065)}
:where(html[data-config-ui-active]) .local-equipment-lettering>span{font-family:Arial,sans-serif;font-size:clamp(24px,3.2vw,70px);font-weight:800;letter-spacing:.035em;white-space:nowrap;line-height:.78;overflow:hidden}
:where(html[data-config-ui-active]) .local-equipment-lettering>small{position:absolute;right:22px;top:20px;font-family:Consolas,monospace;font-size:10px;letter-spacing:.16em;color:rgba(158,195,223,.26)}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] .local-equipment-lettering{color:rgba(69,86,132,.055)}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] .local-equipment-lettering>small{color:rgba(69,86,132,.35)}
/* Upper equipment etching: restrained grid with fading technical traces. */
:where(html[data-config-ui-active]) .local-equipment-lettering::before{content:'';position:absolute;inset:12px 16px 42%;pointer-events:none;background-image:linear-gradient(90deg,rgba(144,185,220,.10) 1px,transparent 1px),linear-gradient(rgba(144,185,220,.08) 1px,transparent 1px);background-size:32px 32px;mask-image:linear-gradient(110deg,transparent 12%,#000 48%,#000 75%,transparent);opacity:.6}
:where(html[data-config-ui-active]) .local-equipment-lettering::after{content:'';position:absolute;top:58px;left:35%;width:28%;height:48px;pointer-events:none;background:repeating-linear-gradient(90deg,rgba(145,195,229,.18) 0 1px,transparent 1px 9px) left top/100% 5px no-repeat,linear-gradient(90deg,transparent,rgba(145,195,229,.15),transparent) left bottom/100% 1px no-repeat;transform:skewX(-18deg);opacity:.65}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] .local-equipment-lettering::before{background-image:linear-gradient(90deg,rgba(75,96,143,.12) 1px,transparent 1px),linear-gradient(rgba(75,96,143,.10) 1px,transparent 1px);opacity:.5}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] .local-equipment-lettering::after{filter:brightness(.55);opacity:.45}
/* Attribute panel engraving belongs to the outer panel only. */
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-aside .setup-sec-panel{position:relative;isolation:isolate;overflow:hidden}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-aside .setup-sec-panel::before{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;border-radius:inherit;background-image:linear-gradient(90deg,#a3c9eb0c 1px,transparent 1px),linear-gradient(#a3c9eb09 1px,transparent 1px);background-size:28px 28px;mask-image:linear-gradient(140deg,transparent 5%,#000 65%,transparent)}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-config-aside .setup-sec-panel::after{content:'ATTRIBUTES';position:absolute;left:50%;top:58%;transform:translate(-50%,-50%) rotate(-65deg);font:800 64px/1 Arial,sans-serif;letter-spacing:.1em;white-space:nowrap;color:rgba(163,202,235,.12);z-index:-1;pointer-events:none}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspaceLayout.phase-setup .local-config-aside .setup-sec-panel::before{background-image:linear-gradient(90deg,#536b9820 1px,transparent 1px),linear-gradient(#536b9812 1px,transparent 1px);opacity:.5}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspaceLayout.phase-setup .local-config-aside .setup-sec-panel::after{color:rgba(71,91,137,.10)}

/* local-ivory.css: unchanged local declarations; configuration scope only. */
/* Ivory companion to the retained classic dark theme. */
html:where([data-config-ui-active])[data-config-theme='ivory-prism']{--bg-surface:#f8f5ee;--bg-elevated:#fffdf8;--bg-card:#fffdf8;--border:#cbd0db;--text-muted:#657086}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] :is(.build-modal,.local-template-dialog,.local-stat-popup,.local-bg-cropper-card){background:linear-gradient(135deg,#fffdf8,#f0eff7)!important;color:#293247!important;border-color:#b8c1d3!important;box-shadow:0 20px 70px #27334633!important;color-scheme:light}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] .build-modal :is(.build-modal-head,.build-modal-body,.char-picker-foot,.weapon-picker-foot){background:transparent!important;border-color:#cbd0db!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] .build-modal :is(button,input,select,textarea,.char-picker-detail,.weapon-picker-detail,.char-picker-kv,.char-picker-tag,.char-picker-foot-stat,.weapon-picker-foot-stat,.esp-card){background:#fffdf8!important;color:#354257!important;border-color:#c7cedd!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] .build-modal :is(strong,h2,h3,h4,.char-pick-name,.weapon-pick-name,.esp-card-name,.char-picker-detail-name){color:#293247!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] .build-modal :is(p,label,.hint,.muted,.char-picker-sub,.char-picker-kv span,.weapon-pick-meta,.weapon-picker-count,.char-picker-detail-hint){color:#5c687a!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] .build-modal :is(button:hover,.is-preview,.is-selected,.is-active){background:#e8e9f5!important;border-color:#929cc3!important;color:#35415e!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] .build-modal :is(.primary,[data-build-modal-confirm]){background:#d8c28c!important;color:#362b17!important;border-color:#ab8e4d!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] .build-modal input::placeholder{color:#738096!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] .build-modal :is(.char-el-pill-icon,.char-picker-tag img){filter:brightness(.55)}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspaceLayout.phase-setup :is(.echo-summary,.echo-set-summary-block){background:linear-gradient(130deg,#fffdf8,#eeedf5)!important;color:#45536a!important;border-color:#c6cedd!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspaceLayout.phase-setup :is(.echo-summary,.echo-set-summary-block) :is(strong,span,div,.hint){color:#45536a!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspaceLayout.phase-setup :is([data-echo-main-slot],.setup-echo-controls button,.local-echo-wide .btn){background:#faf8f2!important;color:#475971!important;border-color:#bcc8d9!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspaceLayout.phase-setup :is([data-echo-main-slot],.setup-echo-controls button,.local-echo-wide .btn):hover{background:#e6e8f3!important;border-color:#909fc2!important}
:where(html[data-config-ui-active]) .theme-btn[data-config-theme='ivory-prism']{background:linear-gradient(135deg,#f4efe3 48%,#8b95d0 49%,#c9bce8)!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism']{color-scheme:light;--wc-bg:#f3f0e8;--wc-panel:#fffdf8;--wc-panel-2:#eeece7;--wc-line:#797e9b33;--wc-muted:#656b7c;--wc-text:#293247;--wc-gold:#8d682b;--wc-ice:#476482;--bg:#f3f0e8;--bg-deepest:#f3f0e8;--text:#293247;--text-primary:#293247;--text-secondary:#656b7c}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'],html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body{background:radial-gradient(ellipse at 85% 0,#e7e3f4,transparent 45%),linear-gradient(120deg,#f5f1e7,#f0eee9)!important;color:#293247!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] :is(.app-topbar,#workspacePhaseBar){background:#f7f4edeb!important;border-color:#737e9a26!important;box-shadow:0 4px 20px #3b41650a!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] :is(.app-topbar-btn,.app-sidenav-item,.app-sidenav-special){color:#4d586c!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] .app-sidenav-item.active{color:#765923!important;background:#d6c28b26!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspaceLayout.phase-setup .setup-member-col{background:#fbf9f477!important;border-color:#7b86a222!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspaceLayout.phase-setup .local-team-card{background:#fffdf8cc!important;color:#30394d!important;border-color:#7d87a432!important;box-shadow:0 4px 14px #51577208}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspaceLayout.phase-setup .local-team-card.active{border-color:#a3895166!important;box-shadow:inset 3px 0 #a38951,0 4px 14px #51577208}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] .local-team-copy small b{color:#33465c}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspaceLayout.phase-setup :is(.local-team-copy small,.setup-member-col-title>strong){color:#626d80!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspaceLayout.phase-setup :is(.local-config-aside .setup-sec-panel,.setup-sec-echo){background:#fdfbf5d9!important;border-color:#7c8bab30!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspaceLayout.phase-setup :is(.build-panel-stat-card,.build-panel-stat-card:not(.half)){background:linear-gradient(130deg,#fffefa,#eeeff6)!important;border-color:#9ba8bf38!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspaceLayout.phase-setup .build-panel-stat-label{color:#697386!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspaceLayout.phase-setup .build-panel-stat-value{color:#334a66!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspaceLayout.phase-setup .setup-member-upper-left>.setup-sec-weapon{background:radial-gradient(ellipse at 10% 35%,#d9e6ff88,transparent 48%),linear-gradient(115deg,#fffdf7,#efedf7) padding-box,linear-gradient(125deg,#80a9e7,#c2b5e380 40%,#a598d8) border-box!important;box-shadow:inset 0 1px #fff,0 8px 24px #65668c12}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspaceLayout.phase-setup :is(.build-hero-name,.setup-sec-title,.build-hero-stat-line,.local-equipment-heading strong){color:#354257!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspaceLayout.phase-setup :is(.weapon-ref-compact,.setup-echo-controls){color:#45516a!important;border-color:#818aab30!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspaceLayout.phase-setup .setup-sec-weapon :is(.resonance-chip,.build-set-pick,.echo-set-count-input,.setup-add-set,.local-template-open){background:#fffdf9b3!important;color:#4f5c74!important;border-color:#9da9c847!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspaceLayout.phase-setup .setup-sec-weapon .resonance-chip.active{background:#d9c694!important;color:#493b20!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] .local-equipment-status{background:#e4e6ee77;border-color:#8e9bb22b}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] .local-equipment-status span{color:#657086}html:where([data-config-ui-active])[data-config-theme='ivory-prism'] .local-equipment-status b{color:#405371}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspaceLayout.phase-setup .local-echo-wide .build-slot-card{background:linear-gradient(145deg,#fffdf8,#efedf4)!important;border-color:#8d9bbb40!important;box-shadow:0 5px 18px #515f7c0a!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspaceLayout.phase-setup .local-echo-wide :is(.build-slot-visual-name,.local-stat-trigger,select){color:#38485c!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspaceLayout.phase-setup .local-echo-wide :is(.build-slot-meta-line,.echo-sub-empty){color:#6b7687!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] :is(.local-template-dialog,.local-stat-popup){background:#f9f7f0;color:#334155;border-color:#8597b866}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] .local-template-dialog :is(button,p,.setup-echo-ctrl-label){color:#4b5e77!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] .local-template-dialog .resonance-chip{background:#e5e7ee!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspaceLayout.phase-setup .local-hero-copy h2{color:#f2eee2!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspaceLayout.phase-setup [data-wc-chain-compact] .resonance-chain-checks-head{color:#e1eaf2!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspaceLayout.phase-setup [data-wc-chain-compact] .resonance-chain-current{color:#ddc68d!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] .app-sidenav-special{background:#ebe9e3!important;border-color:#7c8bab40!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] .build-panel-stat-icon{filter:brightness(.45) sepia(.2)!important;opacity:.8!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] .app-topbar img{filter:drop-shadow(0 0 1px #425375)}

/* local-rubber.css: unchanged local declarations; configuration scope only. */
:where(html[data-config-ui-active]) .rubber-segment{--rs-track: #27272a;--rs-thumb: #fafafa;--rs-ink: #fafafa;--rs-ink-active: #18181b;--rs-radius: 10px;--rs-inset: 3px;--rs-thumb-radius: 7px;--rs-h: 36px;--rs-font: 13px;--rs-pad: 14px;--rs-min: 44px;--rs-idle: .7;--rs-hover: .9;--rs-ease-out: cubic-bezier(.23, 1, .32, 1);position:relative;display:inline-grid;grid-auto-flow:column;grid-auto-columns:auto;vertical-align:middle;padding:var(--rs-inset);border-radius:var(--rs-radius);background:var(--rs-track);font-family:inherit;touch-action:pan-y;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}:where(html[data-config-ui-active]) .rubber-segment[data-equal]{grid-auto-columns:minmax(0,1fr)}:where(html[data-config-ui-active]) .rubber-segment[aria-disabled=true]{opacity:.5;pointer-events:none}:where(html[data-config-ui-active]) .rubber-segment__item{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:calc(var(--rs-h) - var(--rs-inset) * 2);min-width:var(--rs-min);margin:0;padding:0 var(--rs-pad);border:0;border-radius:var(--rs-thumb-radius);background:none;color:var(--rs-ink);opacity:var(--rs-idle);font:inherit;font-size:var(--rs-font);font-weight:500;line-height:1;white-space:nowrap;cursor:pointer;outline:none;transition:opacity .16s ease,transform .16s var(--rs-ease-out)}:where(html[data-config-ui-active]) .rubber-segment__item[aria-checked=true]{cursor:default}:where(html[data-config-ui-active]) .rubber-segment[data-draggable] .rubber-segment__item[aria-checked=true]{cursor:grab}:where(html[data-config-ui-active]) .rubber-segment[data-held],:where(html[data-config-ui-active]) .rubber-segment[data-held] .rubber-segment__item{cursor:grabbing}:where(html[data-config-ui-active]) .rubber-segment__item[data-pressed]{transform:scale(.96)}:where(html[data-config-ui-active]) .rubber-segment__item:focus-visible{outline:2px solid var(--rs-thumb);outline-offset:3px}@media(hover:hover)and (pointer:fine){:where(html[data-config-ui-active]) .rubber-segment__item[aria-checked=false]:hover{opacity:var(--rs-hover)}}:where(html[data-config-ui-active]) .rubber-segment__thumb{position:absolute;inset:var(--rs-inset);display:grid;grid-auto-flow:column;grid-auto-columns:auto;background:var(--rs-thumb);color:var(--rs-ink-active);pointer-events:none}:where(html[data-config-ui-active]) .rubber-segment[data-equal] .rubber-segment__thumb{grid-auto-columns:minmax(0,1fr)}:where(html[data-config-ui-active]) .rubber-segment__copy{color:inherit;opacity:1;cursor:default}@media(prefers-reduced-motion:reduce){:where(html[data-config-ui-active]) .rubber-segment__item{transition:opacity .16s ease}}:where(html[data-config-ui-active]) .local-original-rubber{flex:0 0 auto;position:relative;z-index:2}:where(html[data-config-ui-active]) .local-original-rubber .rubber-segment{font-family:ui-monospace,Consolas,monospace}:where(html[data-config-ui-active]) .local-original-rubber .rubber-segment__item{box-sizing:border-box;box-shadow:none}

/* local-echo-profile.css: unchanged local declarations; configuration scope only. */
/* No reflective film, breathing rim, or pointer animation on echo cards. */
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .build-slot-card::after{content:none!important;display:none!important;animation:none!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup .local-echo-wide .build-slot-card{position:relative;isolation:isolate;overflow:hidden}
:where(html[data-config-ui-active]) .local-echo-watermark{position:absolute;inset:18% -20% -12% 8%;background-repeat:no-repeat;background-position:right bottom;background-size:contain;filter:grayscale(1) contrast(.85);opacity:.09;mask-image:linear-gradient(135deg,transparent 10%,#000 65%);pointer-events:none;z-index:-1;transform:rotate(-12deg)}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] .local-echo-watermark{opacity:.07;filter:grayscale(1) contrast(.8)}

/* local-spotlight.css: unchanged local declarations; configuration scope only. */
/* Original SpotlightCard gradient and timing; preserve existing card geometry. */
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup :is(.build-panel-stat-card,.setup-sec-weapon [data-build-open-modal='weapon'],.setup-sec-weapon .build-set-pick){position:relative;overflow:hidden;isolation:isolate;--mouse-x:50%;--mouse-y:50%;--spotlight-color:rgba(0,229,255,.2)}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup :is(.build-panel-stat-card,.setup-sec-weapon [data-build-open-modal='weapon'],.setup-sec-weapon .build-set-pick)::before{content:''!important;display:block!important;position:absolute!important;inset:0!important;width:auto!important;height:auto!important;border:0!important;border-radius:inherit;transform:none!important;background:radial-gradient(circle at var(--mouse-x) var(--mouse-y),var(--spotlight-color),transparent 80%)!important;opacity:0!important;transition:opacity .5s ease!important;pointer-events:none!important;z-index:1;box-shadow:none!important}
:where(html[data-config-ui-active]) #workspaceLayout.phase-setup :is(.build-panel-stat-card,.setup-sec-weapon [data-build-open-modal='weapon'],.setup-sec-weapon .build-set-pick):is(:hover,:focus-within)::before{opacity:.6!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspaceLayout.phase-setup :is(.build-panel-stat-card,.setup-sec-weapon [data-build-open-modal='weapon'],.setup-sec-weapon .build-set-pick){--spotlight-color:rgba(108,127,225,.24)}
@media(prefers-reduced-motion:reduce){:where(html[data-config-ui-active]) #workspaceLayout.phase-setup :is(.build-panel-stat-card,.setup-sec-weapon [data-build-open-modal='weapon'],.setup-sec-weapon .build-set-pick)::before{transition:none!important}}

/* local-aero.css: unchanged local declarations; configuration scope only. */
:where(html[data-config-ui-active]) .aero-shards{position:relative;width:100%;height:100%;overflow:hidden;pointer-events:none;isolation:isolate}:where(html[data-config-ui-active]) .aero-shards__canvas{position:absolute;inset:0;display:block;width:100%;height:100%;opacity:0;transition:opacity .65s cubic-bezier(.22,1,.36,1);pointer-events:none}:where(html[data-config-ui-active]) .aero-shards[data-ready=true] .aero-shards__canvas{opacity:1}@media(prefers-reduced-motion:reduce){:where(html[data-config-ui-active]) .aero-shards__canvas{transition:none}}:where(html[data-config-ui-active]) #local-aero-background{position:fixed;inset:0;z-index:-1;pointer-events:none;overflow:hidden}:where(html[data-config-ui-active]) body{isolation:isolate}html:where([data-config-ui-active])[data-config-theme=classic] body{background:transparent!important}html:where([data-config-ui-active]):not([data-config-theme=classic]) #local-aero-background{display:none}

/* local-sidebar.css: unchanged local declarations; configuration scope only. */
:where(html[data-config-ui-active]) #workspacePhaseBar .app-sidenav{display:flex!important;flex-direction:column!important;gap:0!important;padding:22px 10px 16px!important;overflow-y:auto!important;overflow-x:hidden!important;scrollbar-width:thin}
:where(html[data-config-ui-active]) #workspacePhaseBar .app-sidenav-brand{flex:none;height:auto!important;min-height:0!important;margin:0 8px 22px!important;padding:0!important}
:where(html[data-config-ui-active]) #workspacePhaseBar .app-sidenav-brand-cn{font-size:16px!important;letter-spacing:2px!important}
:where(html[data-config-ui-active]) #workspacePhaseBar .app-sidenav-brand-en{font-size:10px!important;letter-spacing:2px!important;margin-top:5px}
:where(html[data-config-ui-active]) #workspacePhaseBar .app-sidenav-brand-mark{width:5px!important;height:24px!important;border-radius:2px!important;transform:none!important;box-shadow:none!important}
:where(html[data-config-ui-active]) #workspacePhaseBar .app-sidenav-main{display:block!important;position:relative!important;flex:0 0 auto!important;min-height:0!important;padding:0!important;overflow:visible!important}
:where(html[data-config-ui-active]) #workspacePhaseBar .app-sidenav-group{margin:0 0 13px!important;padding:0!important;border:0!important}
:where(html[data-config-ui-active]) #workspacePhaseBar .app-sidenav-group-title{font-size:11px!important;line-height:18px!important;padding:0 9px 5px!important;letter-spacing:1px!important}
:where(html[data-config-ui-active]) #workspacePhaseBar .app-sidenav-row{position:relative;display:flex!important;align-items:center;margin:2px 0!important}
:where(html[data-config-ui-active]) #workspacePhaseBar .app-sidenav-item{height:38px!important;min-height:38px!important;border-color:transparent!important;font-size:13px!important;padding:0 30px 0 10px!important;width:100%!important;border-radius:5px!important;gap:10px!important}
:where(html[data-config-ui-active]) #workspacePhaseBar .app-sidenav-item.active{background:#bca36617!important;box-shadow:inset 2px 0 #cbb77b!important}
:where(html[data-config-ui-active]) #workspacePhaseBar .app-sidenav-icon{width:18px!important;height:18px!important;flex-shrink:0}
:where(html[data-config-ui-active]) #workspacePhaseBar .app-sidenav-help{position:absolute!important;right:7px!important;top:50%!important;transform:translateY(-50%)!important;width:20px!important;height:20px!important;opacity:.65}
:where(html[data-config-ui-active]) #workspacePhaseBar .app-sidenav-foot{position:static!important;inset:auto!important;transform:none!important;flex:0 0 auto!important;margin:8px 0 0!important;padding:15px 0 0!important;border-top:1px solid #9eafc22b!important;background:transparent!important;width:auto!important}
:where(html[data-config-ui-active]) .local-nav-explore{font:11px/18px 'Microsoft YaHei UI',sans-serif;color:#8f9bab;letter-spacing:2px;padding:0 9px 8px}
:where(html[data-config-ui-active]) #workspacePhaseBar .app-sidenav-divider{display:none!important}
:where(html[data-config-ui-active]) #workspacePhaseBar .app-sidenav-special{display:flex;align-items:center;gap:10px;min-height:42px!important;margin:0!important;padding:0 10px!important;width:100%;font-size:13px!important;background:#8da9c10a!important;border-color:#9cabb727!important}
:where(html[data-config-ui-active]) #workspacePhaseBar .app-sidenav-mascot{position:static!important;margin:20px auto 0!important;opacity:.55;max-height:68px;overflow:hidden;flex:none}
:where(html[data-config-ui-active]) #workspacePhaseBar .app-sidenav-mascot img{width:68px;height:68px;object-fit:contain}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] .local-nav-explore{color:#697589}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspacePhaseBar .app-sidenav-item:hover{background:#8899b81a!important;color:#33445c!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspacePhaseBar .app-sidenav-special{background:#fffdf777!important;color:#44536a!important}

/* local-pill.css: unchanged local declarations; configuration scope only. */
:where(html[data-config-ui-active]) #workspacePhaseBar .app-sidenav-item.local-pill{position:relative;overflow:hidden!important;border-radius:999px!important;background:#17202b!important;isolation:isolate}
:where(html[data-config-ui-active]) #workspacePhaseBar .local-pill-circle{position:absolute;left:50%;border-radius:50%;background:#cbb77b;z-index:0;pointer-events:none;display:block}
:where(html[data-config-ui-active]) #workspacePhaseBar .local-pill-stack{position:relative;display:inline-block;line-height:1.2;z-index:2}
:where(html[data-config-ui-active]) #workspacePhaseBar .local-pill .app-sidenav-label{position:relative;display:inline-block}
:where(html[data-config-ui-active]) #workspacePhaseBar .local-pill-copy{position:absolute;left:0;top:0;white-space:nowrap;color:#18202a;pointer-events:none}
:where(html[data-config-ui-active]) #workspacePhaseBar .local-pill .app-sidenav-icon{position:relative;z-index:2;transition:color .2s}
:where(html[data-config-ui-active]) #workspacePhaseBar .local-pill:is(:hover,:focus-visible) .app-sidenav-icon{color:#18202a}
:where(html[data-config-ui-active]) #workspacePhaseBar .local-pill.active{box-shadow:inset 0 0 0 1px #cbb77b99!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspacePhaseBar .app-sidenav-item.local-pill{background:#ebe8e0!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspacePhaseBar .local-pill-circle{background:#34455f}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspacePhaseBar .local-pill-copy,html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #workspacePhaseBar .local-pill:is(:hover,:focus-visible) .app-sidenav-icon{color:#fffdf4}

/* local-palette.css: unchanged local declarations; configuration scope only. */
/* Local-only palette and profile layout; application events stay intact. */
/* Background motion choice is only a visual preference. */
html:where([data-config-ui-active])[data-config-theme] #configThemeSwitcher .bg-motion-control { display:flex;align-items:center;gap:5px;padding:0 2px 0 7px;border-left:1px solid var(--ui-line);color:var(--ui-muted);font-size:12px;font-weight:650;white-space:nowrap; }
html:where([data-config-ui-active])[data-config-theme] #configThemeSwitcher .bg-motion-control select { min-width:60px;min-height:34px;padding:0 4px;border:1px solid var(--ui-line);border-radius:7px;background:var(--ui-inner);color:var(--ui-text);font:inherit;cursor:pointer; }
html:where([data-config-ui-active])[data-config-theme] #configThemeSwitcher .bg-motion-control select:focus-visible { outline:2px solid var(--ui-title);outline-offset:2px; }
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] #configThemeSwitcher .bg-motion-control { display:none; }
html:where([data-config-ui-active])[data-config-theme='classic'][data-bg-motion='on'] .site-decor-glow { animation:wc-decor-gold-drift 26s ease-in-out infinite alternate!important; }
html:where([data-config-ui-active])[data-bg-motion='off'] .site-decor-glow { animation:none!important; }
html:where([data-config-ui-active])[data-config-theme='classic'] {
 --ui-bg:#0d0d10;--ui-panel:#1a191e;--ui-inner:#25242b;--ui-raised:#302d36;
 --ui-line:#45404b;--ui-text:#f3edf0;--ui-muted:#b6aeb8;--ui-title:#e995b3;
 --ui-accent:#e6397c;--ui-active:#e995b3;--ui-on-active:#27151e;--ui-soft:#e6397c19;
 --ui-shadow:#0005;--ui-pattern:url('local-pink-pattern-tilted.svg');--ui-pattern-open:url('local-pink-pattern-tilted-open.svg');--ui-rim:linear-gradient(90deg,transparent,#e6397caa 25%,#efa0bb 55%,transparent 92%);
 color-scheme:dark;
}

/* Local profile workspace: keep the account content in one readable hierarchy. */
html:where([data-config-ui-active])[data-config-theme='classic'] { --profile-surface:rgba(24,24,30,.88);--profile-inset:rgba(37,36,44,.9);--profile-stroke:rgba(233,149,179,.24); }
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] { --profile-surface:#f4f1eb;--profile-inset:#ebe7e0;--profile-stroke:#c5cbd3; }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #workspacePhaseBar,
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #sidenavMobileToggle { display:none!important; }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open .wrap { padding-left:clamp(16px,2.6vw,32px)!important;padding-right:clamp(16px,2.6vw,32px)!important; }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage { width:100%;max-width:1180px;padding:16px 0 52px;color:var(--ui-text); }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage .up2-shell { gap:20px;padding:0; }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage .up-page-head { padding:10px 2px 16px;border-bottom:1px solid var(--ui-line); }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage .up-page-title { color:var(--ui-title);font-size:clamp(22px,2.2vw,30px);letter-spacing:.04em; }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage .up-back { color:var(--ui-muted);font-weight:600; }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage .up-back:hover { color:var(--ui-title); }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage .up2-container { max-width:none;grid-template-columns:minmax(0,1.85fr) minmax(280px,.9fr);gap:18px; }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage :is(.up2-col-left,.up2-col-right) { gap:18px; }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage :is(.up2-identity,.up2-section) { position:relative;padding:20px;border:1px solid var(--profile-stroke);border-radius:14px;background:var(--profile-surface);box-shadow:0 10px 24px var(--ui-shadow),inset 0 1px #ffffff0a; }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage .up2-identity { overflow:hidden;padding:24px 26px;gap:12px; }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage .up2-identity::before { content:'';position:absolute;inset:0 0 auto;height:2px;background:var(--ui-rim);pointer-events:none; }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage .up2-identity-row { gap:20px; }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage .up-nick { color:var(--ui-text);font-size:clamp(20px,2vw,27px); }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage :is(.up2-account-id,.up2-limit,.up2-foot-hint,.up2-section-note) { color:var(--ui-muted); }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage .up2-section-title { color:var(--ui-title);font-size:17px; }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage .up2-tabs { gap:4px;margin-top:4px;overflow-x:auto;border-color:var(--ui-line);scrollbar-width:thin; }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage .up2-tab { flex:0 0 auto;display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:9px 13px;color:var(--ui-muted);white-space:nowrap; }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage .up2-tab:is(:hover,.is-active) { color:var(--ui-title); }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage .up2-tab-count { display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:22px;padding:0 6px;border:1px solid var(--ui-line);border-radius:99px;background:var(--profile-inset);color:var(--ui-text);font-size:11px;font-weight:700;box-sizing:border-box; }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage .up2-tab.is-active .up2-tab-count { border-color:var(--ui-title);color:var(--ui-title); }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage .up2-panel { min-height:180px;padding-top:14px; }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage :is(.up2-comm-card,.up2-set-list,.up2-echo-item,.up2-empty) { border-color:var(--ui-line);background:var(--profile-inset); }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage .up2-comm-card:disabled { opacity:1; }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage :is(.up2-comm-title,.up2-set-label,.up2-echo-name b) { color:var(--ui-text); }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage :is(.up2-comm-sub,.up2-comm-time,.up2-set-value,.up2-echo-sub,.up2-empty p,.up2-empty span) { color:var(--ui-muted); }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage .up2-set-row { min-height:44px;height:auto;border-color:var(--ui-line); }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage .up2-echo-list { max-height:460px;gap:8px; }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage .up2-echo-item { padding:8px 12px 8px 0; }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage .up2-primary-btn { color:var(--ui-on-active); }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage .up2-quick { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px; }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage .up2-quick-btn { min-height:46px;height:auto;background:var(--profile-surface);color:var(--ui-text);border-color:var(--profile-stroke); }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage .up2-quick-btn:hover { color:var(--ui-title);border-color:var(--ui-title); }
html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage :is(button,a):focus-visible { outline:2px solid var(--ui-title);outline-offset:2px; }
@media (max-width:850px) {
  html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage .up2-container { grid-template-columns:minmax(0,1fr); }
  html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage .up2-grid-span { grid-column:1; }
}
@media (max-width:560px) {
  html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage .up2-identity { padding:18px; }
  html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage .up2-section { padding:16px; }
  html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage .up2-quick { grid-template-columns:minmax(0,1fr); }
  html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage .up2-echo-head { align-items:flex-start;flex-wrap:wrap; }
  html:where([data-config-ui-active])[data-config-theme] body.user-profile-open #userProfilePage .up2-echo-head .up2-primary-btn { margin-left:0; }
}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] {
 --ui-bg:#e9e5de;--ui-panel:#f2efe9;--ui-inner:#faf8f4;--ui-raised:#e5e2dc;
 --ui-line:#ccc7bf;--ui-text:#202d43;--ui-muted:#596477;--ui-title:#122e8a;
 --ui-accent:#122e8a;--ui-active:#122e8a;--ui-on-active:#fffdfa;--ui-soft:#122e8a10;
 --ui-shadow:#252c4214;--ui-pattern:url('local-pattern-ivory.svg');--ui-rim:linear-gradient(90deg,transparent,#122e8a66 25%,#668dcc99 55%,transparent 92%);
 --danger:#b6294e;--accent-danger:#b6294e;--accent-success:#18794e;
 color-scheme:light;
}
html:where([data-config-ui-active]):is([data-config-theme='classic'],[data-config-theme='ivory-prism']) {
 --bg:var(--ui-bg);--bg-deepest:var(--ui-bg);--surface:var(--ui-panel);--surface-2:var(--ui-inner);--surface2:var(--ui-inner);
 --bg-surface:var(--ui-panel);--bg-card:var(--ui-panel);--bg-elevated:var(--ui-inner);--bg-floating:var(--ui-inner);--card:var(--ui-panel);
 --text:var(--ui-text);--text-primary:var(--ui-text);--text-secondary:var(--ui-muted);--text-muted:var(--ui-muted);--muted:var(--ui-muted);--text-on-surface:var(--ui-text);--text-title:var(--ui-title);--text-value:var(--ui-text);--label-soft:var(--ui-muted);--value-bright:var(--ui-text);
 --accent:var(--ui-accent);--accent-primary:var(--ui-accent);--accent-secondary:var(--ui-title);--accent2:var(--ui-accent);--accent-bright:var(--ui-title);--accent-dim:var(--ui-accent);--accent-text:var(--ui-on-active);--accent-bg:var(--ui-soft);--accent-border:var(--ui-title);--accent-soft:var(--ui-soft);--brand:var(--ui-title);--result:var(--ui-title);--ornament-gold:var(--ui-title);
 --border:var(--ui-line);--border-strong:var(--ui-title);--border-light:var(--ui-line);--input-bg:var(--ui-inner);--input-border:var(--ui-line);--hover-bg:var(--ui-soft);--dashed-border:var(--ui-line);--shadow:var(--ui-shadow);
 --wc-bg:var(--ui-bg);--wc-panel:var(--ui-panel);--wc-panel-2:var(--ui-inner);--wc-text:var(--ui-text);--wc-muted:var(--ui-muted);--wc-line:var(--ui-line);--wc-gold:var(--ui-title);--wc-ice:var(--ui-title);
 --glass-fill:var(--ui-panel);--glass-bg:var(--ui-panel);--glass-fill-core:var(--ui-inner);--glass-border:var(--ui-line);--glass-border-strong:var(--ui-title);
 --calc-secondary:var(--ui-muted);--calc-highlight:var(--ui-title);--calc-muted:var(--ui-muted);--decor-color:var(--ui-title);
}
html:where([data-config-ui-active])[data-config-theme='classic']{--accent-rgb:230,57,124;--accent-primary-rgb:230,57,124;--accent-secondary-rgb:233,149,179}
html:where([data-config-ui-active])[data-config-theme='ivory-prism']{--accent-rgb:18,46,138;--accent-primary-rgb:18,46,138;--accent-secondary-rgb:18,46,138}
@layer localPalette { /* Important paint rules outrank older unlayered local overrides. */
html:where([data-config-ui-active])[data-config-theme],html:where([data-config-ui-active])[data-config-theme] body{background:var(--ui-bg)!important;color:var(--ui-text)!important}
/* Let the existing particle layer show between the dark theme's separate cards. */
html:where([data-config-ui-active])[data-config-theme='classic'] body{background:transparent!important}
html:where([data-config-ui-active])[data-config-theme] :is(.app-topbar,#workspacePhaseBar,.app-sidenav){background:var(--ui-panel)!important;border-color:var(--ui-line)!important;color:var(--ui-text)!important}
html:where([data-config-ui-active])[data-config-theme] :is(.app-topbar-btn,.app-sidenav-item,.app-sidenav-special){color:var(--ui-muted)!important;border-color:var(--ui-line)!important}
html:where([data-config-ui-active])[data-config-theme] #workspacePhaseBar .app-sidenav-item.local-pill{background:var(--ui-inner)!important}
html:where([data-config-ui-active])[data-config-theme] #workspacePhaseBar .local-pill-circle{background:var(--ui-active)!important}
html:where([data-config-ui-active])[data-config-theme] #workspacePhaseBar :is(.local-pill-copy,.local-pill:is(:hover,:focus-visible) .app-sidenav-icon){color:var(--ui-on-active)!important}
html:where([data-config-ui-active])[data-config-theme] #workspacePhaseBar .local-pill.active{color:var(--ui-title)!important;box-shadow:inset 0 0 0 1px var(--ui-title)!important}
/* Restore the existing floating theme switcher; its size and location are retained. */
html:where([data-config-ui-active])[data-config-theme] #configThemeSwitcher{display:flex!important;background:var(--ui-panel)!important;border-color:var(--ui-line)!important}
html:where([data-config-ui-active])[data-config-theme] .theme-btn[data-config-theme='classic']{background:linear-gradient(135deg,#1a191e 55%,#e995b3 56%)!important}
html:where([data-config-ui-active])[data-config-theme] .theme-btn[data-config-theme='ivory-prism']{background:linear-gradient(135deg,#f2efe9 55%,#122e8a 56%)!important}
html:where([data-config-ui-active])[data-config-theme] .theme-btn.active{border-color:var(--ui-title)!important;box-shadow:0 0 0 2px var(--ui-soft)!important}
html:where([data-config-ui-active])[data-config-theme] .theme-btn-tooltip{background:var(--ui-inner)!important;color:var(--ui-text)!important;border-color:var(--ui-line)!important}
/* Large surfaces: SVG repeats internally at the approved scale and 30-degree angle.
   The first paint layer is the 1px pink gradient rim, never a blurred overlay. */
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(.setup-sec-weapon,.setup-sec-echo,.setup-sec-panel,.buff-check-team-card,.buff-check-member-col,.team-axis-board,.axis-palette-panel,.calc-summary-bar,.calc-timeline-panel,.calc-buff-panel,.calc-cycle-config,.calc-member-dock-panel,.local-calc-editor,.check-excel-panel,.export-region,.overview-cycle-section,.calc-results-panel){
 background-color:var(--ui-panel)!important;
 background-image:var(--ui-rim),var(--ui-pattern)!important;
 background-size:100% 1px,100% 100%!important;
 background-position:center top,0 0!important;background-repeat:no-repeat!important;
 border-color:var(--ui-line)!important;color:var(--ui-text)!important;
 box-shadow:0 8px 24px var(--ui-shadow),inset 0 1px #ffffff0a!important;
}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(.panel-inner,.local-team-card,.buff-source-card,.calc-cycle-card,.check-topbar-tab,.axis-lane,.axis-lanes-panel,.axis-board-toolbar,.axis-cycle-bar,.export-summary-current,.export-cfg-toolbar,.export-cfg-row,.local-round-details tr,.local-single-round .ov-member.local-round-member-rich){background:var(--ui-inner)!important;border-color:var(--ui-line)!important;color:var(--ui-text)!important;box-shadow:inset 0 1px #ffffff08!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(.setup-member-col,.setup-member-col-head,.calc-page,.overview-page,.buff-check-page,.calc-check-page){color:var(--ui-text)!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout .setup-member-col{background:var(--ui-panel)!important;border-color:var(--ui-line)!important}
html:where([data-config-ui-active])[data-config-theme='classic'] body #workspaceLayout.phase-setup .setup-sec-echo{
 background-color:rgba(9,17,20,.5)!important;
 background-image:var(--ui-rim),var(--ui-pattern-open)!important;
}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(h2,h3,.export-page-title,.export-region-title,.setup-sec-title,.local-equipment-heading strong,.toolbar-title,.card-header__title,.buff-check-member-name){color:var(--ui-title)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(.hint,.muted,.export-page-header .hint,.build-panel-stat-label,.local-team-copy small,.local-round-metric-label,.calc-summary-label,.summary-item-label){color:var(--ui-muted)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(.build-panel-stat-value,.local-round-metric-value,.summary-item-value,.ov-team-total,.ov-num,.export-summary-total,.local-team-copy strong){color:var(--ui-text)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(.summary-item.total .summary-item-value,.local-round-metric[data-metric=damage] .local-round-metric-value,.ov-team-total){color:var(--ui-title)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(.local-team-card.active,.axis-lane.is-active,.check-topbar-tab.is-active){background:var(--ui-soft)!important;border-color:var(--ui-title)!important;box-shadow:inset 3px 0 var(--ui-title)!important;color:var(--ui-title)!important}
/* Inputs and ordinary buttons, including the warm-white modal controls. */
html:where([data-config-ui-active])[data-config-theme] body :is(#workspaceLayout,.build-modal,.local-template-dialog,.local-stat-popup,.local-bg-cropper-card) :is(input,select,textarea){background-color:var(--ui-inner)!important;color:var(--ui-text)!important;border-color:var(--ui-line)!important;accent-color:var(--ui-accent)}
html:where([data-config-ui-active])[data-config-theme] body :is(#workspaceLayout,.build-modal) :is(.btn,.toolbar-btn,.resonance-chip,.build-set-pick,.local-template-open,.setup-add-set,.echo-set-count-input,.check-topbar-link,.export-cfg-actions button,.local-calc-tabs button,.local-overview-tabs button){background:var(--ui-inner)!important;color:var(--ui-text)!important;border-color:var(--ui-line)!important}
html:where([data-config-ui-active])[data-config-theme] body :is(#workspaceLayout,.build-modal) :is(.btn.primary,.toolbar-btn.primary,.resonance-chip.active,.local-calc-tabs button[aria-selected=true],.local-overview-tabs button[aria-selected=true]){background:var(--ui-active)!important;color:var(--ui-on-active)!important;border-color:var(--ui-title)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(.jelly-radio,.local-jelly-views){--jr-chip:var(--ui-inner)!important;--jr-text:var(--ui-text)!important;--jr-active:var(--ui-active)!important;--jr-active-text:var(--ui-on-active)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout .jelly-radio__chip{background:none!important;box-shadow:none!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(.local-rubber-thumb,.local-overview-thumb){background:var(--ui-active)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout .axis-lane-track{background-color:var(--ui-panel)!important;background-image:linear-gradient(var(--ui-soft) 1px,transparent 1px),linear-gradient(90deg,var(--ui-soft) 1px,transparent 1px)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(.axis-skill-chip,.axis-palette-item){background:var(--ui-raised)!important;color:var(--ui-text)!important;border-color:var(--ui-line)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(table,.fixed-label-col,.label-header,.scrollable-buff-area){border-color:var(--ui-line)!important;color:var(--ui-text)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(.export-cfg-table,.check-excel-table) tbody td{background:var(--ui-panel)!important;color:var(--ui-text)!important;border-color:var(--ui-line)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(.export-cfg-table,.check-excel-table) tbody tr:nth-child(even) td{background:var(--ui-inner)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout .export-cfg-table thead th{background:var(--ui-raised)!important;color:var(--ui-title)!important;border-color:var(--ui-line)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout .export-region-head{border-color:var(--ui-line)!important}
html:where([data-config-ui-active])[data-config-theme] body :is(.build-modal,.local-template-dialog,.local-stat-popup,.local-bg-cropper-card){background:var(--ui-panel)!important;color:var(--ui-text)!important;border-color:var(--ui-line)!important}
html:where([data-config-ui-active])[data-config-theme] body .build-modal :is(.build-modal-head,.build-modal-body,.char-picker-foot,.weapon-picker-foot){background:var(--ui-panel)!important;border-color:var(--ui-line)!important}
html:where([data-config-ui-active])[data-config-theme] body .build-modal :is(p,label,.hint,.muted,.char-picker-sub,.char-picker-kv span,.weapon-pick-meta){color:var(--ui-muted)!important}
html:where([data-config-ui-active])[data-config-theme] body .build-modal :is(strong,h2,h3,h4,.char-pick-name,.weapon-pick-name){color:var(--ui-title)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout .local-equipment-lettering::before{background-image:none!important}
/* Keep the existing cyan-purple diamond engraving on round cards. */
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout .ov-member::after{background:var(--ui-rim)!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout :is(.check-excel-th-total,.check-excel-total){color:#122e8a!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout :is(.check-excel-th-crit,.check-excel-crit){color:#246178!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout :is(.btn.danger,.danger,.export-cfg-delete){color:#b6294e!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(button,input,select):focus-visible{outline-color:var(--ui-title)!important}
/* Text which legacy pages painted directly rather than through theme tokens. */
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(.ov-member-name,.overview-page h4,.overview-page .loadout-line strong,.overview-page .loadout-line span,.overview-page .priority-name,.overview-page .val){color:var(--ui-text)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(.overview-page summary,.overview-page .ov-label,.overview-page .name){color:var(--ui-muted)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout .local-hero-action{background:var(--ui-active)!important;color:var(--ui-on-active)!important;border-color:var(--ui-active)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout .rubber-segment{--rs-track:var(--ui-inner)!important;--rs-thumb:var(--ui-active)!important;--rs-ink:var(--ui-text)!important;--rs-ink-active:var(--ui-on-active)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout .rubber-segment__item{color:var(--ui-text)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout .rubber-segment__item[aria-checked='true']{color:var(--ui-on-active)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout .rubber-segment__thumb{background:var(--ui-active)!important;color:var(--ui-on-active)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout .rubber-segment__copy{color:var(--ui-on-active)!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout .local-hero-copy h2{color:#fffaf4!important}

}@layer localPalette {
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(.phase-card,.phase-head,.phase-layer-overview,.phase-skill-list,.phase-skill-row,.phase-footer,.buff-matrix-fixed,.buff-matrix-scroll,.local-phase-tools.is-selecting,.local-pick-row,.timeline-head){background:var(--ui-inner)!important;color:var(--ui-text)!important;border-color:var(--ui-line)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(.timeline-head,.phase-head){background:var(--ui-raised)!important;color:var(--ui-muted)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout .results-dashboard{background:var(--ui-rim) center top/100% 1px no-repeat,var(--ui-pattern) 0 0/100% 100% no-repeat!important;border-color:var(--ui-line)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout .results-dashboard::before{background:var(--ui-rim)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(.results-hero-total,.results-hero-dps){color:var(--ui-title)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout .results-aux-value{color:var(--ui-text)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(.results-tool-btn,.local-phase-tools button){background:var(--ui-inner)!important;color:var(--ui-text)!important;border-color:var(--ui-line)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout .local-calc-tabs button[aria-selected]{background:none!important;box-shadow:none!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(.local-step-number,.local-step-label){background:var(--ui-inner)!important;color:var(--ui-text)!important;border-color:var(--ui-line)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout .local-calc-tabs button[aria-selected=true] :is(.local-step-number,.local-step-label){background:var(--ui-active)!important;color:var(--ui-on-active)!important;border-color:var(--ui-active)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout .local-step-label::before{background:var(--ui-title)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout .buff-check-page{--surface:var(--ui-panel);--surface-2:var(--ui-inner);--text-primary:var(--ui-text);--text:var(--ui-text);--text-muted:var(--ui-muted);--muted:var(--ui-muted);--border:var(--ui-line);--accent:var(--ui-accent)}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(.matrix-cell,.matrix-skill-head,.matrix-row-label,.buff-source-card .label,.buff-source-card .label-header,.fixed-label-col,.scrollable-buff-area){background-color:var(--ui-inner)!important;color:var(--ui-text)!important;border-color:var(--ui-line)!important}
/* Keep the Buff comparison's left skill labels legible in the pink palette. */
html:where([data-config-ui-active])[data-config-theme='classic'] body #workspaceLayout .buff-matrix-fixed .matrix-skill-name{color:var(--ui-text)!important;font-weight:700!important}
html:where([data-config-ui-active])[data-config-theme='classic'] body #workspaceLayout .buff-matrix-fixed .matrix-skill-row.hit-child .matrix-skill-name{font-weight:600!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(.buff-source-card>.card-header,.matrix-zone-head,.check-excel-table thead th){background:var(--ui-raised)!important;border-color:var(--ui-line)!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout :is(.matrix-zone-head,.check-excel-table thead th){color:var(--ui-title)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(.matrix-cell.stack.matrix-batch-selected,.axis-skill-chip.is-batch-selected,.local-pick-row:has(>input:checked)){background:var(--ui-active)!important;color:var(--ui-on-active)!important;box-shadow:inset 0 0 0 2px var(--ui-title)!important}
}

@layer localPalette {
/* Matched zone hues in both tables, darkened for the warm-white surface. */
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .matrix-zone-head[data-category="倍率"],
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-check .calc-check-page .check-excel-panel .check-excel-table thead th.th-mult{color:#5e5279!important;background:var(--ui-raised)!important;}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .matrix-zone-head[data-category="加深"],
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-check .calc-check-page .check-excel-panel .check-excel-table thead th.th-deep{color:#664f78!important;background:var(--ui-raised)!important;}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .matrix-zone-head[data-category="攻击"],
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .matrix-zone-head[data-category="攻击力"],
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-check .calc-check-page .check-excel-panel .check-excel-table thead th.th-atk{color:#795a40!important;background:var(--ui-raised)!important;}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .matrix-zone-head[data-category="增伤"],
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-check .calc-check-page .check-excel-panel .check-excel-table thead th.th-bonus{color:#3e6e67!important;background:var(--ui-raised)!important;}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .matrix-zone-head[data-category="暴击"],
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-check .calc-check-page .check-excel-panel .check-excel-table thead th.th-crit{color:#796b42!important;background:var(--ui-raised)!important;}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .matrix-zone-head[data-category="暴伤"],
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .matrix-zone-head[data-category="爆伤"],
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-check .calc-check-page .check-excel-panel .check-excel-table thead th.th-cdmg{color:#7a4f5f!important;background:var(--ui-raised)!important;}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .matrix-zone-head[data-category="暴击期望"],
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-check .calc-check-page .check-excel-panel .check-excel-table thead th.th-cexpect{color:#6f6043!important;background:var(--ui-raised)!important;}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .matrix-zone-head[data-category="抗性"],
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-check .calc-check-page .check-excel-panel .check-excel-table thead th.th-res{color:#4f5e79!important;background:var(--ui-raised)!important;}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .matrix-zone-head[data-category="防御"],
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .matrix-zone-head[data-category="防御力"],
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .matrix-zone-head[data-category="防御减抗"],
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-check .calc-check-page .check-excel-panel .check-excel-table thead th.th-def{color:#476773!important;background:var(--ui-raised)!important;}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .matrix-zone-head[data-category="易伤"],
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-check .calc-check-page .check-excel-panel .check-excel-table thead th.th-vuln{color:#7a504a!important;background:var(--ui-raised)!important;}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .matrix-zone-head[data-category="集谐"],
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-check .calc-check-page .check-excel-panel .check-excel-table thead th.th-vuln-conv{color:#566d4b!important;background:var(--ui-raised)!important;}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .matrix-zone-head[data-category="额外易伤"],
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-check .calc-check-page .check-excel-panel .check-excel-table thead th.th-evuln{color:#6d5872!important;background:var(--ui-raised)!important;}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .matrix-zone-head[data-category="生命"]{color:#556c52!important;background:var(--ui-raised)!important;}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .matrix-zone-head[data-category="共鸣效率"]{color:#4b6f74!important;background:var(--ui-raised)!important;}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .matrix-zone-head[data-category="谐幅"]{color:#4f5977!important;background:var(--ui-raised)!important;}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .matrix-zone-head[data-category="复合"]{color:#645670!important;background:var(--ui-raised)!important;}
}

@layer localPalette {
  /* PulseHeart-inspired vanilla button for the real public DB action rail. */
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-pulse-heart {
    position:relative;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:34px!important;
    height:34px!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
    color:var(--ui-text);
    cursor:pointer;
    transform:scale(1);
    transition:transform 160ms cubic-bezier(.23,1,.32,1);
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-pulse-heart:active { transform:scale(.97); }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-pulse-heart:focus-visible { outline:2px solid var(--ui-title); outline-offset:3px; }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-pulse-heart__pill {
    display:inline-flex;
    align-items:center;
    gap:6px;
    height:100%;
    padding:0 10px;
    border:1px solid var(--ui-title);
    border-radius:18px;
    background:var(--ui-soft);
    transform-origin:center;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-pulse-heart__heart {
    display:block;
    width:18px;
    height:18px;
    color:var(--ui-title);
    transform-origin:center;
    transition:color 160ms ease;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-pulse-heart__heart svg { display:block; width:100%; height:100%; overflow:visible; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-pulse-heart[data-liked='true'] .pdb-pulse-heart__heart svg { fill:currentColor; }
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-pulse-heart__count {
      display:inline-flex;
      min-width:1ch;
      font-size:11px;
      font-weight:800;
      line-height:1;
      font-variant-numeric:tabular-nums;
      color:var(--ui-text);
    }
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-pulse-heart[data-liked='true'] .pdb-pulse-heart__count { color:var(--ui-title); }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-pulse-heart[data-running] .pdb-pulse-heart__heart { animation:pdbPulseHeart 560ms cubic-bezier(.23,1,.32,1); }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-pulse-heart[data-running] .pdb-pulse-heart__pill { animation:pdbPulsePill 560ms cubic-bezier(.23,1,.32,1); }
  @keyframes pdbPulseHeart { 0%,100%{transform:scale(1)} 40%{transform:scale(.3)} 70%{transform:scale(1.22)} }
  @keyframes pdbPulsePill { 0%,100%{transform:scale(1)} 40%{transform:scale(.97)} 70%{transform:scale(1.02)} }
  @media (prefers-reduced-motion:reduce) {
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-pulse-heart,
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-pulse-heart__heart,
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-pulse-heart__pill { animation:none!important; transition:none; }
  }
  @media (max-width:640px) {
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-pulse-heart { min-height:32px!important; height:32px!important; }
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-pulse-heart__pill { padding:0 7px; gap:4px; }
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-pulse-heart__heart { width:16px; height:16px; }
  }
}
@layer localPalette {
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(.buff-check-team-title,.axis-palette-title,.check-formula-title){color:var(--ui-title)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(.buff-game-text-hit,.skill-card-name){color:var(--ui-text)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(.weapon-team-buff-matrix th,.weapon-team-buff-matrix td,.weapon-team-buff-table th,.weapon-team-buff-table td){background:var(--ui-inner)!important;border-color:var(--ui-line)!important;color:var(--ui-text)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(.weapon-team-buff-matrix td small,.weapon-team-buff-matrix td .hint,.local-axis-help,.axis-skill-library-hint,.check-excel-sub,.check-excel-total-label){color:var(--ui-muted)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(.skill-card,.skill-type-tab,.check-formula-head,.check-formula-body,.check-excel-top-scroll){background:var(--ui-inner)!important;color:var(--ui-text)!important;border-color:var(--ui-line)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(.skill-card-rate,.check-excel-total-value){color:var(--ui-title)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout .skill-type-tab.active{background:var(--ui-soft)!important;color:var(--ui-title)!important;border-color:var(--ui-title)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout .skill-type-tab .count{color:inherit!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout .char-avatar-fallback{background:var(--ui-raised)!important;color:var(--ui-muted)!important}
}
@layer localPalette {
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout .local-buff-table :is(th,td){background:var(--ui-inner)!important;border-color:var(--ui-line)!important;color:var(--ui-text)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout .local-buff-table :is(small,.buff-grid__buff-head){color:var(--ui-muted)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout .local-buff-table .buff-game-text-hit{color:var(--ui-text)!important}
}
@layer localPalette {
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(.export-cfg-main,.export-cfg-chart,.export-cfg-live,.echo-sub-sim-metrics>div,[data-sim-part='matrix']){background:var(--ui-inner)!important;border-color:var(--ui-line)!important;color:var(--ui-text)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(.export-cfg-live button,.export-cfg-table .cfg-del-cell button,.export-cfg-chart button){background:var(--ui-raised)!important;color:var(--ui-text)!important;-webkit-text-fill-color:var(--ui-text)!important;border-color:var(--ui-line)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(.export-cfg-live button:first-child,.export-cfg-chart button[aria-selected=true]){background:var(--ui-active)!important;color:var(--ui-on-active)!important;-webkit-text-fill-color:var(--ui-on-active)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(.export-cfg-table .result,.export-cfg-live-main,.echo-sub-sim-metrics strong){color:var(--ui-text)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(.export-cfg-table .cfg-short,.echo-sub-sim-margins-label){color:var(--ui-muted)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout .echo-sub-sim-metrics>div:nth-child(3),html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout .echo-sub-sim-metrics>div:nth-child(4){background:var(--ui-soft)!important;border-color:var(--ui-title)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout .echo-sub-sim-chip-tag{background:var(--ui-raised)!important;color:var(--ui-text)!important;border-color:var(--ui-line)!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout .echo-sub-sim-chip-tag.rank-1{background:#f2e8ca!important;border-color:#b9974c!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout .echo-sub-sim-chip-tag.rank-2{background:#deeeee!important;border-color:#619494!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout .echo-sub-sim-chip-tag.rank-3{background:#e8e0f2!important;border-color:#9272ab!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout .echo-sub-sim-chip-tag :is(strong,small),html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout .echo-sub-sim-chip-tag::before{color:#394658!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout :is(.up,.is-up){color:#18794e!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout :is(.down,.is-down,.export-cfg-del){color:#b6294e!important}
}
@layer localPalette {
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout .results-dashboard .results-hero{background:var(--ui-pattern) 0 0/100% 100% no-repeat var(--ui-panel)!important;border-color:var(--ui-line)!important;box-shadow:0 8px 24px var(--ui-shadow)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout .results-dashboard .results-hero::before{background:var(--ui-rim)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout .ov-num::before,html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout .ov-team-total::before{color:var(--ui-muted)!important}
html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout :is(.phase-subtotal-value,.row-damage){color:var(--ui-title)!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout .echo-sub-sim-metrics strong.up{color:#18794e!important}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout .echo-sub-sim-metrics strong.down{color:#b6294e!important}
}
@layer localPalette {
/* Ivory Buff comparison: replace the inherited dark editor layers with readable blue-white surfaces. */
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .calc-buff-panel .phase-buff-section{
 background:#f4f6f8!important;color:#203752!important;border-color:#b8c8d8!important;
}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .calc-buff-panel .phase-buff-section-head{
 background:linear-gradient(105deg,#e5edf6,#f5f2ec)!important;
 color:#173765!important;border-color:#b8c8d8!important;border-left-color:#123e86!important;
}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .calc-buff-panel .phase-buff-section-name,
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .calc-buff-panel .matrix-toolbar-title{
 color:#173765!important;
}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .calc-buff-panel .phase-buff-section-sub,
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .calc-buff-panel .matrix-toolbar .hint{
 color:#536a82!important;
}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .calc-buff-panel .matrix-toolbar{
 background:#e8eef5!important;color:#203752!important;border-color:#afc0d2!important;
}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .calc-buff-panel .matrix-toolbar .select-all-btn{
 background:#f8fbff!important;color:#294661!important;border-color:#96aec7!important;
}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .calc-buff-panel .buff-matrix-fixed .matrix-skill-row{
 background:#edf2f7!important;color:#1b3554!important;border-bottom-color:#c4d0dc!important;
}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .calc-buff-panel .buff-matrix-fixed .matrix-skill-row:nth-of-type(even){background:#e7eef5!important;}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .calc-buff-panel .buff-matrix-fixed .matrix-skill-row.hit-child{background:#e3ebf3!important;}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .calc-buff-panel .buff-matrix-fixed .matrix-skill-row:hover{background:#dceaf7!important;}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .calc-buff-panel .buff-matrix-fixed :is(.matrix-skill-name,.matrix-skill-row.hit-child .matrix-skill-name){
 color:#174684!important;font-weight:600!important;
}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .calc-buff-panel :is(.matrix-fixed-corner,.matrix-header-buff){
 background:#213347!important;color:#edf5ff!important;border-color:#8eacc6!important;
}
}
@layer localPalette {
/* Ivory echo cards: a pale blue material with a clear indigo main-slot accent. */
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-setup .setup-member-col .build-slot-card,
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .overview-echo-card.build-slot-card{
 background:linear-gradient(145deg,#f8fbff 0%,#e8f0f7 100%)!important;
 border:1px solid #b7c9dc!important;
 border-radius:12px!important;
 box-shadow:inset 0 1px #ffffff,0 7px 18px #355a7820!important;
 color:#203b59!important;
}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-setup .setup-member-col .build-slot-card:hover,
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .overview-echo-card.build-slot-card:hover{
 border-color:#769fc6!important;
 box-shadow:inset 0 1px #ffffff,0 9px 22px #355a7830!important;
}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-setup .setup-member-col .build-slot-card.is-main,
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .overview-echo-card.build-slot-card.is-main{
 border-color:#2b62a6!important;
 box-shadow:inset 0 0 0 1px #8eb7df, inset 0 1px #ffffff, 0 8px 20px #28558a26!important;
}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-setup .setup-member-col .build-slot-visual-ph,
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .overview-echo-card .build-slot-visual-ph{
 background:#dbe7f1!important;
 border-color:#afc3d7!important;
 color:#365572!important;
}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-setup .setup-member-col .build-slot-visual-name,
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .overview-echo-card .build-slot-visual-name{
 color:#1a3f70!important;
 text-shadow:none!important;
}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-setup .setup-member-col .build-slot-card.is-main .build-slot-visual-name,
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .overview-echo-card.build-slot-card.is-main .build-slot-visual-name{
 color:#174b96!important;
}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-setup .setup-member-col .build-slot-main-badge,
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .overview-echo-card .build-slot-main-badge{
 background:#d8e8f8!important;
 border-color:#79a5d0!important;
 color:#174684!important;
}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-setup .setup-member-col .build-slot-meta-line,
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .overview-echo-card .build-slot-meta-line,
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .overview-echo-card .build-slot-set{
 color:#536b83!important;
}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .echo-sub-sim-cell.echo-sub-sim-chip,
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .echo-sub-sim-cell .echo-sub-sim-chip{
 background:#f7fbff!important;
 border-color:#b7c9dc!important;
 color:#203b59!important;
}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .echo-sub-sim-cell :is(.overview-sim-affix,.overview-echo-empty){
 color:#536b83!important;
}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .overview-echo-card :is(.overview-sim-affix,.overview-echo-empty){
 color:#536b83!important;
}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .echo-sub-sim-cell .overview-main-value{
 background:#e1edf7!important;
 border-color:#afc7df!important;
 color:#174684!important;
}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .overview-echo-card .overview-main-value{
 background:#e1edf7!important;
 border-color:#afc7df!important;
 color:#174684!important;
}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .echo-sub-sim-cell .overview-affix-picker{
 background:#f7fbff!important;
 border-color:#b7c9dc!important;
 color:#294661!important;
}
html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .overview-echo-card .overview-affix-picker{
 background:#f7fbff!important;
 border-color:#b7c9dc!important;
 color:#294661!important;
}
}
@layer localPalette {
  /* Export page: clarify the edit -> calculate -> export flow without changing the existing DOM or actions. */
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export {
    --export-region-bg:var(--ui-panel);
    --export-inner-bg:var(--ui-inner);
    --export-stage-bg:var(--ui-raised);
    --export-stage-line:var(--ui-line);
    --export-action-bg:var(--ui-inner);
    --export-action-line:var(--ui-line);
    --export-action-text:var(--ui-text);
    --export-preview-shadow:var(--ui-shadow);
  }
  html:where([data-config-ui-active])[data-config-theme='classic'] body #workspaceLayout.phase-export {
    --export-region-bg:linear-gradient(145deg,#201c25 0%,#17151b 72%);
    --export-inner-bg:#211e26;
    --export-stage-bg:linear-gradient(145deg,#211c27 0%,#15131a 75%);
    --export-stage-line:#5b4154;
    --export-action-bg:#211e26;
    --export-action-line:#4d3b49;
    --export-action-text:#f5eaf0;
    --export-preview-shadow:rgba(0,0,0,.34);
  }
  html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-export {
    --export-region-bg:linear-gradient(145deg,#f7f4ee 0%,#ebeef0 100%);
    --export-inner-bg:#f8fafb;
    --export-stage-bg:linear-gradient(145deg,#edf3f7 0%,#dfe8ee 100%);
    --export-stage-line:#aabed0;
    --export-action-bg:#f8fafb;
    --export-action-line:#b8c8d6;
    --export-action-text:#203752;
    --export-preview-shadow:rgba(53,90,120,.18);
  }

  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-page-header {
    align-items:flex-end;
    gap:14px;
    margin-bottom:18px;
    padding:10px 14px 12px;
    border-bottom:1px solid var(--ui-line)!important;
    background:linear-gradient(90deg,var(--ui-panel),transparent)!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-page-title {
    margin:0!important;
    letter-spacing:.04em;
    text-shadow:0 1px 0 var(--ui-shadow);
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-page-header .hint {
    margin:0 0 3px!important;
    color:var(--ui-muted)!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-top-row {
    align-items:flex-start;
    gap:22px;
    margin-bottom:20px;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-top-row > .export-section {
    border-radius:14px!important;
    border-color:var(--ui-line)!important;
    background:var(--export-region-bg)!important;
    box-shadow:0 12px 28px var(--export-preview-shadow),inset 0 1px #ffffff0a!important;
    transform:none!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-top-row > .export-section:hover {
    box-shadow:0 14px 32px var(--export-preview-shadow),inset 0 1px #ffffff10!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-region-head {
    padding-bottom:10px;
    border-bottom:1px solid var(--ui-line)!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-region-title {
    font-weight:700!important;
    letter-spacing:.05em;
  }

  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-stack {
    gap:12px;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-card {
    border-radius:11px!important;
    border-color:var(--ui-line)!important;
    background:var(--export-inner-bg)!important;
    box-shadow:inset 0 1px #ffffff0a!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-card-title {
    color:var(--ui-title)!important;
    font-weight:700!important;
    letter-spacing:.08em;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-stats-row {
    padding:13px 12px 12px;
    border:1px solid var(--ui-line);
    border-radius:10px;
    background:linear-gradient(135deg,var(--ui-raised),var(--export-inner-bg));
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-stat-value {
    color:var(--ui-title)!important;
    font-size:22px;
    letter-spacing:.02em;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-stat-value.is-accent {
    color:var(--ui-title)!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-stat-label,
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-field-label,
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-action-label {
    color:var(--ui-muted)!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-roster {
    margin-top:12px;
    padding-top:11px;
    border-top-color:var(--ui-line)!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-roster-names {
    color:var(--ui-text)!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-form-grid {
    gap:12px 14px;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-input {
    height:40px;
    border-radius:9px;
    border-color:var(--ui-line)!important;
    background:var(--ui-raised)!important;
    color:var(--ui-text)!important;
    -webkit-text-fill-color:var(--ui-text)!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-input::placeholder {
    color:var(--ui-muted)!important;
    opacity:.85;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-input:focus {
    border-color:var(--ui-title)!important;
    box-shadow:0 0 0 3px color-mix(in srgb,var(--ui-title) 16%,transparent)!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-select.is-placeholder {
    color:var(--ui-muted)!important;
    -webkit-text-fill-color:var(--ui-muted)!important;
  }

  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-actions {
    padding:14px 16px 16px;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-action-groups {
    display:grid;
    grid-template-columns:1.2fr 1fr .78fr;
    gap:10px;
    align-items:stretch;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-action-group {
    gap:8px;
    padding:10px;
    border:1px solid var(--export-action-line);
    border-radius:9px;
    background:var(--export-action-bg);
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-action-label {
    letter-spacing:.12em;
    font-weight:700;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-action-btns {
    gap:7px;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-btn {
    min-height:40px;
    height:40px;
    border-radius:9px;
    border-color:var(--export-action-line)!important;
    color:var(--export-action-text)!important;
    -webkit-text-fill-color:var(--export-action-text)!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-btn-ghost {
    background:var(--export-action-bg)!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-btn-ghost:hover {
    background:var(--ui-soft)!important;
    border-color:var(--ui-title)!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export :is(.esm-btn-primary,[data-export-scheme]) {
    background:var(--ui-active)!important;
    border-color:var(--ui-active)!important;
    color:var(--ui-on-active)!important;
    -webkit-text-fill-color:var(--ui-on-active)!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export [data-upload-public-scheme] {
    background:var(--ui-soft)!important;
    border-color:var(--ui-title)!important;
    color:var(--ui-title)!important;
    -webkit-text-fill-color:var(--ui-title)!important;
  }

  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-card-region {
    overflow:visible;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-export-card {
    padding:12px 16px 16px;
    border-color:var(--ui-line)!important;
    background:var(--export-inner-bg)!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-export-card-head {
    align-items:center;
    margin-bottom:10px;
    padding-bottom:10px;
    border-bottom:1px solid var(--ui-line);
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-export-card-actions {
    gap:9px;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-export-card-actions .esm-btn-primary {
    min-width:126px;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-export-card .hint {
    margin:0 0 9px!important;
    color:var(--ui-muted)!important;
    line-height:1.55;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-card-maker-preview {
    height:calc(1140px * var(--ecard-preview-scale,.83) + 34px)!important;
    min-height:0!important;
    margin-top:0!important;
    padding:12px 0 16px;
    border:1px solid var(--export-stage-line);
    border-radius:12px;
    background:var(--export-stage-bg)!important;
    box-shadow:inset 0 1px #ffffff12,0 10px 24px var(--export-preview-shadow);
    box-sizing:border-box;
    overflow:hidden!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-card-maker-preview .card-export {
    border-radius:10px;
    box-shadow:0 14px 28px #00000045;
  }
  html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-export .export-card-maker-preview .card-export {
    outline:1px solid #6b849b66;
    outline-offset:3px;
  }

  @media (max-width:1199px) {
    html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-action-groups {
      grid-template-columns:1fr 1fr;
    }
    html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-action-group:last-child {
      grid-column:1 / -1;
    }
  }
  @media (max-width:640px) {
    html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-page-header {
      align-items:flex-start;
      flex-direction:column;
      gap:5px;
    }
    html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-action-groups {
      grid-template-columns:1fr;
    }
    html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-action-group:last-child {
      grid-column:auto;
    }
  }
}
@layer localPalette {
  /* Keep export actions readable at the normal desktop workspace width. */
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-action-groups {
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-action-group:last-child {
    grid-column:1 / -1;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-action-btns {
    display:grid;
    grid-template-columns:minmax(0,1fr);
  }
  @media (max-width:640px) {
    html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-action-groups {
      grid-template-columns:minmax(0,1fr);
    }
    html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-action-group:last-child {
      grid-column:auto;
    }
  }
}
@layer localPalette {
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .esm-action-groups {
    display:grid!important;
  }
}
@layer localPalette {
  /* Native adaptation of React Bits LatticeLoader for the existing calculation overlays. */
  html:where([data-config-ui-active])[data-config-theme] body .export-card-calc-overlay .lattice-loader {
    --ll-n:3;
    --ll-cell:7px;
    --ll-gap:3px;
    --ll-font:14px;
    --ll-color:var(--ui-title);
    --ll-idle:.16;
    --ll-peak:1;
    --ll-cycle:864ms;
    position:relative;
    display:inline-flex!important;
    align-items:center;
    gap:calc(var(--ll-font) * .625);
    min-height:30px;
    margin:0 auto 14px;
    color:var(--ll-color);
    font-family:inherit;
    font-size:var(--ll-font);
    line-height:1;
  }
  html:where([data-config-ui-active])[data-config-theme] body .export-card-calc-overlay .lattice-loader__grid {
    display:grid;
    flex:none;
  }
  html:where([data-config-ui-active])[data-config-theme] body .export-card-calc-overlay .lattice-loader__layer {
    grid-area:1 / 1;
    display:grid;
    grid-template-columns:repeat(var(--ll-n),var(--ll-cell));
    gap:var(--ll-gap);
  }
  html:where([data-config-ui-active])[data-config-theme] body .export-card-calc-overlay .lattice-loader__cell {
    width:var(--ll-cell);
    height:var(--ll-cell);
    border-radius:50%;
    background:var(--ll-color);
    opacity:var(--ll-idle);
  }
  html:where([data-config-ui-active])[data-config-theme] body .export-card-calc-overlay .lattice-loader__run .lattice-loader__cell {
    animation:local-lattice-on var(--ll-cycle) cubic-bezier(.77,0,.175,1) infinite;
  }
  html:where([data-config-ui-active])[data-config-theme] body .export-card-calc-overlay .lattice-loader__run .lattice-loader__cell[data-hole] {
    animation:none;
    opacity:calc(var(--ll-idle) * .47);
  }
  html:where([data-config-ui-active])[data-config-theme] body .export-card-calc-overlay .lattice-loader__label {
    display:inline-block;
    font-weight:600;
    white-space:nowrap;
    color:var(--ui-text)!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body .export-card-calc-overlay .lattice-loader__timer {
    font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
    font-size:calc(var(--ll-font) * .875);
    font-variant-numeric:tabular-nums;
    opacity:.68;
    white-space:nowrap;
  }
  html:where([data-config-ui-active])[data-config-theme] body .export-card-calc-overlay .lattice-loader__sr {
    position:absolute;
    width:1px;
    height:1px;
    margin:-1px;
    padding:0;
    border:0;
    overflow:hidden;
    clip:rect(0 0 0 0);
    white-space:nowrap;
  }
  html:where([data-config-ui-active])[data-config-theme='classic'] body .export-card-calc-overlay .lattice-loader {
    --ll-color:#f08aae;
  }
  html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body .export-card-calc-overlay .lattice-loader {
    --ll-color:#1f4f9a;
  }
  @keyframes local-lattice-on {
    0%,100% { opacity:var(--ll-idle); transform:scale(.86); }
    18%,42% { opacity:var(--ll-peak); transform:scale(1); }
    62% { opacity:var(--ll-idle); transform:scale(.86); }
  }
  @media (prefers-reduced-motion:reduce) {
    html:where([data-config-ui-active])[data-config-theme] body .export-card-calc-overlay .lattice-loader__run .lattice-loader__cell {
      animation-duration:1400ms;
      animation-delay:0ms!important;
    }
  }
}
@layer localPalette {
  /* Export workbench: one shared shell for the editor and the card maker. */
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-workbench-summary {
    margin:0 0 14px;
    padding:13px 16px 14px;
    border:1px solid var(--ui-line)!important;
    border-radius:14px;
    background:linear-gradient(110deg,var(--export-region-bg),var(--export-inner-bg))!important;
    box-shadow:0 10px 24px var(--export-preview-shadow),inset 0 1px #ffffff0a!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-workbench-summary-head {
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    gap:14px;
    padding-bottom:9px;
    border-bottom:1px solid var(--ui-line);
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-workbench-summary-kicker {
    color:var(--ui-title);
    font-size:var(--ui-type-base);
    font-weight:700;
    letter-spacing:.08em;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-workbench-summary-note {
    color:var(--ui-muted);
    font-size:var(--ui-type-micro);
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-workbench-summary > .esm-card {
    margin:0;
    padding:0;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-workbench-summary .esm-stats-row {
    padding:8px 0 7px;
    border:0;
    border-radius:0;
    background:transparent;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-workbench-summary .esm-stat {
    padding:2px 14px 1px;
    border-left:1px solid var(--ui-line);
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-workbench-summary .esm-stat:first-child {
    padding-left:0;
    border-left:0;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-workbench-summary .esm-stat-label {
    color:var(--ui-muted)!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-workbench-summary .esm-roster {
    margin:0;
    padding:10px 0 0;
    border-top:1px solid var(--ui-line)!important;
  }

  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-top-row {
    display:grid!important;
    grid-template-columns:minmax(330px,.95fr) minmax(0,1.65fr);
    align-items:stretch;
    gap:12px;
    padding:10px;
    margin-bottom:20px;
    border:1px solid var(--ui-line)!important;
    border-radius:16px;
    background:var(--export-inner-bg)!important;
    box-shadow:0 12px 28px var(--export-preview-shadow),inset 0 1px #ffffff0a!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-top-row > .export-section {
    min-width:0;
    width:auto;
    border:0!important;
    border-radius:11px!important;
    background:transparent!important;
    box-shadow:none!important;
    transform:none!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-top-row > .export-section:hover {
    box-shadow:none!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-top-row > .export-card-region {
    border-left:1px solid var(--ui-line)!important;
    padding-left:18px;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-top-row > .export-section > .export-region-head {
    margin:0;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-region-scheme .esm-stack {
    min-height:100%;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-card-region {
    display:flex;
    flex-direction:column;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-card-region > .esm-export-card {
    flex:1 1 auto;
  }

  @media (max-width:960px) {
    html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-workbench-summary-head {
      align-items:flex-start;
      flex-direction:column;
      gap:4px;
    }
    html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-workbench-summary .esm-stats-row {
      flex-direction:row;
    }
    html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-top-row {
      grid-template-columns:minmax(0,1fr);
    }
    html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-top-row > .export-card-region {
      border-left:0!important;
      border-top:1px solid var(--ui-line)!important;
      padding-left:0;
      padding-top:16px;
    }
  }
  @media (max-width:640px) {
    html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-workbench-summary {
      padding:12px;
    }
    html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-workbench-summary .esm-stats-row {
      display:grid;
      grid-template-columns:repeat(3,minmax(0,1fr));
      gap:0;
    }
    html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-workbench-summary .esm-stat {
      padding:2px 8px 1px;
    }
    html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-export .export-top-row {
      padding:7px;
      border-radius:13px;
    }
  }
}

@layer localPalette {
  /* Public DB cards: first-slot character wallpaper as a quiet background layer. */
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .data-card {
    position:relative;
    isolation:isolate;
    overflow:hidden;
    background:linear-gradient(90deg,var(--ui-panel) 0%,color-mix(in srgb,var(--ui-panel) 78%,transparent) 44%,var(--ui-panel) 100%)!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .data-card > :not(.pdb-card-wallpaper) {
    position:relative;
    z-index:1;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-card-wallpaper {
    position:absolute;
    inset:0;
    z-index:0;
    pointer-events:none;
    background-position:center 28%;
    background-repeat:no-repeat;
    background-size:cover;
    opacity:.30;
    filter:saturate(.84) contrast(1.08) brightness(.54);
    mix-blend-mode:screen;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-card-wallpaper::after {
    content:'';
    position:absolute;
    inset:0;
    background:linear-gradient(90deg,var(--ui-panel) 0%,transparent 40%,var(--ui-panel) 100%),linear-gradient(180deg,var(--ui-panel) 0%,transparent 48%,var(--ui-panel) 100%);
    opacity:.72;
  }
  html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body.public-db-open .public-db-page .data-card {
    background:linear-gradient(90deg,rgba(242,239,233,.92) 0%,rgba(242,239,233,.70) 46%,rgba(242,239,233,.88) 100%)!important;
  }
  html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body.public-db-open .public-db-page .pdb-card-wallpaper {
    opacity:.48;
    filter:saturate(.78) contrast(1.12) brightness(.88);
    mix-blend-mode:multiply;
  }
  html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body.public-db-open .public-db-page .pdb-card-wallpaper::after {
    background:linear-gradient(90deg,rgba(242,239,233,.82) 0%,rgba(242,239,233,.30) 43%,rgba(242,239,233,.82) 100%),linear-gradient(180deg,rgba(242,239,233,.48) 0%,transparent 48%,rgba(242,239,233,.72) 100%);
    opacity:.72;
  }
  @media (max-width:640px) {
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-card-wallpaper { opacity:.24; }
    html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body.public-db-open .public-db-page .pdb-card-wallpaper { opacity:.38; }
  }
}

@layer localPalette {
  /* Keep the real public DB close to the reviewed Demo hierarchy. */
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-list { gap:12px; }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-card-user .pdb-author-avatar { width:52px; height:52px; }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-card-btn { min-height:34px; height:34px; padding:0 12px; font-size:var(--ui-type-base); font-weight:700; }
  @media (max-width:640px) {
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-list { gap:9px; }
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-card-user .pdb-author-avatar { width:48px; height:48px; }
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-card-btn { min-height:32px; height:32px; padding:0 9px; font-size:var(--ui-type-small); }
  }
}

@layer localPalette {
  /* Public DB card layout sync: mirror the reviewed Demo while keeping data attributes intact. */
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .data-card {
    display:block!important;
    padding:16px 18px 14px!important;
    border-radius:11px;
    box-sizing:border-box;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-heading {
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
    min-width:0;
    padding-bottom:9px;
    border-bottom:1px solid var(--ui-line);
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-heading-copy { min-width:0; }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-kind {
    display:block;
    margin-bottom:5px;
    color:var(--ui-title);
    font-size:10px;
    font-weight:800;
    letter-spacing:.08em;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-name {
    margin:0;
    color:var(--ui-text);
    font-size:17px;
    line-height:1.25;
    font-weight:850;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-heading-tools,
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-heading-actions,
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-quick-actions {
    display:flex;
    align-items:center;
    gap:6px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-heading-tools { flex:0 0 auto; }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-main {
    display:grid;
    grid-template-columns:minmax(0,1fr) 168px;
    gap:16px;
    align-items:stretch;
    min-width:0;
    margin-top:8px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left {
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    min-width:0;
    min-height:154px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left > .team {
    display:block!important;
    min-width:0;
    margin:0;
    padding:9px 0 13px!important;
    border-top:0;
    border-bottom:1px solid var(--ui-line);
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left .avatar-group {
    display:flex;
    align-items:center;
    gap:16px;
    width:auto;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left .pdb-team-slot {
    width:auto;
    min-width:0;
    padding-right:15px;
    gap:8px;
    border-right:1px solid var(--ui-line);
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left .pdb-team-slot:last-child { border-right:0; }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left .avatar-group .avatar {
    width:72px;
    height:72px;
    border-radius:8px;
    border-color:var(--ui-line);
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left .slot-weapon-wrap {
    width:52px;
    height:52px;
    border-color:var(--ui-line);
    background:var(--ui-inner);
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left .slot-badge { font-size:10px; padding:2px 5px; }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-tags.team-tags {
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:6px;
    margin:8px 0 0;
    padding:0;
    border:0;
    background:transparent;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .team-tags .tag {
    display:flex;
    align-items:center;
    justify-content:center;
    min-width:0;
    min-height:31px;
    padding:5px 7px;
    border:1px solid var(--ui-line);
    border-left:2px solid var(--ui-title);
    border-radius:5px;
    background:linear-gradient(105deg,var(--ui-inner),transparent);
    color:var(--ui-text);
    font-size:11px;
    font-weight:850;
    text-align:center;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .team-tags .tag-value {
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .team-tags .tag-easiest,
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .team-tags .tag-adapt { border-left-color:#3e9c76; color:#176b4b; }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .team-tags .tag-extreme,
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .team-tags .tag-picky { border-left-color:#ba5261; color:#9e3546; }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left-foot { display:flex; flex-direction:column; gap:5px; padding-top:9px; }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-metrics { display:flex; align-items:baseline; gap:15px; flex-wrap:wrap; color:var(--ui-muted); font-size:10px; }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-metric { display:flex; align-items:baseline; gap:4px; }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-metric strong { color:var(--ui-text); font:800 16px/1 ui-monospace,Consolas,monospace; }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-metric.dps strong { color:var(--ui-title); font-size:20px; }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .publish-date { color:var(--ui-muted); font:600 9px ui-monospace,Consolas,monospace; }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-right { display:flex; flex-direction:column; align-items:flex-end; justify-content:space-between; gap:12px; min-width:0; }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-quick-actions { justify-content:flex-end; flex-wrap:wrap; }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-right .pdb-card-user { align-self:flex-end; display:flex; align-items:center; gap:10px; min-width:0; padding:0; border:0; background:transparent; }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-right .pdb-card-user:hover { background:transparent; border-color:transparent; }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .author-info b { color:var(--ui-text); font-size:12px; white-space:nowrap; }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-right .pdb-card-btn { min-height:34px!important; height:34px!important; padding:0 10px!important; font-size:11px!important; font-weight:800; }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-heading .pdb-card-btn { min-height:30px; height:30px; padding:0 9px; font-size:10px; }
  html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body.public-db-open .public-db-page .team-tags .tag { background:linear-gradient(100deg,#f0f3f6,#ffffff); }
  html:where([data-config-ui-active])[data-config-theme='classic'] body.public-db-open .public-db-page .team-tags .tag { color:var(--ui-text); }
  @media (max-width:960px) {
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-main { grid-template-columns:minmax(0,1fr) 142px; gap:11px; }
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left .avatar-group { gap:9px; }
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left .pdb-team-slot { padding-right:8px; gap:5px; }
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left .avatar-group .avatar { width:58px; height:58px; }
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left .slot-weapon-wrap { width:43px; height:43px; }
  }
  @media (max-width:640px) {
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .data-card { padding:13px 12px 12px!important; }
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-heading { gap:8px; }
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-name { font-size:15px; }
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-main { grid-template-columns:minmax(0,1fr); gap:10px; }
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left { min-height:0; }
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left .avatar-group { gap:6px; }
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left .pdb-team-slot { padding-right:5px; gap:3px; }
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left .avatar-group .avatar { width:48px; height:48px; }
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left .slot-weapon-wrap { width:35px; height:35px; }
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-right { flex-direction:row; align-items:center; }
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-quick-actions { justify-content:flex-start; }
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-right .pdb-card-user { margin-left:auto; }
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-right .pdb-card-btn { min-height:32px; height:32px; padding:0 7px; font-size:10px; }
  }
}



@layer localPalette {
  /* Match Demo card controls: actions and usage count share the heading rail. */
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-heading-tools {
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:8px;
    flex-wrap:wrap;
    max-width:360px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-heading-actions { gap:4px; flex-wrap:wrap; justify-content:flex-end; }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-use-count {
    display:inline-flex;
    align-items:center;
    gap:3px;
    min-height:29px;
    padding:5px 8px;
    border:1px solid var(--ui-line);
    border-radius:5px;
    color:var(--ui-muted);
    font-size:10px;
    white-space:nowrap;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-use-count strong { color:var(--ui-title); font:800 12px ui-monospace,Consolas,monospace; }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-quick-actions .pdb-card-btn.like { color:var(--ui-title); border-color:var(--ui-title); background:var(--ui-soft); }
  @media (max-width:640px) {
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-heading-tools { max-width:250px; gap:4px; }
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-use-count { min-height:27px; padding:4px 6px; font-size:9px; }
  }
}

@layer localPalette {
  /* Main public library uses the same two-card rhythm as the reviewed Demo. */
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-list {
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    align-items:stretch;
    gap:14px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-list .data-card { width:100%; max-width:none; min-width:0; }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-main { grid-template-columns:minmax(0,1fr) 136px; gap:12px; }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left .avatar-group { gap:10px; }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left .pdb-team-slot { padding-right:9px; gap:6px; }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left .avatar-group .avatar { width:64px; height:64px; }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left .slot-weapon-wrap { width:47px; height:47px; }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-tags.team-tags { gap:5px; }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .team-tags .tag { min-height:34px; padding:6px 5px; font-size:10px; }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-right .pdb-card-btn { padding:0 8px!important; font-size:10px!important; }
  @media (max-width:760px) {
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-list { grid-template-columns:1fr!important; }
  }
  @media (max-width:640px) {
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-list { gap:9px; }
  }
}






@layer localPalette {
  /* Three-column compact cards: keep the data hierarchy visible without wasting width. */
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-list {
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:12px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-list .data-card {
    padding:12px 13px 11px!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-heading {
    justify-content:flex-start;
    gap:9px;
    padding-bottom:7px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-heading-copy {
    flex:0 1 auto;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-name {
    font-size:15px;
    line-height:1.2;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-heading-tools {
    max-width:none;
    margin-left:0;
    flex:0 0 auto;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-heading-actions {
    gap:3px;
    flex-wrap:nowrap;
    justify-content:flex-start;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-heading .pdb-card-btn {
    min-height:28px;
    height:28px;
    padding:0 7px;
    font-size:9px;
    white-space:nowrap;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-main {
    grid-template-columns:minmax(0,1fr) 94px;
    gap:8px;
    margin-top:6px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left {
    min-height:145px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left > .team {
    padding:6px 0 9px!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left .avatar-group {
    gap:6px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left .pdb-team-slot {
    padding-right:7px;
    gap:5px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left .avatar-group .avatar {
    width:54px;
    height:54px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left .slot-weapon-wrap {
    width:38px;
    height:38px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-tag-row {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:6px;
    min-width:0;
    margin-top:7px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-tags.team-tags {
    display:block!important;
    flex:1 1 auto;
    min-width:0;
    margin:0;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .team-tags .tag {
    justify-content:flex-start;
    min-height:28px;
    padding:4px 7px;
    font-size:10px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-signal-actions {
    display:inline-flex;
    align-items:center;
    gap:4px;
    flex:0 0 auto;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-signal-actions .pdb-pulse-heart {
    min-height:28px!important;
    height:28px!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-signal-actions .pdb-pulse-heart__pill {
    gap:4px;
    padding:0 6px;
    border-radius:14px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-signal-actions .pdb-pulse-heart__heart {
    width:14px;
    height:14px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-signal-actions .pdb-pulse-heart__count {
    font-size:10px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-signal-actions .card-use-count {
    min-height:28px;
    padding:4px 6px;
    font-size:9px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-signal-actions .card-use-count strong {
    font-size:11px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-right {
    gap:8px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-quick-actions {
    justify-content:flex-start;
    flex-wrap:nowrap;
    gap:4px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-right .pdb-card-btn {
    min-height:28px!important;
    height:28px!important;
    min-width:0;
    padding:0 6px!important;
    font-size:9px!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-right .card-quick-actions .pdb-card-btn {
    flex:1 1 0;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-right .pdb-card-user {
    margin-top:auto;
    gap:6px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-right .pdb-card-user .pdb-author-avatar {
    width:38px;
    height:38px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .author-info b {
    font-size:10px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-metrics {
    gap:8px;
    font-size:9px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-metric strong {
    font-size:13px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-metric.dps strong {
    font-size:16px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .publish-date {
    font-size:8px;
  }
  @media (max-width:1180px) {
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-list {
      grid-template-columns:repeat(2,minmax(0,1fr))!important;
    }
  }
  @media (max-width:760px) {
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-list {
      grid-template-columns:1fr!important;
    }
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-heading {
      justify-content:space-between;
    }
  }
}

@layer localPalette {
  /* Let the public library use the full content rail; the old 1280/1360px cap left a wide blank strip. */
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page {
    width:100%;
    max-width:none!important;
    margin-left:0;
    margin-right:0;
    padding-left:clamp(20px,2.2vw,48px);
    padding-right:clamp(20px,2.2vw,48px);
  }
  @media (max-width:640px) {
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page {
      padding-left:12px;
      padding-right:12px;
    }
  }
}

@layer localPalette {
  /* Keep the full-width page clear of the fixed left navigation rail. */
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open.has-phase-rail .wrap {
    padding-left:calc(var(--phase-rail-width) + 12px)!important;
    padding-right:16px!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-heading {
    justify-content:space-between;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-heading-copy {
    flex:1 1 auto;
    min-width:0;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-heading-tools {
    margin-left:auto;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-heading-actions {
    justify-content:flex-end;
    flex-wrap:nowrap;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-main {
    display:block;
    margin-top:4px;
    min-height:0;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left {
    display:grid;
    grid-template-rows:auto auto minmax(0,1fr);
    align-content:start;
    gap:5px;
    min-height:0;
    justify-content:stretch;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-list .data-card {
    height:auto!important;
    min-height:0!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left > .team {
    padding:4px 0 5px!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-tag-row {
    margin-top:0;
    justify-content:flex-start;
    gap:8px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left-foot {
    display:flex;
    flex-direction:row!important;
    align-items:flex-end;
    justify-content:space-between;
    flex-wrap:nowrap;
    gap:10px;
    min-width:0;
    margin-top:0;
    padding-top:3px;
    align-self:end;
    width:100%;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-footer-stats {
    display:flex;
    flex:0 1 auto;
    min-width:0;
    flex-direction:column;
    gap:3px;
    align-self:flex-end;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-footer-stats .card-metrics {
    flex-wrap:nowrap;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left-foot .pdb-card-user {
    display:flex;
    flex-direction:row;
    align-items:center;
    align-self:flex-end;
    position:relative;
    top:-28px;
    flex:0 1 auto;
    gap:6px;
    min-width:0;
    width:auto;
    max-width:40%;
    padding:0;
    border:0;
    background:transparent;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left-foot .pdb-card-user:hover {
    border-color:transparent;
    background:transparent;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left-foot .pdb-author-avatar {
    width:38px;
    height:38px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left-foot .author-info b {
    color:var(--ui-text);
    font-size:10px;
    white-space:nowrap;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left-foot .author-info {
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-signal-actions .card-use-count {
    min-height:0;
    padding:0!important;
    border:0!important;
    background:transparent!important;
    border-radius:0;
  }
  @media (max-width:760px) {
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open.has-phase-rail .wrap {
      padding-left:12px!important;
      padding-right:12px!important;
    }
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-heading-actions {
      flex-wrap:wrap;
    }
  }
}





@layer localPalette {
  /* Keep the signal pair beside the entry label on the left; lift the author toward the team row. */
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-tags.team-tags {
    flex:0 1 auto;
    width:auto;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-signal-actions {
    margin-left:0;
    justify-content:flex-start;
  }
}

@layer localPalette {
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-signal-actions {
    padding-left:24px;
  }
}




@layer localPalette {
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-signal-actions {
    position:relative;
    left:24px;
  }
}

@layer localPalette {
  /* Keep the footer in normal flow so the card edge follows the publish date. */
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-footer-stats {
    position:static;
    top:auto;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left-foot .pdb-card-user {
    flex-direction:row!important;
    align-items:center!important;
    flex-basis:auto!important;
    width:auto!important;
    padding:0!important;
    position:static;
    top:auto;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left-foot .pdb-author-avatar {
    width:48px!important;
    height:48px!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-list {
    align-items:stretch;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-list .data-card {
    align-self:stretch;
  }
}

@layer localPalette {
  /* Public DB card: readable metrics, room for long author names, and a quiet hover pulse. */
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left-foot .pdb-card-user {
    max-width:44%;
    margin-right:12px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left-foot .author-info {
    white-space:nowrap;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left-foot .author-info b {
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-metrics {
    gap:10px;
    font-size:11px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-metric strong {
    font-size:17px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-metric.dps strong {
    font-size:21px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .publish-date {
    font-size:10px;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-list .data-card:hover {
    border-color:color-mix(in srgb,var(--ui-title) 55%,var(--ui-line));
    animation:pdb-card-breathe 2.5s ease-in-out infinite;
  }
  @keyframes pdb-card-breathe {
    0%,100% { transform:translateY(-2px) scale(1.002); box-shadow:0 8px 20px rgba(0,0,0,.16),0 0 0 1px color-mix(in srgb,var(--ui-title) 15%,transparent); }
    50% { transform:translateY(-3px) scale(1.006); box-shadow:0 13px 29px rgba(0,0,0,.21),0 0 0 1px color-mix(in srgb,var(--ui-title) 32%,transparent); }
  }
  @media (prefers-reduced-motion:reduce) {
    html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-list .data-card:hover {
      animation:none;
      transform:none;
    }
  }
}

@layer localPalette {
  /* Keep the author avatar/name clear of the card edge when IDs run long. */
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left-foot .pdb-card-user {
    position:relative;
    left:-12px;
  }
}

@layer localPalette {
  /* Stack social signals above the author area and give the like control an unmistakable oval pill. */
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-left {
    position:relative;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-signal-actions {
    position:absolute;
    left:auto;
    right:12px;
    bottom:56px;
    z-index:3;
    display:inline-flex;
    align-items:center;
    justify-content:flex-end;
    gap:14px;
    padding-left:0;
    margin-left:0;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-signal-actions .pdb-pulse-heart {
    min-width:50px!important;
    width:auto!important;
    height:28px!important;
    min-height:28px!important;
    padding:0!important;
    border-radius:999px!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-signal-actions .pdb-pulse-heart__pill {
    min-width:50px;
    width:auto;
    height:28px;
    padding:0 10px!important;
    gap:6px;
    justify-content:center;
    border-radius:999px!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-signal-actions .card-use-count {
    margin-left:0;
    white-space:nowrap;
  }
}

@layer localPalette {
  /* Public DB axis-kind language: green for global axes, blue-purple for loop axes. */
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-tab[data-pdb-kind="global"] {
    color:#7ee2a5;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-tab[data-pdb-kind="global"].is-on {
    color:#b9f5ca;
    background:linear-gradient(180deg,rgba(67,192,125,.18),transparent);
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-tab[data-pdb-kind="global"].is-on::after {
    background:#55d98f;
    box-shadow:0 0 12px rgba(85,217,143,.62);
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-tab[data-pdb-kind="loop"] {
    color:#aeb9ff;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-tab[data-pdb-kind="loop"].is-on {
    color:#d7d5ff;
    background:linear-gradient(180deg,rgba(122,111,229,.2),transparent);
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-tab[data-pdb-kind="loop"].is-on::after {
    background:#9b8cff;
    box-shadow:0 0 12px rgba(139,126,255,.66);
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-list .data-card.pdb-kind-global {
    border-color:rgba(78,214,141,.58)!important;
    box-shadow:0 0 0 1px rgba(78,214,141,.2),0 0 20px rgba(44,180,110,.14);
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-list .data-card.pdb-kind-global:hover {
    border-color:rgba(118,238,169,.85)!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-list .data-card.pdb-kind-loop {
    border-color:rgba(145,133,255,.62)!important;
    box-shadow:0 0 0 1px rgba(145,133,255,.22),0 0 20px rgba(103,91,223,.17);
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-list .data-card.pdb-kind-loop:hover {
    border-color:rgba(184,176,255,.9)!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-tags.team-tags {
    display:flex!important;
    align-items:center;
    gap:6px;
    flex-wrap:nowrap;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-tags.team-tags .tag-entry {
    flex:0 1 auto;
    min-width:0;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-video-badge {
    display:inline-flex;
    align-items:center;
    flex:0 0 auto;
    min-height:24px;
    padding:3px 7px;
    border:1px solid rgba(91,220,143,.62);
    border-radius:999px;
    background:rgba(46,150,91,.17);
    color:#89e9ae;
    font-size:9px;
    font-weight:850;
    line-height:1;
    white-space:nowrap;
  }
}

@layer localPalette {
  /* Layered palette rules need importance to outrank the base unlayered tab/card rules. */
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-tab[data-pdb-kind="global"] {
    color:#7ee2a5!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-tab[data-pdb-kind="global"].is-on {
    color:#b9f5ca!important;
    background:linear-gradient(180deg,rgba(67,192,125,.18),transparent)!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-tab[data-pdb-kind="global"].is-on::after {
    background:#55d98f!important;
    box-shadow:0 0 12px rgba(85,217,143,.62)!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-tab[data-pdb-kind="loop"] {
    color:#aeb9ff!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-tab[data-pdb-kind="loop"].is-on {
    color:#d7d5ff!important;
    background:linear-gradient(180deg,rgba(122,111,229,.2),transparent)!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-tab[data-pdb-kind="loop"].is-on::after {
    background:#9b8cff!important;
    box-shadow:0 0 12px rgba(139,126,255,.66)!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-list .data-card.pdb-kind-global {
    box-shadow:0 0 0 1px rgba(78,214,141,.2),0 0 20px rgba(44,180,110,.14)!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .pdb-list .data-card.pdb-kind-loop {
    box-shadow:0 0 0 1px rgba(145,133,255,.22),0 0 20px rgba(103,91,223,.17)!important;
  }
}

@layer localPalette {
  /* Ivory public DB: bring the retrieval surface into the same blue-white system. */
  html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body.public-db-open .public-db-page .pdb-toolbar {
    background:linear-gradient(135deg,#f7f5f0 0%,#eef3fb 100%)!important;
    border:1px solid #c6cfdb!important;
    box-shadow:0 10px 24px rgba(37,55,86,.12),inset 0 1px rgba(255,255,255,.86)!important;
    color:var(--ui-text)!important;
  }
  html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body.public-db-open .public-db-page .pdb-toolbar :is(.pdb-team-cfg-slot,.pdb-sel-slot-box) {
    background:rgba(255,255,255,.42)!important;
    border-color:#c5ceda!important;
  }
  html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body.public-db-open .public-db-page .pdb-toolbar .pdb-sel-slot-box {
    border-style:dashed!important;
    color:#52647f!important;
  }
  html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body.public-db-open .public-db-page .pdb-toolbar :is(.pdb-search-input,.pdb-select) {
    background:#fffdfa!important;
    border-color:#c4cdd9!important;
    color:#202d43!important;
  }
  html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body.public-db-open .public-db-page .pdb-toolbar .pdb-select:focus,
  html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body.public-db-open .public-db-page .pdb-toolbar .pdb-search-input:focus {
    border-color:#365aa8!important;
    box-shadow:0 0 0 3px rgba(54,90,168,.15)!important;
  }
  html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body.public-db-open .public-db-page .pdb-toolbar .pdb-el-tile {
    background:#e9f2f7!important;
    border-color:#a9c4d4!important;
    color:#31577d!important;
  }
  html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body.public-db-open .public-db-page .pdb-toolbar .pdb-el-tile.is-on {
    background:#dceaf5!important;
    border-color:#2f6ba4!important;
    color:#123f70!important;
    box-shadow:inset 0 0 0 1px rgba(47,107,164,.16)!important;
  }
  html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body.public-db-open .public-db-page .pdb-toolbar .pdb-chip-btn {
    background:#eef3fb!important;
    border-color:#b8c6dc!important;
    color:#284e96!important;
  }
  html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body.public-db-open .public-db-page .pdb-toolbar .pdb-chip-btn.is-active {
    background:#dfe9fb!important;
    border-color:#2d55a4!important;
    color:#163b82!important;
  }
  /* Ivory weapon refinement badge: dark-blue fill and white text stay legible over bright art. */
  html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body.public-db-open .public-db-page .slot-weapon-wrap {
    background:linear-gradient(180deg,#ffffff 0%,#e9eef5 100%)!important;
    border-color:#b8c3d2!important;
    box-shadow:0 2px 8px rgba(38,57,89,.18)!important;
  }
  html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body.public-db-open .public-db-page .slot-badge-refine {
    right:3px!important;
    bottom:3px!important;
    min-width:24px;
    padding:2px 5px!important;
    border:1px solid rgba(255,255,255,.92)!important;
    border-radius:4px!important;
    background:#122e8a!important;
    color:#fffdfa!important;
    font-weight:850!important;
    text-shadow:0 1px 1px rgba(0,0,0,.35);
    box-shadow:0 1px 4px rgba(18,46,138,.35)!important;
  }
}

@layer localPalette {
  /* Classic dark public DB: give the category/search header a solid reading surface. */
  html:where([data-config-ui-active])[data-config-theme='classic'] body.public-db-open .public-db-page .pdb-tabs {
    padding: 4px 8px 0;
    border: 1px solid rgba(122, 137, 170, .28)!important;
    border-bottom-color: rgba(151, 166, 201, .42)!important;
    border-radius: 12px 12px 0 0;
    background: linear-gradient(180deg, rgba(14, 19, 32, .985), rgba(18, 23, 37, .965))!important;
    box-shadow: inset 0 1px rgba(255,255,255,.06), 0 8px 18px rgba(0,0,0,.2)!important;
  }
  html:where([data-config-ui-active])[data-config-theme='classic'] body.public-db-open .public-db-page .pdb-tab {
    color: #c3cbe0!important;
    text-shadow: 0 1px 2px rgba(0,0,0,.6);
  }
  html:where([data-config-ui-active])[data-config-theme='classic'] body.public-db-open .public-db-page .pdb-tab:hover {
    color: #f5f7ff!important;
  }
  html:where([data-config-ui-active])[data-config-theme='classic'] body.public-db-open .public-db-page .pdb-tab.is-on {
    color: #ff8fc1!important;
  }
  html:where([data-config-ui-active])[data-config-theme='classic'] body.public-db-open .public-db-page .pdb-searchbar {
    margin: 0!important;
    padding: 10px 12px 12px;
    border: 1px solid rgba(122, 137, 170, .28)!important;
    border-top: 0!important;
    border-radius: 0 0 12px 12px;
    background: rgba(18, 23, 37, .96)!important;
    box-shadow: inset 0 -1px rgba(255,255,255,.04), 0 8px 18px rgba(0,0,0,.18)!important;
  }
  html:where([data-config-ui-active])[data-config-theme='classic'] body.public-db-open .public-db-page .pdb-search-input {
    background: #242a3b!important;
    border-color: #5a6682!important;
    color: #f3f5ff!important;
    box-shadow: inset 0 1px rgba(255,255,255,.06)!important;
  }
  html:where([data-config-ui-active])[data-config-theme='classic'] body.public-db-open .public-db-page .pdb-search-input::placeholder {
    color: #aeb8d0!important;
    opacity: 1;
  }
  html:where([data-config-ui-active])[data-config-theme='classic'] body.public-db-open .public-db-page .pdb-search-input:focus {
    border-color: #ff4f9a!important;
    box-shadow: 0 0 0 3px rgba(255,79,154,.18), inset 0 1px rgba(255,255,255,.08)!important;
  }
}


@layer localPalette {
  /* Public DB filters: put difficulty, performance, sort and share-code search on one row. */
  :where(html[data-config-ui-active]) body.public-db-open .public-db-page .pdb-filter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr))!important;
    gap: var(--ui-space-3)!important;
    align-items: end;
  }
  :where(html[data-config-ui-active]) body.public-db-open .public-db-page .pdb-filter-search {
    min-width: 0;
    margin: 0!important;
    align-self: end;
    display: flex;
    gap: var(--ui-space-2);
    width: 100%;
  }
  :where(html[data-config-ui-active]) body.public-db-open .public-db-page .pdb-filter-search .pdb-search-input {
    min-width: 0;
    flex: 1 1 auto;
    height: 36px;
  }
  :where(html[data-config-ui-active]) body.public-db-open .public-db-page .pdb-filter-search .pdb-search-go,:where(html[data-config-ui-active]) 
  body.public-db-open .public-db-page .pdb-filter-search .pdb-search-clear {
    flex: 0 0 auto;
    height: 36px;
    white-space: nowrap;
  }
}

@media (max-width: 720px) {
  :where(html[data-config-ui-active]) body.public-db-open .public-db-page .pdb-filter-grid {
    grid-template-columns: 1fr!important;
  }
  :where(html[data-config-ui-active]) body.public-db-open .public-db-page .pdb-filter-search {
    width: 100%;
  }
}

@layer localPalette {
  /* Public DB tag alignment: video provenance uses the same outline geometry as the entry tag. */
  html:where([data-config-ui-active])[data-config-theme] body.public-db-open .public-db-page .card-tags.team-tags .pdb-video-badge {
    height: 28px!important;
    min-height: 28px!important;
    padding: 0 12px!important;
    border-radius: 6px!important;
    box-sizing: border-box!important;
    font-size: var(--ui-type-small)!important;
    font-weight: 600!important;
    letter-spacing: .5px!important;
    line-height: 1!important;
  }
}



@layer localPalette {
  /* Type damage rows keep the parent category and child damage type on one line. */
  html:where([data-config-ui-active])[data-config-theme] body .setup-member-col .echo-sub-row.has-type .echo-row-fields {
    display: flex!important;
    flex-wrap: nowrap!important;
    min-width: 0!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body .setup-member-col .echo-sub-row.has-type .echo-row-fields > .echo-sub-stat,
  html:where([data-config-ui-active])[data-config-theme] body .setup-member-col .echo-sub-row.has-type .echo-row-fields > .echo-sub-type-only {
    flex: 1 1 0!important;
    width: 0!important;
    min-width: 0!important;
    max-width: none!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body .setup-member-col .echo-sub-row.has-type .echo-row-fields > .echo-sub-stat-type-parent,
  html:where([data-config-ui-active])[data-config-theme] body .echo-slot-card .echo-sub-row.has-type > .echo-sub-stat-type-parent {
    display: none!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body .setup-member-col .echo-sub-row.has-type .echo-row-fields > .echo-sub-value {
    flex: 0 0 4.6rem!important;
    width: 4.6rem!important;
    min-width: 0!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body .echo-slot-card .echo-sub-row.has-type {
    grid-template-columns: 4.5rem minmax(0, 1fr) 4.5rem auto!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body .echo-slot-card .echo-sub-row.has-type > .echo-field-select {
    width: auto!important;
    min-width: 0!important;
  }
}

@layer localPalette {
  html:where([data-config-ui-active])[data-config-theme] body .overview-page .overview-echo-card .overview-affix-picker {
    display: flex!important;
    align-items: center!important;
    justify-content: space-between!important;
    gap: 5px!important;
    height: 34px!important;
    min-width: 0!important;
    padding: 0 8px!important;
    border: 1px solid #7395ac40!important;
    border-radius: 6px!important;
    background: #101c28!important;
    color: #e9ece7!important;
    font: 500 13px "Microsoft YaHei UI", "Microsoft YaHei", sans-serif!important;
    text-align: left!important;
    white-space: nowrap!important;
    cursor: pointer!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body .overview-page .overview-echo-card .overview-affix-picker::after {
    content: "⌄";
    flex: none;
    color: #adcce6;
  }
  html:where([data-config-ui-active])[data-config-theme] body .overview-page .overview-echo-card .overview-affix-picker:disabled {
    opacity: .5;
    cursor: default!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body .overview-affix-menu {
    position: fixed;
    z-index: 11000;
    width: max-content;
    min-width: 150px;
    max-height: min(70vh, 430px);
    overflow: visible;
    padding: 4px;
    border: 1px solid #8aa8bd77;
    border-radius: 8px;
    background: #1b2736;
    box-shadow: 0 14px 32px #0009;
  }
  html:where([data-config-ui-active])[data-config-theme] body .overview-affix-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 32px!important;
    padding: 7px 10px!important;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #eef4f8;
    font: 500 13px "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
  }
  html:where([data-config-ui-active])[data-config-theme] body .overview-affix-menu-item:hover,
  html:where([data-config-ui-active])[data-config-theme] body .overview-affix-menu-item:focus-visible {
    background: #36516b;
  }
  html:where([data-config-ui-active])[data-config-theme] body .overview-affix-menu-item.has-submenu::after {
    content: "›";
    margin-left: 14px;
  }
  html:where([data-config-ui-active])[data-config-theme] body .overview-affix-submenu {
    display: none;
    position: absolute;
    min-width: 150px;
    padding: 4px;
    border: 1px solid #8aa8bd77;
    border-radius: 8px;
    background: #1b2736;
    box-shadow: 0 14px 32px #0009;
  }
  html:where([data-config-ui-active])[data-config-theme] body .overview-affix-menu.show-types .overview-affix-submenu {
    display: block;
  }
  html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body .overview-page .overview-echo-card .overview-affix-picker {
    background: #f7fbff!important;
    border-color: #b7c9dc!important;
    color: #294661!important;
  }
  html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body .overview-affix-menu,
  html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body .overview-affix-submenu {
    background: #f7fbff;
    border-color: #b7c9dc;
    box-shadow: 0 14px 32px #1e426036;
  }
  html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body .overview-affix-menu-item { color: #294661; }
  html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body .overview-affix-menu-item:hover,
  html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body .overview-affix-menu-item:focus-visible { background: #dcecf8; }
}

@layer localPalette {
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-calc .local-calc-tabs {
    grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
    gap: 10px!important;
    width: calc(100% - 12px);
    margin-left: 12px!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-calc .local-calc-tabs button {
    isolation: isolate;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-calc .local-step-number {
    z-index: 3!important;
    border-width: 2px!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-calc .local-step-label {
    z-index: 1!important;
    min-height: 50px;
    margin-left: -20px!important;
    padding-left: 30px!important;
    border-radius: 8px!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-calc .local-step-label::before {
    display: none!important;
  }
  html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-calc .local-step-arrow {
    display: grid!important;
    place-items: center;
    width: 42px;
    font: 800 36px/1 Arial, sans-serif!important;
    color: #ffb5cf!important;
    text-shadow: 0 0 12px #e995b980, 0 1px 1px #000;
  }
  html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body #workspaceLayout.phase-calc .local-step-arrow {
    color: #174c81!important;
    text-shadow: 0 1px 0 #fff, 0 0 8px #508cc050;
  }
  @media (max-width: 650px) {
    html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-calc .local-calc-tabs {
      grid-template-columns: minmax(0, 1fr) 26px minmax(0, 1fr);
      gap: 4px!important;
      width: 100%;
      margin-left: 0!important;
    }
    html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-calc .local-step-label {
      margin-left: -12px!important;
      padding-left: 16px!important;
    }
    html:where([data-config-ui-active])[data-config-theme] body #workspaceLayout.phase-calc .local-step-arrow {
      width: 26px;
      font-size: 24px!important;
    }
  }
}

@layer localPalette {
  html:where([data-config-ui-active])[data-config-theme] body .overview-page .local-overview-tabs .overview-jelly .jelly-radio__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
  }
  html:where([data-config-ui-active])[data-config-theme] body .overview-page .local-overview-tabs .overview-jelly .jelly-radio__label::before {
    display: grid;
    place-items: center;
    flex: none;
    width: 24px;
    height: 24px;
    box-sizing: border-box;
    border: 1px solid #efabc966;
    border-radius: 50%;
    background: #171c2a;
    color: #f5a9c4;
    font: 700 14px/1 ui-monospace, monospace;
  }
  html:where([data-config-ui-active])[data-config-theme] body .overview-page .local-overview-tabs .overview-jelly .jelly-radio__chip:nth-child(1) .jelly-radio__label::before { content: '1'; }
  html:where([data-config-ui-active])[data-config-theme] body .overview-page .local-overview-tabs .overview-jelly .jelly-radio__chip:nth-child(2) .jelly-radio__label::before { content: '2'; }
  html:where([data-config-ui-active])[data-config-theme] body .overview-page .local-overview-tabs .overview-jelly .jelly-radio__chip:nth-child(3) .jelly-radio__label::before { content: '3'; }
  html:where([data-config-ui-active])[data-config-theme] body .overview-page .local-overview-tabs .overview-jelly .jelly-radio__chip[data-on='true'] .jelly-radio__label::before {
    background: #522438;
    border-color: #522438;
    color: #fff2f6;
  }
  html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body .overview-page .local-overview-tabs .overview-jelly .jelly-radio__label::before {
    background: #e8f0fa;
    border-color: #8caacb;
    color: #1c4f84;
  }
  html:where([data-config-ui-active])[data-config-theme='ivory-prism'] body .overview-page .local-overview-tabs .overview-jelly .jelly-radio__chip[data-on='true'] .jelly-radio__label::before {
    background: #123c78;
    border-color: #123c78;
    color: #fff;
  }
}


html[data-config-ui-active] #themeSwitcher{display:none!important}html:not([data-config-ui-active]) #configThemeSwitcher,html:not([data-config-ui-active]) #local-aero-background{display:none!important}
html[data-config-ui-active] #configThemeSwitcher{display:flex;align-items:center;gap:8px;background:var(--ui-panel)}
