:root {
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: #222;
  background: #fff;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  touch-action: manipulation;
}

body {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  overflow: hidden;
  background: #fff;
}

.auth-shell {
  display: grid;
  width: min(390px, 100vw);
  height: min(844px, 100dvh);
  min-height: 600px;
  place-items: center;
  padding: 24px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(45, 49, 58, 0.16);
}

.auth-shell[hidden],
.game-shell[hidden],
.auth-form[hidden] {
  display: none;
}

.auth-panel {
  width: 100%;
  border: 1px solid #dfe2e6;
  background: #fff;
}

.auth-header {
  padding: 22px 20px 18px;
  border-bottom: 1px solid #e7e9ec;
}

.auth-header p,
.auth-header h1 {
  margin: 0;
}

.auth-header p {
  margin-bottom: 6px;
  color: #999;
  font-size: 11px;
}

.auth-header h1 {
  font-size: 24px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid #e7e9ec;
}

.auth-tabs button {
  height: 46px;
  padding: 0;
  border: 0;
  border-right: 1px solid #e7e9ec;
  border-radius: 0;
  color: #888;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
}

.auth-tabs button:last-child {
  border-right: 0;
}

.auth-tabs button.is-active {
  color: #fa7298;
  box-shadow: inset 0 -3px #fa7298;
}

.auth-form {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: #555;
  font-size: 12px;
  font-weight: 700;
}

.auth-form input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #d9dce1;
  border-radius: 0;
  outline: none;
  color: #222;
  background: #fff;
  font: inherit;
  font-size: 16px;
}

.auth-form input:focus {
  border-color: #fa7298;
  box-shadow: 0 0 0 2px rgba(250, 114, 152, 0.12);
}

.auth-form input.is-invalid {
  border-color: #fa7298;
  background: #fff8fa;
  box-shadow: inset 3px 0 #fa7298;
}

.auth-submit {
  height: 44px;
  margin-top: 4px;
  border: 1px solid #fa7298;
  border-radius: 0;
  color: #fff;
  background: #fa7298;
  cursor: pointer;
  font-weight: 800;
}

.auth-submit:disabled {
  cursor: wait;
  opacity: 0.55;
}

.auth-status {
  margin: 0 20px 18px;
  color: #777;
  font-size: 11px;
  line-height: 1.55;
}

.auth-status:empty {
  display: none;
}

.auth-status:not(:empty) {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid #e3e5e8;
  background: #f7f8fa;
}

.auth-status.is-error {
  border-color: rgba(250, 114, 152, 0.55);
  color: #d94f76;
  background: #fff6f8;
}

.auth-status.is-error::before {
  display: inline-grid;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #fff;
  background: #fa7298;
  content: "!";
  font-size: 13px;
  font-weight: 900;
}

button {
  color: inherit;
  font: inherit;
}

.game-shell {
  position: relative;
  isolation: isolate;
  width: min(390px, 100vw);
  height: min(844px, 100dvh);
  min-height: 600px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 70px rgba(45, 49, 58, 0.16);
}

.game-shell.is-preloading > :not(.app-preloader) {
  pointer-events: none;
  user-select: none;
}

.app-preloader {
  position: absolute;
  z-index: 1000;
  inset: 0;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  background: #fff;
  color: #222;
  -webkit-tap-highlight-color: transparent;
}

.app-preloader[hidden] {
  display: none;
}

.app-preloader__panel {
  display: grid;
  width: 100%;
  max-width: 326px;
  padding: 28px 22px 24px;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 18px 48px rgba(45, 49, 58, 0.12);
}

.app-preloader__caption,
.app-preloader__panel h1,
.app-preloader__status,
.app-preloader__detail {
  margin: 0;
}

.app-preloader__caption {
  margin-bottom: 7px;
  color: #fa7298;
  font-size: 11px;
  font-weight: 800;
}

.app-preloader__panel h1 {
  font-size: 25px;
  line-height: 1.2;
}

.app-preloader__status {
  min-height: 20px;
  margin-top: 18px;
  color: #555;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
}

.app-preloader__progress {
  position: relative;
  height: 10px;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid #e1e3e7;
  border-radius: 0;
  background: #f4f5f7;
}

.app-preloader__progress i {
  display: block;
  width: 0;
  height: 100%;
  background: #fa7298;
  transition: width 180ms ease;
}

.app-preloader__percent {
  justify-self: end;
  margin-top: 7px;
  color: #fa7298;
  font-family: Bahnschrift, "DIN Alternate", sans-serif;
  font-size: 17px;
}

.app-preloader__detail {
  min-height: 34px;
  margin-top: 10px;
  color: #92969d;
  font-size: 10px;
  line-height: 1.7;
}

.app-preloader.is-error .app-preloader__status {
  color: #d94f76;
}

.app-preloader.is-error .app-preloader__progress i {
  background: #d94f76;
}

.app-preloader__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.app-preloader__actions[hidden] {
  display: none;
}

.app-preloader__actions.is-retry-only {
  grid-template-columns: 1fr;
}

.app-preloader__actions button[hidden] {
  display: none;
}

.app-preloader__actions button {
  min-width: 0;
  height: 42px;
  padding: 0 10px;
  border: 1px solid #fa7298;
  border-radius: 0;
  cursor: pointer;
  font-weight: 800;
  -webkit-tap-highlight-color: transparent;
}

.app-preloader__retry {
  color: #fa7298;
  background: #fff;
}

.app-preloader__continue {
  color: #fff;
  background: #fa7298;
}

.app-preloader__actions button:focus-visible {
  outline: 2px solid rgba(250, 114, 152, 0.35);
  outline-offset: 2px;
}

.app-preloader__actions button:active {
  filter: brightness(0.94);
}

.top-hud {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  height: 112px;
  padding: max(18px, env(safe-area-inset-top)) 16px 0;
  background: transparent;
  pointer-events: none;
}

.profile-summary,
.power-badge {
  pointer-events: auto;
}

.profile-summary {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 6px;
}

.profile-button {
  position: relative;
  width: 68px;
  height: 68px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.avatar-frame {
  display: block;
  width: 64px;
  height: 64px;
  padding: 3px;
  overflow: hidden;
  border: 2px solid #fa7298;
  border-radius: 0;
  background: #fff;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.96),
    0 6px 18px rgba(250, 114, 152, 0.22),
    inset 0 1px rgba(255, 255, 255, 0.8);
  transition: transform 160ms ease, filter 160ms ease;
}

.profile-button:active .avatar-frame {
  filter: brightness(0.88);
  transform: scale(0.95);
}

.avatar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
}

.profile-level {
  position: absolute;
  right: 0;
  bottom: -1px;
  display: grid;
  width: 25px;
  height: 20px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 0;
  color: #fff;
  background: #fa7298;
  box-shadow: 0 3px 8px rgba(250, 114, 152, 0.34);
  font-family: ui-rounded, "Arial Rounded MT Bold", sans-serif;
  font-size: 11px;
  font-weight: 800;
}

.profile-experience {
  display: grid;
  width: 108px;
  height: 56px;
  flex: 0 0 108px;
  align-content: center;
  gap: 4px;
  margin-top: 4px;
  padding: 6px 8px;
  border: 1px solid #e3e5e7;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 7px 20px rgba(42, 48, 58, 0.08);
  backdrop-filter: blur(8px);
}

.profile-name-button {
  display: block;
  min-width: 0;
  width: 100%;
  height: 14px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  color: #333;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  line-height: 14px;
  text-align: left;
  text-overflow: ellipsis;
  text-align: center;
  white-space: normal;
  -webkit-tap-highlight-color: transparent;
}

.profile-name-button:active {
  color: #d94f76;
}

.profile-experience__copy {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  line-height: 1;
}

.profile-experience__copy strong {
  flex: 0 0 auto;
  color: #d94f76;
  font-size: 9px;
}

.profile-experience__copy small {
  min-width: 0;
  overflow: hidden;
  color: #777;
  font-family: Bahnschrift, "DIN Alternate", sans-serif;
  font-size: 8px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-experience__track {
  display: block;
  width: 100%;
  height: 5px;
  overflow: hidden;
  border: 1px solid #e4e6e9;
  background: #f1f2f4;
}

.profile-experience__track i {
  display: block;
  width: 0;
  height: 100%;
  background: #fa7298;
  transition: width 180ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .profile-name-button:hover {
    color: #d94f76;
  }
}

.power-badge {
  display: flex;
  align-items: center;
  width: 134px;
  min-width: 0;
  flex: 0 0 134px;
  height: 52px;
  margin-top: 4px;
  padding: 7px 14px 7px 10px;
  border: 1px solid #e3e5e7;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 7px 20px rgba(42, 48, 58, 0.08),
    inset 0 1px rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
}

.power-badge svg {
  width: 23px;
  margin-right: 8px;
  color: #fa7298;
  filter: drop-shadow(0 3px 5px rgba(250, 114, 152, 0.28));
}

.power-change-toast {
  position: fixed;
  z-index: 2147483647;
  box-sizing: border-box;
  width: max-content;
  margin: 0;
  padding: 10px 16px;
  border: 1px solid rgba(250, 114, 152, 0.5);
  border-radius: 0;
  color: #dd527f;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 6px 24px rgba(46, 52, 62, 0.18);
  font: 700 14px/1.45 "Noto Sans SC", sans-serif;
  text-align: center;
  overflow-wrap: anywhere;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  animation: power-change-toast-enter 140ms ease-out;
  transition-property: none !important;
}

.power-change-toast[hidden] {
  display: none;
}

@keyframes power-change-toast-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .power-change-toast { animation: none; }
}

.power-copy {
  display: grid;
  line-height: 1;
}

.power-label {
  margin-bottom: 5px;
  color: #999;
  font-size: 10px;
  letter-spacing: 0.13em;
}

.power-copy strong {
  color: #222;
  font-family: Bahnschrift, "DIN Alternate", sans-serif;
  font-size: 18px;
  letter-spacing: 0.04em;
  text-shadow: none;
}

.game-stage {
  position: absolute;
  inset: 112px 0 92px;
}

.home-page {
  position: absolute;
  z-index: 0;
  inset: -112px 0 -92px;
  overflow: hidden;
  background: #ccefff;
}

.home-page[hidden] {
  display: none;
}

.home-shortcuts {
  position: absolute;
  z-index: 6;
  top: calc(max(18px, env(safe-area-inset-top, 0px)) + 76px);
  left: 16px;
  right: 16px;
  display: grid;
  grid-template-columns: repeat(3, 56px);
  grid-auto-rows: 56px;
  gap: 8px;
}

.nav-item.home-shortcut {
  color: #fa7298;
  text-decoration: none;
  width: 56px;
  height: 56px;
  min-height: 56px;
  gap: 0;
  padding: 0 2px;
}

.home-shortcuts .nav-item.home-shortcut .nav-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 0;
  background: transparent;
  filter: none;
}

.nav-item.home-shortcut::before {
  display: none;
}

.home-shortcut > span:last-child {
  white-space: nowrap;
}

.home-shortcut:focus-visible {
  outline: 2px solid #fa7298;
  outline-offset: 2px;
}

.nav-item.home-shortcut:disabled {
  opacity: 0.55;
  cursor: default;
}

.home-activities-body {
  display: grid;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 28px 24px;
  place-items: center;
  text-align: center;
}

.home-scene,
.official-background-canvas,
.official-foreground-canvas,
.official-home-ambience-canvas,
.official-overlay-canvas,
.home-background-static {
  position: absolute;
  width: 100%;
}

.home-scene {
  --official-safe-area-top: env(safe-area-inset-top, 0px);
  --official-safe-area-bottom: env(safe-area-inset-bottom, 0px);
  inset: 0;
  height: 100%;
  overflow: hidden;
  background: #ccefff;
  container-type: inline-size;
}

.home-background-static {
  z-index: 0;
  inset: 0;
  display: block;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
}

.home-scene.is-official-background-ready .home-background-static {
  opacity: 0;
}

.official-background-canvas,
.official-foreground-canvas,
.official-home-ambience-canvas,
.official-overlay-canvas {
  top: 50%;
  left: 0;
  display: block;
  pointer-events: none;
  height: fit-content;
  transform: translateY(-50%);
}

.official-background-canvas {
  z-index: 1;
}

.official-foreground-canvas {
  z-index: 3;
}

.official-home-ambience-canvas {
  z-index: 4;
}

.official-overlay-canvas {
  z-index: 5;
}

.official-background-canvas[hidden],
.official-foreground-canvas[hidden],
.official-home-ambience-canvas[hidden],
.official-overlay-canvas[hidden] {
  display: none;
}

.home-ship {
  position: absolute;
  z-index: 2;
  bottom: 110px;
  left: 50%;
  width: 82%;
  height: 46%;
  transform: translateX(-50%);
  pointer-events: none;
}

.home-ship.is-official-exact {
  /*
   * Use the same centered 640 x 1400 surface as the official background.
   * The renderer's (-340,-473)..(300,927) bounds keep IMG_SHIP at
   * (340,927), so its 390 x 844 position remains (207.1875,560.328125).
   */
  top: 50%;
  bottom: auto;
  left: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 640 / 1400;
  transform: translateY(-50%);
}

.home-ship canvas,
.home-ship img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.home-ship img {
  object-fit: contain;
}

.home-ship img[hidden],
.home-ship canvas[hidden] {
  display: none;
}

.lineup-page {
  position: relative;
  top: -16px;
  height: 100%;
  height: calc(100% + 16px);
  padding: 10px 18px 18px;
  overflow-y: auto;
  background: #fff;
}

.lineup-page[hidden] {
  display: none;
}

.lineup-page[aria-busy="true"] {
  overflow: hidden;
}

.lineup-page[aria-busy="true"] > * {
  visibility: hidden;
}

.lineup-page[aria-busy="true"]::after {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #8d9199;
  background: #fff;
  content: attr(data-loading-label);
  font-size: 12px;
  text-align: center;
}

.lineup-slots {
  display: flex;
  width: 100%;
  gap: 6px;
  padding: 2px 2px 8px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  touch-action: pan-x;
  user-select: none;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
}

.lineup-slots::-webkit-scrollbar {
  display: none;
}

.lineup-slots.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.lineup-slot {
  position: relative;
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  place-items: center;
  padding: 0;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #a1a5ad;
  background: #fff;
  cursor: pointer;
  scroll-snap-align: start;
  -webkit-tap-highlight-color: transparent;
}

.lineup-slot__avatar {
  -webkit-user-drag: none;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lineup-slot.is-selected {
  border-color: #fa7298;
  box-shadow: inset 0 0 0 2px rgba(250, 114, 152, 0.2);
}

.lineup-slot--substitute.has-member::after {
  position: absolute;
  right: 0;
  bottom: 0;
  display: grid;
  width: 18px;
  height: 16px;
  place-items: center;
  color: #fff;
  background: #fa7298;
  content: "替";
  font-size: 10px;
  font-weight: 700;
}

.lineup-slot--substitute:not(.has-member)::after {
  position: absolute;
  right: 2px;
  bottom: 2px;
  color: #fa7298;
  content: "替";
  font-size: 8px;
  font-weight: 800;
}

.lineup-slot span {
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
}

.lineup-slot--substitute {
  margin-left: 14px;
  color: #666;
}

.lineup-slot--substitute span {
  font-size: 21px;
  font-weight: 700;
}

.lineup-system-slot {
  display: grid;
  box-sizing: border-box;
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  grid-template-rows: 1fr auto;
  place-items: center;
  padding: 5px 3px 4px;
  border: 1px solid #f4b2c5;
  border-radius: 0;
  color: #fa7298;
  background: #fff;
  scroll-snap-align: start;
  user-select: none;
}

button.lineup-system-slot {
  cursor: pointer;
  font: inherit;
}

button.lineup-system-slot:hover,
button.lineup-system-slot:focus-visible,
button.lineup-system-slot.has-pet {
  border-color: #fa7298;
  color: #e85c85;
}

.lineup-system-slot > .lineup-main-pet__icon {
  display: block;
  width: 32px;
  height: 32px;
  max-width: 100%;
  max-height: 32px;
  object-fit: contain;
}

.lineup-system-slot > span {
  color: #c1c5cc;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
}

.lineup-system-slot > small {
  overflow: hidden;
  max-width: 100%;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lineup-slot:hover {
  border-color: #fa7298;
  color: #fa7298;
}

.lineup-page__header {
  display: flex;
  height: 44px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e3e5e7;
}

.lineup-page__header h2 {
  margin: 0;
  font-size: 18px;
}

.lineup-page__tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lineup-environment-card,
.lineup-arrange {
  height: 28px;
  padding: 0 10px;
  border: 1px solid #fa7298;
  border-radius: 0;
  color: #fa7298;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  -webkit-tap-highlight-color: transparent;
}

.lineup-environment-card {
  min-width: 64px;
  white-space: nowrap;
}

.lineup-environment-card.has-card {
  color: #d94f78;
  background: #fff2f6;
}

.lineup-environment-card:disabled {
  cursor: wait;
  opacity: 0.55;
}

.lineup-environment-card:hover:not(:disabled),
.lineup-arrange:hover {
  color: #fff;
  background: #fa7298;
}

.lineup-member {
  width: 100%;
  margin-top: 16px;
  border: 1px solid #e3e5e7;
  background: #fff;
}

.lineup-member[hidden] {
  display: none;
}

.lineup-member__art {
  position: relative;
  display: grid;
  height: 390px;
  place-items: center;
  overflow: hidden;
  background: #fff;
}

.lineup-member__art img {
  display: block;
  width: min(100%, 330px);
  max-height: 100%;
  animation: lineup-hero-breathe 2s linear infinite;
  object-fit: contain;
  transform-origin: center center;
  will-change: transform;
}

@keyframes lineup-hero-breathe {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.02);
  }
}

.lineup-member__art-actions {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  max-width: calc(100% - 20px);
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.lineup-change,
.lineup-remove,
.lineup-skin-change {
  width: 58px;
  height: 32px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid #fa7298;
  border-radius: 0;
  color: #fa7298;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  -webkit-tap-highlight-color: transparent;
}

.lineup-skin-change {
  width: 68px;
}

.lineup-change:focus-visible,
.lineup-remove:focus-visible,
.lineup-skin-change:focus-visible:not(:disabled) {
  color: #fff;
  background: #fa7298;
}

.lineup-skin-change:disabled {
  border-color: #dfe2e6;
  color: #a1a5ad;
  background: #f7f8fa;
  cursor: not-allowed;
}

.lineup-member__info {
  display: flex;
  height: 52px;
  align-items: center;
  justify-content: flex-start;
  padding: 0 14px;
  border-top: 1px solid #e3e5e7;
  background: #fff;
}

.lineup-member__info strong {
  min-width: 0;
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lineup-attribute {
  flex: 0 0 64px;
  width: 64px;
  height: 30px;
  margin-left: 8px;
  padding: 0;
  border: 1px solid #fa7298;
  border-radius: 0;
  color: #fa7298;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  -webkit-tap-highlight-color: transparent;
}

.lineup-attribute.is-active {
  color: #fff;
  background: #fa7298;
}

@media (hover: hover) and (pointer: fine) {
  .lineup-attribute:hover {
    color: #fff;
    background: #fa7298;
  }
}

.lineup-member__info span {
  flex: 0 0 auto;
  margin-left: auto;
  color: #fa7298;
  font-family: Bahnschrift, "DIN Alternate", sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.lineup-member__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, 52px);
  gap: 8px;
  margin: 0;
  padding: 14px;
  background: #fff;
}

.lineup-member__stats > div {
  display: grid;
  min-width: 0;
  grid-template-columns: max-content max-content;
  align-content: center;
  align-items: center;
  justify-content: start;
  column-gap: 9px;
  padding: 0 10px;
  background: #f6f7f9;
}

.lineup-member__stats dt,
.lineup-member__stats dd {
  min-width: 0;
  margin: 0;
  font-family: inherit;
  font-size: 12px;
  line-height: 16px;
  white-space: nowrap;
}

.lineup-member__stats dt {
  overflow: hidden;
  color: #747982;
  font-weight: 650;
  text-overflow: ellipsis;
}

.lineup-member__stats dd {
  color: #222;
  font-weight: 800;
}

.lineup-stats-dialog {
  width: min(334px, calc(100vw - 32px));
  max-width: 334px;
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  color: #333;
  background: transparent;
}

.lineup-stats-dialog::backdrop {
  background: rgba(30, 35, 44, 0.4);
}

.lineup-stats-card {
  position: relative;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 16px 42px rgba(25, 30, 40, 0.24);
}

.lineup-stats-card > header {
  display: flex;
  min-height: 78px;
  align-content: center;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  padding: 14px 52px 13px 16px;
}

.lineup-stats-card > header small {
  color: #fa7298;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.lineup-stats-heading {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: baseline;
  gap: 12px;
}

.lineup-stats-card > header h2 {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lineup-stats-close {
  position: absolute;
  z-index: 1;
  top: 10px;
  right: 10px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #777d87;
  background: transparent;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

.lineup-stats-card .lineup-member__stats {
  grid-template-rows: repeat(3, 54px);
  padding-top: 2px;
}

.lineup-stats-card .lineup-member__stats > div {
  padding: 0 10px;
}

.lineup-stats-close:focus-visible {
  outline: 2px solid #fa7298;
  outline-offset: -3px;
}

@media (hover: hover) and (pointer: fine) {
  .lineup-stats-close:hover {
    color: #fa7298;
    background: #fff5f8;
  }
}

.lineup-actions {
  display: grid;
  height: 38px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
  margin-top: 8px;
}

.lineup-actions button {
  min-width: 0;
  padding: 0 2px;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #686d76;
  background: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.lineup-actions button:not(:disabled) {
  border-color: #fa7298;
  color: #fa7298;
  background: #fff;
}

.lineup-actions button:not(:disabled):hover {
  border-color: #fa7298;
  color: #fff;
  background: #fa7298;
}

.lineup-actions button:disabled {
  border-color: #e3e5e8;
  color: #b4b8bf;
  background: #f7f8f9;
  cursor: default;
}

.lineup-remove-layer {
  position: absolute;
  z-index: 40;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(31, 35, 42, 0.38);
}

.lineup-remove-layer[hidden] {
  display: none;
}

.lineup-remove-card {
  position: relative;
  width: 100%;
  max-width: 330px;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 20px 48px rgba(34, 39, 48, 0.2);
}

.lineup-remove-card__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #767b84;
  background: #fff;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.lineup-remove-card header {
  padding: 18px 58px 14px 18px;
  border-bottom: 1px solid #e5e7ea;
}

.lineup-remove-card header small,
.lineup-remove-card header h2 {
  margin: 0;
}

.lineup-remove-card header small {
  color: #999;
  font-size: 10px;
}

.lineup-remove-card header h2 {
  margin-top: 3px;
  font-size: 20px;
}

.lineup-remove-card > p:not(.lineup-remove-confirm-status) {
  margin: 0;
  padding: 22px 18px 15px;
  color: #555a63;
  font-size: 13px;
  line-height: 1.6;
}

.lineup-remove-card > p strong {
  color: #222;
}

.lineup-remove-confirm-status {
  min-height: 26px;
  margin: 0;
  padding: 0 18px 10px;
  color: #777c85;
  font-size: 11px;
  line-height: 1.45;
}

.lineup-remove-confirm-status.is-error {
  color: #d94f76;
}

.lineup-remove-card footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid #e5e7ea;
}

.lineup-remove-card footer button {
  height: 46px;
  padding: 0;
  border: 0;
  border-right: 1px solid #e5e7ea;
  border-radius: 0;
  color: #777c85;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.lineup-remove-card footer button:last-child {
  border-right: 0;
  color: #fff;
  background: #fa7298;
}

.lineup-remove-card button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.lineup-skin-layer {
  position: absolute;
  z-index: 41;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(31, 35, 42, 0.38);
}

.lineup-skin-layer[hidden] {
  display: none;
}

.lineup-skin-card {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 340px;
  height: min(500px, 76dvh);
  max-height: calc(100% - 24px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 20px 48px rgba(34, 39, 48, 0.2);
}

.lineup-skin-card > header {
  flex: 0 0 auto;
  padding: 17px 56px 13px 16px;
  border-bottom: 1px solid #e5e7ea;
}

.lineup-skin-card > header small,
.lineup-skin-card > header h2 {
  margin: 0;
}

.lineup-skin-card > header small {
  color: #fa7298;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.lineup-skin-card > header h2 {
  margin-top: 3px;
  overflow: hidden;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lineup-skin-close {
  position: absolute;
  z-index: 2;
  top: 11px;
  right: 11px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #767b84;
  background: #fff;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.lineup-skin-grid {
  display: flex;
  min-width: 0;
  min-height: 0;
  gap: 10px;
  flex: 1 1 auto;
  padding: 14px 14px 16px;
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  overscroll-behavior-x: contain;
  scroll-padding-inline: 14px;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
  touch-action: pan-x;
  user-select: none;
  -webkit-overflow-scrolling: touch;
}

.lineup-skin-grid::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.lineup-skin-grid.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.lineup-skin-choice {
  display: grid;
  width: calc(100% - 34px);
  min-width: calc(100% - 34px);
  flex: 0 0 calc(100% - 34px);
  align-content: start;
  justify-items: stretch;
  gap: 6px;
  padding: 10px;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #444951;
  background: #fff;
  cursor: pointer;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  text-align: left;
  touch-action: pan-x;
  -webkit-tap-highlight-color: transparent;
}

.lineup-skin-choice.is-selected {
  border-color: #fa7298;
  background: #fff8fa;
  box-shadow: inset 3px 0 #fa7298;
}

.lineup-skin-choice:disabled {
  cursor: wait;
  opacity: 0.52;
}

.lineup-skin-choice__image {
  position: relative;
  display: grid;
  width: 100%;
  height: clamp(300px, 48vh, 420px);
  place-items: center;
  overflow: hidden;
  border: 1px solid #eceef1;
  background: #fafbfc;
}

.lineup-skin-choice__image.has-no-image::before {
  color: #aeb3bb;
  content: "暂无立绘";
  font-size: 12px;
  font-weight: 800;
}

.lineup-skin-choice__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lineup-skin-choice__image img[hidden] {
  display: none;
}

.lineup-skin-choice > strong {
  overflow: hidden;
  padding-top: 2px;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lineup-skin-choice__state {
  color: #999ea7;
  font-size: 10px;
  font-weight: 800;
}

.lineup-skin-choice.is-selected .lineup-skin-choice__state {
  color: #d94f76;
}

.lineup-skin-status {
  min-height: 34px;
  flex: 0 0 auto;
  margin: 0;
  padding: 8px 14px 10px;
  border-top: 1px solid #e5e7ea;
  color: #777c85;
  font-size: 10px;
  line-height: 1.45;
  text-align: center;
}

.lineup-skin-status.is-error {
  color: #d94f76;
}

.lineup-advancement-layer {
  position: absolute;
  z-index: 42;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(31, 35, 42, 0.42);
}

.lineup-advancement-layer[hidden] {
  display: none;
}

.lineup-advancement-card {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 344px;
  max-height: calc(100% - 20px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 20px 48px rgba(34, 39, 48, 0.24);
}

.lineup-advancement-card > header {
  flex: 0 0 auto;
  padding: 17px 52px 13px 16px;
  border-bottom: 1px solid #e5e7ea;
}

.lineup-advancement-card > header small,
.lineup-advancement-card > header h2 {
  margin: 0;
}

.lineup-advancement-card > header small {
  color: #fa7298;
  font-size: 9px;
  font-weight: 700;
}

.lineup-advancement-card > header h2 {
  margin-top: 3px;
  overflow: hidden;
  font-size: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lineup-advancement-close {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #777d87;
  background: transparent;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.lineup-advancement-summary {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 10px 12px;
  background: #f6f7f9;
}

.lineup-advancement-summary span,
.lineup-advancement-summary strong {
  display: block;
  min-width: 0;
}

.lineup-advancement-summary span {
  color: #858a93;
  font-size: 9px;
  text-align: center;
}

.lineup-advancement-summary strong {
  margin-top: 3px;
  overflow: hidden;
  color: #2b2e34;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lineup-advancement-stages {
  display: grid;
  min-height: 0;
  gap: 7px;
  flex: 1 1 auto;
  margin: 0;
  padding: 11px 12px;
  overflow-x: hidden;
  overflow-y: auto;
  list-style: none;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

.lineup-advancement-stage {
  display: grid;
  min-width: 0;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  padding: 9px;
  border: 1px solid transparent;
  background: #f6f7f9;
}

.lineup-advancement-stage.is-next {
  border-color: #fa7298;
  background: #fff8fa;
}

.lineup-advancement-stage.is-unlocked {
  background: #fff;
  box-shadow: inset 3px 0 #fa7298;
}

.lineup-advancement-stage__badge {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: #aeb3bb;
  font: 800 12px/1 Bahnschrift, "DIN Alternate", sans-serif;
}

.lineup-advancement-stage.is-next .lineup-advancement-stage__badge,
.lineup-advancement-stage.is-unlocked .lineup-advancement-stage__badge {
  background: #fa7298;
}

.lineup-advancement-stage__copy {
  min-width: 0;
}

.lineup-advancement-stage__copy strong,
.lineup-advancement-stage__copy p,
.lineup-advancement-stage__cost {
  margin: 0;
}

.lineup-advancement-stage__copy strong {
  display: block;
  color: #30343a;
  font-size: 12px;
}

.lineup-advancement-stage__copy p {
  margin-top: 3px;
  color: #777d86;
  font-size: 10px;
  line-height: 1.45;
}

.lineup-advancement-stage__cost {
  margin-top: 5px;
  color: #9a9ea6;
  font-size: 9px;
  font-weight: 700;
}

.lineup-advancement-stage.is-next .lineup-advancement-stage__cost {
  color: #d94f76;
}

.lineup-advancement-status {
  min-height: 28px;
  flex: 0 0 auto;
  margin: 0;
  padding: 6px 14px 8px;
  color: #777c85;
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
}

.lineup-advancement-status.is-error {
  color: #d94f76;
}

.lineup-advancement-card > footer {
  flex: 0 0 auto;
  border-top: 1px solid #e5e7ea;
}

.lineup-advancement-submit {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 0;
  border-radius: 0;
  color: #fff;
  background: #fa7298;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.lineup-advancement-submit:disabled,
.lineup-advancement-close:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.lineup-advancement-layer[aria-busy="true"] .lineup-advancement-submit:disabled,
.lineup-advancement-layer[aria-busy="true"] .lineup-advancement-close:disabled {
  cursor: wait;
}

.lineup-advancement-close:focus-visible,
.lineup-advancement-submit:focus-visible {
  outline: 2px solid #fa7298;
  outline-offset: -3px;
}

.lineup-companion-layer {
  position: absolute;
  z-index: 43;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 14px 16px;
  background: rgba(31, 35, 42, 0.42);
}

.lineup-companion-layer[hidden] {
  display: none;
}

.lineup-companion-card {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 344px;
  max-height: calc(100% - 12px);
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 20px 48px rgba(34, 39, 48, 0.24);
}

.lineup-companion-card > header {
  min-width: 0;
  flex: 0 0 auto;
  padding: 15px 52px 11px 14px;
  border-bottom: 1px solid #e5e7ea;
}

.lineup-companion-card > header small,
.lineup-companion-card > header h2 {
  margin: 0;
}

.lineup-companion-card > header small {
  display: block;
  overflow: hidden;
  color: #fa7298;
  font-size: 9px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lineup-companion-card > header h2 {
  margin-top: 3px;
  overflow: hidden;
  font-size: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lineup-companion-close {
  position: absolute;
  z-index: 2;
  top: 9px;
  right: 9px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #777d87;
  background: transparent;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  touch-action: manipulation;
}

.lineup-companion-summary {
  display: grid;
  min-width: 0;
  flex: 0 0 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  padding: 9px 10px;
  background: #f6f7f9;
}

.lineup-companion-summary span,
.lineup-companion-summary strong {
  display: block;
  min-width: 0;
}

.lineup-companion-summary span {
  color: #858a93;
  font-size: 9px;
  text-align: center;
}

.lineup-companion-summary strong {
  margin-top: 2px;
  overflow: hidden;
  color: #2b2e34;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lineup-companion-effect {
  min-width: 0;
  flex: 0 0 auto;
  padding: 9px 10px 10px;
  border-bottom: 1px solid #e5e7ea;
}

.lineup-companion-effect > p {
  margin: 0;
  color: #646a73;
  font-size: 9px;
  line-height: 1.45;
  text-align: center;
}

.lineup-companion-attributes {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin-top: 7px;
}

.lineup-companion-attributes span {
  min-width: 0;
  padding: 4px 2px;
  overflow: hidden;
  border: 1px solid #f2c5d2;
  color: #c94e72;
  background: #fff8fa;
  font-size: 8px;
  font-weight: 750;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lineup-companion-preview {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 7px;
}

.lineup-companion-preview > span {
  display: block;
  min-width: 0;
  padding: 5px 7px;
  border-left: 3px solid #fa7298;
  background: #f6f7f9;
}

.lineup-companion-preview small,
.lineup-companion-preview strong {
  display: block;
  min-width: 0;
}

.lineup-companion-preview small {
  color: #8a8f97;
  font-size: 8px;
}

.lineup-companion-preview strong {
  margin-top: 2px;
  overflow: hidden;
  color: #30343a;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lineup-companion-levels {
  display: grid;
  min-width: 0;
  min-height: 0;
  gap: 6px;
  flex: 1 1 auto;
  margin: 0;
  padding: 9px 10px;
  overflow-x: hidden;
  overflow-y: auto;
  list-style: none;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

.lineup-companion-level {
  display: grid;
  min-width: 0;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 8px;
  border: 1px solid transparent;
  background: #f6f7f9;
}

.lineup-companion-level.is-next {
  border-color: #fa7298;
  background: #fff8fa;
}

.lineup-companion-level.is-unlocked {
  background: #fff;
  box-shadow: inset 3px 0 #fa7298;
}

.lineup-companion-level--empty {
  display: block;
  color: #d94f76;
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

.lineup-companion-level__badge {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #fff;
  background: #aeb3bb;
  font: 800 12px/1 Bahnschrift, "DIN Alternate", sans-serif;
}

.lineup-companion-level.is-next .lineup-companion-level__badge,
.lineup-companion-level.is-unlocked .lineup-companion-level__badge {
  background: #fa7298;
}

.lineup-companion-level__copy {
  min-width: 0;
}

.lineup-companion-level__copy strong,
.lineup-companion-level__copy p,
.lineup-companion-level__cost {
  margin: 0;
}

.lineup-companion-level__copy strong {
  display: block;
  color: #30343a;
  font-size: 11px;
}

.lineup-companion-level__copy p {
  margin-top: 2px;
  color: #777d86;
  font-size: 9px;
  line-height: 1.4;
}

.lineup-companion-level__cost {
  color: #9a9ea6;
  font-weight: 700;
}

.lineup-companion-level.is-next .lineup-companion-level__cost {
  color: #d94f76;
}

.lineup-companion-status {
  min-height: 32px;
  min-width: 0;
  flex: 0 0 auto;
  margin: 0;
  padding: 6px 12px 8px;
  overflow-wrap: anywhere;
  color: #777c85;
  font-size: 9px;
  line-height: 1.4;
  text-align: center;
}

.lineup-companion-status.is-error {
  color: #d94f76;
}

.lineup-companion-card > footer {
  flex: 0 0 auto;
  border-top: 1px solid #e5e7ea;
}

.lineup-companion-submit {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 0;
  border-radius: 0;
  color: #fff;
  background: #fa7298;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.lineup-companion-submit:disabled,
.lineup-companion-close:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

/* 伙伴电话虫 */
.lineup-snail-layer {
  position: fixed;
  z-index: 82;
  display: grid;
  padding: 12px;
  place-items: center;
  background: rgb(30 35 44 / 46%);
  inset: 0;
}

.lineup-snail-layer[hidden] { display: none; }

.lineup-snail-card {
  position: relative;
  display: grid;
  width: min(342px, calc(100vw - 24px));
  height: min(500px, 76dvh);
  max-height: calc(100dvh - 24px);
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid #fa7298;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 18px 55px rgb(34 34 34 / 24%);
}

.lineup-snail-card > header {
  padding-right: 44px;
}

.lineup-snail-card > header small {
  display: block;
  margin-bottom: 3px;
  color: #e85c85;
  font-size: 9px;
  font-weight: 800;
}

.lineup-snail-card > header h2 {
  margin: 0;
  font-size: 18px;
}

.lineup-snail-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #777d86;
  background: #fff;
  cursor: pointer;
  font: 22px/1 Arial, sans-serif;
}

.lineup-snail-preview {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 8px;
  padding: 10px 8px;
  border: 1px solid #f1d9a7;
  background: #fffaf0;
}

.lineup-snail-body { min-height:0; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; touch-action:pan-y; }
.lineup-snail-body > .lineup-snail-preview + .lineup-snail-preview { margin-top:10px; }
.lineup-snail-body, .partner-medals-body, .equipment-body { scrollbar-width:none; -webkit-overflow-scrolling:touch; }
.lineup-snail-body::-webkit-scrollbar, .partner-medals-body::-webkit-scrollbar, .equipment-body::-webkit-scrollbar { display:none; width:0; height:0; }

.lineup-advancement-stage.is-initial {
  grid-template-columns: minmax(0, 1fr);
  background: #fff4f8;
  box-shadow: inset 3px 0 #fa7298;
}
.lineup-snail-preview[hidden] { display:none; }

.lineup-snail-preview img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  image-rendering: auto;
}

.lineup-snail-preview > div {
  display: grid;
  min-width: 0;
  gap: 3px;
  text-align: left;
}

.lineup-snail-preview strong { font-size: 12px; overflow-wrap:anywhere; }
.lineup-snail-preview span { color: #b77a09; font-size: 11px; font-weight: 800; }
.lineup-snail-preview small { color: #747982; font-size: 10px; }

.lineup-snail-status {
  min-height: 18px;
  margin: 0;
  color: #777d86;
  font-size: 10px;
  text-align: center;
}

.lineup-snail-status.is-error { color: #d94f76; }

.lineup-snail-submit {
  height: 36px;
  min-width: 0;
  padding: 0 6px;
  border: 1px solid #fa7298;
  border-radius: 0;
  color: #fff;
  background: #fa7298;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.lineup-snail-submit.is-equipped {
  color: #e85c85;
  background: #fff;
}

.lineup-snail-close:disabled,
.lineup-snail-submit:disabled {
  cursor: wait;
  opacity: 0.55;
}

.lineup-snail-close:focus-visible,
.lineup-snail-submit:focus-visible {
  outline: 2px solid #fa7298;
  outline-offset: -2px;
}

.lineup-companion-layer[aria-busy="true"] .lineup-companion-submit:disabled,
.lineup-companion-layer[aria-busy="true"] .lineup-companion-close:disabled {
  cursor: wait;
}

.lineup-companion-close:focus-visible,
.lineup-companion-submit:focus-visible {
  outline: 2px solid #fa7298;
  outline-offset: -3px;
}

.bag-page {
  position: relative;
  top: -16px;
  display: flex;
  width: 100%;
  height: calc(100% + 16px);
  flex-direction: column;
  overflow: hidden;
  color: #222;
  background: #fff;
}

.bag-page[hidden] {
  display: none;
}

.bag-page__header {
  display: flex;
  min-height: 76px;
  align-items: flex-end;
  justify-content: space-between;
  flex: 0 0 auto;
  padding: 15px 18px 13px;
  border-bottom: 1px solid #dfe2e6;
  background: #fff;
}

.bag-page__header p,
.bag-page__header h2 {
  margin: 0;
}

.bag-page__header p {
  margin-bottom: 3px;
  color: #999;
  font-size: 10px;
}

.bag-page__header h2 {
  font-size: 22px;
  line-height: 1.1;
}

.bag-page__header > span {
  padding-bottom: 2px;
  color: #8d9199;
  font-size: 12px;
  font-weight: 700;
}

.bag-page__body {
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  padding: 14px 18px 28px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.bag-page__body::-webkit-scrollbar {
  display: none;
}

.bag-page__body::-webkit-scrollbar-thumb {
  border-radius: 0;
  background: #c9ccd2;
}

.bag-page__status {
  display: grid;
  width: 100%;
  min-height: 190px;
  place-items: center;
  margin: 0;
  padding: 24px;
  border: 1px solid #e1e4e8;
  color: #8d9199;
  background: #fafbfc;
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

.bag-page__status[hidden] {
  display: none;
}

.bag-page__status[data-state="loading"] {
  color: #777;
}

.bag-page__status[data-state="empty"] {
  min-height: 76px;
}

.bag-page__status[data-state="error"] {
  border-color: #ffc3d3;
  color: #d94f75;
  background: #fff8fa;
}

.bag-page__status[data-state="toast"] {
  position: fixed;
  z-index: 260;
  left: 50%;
  bottom: calc(78px + env(safe-area-inset-bottom));
  width: max-content;
  max-width: calc(100vw - 32px);
  min-height: 0;
  margin: 0;
  padding: 11px 16px;
  transform: translateX(-50%);
  border-color: #fa7298;
  color: #df527a;
  background: #fff;
  box-shadow: 0 8px 24px rgb(33 42 54 / 14%);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  white-space: nowrap;
  pointer-events: none;
}

.bag-section + .bag-section {
  margin-top: 22px;
}

.bag-section[hidden] {
  display: none;
}

.bag-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e4e6e9;
}

.bag-section__header h3 {
  margin: 0;
  font-size: 15px;
}

.bag-section__header span {
  color: #999;
  font-size: 10px;
}

.bag-tabs {
  display: grid;
  height: 95px;
  flex: 0 0 95px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 7px 18px;
  border-bottom: 1px solid #f2d3dc;
  background: #fff;
}

.bag-tab {
  min-width: 0;
  height: 36px;
  padding: 0;
  border: 1px solid #f3a1b9;
  border-radius: 0;
  color: #7d8189;
  background: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  line-height: 34px;
  white-space: nowrap;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.bag-tab.is-active {
  border-color: #fa7298;
  color: #d94f78;
  background: #fff2f6;
}

.bag-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.bag-card {
  display: grid;
  min-width: 0;
  min-height: 82px;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 8px;
  overflow: hidden;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  background: #fff;
}

.bag-card__image {
  position: relative;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #eceef1;
  background: #fafbfc;
}

.bag-card__image.has-no-image::before {
  color: #b6bac1;
  content: "?";
  font-size: 22px;
  font-weight: 700;
}

.bag-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.bag-card__image img[hidden] {
  display: none;
}

.bag-card__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.bag-card__name {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  color: #444;
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.bag-card__quantity {
  color: #fa7298;
  font-family: Bahnschrift, "DIN Alternate", sans-serif;
  font-size: 14px;
  font-weight: 750;
}

.bag-card__use,
.bag-card__choose-fragments,
.bag-card__activate-skin {
  width: 100%;
  height: 27px;
  padding: 0 5px;
  border: 1px solid #fa7298;
  border-radius: 0;
  color: #d94f76;
  background: #fff7f9;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.bag-card__use:disabled,
.bag-card__choose-fragments:disabled,
.bag-card__activate-skin:disabled {
  border-color: #dfe2e6;
  color: #999;
  background: #f3f4f6;
  cursor: default;
}

.bag-use-layer {
  position: absolute;
  z-index: 6;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 14px;
  background: rgba(245, 246, 248, 0.97);
}

.bag-use-layer[hidden] {
  display: none;
}

.bag-use-card {
  position: relative;
  display: grid;
  width: min(310px, 100%);
  max-height: 100%;
  gap: 10px;
  padding: 14px;
  overflow-y: auto;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 14px 38px rgba(31, 38, 52, 0.16);
}

.bag-use-card > header {
  padding: 0 34px 10px;
  border-bottom: 1px solid #e3e5e7;
  text-align: center;
}

.bag-use-card > header small,
.bag-use-card > header h3 {
  margin: 0;
}

.bag-use-card > header small {
  color: #fa7298;
  font-size: 9px;
  letter-spacing: 0.12em;
}

.bag-use-card > header h3 {
  margin-top: 3px;
  font-size: 17px;
}

.bag-use-card__close {
  position: absolute;
  z-index: 2;
  top: 9px;
  right: 9px;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #777;
  background: #fff;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.bag-use-card__close:hover:not(:disabled) {
  border-color: #fa7298;
  color: #fa7298;
}

.bag-use-card__close:disabled {
  cursor: wait;
  opacity: 0.45;
}

.bag-use-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 1px solid #eceef1;
  background: #fafbfc;
}

.bag-use-item img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.bag-use-item > span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.bag-use-item strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bag-use-item small {
  color: #888;
  font-size: 10px;
}

.bag-use-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  align-items: center;
  gap: 8px;
  color: #555;
  font-size: 11px;
  font-weight: 800;
}

#bag-use-quantity {
  width: 88px;
  height: 36px;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid #d8dce1;
  border-radius: 0;
  outline: none;
  background: #fff;
  font-size: 16px;
  font-weight: 800;
  text-align: center;
}

#bag-use-quantity:focus {
  border-color: #fa7298;
  box-shadow: inset 3px 0 #fa7298;
}

#bag-use-quantity.is-invalid {
  border-color: #fa7298;
  background: #fff7f9;
}

.bag-use-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.bag-use-shortcuts button {
  height: 31px;
  padding: 0 5px;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #777;
  background: #fff;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.bag-use-shortcuts button:hover:not(:disabled),
.bag-use-shortcuts button[aria-pressed="true"] {
  border-color: #fa7298;
  color: #d94f76;
  background: #fff7f9;
}

.bag-use-shortcuts button:disabled {
  cursor: default;
  opacity: 0.42;
}

.bag-use-summary,
.bag-use-status {
  margin: 0;
  text-align: center;
}

.bag-use-summary {
  padding: 8px;
  border: 1px solid #eceef1;
  color: #777;
  background: #fafbfc;
  font-size: 11px;
}

.bag-use-summary strong {
  color: #fa7298;
  font-size: 14px;
}

.bag-use-status {
  min-height: 18px;
  color: #d94f76;
  font-size: 10px;
}

.bag-use-card > footer {
  display: grid;
}

.bag-use-submit {
  height: 40px;
  border: 1px solid #fa7298;
  border-radius: 0;
  color: #fff;
  background: #fa7298;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.bag-use-submit:disabled {
  cursor: default;
  opacity: 0.5;
}

.bag-fragment-choice-layer {
  position: absolute;
  z-index: 7;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 14px;
  background: rgba(245, 246, 248, 0.97);
}

.bag-fragment-choice-layer[hidden] {
  display: none;
}

.bag-fragment-choice-card {
  position: relative;
  display: grid;
  width: min(330px, 100%);
  max-height: 100%;
  gap: 10px;
  padding: 14px;
  overflow-y: auto;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 14px 38px rgba(31, 38, 52, 0.16);
}

.bag-fragment-choice-card > header {
  padding: 0 34px 10px;
  border-bottom: 1px solid #e3e5e7;
  text-align: center;
}

.bag-fragment-choice-card > header small,
.bag-fragment-choice-card > header h3,
.bag-fragment-choice-card > header p {
  margin: 0;
}

.bag-fragment-choice-card > header small {
  color: #fa7298;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.bag-fragment-choice-card > header h3 {
  margin-top: 3px;
  font-size: 17px;
}

.bag-fragment-choice-card > header p {
  margin-top: 5px;
  color: #858a92;
  font-size: 10px;
}

.bag-fragment-choice-card > header p strong {
  color: #d94f76;
}

.bag-fragment-choice-card__close {
  position: absolute;
  z-index: 2;
  top: 9px;
  right: 9px;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #777;
  background: #fff;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.bag-fragment-choice-options {
  display: grid;
  gap: 7px;
}

.bag-fragment-choice-option {
  display: grid;
  min-width: 0;
  min-height: 64px;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border: 1px solid #e1e4e8;
  border-radius: 0;
  color: #34383e;
  background: #fafbfc;
  cursor: pointer;
  text-align: left;
}

.bag-fragment-choice-option[aria-pressed="true"] {
  border-color: #fa7298;
  background: #fff7f9;
  box-shadow: inset 3px 0 #fa7298;
}

.bag-fragment-choice-option img {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: cover;
}

.bag-fragment-choice-option img[hidden] {
  display: none;
}

.bag-fragment-choice-option > span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.bag-fragment-choice-option strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bag-fragment-choice-option small {
  color: #858a92;
  font-size: 9px;
}

.bag-fragment-choice-option b {
  min-width: 46px;
  color: #d94f76;
  font-size: 10px;
  text-align: center;
}

.bag-fragment-choice-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  align-items: center;
  gap: 8px;
  color: #555;
  font-size: 11px;
  font-weight: 800;
}

#bag-fragment-choice-quantity {
  width: 88px;
  height: 36px;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid #d8dce1;
  border-radius: 0;
  outline: none;
  background: #fff;
  font-size: 16px;
  font-weight: 800;
  text-align: center;
}

#bag-fragment-choice-quantity:focus {
  border-color: #fa7298;
  box-shadow: inset 3px 0 #fa7298;
}

#bag-fragment-choice-quantity.is-invalid {
  border-color: #fa7298;
  background: #fff7f9;
}

.bag-fragment-choice-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.bag-fragment-choice-shortcuts button {
  height: 31px;
  padding: 0 5px;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #777;
  background: #fff;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.bag-fragment-choice-shortcuts button[aria-pressed="true"] {
  border-color: #fa7298;
  color: #d94f76;
  background: #fff7f9;
}

.bag-fragment-choice-summary,
.bag-fragment-choice-status {
  margin: 0;
  text-align: center;
}

.bag-fragment-choice-summary {
  padding: 8px;
  border: 1px solid #eceef1;
  color: #6f747d;
  background: #fafbfc;
  font-size: 10px;
  line-height: 1.5;
}

.bag-fragment-choice-status {
  min-height: 17px;
  color: #777c85;
  font-size: 10px;
}

.bag-fragment-choice-status.is-error {
  color: #d94f76;
}

.bag-fragment-choice-card > footer {
  display: grid;
}

.bag-fragment-choice-submit {
  height: 40px;
  border: 1px solid #fa7298;
  border-radius: 0;
  color: #fff;
  background: #fa7298;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.bag-fragment-choice-card button:disabled {
  cursor: default;
  opacity: 0.5;
}

.bag-skin-layer {
  position: absolute;
  z-index: 7;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 14px;
  background: rgba(245, 246, 248, 0.97);
}

.bag-skin-layer[hidden] {
  display: none;
}

.bag-skin-card {
  position: relative;
  display: grid;
  width: min(310px, 100%);
  max-height: 100%;
  gap: 11px;
  padding: 14px;
  overflow-y: auto;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 14px 38px rgba(31, 38, 52, 0.16);
}

.bag-skin-card > header {
  padding: 0 34px 10px;
  border-bottom: 1px solid #e3e5e7;
  text-align: center;
}

.bag-skin-card > header small,
.bag-skin-card > header h3 {
  margin: 0;
}

.bag-skin-card > header small {
  color: #fa7298;
  font-size: 9px;
  letter-spacing: 0.12em;
}

.bag-skin-card > header h3 {
  margin-top: 3px;
  font-size: 17px;
}

.bag-skin-card__close {
  position: absolute;
  z-index: 2;
  top: 9px;
  right: 9px;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #777;
  background: #fff;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.bag-skin-card__preview {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 11px;
  border: 1px solid #eceef1;
  background: #fafbfc;
}

.bag-skin-card__preview img {
  width: 78px;
  height: 78px;
  object-fit: contain;
}

.bag-skin-card__preview img[hidden] {
  display: none;
}

.bag-skin-card__preview strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bag-skin-card > p {
  margin: 0;
  color: #6f747d;
  font-size: 10px;
  line-height: 1.55;
  text-align: center;
}

.bag-skin-card > .bag-skin-card__status {
  min-height: 16px;
  color: #777c85;
}

.bag-skin-card > .bag-skin-card__status.is-error {
  color: #d94f76;
}

.bag-skin-card > footer {
  display: grid;
}

.bag-skin-activate-submit {
  height: 40px;
  border: 1px solid #fa7298;
  border-radius: 0;
  color: #fff;
  background: #fa7298;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.bag-skin-card button:disabled {
  cursor: wait;
  opacity: 0.5;
}

.bag-transponder-snails-section {
  min-height: 100%;
  margin-top: 0 !important;
}

.bag-transponder-snails-status {
  min-height: 34px;
  margin: 0;
  padding: 9px 12px;
  border-bottom: 1px solid #eceef1;
  color: #7a7f88;
  background: #fffafc;
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

.bag-transponder-snails-status[hidden] {
  display: none;
}

.bag-transponder-snails-status.is-error {
  color: #d94f76;
}

.bag-transponder-snails-grid {
  display: grid;
  min-height: 120px;
  gap: 9px;
  padding: 12px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
}

.bag-transponder-snails-grid::-webkit-scrollbar {
  display: none;
}

.bag-transponder-snail-card {
  display: grid;
  min-width: 0;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: stretch;
  overflow: hidden;
  border: 1px solid #e1e4e8;
  border-radius: 0;
  background: #fff;
}

.bag-transponder-snail-card__image {
  display: grid;
  min-height: 112px;
  place-items: center;
  overflow: hidden;
  border-right: 1px solid #eceef1;
  background: #fafbfc;
}

.bag-transponder-snail-card__image.has-no-image::after {
  color: #aaaeb5;
  content: "暂无图片";
  font-size: 9px;
}

.bag-transponder-snail-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 126px;
  object-fit: contain;
}

.bag-transponder-snail-card__image img[hidden] {
  display: none;
}

.bag-transponder-snail-card__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
}

.bag-transponder-snail-card__copy strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bag-transponder-snail-card__quality {
  color: #bc861c;
  font-size: 9px;
  font-weight: 800;
}

.bag-transponder-snail-card__copy p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #717680;
  font-size: 9px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.bag-transponder-snail-card__state {
  margin-top: auto;
  color: #e85c85;
  font-size: 9px;
  font-weight: 800;
}

.formation-dialog {
  width: min(358px, calc(100vw - 24px));
  height: calc(100vh - 24px);
  max-height: 740px;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #222;
  background: #f4f5f7;
  box-shadow: 0 18px 55px rgba(34, 34, 34, 0.22);
}

.formation-dialog::backdrop {
  background: rgba(34, 34, 34, 0.32);
  backdrop-filter: blur(2px);
}

.formation-panel {
  display: flex;
  height: 100%;
  max-height: none;
  flex-direction: column;
}

.formation-panel__header {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 10px 14px;
  border-bottom: 1px solid #e3e5e7;
  background: #fff;
}

.formation-panel__header p,
.formation-panel__header h2 {
  margin: 0;
}

.formation-panel__header p {
  margin-bottom: 2px;
  color: #fa7298;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.formation-panel__header h2 {
  font-size: 18px;
}

.formation-dialog__close {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #777;
  background: #fff;
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 24px;
  line-height: 1;
}

.formation-dialog__close:hover {
  border-color: #fa7298;
  color: #fa7298;
}

.formation-dialog__close:disabled {
  cursor: wait;
  opacity: 0.55;
}

.formation-panel__body {
  flex: 1;
  min-height: 0;
  padding: 10px 14px 12px;
  overflow-y: auto;
}

.formation-help {
  min-height: 28px;
  margin: 0 0 10px;
  padding: 7px 9px;
  border-left: 3px solid #fa7298;
  color: #777;
  background: #fff;
  font-size: 11px;
}

.formation-section + .formation-section {
  margin-top: 12px;
}

.formation-section__title {
  display: flex;
  height: 28px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 0 8px;
  border-bottom: 1px solid #e3e5e7;
  background: #fff;
}

.formation-section__title h3 {
  margin: 0;
  font-size: 14px;
}

.formation-section__title span {
  color: #999;
  font-family: Bahnschrift, "DIN Alternate", sans-serif;
  font-size: 10px;
}

.formation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.formation-hero-slot {
  position: relative;
  display: flex;
  min-width: 0;
  height: 76px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  padding: 6px 4px 4px;
  overflow: hidden;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #555;
  background: #fff;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
}

.formation-hero-slot.has-member {
  cursor: grab;
  touch-action: none;
}

.formation-hero-slot.has-member:active {
  cursor: grabbing;
}

.formation-hero-slot img {
  display: block;
  width: 46px;
  height: 46px;
  border: 1px solid #eceef0;
  object-fit: cover;
}

.formation-hero-slot strong {
  display: block;
  width: 100%;
  overflow: hidden;
  font-size: 10px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.formation-hero-slot__position {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 18px;
  height: 17px;
  place-items: center;
  color: #fff;
  background: #9da2aa;
  font-family: Bahnschrift, "DIN Alternate", sans-serif;
  font-size: 9px;
  font-weight: 700;
}

.formation-hero-slot__badge {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  width: 19px;
  height: 17px;
  place-items: center;
  color: #fff;
  background: #fa7298;
  font-size: 9px;
  font-weight: 700;
}

.formation-hero-slot.has-member:hover,
.formation-hero-slot.is-drop-target,
.formation-cannon.is-drop-target {
  border-color: #fa7298;
}

.formation-hero-slot.is-drop-target,
.formation-cannon.is-drop-target {
  box-shadow: inset 0 0 0 2px rgba(250, 114, 152, 0.2);
}

.formation-hero-slot.is-drop-target .formation-hero-slot__position {
  background: #fa7298;
}

.formation-hero-slot.is-dragging,
.formation-cannon.is-dragging {
  opacity: 0.32;
}

.formation-hero-slot__empty {
  color: #aaa;
  font-size: 28px;
}

.formation-section[aria-labelledby="formation-cannon-title"] > .formation-section__title {
  padding-inline: 4px;
}

.formation-cannons {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 0 4px;
}

.formation-cannon {
  display: grid;
  width: 100%;
  min-width: 0;
  height: auto;
  aspect-ratio: 1;
  place-items: center;
  padding: 6px;
  overflow: hidden;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #aaa;
  background: #f8f9fb;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.formation-cannon span {
  font-size: 26px;
  line-height: 1;
}

.formation-cannon.has-cannon {
  border-color: transparent;
  background: transparent;
  padding: 0;
  cursor: grab;
  touch-action: none;
}

.formation-cannon.has-cannon:active {
  cursor: grabbing;
}

.formation-cannon-icon {
  position: relative;
  display: block;
  width: 64px;
  aspect-ratio: 88 / 90;
  flex: none;
  pointer-events: none;
}
.formation-cannon .formation-cannon-icon { width: calc(100% * 88 / 90); }
.formation-cannon-icon::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--cannon-frame) center / contain no-repeat;
  content: "";
}
.formation-cannon-icon img {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: calc(100% * 78 / 88);
  height: calc(100% * 78 / 90);
  transform: translate(-50%, -50%);
  object-fit: contain;
}

.formation-drag-ghost {
  position: fixed !important;
  z-index: 10000;
  margin: 0 !important;
  pointer-events: none !important;
  opacity: 0.9;
  box-shadow: 0 10px 24px rgba(25, 30, 40, 0.24);
}

.formation-cannon-dialog {
  width: min(350px, calc(100vw - 28px));
  max-width: 350px;
  max-height: min(700px, calc(100dvh - 36px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  color: #333;
  background: transparent;
}

.formation-cannon-dialog::backdrop {
  background: rgba(30, 35, 44, 0.45);
}

.formation-cannon-picker {
  display: flex;
  max-height: min(700px, calc(100dvh - 36px));
  flex-direction: column;
  border: 1px solid #dfe2e6;
  background: #f5f6f8;
  box-shadow: 0 18px 48px rgba(25, 30, 40, 0.28);
}

.formation-cannon-picker__header {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 10px 14px;
  border-bottom: 1px solid #e3e5e7;
  background: #fff;
}

.formation-cannon-picker__header p,
.formation-cannon-picker__header h2 {
  margin: 0;
}

.formation-cannon-picker__header p {
  margin-bottom: 2px;
  color: #fa7298;
  font-size: 10px;
  font-weight: 700;
}

.formation-cannon-picker__header h2 {
  font-size: 18px;
}

.formation-cannon-dialog__close {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  color: #777;
  background: transparent;
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 24px;
}

.formation-cannon-picker__body {
  min-height: 0;
  padding: 10px;
  overflow-y: auto;
  overflow-x: hidden;
  touch-action: pan-y;
  overscroll-behavior-y: contain;
}

.formation-cannon-remove {
  width: 100%;
  height: 36px;
  margin-bottom: 8px;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #777;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
}

.formation-cannon-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
}

.formation-cannon-option {
  display: grid;
  min-width: 0;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 60px;
  padding: 4px;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #444;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.formation-cannon-option.is-selected {
  border-color: #fa7298;
  background: #fff7fa;
}


.formation-cannon-option span,
.formation-cannon-option strong,
.formation-cannon-option small {
  display: block;
  min-width: 0;
}

.formation-cannon-option strong,
.formation-cannon-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.formation-cannon-option strong {
  font-size: 14px;
}

.formation-cannon-option small {
  margin-top: 5px;
  color: #999;
  font-size: 11px;
}

.formation-cannon-picker__status {
  min-height: 18px;
  margin: 8px 0 0;
  color: #999;
  font-size: 10px;
  text-align: center;
}

.formation-environment-dialog {
  width: min(350px, calc(100vw - 28px));
  max-width: 350px;
  max-height: min(700px, calc(100dvh - 36px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  color: #333;
  background: transparent;
}

.formation-environment-dialog::backdrop {
  background: rgba(30, 35, 44, 0.45);
}

.formation-environment-picker {
  display: flex;
  width: 100%;
  max-height: min(700px, calc(100dvh - 36px));
  flex-direction: column;
  border: 1px solid #dfe2e6;
  background: #fff;
  box-shadow: 0 18px 48px rgba(25, 30, 40, 0.28);
}

.formation-environment-picker__header {
  display: flex;
  flex: 0 0 auto;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 10px 14px;
  border-bottom: 1px solid #e3e5e7;
  background: #fff;
}

.formation-environment-picker__header p,
.formation-environment-picker__header h2 {
  margin: 0;
}

.formation-environment-picker__header p {
  margin-bottom: 2px;
  color: #fa7298;
  font-size: 10px;
  font-weight: 700;
}

.formation-environment-picker__header h2 {
  font-size: 18px;
}

.formation-environment-dialog__close,
.formation-main-pet-dialog__close {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #777;
  background: #fff;
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 24px;
}

.formation-environment-picker__body {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  overflow: hidden;
}

.formation-environment-options {
  display: flex;
  min-width: 0;
  min-height: 0;
  gap: 10px;
  flex: 1 1 auto;
  padding: 14px 14px 16px;
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  overscroll-behavior-x: contain;
  scroll-padding-inline: 14px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  touch-action: pan-x;
  user-select: none;
  -webkit-overflow-scrolling: touch;
}

.formation-environment-options::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.formation-environment-options.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.formation-environment-options__empty {
  width: 100%;
  margin: auto;
  color: #8d929a;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

.formation-environment-option {
  display: grid;
  width: calc(100% - 34px);
  min-width: calc(100% - 34px);
  flex: 0 0 calc(100% - 34px);
  align-content: start;
  gap: 7px;
  padding: 10px;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #444;
  background: #fff;
  cursor: pointer;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  text-align: left;
  touch-action: pan-x;
  -webkit-tap-highlight-color: transparent;
}

.formation-environment-option.is-selected {
  border-color: #fa7298;
  background: #fff8fa;
  box-shadow: inset 3px 0 #fa7298;
}

.formation-environment-option:disabled {
  cursor: wait;
  opacity: 0.55;
}

.formation-environment-option__image {
  display: grid;
  width: 100%;
  height: clamp(220px, 37vh, 300px);
  place-items: center;
  overflow: hidden;
  border: 1px solid #eceef1;
  background: #fafbfc;
}

.formation-environment-option__image.has-no-image::before {
  color: #aeb3bb;
  content: "暂无预览图";
  font-size: 12px;
  font-weight: 800;
}

.formation-environment-option__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.formation-environment-option__image img[hidden] {
  display: none;
}

.formation-environment-option strong,
.formation-environment-option small,
.formation-environment-option__state {
  display: block;
  min-width: 0;
}

.formation-environment-option strong {
  overflow: hidden;
  padding-top: 2px;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.formation-environment-option small {
  min-height: 42px;
  color: #777c85;
  font-size: 9px;
  line-height: 1.5;
}

.formation-environment-option__state {
  color: #999ea7;
  font-size: 10px;
  font-weight: 800;
}

.formation-environment-option.is-selected .formation-environment-option__state {
  color: #d94f76;
}

.formation-environment-options > .formation-environment-option {
  cursor: grab;
  touch-action: pan-x pan-y;
}

.formation-environment-options .formation-environment-option__state {
  justify-self: start;
  padding: 4px 8px;
  background: #f3f4f6;
}

.formation-environment-options .is-selected .formation-environment-option__state {
  color: #fff;
  background: #e85c85;
}

.formation-environment-option__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 3px;
}

.formation-environment-option__actions button {
  min-width: 0;
  min-height: 40px;
  border: 1px solid #e85c85;
  border-radius: 0;
  color: #fff;
  background: #e85c85;
  font: 700 13px/1.3 system-ui, sans-serif;
  cursor: pointer;
}

.formation-environment-option__actions [data-environment-action="unequip"],
.formation-environment-option__actions [data-main-pet-action="unequip"] {
  color: #d94f76;
  background: #fff;
}

.formation-environment-option__actions button:disabled {
  border-color: #dfe2e6;
  color: #999ea7;
  background: #f3f4f6;
  cursor: default;
}

.formation-environment-option__actions button:focus-visible,
.formation-environment-dialog__close:focus-visible,
.formation-main-pet-dialog__close:focus-visible {
  outline: 2px solid #bf385f;
  outline-offset: 2px;
}

:is(#formation-environment-dialog, #formation-main-pet-dialog, #partner-exchange-picker-panel) .formation-environment-picker__body {
  overflow: hidden;
}

:is(#formation-environment-dialog, #formation-main-pet-dialog, #partner-exchange-picker-panel) { height:min(500px,76dvh); }
:is(#formation-environment-dialog, #formation-main-pet-dialog, #partner-exchange-picker-panel) .formation-environment-picker { height:100%; max-height:100%; box-sizing:border-box; }
:is(#formation-environment-options, #formation-main-pet-options, .partner-exchange-picker-options) { flex:1 1 auto; display:flex; flex-direction:column; max-height:none; padding:10px; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; scroll-snap-type:none; touch-action:pan-y; cursor:default; }
:is(#formation-environment-options, #formation-main-pet-options, .partner-exchange-picker-options) > .formation-environment-option { width:100%; min-width:0; flex:0 0 auto; grid-template-columns:54px minmax(0,1fr) 54px; align-items:center; gap:8px; padding:9px; scroll-snap-align:none; cursor:default; touch-action:pan-y; }
:is(#formation-environment-options, #formation-main-pet-options, .partner-exchange-picker-options) .formation-environment-option__image { width:54px; height:60px; }
:is(#formation-environment-options, #formation-main-pet-options, .partner-exchange-picker-options) .formation-environment-option__copy { min-width:0; }
:is(#formation-environment-options, #formation-main-pet-options, .partner-exchange-picker-options) .formation-environment-option strong { white-space:normal; overflow-wrap:anywhere; font-size:12px; }
:is(#formation-environment-options, #formation-main-pet-options, .partner-exchange-picker-options) .formation-environment-option__state { margin-top:5px; padding:0; color:#777c85; background:transparent; font-size:10px; }
:is(#formation-environment-options, #formation-main-pet-options, .partner-exchange-picker-options) .is-selected .formation-environment-option__state { color:#d94f76; }
:is(#formation-environment-options, #formation-main-pet-options, .partner-exchange-picker-options) .formation-environment-option__actions { grid-template-columns:1fr; margin:0; }
:is(#formation-environment-options, #formation-main-pet-options, .partner-exchange-picker-options) .formation-environment-option__actions button { min-height:36px; padding:0 6px; }
:is(#formation-environment-options, #formation-main-pet-options, .partner-exchange-picker-options) .formation-environment-option__actions button[hidden] { display:none; }

.formation-environment-picker__status {
  min-height: 34px;
  flex: 0 0 auto;
  margin: 0;
  padding: 8px 14px 10px;
  border-top: 1px solid #e5e7ea;
  color: #777c85;
  font-size: 10px;
  line-height: 1.45;
  text-align: center;
}

.formation-environment-picker__status.is-error {
  color: #d94f76;
}

.formation-status {
  min-height: 22px;
  margin: 8px 0 0;
  color: #888;
  font-size: 10px;
  text-align: center;
}

.formation-status.is-error {
  color: #d94f76;
}

.formation-panel__footer {
  display: grid;
  min-height: 58px;
  grid-template-columns: 1fr 1.5fr;
  gap: 8px;
  padding: 8px 14px;
  border-top: 1px solid #e3e5e7;
  background: #fff;
}

.formation-panel__footer button {
  height: 40px;
  padding: 0 10px;
  border-radius: 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.formation-cancel {
  border: 1px solid #dfe2e6;
  color: #666;
  background: #fff;
}

.formation-confirm {
  border: 1px solid #fa7298;
  color: #fff;
  background: #fa7298;
}

.formation-panel__footer button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.profile-name-dialog {
  width: min(316px, calc(100vw - 32px));
  max-width: 316px;
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  color: #333;
  background: transparent;
}

.profile-name-dialog::backdrop {
  background: rgba(30, 35, 44, 0.4);
}

.profile-name-card {
  position: relative;
  display: grid;
  padding: 0;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 16px 42px rgba(25, 30, 40, 0.24);
}

.profile-name-card > header {
  display: grid;
  gap: 4px;
  padding: 17px 52px 14px 16px;
}

.profile-name-card > header small,
.profile-name-card > header h2 {
  margin: 0;
}

.profile-name-card > header small {
  color: #fa7298;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.profile-name-card > header h2 {
  font-size: 19px;
  line-height: 1.3;
}

.profile-name-close {
  position: absolute;
  z-index: 1;
  top: 10px;
  right: 10px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #777d87;
  background: transparent;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

.profile-uid {
  display: grid;
  gap: 7px;
  min-width: 0;
  margin: 0 16px 13px;
}

.profile-uid > span {
  color: #747982;
  font-size: 11px;
  font-weight: 700;
}

.profile-uid > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  border: 1px solid #dfe2e6;
  background: #f7f8fa;
}

.profile-uid code {
  min-width: 0;
  overflow: hidden;
  padding: 11px;
  color: #555b64;
  font: 11px/18px ui-monospace, SFMono-Regular, Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: all;
  -webkit-user-select: all;
}

.profile-uid-copy {
  min-width: 72px;
  padding: 0 10px;
  border: 0;
  border-left: 1px solid #dfe2e6;
  border-radius: 0;
  color: #d94f76;
  background: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.profile-uid-copy:disabled {
  color: #a7abb2;
  cursor: default;
}

.profile-name-field {
  display: grid;
  gap: 7px;
  margin: 0 16px;
}

.profile-name-field > span {
  color: #747982;
  font-size: 11px;
  font-weight: 700;
}

.profile-name-field input {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  outline: 0;
  color: #222;
  background: #f7f8fa;
  font: inherit;
  font-size: 16px;
}

.profile-name-field input:focus {
  border-color: #fa7298;
  background: #fff;
  box-shadow: inset 3px 0 #fa7298;
}

.profile-name-field input[aria-invalid="true"] {
  border-color: #fa7298;
  background: #fff7f9;
}

.profile-name-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 7px 16px 0;
  color: #999da4;
  font-size: 9px;
}

.profile-name-meta strong {
  color: #d94f76;
  font-family: Bahnschrift, "DIN Alternate", sans-serif;
  font-size: 10px;
}

.profile-name-status {
  min-height: 29px;
  margin: 0;
  padding: 7px 16px 6px;
  color: #d94f76;
  font-size: 10px;
  line-height: 1.5;
}

.profile-name-card > footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  padding: 0 16px 16px;
}

.profile-name-card > footer button {
  height: 40px;
  border: 1px solid #fa7298;
  border-radius: 0;
  cursor: pointer;
  font-weight: 800;
}

.profile-name-cancel {
  color: #d94f76;
  background: #fff;
}

.profile-name-save {
  color: #fff;
  background: #fa7298;
}

.profile-name-save:disabled {
  border-color: #dfe2e6;
  color: #a7abb2;
  background: #f1f2f4;
  cursor: default;
}

.profile-name-close:focus-visible,
.profile-uid-copy:focus-visible,
.profile-name-card > footer button:focus-visible {
  outline: 2px solid rgba(250, 114, 152, 0.4);
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .profile-name-close:hover {
    color: #fa7298;
    background: #fff5f8;
  }
}

.avatar-dialog {
  width: min(358px, calc(100vw - 32px));
  max-height: min(620px, calc(100dvh - 48px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #e3e5e7;
  border-radius: 0;
  color: #222;
  background: #f4f5f7;
  box-shadow: 0 18px 55px rgba(34, 34, 34, 0.2);
}

.avatar-dialog::backdrop {
  background: rgba(34, 34, 34, 0.28);
  backdrop-filter: blur(2px);
}

.avatar-panel {
  display: flex;
  height: min(620px, calc(100dvh - 48px));
  max-height: min(620px, calc(100dvh - 48px));
  flex-direction: column;
}

.avatar-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 16px;
  border-bottom: 1px solid #e3e5e7;
  background: #fff;
}

.avatar-panel__header h2 {
  margin: 0;
}

.avatar-panel__header h2 {
  font-size: 17px;
  line-height: 1.4;
}

.avatar-dialog__close {
  min-width: 54px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #e3e5e7;
  border-radius: 0;
  color: #555;
  background: #fff;
  cursor: pointer;
}

.avatar-grid {
  display: grid;
  flex: 1;
  min-height: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start;
  gap: 8px;
  padding: 16px 14px 10px;
  overflow-y: auto;
}

.avatar-choice {
  position: relative;
  display: grid;
  min-width: 0;
  aspect-ratio: 1;
  place-items: center;
  padding: 5px;
  border: 1px solid #e3e5e7;
  border-radius: 0;
  color: #666;
  background: #fff;
  cursor: pointer;
  font-size: 10px;
  transition: border-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
  -webkit-tap-highlight-color: transparent;
}

.avatar-choice img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-choice:hover {
  border-color: #fa7298;
  color: #fa7298;
}

.avatar-choice.is-selected {
  border-color: #fa7298;
  color: #fa7298;
  box-shadow: inset 0 -3px #fa7298;
}

.avatar-choice.is-selected::after {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: #fff;
  background: #fa7298;
  content: "✓";
  font-size: 11px;
  font-weight: 800;
}

.avatar-choice:disabled {
  cursor: wait;
  opacity: 0.62;
}

.avatar-load-more {
  height: 38px;
  margin: 2px 14px 6px;
  border: 1px solid #fa7298;
  border-radius: 0;
  color: #fa7298;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
}

.avatar-load-more:hover {
  color: #fff;
  background: #fa7298;
}

.avatar-load-more[hidden] {
  display: none;
}

.avatar-status {
  min-height: 28px;
  margin: 0;
  padding: 3px 14px 9px;
  color: #999;
  font-size: 11px;
  text-align: center;
}

.avatar-status.is-error {
  color: #d94f76;
}

.feature-menu {
  position: absolute;
  z-index: 12;
  right: 10px;
  bottom: calc(90px + env(safe-area-inset-bottom));
  width: 196px;
  max-height: calc(100dvh - 112px - env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 14px 38px rgba(31, 38, 52, 0.2);
  backdrop-filter: blur(14px);
}

/* 图书馆：单分类、每页四件预览 */
.library-layer {
  position: absolute;
  z-index: 40;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 8px;
  overflow: hidden;
  background: rgba(30, 35, 44, 0.4);
}

.library-layer[hidden] {
  display: none;
}

.library-panel {
  display: flex;
  width: min(374px, 100%);
  max-width: 100%;
  height: min(720px, calc(100vh - 16px));
  max-height: calc(100vh - 16px);
  height: min(720px, calc(100dvh - 16px));
  max-height: calc(100dvh - 16px);
  height: min(720px, 100%);
  max-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #36383d;
  background: #fff;
  box-shadow: 0 18px 48px rgba(25, 30, 40, 0.24);
  scrollbar-width: none;
}

.library-panel__header {
  display: flex;
  min-height: 68px;
  flex: 0 0 68px;
  align-items: center;
  justify-content: space-between;
  padding-left: 16px;
  border-bottom: 1px solid #e3e5e7;
}

.library-panel__header p,
.library-panel__header h2 {
  margin: 0;
}

.library-panel__header p {
  color: #fa7298;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.library-panel__header h2 {
  margin-top: 3px;
  font-size: 20px;
}

.library-close {
  width: 48px;
  height: 48px;
  margin-right: 10px;
  padding: 0;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #777d87;
  background: #fff;
  cursor: pointer;
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
}

.library-content {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  scrollbar-width: none;
}

.library-content[aria-busy="true"] {
  cursor: progress;
}

.library-status {
  position: absolute;
  z-index: 8;
  top: 50%;
  left: 50%;
  width: min(292px, calc(100% - 32px));
  min-height: 30px;
  margin: 0;
  padding: 8px 12px;
  color: #8b8f97;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(31, 38, 52, 0.12);
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.library-status:empty {
  display: none;
}

.library-status.is-error {
  color: #d94f76;
}

.library-retry {
  position: absolute;
  z-index: 9;
  top: calc(50% + 34px);
  left: 50%;
  min-height: 34px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid #fa7298;
  border-radius: 0;
  color: #e85c85;
  background: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  transform: translateX(-50%);
}

.library-retry[hidden] {
  display: none;
}

.library-tabs {
  display: flex;
  height: 52px;
  flex: 0 0 52px;
  overflow-x:auto;
  scrollbar-width:none;
  align-items: center;
  gap: 3px;
  padding: 7px 8px;
  border-bottom: 1px solid #f2d3dc;
  background: #fff;
}

.library-tabs::-webkit-scrollbar { display:none; }
.library-tab {
  min-width: 48px;
  flex:0 0 auto;
  height: 36px;
  padding: 0 5px;
  border: 1px solid #f3a1b9;
  border-radius: 0;
  color: #e85c85;
  background: #fff;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  line-height: 34px;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.library-tab::after {
  content: none;
}

.library-tab.is-active {
  border-color: #fa7298;
  color: #d94f78;
  background: #fff2f6;
}

.library-section,
.library-section.is-active {
  display: flex;
  min-width: 0;
  min-height: 0;
  margin: 0;
  flex: 1 1 auto;
  flex-direction: column;
  overflow: hidden;
  border: 0;
  background: #fff;
}

.library-section[hidden] {
  display: none;
}

.library-section > header {
  display: grid;
  min-height: 42px;
  flex: 0 0 42px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border-bottom: 1px solid #eceef1;
  background: #fff;
}

.library-section > header h3 {
  margin: 0;
  font-size: 13px;
}

.library-section > header span {
  font-size: 10px;
  white-space: nowrap;
}

.library-section > header .library-page {
  min-width: 42px;
  color: #e85c85;
  font-family: Bahnschrift, "DIN Alternate", sans-serif;
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

.library-carousel {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  padding-inline: 30px;
  overflow: hidden;
  background: transparent;
}

.library-rail {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  touch-action: pan-x;
  user-select: none;
  -webkit-overflow-scrolling: touch;
}

.library-rail::-webkit-scrollbar,
.library-content::-webkit-scrollbar,
.library-panel::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.library-rail.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  scroll-snap-type: none;
}

.library-page-group {
  display: grid;
  width: 100%;
  min-width: 100%;
  height: 100%;
  flex: 0 0 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 8px;
  overflow: hidden;
  background: transparent;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.library-card {
  display: flex;
  width: auto;
  min-width: 0;
  min-height: 0;
  height: auto;
  flex: none;
  flex-direction: column;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.library-card.is-current {
  border: 0;
  box-shadow: none;
}

.library-card[role="button"] {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.library-card[role="button"]:focus-visible {
  outline: 2px solid #fa7298;
  outline-offset: -2px;
}

.library-rail.is-dragging .library-card {
  cursor: grabbing;
}

.library-detail-dialog {
  width: min(366px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: min(660px, calc(100vh - 24px));
  max-height: min(660px, calc(100dvh - 24px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #29323e;
  background: #fff;
  box-shadow: 0 18px 50px rgba(31, 38, 52, 0.18);
}

.library-detail-dialog[open] {
  display: flex;
}

.library-detail-dialog::backdrop {
  background: rgba(37, 44, 54, 0.48);
}

.library-detail-panel {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 0;
  max-height: inherit;
  flex-direction: column;
  overflow: hidden;
}

.library-detail-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid #e7e9ed;
}

.library-detail-header > div {
  min-width: 0;
}

.library-detail-header small {
  color: #f74788;
  font-size: 11px;
}

.library-detail-header h2 {
  margin: 4px 0 0;
  font-size: 19px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.library-detail-close {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  padding: 0;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #858b95;
  background: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.library-detail-close:focus-visible {
  outline: 2px solid #fa7298;
  outline-offset: -2px;
}

.library-detail-body {
  min-height: 0;
  padding: 16px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.library-detail-body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.library-detail-hero {
  padding-bottom: 16px;
  text-align: center;
}

#library-detail-image,
#tavern-skills-image {
  display: block;
  width: 100%;
  height: 176px;
  margin: 0 auto 12px;
  object-fit: contain;
}

#library-detail-image[hidden],
#tavern-skills-image[hidden] {
  display: none;
}

#library-detail-state {
  display: inline-block;
  padding: 4px 8px;
  border: 1px solid #f8cadb;
  color: #ee5185;
  background: #fff6f9;
  font-size: 11px;
}

#library-detail-state.is-owned {
  border-color: #e1e4e9;
  color: #747982;
  background: #f7f8fa;
}

#library-detail-reward {
  margin: 8px 0 0;
  color: #ee5185;
  font-size: 12px;
  line-height: 1.5;
}

.library-detail-body > section {
  padding-top: 14px;
  border-top: 1px solid #e7e9ed;
}

.library-detail-body > section + section {
  margin-top: 16px;
}

.library-detail-body h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.library-detail-body section p {
  margin: 0;
  color: #647083;
  font-size: 12px;
  line-height: 1.8;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.library-detail-skill {
  padding: 12px;
  border-left: 3px solid #fa7298;
  background: #fff6f9;
}

.library-detail-skill + .library-detail-skill {
  margin-top: 10px;
}

.library-detail-skill h4 {
  margin: 0 0 6px;
  color: #ee5185;
  font-size: 13px;
}

@media (max-height: 540px) {
  #library-detail-image,
  #tavern-skills-image {
    height: 132px;
  }
}

.library-card__image {
  position: relative;
  display: grid;
  min-height: 0;
  height: auto;
  flex: 1 1 auto;
  place-items: center;
  overflow: hidden;
  padding: 8px 8px 4px;
  background: transparent;
}

.library-card__image img,
.library-card--background .library-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.library-card__copy {
  display: grid;
  min-height: 64px;
  flex: 0 0 auto;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  align-items: center;
  gap: 3px 6px;
  padding: 7px 8px;
  border: 0;
  background: transparent;
}

.library-card__copy strong,
.library-card__copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-card__copy strong {
  padding: 0;
  font-size: 11px;
}

.library-card__copy small {
  grid-column: 1;
  color: #999da5;
  font-size: 8px;
}

.library-card__state {
  position: static;
  grid-column: 2;
  grid-row: 1 / span 2;
  min-width: 38px;
  padding: 4px 5px;
  border: 1px solid rgba(250, 114, 152, 0.55);
  color: #e85c85;
  background: rgba(250, 114, 152, 0.07);
  font-size: 8px;
  line-height: 1;
  text-align: center;
}

.library-card__image.has-no-image::after,
.library-card__image.has-image-error::after {
  color: #a5a8ae;
  content: "暂无图片";
  font-size: 10px;
}

.library-card__image.has-image-error::after {
  content: "图片加载失败";
}

.library-card__image.is-loading::before {
  color: #a5a8ae;
  content: "加载中…";
  font-size: 9px;
}

.library-card__image.is-loading img {
  position: absolute;
  inset: 8px 8px 4px;
  width: calc(100% - 16px);
  height: calc(100% - 12px);
}

.library-card.is-owned:not(.is-current) .library-card__state {
  border-color: #d8dbe0;
  color: #747982;
  background: #f7f8f9;
}

.library-rail__empty {
  display: grid;
  width: 100%;
  min-width: 100%;
  height: 100%;
  min-height: 0;
  flex: 0 0 100%;
  place-items: center;
  color: #a0a3aa;
  background: #fafafa;
  font-size: 10px;
  text-align: center;
}

.library-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  display: grid;
  width: 28px;
  height: 54px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(223, 226, 230, 0.9);
  border-radius: 0;
  color: #e85c85;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 18px rgba(31, 38, 52, 0.1);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  transform: translateY(-50%);
  -webkit-tap-highlight-color: transparent;
}

.library-arrow--prev {
  left: 1px;
}

.library-arrow--next {
  right: 1px;
}

.library-arrow:disabled {
  cursor: default;
  opacity: 0.2;
}

.library-close:focus-visible,
.library-tab:focus-visible,
.library-arrow:focus-visible,
.library-rail:focus-visible {
  outline: 2px solid #fa7298;
  outline-offset: -2px;
}

@media (hover: hover) and (pointer: fine) {
  .library-close:hover,
  .library-arrow:hover:not(:disabled) {
    border-color: #fa7298;
    color: #fa7298;
  }
}

@media (max-width: 420px) {
  .library-panel {
    width: min(374px, 100%);
    height: min(720px, calc(100vh - 16px));
    max-height: calc(100vh - 16px);
    height: min(720px, calc(100dvh - 16px));
    max-height: calc(100dvh - 16px);
    height: min(720px, 100%);
    max-height: 100%;
  }

  .library-section > header {
    gap: 8px;
    padding: 0 10px;
  }

  .library-section > header span {
    font-size: 9px;
  }

  .library-page-group {
    padding: 7px;
  }

  .library-card__image {
    padding: 7px 7px 4px;
  }

  .library-card__copy {
    min-height: 62px;
    padding: 6px 7px;
  }

  .library-arrow {
    width: 27px;
    height: 52px;
  }
}

.feature-menu[hidden] {
  display: none;
}

.feature-menu__header {
  display: flex;
  height: 38px;
  align-items: center;
  justify-content: space-between;
  padding-left: 12px;
  border-bottom: 1px solid #e3e5e7;
}

.feature-menu__header > strong {
  font-size: 13px;
}

.feature-menu__close {
  width: 38px;
  height: 37px;
  padding: 0;
  border: 0;
  border-left: 1px solid #e3e5e7;
  border-radius: 0;
  color: #777;
  background: #fff;
  cursor: pointer;
  font-size: 18px;
}

.feature-menu__item {
  display: grid;
  width: 100%;
  min-height: 58px;
  grid-template-columns: 34px minmax(0, 1fr) 12px;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 0;
  border-bottom: 1px solid #eef0f2;
  border-radius: 0;
  color: #444;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.feature-menu__item:last-child {
  border-bottom: 0;
}

.feature-menu__item:hover {
  color: #fa7298;
  background: rgba(250, 114, 152, 0.06);
}

.feature-menu__icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(250, 114, 152, 0.3);
  color: #fa7298;
  background: rgba(250, 114, 152, 0.08);
}

.feature-menu__icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-width: 1.7;
}

.feature-menu__copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.feature-menu__copy strong {
  font-size: 12px;
}

.feature-menu__copy small {
  overflow: hidden;
  color: #999;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customization-dialog {
  width: min(366px, calc(100vw - 24px));
  max-width: none;
  height: min(690px, calc(100dvh - 32px));
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #222;
  background: #f5f6f8;
  box-shadow: 0 18px 55px rgba(34, 34, 34, 0.24);
}

.customization-dialog::backdrop {
  background: rgba(27, 34, 45, 0.35);
  backdrop-filter: blur(2px);
}

.customization-panel {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
}

.customization-panel__header {
  display: flex;
  min-height: 62px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 10px 14px;
  border-bottom: 1px solid #dfe2e6;
  background: #fff;
}

.customization-panel__header p,
.customization-panel__header h2 {
  margin: 0;
}

.customization-panel__header p {
  margin-bottom: 2px;
  color: #999;
  font-size: 9px;
  letter-spacing: 0.15em;
}

.customization-panel__header h2 {
  font-size: 17px;
}

.customization-dialog__close {
  min-width: 54px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #555;
  background: #fff;
  cursor: pointer;
}

.customization-grid {
  display: grid;
  min-height: 0;
  flex: 1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 9px;
  padding: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.customization-grid.is-ship-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.customization-choice {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 5px;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #555;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.customization-choice:hover,
.customization-choice.is-selected {
  border-color: #fa7298;
  color: #fa7298;
}

.customization-choice.is-selected {
  box-shadow: inset 0 -3px #fa7298;
}

.customization-choice.is-selected::after {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  color: #fff;
  background: #fa7298;
  content: "✓";
  font-size: 12px;
  font-weight: 800;
}

.customization-choice:disabled {
  cursor: wait;
  opacity: 0.6;
}

.customization-choice__image {
  display: block;
  width: 100%;
  aspect-ratio: 0.73;
  border: 0;
  background: #e8ebef;
  object-fit: cover;
}

.is-ship-grid .customization-choice__image {
  aspect-ratio: 1;
  padding: 3px;
  background: linear-gradient(145deg, #f7fbff, #e9eef5);
  object-fit: contain;
}

.customization-choice__name {
  display: block;
  min-width: 0;
  margin-top: 6px;
  overflow: hidden;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customization-choice__meta {
  display: block;
  min-height: 14px;
  margin-top: 2px;
  overflow: hidden;
  color: #999;
  font-size: 8px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.is-ship-grid .customization-choice__meta {
  color: #b58b26;
}

.customization-status {
  min-height: 31px;
  margin: 0;
  flex: 0 0 auto;
  padding: 6px 12px 8px;
  border-top: 1px solid #dfe2e6;
  color: #888;
  background: #fff;
  font-size: 10px;
  text-align: center;
}

.customization-status.is-error {
  color: #d94f76;
}

.customization-dialog.checkin-dialog {
  height: min(306px, calc(100dvh - 32px));
  block-size: min(306px, calc(100dvh - 32px));
  max-height: none;
}

.customization-panel.checkin-panel {
  height: 100%;
  block-size: 100%;
  max-height: 100%;
}

.checkin-panel__header {
  height: 62px;
  min-height: 62px;
}

.checkin-panel__body {
  display: flex;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  background: #f5f6f8;
}

.checkin-rewards {
  display: grid;
  width: 100%;
  min-height: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  align-items: start;
  gap: 8px;
  padding: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.checkin-rewards::-webkit-scrollbar {
  display: none;
}

.checkin-rewards[aria-busy="true"] {
  opacity: 0.62;
}

.checkin-reward {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  padding: 8px 5px 7px;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #444;
  background: #fff;
}

.checkin-reward.is-placeholder .checkin-reward__image {
  background: #f4e9ee;
}

.checkin-reward__image {
  position: relative;
  display: grid;
  width: 68px;
  max-width: 100%;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(250, 114, 152, 0.16);
  background: rgba(250, 114, 152, 0.05);
}

.checkin-reward__image img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 3px;
  object-fit: contain;
}

.checkin-reward__image.has-no-image::after {
  color: #aaa;
  content: "道具";
  font-size: 10px;
}

.checkin-reward__name {
  width: 100%;
  margin-top: 7px;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.35;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checkin-reward__amount {
  margin-top: 3px;
  color: #fa7298;
  font-size: 12px;
  font-weight: 800;
}

.checkin-reward__owned {
  width: 100%;
  margin-top: 2px;
  overflow: hidden;
  color: #999;
  font-size: 8px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checkin-rewards__empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 28px 12px;
  border: 1px solid #dfe2e6;
  color: #999;
  background: #fff;
  font-size: 11px;
  text-align: center;
}

.checkin-panel__footer {
  display: grid;
  height: 74px;
  min-height: 74px;
  flex: 0 0 74px;
  grid-template-columns: minmax(0, 1fr) 104px;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-top: 1px solid #dfe2e6;
  background: #fff;
}

.checkin-status {
  min-height: 0;
  max-height: 54px;
  overflow: auto;
  overflow-wrap: anywhere;
  scrollbar-width: none;
  padding: 0;
  border: 0;
  color: #888;
  background: transparent;
  line-height: 1.45;
  text-align: left;
}

.checkin-claim {
  height: 40px;
  padding: 0 10px;
  border: 1px solid #fa7298;
  border-radius: 0;
  color: #fff;
  background: #fa7298;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.checkin-claim:hover:not(:disabled) {
  filter: brightness(0.97);
}

.checkin-claim:disabled {
  border-color: #dfe2e6;
  color: #999;
  background: #f3f4f6;
  cursor: default;
}

.tavern-panel {
  position: relative;
  overflow: hidden;
}

.tavern-main {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
}

.tavern-section-tabs {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid #dfe2e6;
  background: #f7f8fa;
}

.tavern-section-tabs button {
  height: 35px;
  min-width: 0;
  padding: 0 7px;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #777;
  background: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.tavern-section-tabs button:hover,
.tavern-section-tabs button.is-active {
  border-color: #fa7298;
  color: #d94f76;
  background: #fff7f9;
}

.tavern-section {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
}

.tavern-section[hidden] {
  display: none;
}

.tavern-ticket {
  display: grid;
  min-height: 72px;
  flex: 0 0 auto;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-bottom: 1px solid #dfe2e6;
  background: #fff;
}

.tavern-ticket__icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(250, 114, 152, 0.2);
  background: rgba(250, 114, 152, 0.05);
}

.tavern-ticket__icon img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 3px;
  object-fit: contain;
}

.tavern-ticket__copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.tavern-ticket__copy small {
  color: #999;
  font-size: 9px;
}

.tavern-ticket__copy strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tavern-ticket__owned {
  color: #777;
  font-size: 10px;
  white-space: nowrap;
}

.tavern-ticket__owned strong {
  color: #fa7298;
  font-size: 14px;
}

.tavern-heroes {
  display: grid;
  min-height: 0;
  flex: 1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 9px;
  padding: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #f5f6f8;
}

.tavern-heroes[aria-busy="true"] {
  opacity: 0.62;
}

.tavern-hero-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.tavern-hero-card > .tavern-hero {
  width: 100%;
  flex: 1 1 auto;
}

.tavern-hero-skills,
.tavern-hero-recruit {
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #fa7298;
  border-radius: 0;
  color: #ee5185;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}

.tavern-hero-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 6px;
}

.tavern-hero-actions > button {
  min-width: 0;
  padding-inline: 3px;
}

.tavern-hero-recruit {
  color: #fff;
  background: #ee5185;
}

.tavern-hero-recruit:disabled {
  cursor: default;
  opacity: 0.42;
}

.tavern-hero-skills:focus-visible,
.tavern-hero-recruit:focus-visible {
  outline: 2px solid #fa7298;
  outline-offset: -2px;
}

#library-detail-status,
#tavern-skills-description,
#tavern-skills-status {
  margin: 0 0 14px;
  color: #647083;
  font-size: 12px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

#tavern-skills-status:empty {
  display: none;
}

#tavern-skills-status.is-error {
  color: #ee5185;
}

.tavern-hero {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 5px;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #444;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.tavern-hero:hover:not(:disabled) {
  border-color: #fa7298;
  color: #fa7298;
}

.tavern-hero:disabled {
  cursor: default;
  filter: grayscale(0.18);
  opacity: 0.58;
}

.tavern-hero__art {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 0.78;
  place-items: center;
  overflow: hidden;
  background: #fff;
}

.tavern-hero__art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tavern-hero__art.has-no-image::after {
  color: #aaa;
  content: "暂无立绘";
  font-size: 10px;
}

.tavern-hero__copy {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 7px 3px 3px;
  border-top: 1px solid #eef0f2;
  text-align: center;
}

.tavern-hero__copy strong,
.tavern-hero__copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tavern-hero__copy strong {
  font-size: 11px;
}

.tavern-hero__copy small {
  color: #999;
  font-size: 9px;
}

.tavern-heroes__empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 34px 12px;
  border: 1px solid #dfe2e6;
  color: #999;
  background: #fff;
  font-size: 11px;
  text-align: center;
}

.tavern-status {
  flex: 0 0 auto;
}

.tavern-shop-balance {
  display: grid;
  min-height: 66px;
  flex: 0 0 auto;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-bottom: 1px solid #dfe2e6;
  background: #fff;
}

.tavern-shop-balance__icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(250, 114, 152, 0.2);
  background: rgba(250, 114, 152, 0.05);
}

.tavern-shop-balance__icon img {
  width: 100%;
  height: 100%;
  padding: 3px;
  object-fit: contain;
}

.tavern-shop-balance > span:last-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.tavern-shop-balance small {
  color: #999;
  font-size: 9px;
}

.tavern-shop-balance strong {
  color: #fa7298;
  font-family: Bahnschrift, "DIN Alternate", sans-serif;
  font-size: 16px;
}

.tavern-shop-items {
  display: grid;
  min-height: 0;
  flex: 1 1 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 9px;
  padding: 12px;
  overflow-x: hidden;
  overflow-y: auto;
  background: #f5f6f8;
}

.tavern-shop-items[aria-busy="true"] {
  opacity: 0.62;
}

.tavern-shop-item {
  display: grid;
  min-width: 0;
  min-height: 92px;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #444;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.tavern-shop-item:hover:not(:disabled) {
  border-color: #fa7298;
  color: #d94f76;
}

.tavern-shop-item:disabled {
  cursor: default;
  filter: grayscale(0.15);
  opacity: 0.58;
}

.tavern-shop-item__image {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #eceef1;
  background: #fafbfc;
}

.tavern-shop-item__image.has-no-image::after {
  color: #aaa;
  content: "?";
  font-size: 20px;
}

.tavern-shop-item__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tavern-shop-item__copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.tavern-shop-item__copy strong,
.tavern-shop-item__copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tavern-shop-item__copy strong {
  font-size: 11px;
}

.tavern-shop-item__copy small {
  color: #999;
  font-size: 9px;
}

.tavern-shop-item__copy small:first-of-type {
  color: #d94f76;
}

.tavern-shop-status {
  flex: 0 0 auto;
}

.tavern-layer {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 14px;
  background: rgba(245, 246, 248, 0.96);
}

.tavern-layer[hidden] {
  display: none;
}

.tavern-layer__card {
  position: relative;
  display: flex;
  width: min(310px, 100%);
  max-height: 100%;
  flex-direction: column;
  align-items: center;
  padding: 14px;
  overflow-y: auto;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 14px 38px rgba(31, 38, 52, 0.16);
}

.tavern-layer__header {
  width: 100%;
  padding-bottom: 10px;
  border-bottom: 1px solid #e3e5e7;
  text-align: center;
}

.tavern-layer__header small,
.tavern-layer__header h3 {
  margin: 0;
}

.tavern-layer__header small {
  color: #fa7298;
  font-size: 9px;
  letter-spacing: 0.12em;
}

.tavern-layer__header h3 {
  margin-top: 3px;
  font-size: 17px;
}

.tavern-layer__art {
  display: block;
  width: 100%;
  height: min(330px, 43dvh);
  margin-top: 10px;
  object-fit: contain;
}

.tavern-layer__hero-name {
  max-width: 100%;
  margin-top: 8px;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tavern-layer__message {
  margin: 7px 0 0;
  color: #777;
  font-size: 10px;
  line-height: 1.55;
  text-align: center;
}

.tavern-confirm__card .tavern-layer__header,
.tavern-shop-confirm__card .tavern-layer__header {
  padding-right: 34px;
  padding-left: 34px;
}

.tavern-confirm__card .tavern-layer__art {
  height: min(245px, 31dvh);
}

.tavern-layer__close {
  position: absolute;
  z-index: 2;
  top: 9px;
  right: 9px;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #777;
  background: #fff;
  cursor: pointer;
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
}

.tavern-layer__close:hover:not(:disabled) {
  border-color: #fa7298;
  color: #fa7298;
}

.tavern-layer__close:disabled {
  cursor: wait;
  opacity: 0.45;
}

.tavern-shop-confirm__item {
  display: grid;
  width: 100%;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  margin-top: 10px;
  padding: 8px;
  border: 1px solid #eceef1;
  background: #fafbfc;
}

.tavern-shop-confirm__item img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.tavern-shop-confirm__item > span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.tavern-shop-confirm__item strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tavern-shop-confirm__item small {
  color: #888;
  font-size: 10px;
}

.tavern-shop-quantity-field {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) 88px;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: #555;
  font-size: 11px;
  font-weight: 800;
}

#tavern-shop-quantity {
  width: 88px;
  height: 36px;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid #d8dce1;
  border-radius: 0;
  outline: none;
  background: #fff;
  font-size: 16px;
  font-weight: 800;
  text-align: center;
}

#tavern-shop-quantity:focus {
  border-color: #fa7298;
  box-shadow: inset 3px 0 #fa7298;
}

#tavern-shop-quantity.is-invalid {
  border-color: #fa7298;
  background: #fff7f9;
}

.tavern-shop-shortcuts {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.tavern-shop-shortcuts button {
  height: 31px;
  padding: 0 5px;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #777;
  background: #fff;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.tavern-shop-shortcuts button:hover:not(:disabled),
.tavern-shop-shortcuts button[aria-pressed="true"] {
  border-color: #fa7298;
  color: #d94f76;
  background: #fff7f9;
}

.tavern-shop-shortcuts button:disabled {
  cursor: default;
  opacity: 0.42;
}

.tavern-shop-confirm__summary {
  width: 100%;
  margin: 9px 0 0;
  padding: 8px;
  border: 1px solid #eceef1;
  color: #777;
  background: #fafbfc;
  font-size: 11px;
  text-align: center;
}

.tavern-shop-confirm__summary strong {
  color: #fa7298;
  font-size: 14px;
}

.tavern-payment-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
}
.tavern-payment-options legend {width:100%; padding:0; margin-bottom:8px; text-align:center; font-weight:700;}
.tavern-payment-options label {position: relative; display: flex; align-items: center; justify-content: center; padding: 10px 8px; border: 1px solid #ffd0df; background: #fff7fa; cursor: pointer; min-width: 0;}
.tavern-payment-options input {position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;}
.tavern-payment-options label:has(input:checked) {border-color: #ff6395; background: #ffe5ee;}
.tavern-payment-options label:has(input:focus-visible) {outline: 2px solid #ff6395; outline-offset: 2px;}
.tavern-payment-options span {min-width: 0; font-size: 14px; font-weight: 700;}
.tavern-payment-options small {display: block; font-size: 11px; font-weight: 400; margin-top: 4px; overflow-wrap: anywhere; color: #687386;}

.tavern-draw-control {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) 84px;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  padding: 9px;
  border: 1px solid #e3e5e7;
  background: #fafbfc;
}

.tavern-draw-control > label {
  color: #555;
  font-size: 11px;
  font-weight: 800;
}

#tavern-draw-count {
  width: 84px;
  height: 36px;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid #d8dce1;
  border-radius: 0;
  outline: none;
  color: #222;
  background: #fff;
  font-size: 16px;
  font-weight: 800;
  text-align: center;
}

#tavern-draw-count:focus {
  border-color: #fa7298;
  box-shadow: inset 3px 0 #fa7298;
}

#tavern-draw-count.is-invalid {
  border-color: #fa7298;
  background: #fff7f9;
}

#tavern-draw-count:disabled {
  color: #999;
  background: #f1f2f4;
}

.tavern-draw-shortcuts {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.tavern-draw-shortcuts button {
  height: 31px;
  padding: 0 5px;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #777;
  background: #fff;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.tavern-draw-shortcuts button:hover:not(:disabled),
.tavern-draw-shortcuts button[aria-pressed="true"] {
  border-color: #fa7298;
  color: #d94f76;
  background: #fff7f9;
}

.tavern-draw-shortcuts button:disabled {
  cursor: default;
  opacity: 0.42;
}

.tavern-layer__status {
  min-height: 18px;
  margin: 5px 0 0;
  color: #d94f76;
  font-size: 10px;
  text-align: center;
}

.tavern-layer__actions {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 8px;
}

.tavern-layer__actions button,
.tavern-result-close {
  height: 40px;
  padding: 0 9px;
  border-radius: 0;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.tavern-confirm-submit,
.tavern-shop-confirm-submit,
.tavern-result-close {
  border: 1px solid #fa7298;
  color: #fff;
  background: #fa7298;
}

.tavern-layer__actions button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.tavern-result__amount {
  margin: 9px 0 12px;
  color: #777;
  font-size: 11px;
}

.tavern-result__amount strong {
  color: #fa7298;
  font-size: 18px;
}

.tavern-result-close {
  width: 100%;
  flex: 0 0 auto;
}

.bottom-nav {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  height: calc(82px + env(safe-area-inset-bottom));
  padding: 7px 9px max(7px, env(safe-area-inset-bottom));
  border-top: 1px solid #e3e5e7;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 -10px 30px rgba(42, 48, 58, 0.07),
    inset 0 1px rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
}

.nav-item {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  padding: 4px 2px 3px;
  border: 0;
  border-radius: 0;
  color: #8d9199;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.12em;
  transition: color 180ms ease, background-color 180ms ease, transform 140ms ease;
  -webkit-tap-highlight-color: transparent;
}

.nav-item::before {
  position: absolute;
  top: -7px;
  left: 50%;
  width: 32px;
  height: 3px;
  border-radius: 0;
  background: #fa7298;
  box-shadow: 0 4px 12px rgba(250, 114, 152, 0.38);
  content: "";
  opacity: 0;
  transform: translateX(-50%) scaleX(0.2);
  transition: opacity 180ms ease, transform 180ms ease;
}

.nav-item:active {
  transform: scale(0.93);
}

.nav-item:focus-visible,
.profile-button:focus-visible,
.avatar-dialog__close:focus-visible,
.avatar-choice:focus-visible,
.avatar-load-more:focus-visible,
.lineup-slots:focus-visible,
.lineup-slot:focus-visible,
.lineup-environment-card:focus-visible,
.lineup-arrange:focus-visible,
.lineup-change:focus-visible,
.lineup-remove:focus-visible,
.lineup-skin-change:focus-visible,
.lineup-attribute:focus-visible,
.lineup-actions button:focus-visible,
.lineup-remove-card button:focus-visible,
.lineup-skin-card button:focus-visible,
.bag-card__choose-fragments:focus-visible,
.bag-card__activate-skin:focus-visible,
.bag-tab:focus-visible,
.bag-fragment-choice-card button:focus-visible,
.bag-skin-card button:focus-visible,
.formation-dialog__close:focus-visible,
.formation-hero-slot:focus-visible,
.formation-panel__footer button:focus-visible,
.feature-menu__close:focus-visible,
.feature-menu__item:focus-visible,
.customization-dialog__close:focus-visible,
.customization-choice:focus-visible,
.checkin-claim:focus-visible,
.tavern-hero:focus-visible,
.tavern-layer button:focus-visible {
  outline: 2px solid #fa7298;
  outline-offset: -2px;
}

.nav-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 0;
  transition: background-color 180ms ease, border-color 180ms ease, filter 180ms ease;
}

.feature-nav.is-open {
  color: #fa7298;
}

.feature-nav.is-open .nav-icon {
  border-color: rgba(250, 114, 152, 0.17);
  background: rgba(250, 114, 152, 0.1);
}

.nav-icon svg {
  width: 25px;
  height: 25px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.nav-item.is-active {
  color: #fa7298;
}

.nav-item.is-active::before {
  opacity: 1;
  transform: translateX(-50%) scaleX(1);
}

.nav-item.is-active .nav-icon {
  border-color: rgba(250, 114, 152, 0.17);
  background: rgba(250, 114, 152, 0.1);
  filter: drop-shadow(0 3px 6px rgba(250, 114, 152, 0.18));
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (hover: hover) and (pointer: fine) {
  .lineup-change:hover,
  .lineup-remove:hover,
  .lineup-skin-change:hover:not(:disabled),
  .bag-card__use:hover:not(:disabled),
  .bag-card__choose-fragments:hover:not(:disabled),
  .bag-card__activate-skin:hover:not(:disabled),
  .bag-fragment-choice-card__close:hover:not(:disabled),
  .bag-skin-card__close:hover:not(:disabled),
  .lineup-skin-close:hover:not(:disabled) {
    border-color: #fa7298;
    color: #fff;
    background: #fa7298;
  }

  .bag-fragment-choice-option:hover:not(:disabled) {
    border-color: #fa7298;
    background: #fff7f9;
  }

  .bag-fragment-choice-shortcuts button:hover:not(:disabled) {
    border-color: #fa7298;
    color: #d94f76;
    background: #fff7f9;
  }

  .lineup-skin-choice:hover:not(:disabled) {
    border-color: #fa7298;
  }
}

@media (min-width: 500px) and (min-height: 900px) {
  .game-shell {
    border: 1px solid rgba(34, 34, 34, 0.06);
    border-radius: 0;
  }

  .bottom-nav {
    border-radius: 0;
  }
}

@media (max-height: 700px) {
  .game-shell {
    min-height: 100dvh;
  }

  .top-hud {
    padding-top: 12px;
  }

  .home-shortcuts {
    top: 88px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* 伙伴合成与阵容上阵 */
.partners-panel {
  position: relative;
  overflow: hidden;
  background: #fff;
}

.partners-main {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
}

.square-close {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  padding: 0;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #666;
  background: #fff;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

.square-close:disabled {
  cursor: default;
  opacity: 0.5;
}

.partners-grid {
  display: grid;
  min-height: 0;
  flex: 1;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 9px;
  padding: 12px;
  overflow-x: hidden;
  overflow-y: auto;
  background: #f5f6f8;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.partners-grid::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.partners-grid[aria-busy="true"] {
  opacity: 0.55;
}

.partner-card {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 88px;
  grid-template-columns: 72px minmax(0, 1fr) 92px;
  grid-template-rows: minmax(24px, auto) minmax(34px, auto);
  align-items: center;
  gap: 5px 10px;
  padding: 7px;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  background: #fff;
}

.partner-card.is-owned {
  border-color: rgba(250, 114, 152, 0.55);
}

.partner-card__image {
  position: relative;
  display: grid;
  width: 72px;
  height: 72px;
  grid-column: 1;
  grid-row: 1 / span 2;
  place-items: center;
  overflow: hidden;
  background: rgba(250, 114, 152, 0.05);
}

.partner-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: auto;
}

.partner-card__image.has-no-image::after {
  color: #aaa;
  content: "伙伴";
  font-size: 11px;
}

.partner-card > strong {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  align-self: end;
  grid-column: 2;
  grid-row: 1;
  color: #333;
  font-size: 11px;
  line-height: 1.35;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.partner-card__progress {
  position: relative;
  width: 100%;
  height: 20px;
  margin: 0;
  grid-column: 3;
  grid-row: 1;
  overflow: hidden;
  border: 1px solid #e0e3e7;
  background: #f2f3f5;
}

.partner-card__progress i {
  position: absolute;
  inset: 0 auto 0 0;
  background: rgba(250, 114, 152, 0.28);
}

.partner-card__progress span {
  position: relative;
  z-index: 1;
  display: block;
  color: #555;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

.partner-card__state {
  min-width: 0;
  min-height: 0;
  align-self: start;
  grid-column: 2;
  grid-row: 2;
  padding: 2px 0 0;
  color: #8b8f97;
  font-size: 8px;
  line-height: 1.35;
  text-align: left;
}

.partner-card.is-owned .partner-card__state {
  color: #fa7298;
}

.partner-card__action {
  width: 100%;
  height: 38px;
  grid-column: 3;
  grid-row: 2;
  padding: 0 4px;
  border: 1px solid #fa7298;
  border-radius: 0;
  color: #fff;
  background: #fa7298;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  -webkit-tap-highlight-color: transparent;
}

.partner-card__action:disabled {
  border-color: #dfe2e6;
  color: #999;
  background: #f3f4f6;
  cursor: default;
}

.partners-grid__empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 42px 12px;
  border: 1px solid #dfe2e6;
  color: #999;
  background: #fff;
  font-size: 11px;
  text-align: center;
}

.partners-status,
.lineup-picker-status {
  min-height: 38px;
  margin: 0;
  flex: 0 0 auto;
  padding: 8px 12px;
  border-top: 1px solid #dfe2e6;
  color: #888;
  background: #fff;
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
}

.partners-status.is-error,
.lineup-picker-status.is-error,
.partners-confirm__status.is-error {
  color: #d94f76;
}

.partners-confirm {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(27, 34, 45, 0.35);
}

.partners-confirm[hidden] {
  display: none;
}

.partners-confirm__card {
  position: relative;
  display: flex;
  width: min(286px, 100%);
  flex-direction: column;
  align-items: center;
  padding: 18px;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 14px 38px rgba(31, 38, 52, 0.22);
}

.partners-confirm__close {
  position: absolute;
  top: 0;
  right: 0;
  border-top: 0;
  border-right: 0;
}

.partners-confirm__card > p:first-of-type,
.partners-confirm__card h3 {
  align-self: flex-start;
  margin: 0;
}

.partners-confirm__card > p:first-of-type {
  color: #999;
  font-size: 9px;
  letter-spacing: 0.12em;
}

.partners-confirm__card h3 {
  margin-top: 3px;
  padding-right: 32px;
  font-size: 17px;
}

#partners-confirm-avatar {
  display: block;
  width: 104px;
  height: 104px;
  margin-top: 16px;
  object-fit: contain;
}

#partners-confirm-avatar[hidden] {
  display: none;
}

#partners-confirm-name {
  margin-top: 7px;
  color: #333;
  font-size: 13px;
}

#partners-confirm-message {
  margin: 11px 0 0;
  color: #777;
  font-size: 10px;
  line-height: 1.55;
  text-align: center;
}

.partners-confirm__status {
  min-height: 18px;
  margin: 7px 0 0;
  color: #888;
  font-size: 9px;
}

.partners-confirm__submit {
  width: 100%;
  height: 38px;
  margin-top: 7px;
  border: 1px solid #fa7298;
  border-radius: 0;
  color: #fff;
  background: #fa7298;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  -webkit-tap-highlight-color: transparent;
}

.partners-confirm__submit:disabled {
  cursor: wait;
  opacity: 0.62;
}

/* 伙伴进阶置换 */
.partner-exchange-dialog,
.partner-exchange-panel,
.partner-exchange-main,
.partner-exchange-content,
.partner-exchange-selectors,
.partner-exchange-selector,
.partner-exchange-selection,
.partner-exchange-preview,
.partner-exchange-table,
.partner-exchange-footer {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}

.partner-exchange-panel {
  position: relative;
  overflow: hidden;
  background: #fff;
}

.partner-exchange-main {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.partner-exchange-content {
  display: flex;
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  overflow-x: hidden;
  overflow-y: auto;
  background: #f5f6f8;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.partner-exchange-content::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.partner-exchange-content[aria-busy="true"] {
  pointer-events: none;
  opacity: 0.55;
}

.partner-exchange-intro,
.partner-exchange-retained {
  width: 100%;
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.55;
}

.partner-exchange-intro {
  padding: 9px 10px;
  border-left: 3px solid #fa7298;
  color: #666;
  background: #fff;
  font-size: 10px;
}

.partner-exchange-selectors {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
  align-items: stretch;
  gap: 6px;
}

.partner-exchange-selector {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  overflow: hidden;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #777;
  background: #fff;
  font-size: 9px;
}

.partner-exchange-selector > span:first-child {
  color: #fa7298;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.partner-exchange-picker-trigger {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  height: 34px;
  margin: 0;
  padding: 0 24px 0 7px;
  overflow: hidden;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #333;
  background-color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  text-align: left;
  text-overflow: ellipsis;
  touch-action: manipulation;
  white-space: nowrap;
}

.partner-exchange-picker-trigger::after {
  position: absolute;
  right: 8px;
  content: "⌄";
}

.partner-exchange-picker-trigger:focus-visible {
  border-color: #fa7298;
  outline: 2px solid rgba(250, 114, 152, 0.22);
  outline-offset: 0;
}

.partner-exchange-picker-trigger:disabled {
  border-color: #e3e5e8;
  color: #aaa;
  background: #f2f3f5;
  cursor: default;
  opacity: 1;
}

.partner-exchange-selector select[hidden] { display: none; }

.partner-exchange-selection {
  display: grid;
  width: 100%;
  min-height: 70px;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: minmax(24px, auto) minmax(18px, auto);
  align-items: center;
  gap: 2px 7px;
  padding-top: 2px;
  overflow: hidden;
  color: #777;
}

.partner-exchange-selection:empty::before {
  display: grid;
  min-height: 66px;
  grid-column: 1 / -1;
  place-items: center;
  color: #aaa;
  background: #f5f6f8;
  content: "请选择";
  font-size: 9px;
}

.partner-exchange-selection img,
.partner-exchange-selection__avatar {
  display: block;
  width: 48px;
  height: 48px;
  grid-column: 1;
  grid-row: 1 / span 2;
  object-fit: contain;
  background: #f5f6f8;
}

.partner-exchange-selection__copy {
  display: flex;
  min-width: 0;
  grid-column: 2;
  grid-row: 1 / span 2;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  overflow: hidden;
}

.partner-exchange-selection strong,
.partner-exchange-selection__name {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #333;
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.partner-exchange-selection small,
.partner-exchange-selection__stage,
.partner-exchange-selection__state {
  min-width: 0;
  overflow: hidden;
  color: #8b8f97;
  font-size: 8px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.partner-exchange-selection__stage {
  color: #fa7298;
  font-weight: 800;
}

.partner-exchange-selection > .partner-exchange-selection__state:only-child {
  display: grid;
  grid-column: 1 / -1;
  grid-row: 1 / -1;
  place-items: center;
  text-align: center;
  white-space: normal;
}

.partner-exchange-selection.is-unavailable {
  opacity: 0.64;
}

.partner-exchange-selection.is-unavailable .partner-exchange-selection__state {
  color: #d94f76;
  white-space: normal;
}

.partner-exchange-selection.has-no-image::before {
  display: grid;
  width: 48px;
  height: 48px;
  grid-column: 1;
  grid-row: 1 / span 2;
  place-items: center;
  color: #aaa;
  background: #f5f6f8;
  content: "伙伴";
  font-size: 8px;
}

.partner-exchange-arrows {
  display: grid;
  min-width: 0;
  place-items: center;
  color: #fa7298;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.partner-exchange-preview {
  width: 100%;
  overflow: hidden;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  background: #fff;
}

.partner-exchange-preview > header {
  display: flex;
  min-width: 0;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid #e6e8eb;
}

.partner-exchange-preview h3,
.partner-exchange-preview small {
  min-width: 0;
  margin: 0;
}

.partner-exchange-preview h3 {
  flex: 0 0 auto;
  color: #333;
  font-size: 12px;
}

.partner-exchange-preview small {
  color: #999;
  font-size: 8px;
  line-height: 1.35;
  text-align: right;
}

.partner-exchange-table {
  display: grid;
  width: 100%;
  overflow: hidden;
}

.partner-exchange-table__head,
.partner-exchange-table__row,
.partner-exchange-table [role="row"] {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1.35fr) minmax(50px, 0.75fr) minmax(50px, 0.75fr);
  align-items: center;
}

.partner-exchange-table__head {
  color: #999;
  background: #fafafa;
  font-size: 8px;
}

.partner-exchange-table__row,
.partner-exchange-table [role="row"] {
  min-height: 42px;
  color: #555;
  font-size: 9px;
}

.partner-exchange-table .partner-exchange-table__head {
  min-height: 32px;
  color: #999;
  font-size: 8px;
}

.partner-exchange-table__row + .partner-exchange-table__row,
.partner-exchange-table [role="row"] + [role="row"] {
  border-top: 1px solid #eef0f2;
}

.partner-exchange-table__head > *,
.partner-exchange-table__row > *,
.partner-exchange-table [role="columnheader"],
.partner-exchange-table [role="cell"] {
  min-width: 0;
  padding: 8px;
  overflow: hidden;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.partner-exchange-table__head > *:not(:first-child),
.partner-exchange-table__row > *:not(:first-child),
.partner-exchange-table [role="columnheader"]:not(:first-child),
.partner-exchange-table [role="cell"]:not(:first-child) {
  text-align: center;
}

.partner-exchange-table .is-after {
  color: #e85c85;
  font-weight: 800;
}

.partner-exchange-table__cultivation {
  white-space: pre-line;
  line-height: 1.65;
}

.partner-exchange-table__empty {
  margin: 0;
  padding: 24px 10px;
  color: #999;
  font-size: 9px;
  text-align: center;
}

.partner-exchange-retained {
  padding: 9px 10px;
  border: 1px solid #e5e7ea;
  color: #888;
  background: #fff;
  font-size: 9px;
}

.partner-exchange-status {
  box-sizing: border-box;
  width: 100%;
  min-height: 34px;
  margin: 0;
  flex: 0 0 auto;
  padding: 7px 12px;
  overflow-wrap: anywhere;
  border-top: 1px solid #dfe2e6;
  color: #888;
  background: #fff;
  font-size: 9px;
  line-height: 1.45;
  text-align: center;
}

.partner-exchange-status.is-error,
.partner-exchange-confirm .partners-confirm__status.is-error {
  color: #d94f76;
}

.partner-exchange-footer {
  display: flex;
  width: 100%;
  flex: 0 0 auto;
  padding: 10px 12px max(10px, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #eef0f2;
  background: #fff;
}

.partner-exchange-submit {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #fa7298;
  border-radius: 0;
  color: #fff;
  background: #fa7298;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.partner-exchange-submit:disabled {
  border-color: #dfe2e6;
  color: #999;
  background: #f2f3f5;
  cursor: default;
}

.partner-exchange-main[aria-busy="true"] .partner-exchange-submit,
.partner-exchange-confirm[aria-busy="true"] .partners-confirm__submit {
  cursor: wait;
  opacity: 0.62;
}

.partner-exchange-close:focus-visible,
.partner-exchange-submit:focus-visible {
  outline: 2px solid #fa7298;
  outline-offset: -2px;
}

.partner-exchange-confirm {
  overflow: hidden;
}

.partner-exchange-confirm .partners-confirm__card {
  max-height: calc(100% - 24px);
  align-items: stretch;
  overflow-x: hidden;
  overflow-y: auto;
}

#partner-exchange-confirm-message {
  margin: 14px 0 0;
  padding: 10px;
  overflow-wrap: anywhere;
  border-left: 3px solid #fa7298;
  color: #666;
  background: #fff7fa;
  font-size: 10px;
  line-height: 1.6;
  text-align: left;
  white-space: pre-line;
}

.partner-exchange-confirm .partners-confirm__status {
  text-align: center;
}

@media (hover: hover) and (pointer: fine) {
  .partner-exchange-submit:hover:not(:disabled) {
    border-color: #e85c85;
    background: #e85c85;
  }
}

@media (max-width: 340px) {
  .partner-exchange-content {
    gap: 9px;
    padding: 9px;
  }

  .partner-exchange-selectors {
    grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr);
    gap: 4px;
  }

  .partner-exchange-selector {
    gap: 5px;
    padding: 6px;
  }

  .partner-exchange-selection {
    min-height: 58px;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 2px 5px;
  }

  .partner-exchange-selection img,
  .partner-exchange-selection__avatar {
    width: 38px;
    height: 38px;
  }

  .partner-exchange-selection.has-no-image::before {
    width: 38px;
    height: 38px;
  }

  .partner-exchange-arrows {
    font-size: 17px;
  }

  .partner-exchange-preview > header {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .partner-exchange-preview small {
    text-align: left;
  }

  .partner-exchange-table__head,
  .partner-exchange-table__row,
  .partner-exchange-table [role="row"] {
    grid-template-columns: minmax(0, 1.1fr) minmax(46px, 0.7fr) minmax(46px, 0.7fr);
  }

  .partner-exchange-table__head > *,
  .partner-exchange-table__row > *,
  .partner-exchange-table [role="columnheader"],
  .partner-exchange-table [role="cell"] {
    padding: 7px 5px;
  }
}

.lineup-picker-dialog {
  height: fit-content;
  min-height: 220px;
  max-height: calc(100dvh - 32px);
}

.lineup-picker-panel {
  height: auto;
  min-height: 220px;
  max-height: calc(100dvh - 32px);
  background: #fff;
}

.lineup-picker-grid {
  display: grid;
  min-height: 120px;
  max-height: 480px;
  flex: 0 1 auto;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 8px;
  padding: 12px;
  overflow-x: hidden;
  overflow-y: auto;
  background: #f5f6f8;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.lineup-picker-grid::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.lineup-picker-choice {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 86px;
  grid-template-columns: 72px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #444;
  background: #fff;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.lineup-picker-choice:disabled {
  cursor: wait;
  opacity: 0.58;
}

.lineup-picker-choice__image {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  overflow: hidden;
  background: rgba(250, 114, 152, 0.05);
}

.lineup-picker-choice__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: auto;
}

.lineup-picker-choice__image.has-no-image::after {
  color: #aaa;
  content: "伙伴";
  font-size: 9px;
}

.lineup-picker-choice strong {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: normal;
}

.lineup-picker-choice__action {
  display: grid;
  min-height: 38px;
  place-items: center;
  border: 1px solid #fa7298;
  color: #e85c85;
  background: #fff8fa;
  font-size: 11px;
  font-weight: 800;
}

.partners-dialog__close:focus-visible,
.partners-confirm button:focus-visible,
.partner-card__action:focus-visible,
.lineup-picker__close:focus-visible,
.lineup-picker-choice:focus-visible {
  outline: 2px solid #fa7298;
  outline-offset: -2px;
}

@media (hover: hover) and (pointer: fine) {
  .partner-card__action:hover:not(:disabled),
  .partners-confirm__submit:hover:not(:disabled),
  .lineup-picker-choice:hover:not(:disabled),
  .square-close:hover:not(:disabled) {
    border-color: #fa7298;
    color: #fff;
    background: #fa7298;
  }
}

/* 日常玩法 */
.daily-page {
  height: calc(100% + 26px - env(safe-area-inset-bottom, 0px));
}

.game-shell:has(.daily-page:not([hidden])) .bottom-nav {
  border-top: 0;
  box-shadow: none;
}

.daily-page__body {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 12px;
  background: #f5f6f8;
  scrollbar-width: none;
}

.daily-page__body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.daily-entry {
  position: relative;
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) 92px;
  align-items: center;
  gap: 12px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #333;
  background: #fff;
  cursor: pointer;
  text-align: left;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.daily-entry::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: #fa7298;
  content: "";
}

.daily-entry.is-arena::before {
  background: #fa7298;
}

.daily-entry.is-arena {
  background: #fff;
}

.daily-entry:disabled {
  cursor: wait;
  opacity: 0.62;
}

.daily-entry__copy {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 3px;
}

.daily-entry__copy > strong {
  font-size: 20px;
  line-height: 1.2;
}

.daily-entry__copy > span {
  color: #858a93;
  font-size: 10px;
  line-height: 1.5;
}

.daily-entry__action {
  display: grid;
  min-height: 42px;
  grid-column: auto;
  place-items: center;
  border: 1px solid #f3a1b9;
  color: #df587f;
  background: #fff4f7;
  font-size: 12px;
  font-weight: 800;
}

.voyage-adventure-entry {
  grid-template-columns: minmax(0, 1fr) 92px;
}

.voyage-adventure-entry::before {
  background: #fa7298;
}

.voyage-adventure-entry .daily-entry__action {
  border-color: #f3a1b9;
  color: #df587f;
  background: #fff4f7;
}

/* 空岛占领：独立页面，按 IPA 640 x 1136 场景比例铺满游戏区域。 */
.sky-island-page {
  position: absolute;
  z-index: 60;
  inset: 0;
  display: block;
  overflow: hidden;
  color: #2f3135;
  background: #dbeff5;
}

.sky-island-page[hidden] {
  display: none;
}

.sky-island-panel {
  position: relative;
  display: grid;
  height: 100%;
  min-width: 0;
  min-height: 0;
  grid-template-rows: 68px minmax(0, 1fr) 52px;
  overflow: hidden;
  background: #eaf7fb;
}

.sky-island-panel__header {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(9px, env(safe-area-inset-top)) 14px 8px;
  border-bottom: 1px solid #f4c5d3;
  background: #fff;
  box-shadow: 0 2px 8px rgb(67 70 78 / 10%);
}

.sky-island-panel__header small {
  display: block;
  margin-bottom: 2px;
  color: #e85c85;
  font-size: 10px;
  font-weight: 800;
}

.sky-island-panel__header h2 {
  margin: 0;
  font-size: 23px;
  line-height: 1.1;
}

.sky-island-close {
  display: grid;
  min-width: 66px;
  height: 38px;
  flex: 0 0 auto;
  padding: 0 13px;
  place-items: center;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  border-color: #f3a1b9;
  color: #e85c85;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.sky-island-pages {
  position: absolute;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 4px;
  right: 8px;
  bottom: 12px;
  left: 8px;
  padding: 6px;
  border: 1px solid rgb(244 197 211 / 88%);
  background: rgb(255 255 255 / 90%);
  box-shadow: 0 3px 12px rgb(45 76 104 / 16%);
}

.sky-island-pages button {
  min-width: 0;
  height: 30px;
  padding: 0;
  border: 1px solid #f1ccd7;
  border-radius: 0;
  color: #777d86;
  background: #fff;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.sky-island-pages button.is-active {
  border-color: #fa7298;
  color: #fff;
  background: #fa7298;
  box-shadow: 0 0 8px rgb(250 114 152 / 32%);
}

.sky-island-stage-slot {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  place-items: stretch;
  background: #dbeff5;
  container-type: size;
}

.sky-island-scene {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  aspect-ratio: auto;
  place-self: stretch;
  overflow: hidden;
  isolation: isolate;
  background: #bfe9ef;
  container-type: size;
}

.sky-island-scene > img {
  position: absolute;
  width: 100%;
  height: 100%;
  inset: 0;
  object-fit: fill;
  object-position: center;
  user-select: none;
}

.sky-island-houses {
  position: absolute;
  z-index: 2;
  inset: 0;
}

.sky-island-owner-marker-canvas {
  position: absolute;
  z-index: 3;
  width: 100%;
  height: 100%;
  inset: 0;
  pointer-events: none;
}

.sky-island-house {
  position: absolute;
  display: block;
  width: 31.25%;
  height: 16.725352%;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  color: #2f2517;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Project layout: slot 1 in the centre, slots 2-7 at six hexagram points. */
.sky-island-house[data-slot="1"] { left: 34.375%; top: 41.813380%; }
.sky-island-house[data-slot="2"] { left: 34.375%; top: 20.686620%; }
.sky-island-house[data-slot="3"] { left: 66.875%; top: 31.25%; }
.sky-island-house[data-slot="4"] { left: 66.875%; top: 52.376761%; }
.sky-island-house[data-slot="5"] { left: 34.375%; top: 62.940141%; }
.sky-island-house[data-slot="6"] { left: 1.875%; top: 52.376761%; }
.sky-island-house[data-slot="7"] { left: 1.875%; top: 31.25%; }

.sky-island-mining-claim {
  position: absolute;
  z-index: 7;
  top: 14px;
  left: 14px;
  min-width: 94px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #fa7298;
  border-radius: 0;
  color: #e85c85;
  background: rgb(255 255 255 / 94%);
  box-shadow: 0 3px 12px rgb(45 76 104 / 15%);
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
}

.sky-island-mining-claim.is-ready {
  color: #fff;
  background: #fa7298;
}

.sky-island-abandon { left: auto; right: 14px; }
.sky-island-abandon[hidden] { display: none; }

.sky-island-mining-claim:disabled {
  cursor: default;
  opacity: 0.64;
}

.sky-island-house__art {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

/* Natural IPA widths, scaled by the logical 200px slot width. */
.sky-island-house[data-tier="red"] > .sky-island-house__art { width: 115.5%; }
.sky-island-house[data-tier="orange"] > .sky-island-house__art { width: 99.5%; }
.sky-island-house[data-tier="purple"] > .sky-island-house__art { width: 90.5%; }

/*
 * Retain the three Cocos labels and their original vertical positions.
 * Centre the level/player name under each building for the project UI.
 */
.sky-island-house__server,
.sky-island-house__name,
.sky-island-house__guild {
  position: absolute;
  z-index: 2;
  display: block;
  box-sizing: border-box;
  overflow: hidden;
  padding: 0;
  color: #fff;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: clamp(8px, 3.4375cqw, 22px);
  font-weight: 900;
  line-height: 1;
  text-align: left;
  text-shadow:
    -1px -1px #280000,
    1px -1px #280000,
    -1px 1px #280000,
    1px 1px #280000;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.sky-island-house__server {
  top: 73.684211%;
  left: 4.5%;
  width: 27.5%;
  height: 11.578947%;
}

.sky-island-house__name {
  top: 85.789474%;
  left: 0;
  width: 100%;
  /* Text scales with scene width, so its line box must not shrink with height. */
  height: auto;
  padding: 2px;
  line-height: 1.35;
  text-align: center;
}

.sky-island-house__guild {
  top: 102.105263%;
  left: 10.5%;
  width: 77%;
  height: 11.578947%;
  color: #ff4d9a;
  text-align: center;
}

.sky-island-status {
  position: absolute;
  z-index: 12;
  top: 50%;
  right: 28px;
  left: 28px;
  min-height: 0;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid #f3a1b9;
  color: #777d86;
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 5px 18px rgb(47 49 53 / 16%);
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
  transform: translateY(-50%);
  pointer-events: none;
}

.sky-island-status:empty {
  display: none;
}

.sky-island-status.is-error { color: #d94f76; }

.sky-island-footer {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-top: 1px solid #eceef1;
  background: #fffdf5;
}

.sky-island-footer > span {
  min-width: 0;
  color: #707680;
  font-size: 9px;
}

.sky-island-footer > div {
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
}

.sky-island-footer button {
  min-width: 58px;
  height: 34px;
  border: 1px solid #fa7298;
  border-radius: 0;
  color: #e85c85;
  background: #fffdf5;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.sky-island-footer button:disabled,
.sky-island-pages button:disabled,
.sky-island-house:disabled {
  cursor: wait;
  opacity: 0.58;
}

.sky-island-close:focus-visible,
.sky-island-pages button:focus-visible,
.sky-island-house:focus-visible,
.sky-island-footer button:focus-visible {
  outline: 2px solid #fa7298;
  outline-offset: -2px;
}

.voyage-adventure-dialog {
  box-sizing: border-box;
  width: min(366px, calc(100vw - 24px));
  max-width: none;
  height: min(748px, calc(100dvh - 24px));
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  color: #333;
  background: transparent;
}

.voyage-adventure-dialog::backdrop {
  background: rgba(30, 35, 44, 0.5);
}

.voyage-coin-notice-dialog {
  box-sizing: border-box;
  width: min(310px, calc(100vw - 36px));
  max-width: none;
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  color: #333;
  background: transparent;
}

.voyage-coin-notice-dialog::backdrop {
  background: rgba(30, 35, 44, 0.42);
}

.voyage-coin-notice-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #f1a0b8;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 18px 44px rgba(34, 38, 47, 0.28);
}

.voyage-coin-notice-card::before {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: #fa7298;
  content: "";
}

.voyage-coin-notice-card > header {
  padding: 18px 54px 13px 17px;
  border-bottom: 1px solid #f3d3dc;
  background: #fff8fa;
}

.voyage-coin-notice-card > header small,
.voyage-coin-notice-card > header h2 {
  display: block;
  margin: 0;
}

.voyage-coin-notice-card > header small {
  color: #e45b83;
  font-size: 9px;
  font-weight: 800;
}

.voyage-coin-notice-card > header h2 {
  margin-top: 3px;
  font-size: 18px;
}

.voyage-coin-notice-dialog.is-error .voyage-coin-notice-card > header h2 {
  color: #d94f76;
}

.voyage-coin-notice-card > p {
  min-height: 70px;
  margin: 0;
  padding: 18px 17px;
  color: #555b64;
  font-size: 12px;
  line-height: 1.65;
}

.voyage-coin-notice-dialog.is-error .voyage-coin-notice-card > p {
  color: #d94f76;
}

.voyage-coin-notice-close {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #efd1da;
  border-radius: 0;
  color: #777d86;
  background: #fff;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.voyage-coin-notice-card > footer {
  padding: 10px 17px 14px;
  border-top: 1px solid #f2d5de;
  background: #fff;
}

.voyage-coin-notice-card > footer button {
  width: 100%;
  height: 40px;
  border: 1px solid #fa7298;
  border-radius: 0;
  color: #fff;
  background: #fa7298;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.voyage-coin-notice-card button:focus-visible {
  outline: 2px solid #8b3f57;
  outline-offset: 2px;
}

.coin-wash-batch-dialog {
  box-sizing: border-box;
  position: fixed;
  inset: auto;
  width: min(340px, var(--coin-result-width, calc(100vw - 40px)));
  max-width: none;
  max-height: var(--coin-result-height, calc(100dvh - 40px));
  margin: 0;
  transform: translate(-50%, -50%);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  color: #333;
  background: transparent;
}

.coin-wash-batch-dialog::backdrop {
  background: rgba(30, 35, 44, 0.55);
}

.coin-wash-batch-card {
  position: relative;
  display: grid;
  box-sizing: border-box;
  max-height: var(--coin-result-height, calc(100dvh - 40px));
  height: min(540px, var(--coin-result-height, calc(100dvh - 40px)));
  grid-template-rows: auto auto minmax(0, 1fr) auto auto auto;
  overflow: hidden;
  border: 1px solid #f1a0b8;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 18px 44px rgba(34, 38, 47, 0.3);
}

.coin-wash-batch-card::before {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: #fa7298;
  content: "";
}

.coin-wash-batch-card > header {
  padding: 11px 42px 9px 12px;
  border-bottom: 1px solid #f3d3dc;
  background: #fff8fa;
}

.coin-wash-batch-card > header small,
.coin-wash-batch-card > header h2 {
  display: block;
  margin: 0;
}

.coin-wash-batch-card > header small {
  color: #e45b83;
  font-size: 9px;
  font-weight: 800;
}

.coin-wash-batch-card > header h2 {
  margin-top: 3px;
  font-size: 15px;
}

.coin-wash-batch-card > p:first-of-type {
  margin: 0;
  padding: 7px 12px;
  border-bottom: 1px solid #f4dbe2;
  color: #666d76;
  font-size: 10px;
  line-height: 1.55;
}

.coin-wash-batch-close {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #efd1da;
  border-radius: 0;
  color: #777d86;
  background: #fff;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.coin-wash-batch-results {
  display: grid;
  min-height: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.coin-wash-batch-results::-webkit-scrollbar {
  display: none;
}

.coin-wash-batch-results button {
  display: grid;
  min-width: 0;
  min-height: 52px;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 4px;
  align-content: center;
  padding: 6px;
  border: 1px solid #efccd6;
  border-radius: 0;
  color: #454a52;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.coin-wash-batch-results button:hover,
.coin-wash-batch-results button:focus-visible,
.coin-wash-batch-results button.is-selected {
  border-color: #fa7298;
  background: #fff4f7;
}

.coin-wash-batch-results button > strong,
.coin-wash-batch-results button > em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coin-wash-batch-results button > strong {
  font-size: 10px;
}

.coin-wash-batch-results button > em {
  color: #d84f78;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.coin-wash-batch-dialog[data-result-mode="single"] .coin-wash-batch-results {
  grid-template-columns: minmax(0, 1fr);
}

.coin-wash-batch-dialog[data-result-mode="single"] .coin-wash-batch-card {
  height: min(270px, var(--coin-result-height, calc(100dvh - 40px)));
}

.coin-wash-batch-status {
  min-height: 0;
  margin: 0;
  padding: 6px 10px;
  border-top: 1px solid #f4dbe2;
  color: #d84f78;
  font-size: 9px;
  text-align: center;
}

.coin-wash-batch-card > footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  border-top: 1px solid #f4dbe2;
}

.coin-wash-batch-card > footer button {
  width: 100%;
  height: 38px;
  border: 1px solid #fa7298;
  border-radius: 0;
  color: #e35a82;
  background: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.coin-wash-batch-card > footer [data-coin-wash-result-action="equip"] {
  color: #fff;
  background: #ed5d87;
}

.coin-wash-batch-card > footer button:disabled {
  border-color: #efc9d4;
  color: #fff;
  background: #efb7c7;
  cursor: not-allowed;
}

.coin-wash-batch-card > footer [data-coin-wash-batch-reroll] {
  grid-column: 1 / -1;
}

.coin-wash-batch-results button.is-max,
.coin-wash-saved-slot .coin-wash-affix.is-max {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-color: #f4bd20;
  background: linear-gradient(125deg, #fff9d9 0%, #ffe98c 20%, #ffd347 43%, #fff3ad 62%, #ffdc60 83%, #f7c537 100%);
  box-shadow: inset 0 0 0 1px #fff5ba, inset 0 1px 9px #fffbe8, 0 0 7px #ffd44c66;
}

.coin-wash-batch-results button.is-max.is-selected,
.coin-wash-batch-results button.is-max:focus-visible {
  border-color: #e4a400;
  outline: 2px solid #efb719;
  outline-offset: 1px;
  box-shadow: inset 0 0 0 2px #fffbed, 0 0 9px #ffd44c99;
}

.coin-wash-batch-results button.is-max > *,
.coin-wash-saved-slot .coin-wash-affix.is-max > * {
  position: relative;
  z-index: 2;
}

.coin-wash-batch-results button.is-max::before,
.coin-wash-saved-slot .coin-wash-affix.is-max::before {
  position: absolute;
  z-index: 0;
  inset: -20% -50%;
  content: "";
  pointer-events: none;
  background: linear-gradient(110deg, transparent 35%, #fffef04d 43%, #ffffffd9 50%, #fffef04d 57%, transparent 65%);
  animation: coin-max-shine 4s ease-in-out infinite;
}

.coin-wash-batch-results button.is-max::after,
.coin-wash-saved-slot .coin-wash-affix.is-max::after {
  position: absolute;
  z-index: 1;
  inset: 2px;
  content: "";
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 80' fill='%23fffef1'%3E%3Cpath d='M12 3l2 6 6 2-6 2-2 6-2-6-6-2 6-2zM130 8l1.8 5.5 5.5 1.8-5.5 1.8-1.8 5.5-1.8-5.5-5.5-1.8 5.5-1.8zM143 55l2.2 7 7 2.2-7 2.2-2.2 7-2.2-7-7-2.2 7-2.2zM48 61l1.4 4.5 4.5 1.4-4.5 1.4-1.4 4.5-1.4-4.5-4.5-1.4 4.5-1.4z'/%3E%3Ccircle cx='79' cy='9' r='1.2'/%3E%3Ccircle cx='109' cy='73' r='1'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  animation: coin-max-sparkle 2.6s ease-in-out infinite;
}

.coin-wash-batch-results button.is-max:nth-child(even)::after {
  animation-delay: -1.3s;
}

@keyframes coin-max-shine {
  0%, 12% { transform: translateX(-65%); opacity: 0; }
  26% { opacity: 0.9; }
  58%, 100% { transform: translateX(65%); opacity: 0; }
}

@keyframes coin-max-sparkle {
  0%, 100% { opacity: 0.4; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .coin-wash-batch-results button.is-max::before,
  .coin-wash-saved-slot .coin-wash-affix.is-max::before {
    animation: none;
    opacity: 0.25;
  }
  .coin-wash-batch-results button.is-max::after,
  .coin-wash-saved-slot .coin-wash-affix.is-max::after {
    animation: none;
    opacity: 0.85;
  }
}

.coin-wash-batch-results button.is-max > strong,
.coin-wash-batch-results button.is-max > em,
.coin-wash-batch-results button.is-max .coin-wash-bonus-life,
.coin-wash-batch-results button.is-max .coin-wash-bonus-life span,
.coin-wash-affix.is-max > span,
.coin-wash-affix.is-max strong,
.coin-wash-affix.is-max .coin-wash-values > span,
.coin-wash-affix.is-max .coin-wash-reserve-select > span,
.coin-wash-affix.is-max .coin-wash-bonus-life,
.coin-wash-affix.is-max .coin-wash-bonus-life span {
  color: #805000;
  text-shadow: 0 1px 0 #fff8d5;
}

.voyage-adventure-panel {
  position: relative;
  display: flex;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-height: none;
  min-height: 0;
  flex-direction: column;
  border: 1px solid #e9ebf0;
  background: #fff;
  box-shadow: 0 18px 48px rgba(25, 30, 40, 0.28);
}

.voyage-adventure-panel__header {
  display: flex;
  min-height: 82px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid #e9ebf0;
}

.voyage-adventure-panel__header small,
.voyage-adventure-panel__header h2 {
  display: block;
  margin: 0;
}

.voyage-adventure-panel__header small {
  margin-bottom: 4px;
  color: #f14d86;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
}

.voyage-adventure-panel__header h2 {
  color: #303642;
  font-size: 25px;
  line-height: 1.15;
}

.voyage-adventure-close {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #e3e5e8;
  border-radius: 0;
  color: #777;
  background: #fff;
  cursor: pointer;
  font-size: 24px;
}

.voyage-adventure-tabs {
  display: grid;
  height: 48px;
  flex: 0 0 48px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0 14px;
  border-bottom: 1px solid #e9ebf0;
  background: #fff;
}

.voyage-adventure-tabs button {
  min-width: 0;
  padding: 12px 0 10px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: #8b919d;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.voyage-adventure-tabs button.is-active {
  border-bottom-color: #f14d86;
  color: #f14d86;
  background: #fff;
}

.voyage-adventure-panel__body {
  min-height: 0;
  display: flex;
  flex: 1 1 auto;
  overflow: hidden;
}

.voyage-adventure-view,
.voyage-adventure-view.is-active {
  display: flex;
  width: 100%;
  height: 100%;
  max-height: none;
  min-height: 0;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
}

.voyage-adventure-view::-webkit-scrollbar {
  display: none;
}

.voyage-adventure-view[hidden] {
  display: none;
}

.voyage-coin-balances {
  padding: 11px 12px;
  border-bottom: 1px solid #e7e9ec;
}

.voyage-coin-balances > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.voyage-coin-balances h3 {
  margin: 0;
  font-size: 13px;
}

.voyage-coin-balances header span {
  color: #888e97;
  font-size: 9px;
}

.voyage-adventure-status {
  min-height: 35px;
  margin: 0;
  padding: 8px 12px;
  color: #777d86;
  font-size: 10px;
  line-height: 1.45;
  text-align: center;
}

.voyage-adventure-status.is-error {
  color: #d94f76;
}

.voyage-adventure-actions {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  margin-top: 0;
  padding: 13px 18px 15px;
  border-top: 1px solid #e9ebf0;
  background: #fff;
}

#voyage-adventure-panel {
  overflow: hidden;
}

.voyage-adventure-reward-content {
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px 18px 10px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: none;
  scrollbar-width: none;
}

.voyage-adventure-reward-content::-webkit-scrollbar {
  display: none;
}

.voyage-adventure-fixed-rewards > header,
.voyage-adventure-material-rewards > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 13px;
}

.voyage-adventure-fixed-rewards h3,
.voyage-adventure-material-rewards h3 {
  margin: 0;
  color: #303642;
  font-size: 15px;
}

.voyage-adventure-fixed-rewards header > span,
.voyage-adventure-material-rewards header > span {
  color: #9096a2;
  font-size: 11px;
}

.coin-reward-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid #e9ebf0;
  background: #e9ebf0;
}

.coin-reward-item {
  display: flex;
  min-width: 0;
  margin: 0;
  padding: 12px 4px 10px;
  flex-direction: column;
  align-items: center;
  background: #fcfcfe;
}

.coin-reward-item .voyage-coin-quality-icon {
  width: 57px;
  height: 57px;
  margin-bottom: 6px;
}

.coin-reward-item figcaption {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  color: #303642;
  font-size: 11px;
  line-height: 1.5;
  white-space: nowrap;
}

.coin-reward-quantity {
  color: #f14d86;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.voyage-adventure-material-rewards {
  margin-top: 18px;
}

.coin-material-reward-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.coin-material-reward {
  min-width: 0;
  margin: 0;
  padding: 10px 2px 9px;
  border: 1px solid #e9ebf0;
  text-align: center;
}

.coin-material-reward img {
  display: block;
  width: 38px;
  height: 38px;
  margin: 0 auto 5px;
  object-fit: contain;
}

.coin-material-reward figcaption {
  color: #717987;
  font-size: 10px;
  white-space: nowrap;
}

.coin-material-reward .coin-reward-quantity {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}

.voyage-adventure-actions #voyage-adventure-sweep {
  width: 100%;
  height: auto;
  min-height: 43px;
  border: 1px solid #f14d86;
  color: #fff;
  background: #f14d86;
  font-size: 15px;
  font-weight: 700;
}

.voyage-adventure-actions #voyage-adventure-sweep:disabled {
  border-color: #e9ebf0;
  color: #9299a5;
  background: #f3f4f6;
  opacity: 1;
}

.voyage-adventure-actions .voyage-adventure-status {
  min-height: 0;
  margin: 9px 0 0;
  padding: 0;
  color: #9096a2;
  font-size: 10px;
  overflow-wrap: anywhere;
}

.voyage-adventure-actions .voyage-adventure-status.is-error {
  color: #d94f76;
}

.voyage-coin-washes-panel {
  align-items: stretch;
  background: #f7f8fa;
  overflow-anchor: none;
}

.coin-washes-status {
  position: absolute;
  z-index: 10;
  right: 12px;
  bottom: 10px;
  left: 12px;
  min-height: 30px;
  margin: 0;
  padding: 7px 12px;
  color: #7e848d;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 2px 12px rgba(43, 49, 61, 0.12);
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
  pointer-events: none;
}

.voyage-adventure-dialog:not([data-active-tab="coin-washes"]) .coin-washes-status {
  display: none;
}

.coin-washes-status.is-error {
  color: #d64f77;
}

.coin-washes-picker {
  flex: 0 0 auto;
  min-width: 0;
  padding: 8px 10px;
  border-top: 1px solid #e4e6e9;
  border-bottom: 1px solid #e4e6e9;
  background: #fff;
}

#coin-washes-coins {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

#coin-washes-coins::-webkit-scrollbar { display: none; }

#coin-washes-coins.is-dragging,
#coin-washes-coins.is-dragging .coin-wash-choice {
  cursor: grabbing;
}

.coin-wash-choice {
  display: grid;
  flex: 0 0 62px;
  min-width: 0;
  min-height: 82px;
  place-items: center;
  align-content: center;
  gap: 2px;
  padding: 5px 3px;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #444;
  background: #fff;
  cursor: pointer;
}

.coin-wash-choice .voyage-coin-quality-icon {
  width: 48px;
  height: 48px;
}

.coin-wash-choice strong,
.coin-wash-choice small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coin-wash-choice strong {
  font-size: 11px;
}

.coin-wash-choice small {
  color: #92979f;
  font-size: 8px;
}

.coin-wash-choice.is-selected {
  border-color: #e65b84;
  box-shadow: inset 0 0 0 2px #f49ab4;
}

.coin-wash-choice:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  pointer-events: none;
}

.coin-wash-choice:disabled .voyage-coin-quality-icon {
  filter: grayscale(1);
}

.coin-washes-detail {
  flex: 0 0 auto;
  margin: 10px;
  border: 1px solid #e1e4e8;
  background: #fff;
}

.coin-washes-detail[hidden] {
  display: none;
}

.coin-washes-detail > header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px;
  border-bottom: 1px solid #eceef0;
}

.coin-washes-detail > header > div {
  display: flex;
  flex-direction: row-reverse;
  align-items: baseline;
  gap: 8px;
}

.coin-washes-detail > header > div > small,
.coin-washes-detail > header > div > h3 {
  display: block;
  margin: 0;
}

.coin-washes-detail > header > div > small {
  color: #8c929b;
  font-size: 10px;
}

.coin-washes-detail > header > div > small[data-quality-tier="4"] {
  color: #b88400;
}

.coin-washes-detail > header > div > small[data-quality-tier="5"] {
  color: #279cce;
}

.coin-washes-detail > header > div > h3 {
  font-size: 14px;
}

.coin-washes-range {
  min-width: 0;
  padding: 5px 6px;
  border: 1px solid #fa7298;
  background: #fff7f9;
}

.coin-washes-range small,
.coin-washes-range p,
.coin-washes-range p span {
  display: block;
  margin: 0;
}

.coin-washes-range small {
  color: #d94f76;
  font-size: 10px;
  font-weight: 800;
}

.coin-washes-range p {
  margin-top: 2px;
  color: #6e5b63;
  font-size: 10px;
  line-height: 1.35;
}

.coin-washes-range p span {
  overflow-wrap: anywhere;
}

.coin-washes-layers {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 6px;
  border-bottom: 1px solid #eceef0;
}

.coin-washes-layers button {
  min-width: 0;
  height: 36px;
  padding: 0 1px;
  border: 1px solid transparent;
  border-radius: 0;
  color: #737982;
  background: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.coin-washes-layers button.is-active {
  border-color: #ee91ac;
  color: #d94e77;
  background: #fff3f7;
}

.coin-washes-layers button.is-locked:not(.is-active) {
  color: #a8abb1;
  background: #f4f5f6;
}

#coin-washes-layer-detail {
  padding: 8px;
}

.coin-washes-requirement,
.coin-washes-reverse-guide,
.coin-washes-empty {
  margin: 0 0 7px;
  color: #68707a;
  font-size: 8px;
}

.coin-washes-reverse-guide {
  padding: 6px 7px;
  color: #715966;
  background: #faf7f9;
}

.coin-washes-affordability {
  margin: 8px 0 0;
  color: #647184;
  font-size: 11px;
  line-height: 1.5;
}

.coin-washes-affordability.is-insufficient {
  color: #ce547a;
}

.coin-washes-requirement.is-locked {
  color: #d05276;
}

.coin-washes-affixes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.coin-wash-saved-slot { display: flex; min-width: 0; flex-direction: column; }
.coin-wash-saved-slot > .coin-wash-affix { flex: 1; min-height: 88px; box-sizing: border-box; }
.coin-wash-saved-slot.is-current > small { color: #398560; }
.coin-wash-saved-slot.is-current .coin-wash-affix:not(.is-max) { border-color: #cce4d7; background: #f7fcf9; }
.coin-washes-wash-controls { margin-top: 12px; padding-top: 1px; border-top: 1px solid #eceef0; }
.coin-washes-rules { margin-top: 10px; border-top: 1px solid #eceef0; }
.coin-washes-rules .coin-washes-reverse-guide { margin: 8px 0; padding: 0; background: transparent; font-size: 10px; line-height: 1.6; }

.coin-washes-status[hidden] { display: none; }

.coin-washes-affixes section > small {
  display: block;
  margin-bottom: 5px;
  color: #92979f;
  font-size: 11px;
}

.coin-wash-affix {
  display: grid;
  width: 100%;
  min-height: 70px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border: 1px solid #e5d4eb;
  border-radius: 0;
  background: #fcf8ff;
  font: inherit;
  text-align: left;
}

button.coin-wash-affix {
  cursor: pointer;
}

button.coin-wash-affix:disabled {
  cursor: not-allowed;
  opacity: 0.64;
}

.coin-wash-affix.is-empty {
  border-color: #e5e7ea;
  color: #969ba3;
  background: #fafbfc;
}

.coin-wash-affix span {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coin-wash-affix strong {
  flex: 0 0 auto;
  color: #a05ac6;
  font-size: 12px;
}

.coin-wash-affix__hint {
  grid-column: 1 / -1;
  min-height: 28px;
  box-sizing: border-box;
  color: #cf5e82;
  font-size: 9px;
}

.coin-wash-values,
.coin-wash-reserve-select {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}

.coin-wash-reserve-select { cursor: pointer; }
.coin-wash-values .coin-wash-bonus-life,
.coin-wash-reserve-select .coin-wash-bonus-life { grid-column: 1 / -1; }
.coin-wash-reserve-select:disabled { opacity: 0.5; cursor: default; }
.coin-wash-reserve-select:focus-visible { outline: 2px solid #fa7298; outline-offset: 3px; }

button.coin-wash-affix__hint {
  min-height: 28px;
  padding: 3px 0;
  border: 0;
  color: #cf5e82;
  background: transparent;
  font: inherit;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

button.coin-wash-affix__hint:disabled { opacity: 0.5; cursor: default; }

.coin-wash-bonus-life {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 6px;
  color: #3d8960;
  font-size: 11px;
  line-height: 1.4;
  min-height: 1.4em;
}

.coin-wash-bonus-life > span {
  font-size: inherit;
}

.coin-wash-bonus-life__value {
  text-align: right;
}

.coin-fight-power {
  display: block;
  grid-column: 1 / -1;
  margin: 4px 0;
  color: #cf5e82;
  font-size: 9px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.coin-fight-power[hidden] {
  display: none;
}

#voyage-coin-power-total {
  width: 100%;
  text-align: center;
}

.coin-wash-affix > .coin-wash-bonus-life {
  grid-column: 1 / -1;
}

.coin-wash-batch-results .coin-wash-bonus-life {
  grid-column: 1 / -1;
  font-size: 10px;
}

.coin-wash-affix strong,
.coin-wash-affix .coin-wash-bonus-life > .coin-wash-bonus-life__value {
  font-family: inherit;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.coin-wash-batch-results button > em,
.coin-wash-batch-results .coin-wash-bonus-life > .coin-wash-bonus-life__value {
  font-family: inherit;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.coin-washes-rules > h3 {
  margin: 0 0 6px;
  font-size: 12px;
}

.coin-washes-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-top: 8px;
}

.coin-washes-actions button {
  min-width: 0;
  height: 38px;
  padding: 0 2px;
  border: 1px solid #ef9bb3;
  border-radius: 0;
  color: #d64f77;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.coin-washes-actions button:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  color: #fff;
  background: #e9638a;
}

.coin-washes-actions button:disabled {
  border-color: #dedfe2;
  color: #a6a9ae;
  background: #f2f3f4;
  cursor: not-allowed;
}

.voyage-adventure-actions button,
.voyage-coin-card__actions button {
  height: 38px;
  border: 1px solid #f3a1b9;
  border-radius: 0;
  color: #df587f;
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}

.voyage-adventure-actions button:last-child,
.voyage-coin-card__actions button:last-child {
  color: #fff;
  background: #ee6c92;
}

.voyage-adventure-actions button:disabled,
.voyage-coin-card__actions button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

#voyage-coin-materials {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.voyage-coin-material {
  display: grid;
  min-width: 0;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  padding: 5px;
  border: 1px solid #e6e8eb;
}

.voyage-coin-material img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.voyage-coin-material span,
.voyage-coin-material strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voyage-coin-material span {
  color: #777d86;
  font-size: 8px;
}

.voyage-coin-material strong {
  margin-top: 2px;
  font-size: 10px;
}

.voyage-coin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 7px;
  padding: 9px;
}

.voyage-coin-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 7px;
  border: 1px solid #e2e5e8;
  background: #fff;
}

.voyage-coin-card.is-owned {
  border-color: #f3a1b9;
  box-shadow: inset 0 3px #f17a9d;
}

.voyage-coin-card__head {
  display: grid;
  grid-template-columns: 45px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}

.voyage-coin-card__head .voyage-coin-quality-icon {
  width: 45px;
  height: 45px;
}

.voyage-coin-quality-icon {
  position: relative;
  display: block;
  flex: 0 0 auto;
  overflow: visible;
}

.voyage-coin-quality-icon > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.voyage-coin-quality-icon > .voyage-coin-quality-icon__portrait {
  inset: 3.5%;
  width: 93%;
  height: 93%;
  z-index: 0;
  object-fit: cover;
  -webkit-mask: var(--voyage-coin-head-mask-image, url("./voyage-adventure/coin-head/circle128.png")) center / 100% 100% no-repeat;
  mask: var(--voyage-coin-head-mask-image, url("./voyage-adventure/coin-head/circle128.png")) center / 100% 100% no-repeat;
}

.voyage-coin-quality-icon__frame {
  z-index: 1;
  object-fit: contain;
}

.voyage-coin-card__head strong,
.voyage-coin-card__head small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.voyage-coin-card__head strong {
  font-size: 10px;
}

.voyage-coin-card__head small,
.voyage-coin-card__fragments,
.voyage-coin-card__progress,
.voyage-coin-card__cost {
  color: #80858e;
  font-size: 8px;
  line-height: 1.45;
}

.voyage-coin-card__fragments {
  color: #d95079 !important;
  font-weight: 800;
}

.voyage-coin-card__fragments.is-insufficient {
  color: #d13261 !important;
}

.voyage-coin-card__progress,
.voyage-coin-card__cost {
  margin: 5px 0 0;
}

.voyage-coin-card__cost {
  white-space: pre-line;
}

.voyage-coin-card__cost.is-insufficient {
  color: #d94f76;
  font-weight: 800;
}

.voyage-coin-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 0;
  padding-top: 6px;
}

.voyage-coin-card__actions button {
  height: 28px;
  padding: 0 2px;
  font-size: 9px;
}

.voyage-coin-card__actions button[data-coin-action="compose"],
.voyage-coin-card__actions button[data-coin-action="auto-progress"] {
  grid-column: 1 / -1;
}

.voyage-adventure-close:focus-visible,
.voyage-adventure-tabs button:focus-visible,
.voyage-adventure-actions button:focus-visible,
.voyage-coin-card__actions button:focus-visible,
.coin-wash-choice:focus-visible,
.coin-washes-layers button:focus-visible,
.coin-wash-affix:focus-visible,
.coin-washes-actions button:focus-visible,
.voyage-adventure-entry:focus-visible {
  outline: 2px solid #e85c85;
  outline-offset: 2px;
}

@media (max-width: 420px) {
  .voyage-adventure-dialog {
    width: min(366px, calc(100vw - 16px));
    height: min(748px, calc(100dvh - 24px));
  }

  .voyage-adventure-panel {
    max-height: none;
  }
}

@media (max-width: 340px) {
  .voyage-adventure-panel__header { padding: 15px 13px; }
  .voyage-adventure-reward-content { padding: 15px 13px; }
  .voyage-adventure-actions { padding: 12px 13px; }
  .coin-reward-item { padding-top: 10px; padding-bottom: 9px; }
  .coin-reward-item .voyage-coin-quality-icon { width: 49px; height: 49px; }
  .coin-reward-item figcaption { gap: 4px; }
}

.pve-bots-dialog {
  width: min(374px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  height: min(720px, calc(100vh - 24px));
  max-height: calc(100vh - 24px);
  height: min(720px, calc(100dvh - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  overflow: hidden;
  border: 1px solid #e1e4e9;
  border-radius: 0;
  color: #29323e;
  background: #fff;
}

.pve-bots-dialog::backdrop {
  background: rgba(37, 44, 54, 0.48);
}

.pve-bots-panel {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.pve-bots-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid #e7e9ed;
}

.pve-bots-header small {
  color: #f74788;
  font-size: 11px;
}

.pve-bots-header h2 {
  margin: 4px 0 0;
  font-size: 21px;
  line-height: 1.4;
}

#pve-bots-close {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  padding: 0;
  border: 1px solid #dfe2e6;
  border-radius: 0;
  color: #858b95;
  background: #fff;
  cursor: pointer;
  font-size: 25px;
  line-height: 1;
}

.pve-bots-tools {
  display: flex;
  min-height: 48px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
}

#pve-bots-total {
  color: #647083;
  font-size: 12px;
}

.pve-bots-list {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  padding: 4px 12px 12px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}


.pve-bots-list::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.pve-bot-card {
  display: grid;
  min-width: 0;
  flex: 0 0 auto;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e7e9ed;
  background: #fff;
}

.pve-bot-avatar {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.pve-bot-avatar[hidden] {
  display: none;
}

.pve-bot-copy {
  min-width: 0;
  grid-column: 2;
  overflow-wrap: anywhere;
}

.pve-bot-copy h3 {
  margin: 0 0 5px;
  font-size: 13px;
  line-height: 1.5;
}

.pve-bot-copy p {
  margin: 0 0 4px;
  color: #ee5185;
  font-size: 11px;
  line-height: 1.5;
}

.pve-bot-copy small {
  color: #8893a4;
  font-size: 10px;
  line-height: 1.7;
}

.pve-bot-copy .pve-bot-description {
  color: #647083;
}

.pve-bot-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pve-bot-actions button,
#pve-bots-refresh,
#pve-bots-retry {
  min-width: 0;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #fa7298;
  border-radius: 0;
  color: #ee5185;
  background: #fff;
  font-size: 11px;
  line-height: 1.5;
  cursor: pointer;
}

.pve-bot-actions [data-pve-bot-challenge] {
  color: #fff;
  background: #f74788;
}

.pve-bots-panel button:disabled {
  cursor: default;
  opacity: 0.5;
}

.pve-bots-panel button:focus-visible {
  outline: 2px solid #fa7298;
  outline-offset: -2px;
}

#pve-bots-status {
  flex: 0 0 auto;
  margin: 0;
  padding: 10px 16px;
  border-top: 1px solid #e7e9ed;
  color: #647083;
  font-size: 11px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

#pve-bots-status:empty {
  display: none;
}

#pve-bots-status.is-error {
  color: #ee5185;
}

#pve-bots-retry {
  flex: 0 0 auto;
  align-self: center;
  margin: 0 12px 12px;
}

.daily-entry:focus-visible {
  outline: 2px solid #fa7298;
  outline-offset: -2px;
}

@media (hover: hover) and (pointer: fine) {
  .daily-entry:hover:not(:disabled) {
    border-color: #fa7298;
    color: #df557d;
  }

  .daily-entry:hover:not(:disabled) .daily-entry__action {
    border-color: #e85c85;
    color: #fff;
    background: #e85c85;
  }

}

@media (max-width: 340px) {
  .daily-entry {
    gap: 10px;
    padding: 11px;
  }

  .daily-entry__copy > strong {
    font-size: 18px;
  }

  .daily-entry {
    grid-template-columns: minmax(0, 1fr) 82px;
  }

}

/* Partner progression actions and medal refinement. */
.lineup-actions { grid-template-columns: repeat(5, minmax(0, 1fr)); height:auto; grid-auto-rows:38px; }
#lineup-food-card-entry { grid-column:1; grid-row:2; }
.food-card-dialog { box-sizing:border-box;width:min(390px,calc(100vw - 28px));height:min(500px,76dvh);max-width:none;max-height:none;padding:18px;margin:auto;border:1px solid #f0e3e8;border-radius:0;background:#fff;color:#444b55;overflow:hidden; }
.food-card-dialog[open] { display:flex;flex-direction:column;gap:14px; }
.food-card-dialog::backdrop { background:#17212b80; }
.food-card-dialog header { display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0;padding-bottom:14px;border-bottom:1px solid #f0e3e8; }
.food-card-dialog h2 { margin:0;font-size:20px;line-height:1.4;overflow-wrap:anywhere; }
.food-card-dialog button { border:1px solid #ff719a;border-radius:0;background:#fff;color:#ed5c8a;font:inherit;cursor:pointer;min-height:44px; }
.food-card-dialog button:disabled { color:#afb4bd;border-color:#e3e5e8;cursor:default; }
.food-card-close { flex:0 0 44px;width:44px;height:44px;font-size:26px !important; }
.food-card-list { flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;scrollbar-width:none; }
.food-card-list::-webkit-scrollbar { display:none; }
.food-card-row { display:grid;grid-template-columns:44px minmax(0,1fr) 52px;gap:8px;align-items:center;padding:10px;margin-bottom:12px;border:1px solid #dfe2e6; }
.food-card-row.is-equipped { border-color:#ff719a;background:#fff8fa; }
.food-card-row img { width:44px;height:44px;object-fit:contain; }
.food-card-copy { min-width:0; }.food-card-copy strong { font-size:15px; }.food-card-copy p { margin:6px 0;font-size:12px;line-height:1.6;color:#858d99; }.food-card-copy small { color:#ed5c8a;font-size:12px; }
.food-card-equip { grid-column:3;grid-row:1;justify-self:stretch;min-width:0;padding:6px;font-size:13px !important;white-space:nowrap; }
.food-card-status { margin:0;min-height:20px;flex-shrink:0;font-size:12px;line-height:1.6;color:#ed5c8a; }
.food-card-empty { color:#9298a3;text-align:center;font-size:14px; }
.food-card-retry { flex-shrink:0; }.food-card-retry[hidden] { display:none; }
/* Shared compact loadout lists: pet, environment, food card and snail. */
:is(.food-card-dialog, .lineup-snail-card, .formation-environment-dialog) { box-sizing:border-box; width:min(350px,calc(100vw - 28px)); max-width:350px; height:min(500px,76dvh); }
:is(.food-card-dialog, .lineup-snail-card) { padding:12px; gap:12px; border:1px solid #dfe2e6; }
.formation-environment-picker__header { min-height:68px; box-sizing:border-box; padding:12px; }
:is(.food-card-dialog, .lineup-snail-card) > header { min-height:56px; box-sizing:border-box; padding-bottom:12px; border-bottom:1px solid #e3e5e7; }
:is(.food-card-dialog, .lineup-snail-card, .formation-environment-dialog) h2 { font-size:18px; }
:is(#formation-environment-options, #formation-main-pet-options, .partner-exchange-picker-options) { padding:12px; }
:is(#formation-environment-options, #formation-main-pet-options, .partner-exchange-picker-options) > .formation-environment-option,
.food-card-row, .lineup-snail-preview { box-sizing:border-box; grid-template-columns:48px minmax(0,1fr) 52px; gap:8px; padding:10px 8px; }
:is(#formation-environment-options, #formation-main-pet-options, .partner-exchange-picker-options) .formation-environment-option__image,
.food-card-row img, .lineup-snail-preview img { width:48px; height:54px; object-fit:contain; }
:is(#formation-environment-options, #formation-main-pet-options, .partner-exchange-picker-options) .formation-environment-option strong,
.food-card-copy strong, .lineup-snail-preview strong { font-size:13px; }
:is(#formation-environment-options, #formation-main-pet-options, .partner-exchange-picker-options) .formation-environment-option small { min-height:0; font-size:11px; line-height:1.5; margin-top:5px; }
.food-card-copy p { font-size:11px; }
.food-card-copy small { font-size:10px; }
:is(#formation-environment-options, #formation-main-pet-options, .partner-exchange-picker-options) .formation-environment-option__actions button,
.food-card-equip, .lineup-snail-submit { min-height:44px; height:44px; padding:0 6px; font-size:13px; }
.formation-environment-dialog__close, .formation-main-pet-dialog__close, .food-card-close, .lineup-snail-close { width:44px; height:44px; border:1px solid #dfe2e6; color:#777d86; }
.choice-pack-dialog { box-sizing:border-box;width:min(380px,calc(100vw - 28px));height:min(var(--choice-pack-height,320px),76dvh);max-width:none;max-height:none;padding:16px;margin:auto;border:1px solid #f0e3e8;border-radius:0;background:#fff;color:#444b55;overflow:hidden; }
.choice-pack-dialog[open] { display:flex;flex-direction:column;gap:10px; }.choice-pack-dialog::backdrop { background:#17212b80; }
.choice-pack-dialog header,.choice-pack-dialog footer { display:flex;justify-content:space-between;align-items:center;gap:12px;flex-shrink:0; }
.choice-pack-dialog header { border-bottom:1px solid #f0e3e8;padding-bottom:12px; }.choice-pack-dialog h2 { margin:0;font-size:20px; }
.choice-pack-dialog button { min-height:44px;border:1px solid #ff719a;border-radius:0;background:#fff;color:#ed5c8a;font:inherit;cursor:pointer;padding:8px 14px; }
.choice-pack-dialog button:disabled { opacity:.45;cursor:default; }.choice-pack-close { width:44px;flex:0 0 44px;font-size:26px !important;padding:0 !important; }
.choice-pack-caption,.choice-pack-status { margin:0;font-size:13px;line-height:1.5;flex-shrink:0; }.choice-pack-caption { color:#9298a3; }.choice-pack-status { min-height:20px;color:#ed5c8a; }
.choice-pack-list { flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;scrollbar-width:none; }.choice-pack-list::-webkit-scrollbar { display:none; }
.choice-pack-option { display:grid;grid-template-columns:56px minmax(0,1fr) 22px;align-items:center;gap:10px;border:1px solid #dfe2e6;padding:10px;margin-bottom:10px;cursor:pointer; }
.choice-pack-option.is-selected { border-color:#ff719a;background:#fff5f8; }.choice-pack-option.is-unavailable { opacity:.6;cursor:default; }
.choice-pack-option img { width:56px;height:64px;object-fit:contain; }.choice-pack-option strong { font-size:14px; }.choice-pack-option p,.choice-pack-option small { font-size:12px;line-height:1.5;color:#9298a3; }.choice-pack-option p { margin:6px 0; }
.choice-pack-option input { appearance:none;width:20px;height:20px;margin:0;border:1px solid #ff719a;border-radius:0;cursor:pointer; }.choice-pack-option input:checked { background:#ff719a; }.choice-pack-option input:checked::after { content:'✓';display:block;color:#fff;line-height:18px;text-align:center; }
.choice-pack-dialog footer { font-size:13px; }.choice-pack-dialog .choice-pack-accept { background:#ff6794;color:#fff; }.choice-pack-retry[hidden] { display:none; }
.choice-pack-dialog footer[hidden] { display:none; }
.choice-pack-dialog.is-preview .choice-pack-option { grid-template-columns:56px minmax(0,1fr);cursor:default; }
.partner-medals-dialog { width:min(330px, calc(100vw - 24px)); height:fit-content; max-height:min(520px,calc(100dvh - 24px)); overflow:hidden; overflow-anchor:none; box-sizing:border-box; padding:12px; border:1px solid #ffd0df; border-radius:0; color:#303742; }
.partner-medals-dialog[open] { display:flex; flex-direction:column; }
.partner-medals-dialog > h2 { flex:0 0 auto; min-height:40px; display:flex; align-items:center; }
.partner-medals-body { flex:0 1 auto; min-height:0; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; touch-action:pan-y; overflow-anchor:none; }
.partner-medals-dialog::backdrop { background:rgb(30 37 47 / 55%); }
.partner-medals-dialog button, .medal-wash-result-dialog button { cursor:pointer; }
.partner-medals-dialog button:disabled, .medal-wash-result-dialog button:disabled { cursor:not-allowed; }
.partner-medals-dialog h2 { font-size:18px; margin:0 44px 8px 0; }
.partner-medals-dialog > .lineup-stats-close { top:10px; right:10px; width:44px; height:44px; }
.partner-medals-dialog [data-medal-art] { display:block; width:100%; height:56px; object-fit:contain; }
.partner-medals-dialog [data-medal-art][hidden] { display:block; visibility:hidden; }
.partner-medals-dialog p { color:#8d94a1; font-size:12px; margin:8px 0; }
.partner-medals-body > [data-medal-status] { margin:0 0 8px; color:#626b79; }
.partner-medals-body > [data-medal-status]:empty { display:none; }
.partner-medals-body > [data-medal-art][hidden] { display:none; }
.partner-medals-body > p:last-child { margin:4px 0 0; font-size:11px; }
.partner-medals-dialog button:not(.lineup-stats-close) { border:1px solid #ff719a; background:#fff; color:#ff6694; padding:6px; min-height:44px; font:inherit; font-size:12px; }
.partner-medals-dialog button.coin-wash-reserve-select { border:0; background:transparent; color:inherit; padding:0; min-height:36px; font:inherit; }
.partner-medals-dialog [role="status"]:empty { display:none; }
.medal-progress { display:grid; grid-template-columns:minmax(0,1fr) 76px; column-gap:8px; margin-top:8px; }
.medal-progress > p,.medal-progress > .medal-wash-toolbar,.medal-progress > .medal-wash-layer { grid-column:1/-1; }
.pvp-medal-platinum-effect { position:absolute; z-index:2; left:0; top:0; width:calc(400px * var(--pvp-ipa-scale-x, .6)); height:calc(400px * var(--pvp-ipa-scale-x, .6)); max-width:none; pointer-events:none; transform:translate(-50%,-50%); }
.medal-summary { display:grid; grid-template-columns:44px minmax(0,1fr); align-content:center; align-items:center; column-gap:8px; row-gap:3px; padding:6px 8px; background:#fff2f6; font-size:12px; min-width:0; }
.partner-medals-dialog .medal-summary [data-medal-art] { grid-column:1; grid-row:1/3; width:44px; height:48px; }
.medal-summary strong { grid-column:2; align-self:end; color:#ff6694; }
.medal-summary > span { grid-column:2; align-self:start; font-size:11px; overflow-wrap:anywhere; }
@media(max-width:350px) { .medal-summary { padding-inline:6px; column-gap:2px; } .medal-summary > span { font-size:10px; } }
.partner-medals-dialog .medal-progress + [role="status"] { display:block; height:18px; min-height:18px; line-height:18px; overflow-y:auto; margin:4px 0; }
.medal-upgrade { width:100%; margin:0; align-self:stretch; }
.partner-medals-dialog button.medal-upgrade { background:#ff6694; color:white; }
.medal-upgrade-cost { text-align:left; }
.medal-wash-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:6px; padding-bottom:6px; font-size:11px; }
.medal-wash-toolbar > span { margin-left:auto; text-align:right; }
.medal-layer-tabs { display:flex; flex:0 0 auto; flex-wrap:wrap; gap:4px; min-width:0; width:100%; max-width:100%; }
.medal-layer-tabs:has(button:only-child) { width:auto; }
.partner-medals-dialog .medal-layer-tabs button { flex:0 0 48px; box-sizing:border-box; min-width:44px; padding:6px 2px; font-size:12px; white-space:nowrap; }
.partner-medals-dialog .medal-layer-tabs button[aria-pressed="true"] { background:#ff6694; color:white; }
.medal-wash-result-dialog { left:50%; top:50%; width:min(360px,calc(100vw - 24px)); --coin-result-height:calc(100dvh - 24px); }
.medal-wash-result-dialog .coin-wash-batch-card { height:min(580px,calc(100dvh - 24px)); grid-template-rows:auto auto minmax(0,1fr) auto auto; }
.medal-wash-result-dialog[data-result-mode="single"] .coin-wash-batch-card { height:min(300px,calc(100dvh - 24px)); }
.partner-medals-dialog .coin-washes-affixes { margin-bottom:10px; }
.partner-medals-dialog .coin-wash-saved-slot > .coin-wash-affix { min-height:104px; padding:8px; }
.partner-medals-dialog .coin-wash-values, .partner-medals-dialog .coin-wash-reserve-select { grid-template-columns:minmax(0,1fr) auto; gap:3px; }
.partner-medals-dialog .coin-wash-affix em { text-align:right; white-space:nowrap; }
.partner-medals-dialog .coin-wash-bonus-life { flex-wrap:wrap; gap:2px 6px; }
.partner-medals-dialog .coin-wash-bonus-life span { font-size:10px; }
.partner-medals-dialog .coin-wash-affix.is-empty { grid-template-columns:minmax(0,1fr); place-items:center; text-align:center; }
.partner-medals-dialog .coin-washes-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.partner-medals-dialog .coin-washes-actions button { display:grid; align-content:center; gap:3px; min-width:0; font-size:13px; padding:6px 4px; }
.partner-medals-dialog .coin-washes-actions button small { font-size:10px; font-weight:normal; }
.partner-medals-dialog .coin-wash-affix em { display:block; color:#d84f78; font-style:normal; font-size:14px; }
.partner-medals-dialog .coin-wash-affix strong { font-size:13px; }
.partner-medals-dialog .medal-review-results { justify-self:start; padding:2px 4px; font-size:11px; }
.medal-progress button:disabled { opacity:.45; }
.medal-wash-layer { border-top:1px solid #dfe2e7; padding:8px 0; }
.partner-medals-dialog .coin-wash-affix.is-max em { color:#805000; text-shadow:0 1px 0 #fff8d5; }
.medal-total-power { grid-column:1; grid-row:2; font-size:11px; }
.medal-affix-score { display:block; grid-column:1/-1; font-size:10px; line-height:1.5; color:#8d94a1; }
.medal-wash-range { margin-top:8px; font-size:11px; }
.medal-wash-range summary { cursor:pointer; color:#8d94a1; }
.partner-medals-dialog .medal-wash-range p { font-size:11px; margin:5px 0; }
.medal-wash-tools { position:relative; margin-top:8px; }
.medal-wash-tools .medal-wash-range { margin-top:0; }
.medal-wash-tools summary { box-sizing:border-box; min-height:44px; padding:13px 94px 8px 0; }
.partner-medals-dialog button.medal-review-results { position:absolute; right:0; top:0; margin:0; padding:4px; font-size:11px; }
@media(max-width:340px) { .home-page .home-shortcuts { gap:2px; } }
.home-page .home-shortcuts { grid-template-columns:repeat(5,minmax(0,1fr)); gap:2px; }
.home-page .home-shortcuts .home-shortcut { width:100%; min-width:0; }
.home-page .home-shortcuts .home-shortcut > span:last-child { font-size:clamp(9px,2.65vw,11px); }
.daily-tasks-dialog { box-sizing:border-box; width:min(360px,calc(100vw - 24px)); height:min(500px,76dvh); max-height:calc(100dvh - 24px); padding:18px; border:1px solid #e1e3e8; color:#303640; overflow:hidden; }
.daily-tasks-dialog[open] { display:flex; flex-direction:column; gap:12px; }
.daily-tasks-dialog > :not(.daily-task-list) { flex-shrink:0; }
.daily-tasks-dialog > header + p,.daily-tasks-dialog [data-task-reset] { display:none; }
.daily-task-list { flex:1 1 0; min-height:0; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; touch-action:pan-y; -webkit-overflow-scrolling:touch; scrollbar-width:none; -ms-overflow-style:none; }
.daily-task-list::-webkit-scrollbar { display:none; width:0; height:0; }
.daily-task-list:focus-visible { outline:1px solid #ff719a; outline-offset:2px; }
.daily-tasks-dialog::backdrop { background:#17212baa; }
.daily-tasks-dialog header,.daily-tasks-dialog footer { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.daily-tasks-dialog h2 { margin:0; font-size:20px; }
.daily-tasks-dialog button { min-height:40px; border:1px solid #ff719a; color:#ff5e8e; background:white; padding:8px 12px; }
.daily-tasks-dialog [data-task-close] { box-sizing:border-box; flex:0 0 40px; width:40px; height:40px; min-height:40px; padding:0; display:grid; place-items:center; border-radius:0; font-size:22px; line-height:1; }
.daily-tasks-dialog button:disabled { opacity:.45; }
.daily-task-detail { flex:1; min-width:0; }
.daily-task-reward { display:block; margin-top:5px; color:#ff5e8e; font-size:11px; line-height:1.5; }
.daily-task-actions { display:flex; flex-direction:column; align-items:center; gap:5px; flex-shrink:0; }
.daily-tasks-dialog .daily-task-claim { min-width:58px; min-height:32px; padding:4px 8px; font-size:12px; }
.daily-tasks-dialog p { margin:0; font-size:13px; }
.daily-tasks-dialog [data-task-status] { flex-shrink:0; color:#969ba6; font-size:12px; line-height:1.5; }
.daily-tasks-dialog [data-task-status]:empty { display:none; }
.home-shop-dialog { width:min(358px,calc(100vw - 32px)); height:min(680px,calc(100dvh - 48px)); max-height:min(796px,calc(100dvh - 48px)); padding:16px; border:1px solid #e1e3e8; color:#303640; overflow:hidden; }
.home-shop-dialog[open] { display:flex; flex-direction:column; }
.home-shop-dialog > :not(.home-shop-list) { flex-shrink:0; }
.home-shop-list { flex:1; overflow:auto; min-height:0; overscroll-behavior:contain; }
.home-shop-dialog::backdrop { background:#17212baa; }
.home-shop-dialog header { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.home-shop-dialog h2 { margin:0; font-size:22px; }
.home-shop-dialog button { min-height:40px; border:1px solid #ff719a; color:#ff5e8e; background:white; padding:7px 12px; }
.home-shop-dialog button:disabled { opacity:.45; }
.home-shop-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; margin:14px 0 8px; border-bottom:1px solid #e1e3e8; padding-bottom:8px; }
.home-shop-tabs [aria-pressed="true"] { color:white; background:#ff719a; }
.home-shop-balance { flex:1; min-width:0; margin:0; text-align:center; font-size:13px; overflow-wrap:anywhere; }
.home-shop-dialog header > h2,.home-shop-dialog header > button { flex-shrink:0; }
.home-shop-quantity { display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin-top:8px; font-size:12px; }
.home-shop-quantity input { box-sizing:border-box; width:90px; max-width:100%; min-height:32px; padding:4px 6px; border:1px solid #dce0e7; border-radius:0; background:white; color:#303640; font-size:16px; }
.home-shop-item { display:grid; grid-template-columns:48px minmax(0,1fr) auto; align-items:center; gap:8px; padding:14px 0; border-top:1px solid #e1e3e8; }
.home-shop-item > img { width:48px; height:48px; object-fit:contain; }
.home-shop-item h3 { margin:0 0 6px; font-size:14px; overflow-wrap:anywhere; }
.home-shop-item p { margin:0; font-size:12px; color:#777f8b; }
.home-shop-item > button { padding:7px 9px; font-size:13px; }
.home-shop-item.is-treasure { grid-template-columns:48px minmax(0,1fr); gap:12px 8px; }
.shop-chest-actions { grid-column:1/-1; display:flex; align-items:center; justify-content:space-between; gap:8px; }
.shop-chest-actions .home-shop-quantity { margin:0; flex-wrap:nowrap; color:#777f8b; }
.home-shop-quantity-stepper { display:flex; border:1px solid #ffd3e1; background:#fff7fa; }
.home-shop-quantity-stepper button { width:34px; min-height:40px; padding:0; border:0; background:transparent; font-size:22px; line-height:40px; }
.home-shop-quantity-stepper input { width:42px; min-height:40px; padding:0 2px; border:0; border-inline:1px solid #ffe3ec; text-align:center; appearance:textfield; -moz-appearance:textfield; }
.home-shop-quantity-stepper input::-webkit-inner-spin-button,.home-shop-quantity-stepper input::-webkit-outer-spin-button { -webkit-appearance:none; margin:0; }
.shop-chest-actions > button { padding:7px 9px; font-size:13px; }
.home-shop-status { min-height:18px; max-height:54px; margin:12px 0 0; overflow:auto; font-size:13px; line-height:18px; color:#d94c78; }
.tavern-section-tabs[hidden] { display:none; }
.home-shop-tabs button { padding:7px 3px; font-size:13px; }
.home-shop-daily,.shop-treasure-odds { font-size:12px; color:#8b6371; margin:8px 0; }
.shop-treasure-odds summary { cursor:pointer; padding:8px 0; }
.shop-treasure-odds p { line-height:1.7; }
.shop-fragments-title { font-size:14px; margin:18px 0 8px; }
.daily-task-row { display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid #f0e3e8; padding:12px 0; font-size:13px; }
.daily-task-row strong { flex-shrink:0; color:#999; }
.daily-task-row.is-complete strong { color:#ed5c8a; }
.shop-chest-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.shop-chest-count { flex-shrink:0; color:#d94c78; font-size:13px; font-weight:400; }
.shop-treasure-popup { box-sizing:border-box; width:min(358px,calc(100vw - 32px)); height:min(286px,calc(100dvh - 32px)); max-width:none; max-height:none; margin:auto; padding:20px; border:1px solid #ffd3e1; border-radius:0; background:white; color:#d94c78; overflow:hidden; }
.shop-treasure-popup[open] { display:flex; flex-direction:column; gap:14px; }
.shop-treasure-popup::backdrop { background:#17212baa; }
.shop-treasure-popup h2 { margin:0; font-size:22px; flex-shrink:0; }
.shop-treasure-popup .shop-treasure-awards { flex:1; min-height:0; align-items:center; padding:4px 0; overscroll-behavior:contain; touch-action:pan-x; scrollbar-width:none; }
.shop-treasure-popup .shop-treasure-awards::-webkit-scrollbar { display:none; }
.shop-treasure-popup .shop-treasure-awards::before,.shop-treasure-popup .shop-treasure-awards::after { content:''; flex:1 0 0; }
.shop-treasure-popup > button { flex-shrink:0; min-height:44px; border:1px solid #ff6794; border-radius:0; background:#ff6794; color:white; font-size:16px; }
.shop-treasure-awards { display:flex; overflow-x:auto; gap:12px; padding:12px 0 4px; }
.shop-treasure-award { flex:0 0 78px; display:grid; justify-items:center; gap:5px; text-align:center; font-size:11px; animation:shop-reward-appear .3s both; animation-delay:var(--reward-delay); }
.shop-treasure-award img { width:48px; height:48px; object-fit:contain; }
@keyframes shop-reward-appear { from { opacity:0; transform:translateY(6px) scale(.9); } to { opacity:1; transform:none; } }
.lineup-skin-grid { flex-direction:column; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; touch-action:pan-y; scroll-snap-type:none; cursor:auto; }
.lineup-skin-choice { width:100%; min-width:0; flex:0 0 auto; grid-template-columns:64px minmax(0,1fr) auto; align-items:center; gap:10px; touch-action:pan-y; scroll-snap-align:none; }
.lineup-skin-choice__image { width:64px; height:74px; }
.lineup-skin-choice__copy { display:grid; gap:6px; min-width:0; }
.lineup-skin-choice__copy strong { font-size:14px; overflow-wrap:anywhere; }
.lineup-skin-choice__state { font-size:11px; }
.lineup-skin-choice__action { border:1px solid #ff719a; color:#df527a; padding:10px 8px; font-size:12px; }
.lineup-skin-choice.is-selected .lineup-skin-choice__action { border-color:transparent; }
.bag-activation-toast { position:absolute; z-index:260; left:50%; bottom:calc(86px + env(safe-area-inset-bottom)); transform:translateX(-50%); width:max-content; max-width:calc(100% - 32px); margin:0; padding:11px 16px; border:1px solid #fa7298; background:#fff; color:#df527a; box-shadow:0 8px 24px #212a3624; text-align:center; font-size:13px; font-weight:700; overflow-wrap:anywhere; pointer-events:none; }
.bag-activation-toast[hidden] { display:none; }
.bag-activation-toast--center { position:fixed; top:50%; bottom:auto; transform:translate(-50%,-50%); max-width:min(420px,calc(100% - 32px)); line-height:1.6; }
@media (prefers-reduced-motion:reduce) { .shop-treasure-award { animation:none; } }

/* Original campaign maps. Portraits keep IPA 80px size on a 640px canvas. */
.campaign-dialog { width:min(390px,100vw); height:min(844px,100dvh); max-width:100vw; max-height:100dvh; padding:0; border:0; margin:auto; overflow:hidden; background:#102639; color:#fff5cf; container-type:inline-size; font-family:Arial,"Microsoft YaHei",sans-serif; }
.campaign-dialog::backdrop { background:#101b30aa; }
.campaign-dialog [hidden] { display:none !important; }
.campaign-dialog button { cursor:pointer; font:inherit; color:inherit; border:0; }
.campaign-dialog button:disabled { opacity:.45; cursor:default; }
.campaign-dialog button:focus-visible,.campaign-dialog select:focus-visible { outline:2px solid #ffdc55; outline-offset:3px; }
.campaign-scroll { position:absolute; inset:0; overflow:auto; overscroll-behavior:contain; scrollbar-width:none; scroll-padding:170px 0 40px; }
.campaign-map { position:relative; width:100%; min-height:100%; isolation:isolate; }
.campaign-loading {position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:16px;box-sizing:border-box;padding:100px 24px;color:#30343d;background:#fff;text-align:center;pointer-events:none;}
.campaign-loading strong {font-size:clamp(20px,5.5cqw,26px);line-height:1.4;}
.campaign-loading p {width:100%;max-width:300px;min-height:48px;margin:0;font-size:14px;line-height:1.7;color:#9298a3;overflow-wrap:anywhere;}
.campaign-loading-mark {display:grid;place-items:center;flex-shrink:0;width:64px;height:64px;border:1px solid #ffd3e1;border-radius:0;background:#fff5f8;font-size:38px;line-height:1;color:#ff6794;animation:campaign-loading-pulse 1.6s ease-in-out infinite;}
.campaign-loading.is-error .campaign-loading-mark {animation:none;}
.campaign-dialog:is([data-load-state="loading"],[data-load-state="error"]) .campaign-toolbar,.campaign-dialog:is([data-load-state="loading"],[data-load-state="error"]) .campaign-tower-button,.campaign-dialog:is([data-load-state="loading"],[data-load-state="error"]) .campaign-status {visibility:hidden;}
.campaign-dialog[data-load-state="loading"] .campaign-footer {visibility:hidden;}
.campaign-dialog:is([data-load-state="loading"],[data-load-state="error"]) .campaign-header {box-sizing:border-box;min-height:82px;padding:16px 18px;background:#fff;border-bottom:1px solid #f0e3e8;color:#30343d;text-shadow:none;align-items:center;}
.campaign-dialog:is([data-load-state="loading"],[data-load-state="error"]) .campaign-header h2 {display:block;font-size:22px;}
.campaign-dialog:is([data-load-state="loading"],[data-load-state="error"]) .campaign-progress {font-size:12px;color:#9298a3;}
.campaign-dialog:is([data-load-state="loading"],[data-load-state="error"]) .campaign-return {width:72px;height:44px;border:1px solid #ff6794;border-radius:0;background:#fff;color:#ff5188;font-size:16px !important;font-weight:400 !important;text-shadow:none;}
.campaign-dialog[data-load-state="error"] .campaign-footer {bottom:32px;display:flex;height:auto;justify-content:center;}
.campaign-dialog[data-load-state="error"] .campaign-footer .campaign-tower-button {display:none;}
.campaign-dialog[data-load-state="error"] .campaign-footer .campaign-brown {position:static;transform:none;min-width:144px;min-height:44px;padding:10px 20px;border:1px solid #ff6794;border-radius:0;background:#ff6794;color:#fff;text-shadow:none;font-weight:400 !important;}
.campaign-dialog:is([data-load-state="loading"],[data-load-state="error"]) button:focus-visible {outline-color:#ff6794;}
.campaign-dialog[data-campaign="adventure"]:not([data-load-state="loading"]):not([data-load-state="error"]) .campaign-header h2 {display:none;}
.campaign-dialog.has-basic-tower-buttons .campaign-tower-button {background:#89542c;border:2px solid #e1b164;border-radius:8px;}
@keyframes campaign-loading-pulse {50%{opacity:.45;}}
@media(max-height:440px){.campaign-loading{gap:8px;padding:86px 20px 64px;}.campaign-loading-mark{display:none;}.campaign-loading strong{font-size:18px;}.campaign-loading p{min-height:36px;font-size:12px;}.campaign-dialog[data-load-state="error"] .campaign-footer{bottom:12px;}}
@media(prefers-reduced-motion:reduce){.campaign-loading-mark{animation:none;}}
/* LoadingHelper.lua / ui/loading.pb: original Loading4 over the existing scene. */
.campaign-loading-scene {position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:1;}
.campaign-dialog[data-campaign="adventure"]:is([data-load-state="loading"],[data-load-state="error"]) {background:transparent;box-shadow:none;}
.campaign-dialog[data-campaign="adventure"]:is([data-load-state="loading"],[data-load-state="error"])::backdrop {background:transparent;backdrop-filter:none;}
.campaign-dialog[data-campaign="adventure"]:is([data-load-state="loading"],[data-load-state="error"]) > :is(.campaign-scroll,.campaign-world-host) {visibility:hidden;}
.campaign-dialog[data-campaign="adventure"] .campaign-loading {z-index:2;background:rgb(0 0 0 / 65%);color:#fff;padding:24px;gap:0;}
.campaign-dialog[data-campaign="adventure"][data-load-state="loading"] .campaign-loading {opacity:0;}
.campaign-dialog[data-campaign="adventure"][data-load-state="loading"] .campaign-header {visibility:hidden;}
.campaign-dialog[data-campaign="adventure"][data-load-state="loading"] .campaign-loading.is-wait-visible {opacity:1;}
.campaign-dialog[data-campaign="adventure"][data-load-state="loading"] .campaign-loading strong {display:none;}
.campaign-dialog[data-campaign="adventure"] .campaign-loading-mark {position:absolute;left:50%;top:44.27%;transform:translate(-50%,-50%);width:31.25cqw;height:31.25cqw;border:0;background:none;animation:none;}
.campaign-dialog[data-campaign="adventure"] .campaign-loading-mark canvas {display:block;width:100%;height:100%;}
.campaign-dialog[data-campaign="adventure"] .campaign-loading p {position:absolute;top:calc(44.27% + 15.94cqw);left:5%;width:90%;max-width:none;min-height:0;color:white;font-size:clamp(12px,3.75cqw,18px);text-shadow:0 1px 2px #000;}
.campaign-dialog[data-campaign="adventure"]:is([data-load-state="loading"],[data-load-state="error"]) .campaign-header {z-index:3;min-height:0;padding:14px 16px;background:transparent;border:0;}
.campaign-dialog[data-campaign="adventure"]:is([data-load-state="loading"],[data-load-state="error"]) .campaign-header h2 {display:none;}
.campaign-dialog[data-campaign="adventure"]:is([data-load-state="loading"],[data-load-state="error"]) .campaign-return {width:92px;height:46px;border:0;color:#fff5cf;background:var(--campaign-return-image) center/100% 100% no-repeat;font-weight:900 !important;text-shadow:0 2px 2px #22580a;}
.campaign-dialog[data-campaign="adventure"][data-load-state="error"] .campaign-loading-mark {display:none;}
.campaign-dialog[data-campaign="adventure"][data-load-state="error"] .campaign-loading {gap:14px;}
.campaign-dialog[data-campaign="adventure"][data-load-state="error"] .campaign-loading p {position:static;max-width:300px;}
.campaign-dialog[data-campaign="adventure"][data-load-state="error"] .campaign-footer {z-index:3;}
.campaign-dialog[data-campaign="adventure"]:is([data-load-state="loading"],[data-load-state="error"]) button:focus-visible {outline-color:#ffdc55;}
@media(max-height:440px){.campaign-dialog[data-campaign="adventure"][data-load-state="loading"] .campaign-loading-mark{display:block;width:84px;height:84px;}.campaign-dialog[data-campaign="adventure"][data-load-state="loading"] .campaign-loading p{top:calc(44.27% + 52px);}}
/* An indeterminate bar: asset preparation has no reliable percentage. */
.campaign-dialog[data-campaign="impel-down"] .campaign-loading-mark {display:block;position:relative;width:min(260px,72cqw);height:10px;overflow:hidden;border:0;border-radius:5px;background:#ffe4ee;font-size:0;animation:none;}
.campaign-dialog[data-campaign="impel-down"] .campaign-loading-mark::after {content:'';position:absolute;inset:0 auto 0 0;width:38%;border-radius:inherit;background:#ff6794;animation:campaign-loading-slide 1.4s ease-in-out infinite alternate;}
.campaign-dialog[data-campaign="impel-down"] .campaign-loading.is-error .campaign-loading-mark {display:none;}
@keyframes campaign-loading-slide {from{transform:translateX(0);}to{transform:translateX(163.15%);}}
@media(prefers-reduced-motion:reduce){.campaign-dialog[data-campaign="impel-down"] .campaign-loading-mark::after{animation:none;left:31%;}}
[data-campaign="impel-down"] .campaign-map { height:100%; }
.campaign-background { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:-1; pointer-events:none; }
.campaign-header { position:absolute; inset:0 0 auto; display:grid; grid-template-columns:1fr auto; gap:4px 8px; padding:14px 16px 10px; background:linear-gradient(#101722df,#10172280,transparent); text-shadow:0 2px 2px #241409; }
[data-campaign="adventure"] .campaign-header { background:transparent; }
.campaign-header h2 { font-size:clamp(20px,5cqw,29px); margin:0; }
.campaign-progress { font-size:clamp(11px,2.8cqw,15px); grid-row:2; }
.campaign-return { grid-column:2; grid-row:1 / 3; width:92px; height:46px; padding:0; background:var(--campaign-return-image) center/100% 100% no-repeat; font-weight:900 !important; font-size:20px !important; text-shadow:0 2px 2px #22580a; }
.campaign-toolbar { position:absolute; left:14px; right:14px; top:88px; display:flex; align-items:flex-start; gap:16px; }
.campaign-mechanic-toggle { min-width:0; min-height:44px; padding:8px 10px; border:1px solid #d9bb68; border-radius:6px; background:#202c40eb; color:#ffe498; font-size:12px; line-height:1.5; }
.campaign-formation { width:52px; height:66px; padding:44px 0 0; flex-shrink:0; background:var(--campaign-formation-image) center top/38px 45px no-repeat; font-weight:800 !important; text-shadow:0 2px 2px #241409; }
.campaign-node { position:absolute; width:31.25%; padding:0; transform:translate(-50%,-11.71875cqw); background:transparent; text-align:center; text-shadow:0 2px 2px #241409,1px 0 2px #241409,-1px 0 2px #241409; }
.campaign-node-visual { position:relative; display:block; width:100%; height:23.44cqw; }
.campaign-portrait { position:absolute; left:50%; top:50%; width:12.5cqw; height:12.5cqw; transform:translate(-50%,-50%); }
.campaign-frame { position:absolute; left:50%; top:50%; width:auto; height:auto; max-width:none; transform:translate(-50%,-50%); }
.campaign-node[data-quality="1"] .campaign-frame { width:17.19cqw; margin-top:1.5625cqw; }
.campaign-node[data-quality="2"] .campaign-frame { width:17.96875cqw; margin-top:.78125cqw; }
.campaign-node[data-quality="3"] .campaign-frame { width:19.6875cqw; margin-top:-.15625cqw; }
.campaign-node-name { display:block; font-size:clamp(11px,3.2cqw,19px); font-weight:800; white-space:normal; line-height:1.2; }
.campaign-node small { display:block; color:#ffe132; font-size:clamp(10px,3cqw,17px); margin-top:3px; }
[data-campaign="impel-down"] .campaign-node.is-cleared .campaign-node-visual { filter:grayscale(1); }
.campaign-current { position:absolute; left:50%; top:-10px; transform:translate(-50%,-50%); color:#fff078; font-size:clamp(12px,3.4cqw,21px); font-weight:900; }
.campaign-marker { position:absolute; width:40cqw; height:40cqw; max-width:none; left:50%; top:-23.75cqw; transform:translateX(-50%); pointer-events:none; }
.campaign-chest { display:block; width:15.78cqw; height:21.875cqw; object-fit:contain; margin:0 auto 8px; }
.campaign-footer { position:absolute; bottom:18px; left:4%; right:4%; display:flex; gap:8px; justify-content:space-between; pointer-events:none; }
.campaign-footer button { pointer-events:auto; }
.campaign-brown,.campaign-orange { min-height:44px; padding:8px 12px; background:center/100% 100% no-repeat; font-weight:800 !important; text-shadow:0 2px 2px #673514; }
.campaign-brown { background-image:var(--campaign-brown-image); }
.campaign-orange { background-image:var(--campaign-orange-image); }
.campaign-status { position:absolute; left:0; right:0; bottom:0; margin:0; padding:7px 12px; background:#101722bd; font-size:12px; text-align:center; pointer-events:none; }
.campaign-detail { position:absolute; inset:18% 5% 15%; overflow:auto; padding:18px; border:3px solid #b58d47; border-radius:12px; background:#202c40f7; box-shadow:0 8px 40px #0008; }
.campaign-detail h3 { font-size:18px; margin:12px 0; }
.campaign-detail.campaign-mechanic-detail { position:relative; inset:auto; width:calc(100% - 32px); max-height:calc(100% - 48px); box-sizing:border-box; }
.campaign-mechanic-detail h3 { margin-top:0; }
.campaign-detail-close { display:block; margin-left:auto; background:transparent; text-decoration:underline; padding:6px; }
.campaign-detail select { width:100%; padding:8px; color:#fff5cf; background:#182438; border:1px solid #b59355; }
.campaign-detail p { font-size:13px; line-height:1.6; }
.campaign-detail > .campaign-orange { display:block; margin:16px auto 0; min-width:140px; }
.campaign-monsters { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-top:12px; }
.campaign-monsters div { min-width:0; text-align:center; font-size:11px; }
.campaign-monsters img { width:100%; height:100px; object-fit:contain; display:block; }
@media(max-height:620px) { .campaign-toolbar { top:78px; } .campaign-detail { inset:10% 4% 10%; } .campaign-monsters img { height:72px; } }
.campaign-world-host { position:absolute; inset:0; overflow-x:auto; overflow-y:hidden; touch-action:pan-x; scrollbar-width:none; overscroll-behavior:contain; user-select:none; }
.campaign-world { position:relative; isolation:isolate; }
.campaign-world-tile { position:absolute; top:0; max-width:none; pointer-events:none; }
.campaign-island { position:absolute; padding:0; background:none; transform:translate(-50%,-50%); }
.campaign-island-art { display:block; width:100%; height:100%; max-width:none; }
.campaign-island-name { position:absolute; max-width:none; transform:translate(-50%,-50%); pointer-events:none; }
.campaign-island-plaque { position:absolute; transform:translate(-50%,-50%); pointer-events:none; }
.campaign-island-plaque-art { display:block; width:100%; height:100%; max-width:none; }
[data-campaign="impel-down"] .campaign-footer { bottom:10cqw; left:0; right:0; height:11.25cqw; display:block; }
.campaign-tower-button { position:absolute; bottom:0; width:26.25cqw; height:11.25cqw; padding:0; transform:translateX(-50%); background:transparent; font-family:IPACuYuan,sans-serif !important; font-size:4.0625cqw !important; text-shadow:0 2px 2px #673514; }
.campaign-tower-button canvas { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
.campaign-tower-button span { position:relative; z-index:1; }
.campaign-tower-button .is-pressed { display:none; }
.campaign-tower-button:active:not(:disabled) .is-pressed { display:block; }
.campaign-tower-button:active:not(:disabled) .is-normal { display:none; }
.campaign-reset { left:18%; }
.campaign-sweep { left:82%; }
.campaign-auto { left:50%; }
[data-campaign="adventure"] .campaign-auto { left:30%; }
.campaign-dialog[data-campaign="adventure"] .campaign-footer { bottom:56px; }
.campaign-dialog[data-campaign="adventure"] .campaign-footer .campaign-tower-button { min-width:0; }
.campaign-dialog[data-campaign="adventure"] .campaign-footer .campaign-tower-button:disabled { opacity:1; filter:grayscale(.7) brightness(.85); }
.campaign-auto-stars { left:70%; }
.campaign-reset-count { position:absolute; left:4.875%; top:calc(100% + 1.25cqw); white-space:nowrap; font:3.4375cqw IPACuYuan,sans-serif; text-shadow:0 2px 2px #241409; }
[data-campaign="impel-down"] .campaign-footer .campaign-brown { position:absolute; bottom:28cqw; left:50%; transform:translateX(-50%); }
.campaign-world-portal { position:absolute; transform:translate(-50%,-50%); z-index:30; }
.campaign-chapters { position:absolute; z-index:40; }
.campaign-chapters.is-native {inset:0;max-height:none;margin:0;padding:0;border:0;border-radius:0;background:rgb(0 0 0 / 78.43%);overflow:hidden;display:grid;place-items:center;}
.campaign-chapter-size {position:relative;}
.campaign-chapter-frame {position:absolute;left:0;top:0;transform-origin:0 0;}
.campaign-chapter-background {position:absolute;inset:0;pointer-events:none;}
.campaign-chapter-close {position:absolute;padding:0;margin:0;background:transparent center/100% 100% no-repeat;}
.campaign-chapter-list {position:absolute;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none;touch-action:pan-y;overflow-anchor:none;}
.campaign-chapter-list::-webkit-scrollbar {display:none;}
.campaign-chapter-native-card {display:block;position:relative;padding:0;border:0;background:transparent;}
.campaign-chapter-native-card canvas {display:block;pointer-events:none;}
.campaign-dialog .campaign-chapter-native-card:disabled {opacity:1;}
.campaign-chapter-native-card:active:not(:disabled)::after {content:'';position:absolute;left:21px;top:15.5px;width:581px;height:219px;background:rgb(255 254 208 / 49.8%);pointer-events:none;}
.campaign-chapters.is-special {background:transparent;pointer-events:none;}
.campaign-chapter-special-art {pointer-events:auto;}
.campaign-chapter-special-hit {position:absolute;padding:0;margin:0;background:transparent;pointer-events:auto;}
.campaign-dialog .campaign-chapter-special-hit:disabled {opacity:1;}
.campaign-chapter-special-hit:active:not(:disabled) {background:rgb(255 254 208 / 20%);}
.campaign-native-detail { position:absolute; inset:0; z-index:50; background:#0008; display:grid; place-items:center; }
.campaign-native-panel { position:relative; color:#613b19; text-shadow:none; }
.campaign-native-part { position:absolute; padding:0; margin:0; box-sizing:border-box; border:0; border-radius:0; box-shadow:none; background-color:transparent; }
.campaign-native-part > canvas { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
.campaign-native-part > span { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; white-space:nowrap; pointer-events:none; }
.campaign-native-part[data-part="BTN_ATTACK1"] > span { inset:auto; left:50%; top:50%; transform:translate(-50%,-50%); color:white; text-shadow:0 2px 2px #744419; font-weight:bold; }
.campaign-native-description > span { justify-content:center; text-align:center; }
.campaign-first-clear { position:absolute; top:44cqw; left:5cqw; right:5cqw; padding:0 0 3cqw; text-align:center; }
.campaign-first-clear h3 { margin:0 0 2cqw; color:#613b19; font:700 3.75cqw/1.3 IPACuYuan,sans-serif; }
.campaign-first-clear-items { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:2cqw; }
.campaign-first-clear-item { display:grid; justify-items:center; gap:.5cqw; font:3.5cqw/1.25 IPACuYuan,sans-serif; }
.campaign-first-clear-item img { width:10cqw; height:10cqw; object-fit:contain; }
.campaign-first-clear-item b { color:#a95316; font-size:3.75cqw; }
.campaign-native-head { position:absolute; max-width:none; transform:translate(-50%,-50%); pointer-events:none; }
.campaign-unearned-star { filter:grayscale(1); }
.campaign-map-stars { display:flex; justify-content:center; gap:0; }
.campaign-map-stars img { width:5.9375cqw; height:5.625cqw; }
.campaign-dialog { font-family:IPACuYuan,sans-serif; font-synthesis:none; }
.campaign-story { position:absolute; z-index:80; inset:0; background:transparent; overflow:hidden; cursor:pointer; }
#pvp-battlefield { container-type:inline-size; }
#pvp-battlefield .campaign-story { font-family:IPACuYuan,sans-serif; }
.campaign-story-canvas { position:absolute; inset:0; }
.campaign-story img { position:absolute; max-width:none; pointer-events:none; }
.campaign-story-actor { position:absolute; overflow:visible; }
.campaign-story-body,.campaign-story-face { left:50%; bottom:0; transform:translateX(-50%); }
.campaign-story-mood { transform:translate(-50%,50%); }
.campaign-story-name { position:absolute; z-index:10; color:white; font-size:calc(28 * var(--story-unit, 1px)); text-shadow:0 1px #000; }
.campaign-story-name img { inset:0; }
.campaign-story-name span { position:absolute; inset:0; display:grid; place-items:center; white-space:nowrap; }
.campaign-story-bubble { z-index:6; }
.campaign-story-content { position:absolute; z-index:7; margin:0; padding:0; color:#000; line-height:1.15; display:flex; align-items:safe center; white-space:pre-wrap; overflow-wrap:anywhere; text-align:left; text-shadow:none; overflow-y:auto; scrollbar-width:none; overscroll-behavior:contain; touch-action:pan-y; }
.campaign-story-content::-webkit-scrollbar { display:none; }
.campaign-story-bar { position:absolute; z-index:8; pointer-events:none; }
.campaign-story-bar.is-top.is-entering { animation:ipa-story-top .2s ease-in; }
.campaign-story-bar.is-bottom.is-entering { animation:ipa-story-bottom .2s ease-in; }
@keyframes ipa-story-top { from {translate:0 -100%} to {translate:0 0} }
@keyframes ipa-story-bottom { from {translate:0 100%} to {translate:0 0} }
.campaign-story-loading { position:absolute; top:40%; width:100%; text-align:center; color:white; }
.campaign-story-actor.is-speaking { animation:ipa-story-shake .1s linear 2; }
.campaign-story-canvas.is-shaking { animation:ipa-story-shake .1s linear 4; }
@keyframes ipa-story-shake { 25% {translate:.46875cqw .46875cqw} 75% {translate:-.46875cqw -.46875cqw} }
.equipment-dialog { position:fixed; inset:50% auto auto 0; margin:0; transform:translateY(-50%); max-width:100vw; max-height:95dvh; padding:12px; box-sizing:border-box; border:1px solid #ffd0df; border-radius:0; background:#fff; color:#303642; font-family:inherit; overflow:hidden; overflow-anchor:none; }
.equipment-dialog[open] { display:flex; flex-direction:column; }
.equipment-dialog > header, .equipment-dialog > .equipment-status, .equipment-dialog > button { flex-shrink:0; }
.equipment-body { flex:1 1 auto; min-height:0; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; touch-action:pan-y; overflow-anchor:none; }
.equipment-dialog::backdrop { background:#142234aa; }
.equipment-dialog [hidden] { display:none !important; }
.equipment-dialog header { display:flex; align-items:center; justify-content:space-between; gap:8px; padding-bottom:8px; border-bottom:1px solid #f0e3e8; }
.equipment-dialog h2 { font-size:18px; margin:0; min-width:0; overflow-wrap:anywhere; }
.equipment-dialog header button { flex:0 0 52px; }
.equipment-dialog button { font:inherit; font-size:12px; min-height:44px; border:1px solid #ffd0df; border-radius:0; background:#fff; padding:7px; }
.equipment-dialog button { color:#ff5e8e; cursor:pointer; }
.equipment-dialog button:disabled { opacity:.45; cursor:default; }
.equipment-tabs { --equipment-slot-size:80px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-rows:repeat(2,var(--equipment-slot-size)); grid-auto-flow:row; gap:8px; margin-top:12px; }
.equipment-tabs button { display:grid; place-items:center; width:100%; height:100%; box-sizing:border-box; border-color:#ff719a; font-size:16px; }
.equipment-tabs button:has(img) { grid-template-rows:minmax(0,1fr) auto auto; gap:1px; padding:5px; font-size:12px; }
.equipment-tabs button:has(img) > span { line-height:14px; }
.equipment-tabs img { display:block; width:32px; height:32px; object-fit:contain; }
.equipment-slot-enchant { font-size:10px; line-height:10px; white-space:nowrap; }
.equipment-dialog [aria-pressed="true"] { border-color:#ff5e8e; background:#fff0f5; box-shadow:inset 0 0 0 1px #ff5e8e; }
.equipment-list { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; margin:12px 0; }
.equipment-empty { display:grid; justify-items:center; gap:14px; padding:16px 0; text-align:center; }
.equipment-empty p { margin:0; color:#747b86; font-size:14px; line-height:1.6; }
.equipment-empty button { min-height:40px; padding:8px 16px; background:#ff6796; color:#fff; }
.equipment-card { display:flex; align-items:center; gap:8px; min-width:0; min-height:48px; padding:8px; border:1px solid #ffd0df; font-size:14px; }
.equipment-card .equipment-card-info { display:flex; flex:1; flex-direction:column; align-items:flex-start; gap:4px; min-width:0; padding:0; border:0; text-align:left; overflow-wrap:anywhere; }
.equipment-card-actions { display:flex; flex-shrink:0; gap:6px; }
.equipment-card-actions button { min-height:40px; white-space:nowrap; }
.equipment-card small { font-size:10px; }
.equipment-overview { display:grid; grid-template-columns:64px minmax(0,1fr); align-items:center; gap:10px; margin-top:10px; }
.equipment-overview > img { display:block; width:64px; height:72px; object-fit:contain; }
.equipment-detail p { font-size:12px; line-height:1.5; margin:6px 0; }
.equipment-overview p { color:#858a93; overflow-wrap:anywhere; }
.equipment-stats { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) auto; column-gap:6px; row-gap:5px; font-size:11px; margin:10px 0; }
.equipment-stats dd { margin:0; color:#289342; }
.equipment-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.equipment-transfer { display:block; width:100%; margin:10px 0; padding:8px; }
.equipment-detail h3,.equipment-detail h4 { margin:10px 0 6px; font-size:14px; }
.equipment-next-stats { margin-top:8px; font-size:12px; }
.equipment-next-stats summary { cursor:pointer; color:#858a93; padding:8px 0; }
.equipment-detail progress { display:block; width:100%; height:8px; box-sizing:border-box; appearance:none; -webkit-appearance:none; border:1px solid #ffd0df; border-radius:0; background:#fff0f5; }
.equipment-detail progress::-webkit-progress-bar { border-radius:0; background:#fff0f5; }
.equipment-detail progress::-webkit-progress-value { border-radius:0; background:#fa7298; }
.equipment-detail progress::-moz-progress-bar { border-radius:0; background:#fa7298; }
.equipment-stones { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:10px 0; }
.equipment-stones button { display:flex; align-items:center; justify-content:center; padding:8px; min-width:0; min-height:44px; font-size:14px; touch-action:none; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }
.equipment-stones .equipment-enchant-all { background:#ff6694; border-color:#ff6694; color:white; }
.equipment-status { min-height:18px; margin:8px 0 0; font-size:13px; line-height:18px; }
.equipment-dialog[data-view="slots"] .equipment-body { flex:0 1 auto; }
.equipment-dialog[data-view="slots"] .equipment-status:empty { display:none; }
.equipment-dialog[data-view="slots"] .equipment-transfer { margin-bottom:0; }
.campaign-chapter strong { font-size:18px; }

/* Hide scrollbar chrome while preserving wheel/touch scrolling. */
* { scrollbar-width:none; }
*::-webkit-scrollbar { display:none; }
.battle-reward-rules {flex:none;background:#fff5f8;color:#733349;font-size:12px;line-height:1.7;}
.battle-reward-rules summary {cursor:pointer;min-height:38px;padding:8px 12px;box-sizing:border-box;color:#ee608d;}
.battle-reward-rules p {margin:0;padding:0 12px 12px;max-height:24vh;overflow:auto;overscroll-behavior:contain;}
.campaign-reward-rules {position:absolute;right:12px;top:64px;z-index:40;max-width:min(280px,85%);box-shadow:0 1px 5px #0002;}
.battle-earned-rewards {padding:10px 0;color:#343743;font:14px/1.4 sans-serif;box-sizing:border-box;}
.battle-earned-rewards[hidden] {display:none!important;}
.campaign-earned-rewards {position:absolute;left:7%;right:7%;top:57%;max-height:32%;overflow:auto;padding:12px;background:linear-gradient(#fff9fcf7,#fff9fce8);border-top:2px solid #fa7298;overscroll-behavior:contain;}
#pvp-settlement-rewards {width:100%;margin-top:14px;border-top:1px solid #f8dce6;}
#pvp-settlement-rewards[hidden] {display:none;}
.campaign-reward-heading {display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 10px;padding:0 0 8px;border-bottom:1px solid #f8dce6;}
.campaign-reward-heading strong {color:#d84b79;font-size:16px;}
.campaign-reward-arrived {font-size:11px;color:#b45070;background:#ffe9f1;padding:3px 7px;}
.campaign-reward-items {display:flex;justify-content:center;gap:8px;margin:0;padding:0;list-style:none;}
.campaign-reward-item {flex:1;max-width:100px;min-width:0;text-align:center;}
.campaign-reward-art {position:relative;display:flex;align-items:center;justify-content:center;min-height:68px;background:#fff0f6;border:1px solid #f8d7e3;box-sizing:border-box;}
.campaign-reward-art img {display:block;width:48px;height:48px;object-fit:contain;margin-bottom:12px;}
.campaign-reward-quantity {position:absolute;left:0;right:0;bottom:0;padding:1px 3px;background:#ffe0ec;color:#b62e5c;font-size:13px;line-height:19px;overflow-wrap:anywhere;}
.campaign-reward-name {display:block;margin-top:5px;color:#654956;font-size:11px;line-height:1.35;overflow-wrap:anywhere;}
.campaign-reward-empty {margin:0;color:#92506b;font-size:12px;text-align:center;}
.campaign-reward-daily-count {margin:12px 0 0;padding-top:10px;border-top:1px solid #f8dce6;color:#d84b79;font-size:12px;text-align:center;}
.campaign-earned-rewards.is-empty {padding:10px;}
@media(max-width:360px){.campaign-earned-rewards{left:5%;right:5%;padding:9px;}.campaign-reward-items{gap:6px;}.campaign-reward-heading{margin-bottom:7px;padding-bottom:6px;}.campaign-reward-art{min-height:60px;}.campaign-reward-art img{width:40px;height:40px;}.campaign-reward-name{font-size:10px;}}
.campaign-result-return {position:absolute;right:12px;bottom:max(12px,env(safe-area-inset-bottom));z-index:2;min-height:40px;padding:8px 12px;border:1px solid #f3a8c0;border-radius:0;background:#fff7fa;color:#d34572;font:14px/1.4 sans-serif;cursor:pointer;}
.impel-native-confirm,.impel-native-rewards {box-sizing:border-box;margin:auto;padding:0;border:0;isolation:isolate;overflow:hidden;color:#5c3217;font-family:IPACuYuan,sans-serif;}
.impel-native-confirm::backdrop,.impel-native-rewards::backdrop {background:#111726a8;}
.impel-native-confirm {width:min(354px,calc(100vw - 20px),calc((100dvh - 24px) * 1.357314));height:auto;aspect-ratio:566/417;max-width:none;max-height:none;background:transparent;border-radius:0;outline:0;box-shadow:none;--prompt-scale:.625;}
.impel-native-skin {position:absolute;inset:0;width:100%;height:100%;z-index:-1;pointer-events:none;}
.impel-native-close {position:absolute;right:2%;top:4%;z-index:4;width:44px;height:44px;padding:6px;border:0;background:transparent;cursor:pointer;}
.impel-native-close img {width:100%;height:100%;object-fit:contain;}
.impel-native-prompt-title {position:absolute;top:10.791367%;left:50%;width:15.371025%;height:8.153477%;transform:translate(-50%,-50%);object-fit:contain;}
.impel-native-message {position:absolute;top:24.580336%;left:13.780919%;width:72.438162%;height:36.211031%;box-sizing:border-box;margin:0;overflow:auto;display:flex;align-items:center;justify-content:center;color:#825600;font-size:calc(26px * var(--prompt-scale));font-weight:400;line-height:1.3;text-align:center;}
.impel-native-actions {position:absolute;inset:0;pointer-events:none;}
.impel-native-confirm .impel-native-close {left:93.639576%;top:11.270983%;right:auto;transform:translate(-50%,-50%);width:max(44px,calc(52px * var(--prompt-scale)));height:max(44px,calc(52px * var(--prompt-scale)));padding:0;display:grid;place-items:center;}
.impel-native-confirm .impel-native-close img {width:calc(52px * var(--prompt-scale));height:calc(52px * var(--prompt-scale));}
.impel-native-button {position:relative;isolation:isolate;min-height:44px;width:99px;aspect-ratio:158/72;padding:3px;border:0;background:#c98b39;border-radius:8px;color:#fff6d4;text-shadow:0 2px 1px #673300;font:700 16px/1 IPACuYuan,sans-serif;cursor:pointer;}
.impel-native-button:active {filter:brightness(.88);}
.impel-native-button {box-sizing:border-box;height:46px;margin:0;box-shadow:none;}
.impel-native-button.has-native-skin {background:transparent;}
.impel-native-button>.impel-native-skin {z-index:0;}
.impel-native-button>span {position:relative;z-index:1;}
.impel-native-confirm .impel-native-button {position:absolute;left:27.915194%;top:77.93765%;transform:translate(-50%,-50%);width:27.915194%;height:max(44px,calc(72px * var(--prompt-scale)));min-height:44px;padding:0;border-radius:0;pointer-events:auto;font-size:calc(26px * var(--prompt-scale));}
.impel-native-confirm .impel-native-button:last-child {left:72.084806%;}
.impel-native-confirm .impel-native-button>.impel-native-skin {top:50%;height:calc(72px * var(--prompt-scale));transform:translateY(-50%);}
.impel-native-rewards {position:fixed;inset:auto;margin:0;max-width:none;max-height:none;background:transparent;color:#fff;--reward-scale:.5;}
.impel-native-rewards::backdrop {background:rgba(0,0,0,.651);}
.impel-native-rewards[data-phase="opening"]::backdrop,.impel-chest-rewards[data-phase="claiming"]::backdrop {background:transparent;}
.impel-chest-title {position:absolute;top:calc(50% - 210px * var(--reward-scale));left:50%;width:calc(390px * var(--reward-scale));height:calc(112px * var(--reward-scale));transform:translate(-50%,-50%);display:grid;place-items:center;z-index:2;}
.impel-chest-title>.impel-reward-ribbon {position:absolute;inset:0;width:100%;height:100%;object-fit:contain;}
.impel-chest-title>.impel-reward-heading {position:relative;width:calc(207px * var(--reward-scale));height:calc(73px * var(--reward-scale));object-fit:contain;}
.impel-reward-heading-fallback {position:absolute;color:#ffe582;font-size:calc(42px * var(--reward-scale));text-shadow:0 2px 2px #622100;}
.impel-chest-status {position:absolute;top:45%;left:9%;right:9%;font-size:14px;line-height:1.6;text-align:center;text-shadow:0 1px 2px #000;}
.impel-chest-items {position:absolute;top:50%;bottom:auto;left:0;right:0;transform:translateY(-50%);height:auto;display:flex;align-items:flex-start;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;padding:calc(52px * var(--reward-scale)) calc(16px * var(--reward-scale));box-sizing:border-box;z-index:1;}
.impel-chest-items::before,.impel-chest-items::after {content:'';flex:1 0 0;}
.impel-chest-item {display:grid;justify-items:center;align-content:start;flex:0 0 calc(134px * var(--reward-scale));gap:calc(8px * var(--reward-scale));font:calc(20px * var(--reward-scale))/1.25 IPACuYuan,sans-serif;text-align:center;text-shadow:0 1px 2px #280000;}
.impel-chest-item>span {max-width:calc(130px * var(--reward-scale));}
.impel-chest-item[data-item-id="gold"]>span,.impel-chest-item[data-item-id="advancement_stone"]>span {color:#ee46ec;}
.impel-chest-item[data-item-id="legendary_bounty"]>span,.impel-chest-item[data-item-id="legendary_partner_fragment"]>span {color:#f1e76e;}
.impel-chest-art {position:relative;width:calc(80px * var(--reward-scale));height:calc(80px * var(--reward-scale));isolation:isolate;}
.impel-chest-art>img {position:relative;z-index:1;width:100%;height:100%;object-fit:contain;}
.impel-chest-item b {position:absolute;right:0;bottom:0;z-index:2;color:#fff;font:700 calc(22px * var(--reward-scale))/1 IPACuYuan,sans-serif;text-shadow:1px 1px 1px #280000,-1px -1px 1px #280000,1px -1px 1px #280000,-1px 1px 1px #280000;white-space:nowrap;}
.impel-chest-item.is-flipping .impel-chest-art>img {visibility:hidden;}
.impel-chest-items.is-preparing .impel-chest-item,.impel-chest-item.is-unrevealed b,.impel-chest-item.is-unrevealed>span {visibility:hidden;}
.impel-item-effect {position:absolute;width:calc(256px * var(--reward-scale));height:calc(256px * var(--reward-scale));max-width:none;left:50%;top:50%;transform:translate(-50%,-50%);pointer-events:none;visibility:visible;}
.impel-chest-done {position:absolute;top:calc(50% + 230px * var(--reward-scale));left:50%;bottom:auto;transform:translate(-50%,-50%);width:calc(158px * var(--reward-scale));height:max(44px,calc(72px * var(--reward-scale)));font-size:calc(26px * var(--reward-scale));z-index:3;}
.impel-chest-done>.impel-native-skin {top:50%;height:calc(72px * var(--reward-scale));transform:translateY(-50%);}
.impel-chest-opening {position:absolute;pointer-events:none;}
.impel-chest-animation {position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;}
.impel-chest-title>.impel-chest-animation {left:50%;top:50%;width:calc(640px * var(--reward-scale));height:calc(320px * var(--reward-scale));transform:translate(-50%,-50%);}
.impel-reward-backlight {position:absolute;width:calc(1024px * var(--reward-scale));height:calc(1024px * var(--reward-scale));left:50%;top:50%;transform:translate(-50%,-50%);pointer-events:none;z-index:0;}
.impel-native-rewards:not([data-phase="rewards"]) .impel-chest-title,.impel-native-rewards:not([data-phase="rewards"]) .impel-chest-items,.impel-native-rewards:not([data-phase="rewards"]) .impel-chest-done,.impel-native-rewards[data-phase="opening"] .impel-chest-status {visibility:hidden;}
.campaign-result-native-items {top:62%;pointer-events:none;}
.campaign-result-native-items .impel-chest-item {flex-basis:calc(142px * var(--reward-scale));}
.campaign-node.is-chest.is-claimed .campaign-chest {filter:grayscale(.8);opacity:.7;}
.campaign-status:empty {display:none;}
