/* ==========================================================================
   爪爪星球 · ClawVerse — 3D 展厅 / 仓库 / 公开分享页样式
   仅 showcase-dev 维护；token 全部取自 css/theme.css
   ========================================================================== */

/* ------------------------------- 展厅框架 ------------------------------- */

.gallery {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(420px 340px at 50% 8%, rgba(139, 108, 255, 0.16), transparent 70%),
    radial-gradient(360px 300px at 12% 78%, rgba(255, 93, 143, 0.1), transparent 72%),
    radial-gradient(340px 280px at 92% 62%, rgba(92, 242, 197, 0.07), transparent 72%),
    linear-gradient(180deg, #0b0814 0%, #0e0b16 55%, #090711 100%);
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

.gallery__stage {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.gallery__canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  cursor: grab;
  outline: none;
}

.gallery.is-editing .gallery__canvas {
  cursor: default;
}

.gallery__canvas:active {
  cursor: grabbing;
}

.gallery::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 130px rgba(6, 4, 11, 0.7);
}

/* ------------------------------- 页头 ------------------------------- */

.gallery__top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 12;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: calc(var(--safe-t) + 12px) 16px 14px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(9, 6, 16, 0.88) 0%, rgba(9, 6, 16, 0.45) 62%, transparent 100%);
}

.gallery__title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.gallery__titles {
  min-width: 0;
  pointer-events: auto;
}

.gallery__kicker {
  color: rgba(247, 241, 232, 0.5);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.gallery__title {
  margin-top: 3px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}

.gallery__actions {
  display: flex;
  gap: 8px;
  flex: none;
  pointer-events: auto;
}

.gallery__btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--ink);
  background: rgba(22, 17, 38, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.16s var(--ease), background 0.2s ease, opacity 0.2s ease;
}

.gallery__btn svg {
  width: 20px;
  height: 20px;
}

.gallery__btn:active {
  transform: scale(0.93);
}

.gallery__btn.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(140deg, rgba(255, 93, 143, 0.95), rgba(139, 108, 255, 0.9));
  box-shadow: 0 10px 26px rgba(255, 93, 143, 0.34);
}

.gallery__btn.is-disabled {
  opacity: 0.45;
}

.gallery__btn--close {
  width: 36px;
  height: 36px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
}

/* ---------------------------- 统计 chips ---------------------------- */

.gallery__chips {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  pointer-events: auto;
  scrollbar-width: none;
}

.gallery__chips::-webkit-scrollbar {
  display: none;
}

.gallery__chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--ink-dim);
  background: rgba(16, 12, 27, 0.58);
  border: 1px solid var(--line);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.gallery__chip--strong {
  color: #ffd7e3;
  background: rgba(255, 93, 143, 0.16);
  border-color: rgba(255, 93, 143, 0.28);
}

.gallery__chip--warehouse {
  color: #cabcff;
  background: rgba(139, 108, 255, 0.16);
  border-color: rgba(139, 108, 255, 0.26);
}

.gallery__chip--rarity .gallery__chip-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--rarity-n);
}

.gallery__chip--rarity[data-rarity="R"] .gallery__chip-dot {
  background: var(--rarity-r);
}

.gallery__chip--rarity[data-rarity="SR"] .gallery__chip-dot {
  background: var(--rarity-sr);
  box-shadow: 0 0 8px rgba(255, 209, 102, 0.8);
}

/* ------------------------------- 底部栏 ------------------------------- */

.gallery__bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 12;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 18px 16px calc(10px + var(--safe-b));
  pointer-events: none;
  background: linear-gradient(0deg, rgba(9, 6, 16, 0.92) 0%, rgba(9, 6, 16, 0.4) 68%, transparent 100%);
}

.gallery__hint {
  min-height: 16px;
  color: rgba(222, 213, 232, 0.86);
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.gallery__tools {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: auto;
}

.gallery__tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: rgba(30, 23, 50, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.16s var(--ease), opacity 0.2s ease;
}

.gallery__tool:active {
  transform: scale(0.96);
}

.gallery__tool--mint {
  color: #06231c;
  border: 0;
  background: linear-gradient(135deg, #9dffdf, #5cf2c5 60%, #33d6a6);
  box-shadow: 0 12px 26px rgba(92, 242, 197, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.gallery__tool--ghost {
  color: var(--ink-dim);
  background: transparent;
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.gallery__tool:disabled {
  opacity: 0.42;
  filter: saturate(0.4);
  pointer-events: none;
}

/* ------------------------------- 空态浮层 ------------------------------- */

.gallery__empty {
  position: absolute;
  inset: 0;
  z-index: 11;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 46%, rgba(9, 6, 16, 0.12), rgba(9, 6, 16, 0.56));
}

.gallery__empty[hidden] {
  display: none;
}

.gallery__empty-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(316px, 100%);
  padding: 22px 20px 18px;
  border-radius: 24px;
  text-align: center;
  pointer-events: auto;
  background: linear-gradient(160deg, rgba(43, 33, 68, 0.94), rgba(24, 17, 36, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.gallery__empty-art {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 26px;
  font-size: 36px;
  background: radial-gradient(circle at 32% 24%, rgba(255, 93, 143, 0.24), rgba(139, 108, 255, 0.14));
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 0 24px rgba(139, 108, 255, 0.12);
}

.gallery__empty-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.gallery__empty-sub {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.gallery__empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

/* ------------------------------- Loading ------------------------------- */

.gallery__loading {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: radial-gradient(ellipse at 50% 38%, rgba(30, 22, 50, 0.94), rgba(10, 7, 18, 0.98));
  transition: opacity 0.42s ease, visibility 0.42s ease;
  pointer-events: auto;
}

.gallery__loading.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gallery__loading-text {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.16em;
}

.gallery__spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--coral);
  animation: showcase-spin 0.9s linear infinite;
}

@keyframes showcase-spin {
  to {
    transform: rotate(360deg);
  }
}

.gallery__error {
  position: absolute;
  inset: 0;
  z-index: 31;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  background: radial-gradient(ellipse at 50% 40%, rgba(30, 22, 50, 0.94), rgba(10, 7, 18, 0.98));
}

/* ------------------------------- 仓库抽屉 ------------------------------- */

.sheet {
  position: absolute;
  inset: 0;
  z-index: 25;
  pointer-events: none;
}

.sheet__scrim {
  position: absolute;
  inset: 0;
  background: rgba(8, 5, 14, 0.58);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.26s ease;
  pointer-events: auto;
}

.sheet.is-open .sheet__scrim {
  opacity: 1;
}

.sheet__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  max-height: min(74%, 520px);
  padding: 8px 16px calc(12px + var(--safe-b));
  border-radius: 24px 24px 0 0;
  pointer-events: auto;
  background: linear-gradient(165deg, #2a2042 0%, #1c152e 62%, #181124 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 0;
  box-shadow: 0 -18px 60px rgba(0, 0, 0, 0.55);
  transform: translateY(103%);
  transition: transform 0.32s var(--ease);
}

.sheet.is-open .sheet__panel {
  transform: translateY(0);
}

.sheet__grabber {
  flex: none;
  width: 38px;
  height: 4px;
  margin: 2px auto 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.18);
}

.sheet__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex: none;
  padding: 0 2px 10px;
  border-bottom: 1px solid var(--line-soft);
}

.sheet__title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.sheet__sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.sheet__list {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  padding: 10px 2px 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.sheet__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-soft);
}

.sheet__row[data-rarity="R"] {
  border-color: rgba(127, 178, 255, 0.2);
}

.sheet__row[data-rarity="SR"] {
  border-color: rgba(255, 209, 102, 0.26);
  background: rgba(255, 209, 102, 0.045);
}

.sheet__thumb {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 12px;
}

.sheet__row-main {
  flex: 1 1 auto;
  min-width: 0;
}

.sheet__row-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
}

.sheet__row-title .rarity-badge {
  height: 18px;
  font-size: 9.5px;
}

.sheet__row-meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sheet__put {
  flex: none;
  min-height: 36px;
  padding: 0 13px;
  font-size: 12px;
}

.sheet__hint {
  flex: none;
  padding-top: 8px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.sheet__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 30px 0 24px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.sheet__empty-art {
  font-size: 34px;
}

/* ------------------------------- 娃娃详情卡 ------------------------------- */

.modal--doll {
  width: min(400px, 100%);
}

.modal--doll .modal__body {
  padding: 2px 16px 6px;
}

.modal--doll .modal__foot {
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px));
}

.modal--doll .modal__foot > div {
  flex: 1 1 auto;
}

.doll-detail {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.doll-detail__stage {
  position: relative;
  height: 232px;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.08), transparent 62%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(10, 7, 18, 0.5));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.doll-detail__stage[data-rarity="R"] {
  border-color: rgba(127, 178, 255, 0.22);
}

.doll-detail__stage[data-rarity="SR"] {
  border-color: rgba(255, 209, 102, 0.28);
}

.doll-detail__stage-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 66%, rgba(185, 198, 216, 0.16), transparent 64%);
}

.doll-detail__stage[data-rarity="R"] .doll-detail__stage-glow {
  background: radial-gradient(circle at 50% 66%, rgba(127, 178, 255, 0.24), transparent 66%);
}

.doll-detail__stage[data-rarity="SR"] .doll-detail__stage-glow {
  background: radial-gradient(circle at 50% 66%, rgba(255, 209, 102, 0.28), transparent 68%);
  animation: doll-stage-pulse 3.4s ease-in-out infinite;
}

@keyframes doll-stage-pulse {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}

.doll-preview {
  position: absolute;
  inset: 0;
  cursor: grab;
  touch-action: none;
}

.doll-preview__canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.doll-preview.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-top-color: var(--coral);
  animation: showcase-spin 0.9s linear infinite;
}

.doll-detail__serial {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(10, 7, 18, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--ink-dim);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  pointer-events: none;
}

.doll-detail__hint {
  position: absolute;
  right: 12px;
  bottom: 10px;
  color: rgba(247, 241, 232, 0.38);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  pointer-events: none;
}

.doll-detail__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
}

.doll-detail__name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.doll-detail__en {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.doll-detail__tagline {
  padding: 0 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.doll-detail__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.doll-detail__meta-item {
  min-width: 0;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-soft);
}

.doll-detail__meta-label {
  display: block;
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.03em;
}

.doll-detail__meta-value {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.doll-detail__foot-note {
  padding-top: 2px;
  color: rgba(169, 156, 196, 0.6);
  font-size: 10px;
  text-align: center;
}

.doll-detail__actions {
  display: flex;
  gap: 10px;
  width: 100%;
}

.doll-detail__actions .btn {
  flex: 1 1 0;
}

/* ------------------------------- 仓库页 ------------------------------- */

.wh-page {
  padding-bottom: calc(30px + var(--safe-b));
}

.wh-head {
  flex-wrap: wrap;
}

.wh-head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.wh-summary {
  margin-bottom: 14px;
}

.wh-summary-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(43, 33, 68, 0.86), rgba(26, 19, 48, 0.92));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}

.wh-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.wh-stat {
  padding: 10px 6px;
  border-radius: 12px;
  text-align: center;
  background: rgba(10, 7, 18, 0.3);
  border: 1px solid var(--line-soft);
}

.wh-stat b {
  display: block;
  font-size: 19px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.wh-stat span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.05em;
}

.wh-rarity-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.wh-rarity {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-soft);
  color: var(--ink-dim);
  font-size: 10.5px;
  font-weight: 600;
}

.wh-rarity i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rarity-n);
}

.wh-rarity[data-rarity="R"] i {
  background: var(--rarity-r);
}

.wh-rarity[data-rarity="SR"] i {
  background: var(--rarity-sr);
  box-shadow: 0 0 8px rgba(255, 209, 102, 0.7);
}

.wh-rarity-note {
  color: var(--muted);
  font-size: 10.5px;
}

.wh-groups {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wh-group {
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(43, 33, 68, 0.82), rgba(26, 19, 48, 0.9));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}

.wh-group[data-rarity="R"] {
  border-color: rgba(127, 178, 255, 0.2);
}

.wh-group[data-rarity="SR"] {
  border-color: rgba(255, 209, 102, 0.26);
}

.wh-group__head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
}

.wh-thumb {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 14px;
}

.wh-group__names {
  flex: 1 1 auto;
  min-width: 0;
}

.wh-group__title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
}

.wh-group__title .rarity-badge {
  height: 19px;
  font-size: 9.5px;
}

.wh-group__sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
}

.wh-group__tagline {
  display: -webkit-box;
  margin-top: 3px;
  overflow: hidden;
  color: rgba(169, 156, 196, 0.62);
  font-size: 10.5px;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.wh-group__count {
  flex: none;
  padding-top: 2px;
  color: var(--ink-dim);
  font-size: 13px;
  font-weight: 800;
}

.wh-group__toggle {
  flex: none;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--ink-dim);
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.wh-group__toggle:active {
  transform: scale(0.96);
}

.wh-instances {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0 12px 12px;
  list-style: none;
}

.wh-instance {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(10, 7, 18, 0.28);
  border: 1px solid var(--line-soft);
}

.wh-instance__main {
  flex: 1 1 auto;
  min-width: 0;
}

.wh-instance__title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
}

.wh-instance__extra {
  padding: 1px 7px;
  border-radius: 999px;
  color: #cabcff;
  background: rgba(139, 108, 255, 0.14);
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
}

.wh-instance__meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
}

.wh-instance__actions {
  display: flex;
  flex: none;
  gap: 6px;
}

.wh-instance__actions .btn {
  min-height: 36px;
  padding: 0 12px;
  font-size: 12px;
}

.wh-state {
  margin-bottom: 4px;
}

.wh-empty {
  padding: 46px 20px;
}

.wh-skeleton {
  margin-top: 4px;
}

/* ------------------------------- 公开展厅 ------------------------------- */

.share-page {
  background:
    radial-gradient(420px 340px at 50% 6%, rgba(255, 93, 143, 0.13), transparent 70%),
    radial-gradient(380px 300px at 12% 74%, rgba(139, 108, 255, 0.16), transparent 72%),
    radial-gradient(320px 260px at 90% 60%, rgba(92, 242, 197, 0.07), transparent 70%),
    linear-gradient(180deg, #0a0712 0%, #0e0b16 55%, #090711 100%);
}

.share__head {
  gap: 12px;
}

.share__brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.share__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 13px;
  color: #fff;
  font-size: 18px;
  background: linear-gradient(145deg, #ff7ba6, #e03b6f 60%, #8b6cff);
  box-shadow: 0 10px 24px rgba(224, 59, 111, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.share__brand-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.share__brand {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.share__brand-en {
  margin-top: 1px;
  color: var(--muted);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.26em;
}

.share__readonly {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--mint);
  background: rgba(92, 242, 197, 0.12);
  border: 1px solid rgba(92, 242, 197, 0.24);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.share__readonly::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px rgba(92, 242, 197, 0.9);
}

.share__user {
  padding: 2px 2px 0;
  pointer-events: none;
}

.share__username {
  font-size: 25px;
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1.18;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share__subtitle {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.5px;
}

.share__bottom {
  gap: 10px;
}

.share__hint {
  color: rgba(222, 213, 232, 0.72);
}

.share__cta-row {
  display: flex;
  justify-content: center;
  pointer-events: auto;
}

.share__cta {
  width: 100%;
  max-width: 340px;
  min-height: 50px;
  font-size: 15px;
}

.share__fallback {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  padding-top: calc(var(--safe-t) + 26px);
  background: transparent;
}

.share__empty {
  padding-top: 18vh;
}

.share__empty-title {
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
}

/* ------------------------------- 响应式 ------------------------------- */

@media (max-height: 700px) {
  .gallery__top {
    padding-top: calc(var(--safe-t) + 8px);
    gap: 7px;
  }

  .gallery__title {
    font-size: 19px;
    max-width: 190px;
  }

  .gallery__btn {
    width: 40px;
    height: 40px;
  }

  .gallery__bottom {
    padding-bottom: calc(6px + var(--safe-b));
    gap: 6px;
  }

  .gallery__tool {
    min-height: 42px;
  }

  .doll-detail__stage {
    height: 190px;
  }
}

@media (orientation: landscape) and (max-height: 560px) {
  .gallery__top {
    padding: calc(var(--safe-t) + 6px) 18px 8px;
  }

  .gallery__title {
    font-size: 18px;
  }

  .gallery__bottom {
    padding: 6px 18px calc(6px + var(--safe-b));
  }

  .gallery__hint {
    display: none;
  }

  .gallery__empty-card {
    padding: 16px 18px;
    gap: 6px;
  }

  .gallery__empty-art {
    width: 58px;
    height: 58px;
    font-size: 26px;
    border-radius: 20px;
  }

  .share__username {
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery__spinner,
  .doll-preview.is-loading::after {
    animation-duration: 1.6s;
  }

  .doll-detail__stage[data-rarity="SR"] .doll-detail__stage-glow {
    animation: none;
  }

  .sheet__panel,
  .toast {
    transition-duration: 0.01ms;
  }
}
