/* === SOURCE: css/263-v5639-facility-selector-polish.css === */

/* Keep selector tiles visually stable during repeated clicks/rerenders. */
body.facility-drawer-open .facility-picker-tile{
  overflow:hidden!important;
  scroll-margin:0!important;
}

/* Restore the Lv3 reward preview on every facility tile.
   It stays smaller than the facility logo and deliberately low-saturation. */
body.facility-drawer-open .facility-picker-reward{
  display:grid!important;
  place-items:center!important;
  position:absolute!important;
  right:8px!important;
  bottom:7px!important;
  width:24px!important;
  height:24px!important;
  margin:0!important;
  pointer-events:none!important;
  opacity:.76!important;
  filter:saturate(.58) brightness(.93)!important;
}
body.facility-drawer-open .facility-picker-reward .facility-ps-badge{
  transform:scale(.58)!important;
  transform-origin:center!important;
  margin:0!important;
  flex:0 0 auto!important;
}
body.facility-drawer-open .facility-picker-reward .facility-ps-badge.plus{
  transform:scale(.54)!important;
}
body.facility-drawer-open .facility-picker-tile .facility-picker-current,
body.facility-drawer-open .facility-picker-tile .facility-picker-hint{
  margin-right:28px!important;
}
body.facility-drawer-open .facility-picker-tile:hover .facility-picker-reward{
  opacity:.88!important;
  filter:saturate(.66) brightness(.98)!important;
}

/* Prevent browser focus scrolling from visually nudging the document while the modal is open. */
body.facility-drawer-open .facility-picker-tile:focus,
body.facility-drawer-open .facility-level-card:focus{
  scroll-margin:0!important;
}

/* === SOURCE: css/264-v5640-facility-tile-lv3-badge-fix.css === */

/* The old selector stylesheet intentionally hid reward previews with a more-specific
   !important rule. Override that exact selector so ONLY the 34 left-side facility
   tiles show their Lv3 PlayStyle / PlayStyle+ reward. */
body.facility-drawer-open .facility-selector-grid .facility-picker-tile .facility-picker-reward{
  display:grid!important;
  place-items:center!important;
  position:absolute!important;
  right:10px!important;
  bottom:9px!important;
  width:25px!important;
  height:25px!important;
  margin:0!important;
  padding:0!important;
  pointer-events:none!important;
  opacity:.72!important;
  filter:saturate(.55) brightness(.92)!important;
  z-index:4!important;
}

/* Keep it clearly smaller than the facility logo. */
body.facility-drawer-open .facility-selector-grid .facility-picker-tile .facility-picker-reward .facility-ps-badge{
  transform:scale(.57)!important;
  transform-origin:center!important;
  margin:0!important;
  flex:0 0 auto!important;
}
body.facility-drawer-open .facility-selector-grid .facility-picker-tile .facility-picker-reward .facility-ps-badge.plus{
  transform:scale(.53)!important;
}

/* Give the bottom status text enough breathing room. */
body.facility-drawer-open .facility-selector-grid .facility-picker-tile .facility-picker-current,
body.facility-drawer-open .facility-selector-grid .facility-picker-tile .facility-picker-hint{
  margin-right:31px!important;
}

/* Very restrained hover lift only. */
body.facility-drawer-open .facility-selector-grid .facility-picker-tile:hover .facility-picker-reward{
  opacity:.82!important;
  filter:saturate(.62) brightness(.96)!important;
}

/* === SOURCE: css/265-v5641-facility-scroll-badge-inset.css === */

/* Move the Lv3 reward further inside each facility tile so the diamond plate
   never touches/crops against the rounded card edge. */
body.facility-drawer-open .facility-selector-grid .facility-picker-tile .facility-picker-reward{
  right:16px!important;
  bottom:14px!important;
}

/* === SOURCE: css/266-v5642-facility-reward-inset.css === */

/* The Lv3 reward belongs inside each LEFT facility card.
   Pull it further inward from both the rounded right edge and bottom edge. */
body.facility-drawer-open .facility-selector-grid .facility-picker-tile .facility-picker-reward{
  right:22px!important;
  bottom:18px!important;
  width:28px!important;
  height:28px!important;
}

/* Center the visual badge inside a slightly larger safe box so its diamond / plus
   plate never touches the tile clipping boundary. */
body.facility-drawer-open .facility-selector-grid .facility-picker-tile .facility-picker-reward .facility-ps-badge{
  position:relative!important;
  left:auto!important;
  right:auto!important;
  top:auto!important;
  bottom:auto!important;
  margin:0!important;
  transform:scale(.57)!important;
  transform-origin:center center!important;
}
body.facility-drawer-open .facility-selector-grid .facility-picker-tile .facility-picker-reward .facility-ps-badge.plus{
  transform:scale(.53)!important;
}

/* Do not reserve excessive horizontal space in the tile copy; the reward sits in
   the visual lower-right corner only. */
body.facility-drawer-open .facility-selector-grid .facility-picker-tile .facility-picker-current,
body.facility-drawer-open .facility-selector-grid .facility-picker-tile .facility-picker-hint{
  margin-right:34px!important;
}

/* === SOURCE: css/267-v5643-facility-badge-apclear-fix.css === */

/* The facility cards had overflow:hidden from the older selector layout.
   That clips the far corner of the rotated PlayStyle diamond even when the badge
   is already visually inset from the rounded card border. The card itself does
   not need clipping, so let the small reward plate render fully. */
body.facility-drawer-open .facility-selector-grid .facility-picker-tile{
  overflow:visible!important;
}
body.facility-drawer-open .facility-selector-grid .facility-picker-reward,
body.facility-drawer-open .facility-selector-grid .facility-picker-reward .facility-ps-badge{
  overflow:visible!important;
}

/* AP calculator: center the single-attribute remove × optically and geometrically.
   Hide the text-node glyph and draw a dedicated centered glyph so font baselines
   cannot pull it upward/downward. */
#diyPanel .diy-attr-clear{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:0!important;
  margin:0!important;
  font-size:0!important;
  line-height:1!important;
  text-align:center!important;
}
#diyPanel .diy-attr-clear::before{
  content:"×";
  display:block;
  font-family:Arial,"Microsoft YaHei",sans-serif;
  font-size:13px;
  font-weight:600;
  line-height:1;
  width:13px;
  height:13px;
  text-align:center;
  transform:translateY(-.25px);
}

/* === SOURCE: css/268-v570-build-library-style.css === */

#mb24Library{
  position:relative!important;
  z-index:120!important;
  isolation:isolate!important;
  pointer-events:auto!important;
  overflow:hidden!important;
}
#mb24Library::before,#mb24Library::after{pointer-events:none!important;z-index:0!important}
#mb24Library .mb24-library-head{position:relative!important;z-index:2!important;padding-bottom:10px!important}
#mb24Library .mb24-library-tabs{display:none!important}
#mb24Library .mb24-library-count{
  width:auto!important;min-width:52px!important;padding:0 10px!important;
  white-space:nowrap!important;font-variant-numeric:tabular-nums!important;
}
#mb24Library .mb24-library-empty{
  position:relative!important;z-index:2!important;
  display:block!important;width:100%!important;height:auto!important;min-height:0!important;
  padding:0!important;margin:0!important;border:0!important;background:transparent!important;
  text-align:left!important;overflow:visible!important;
}
#mb24Library .mb70-toolbar{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  margin:7px 0 10px;padding:0 1px;
}
#mb24Library .mb70-sort-group{display:flex;align-items:center;gap:6px;min-width:0}
#mb24Library .mb70-sort-label{color:#59636d;font-size:8px;font-weight:760;margin-right:2px}
#mb24Library .mb70-sort{
  height:24px;padding:0 8px;border:1px solid rgba(255,255,255,.065);border-radius:8px;
  background:rgba(255,255,255,.018);color:#68737e;font:760 8px/1 inherit;cursor:pointer;
}
#mb24Library .mb70-sort:hover{color:#aeb6bd;border-color:rgba(255,255,255,.12)}
#mb24Library .mb70-sort.active{
  color:#c4a95e;border-color:rgba(209,177,95,.18);background:rgba(209,177,95,.055)
}
#mb24Library .mb70-cap{color:#4f5963;font-size:8px;font-weight:720;white-space:nowrap}
#mb24Library .mb70-list{
  display:flex;flex-direction:column;gap:9px;width:100%;max-height:476px;
  overflow-y:auto;overflow-x:hidden;padding:0 3px 3px 0;box-sizing:border-box;scrollbar-width:thin;
}
#mb24Library .mb70-row{
  position:relative;display:grid;grid-template-columns:minmax(0,1fr) 28px;gap:5px;width:100%;
}
#mb24Library .mb70-card{
  display:block;width:100%;min-width:0;box-sizing:border-box;
  border:1px solid rgba(255,255,255,.075);border-radius:13px;
  background:linear-gradient(145deg,rgba(255,255,255,.035),rgba(255,255,255,.012));
  padding:11px 12px 10px;text-align:left;color:inherit;cursor:pointer;pointer-events:auto;
  transition:border-color .15s ease,background .15s ease,transform .15s ease,box-shadow .15s ease;
}
#mb24Library .mb70-card:hover{
  border-color:rgba(209,177,95,.30);
  background:linear-gradient(145deg,rgba(209,177,95,.082),rgba(255,255,255,.018));
  box-shadow:inset 0 0 0 1px rgba(209,177,95,.035);
  transform:translateY(-1px);
}
#mb24Library .mb70-card:active{transform:translateY(0)}
#mb24Library .mb70-title{
  display:block;color:#e5e9ed;font-size:11.5px;font-weight:820;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
#mb24Library .mb70-date{float:right;color:#525c66;font-size:7.5px;font-weight:650;margin-left:8px}
#mb24Library .mb70-meta{
  display:block;margin-top:4px;color:#77828d;font-size:8.8px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
#mb24Library .mb70-tags{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}
#mb24Library .mb70-tag{
  height:18px;display:inline-flex;align-items:center;padding:0 6px;border-radius:999px;
  border:1px solid rgba(255,255,255,.065);background:rgba(255,255,255,.018);
  color:#65707a;font-size:7.5px;font-weight:760;
}
#mb24Library .mb70-tag.on{
  color:#bba25d;border-color:rgba(209,177,95,.15);background:rgba(209,177,95,.045)
}
#mb24Library .mb70-more{
  align-self:stretch;border:1px solid rgba(255,255,255,.055);border-radius:10px;
  background:rgba(255,255,255,.015);color:#65707a;cursor:pointer;display:grid;place-items:center;
  font-size:15px;padding:0;pointer-events:auto;
}
#mb24Library .mb70-more:hover{
  color:#c4a95e;border-color:rgba(209,177,95,.18);background:rgba(209,177,95,.045)
}
#mb24Library .mb70-empty{
  min-height:325px;display:grid;place-items:center;text-align:center;
  color:#59636d;border:1px dashed rgba(255,255,255,.04);border-radius:13px;
}
#mb24Library .mb70-empty strong{display:block;color:#707b85;font-size:10px}
#mb24Library .mb70-empty span{display:block;margin-top:6px;color:#4e5861;font-size:8px}

.mb70-menu{
  position:fixed;z-index:51000;min-width:120px;padding:5px;border:1px solid rgba(255,255,255,.09);
  border-radius:10px;background:rgba(11,16,22,.985);box-shadow:0 14px 42px rgba(0,0,0,.42);
}
.mb70-menu[hidden]{display:none!important}
.mb70-menu button{
  display:block;width:100%;height:30px;border:0;border-radius:7px;background:transparent;
  color:#929ca5;text-align:left;padding:0 9px;font:730 9px/1 inherit;cursor:pointer;
}
.mb70-menu button:hover{background:rgba(255,255,255,.045);color:#e1e5e8}
.mb70-menu button.danger{color:#b67c74}
.mb70-menu button.danger:hover{background:rgba(179,92,80,.08);color:#d79990}

.mb70-overlay{
  position:fixed;inset:0;z-index:50000;background:rgba(2,5,8,.78);
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  display:flex;align-items:center;justify-content:center;padding:24px;
}
.mb70-overlay[hidden]{display:none!important}
.mb70-overlay.preview{align-items:flex-start;overflow:auto;padding-top:28px;padding-bottom:28px}
.mb70-preview{
  width:min(1180px,calc(100vw - 34px));
  border:1px solid rgba(255,255,255,.09);border-radius:20px;
  background:rgba(8,12,17,.985);box-shadow:0 38px 110px rgba(0,0,0,.60);overflow:hidden;
}
.mb70-preview-head,.mb70-preview-foot{
  display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 15px;
}
.mb70-preview-head{border-bottom:1px solid rgba(255,255,255,.06)}
.mb70-preview-foot{border-top:1px solid rgba(255,255,255,.06)}
.mb70-preview-head strong{display:block;color:#e2e6e9;font-size:12px}
.mb70-preview-head span{display:block;margin-top:3px;color:#66717b;font-size:8px}
.mb70-preview-stage{padding:16px;background:linear-gradient(180deg,rgba(255,255,255,.014),transparent)}
.mb70-preview-stage .mb70-preview-card{pointer-events:none}
.mb70-preview-stage #myBuildShowcaseV2{
  width:100%!important;height:584px!important;min-height:584px!important;margin:0!important;
}
.mb70-preview-stage #myBuildShowcaseV2 .mb29-tools,
.mb70-preview-stage #myBuildShowcaseV2 .mb29-togglebar,
.mb70-preview-stage #myBuildShowcaseV2 .mb29-edit,
.mb70-preview-stage #myBuildShowcaseV2 .mb29-picker-menu,
.mb70-preview-stage #myBuildShowcaseV2 .mb29-picker-caret{display:none!important}
.mb70-scope-row{display:flex;flex-wrap:wrap;gap:6px}
.mb70-scope{
  height:20px;display:inline-flex;align-items:center;padding:0 7px;border-radius:999px;
  border:1px solid rgba(209,177,95,.15);background:rgba(209,177,95,.045);
  color:#bda55f;font-size:8px;font-weight:760;
}
.mb70-x{
  width:30px;height:30px;border:1px solid rgba(255,255,255,.07);border-radius:10px;
  background:rgba(255,255,255,.025);color:#7d8791;display:grid;place-items:center;cursor:pointer;font-size:17px;
}
.mb70-x:hover{color:#e4e7ea;border-color:rgba(255,255,255,.14)}
.mb70-modal{
  width:min(520px,calc(100vw - 32px));border:1px solid rgba(255,255,255,.10);border-radius:18px;
  background:linear-gradient(155deg,rgba(20,27,35,.995),rgba(8,12,17,.995));
  box-shadow:0 34px 100px rgba(0,0,0,.58);overflow:hidden;color:#dfe4e9;
}
.mb70-modal-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:14px;
  padding:18px 19px 14px;border-bottom:1px solid rgba(255,255,255,.065);
}
.mb70-modal-head small{
  display:block;color:#89794d;font-size:8px;font-weight:820;letter-spacing:.16em;margin-bottom:5px;
}
.mb70-modal-head h3{margin:0;color:#eff1f3;font-size:18px;line-height:1.1}
.mb70-modal-body{padding:17px 19px 18px}
.mb70-modal-foot{
  display:flex;justify-content:flex-end;gap:8px;padding:13px 19px 17px;
  border-top:1px solid rgba(255,255,255,.055);
}
.mb70-btn{
  height:34px;padding:0 14px;border-radius:10px;border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.025);color:#aeb7bf;font:760 10px/1 inherit;cursor:pointer;
}
.mb70-btn:hover{border-color:rgba(255,255,255,.15);color:#e3e7ea}
.mb70-btn.primary{
  border-color:rgba(209,177,95,.23);background:rgba(209,177,95,.10);color:#d9bf75;
}
.mb70-btn.danger{
  border-color:rgba(190,91,78,.20);background:rgba(190,91,78,.055);color:#c98d83;
}
.mb70-input{
  width:100%;height:38px;border:1px solid rgba(255,255,255,.09);border-radius:11px;
  background:rgba(4,8,12,.42);color:#eceff1;padding:0 11px;outline:none;
  font:760 12px/1 inherit;box-sizing:border-box;
}
.mb70-input:focus{border-color:rgba(209,177,95,.32)}
.mb70-field-label{display:block;margin-bottom:7px;color:#727d88;font-size:9px;font-weight:740}
.mb70-section-title{margin:16px 0 8px;color:#8c969f;font-size:9px;font-weight:780}
.mb70-checks{display:grid;gap:6px}
.mb70-check{
  min-height:40px;padding:0 11px;border:1px solid rgba(255,255,255,.065);border-radius:11px;
  background:rgba(255,255,255,.018);display:flex;align-items:center;justify-content:space-between;gap:12px;
}
.mb70-check strong{font-size:10.5px;color:#cfd5da}
.mb70-check small{font-size:8px;color:#69747e;margin-left:6px}
.mb70-check input{accent-color:#b99a4a;width:14px;height:14px}
.mb70-check.locked{opacity:.75}
.mb70-copy{color:#aab2b9;font-size:10.5px;line-height:1.72}
.mb70-copy strong{color:#d9be72}
.mb70-summary{
  margin-top:12px;padding:10px 11px;border:1px solid rgba(255,255,255,.065);border-radius:11px;
  background:rgba(255,255,255,.018);color:#7d8892;font-size:9px;line-height:1.65;
}
.mb70-toast{
  position:fixed;right:24px;bottom:24px;z-index:52000;min-width:180px;max-width:360px;
  padding:11px 14px;border:1px solid rgba(209,177,95,.18);border-radius:12px;
  background:rgba(12,18,24,.96);box-shadow:0 16px 44px rgba(0,0,0,.35);
  color:#d5bd78;font-size:10px;font-weight:760;opacity:0;transform:translateY(8px);
  transition:.18s ease;pointer-events:none;
}
.mb70-toast.show{opacity:1;transform:translateY(0)}
