#scene-collection {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 12px;
  right: auto;
  z-index: 24;
  display: block;
  width: auto;
  max-width: min(228px, calc(100% - 24px));
  padding: 0;
  pointer-events: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

#scene-collection.hidden,
body[data-starter-phase] #scene-collection {
  display: none;
}

/* Keep the collapsed launcher out of the ant's geometry. The ant remains the
   foreground scene actor until the menu opens; the open menu then rises above
   it so every storage destination stays tappable. */
#scene-collection:not(:has(.collection-space-menu:not(.hidden))) {
  bottom: auto;
}

#scene-collection:not(:has(.collection-space-menu:not(.hidden))) + #ant-avatar-wrap {
  z-index: 25 !important;
}

#scene-collection:has(.collection-space-menu:not(.hidden)) {
  z-index: 26;
}

.collection-space-toggle {
  display: grid;
  min-width: 126px;
  min-height: 44px;
  padding: 5px 8px;
  grid-template-columns: 28px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 5px;
  color: #191f28;
  background: rgb(255 255 255 / 94%);
  border: 1px solid #d1d6db;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgb(25 31 40 / 12%);
  font-size: 13px;
  font-weight: 800;
  pointer-events: auto;
}

.collection-space-toggle-icon {
  width: 26px;
  height: 26px;
  background: #3182f6;
  -webkit-mask: url("../../assets/ui/icon-flex.svg") center / contain no-repeat;
  mask: url("../../assets/ui/icon-flex.svg") center / contain no-repeat;
}

.collection-space-toggle strong {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  color: #fff;
  background: #3182f6;
  border-radius: 6px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.collection-space-menu {
  display: grid;
  box-sizing: border-box;
  width: min(218px, calc(100vw - 36px));
  max-width: 100%;
  margin-top: 6px;
  max-height: calc(100% - 50px);
  padding: 6px;
  gap: 4px;
  background: #fff;
  border: 1px solid #d1d6db;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgb(25 31 40 / 18%);
  overflow-y: auto;
  overscroll-behavior: contain;
  pointer-events: auto;
  scrollbar-gutter: stable;
}

.collection-space-menu.hidden {
  display: none;
}

.collection-space-menu button {
  display: grid;
  min-height: 44px;
  padding: 5px 8px;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: #191f28;
  text-align: left;
  background: #fff;
  border: 0;
  border-radius: 6px;
}

.collection-space-menu button:hover,
.collection-space-menu button:focus-visible {
  background: #edf5ff;
}

.collection-space-menu img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.collection-space-menu span {
  font-size: 14px;
  font-weight: 800;
}

.collection-space-menu em {
  color: #6b7684;
  font-size: 12px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

@media (max-height: 420px) and (min-width: 480px) and (max-width: 900px) {
  #avatar-scene:has(.collection-space-menu:not(.hidden)) {
    z-index: 30;
    overflow: visible !important;
  }

  #scene-collection:has(.collection-space-menu:not(.hidden)) {
    position: fixed;
    inset: max(6px, env(safe-area-inset-top)) auto max(6px, env(safe-area-inset-bottom)) 8px;
    z-index: 100;
    max-width: min(218px, calc(100vw - 16px));
  }
}

.showcase-space-shell {
  display: grid;
  min-width: 0;
  gap: 18px;
  padding: 0 20px 28px;
}

.showcase-section {
  display: grid;
  min-width: 0;
  gap: 18px;
  padding: 0;
}

#panel-milestones .growth-view-luxury.luxury-section-spaces {
  overflow: hidden;
  background: #f2f4f6;
  border-color: #e5e8eb;
}

#panel-milestones .luxury-section-spaces #luxury-view-panel {
  min-width: 0;
  overflow: hidden;
  border-radius: 10px;
  background: #f2f4f6;
}

.collection-space-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: 70px;
  gap: 6px;
  min-width: 0;
}

.collection-space-option {
  display: grid;
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 4px;
  grid-template-rows: 30px minmax(0, 1fr) 14px;
  place-items: center;
  gap: 1px;
  color: #6b7684;
  background: #fff;
  border: 1px solid #e5e8eb;
  border-radius: 6px;
}

.collection-space-option:hover,
.collection-space-option:focus-visible {
  color: #3182f6;
  background: #f7faff;
  border-color: #b8d8ff;
}

.collection-space-option[aria-current="page"] {
  color: #1b64da;
  background: #edf5ff;
  border-color: #8fc2ff;
}

.collection-space-option-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
}

.collection-space-option-icon img {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.collection-space-option-label {
  min-width: 0;
  max-width: 100%;
  font-size: 12px;
  font-weight: 800;
  line-height: 15px;
  overflow-wrap: anywhere;
  text-align: center;
  white-space: normal;
}

.collection-space-option-count {
  min-width: 0;
  max-width: 100%;
  color: #8b95a1;
  font-size: 10px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  line-height: 14px;
  white-space: nowrap;
}

.showcase-room {
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  overflow: clip;
  background-color: #e5e8eb;
  border: 1px solid #e5e8eb;
  border-radius: 10px;
  clip-path: inset(0 round 10px);
}

.showcase-room-background {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  opacity: 0;
}

.showcase-room[data-showcase-media-state="ready"] .showcase-room-background {
  opacity: 1;
}

.showcase-room-loading {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  color: #4e5968;
  background: #eef4fa;
  font-size: 13px;
  font-weight: 800;
  transition: opacity 140ms ease;
}

.showcase-room[data-showcase-media-state="ready"] .showcase-room-loading {
  display: none;
}

.showcase-room[data-showcase-media-state="error"] .showcase-room-loading {
  color: #8b95a1;
}

.showcase-room-empty {
  position: absolute;
  inset: auto 12px 12px;
  z-index: 3;
  display: grid;
  min-height: 72px;
  padding: 10px 12px;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-areas:
    "icon title"
    "icon detail";
  align-items: center;
  column-gap: 10px;
  color: #191f28;
  background: rgb(255 255 255 / 94%);
  border: 1px solid #d1d6db;
  border-radius: 8px;
}

.showcase-room-empty img {
  grid-area: icon;
}

.showcase-room-empty strong {
  grid-area: title;
  align-self: end;
  font-size: 15px;
}

.showcase-room-empty span {
  grid-area: detail;
  align-self: start;
  color: #6b7684;
  font-size: 12px;
}

.showcase-owned-list {
  display: grid;
  gap: 6px;
}

.showcase-owned-list article {
  display: grid;
  min-height: 62px;
  padding: 8px 10px;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #e5e8eb;
  border-radius: 8px;
}

.showcase-owned-list article[data-showcase-owned="false"] {
  background: #f7f9fc;
}

.showcase-owned-list img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 6px;
}

.showcase-owned-list span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.showcase-owned-list strong {
  color: #191f28;
  font-size: 14px;
  font-weight: 800;
}

.showcase-owned-list small {
  color: #6b7684;
  font-size: 12px;
  line-height: 16px;
  white-space: normal;
}

.showcase-owned-list em {
  color: #3182f6;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.showcase-owned-list button {
  min-width: 72px;
  min-height: 44px;
  padding: 0 10px;
  color: #fff;
  background: #3182f6;
  border: 0;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 800;
}

.showcase-owned-list button:disabled {
  color: #6b7684;
  background: #e5e8eb;
}

.showcase-space-shell .garage-v179 {
  width: 100%;
  margin-inline: 0;
  padding: 0;
}

@media (max-width: 380px) {
  #scene-collection {
    top: 8px;
    left: 8px;
  }

  .collection-space-toggle {
    min-width: 118px;
  }

  .showcase-space-shell {
    padding-right: 14px;
    padding-left: 14px;
  }

  .collection-space-option-label {
    font-size: 11px;
  }
}

@media (min-width: 700px) {
  #scene-collection {
    top: 18px;
    left: 18px;
    width: min(218px, calc(100% - 36px));
  }

  .collection-space-toggle,
  .collection-space-menu {
    width: 100%;
  }

  .showcase-space-shell {
    padding-right: 24px;
    padding-left: 24px;
  }

  .showcase-room {
    max-height: 480px;
  }

  .showcase-owned-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
