/* Independent Set Planner V4 liquid-glass UI pass, Nov 3.
   Presentation only. The equipped state, renderer, sprite atlas, controls and
   set-code serializer remain owned by their existing modules. */
:root { --v4-ui-stroke:rgba(163,216,255,.26); --v4-ui-shine:rgba(215,246,255,.12); }
html,body{width:100%;overflow:hidden!important}
.top{display:none!important}
footer{display:none!important}
main,html.v4-embedded main {
  box-sizing:border-box; width:100%!important;max-width:none!important;
  margin:0!important;padding:7px 10px 9px!important;gap:9px!important;
  min-height:0!important;height:100dvh!important;max-height:100dvh!important;
  grid-template-rows:47px minmax(0,1fr)!important;
  overflow:hidden!important;
}
main>#v4-planner-chrome {
  grid-column:1/-1;grid-row:1;min-width:0;min-height:0;
  display:flex;align-items:center;gap:9px;padding:4px 10px;
  border:1px solid rgba(147,210,255,.19);border-radius:14px;
  background:linear-gradient(145deg,rgba(69,121,173,.22),rgba(11,30,54,.68));
  box-shadow:inset 0 1px 0 rgba(223,250,255,.12),0 4px 15px #030b1d40;
}
.v4-chrome-brand{display:flex;gap:9px;align-items:center;min-width:0;white-space:nowrap}
.v4-chrome-mark{
  display:grid;place-items:center;flex:0 0 29px;width:29px;height:29px;
  font-weight:850;color:#c7f6ff;font-size:13px;letter-spacing:-.08em;
  border-radius:9px;border:1px solid rgba(185,240,255,.5);
  background:radial-gradient(circle at 30% 10%,#62cced64,#164c7899 75%);
  box-shadow:inset 0 1px 0 #fff5;
}
.v4-chrome-brand strong{font-size:13px;letter-spacing:-.02em}
.v4-chrome-brand small{display:block;font-size:10px;color:#a6c5da;font-weight:500}
.v4-chrome-spacer{flex:1;min-width:5px}
#v4-ui-global-search{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  width:min(280px,30vw);height:33px;padding:0 13px;
  border:1px solid rgba(150,209,249,.28);border-radius:11px;
  background:linear-gradient(160deg,rgba(40,79,124,.43),rgba(9,28,50,.8));
  color:#dcefff;font-size:11px;font-weight:720;
}
#v4-ui-global-search:hover,#v4-ui-settings:hover{
  border-color:#a6e5ff;background:rgba(55,128,183,.32);
}
#v4-ui-settings,#v4-ui-home{
  display:grid;place-items:center;flex:0 0 33px;width:33px;height:33px;
  padding:0;border:1px solid rgba(150,209,249,.3);border-radius:11px;
  background:linear-gradient(160deg,rgba(50,96,145,.3),rgba(9,28,50,.8));
  color:#dcefff;font-size:17px;text-decoration:none;
}
#v4-ui-home:hover{text-decoration:none}
main>#v4-library,main>#v4-character,main>#v4-appearance{
  grid-row:2!important;height:100%!important;min-height:0!important;margin:0!important;
}
main>.panel,main>.side>.panel{
  border-color:rgba(149,207,249,.2);
  box-shadow:inset 0 1px 0 rgba(228,251,255,.13),0 6px 22px #030b1d5c;
}
#v4-character .scenetop,#v4-library .panelheader,#v4-appearance .panelheader{
  background:linear-gradient(180deg,rgba(140,205,255,.09),transparent);
}

/* Always use the supplied four actual icon images. Native order: AZ, ZA,
   oldest release first, newest release first; each source tile is 36x20. */
#v4-library .v4-sort-toolbar{gap:6px!important;min-height:39px!important;padding:4px 10px 5px!important}
#v4-library .v4-sort-toolbar button{
  width:41px!important;min-width:41px!important;height:34px!important;
  position:relative!important;padding:3px!important;
  overflow:hidden!important;font-size:0!important;line-height:0!important;
  border:1px solid rgba(162,215,255,.3);border-radius:9px;
  background:linear-gradient(145deg,rgba(72,126,180,.25),rgba(23,61,99,.22));
}
#v4-library .v4-sort-toolbar button::before,
#v4-library.v4-native-sort-ready .v4-sort-toolbar button::before{
  content:""!important;display:block!important;position:absolute!important;
  width:36px!important;height:20px!important;left:50%!important;top:50%!important;
  margin:0!important;transform:translate(-50%,-50%)!important;
  background-image:url('/lab/v4-sort-icons-20261102.png?v=20261103')!important;
  background-repeat:no-repeat!important;background-size:144px 20px!important;
  background-position-y:0!important;image-rendering:pixelated;
  pointer-events:none;
}
#v4-library .v4-sort-toolbar button[data-v4-sort="name-asc"]::before{background-position-x:0!important}
#v4-library .v4-sort-toolbar button[data-v4-sort="name-desc"]::before{background-position-x:-36px!important}
#v4-library .v4-sort-toolbar button[data-v4-sort="id-asc"]::before{background-position-x:-72px!important}
#v4-library .v4-sort-toolbar button[data-v4-sort="id-desc"]::before{background-position-x:-108px!important}
#v4-library .v4-sort-toolbar button[aria-pressed=true]{border-color:#8be3ff;box-shadow:inset 0 0 0 1px #6ed5ff5c,0 0 12px #46a5ee27}

/* Selected event name + matching native artwork, including the item-type icons. */
#v4-library .v4-v2-searchrow{gap:7px!important;align-items:center!important}
#v4-library .v4-v2-searchrow:has(>.v4-clear-filters:not([hidden])){
  grid-template-columns:minmax(0,1fr) minmax(112px,44%) 35px!important
}
#v4-library .v4-v2-searchrow:not(:has(>.v4-clear-filters:not([hidden]))){
  grid-template-columns:minmax(0,1fr) minmax(112px,43%)!important
}
#v4-library #v4-v2-filters{
  display:flex!important;align-items:center!important;justify-content:center;
  gap:6px!important;min-width:0!important;max-width:none!important;
  padding:5px 9px!important;height:39px!important;
}
#v4-library #v4-v2-filters .v4-filters-selected{
  display:block!important;flex:0 1 auto;max-width:none!important;
  min-width:0!important;overflow:hidden;text-overflow:ellipsis;
  color:#f2faff!important;font-size:11px!important;font-weight:760!important;
  white-space:nowrap!important
}
#v4-library #v4-v2-filters:not([data-v4-selected="true"]) .v4-filters-selected{display:none!important}
#v4-library #v4-v2-filters .v4-active-native-icon,
#v4-library #v4-v2-filters .v4-active-filter-icon,
#v4-library #v4-v2-filters .v4-active-type-icon{
  display:block;flex:0 0 26px!important;width:26px!important;height:26px!important;
  max-width:26px!important;max-height:26px!important;image-rendering:pixelated;
  object-fit:contain!important;background-repeat:no-repeat;
}
#v4-library #v4-v2-filters .v4-active-native-icon{background-size:608px 32px;transform:scale(.81);transform-origin:center}
#v4-library #v4-v2-filters .v4-active-native-icon[hidden],
#v4-library #v4-v2-filters .v4-active-filter-icon[hidden],
#v4-library #v4-v2-filters .v4-active-type-icon[hidden]{display:none!important}
#v4-library .v4-v2-searchrow>.v4-clear-filters{
  display:grid!important;place-items:center!important;
  flex:0 0 35px!important;width:35px!important;min-width:35px!important;
  height:39px!important;min-height:39px!important;max-height:39px!important;
  align-self:center!important;padding:0!important;margin:0!important;
  border-radius:11px!important;border:1px solid rgba(244,169,181,.35)!important;
  color:#ffe0e5!important;background:linear-gradient(155deg,#91445155,#40253688)!important;
  background-image:none!important;background-size:0!important;
  font:650 22px/1 Inter,system-ui,sans-serif!important;text-align:center!important;
  text-shadow:none!important;overflow:hidden!important;
}
#v4-library .v4-v2-searchrow>.v4-clear-filters:hover{border-color:#ffacb9!important;background:#883f55a1!important}
#v4-library .v4-v2-searchrow>.v4-clear-filters[hidden]{display:none!important}

/* The tile appearance never changes when a favorite is toggled. Only a
   20px upper-right overlaid gold star is shown for the saved item. */
#v4-library #results button.item,
#v4-library #v4-v2-favorites-grid button.item{isolation:isolate}
#v4-library .item .v4-v2-favorite-star{
  position:absolute!important;right:3px!important;top:3px!important;
  inset:auto 3px auto auto!important;width:20px!important;height:20px!important;
  min-width:20px!important;min-height:20px!important;
  padding:0!important;border:0!important;border-radius:0!important;
  background:transparent!important;box-shadow:none!important;
  opacity:1!important;pointer-events:none!important;
}
#v4-library .item .v4-v2-favorite-star[hidden]{display:none!important}
#v4-library .item .v4-v2-favorite-star[data-selected=true]{color:#ffd85a!important}

/* Preview actions: one balanced toolbar, with clear group hierarchy. */
#v4-character .v4-v2-action-row{
  width:100%;display:flex;justify-content:center!important;align-items:center!important;
  flex-wrap:wrap;gap:7px!important;padding:9px 7px!important;margin:2px auto 4px;
  border:1px solid rgba(170,223,255,.14);border-radius:13px;
  background:linear-gradient(145deg,rgba(88,144,198,.12),rgba(9,26,49,.42));
}
#v4-character .v4-v2-action-row .v4-v2-core-actions{
  display:flex;align-items:center;justify-content:center!important;gap:7px;
  flex:0 0 auto!important;margin:0!important;
}
#v4-character .v4-v2-action-row .v4-v2-menu{flex:0 0 auto!important}
#v4-character .v4-v2-action-row button.control,
#v4-character .v4-v2-action-row summary{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  min-height:35px!important;padding:7px 12px!important;
  font-size:11px;font-weight:730;line-height:1.2;
  border-radius:10px!important;
  border:1px solid rgba(162,213,247,.3)!important;
  background:linear-gradient(155deg,rgba(72,135,184,.3),rgba(22,55,94,.22));
  box-shadow:inset 0 1px 0 rgba(229,249,255,.1);
}
#v4-character .v4-v2-action-row #pause,
#v4-character .v4-v2-action-row #v4-v2-fx{
  width:35px!important;min-width:35px!important;max-width:35px!important;
  padding:5px!important;font-size:16px!important;
}
#v4-character .v4-v2-action-row #clear{
  border-color:rgba(240,176,183,.34)!important;
  background:linear-gradient(155deg,rgba(131,67,92,.24),rgba(49,35,59,.26));
}
#v4-character .v4-v2-action-row .v4-v2-more-tools{margin:0!important}
#v4-character .v4-v2-action-row button:hover,
#v4-character .v4-v2-action-row summary:hover{border-color:#b1e9ff!important;background:rgba(64,139,195,.34)}
#v4-character .v4-toolbar-grid .v4-toolbar-block.v4-aim-controls{
  display:none!important;
}
/* The movement buttons remain usable; only the unnecessary nine-way
   punch selector is hidden. Direct pointer aiming still works in preview. */
#v4-character .v4-toolbar-grid{gap:4px!important}
#v4-character .v4-toolbar-grid .v4-toolbar-block:nth-child(1){justify-content:center!important}
#v4-character .v4-toolbar-grid .bar{justify-content:center!important}

/* Equipped outfit as small readable, clickable removable glass chips. */
#v4-character .v4-wearing-group>#v4-equipped{
  padding:10px 12px 12px!important;min-height:58px;
  border:1px solid rgba(144,212,255,.25)!important;
  border-radius:13px!important;
  background:linear-gradient(130deg,rgba(62,106,157,.17),rgba(12,29,51,.44));
}
#v4-character #v4-equipped .panelheader{
  display:flex;align-items:center;justify-content:space-between;
  padding:0 1px 8px!important;margin:0!important;background:none!important;
  border:0!important;
}
#v4-character #v4-equipped .panelheader h2{
  font-size:12px!important;font-weight:750;letter-spacing:0;text-transform:none;
  color:#dcefff;
}
#v4-character #v4-equipped .panelheader .small{display:inline!important;font-size:10px;color:#9fbfd4}
#v4-character #v4-equipped .slots{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(125px,1fr))!important;
  gap:6px!important;padding:0!important;
}
#v4-character #v4-equipped .slot-item.v4-equipped-item{
  min-height:49px!important;padding:6px 7px!important;gap:7px!important;
  border:1px solid rgba(136,207,247,.23)!important;border-radius:11px!important;
  background:linear-gradient(135deg,rgba(87,154,213,.19),rgba(26,62,98,.23))!important;
  transition:background .15s ease,border-color .15s ease;
}
#v4-character #v4-equipped .slot-item.v4-equipped-item:hover{
  border-color:#82d9ff!important;background:rgba(84,164,222,.27)!important
}
#v4-character #v4-equipped .v4-equipped-icon{width:32px!important;height:32px!important;flex-basis:32px!important}
#v4-character #v4-equipped .v4-equipped-name{font-size:10px;font-weight:720}
#v4-character #v4-equipped .v4-equipped-slot{font-size:9px}

/* Original V2 extra skin: #f4f6fa with alpha 120 (47%). */
#v4-v2-swatches .v4-v2-skin.v4-ghost-skin{
  background:linear-gradient(rgba(244,246,250,.470588),rgba(244,246,250,.470588)),
    conic-gradient(#7c95ae 25%,#e9f2fc 0 50%,#7c95ae 0 75%,#e9f2fc 0) 0 0/12px 12px!important;
}
#v4-v2-swatches .v4-v2-skin.v4-ghost-skin::after{
  content:"";position:absolute;inset:3px;pointer-events:none;border-radius:inherit;
  box-shadow:inset 0 0 0 1px rgba(245,249,255,.65);
}
@media(min-width:761px) and (max-width:1180px){
  main,html.v4-embedded main{
    grid-template-rows:47px minmax(0,1fr) minmax(0,1fr)!important;
  }
  main>#v4-character{grid-column:1/-1!important;grid-row:2!important}
  main>#v4-library{grid-column:1!important;grid-row:3!important}
  main>#v4-appearance{grid-column:2!important;grid-row:3!important}
}
@media(max-width:760px){
  main,html.v4-embedded main{
    display:flex!important;flex-direction:column!important;
    height:calc(100dvh - 46px)!important;max-height:calc(100dvh - 46px)!important;
    padding:6px 7px!important;gap:6px!important;
  }
  main>#v4-planner-chrome{flex:0 0 42px;width:100%;padding:4px 7px}
  .v4-chrome-brand strong{font-size:11px}
  .v4-chrome-brand small{display:none}
  .v4-chrome-mark{width:26px;height:26px;flex-basis:26px}
  #v4-ui-global-search{width:36px;min-width:36px;flex:0 0 36px;padding:0;font-size:0}
  #v4-ui-global-search .v4-chrome-search-ico{font-size:17px}
  main>#v4-library,main>#v4-character,main>#v4-appearance{
    grid-row:auto!important;height:auto!important;min-height:0!important;
  }
  #v4-character .v4-v2-action-row{padding:7px 5px!important;gap:5px!important}
  #v4-character .v4-v2-action-row .v4-v2-core-actions{flex:0 0 auto!important}
  #v4-character .v4-v2-action-row button.control{padding:6px 8px!important;font-size:10px}
  #v4-library .v4-v2-searchrow:has(>.v4-clear-filters:not([hidden])){
    grid-template-columns:minmax(0,1fr) minmax(110px,44%) 35px!important;
  }
}
@media(max-width:380px){
  #v4-chrome-brand .v4-chrome-mark{display:none}
  #v4-ui-home{display:none}
  #v4-library #v4-v2-filters .v4-filters-selected{font-size:10px!important}
}

/* Earlier V4 styles hide all non-label trigger spans. Re-admit ONLY the
   selected icon, so text and original Filters glyph don't compete. */
#v4-library #v4-v2-filters[data-v4-selected="true"] > .v4-active-native-icon:not([hidden]),
#v4-library #v4-v2-filters[data-v4-selected="true"] > .v4-active-type-icon:not([hidden]){
  display:block!important;
}

/* Keep 32px in-game event sprites intact; scale the whole sprite rather than
   cropping six pixels off the right. Type icons use a 4x26 miniature strip. */
#v4-library #v4-v2-filters .v4-active-native-icon:not([hidden]){
  width:32px!important;height:32px!important;flex:0 0 32px!important;
  max-width:32px!important;max-height:32px!important;
  transform:scale(.80)!important;margin:-3px!important;
  background-size:608px 32px!important;
}
#v4-library #v4-v2-filters .v4-active-type-icon:not([hidden]){
  background-size:104px 26px!important;background-position-y:0!important;
  transform:none!important;margin:0!important;
}
#v4-library #v4-v2-filters .v4-active-type-icon[data-type="pets"]{background-position-x:0!important}
#v4-library #v4-v2-filters .v4-active-type-icon[data-type="morphs"]{background-position-x:-26px!important}
#v4-library #v4-v2-filters .v4-active-type-icon[data-type="untradeables"]{background-position-x:-52px!important}
#v4-library #v4-v2-filters .v4-active-type-icon[data-type="customisable"]{background-position-x:-78px!important}

/* Keep the actual user-supplied gold-star sprite. The bubble remains
   untouched; only the overlay's 20px sprite is painted above it. */
#v4-library .item .v4-v2-favorite-star[data-selected="true"]{
  background:transparent!important;
  background-image:var(--v4-user-sheet)!important;
  background-repeat:no-repeat!important;
  background-size:160px 20px!important;
  background-position:0 0!important;
  image-rendering:pixelated!important;
}

/* Fix 1024px tablet regression: the old viewport-mounted revision badge
   overlaid the first wearable when Playwright scrolled it into view. Keep
   the badge in the header and give results their own proper scroll pane. */
#v4-planner-chrome #v4-build-badge{
  position:static!important;inset:auto!important;transform:none!important;
  display:inline-flex!important;align-items:center;justify-content:center;
  flex:0 0 auto;max-width:180px;min-width:0;min-height:28px;
  padding:4px 10px!important;margin:0!important;
  border-radius:9px!important;font-size:10px!important;text-decoration:none;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  pointer-events:auto!important;z-index:auto!important;
}
#v4-library{display:flex!important;flex-direction:column!important;overflow:hidden!important}
#v4-library .catalog-controls{flex:0 0 auto!important;min-height:0!important}
#v4-library #results,#v4-library #v4-v2-favorites-grid{
  flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;
  overscroll-behavior:contain;scrollbar-gutter:stable;position:relative;
}
#v4-library .v4-v2-browse-help{pointer-events:none!important}
@media(max-width:760px){
  #v4-planner-chrome #v4-build-badge{font-size:9px!important;max-width:105px;padding:3px 5px!important}
}
@media(max-width:380px){#v4-planner-chrome #v4-build-badge{display:none!important}}

/* On phones the sticky legacy section switcher occupies the same vertical
   pixels as the new planner chrome. Reserve its own row immediately below
   the chrome, and keep the header / tabs fully reachable. */
@media(max-width:760px){
  .v4-mobile-jump.v4-v2-mobile-tabs{
    position:fixed!important;top:52px!important;left:7px!important;
    right:7px!important;z-index:60!important;
    margin:0!important;padding:4px!important;
  }
  main,html.v4-embedded main{
    margin-top:0!important;height:100dvh!important;
    max-height:100dvh!important;min-height:0!important;
  }
  main>#v4-planner-chrome{order:-2!important}
  body main>#v4-character,body main>#v4-library,body main>#v4-appearance{
    margin-top:53px!important;
  }
  body[data-v4-view=items] main>#v4-library{
    height:calc(100dvh - 117px)!important;
    max-height:calc(100dvh - 117px)!important;
    min-height:0!important;
  }
}

/* Only one active planner panel can receive taps on phones. The desktop
   flex rule above has ID specificity and would otherwise override legacy
   mobile [data-v4-view] display:none, covering preview controls. */
@media(max-width:760px){
 body[data-v4-view="preview"] main>#v4-library,
 body[data-v4-view="preview"] main>#v4-appearance,
 body[data-v4-view="items"] main>#v4-character,
 body[data-v4-view="items"] main>#v4-appearance,
 body[data-v4-view="edit"] main>#v4-character,
 body[data-v4-view="edit"] main>#v4-library{
   display:none!important;pointer-events:none!important;
 }
}

/* Nov 3 UI corrections: one V2-style dropdown, original image frames. */
#v4-library .v4-sort-toolbar{position:relative!important;z-index:40!important;justify-content:flex-end!important}
#v4-library .v4-sort-toolbar>.v4-sort-label{display:none!important}
#v4-library .catalog-controls{overflow:visible!important}
#v4-library .v4-sort-toolbar>.v4-sort-dropdown-trigger{
 display:flex!important;align-items:center!important;gap:8px!important;
 width:auto!important;min-width:182px!important;max-width:100%!important;
 height:38px!important;min-height:38px!important;padding:6px 10px!important;
 font:750 11px/1.2 Inter,system-ui,sans-serif!important;
 color:#e6f4ff!important;overflow:hidden!important;
 border-radius:10px!important;border:1px solid rgba(159,218,255,.51)!important;
 background:linear-gradient(150deg,#32608b,#1c3d65)!important;
 cursor:pointer;
}
#v4-library .v4-sort-toolbar>.v4-sort-dropdown-trigger::before,
#v4-library .v4-sort-dropdown-menu .v4-sort-menu-option::before{content:none!important;display:none!important}
#v4-library .v4-sort-dropdown-label{flex:1;min-width:0;text-align:left;white-space:nowrap}
#v4-library .v4-sort-dropdown-icon,#v4-library .v4-sort-option-icon{
 display:block;flex:0 0 36px;width:36px;height:20px;
 background:url('/lab/v4-sort-icons-20261102.png') 0 0/144px 20px no-repeat;
 image-rendering:pixelated;
}
#v4-library .v4-sort-dropdown-icon[data-v4-sort-glyph="name-desc"],
#v4-library .v4-sort-option-icon[data-v4-sort-glyph="name-desc"]{background-position-x:-36px}
#v4-library .v4-sort-dropdown-icon[data-v4-sort-glyph="id-asc"],
#v4-library .v4-sort-option-icon[data-v4-sort-glyph="id-asc"]{background-position-x:-72px}
#v4-library .v4-sort-dropdown-icon[data-v4-sort-glyph="id-desc"],
#v4-library .v4-sort-option-icon[data-v4-sort-glyph="id-desc"]{background-position-x:-108px}
#v4-library .v4-sort-dropdown-arrow{font-size:18px;margin-left:auto}
#v4-library .v4-sort-dropdown-menu{
 display:flex;flex-direction:column;gap:4px;
 position:absolute;right:10px;top:calc(100% + 2px);
 width:min(285px,calc(100vw - 35px));max-width:calc(100% - 12px);
 padding:12px;border:1px solid rgba(146,208,255,.4);border-radius:14px;
 background:linear-gradient(155deg,#224a78,#0f2a4e 85%);
 box-shadow:0 16px 38px #0008,inset 0 1px #ffffff22;
 z-index:55;
}
#v4-library .v4-sort-dropdown-menu[hidden]{display:none!important}
#v4-library .v4-sort-menu-heading{padding:5px 8px 2px;color:#a8cbe7;font:800 10px/1.3 Inter,system-ui,sans-serif;letter-spacing:.11em}
#v4-library .v4-sort-dropdown-menu>.v4-sort-menu-option{
 display:flex!important;align-items:center!important;gap:10px!important;
 position:static!important;width:100%!important;max-width:none!important;
 height:41px!important;min-height:41px!important;padding:7px 8px!important;
 text-align:left!important;font:720 11px/1.2 Inter,system-ui,sans-serif!important;
 color:#e1f3ff!important;border-radius:9px!important;overflow:visible!important;
 border:1px solid transparent!important;background:transparent!important;
 box-shadow:none!important;white-space:nowrap;cursor:pointer;
}
#v4-library .v4-sort-dropdown-menu>.v4-sort-menu-option[aria-checked="true"],
#v4-library .v4-sort-dropdown-menu>.v4-sort-menu-option:hover{
 background:#3d79b446!important;border-color:#82c9f655!important;
}
#v4-library .v4-sort-menu-option .v4-sort-option-check{margin-left:auto;visibility:hidden;color:#9ceaff}
#v4-library .v4-sort-menu-option[aria-checked="true"] .v4-sort-option-check{visibility:visible}

/* Reuse EXACT dropdown icon frames on the selected Filter trigger. */
#v4-library #v4-v2-filters .v4-active-special-icon:not([hidden]){
 display:block!important;flex:0 0 32px!important;
 width:32px!important;height:32px!important;
 max-width:32px!important;max-height:32px!important;
 transform:scale(.82);margin:-3px!important;
 background-size:256px 32px!important;image-rendering:pixelated;
}
#v4-library #v4-v2-filters .v4-active-special-icon[hidden]{display:none!important}
#v4-library #v4-v2-filters .v4-active-special-icon[data-user-event="voucher"]{background-position:-32px 0!important}
#v4-library #v4-v2-filters .v4-active-special-icon[data-user-event="clash"]{background-position:-64px 0!important}
#v4-library #v4-v2-filters .v4-active-special-icon[data-user-event="immortal"]{background-position:-96px 0!important}
#v4-library #v4-v2-filters .v4-active-type-icon:not([hidden]){
 width:26px!important;height:26px!important;max-height:26px!important;
 flex:0 0 26px!important;
 background-size:208px 26px!important;background-position-y:0!important;
}
#v4-library #v4-v2-filters .v4-active-type-icon[data-type="pets"]{background-position-x:-104px!important}
#v4-library #v4-v2-filters .v4-active-type-icon[data-type="morphs"]{background-position-x:-130px!important}
#v4-library #v4-v2-filters .v4-active-type-icon[data-type="untradeables"]{background-position-x:-156px!important}
#v4-library #v4-v2-filters .v4-active-type-icon[data-type="customisable"]{background-position-x:-182px!important}
#v4-library .v4-events-index-error:not([hidden]){
 margin:7px 12px;padding:8px 10px;border:1px solid #ffa6a675;
 border-radius:9px;color:#ffcfcd;background:#7a28352f;font-size:11px
}

/* Same translucent ghost ivory as the character, without checkerboard. */
#v4-v2-swatches .v4-v2-skin.v4-ghost-skin{
 background:rgba(244,246,250,.470588)!important;border-color:rgba(244,246,250,.7)!important;
}
#v4-v2-swatches .v4-v2-skin.v4-ghost-skin::after{display:none!important}

/* Equipped items need readable full names, not forced two-character ellipses. */
#v4-character #v4-equipped .slots{
 grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr))!important;
}
#v4-character #v4-equipped .slot-item.v4-equipped-item{min-width:0;height:auto!important;min-height:56px!important}
#v4-character #v4-equipped .v4-equipped-copy{flex:1 1 auto!important;min-width:0!important;max-width:none!important;overflow:visible!important}
#v4-character #v4-equipped .v4-equipped-name{
 display:block!important;white-space:normal!important;overflow:visible!important;
 text-overflow:clip!important;max-width:none!important;
 overflow-wrap:anywhere!important;word-break:normal!important;
 line-height:1.3!important;font-size:11px!important;
}

/* A saved favorite changes ONLY its top-right gold star. Keep bubbles static. */
#v4-library[data-v4-layout="tiles"] #results button.item,
#v4-library[data-v4-layout="tiles"] #v4-v2-favorites-grid button.item{
 animation:none!important;transform:none!important;
 transition:transform .16s ease,background-color .12s ease,border-color .12s ease!important;
}
#v4-library[data-v4-layout="tiles"] #results button.item.selected,
#v4-library[data-v4-layout="tiles"] #v4-v2-favorites-grid button.item.selected{
 border-color:rgba(160,212,248,.38)!important;
 background:linear-gradient(160deg,rgba(147,183,217,.19),rgba(29,67,113,.39))!important;
 box-shadow:inset 0 1px rgba(255,255,255,.19),0 6px 18px #061b3b44!important;
}
#v4-library[data-v4-layout="tiles"] #results button.item.selected::after,
#v4-library[data-v4-layout="tiles"] #v4-v2-favorites-grid button.item.selected::after{display:none!important;content:none!important}

/* Pointer aiming and keyboard control stay functional; redundant movement row is hidden. */
#v4-character #v4-v2-actions .v4-toolbar-block:first-child{display:none!important}

/* Never hide the special collection artwork behind older Filters selectors. */
#v4-library #v4-v2-filters[data-v4-selected="true"] > .v4-active-special-icon:not([hidden]){
 display:block!important;
}

/* Correct the prior 'inset:auto' shorthand that moved gold stars away from the top. */
#v4-library #results .item .v4-v2-favorite-star[data-selected="true"],
#v4-library #v4-v2-favorites-grid .item .v4-v2-favorite-star[data-selected="true"]{
 inset:3px 3px auto auto!important;
 top:3px!important;right:3px!important;
}

/* Roles-style hover response only: never animate or float at idle. */
#v4-library[data-v4-layout="tiles"] #results button.item:hover,
#v4-library[data-v4-layout="tiles"] #v4-v2-favorites-grid button.item:hover{
 transform:translateY(-2px) scale(1.02)!important;
}
@media(prefers-reduced-motion:reduce){
 #v4-library[data-v4-layout="tiles"] #results button.item,
 #v4-library[data-v4-layout="tiles"] #v4-v2-favorites-grid button.item{
  transition:none!important;
 }
 #v4-library[data-v4-layout="tiles"] #results button.item:hover,
 #v4-library[data-v4-layout="tiles"] #v4-v2-favorites-grid button.item:hover{
  transform:none!important;
 }
}
